/* Humrah — Dashboard shell. Denser, utility admin-panel look; still on-brand via design tokens. */
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--ivory-50, #F7F5F1); color: var(--color-text);
  font-family: var(--font-sans); -webkit-font-smoothing: antialiased;
}
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--gold-600); }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* ---- Login ---- */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--navy-900); padding: 24px;
}
.login-card {
  width: 100%; max-width: 420px; background: var(--color-surface); border-radius: var(--radius-lg);
  padding: var(--space-8); box-shadow: var(--shadow-lg);
}
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.login-brand span { font: var(--text-h4); font-family: var(--font-serif); color: var(--color-text); }
.role-tabs { display: flex; gap: 8px; margin-bottom: 24px; background: var(--ivory-100); padding: 4px; border-radius: var(--radius-md); }
.role-tab { flex: 1; text-align: center; padding: 9px 8px; border: none; background: transparent; border-radius: var(--radius-sm, 6px); font: var(--text-label); color: var(--color-text-muted); }
.role-tab.active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); font-weight: 600; }
.login-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.login-field label { font: var(--text-label); color: var(--color-text-muted); }
.login-field input { font: var(--text-body-md); padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--color-border); outline: none; }
.login-field input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-scrim-gold); }
.login-submit { width: 100%; padding: 13px; border-radius: var(--radius-md); border: none; background: var(--navy-900); color: #fff; font: var(--text-button); text-transform: uppercase; letter-spacing: var(--tracking-wide); margin-top: 4px; }
.login-submit:hover { background: var(--navy-700); }
.login-submit[disabled] { opacity: 0.7; pointer-events: none; }
.login-error { font: var(--text-caption); color: #B3261E; margin: 2px 0 0; min-height: 1.2em; }
.login-note { text-align: center; font: var(--text-caption); color: var(--color-text-muted); margin-top: 16px; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; font: var(--text-caption); color: var(--color-text-gold); background: var(--color-accent-soft); border: 1px solid var(--color-border-gold); padding: 4px 10px; border-radius: var(--radius-pill); margin-bottom: 20px; }

/* ---- Shell ---- */
.dash-shell { display: flex; min-height: 100vh; }
.dash-sidebar {
  width: 244px; flex-shrink: 0; background: var(--navy-900); color: var(--navy-100);
  display: flex; flex-direction: column; padding: 20px 14px; position: fixed; top: 0; bottom: 0; left: 0;
  z-index: 60; transition: transform var(--duration-base) var(--ease-refined);
}
.dash-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 20px; }
.dash-brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.dash-brand span { font: var(--text-h4); font-family: var(--font-serif); color: #fff; font-size: 1.1rem; }
.dash-role-badge { font: var(--text-caption); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--gold-400); padding: 0 10px 16px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.dash-nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-md);
  color: var(--navy-100); font: var(--text-body-sm); font-weight: 500;
}
.dash-nav a i { width: 18px; height: 18px; opacity: 0.85; }
.dash-nav a:hover { background: rgba(248,246,242,0.06); color: #fff; }
.dash-nav a.active { background: rgba(212,175,55,0.14); color: var(--gold-400); }
.dash-nav a.active i { opacity: 1; }
.dash-logout { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--radius-md); color: var(--navy-200); font: var(--text-body-sm); background: none; border: none; text-align: left; }
.dash-logout:hover { background: rgba(248,246,242,0.06); color: #fff; }
.dash-logout i { width: 18px; height: 18px; }

.dash-main { margin-left: 244px; flex: 1; min-width: 0; }
.dash-topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 32px;
  background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 40;
}
.dash-topbar h1 { font: var(--text-h3); font-family: var(--font-serif); margin: 0; }
.dash-topbar .sub { font: var(--text-body-sm); color: var(--color-text-muted); margin: 2px 0 0; }
.dash-user { display: flex; align-items: center; gap: 10px; }
.dash-user .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy-900); color: #fff; display: flex; align-items: center; justify-content: center; font: var(--text-label); font-weight: 600; }
.dash-user .name { font: var(--text-body-sm); font-weight: 600; }
.dash-user .role { font: var(--text-caption); color: var(--color-text-muted); }
.sidebar-toggle { display: none; background: none; border: none; color: var(--color-text); padding: 6px; }

.dash-content { padding: 28px 32px 64px; max-width: 1240px; }
.dash-section { display: none; }
.dash-section.active { display: block; }

/* ---- Stat cards ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 18px 20px; }
.stat-card .label { font: var(--text-caption); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--color-text-muted); margin-bottom: 8px; }
.stat-card .value { font: var(--text-h2); font-family: var(--font-serif); }
.stat-card .value small { font: var(--text-body-sm); color: var(--color-text-muted); font-family: var(--font-sans); }

/* ---- Panels / cards ---- */
.panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--color-border); gap: 12px; flex-wrap: wrap; }
.panel-head h2 { font: var(--text-h4); margin: 0; }
.panel-head p { font: var(--text-body-sm); color: var(--color-text-muted); margin: 2px 0 0; }
.panel-body { padding: 20px; }

.btn2 { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-md); font: var(--text-label); border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text); }
.btn2:hover { background: var(--ivory-100); }
.btn2-primary { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.btn2-primary:hover { background: var(--navy-700); }
.btn2-gold { background: var(--color-accent); color: var(--navy-900); border-color: var(--color-accent); }
.btn2-gold:hover { background: var(--gold-600); }
.btn2 i { width: 15px; height: 15px; }
.btn2-sm { padding: 6px 12px; font-size: 0.75rem; }

/* ---- Table ---- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; font: var(--text-caption); text-transform: uppercase; letter-spacing: var(--tracking-caps); color: var(--color-text-muted); padding: 10px 20px; border-bottom: 1px solid var(--color-border); }
.data-table td { padding: 14px 20px; border-bottom: 1px solid var(--color-border); font: var(--text-body-sm); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover { background: var(--ivory-50, #F7F5F1); }
.status-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-pill); font: var(--text-caption); font-weight: 600; }
.status-active, .status-available { background: var(--emerald-50); color: var(--emerald-700); }
.status-pending { background: var(--color-accent-soft); color: var(--color-text-gold); }
.status-booked { background: #FCE8E8; color: #B3261E; }

/* ---- Forms ---- */
.dform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .dform-grid { grid-template-columns: 1fr; } }
.dform-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.dform-field.span-2 { grid-column: span 2; }
@media (max-width: 700px) { .dform-field.span-2 { grid-column: span 1; } }
.dform-field label { font: var(--text-label); color: var(--color-text); }
.dform-field .hint { font: var(--text-caption); color: var(--color-text-muted); }
.dform-field input, .dform-field select, .dform-field textarea {
  font: var(--text-body-md); padding: 11px 14px; border-radius: var(--radius-md); border: 1px solid var(--color-border);
  outline: none; font-family: var(--font-sans); background: var(--color-surface); color: var(--color-text);
}
.dform-field input:focus, .dform-field select:focus, .dform-field textarea:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-scrim-gold); }
.dform-field textarea { resize: vertical; min-height: 90px; }
.check-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 560px) { .check-grid { grid-template-columns: 1fr; } }
.check-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); font: var(--text-body-sm); }
.check-item input { width: 16px; height: 16px; accent-color: var(--navy-900); }

/* ---- Pricing tiers ---- */
.tier-row { display: grid; grid-template-columns: 1.2fr 1fr 2fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.tier-row:last-child { border-bottom: none; }
.tier-row input, .tier-row textarea { font: var(--text-body-sm); padding: 9px 12px; border-radius: var(--radius-sm, 6px); border: 1px solid var(--color-border); }
@media (max-width: 760px) { .tier-row { grid-template-columns: 1fr; } }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font: var(--text-caption); color: var(--color-text-muted); background: var(--ivory-100); border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 16px; }
.privacy-note i { width: 15px; height: 15px; color: var(--color-text-gold); flex-shrink: 0; margin-top: 1px; }

/* ---- Calendar ---- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-head h3 { font: var(--text-h4); margin: 0; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface); display: flex; align-items: center; justify-content: center; }
.cal-nav button:hover { background: var(--ivory-100); }
.cal-legend { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-legend span { display: flex; align-items: center; gap: 6px; font: var(--text-caption); color: var(--color-text-muted); }
.cal-legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font: var(--text-caption); color: var(--color-text-muted); padding-bottom: 6px; }
.cal-day {
  aspect-ratio: 1; border-radius: var(--radius-sm, 6px); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; font: var(--text-body-sm); cursor: pointer;
  background: var(--color-surface); user-select: none;
}
.cal-day.empty { border: none; cursor: default; }
.cal-day:hover:not(.empty) { border-color: var(--color-border-strong); }
.cal-day.available { background: var(--emerald-50); color: var(--emerald-700); }
.cal-day.booked { background: #FCE8E8; color: #B3261E; }
.cal-day.blocked { background: var(--ivory-100); color: var(--color-text-muted); }
.cal-day.today { box-shadow: 0 0 0 2px var(--gold-400) inset; }

/* ---- Portfolio uploads ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.photo-slot { aspect-ratio: 1; border-radius: var(--radius-md); overflow: hidden; position: relative; background: var(--ivory-100); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-add { aspect-ratio: 1; border-radius: var(--radius-md); border: 1px dashed var(--color-border-strong); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--color-text-muted); font: var(--text-caption); background: none; }
.photo-add:hover { border-color: var(--color-accent); color: var(--color-text-gold); }
.photo-remove { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(11,31,58,0.75); color: #fff; border: none; display: flex; align-items: center; justify-content: center; }
.photo-add { cursor: pointer; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.media-card { background: var(--ivory-50, #F7F5F1); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px; }
.media-card input, .media-card select { font: var(--text-caption); padding: 7px 9px; border-radius: var(--radius-sm, 6px); border: 1px solid var(--color-border); }

/* ---- Modal ---- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,31,58,0.5); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--color-surface); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--color-border); }
.modal-head h3 { font: var(--text-h4); margin: 0; }
.modal-close { background: none; border: none; color: var(--color-text-muted); padding: 4px; }
.modal-body { padding: 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--color-border); }

/* ---- Toast ---- */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy-900); color: #fff; padding: 12px 22px; border-radius: var(--radius-pill); font: var(--text-body-sm); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 300; display: flex; align-items: center; gap: 8px; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast i { width: 16px; height: 16px; color: var(--gold-400); }

/* ---- Submission review card ---- */
.review-card { display: flex; flex-direction: column; gap: 14px; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--color-border); font: var(--text-body-sm); }
.review-row:last-child { border-bottom: none; }
.review-row .k { color: var(--color-text-muted); }
.review-row .v { font-weight: 600; text-align: right; }

@media (max-width: 900px) {
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .sidebar-toggle { display: inline-flex; }
  .dash-content { padding: 22px 18px 48px; }
  .dash-topbar { padding: 14px 18px; }
}
