/* ============================================================
   GHANA HOUSE — ADMIN STYLES
   ============================================================ */
:root {
  --cream: #FAF4E8;
  --cream-deep: #F0E5CE;
  --cream-soft: #F5EDD9;
  --black: #1A1410;
  --black-soft: #2A2018;
  --gh-red: #CE1126;
  --gh-red-bright: #E0142C;
  --gh-gold: #FCD116;
  --gh-gold-deep: #D4A516;
  --gh-green: #006B3F;
  --gh-green-bright: #00813F;
  --neutral-200: #EAE0CC;
  --neutral-300: #D8CDB5;
  --neutral-400: #B8A98E;
  --neutral-500: #8C7E68;
  --neutral-700: #5A4F3F;

  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", -apple-system, system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--black);
  background: var(--cream);
  background-image:
    radial-gradient(at 80% 0%, rgba(252, 209, 22, 0.05) 0%, transparent 40%),
    radial-gradient(at 0% 100%, rgba(206, 17, 38, 0.03) 0%, transparent 50%);
  min-height: 100vh;
}
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select, textarea { font: inherit; }
.hidden { display: none !important; }
code { font-family: ui-monospace, SF Mono, Menlo, monospace; font-size: 0.9em; background: var(--cream-deep); padding: 2px 6px; border-radius: 4px; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--cream);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 48px 40px 40px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px -20px rgba(26, 20, 16, 0.18);
  position: relative;
  overflow: hidden;
}
.login-flag-stripe {
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg,
    var(--gh-red) 0%, var(--gh-red) 33%,
    var(--gh-gold) 33%, var(--gh-gold) 66%,
    var(--gh-green) 66%, var(--gh-green) 100%);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.login-brand h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}
.login-brand h1 em {
  font-style: italic;
  color: var(--gh-gold-deep);
  font-weight: 400;
}
.login-brand p { color: var(--neutral-500); font-size: 14px; margin: 0; }

.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--neutral-700);
}
.login-field input {
  padding: 13px 16px;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  background: var(--cream-soft);
  color: var(--black);
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--gh-gold-deep);
  background: var(--cream);
}
.login-error {
  color: var(--gh-red);
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  text-align: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--black);
  color: var(--cream);
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--black-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(26, 20, 16, 0.4);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--neutral-400);
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--black); background: var(--cream-deep); }

.btn-ghost {
  background: transparent;
  color: var(--neutral-700);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 600;
  transition: color 0.2s, background 0.2s;
}
.btn-ghost:hover { color: var(--black); background: var(--cream-deep); }

.btn-confirm {
  background: var(--gh-green);
  color: white;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.2s;
}
.btn-confirm:hover { background: var(--gh-green-bright); transform: translateY(-1px); }

.btn-decline {
  background: transparent;
  color: var(--gh-red);
  border: 1.5px solid var(--gh-red);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.2s;
}
.btn-decline:hover { background: var(--gh-red); color: white; }

.btn-delete {
  background: transparent;
  color: var(--neutral-500);
  padding: 7px 11px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s, background 0.2s;
}
.btn-delete:hover { color: var(--gh-red); background: rgba(206, 17, 38, 0.08); }

/* ============================================================
   APP HEADER
   ============================================================ */
.app-header {
  background: var(--cream);
  border-bottom: 1px solid var(--neutral-300);
  position: sticky;
  top: 0;
  z-index: 50;
  position: relative;
}
.app-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--gh-red) 0%, var(--gh-red) 33%,
    var(--gh-gold) 33%, var(--gh-gold) 66%,
    var(--gh-green) 66%, var(--gh-green) 100%);
}
.app-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.app-brand { display: flex; align-items: center; gap: 14px; }
.app-brand-mark {
  width: 42px; height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gh-gold), var(--gh-gold-deep));
  color: var(--black);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  border-radius: 50%;
  font-style: italic;
}
.app-brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.app-brand-sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gh-gold-deep);
  font-weight: 700;
  margin-top: 1px;
}
.app-header-right { display: flex; align-items: center; gap: 14px; }
.app-user { font-size: 13px; color: var(--neutral-700); }
.app-user strong { color: var(--black); }

.tabs {
  display: flex;
  gap: 0;
  padding: 0 32px;
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--neutral-200);
}
.tab {
  background: transparent;
  border: 0;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--neutral-500);
  position: relative;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tab:hover { color: var(--black); }
.tab.active { color: var(--black); }
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 12px; right: 12px;
  height: 2px;
  background: var(--gh-gold-deep);
  z-index: 1;
}
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--neutral-300);
  color: var(--black);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}
.tab.active .tab-count { background: var(--gh-gold); }

/* ============================================================
   APP MAIN
   ============================================================ */
.app-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 32px 80px;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.panel-header { margin-bottom: 28px; }
.panel-header h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.panel-sub { color: var(--neutral-500); font-size: 14px; margin: 0; }

/* ============================================================
   FILTERS
   ============================================================ */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.filter {
  background: transparent;
  border: 1.5px solid var(--neutral-300);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-700);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.filter:hover { border-color: var(--gh-gold-deep); color: var(--gh-gold-deep); }
.filter.active {
  background: var(--black);
  color: var(--cream);
  border-color: var(--black);
}
.filter span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--cream-deep);
  color: var(--black);
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
}
.filter.active span { background: var(--gh-gold); color: var(--black); }

/* ============================================================
   BOOKINGS LIST
   ============================================================ */
.bookings-list { display: grid; gap: 14px; }
.empty-state {
  background: var(--cream-deep);
  border: 1px dashed var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 60px 24px;
  text-align: center;
  color: var(--neutral-500);
  font-size: 14px;
}
.booking-card {
  background: var(--cream);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.booking-card:hover {
  border-color: var(--neutral-400);
  box-shadow: 0 8px 24px -16px rgba(26, 20, 16, 0.15);
}
.booking-card.is-confirmed { border-left: 4px solid var(--gh-green); }
.booking-card.is-declined { border-left: 4px solid var(--gh-red); opacity: 0.7; }
.booking-card.is-pending { border-left: 4px solid var(--gh-gold); }

.booking-main { display: grid; gap: 12px; }
.booking-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}
.booking-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.booking-service {
  font-size: 13px;
  font-weight: 700;
  color: var(--gh-gold-deep);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: rgba(252, 209, 22, 0.12);
  border-radius: var(--radius-pill);
}
.booking-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.status-pending { background: rgba(252, 209, 22, 0.15); color: var(--gh-gold-deep); }
.status-confirmed { background: rgba(0, 107, 63, 0.12); color: var(--gh-green); }
.status-declined { background: rgba(206, 17, 38, 0.1); color: var(--gh-red); }

.booking-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px 20px;
  font-size: 13px;
}
.booking-meta-item { display: flex; flex-direction: column; gap: 2px; }
.booking-meta-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-500);
  font-weight: 700;
}
.booking-meta-value { color: var(--black); font-weight: 500; }
.booking-meta-value a { color: var(--gh-gold-deep); }
.booking-meta-value a:hover { text-decoration: underline; }

.booking-message {
  background: var(--cream-deep);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--neutral-700);
  white-space: pre-wrap;
  border-left: 3px solid var(--neutral-300);
}

.booking-time {
  font-size: 11px;
  color: var(--neutral-500);
  letter-spacing: 0.04em;
}

.booking-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 130px;
}
.booking-actions-row { display: flex; gap: 6px; }
.booking-decided-by {
  font-size: 10px;
  color: var(--neutral-500);
  letter-spacing: 0.04em;
  margin-top: 4px;
  text-align: right;
}

@media (max-width: 700px) {
  .booking-card { grid-template-columns: 1fr; }
  .booking-actions { align-items: stretch; min-width: 0; }
  .booking-actions-row { justify-content: flex-end; }
}

/* ============================================================
   PROFILE
   ============================================================ */
.profile-card {
  background: var(--cream);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 32px;
  display: grid;
  gap: 22px;
  max-width: 640px;
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    var(--gh-red) 0%, var(--gh-red) 33%,
    var(--gh-gold) 33%, var(--gh-gold) 66%,
    var(--gh-green) 66%, var(--gh-green) 100%);
}
.profile-field { display: flex; flex-direction: column; gap: 6px; }
.profile-field label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--neutral-700);
}
.profile-field input {
  padding: 12px 14px;
  border: 1.5px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  background: var(--cream-soft);
  color: var(--black);
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
}
.profile-field input:focus {
  outline: none;
  border-color: var(--gh-gold-deep);
  background: var(--cream);
}
.profile-field .hint { font-size: 12px; color: var(--neutral-500); margin-top: 2px; }

.profile-toggles { display: grid; gap: 12px; }
.toggle-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  padding: 14px 16px;
  background: var(--cream-soft);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.toggle-row:hover { background: var(--cream-deep); border-color: var(--neutral-400); }
.toggle-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  border: 1.5px solid var(--neutral-400);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  position: relative;
  margin-top: 2px;
}
.toggle-row input[type="checkbox"]:checked {
  background: var(--gh-gold-deep);
  border-color: var(--gh-gold-deep);
}
.toggle-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute; left: 5px; top: 1px;
  width: 5px; height: 10px;
  border-right: 2px solid white; border-bottom: 2px solid white;
  transform: rotate(45deg);
}
.toggle-row b { display: block; font-size: 14px; color: var(--black); font-weight: 600; }
.toggle-row small { display: block; font-size: 12px; color: var(--neutral-500); margin-top: 3px; line-height: 1.4; }

.profile-actions {
  display: flex;
  gap: 10px;
  padding-top: 8px;
  flex-wrap: wrap;
}

.info-card {
  background: var(--cream-deep);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  max-width: 640px;
}
.info-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.info-card p { color: var(--neutral-700); font-size: 13px; margin: 0; }

/* ============================================================
   AUDIT LIST
   ============================================================ */
.audit-list { display: grid; gap: 6px; }
.audit-row {
  display: grid;
  grid-template-columns: 110px 100px 1fr;
  gap: 18px;
  padding: 12px 16px;
  background: var(--cream);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  align-items: center;
}
.audit-time {
  color: var(--neutral-500);
  font-size: 11px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.audit-actor {
  font-weight: 600;
  color: var(--black);
}
.audit-action {
  color: var(--neutral-700);
}
.audit-action b { color: var(--black); font-weight: 600; }
@media (max-width: 600px) {
  .audit-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-host {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}
.toast {
  background: var(--black);
  color: var(--cream);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 13px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  max-width: 480px;
  transform: translateX(120%);
  transition: transform 0.25s ease;
  position: relative;
  overflow: hidden;
  border-left: 4px solid var(--gh-gold);
}
.toast.shown { transform: translateX(0); }
.toast.toast-success { border-left-color: var(--gh-green); }
.toast.toast-error { border-left-color: var(--gh-red); }
.toast.toast-undone { border-left-color: var(--neutral-500); }

.toast-icon {
  width: 24px; height: 24px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(252, 209, 22, 0.2);
  color: var(--gh-gold);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.toast-success .toast-icon { background: rgba(0, 107, 63, 0.25); color: var(--gh-green-bright); }
.toast-error .toast-icon { background: rgba(206, 17, 38, 0.2); color: var(--gh-red-bright); }

.toast-msg { flex: 1; line-height: 1.4; }

.toast-undo {
  background: transparent;
  border: 1px solid rgba(252, 209, 22, 0.5);
  color: var(--gh-gold);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.toast-undo:hover { background: var(--gh-gold); color: var(--black); }
.toast-undo:disabled { opacity: 0.5; cursor: wait; }

.toast-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.05);
}
.toast-progress-fill {
  height: 100%;
  background: var(--gh-gold);
  width: 100%;
  animation: toastProgress linear forwards;
  transform-origin: right;
}
@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 600px) {
  .toast-host { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .toast { min-width: 0; max-width: none; }
  .app-header-inner { padding: 14px 16px; }
  .tabs { padding: 0 16px; overflow-x: auto; }
  .app-main { padding: 24px 16px 60px; }
}
