/* ============================================================
   JOSEPHINE LOUNGE — Admin Portal CSS
   Luxury dark UI matching the website's aesthetic
   Cormorant Garamond + Montserrat · Black/Gold/Burgundy
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --gold:          #C8A95C;
  --gold-light:    #D4BF7A;
  --gold-bright:   #e8d090;
  --gold-dim:      rgba(200,169,92,0.35);
  --gold-glow:     rgba(200,169,92,0.18);
  --gold-subtle:   rgba(200,169,92,0.08);
  --black:         #080808;
  --dark:          #0d0d0d;
  --surface:       #111111;
  --surface-2:     #161616;
  --surface-3:     #1e1e1e;
  --burgundy:      rgba(107,26,26,0.5);
  --border:        rgba(200,169,92,0.14);
  --border-med:    rgba(200,169,92,0.25);
  --border-strong: rgba(200,169,92,0.4);
  --text:          #e8e0d0;
  --text-soft:     rgba(232,224,208,0.7);
  --text-muted:    rgba(232,224,208,0.35);
  --green:         #4caf82;
  --green-dim:     rgba(76,175,130,0.15);
  --red:           #c0392b;
  --red-dim:       rgba(192,57,43,0.15);
  --amber:         #d4a017;
  --amber-dim:     rgba(212,160,23,0.15);
  --blue:          #3d8fb5;
  --blue-dim:      rgba(61,143,181,0.15);
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --radius:        6px;
  --radius-lg:     10px;
  --font-serif:    'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:     'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease:          cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --transition:    0.22s ease;
  --shadow-sm:     0 2px 12px rgba(0,0,0,0.4);
  --shadow:        0 8px 40px rgba(0,0,0,0.6);
  --shadow-lg:     0 20px 70px rgba(0,0,0,0.75);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul { list-style: none; }


/* ════════════════════════════════════════════════════════════
   LOGIN PAGE
   ════════════════════════════════════════════════════════════ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  background: var(--black);
}

/* Atmospheric background layers */
.login-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../images/hero-lounge.webp');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.06;
  z-index: 0;
}

.login-page::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% -5%,  rgba(200,169,92,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 10% 90%, rgba(107,26,26,0.2)  0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 90% 80%, rgba(107,26,26,0.12) 0%, transparent 55%);
  z-index: 1;
}

/* The card */
.login-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 400px;
  background: rgba(13,13,13,0.92);
  border: 1px solid var(--border-med);
  border-radius: 2px;
  padding: 3rem 2.5rem 2.5rem;
  box-shadow:
    0 0 0 1px rgba(200,169,92,0.06),
    var(--shadow-lg),
    inset 0 1px 0 rgba(200,169,92,0.08);
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: loginFadeIn 0.7s var(--ease-out) both;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Logo + glow */
.login-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.75rem;
}

.login-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -30px;
  background: radial-gradient(circle, rgba(200,169,92,0.18) 0%, transparent 65%);
  border-radius: 50%;
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%       { transform: scale(1.08); opacity: 0.7; }
}

.login-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 24px rgba(200,169,92,0.3)) brightness(1.1);
}

/* Josephine title */
.login-name {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 300;
  font-style: italic;
  color: #fff;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.login-lounge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

/* Decorative divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.75rem;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-strong), transparent);
}

.login-divider-gem {
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  opacity: 0.7;
}

.login-portal-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Form fields */
.login-field {
  text-align: left;
  margin-bottom: 1.1rem;
}

.login-field label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.login-field input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.06em;
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.login-field input:focus {
  border-color: var(--gold-dim);
  background: rgba(200,169,92,0.04);
  box-shadow: 0 0 0 3px rgba(200,169,92,0.07);
}

/* Enter button */
.login-btn {
  width: 100%;
  padding: 0.95rem;
  background: var(--gold);
  color: #090909;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-top: 0.25rem;
}

.login-btn:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 20px rgba(200,169,92,0.3);
}

.login-btn:active { transform: scale(0.98); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Error */
.login-error {
  background: var(--red-dim);
  border: 1px solid rgba(192,57,43,0.3);
  border-radius: var(--radius);
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  color: #e07060;
  margin-top: 1rem;
  display: none;
  text-align: left;
}

.login-error.visible { display: block; }

/* Bottom credit */
.login-footer-note {
  margin-top: 2rem;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}


/* ════════════════════════════════════════════════════════════
   APP SHELL
   ════════════════════════════════════════════════════════════ */

.app { display: flex; min-height: 100vh; }


/* ════════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════════ */

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
  /* Subtle inner right glow */
  box-shadow: inset -1px 0 0 rgba(200,169,92,0.05);
}

/* Sidebar Header — logo as centrepiece */
.sidebar-header {
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(to bottom, rgba(200,169,92,0.05) 0%, transparent 100%);
  flex-shrink: 0;
  position: relative;
}

/* Gold sparkle line at very top */
.sidebar-header::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.sidebar-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.1rem;
}

.sidebar-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -16px;
  background: radial-gradient(circle, rgba(200,169,92,0.14) 0%, transparent 70%);
  border-radius: 50%;
}

.sidebar-logo {
  width: 62px;
  height: 62px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 14px rgba(200,169,92,0.25)) brightness(1.05);
  display: block;
  margin: 0 auto;
}

.sidebar-brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 300;
  font-style: italic;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.sidebar-brand-sub {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.2rem;
  margin-bottom: 0.9rem;
}

/* Decorative gem divider in sidebar */
.sidebar-gem-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.sidebar-gem-divider::before,
.sidebar-gem-divider::after {
  content: '';
  height: 1px;
  width: 28px;
  background: linear-gradient(to right, transparent, rgba(200,169,92,0.4));
}

.sidebar-gem-divider::after {
  background: linear-gradient(to left, transparent, rgba(200,169,92,0.4));
}

.sidebar-gem {
  width: 4px;
  height: 4px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.6;
  flex-shrink: 0;
}

/* Nav sections */
.sidebar-nav {
  padding: 0.75rem 0 1rem;
  flex: 1;
}

.nav-section {
  margin-bottom: 0.25rem;
}

.nav-section-label {
  padding: 0.85rem 1.4rem 0.3rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1.4rem;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-left: 2px solid transparent;
  border-right: none;
  border-top: none;
  border-bottom: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  position: relative;
}

.nav-item:hover {
  color: var(--text);
  background: var(--gold-subtle);
}

.nav-item.active {
  color: var(--gold);
  background: linear-gradient(to right, rgba(200,169,92,0.1), rgba(200,169,92,0.02));
  border-left-color: var(--gold);
}

.nav-item.active .nav-icon-wrap {
  color: var(--gold);
}

/* SVG icon wrapper */
.nav-icon-wrap {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition);
}

.nav-item:hover .nav-icon-wrap { color: var(--text-soft); }

.nav-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.logout-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.logout-btn:hover {
  border-color: rgba(192,57,43,0.5);
  color: #e07060;
  background: var(--red-dim);
}

.sidebar-credit {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  color: rgba(255,255,255,0.18);
}
.sidebar-credit a {
  color: rgba(200,169,92,0.4);
  text-decoration: none;
  border-bottom: 1px solid rgba(200,169,92,0.18);
  transition: color 0.2s, border-color 0.2s;
}
.sidebar-credit a:hover {
  color: var(--gold);
  border-color: rgba(200,169,92,0.55);
}

/* ════════════════════════════════════════════════════════════
   MAIN CONTENT
   ════════════════════════════════════════════════════════════ */

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  background: rgba(17,17,17,0.95);
  border-bottom: 1px solid var(--border);
  padding: 0 1.75rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: 1rem;
  padding: 0.35rem 0.5rem;
  line-height: 1;
  transition: all var(--transition);
}

.menu-toggle:hover {
  border-color: var(--border-med);
  color: var(--text);
}

/* Page title — Cormorant italic to match site */
.page-title {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 300;
  font-style: italic;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Topbar breadcrumb-style gold accent */
.topbar-eyebrow {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.15rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.refresh-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.85rem;
  transition: all var(--transition);
}

.refresh-btn:hover {
  border-color: var(--border-med);
  color: var(--gold);
}

/* Page content area */
.page-content {
  padding: 1.75rem;
  flex: 1;
}


/* ════════════════════════════════════════════════════════════
   STATS GRID
   ════════════════════════════════════════════════════════════ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.25rem 1.1rem;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

/* Gold top accent line on each card */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.4;
  transition: opacity var(--transition), left var(--transition), right var(--transition);
}

.stat-card:hover {
  border-color: var(--border-med);
  transform: translateY(-1px);
}

.stat-card:hover::before {
  opacity: 0.7;
  left: 10%; right: 10%;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

/* Large Cormorant numbers for elegance */
.stat-value {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.stat-value.green  { color: var(--green); }
.stat-value.red    { color: #e07060; }
.stat-value.amber  { color: var(--amber); }
.stat-value.white  { color: #fff; }

.stat-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}


/* ════════════════════════════════════════════════════════════
   PANELS
   ════════════════════════════════════════════════════════════ */

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-wide { grid-column: 1 / -1; }

.panel-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(to right, rgba(200,169,92,0.03), transparent);
}

.panel-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.panel-action {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}

.panel-action:hover { color: var(--gold); }

.panel-body { padding: 1.1rem 1.4rem; }


/* ════════════════════════════════════════════════════════════
   DATA TABLE
   ════════════════════════════════════════════════════════════ */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th {
  padding: 0.7rem 1.1rem;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.035);
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover td {
  background: rgba(200,169,92,0.04);
}


/* ════════════════════════════════════════════════════════════
   STATUS BADGES
   ════════════════════════════════════════════════════════════ */

.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 2px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-pending   { background: var(--amber-dim); color: var(--amber);   border: 1px solid rgba(212,160,23,0.2); }
.badge-confirmed { background: var(--green-dim); color: var(--green);   border: 1px solid rgba(76,175,130,0.2); }
.badge-cancelled { background: var(--red-dim);   color: #e07060;        border: 1px solid rgba(192,57,43,0.2);  }
.badge-open      { background: var(--red-dim);   color: #e07060;        border: 1px solid rgba(192,57,43,0.2);  }
.badge-resolved  { background: var(--green-dim); color: var(--green);   border: 1px solid rgba(76,175,130,0.2); }
.badge-active    { background: var(--green-dim); color: var(--green);   border: 1px solid rgba(76,175,130,0.2); }
.badge-inactive  { background: rgba(232,224,208,0.05); color: var(--text-muted); border: 1px solid rgba(232,224,208,0.08); }
.badge-new       { background: var(--blue-dim);  color: var(--blue);    border: 1px solid rgba(61,143,181,0.2); }


/* ════════════════════════════════════════════════════════════
   TOOLBAR / FILTERS
   ════════════════════════════════════════════════════════════ */

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 180px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  color: var(--text);
  font-size: 0.82rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-input::placeholder { color: var(--text-muted); }

.search-input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(200,169,92,0.07);
}

.filter-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 1rem;
  color: var(--text);
  font-size: 0.78rem;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(200,169,92,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
}

.filter-select:focus { border-color: var(--gold-dim); }


/* ════════════════════════════════════════════════════════════
   QUICK ACTION CARDS
   ════════════════════════════════════════════════════════════ */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.action-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.action-card:hover {
  border-color: var(--border-med);
  background: rgba(200,169,92,0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.action-card:hover::after { opacity: 0.5; }

.action-icon {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
  line-height: 1;
}

.action-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.3;
}

.action-card:hover .action-label { color: var(--text-soft); }


/* ════════════════════════════════════════════════════════════
   MODALS
   ════════════════════════════════════════════════════════════ */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.visible {
  display: flex;
  animation: backdropIn 0.2s ease;
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(200,169,92,0.1);
  animation: modalIn 0.25s var(--ease-out);
  position: relative;
}

/* Gold sparkle at top of modal */
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.5;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 1.4rem 1.5rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 300;
  font-style: italic;
  color: #fff;
  letter-spacing: 0.02em;
}

.modal-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all var(--transition);
  flex-shrink: 0;
}

.modal-close:hover {
  border-color: var(--border-med);
  color: var(--text);
  background: var(--gold-subtle);
}

.modal-body {
  padding: 1.4rem 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}


/* ════════════════════════════════════════════════════════════
   FORM FIELDS
   ════════════════════════════════════════════════════════════ */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(200,169,92,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-color: var(--surface-2);
  padding-right: 2.2rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(200,169,92,0.07);
}

.form-field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}


/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.btn-gold {
  background: var(--gold);
  color: #090909;
}

.btn-gold:hover {
  background: var(--gold-light);
  box-shadow: 0 4px 16px rgba(200,169,92,0.3);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-med);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--gold-subtle);
}

.btn-danger {
  background: var(--red-dim);
  border: 1px solid rgba(192,57,43,0.3);
  color: #e07060;
}

.btn-danger:hover {
  background: rgba(192,57,43,0.25);
  border-color: rgba(192,57,43,0.5);
}

.btn-sm {
  padding: 0.38rem 0.8rem;
  font-size: 0.62rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ════════════════════════════════════════════════════════════
   LOADING & EMPTY STATES
   ════════════════════════════════════════════════════════════ */

.loading-spin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-med);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}


/* ════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ════════════════════════════════════════════════════════════ */

#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 320px;
}

.toast {
  background: var(--surface-3);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.2rem;
  font-size: 0.8rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s var(--ease-out) forwards;
  line-height: 1.5;
}

.toast.success { border-color: rgba(76,175,130,0.4); }
.toast.error   { border-color: rgba(192,57,43,0.4);  }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}


/* ════════════════════════════════════════════════════════════
   REVENUE BARS
   ════════════════════════════════════════════════════════════ */

.rev-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rev-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 100px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.rev-bar-wrap {
  flex: 1;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.rev-bar {
  height: 100%;
  background: linear-gradient(to right, var(--gold-dim) 0%, var(--gold) 100%);
  border-radius: 2px;
  transition: width 0.7s var(--ease-out);
}

.rev-amount {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text);
  min-width: 64px;
  text-align: right;
}


/* ════════════════════════════════════════════════════════════
   STOCK ITEMS
   ════════════════════════════════════════════════════════════ */

.stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}

.stock-item:last-child { border-bottom: none; }

.stock-name { color: var(--text-soft); }

.stock-qty {
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.stock-qty.critical { background: var(--red-dim);   color: #e07060; border: 1px solid rgba(192,57,43,0.2); }
.stock-qty.low      { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(212,160,23,0.2); }


/* ════════════════════════════════════════════════════════════
   PDF FLYER DROP ZONE
   ════════════════════════════════════════════════════════════ */

.flyer-drop-zone {
  border: 1.5px dashed var(--border-med);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface-2);
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flyer-drop-zone:hover,
.flyer-drop-zone.drag-over {
  border-color: var(--gold-dim);
  background: rgba(200,169,92,0.04);
}

.flyer-drop-zone.has-file {
  border-color: rgba(76,175,130,0.5);
  background: rgba(76,175,130,0.04);
  border-style: solid;
}

.flyer-drop-icon { font-size: 2rem; margin-bottom: 0.75rem; line-height: 1; }
.flyer-drop-label { font-size: 0.82rem; color: var(--text-soft); margin-bottom: 0.35rem; }
.flyer-drop-hint { font-size: 0.68rem; color: var(--text-muted); letter-spacing: 0.04em; }

.flyer-file-name { font-size: 0.85rem; font-weight: 600; color: var(--green); margin-bottom: 0.3rem; word-break: break-all; }
.flyer-file-size { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.ev-flyer-thumb {
  width: 60px;
  height: 70px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}


/* ════════════════════════════════════════════════════════════
   MOBILE SIDEBAR OVERLAY
   ════════════════════════════════════════════════════════════ */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(2px);
  z-index: 99;
}

.sidebar-overlay.visible { display: block; }


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .panel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 40px rgba(0,0,0,0.6); }
  .main { margin-left: 0; }
  .menu-toggle { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 1rem; }
  .page-content { padding: 1rem; }
  .topbar-time { display: none; }
  .table-wrap { margin: 0 -1.4rem; }
  .login-card { padding: 2.5rem 1.75rem 2rem; }
  .login-logo { width: 90px; height: 90px; }
  .login-name { font-size: 2rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(3, 1fr); }
  .modal { border-radius: var(--radius); }
}
