
/* ════════════════════════════════════════════════════════
   DASHBOARD REDESIGN — Premium Light + Dark Hero Theme
   ════════════════════════════════════════════════════════ */

/* Page wrapper */
#dashboard-panel {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Loading screen ──────────────────────────────────── */
.db-loading-screen[hidden] { display: none !important; }
.db-loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  gap: 20px;
  color: #94a3b8;
  font-size: 0.95rem;
}
.db-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(230,74,25,0.15);
  border-top-color: #e64a19;
  border-radius: 50%;
  animation: db-spin 0.8s linear infinite;
}
@keyframes db-spin { to { transform: rotate(360deg); } }

.db-error-banner[hidden] { display: none !important; }
.db-error-banner {
  margin: 32px auto;
  max-width: 640px;
  padding: 16px 24px;
  background: #fff3f0;
  border: 1px solid rgba(211,47,47,0.2);
  border-radius: 16px;
  color: #c62828;
  font-size: 0.92rem;
  text-align: center;
}

/* ── Login prompt ────────────────────────────────────── */
.db-login-prompt[hidden] { display: none !important; }
.db-login-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 40px 24px;
}
.db-login-card {
  text-align: center;
  max-width: 420px;
  width: 100%;
  padding: 56px 40px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.06);
}
.db-login-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(230,74,25,0.08), rgba(230,74,25,0.04));
  color: #e64a19;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: inset 0 0 0 1px rgba(230,74,25,0.18);
}
.db-login-card h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
}
.db-login-card p {
  color: #64748b;
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ── Hero Banner ─────────────────────────────────────── */
.db-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 32px;
  padding: 48px 52px 0;
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
}
.db-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(230,74,25,0.28) 0%, transparent 70%);
  pointer-events: none;
}
.db-hero::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: 25%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(99,102,241,0.18) 0%, transparent 70%);
  pointer-events: none;
}
.db-hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
}
.db-hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(230,74,25,0.9);
  margin-bottom: 12px;
}
.db-hero-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 14px;
}
.db-hero-sub {
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 480px;
  margin: 0;
}
.db-hero-badge {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  border-radius: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  backdrop-filter: blur(10px);
}

/* Summary stat strip — sits at the bottom of hero */
.db-hero .dashboard-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.db-hero .summary-card {
  background: rgba(255,255,255,0.04) !important;
  border: none !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 !important;
  padding: 24px 28px !important;
  box-shadow: none !important;
  transform: none !important;
  gap: 14px;
  transition: background 0.25s ease !important;
}
.db-hero .summary-card:last-child { border-right: none !important; }
.db-hero .summary-card:hover { background: rgba(255,255,255,0.08) !important; transform: none !important; }
.db-hero .summary-card-icon {
  background: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,0.75) !important;
  border-radius: 12px;
  width: 40px;
  height: 40px;
}
.db-hero .stat-label {
  color: rgba(255,255,255,0.4) !important;
  font-size: 0.72rem;
  letter-spacing: 0.8px;
}
.db-hero .stat-main {
  color: #fff !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
}
.db-hero .microcopy { color: rgba(255,255,255,0.3) !important; font-size: 0.78rem; }

/* ── Main Body Layout ────────────────────────────────── */
.db-body {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────── */
.db-body .dashboard-sidebar {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 96px;
  min-height: auto;
  backdrop-filter: none;
}
.sidebar-user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 18px;
  margin-bottom: 12px;
  border: 1px solid #f1f5f9;
}
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(230,74,25,0.12), rgba(230,74,25,0.05));
  color: #e64a19;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sidebar-user-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
}
.sidebar-user-email {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar tabs */
.db-body .sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.db-body .sidebar-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: none;
  background: transparent;
  border-radius: 16px;
  color: #64748b;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: all 0.18s ease;
}
.db-body .sidebar-tab svg {
  color: #94a3b8;
  transition: color 0.18s ease;
  flex-shrink: 0;
}
.db-body .sidebar-tab:hover {
  background: #f1f5f9;
  color: #334155;
}
.db-body .sidebar-tab:hover svg { color: #e64a19; }
.db-body .sidebar-tab.active {
  background: linear-gradient(135deg, #e64a19 0%, #c0392b 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(230,74,25,0.24);
}
.db-body .sidebar-tab.active svg { color: #fff; }

.db-body .sidebar-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 12px;
  margin-top: 8px;
}
.db-body .sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  border-radius: 14px;
  color: #b91c1c;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.db-body .sidebar-logout-btn svg { color: #ef4444; flex-shrink: 0; }
.db-body .sidebar-logout-btn:hover { background: #fee2e2; border-color: #fca5a5; }

/* ── Subsection headings ─────────────────────────────── */
.subsection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.subsection-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.subsection-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}
.pending-badge-pill  { background: #fef3c7; color: #92400e; }
.active-badge-pill   { background: #d1fae5; color: #065f46; }
.download-badge-pill { background: #dbeafe; color: #1e40af; }
.settings-badge-pill { background: #ede9fe; color: #5b21b6; }

.subsection-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}
.subsection-sub {
  font-size: 0.84rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
}
.subsection-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Info note ───────────────────────────────────────── */
.db-info-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 20px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 16px;
  color: #0c4a6e;
  font-size: 0.875rem;
  line-height: 1.65;
  margin-top: 8px;
}
.db-info-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #0284c7;
}

/* ── Dashboard content area ──────────────────────────── */
.db-body .dashboard-content-area {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 520px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1020px) {
  .db-body {
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }
}
@media (max-width: 820px) {
  .db-body { grid-template-columns: 1fr; }
  .db-body .dashboard-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px;
  }
  .sidebar-user-pill { flex: 0 0 100%; margin-bottom: 4px; }
  .db-body .sidebar-nav-group {
    flex-direction: row;
    flex: 1;
    gap: 4px;
  }
  .db-body .sidebar-tab span { display: none; }
  .db-body .sidebar-tab {
    padding: 12px;
    justify-content: center;
    flex: 1;
  }
  .db-body .sidebar-footer {
    flex: 0 0 100%;
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
    margin-top: 0;
    display: flex;
    justify-content: flex-end;
  }
  .db-body .sidebar-logout-btn { width: auto; padding: 10px 16px; font-size: 0.8rem; }
  .db-hero { padding: 36px 28px 0; border-radius: 24px; }
  .db-hero .dashboard-summary { grid-template-columns: repeat(2, 1fr); }
  .db-hero-badge { display: none; }
}
@media (max-width: 560px) {
  #dashboard-panel { padding: 0 12px 56px; }
  .db-hero { padding: 28px 20px 0; border-radius: 20px; }
  .db-hero-title { font-size: 1.65rem; }
  .db-hero .summary-card { padding: 18px 16px !important; }
  .subsection-head { flex-direction: column; align-items: flex-start; }
  .subsection-head-left { flex-wrap: wrap; }
}

/* ── Mobile Nav Toggle ────────────────────────────────── */
#customer-session-login[hidden],
#customer-session-dashboard[hidden],
#customer-session-sign-out[hidden],
.nav-try-btn[hidden] { display: none !important; }

.hamburger-bar { transition: transform 0.2s ease, opacity 0.2s ease; }

@media (max-width: 880px) {
  .mobile-toggle { display: inline-flex; }
  .topnav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 16px 32px rgba(0,0,0,0.08);
    padding: 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .topnav.nav-open {
    max-height: 80vh;
    opacity: 1;
    pointer-events: auto;
    overflow-y: auto;
  }
  .mobile-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .mobile-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
  .mobile-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ── License Card Redesign ─────────────────────────────── */
.lc-card { padding: 0 !important; overflow: hidden; background: #fff; border-radius: 20px; border: 1px solid #e2e8f0; box-shadow: 0 4px 14px rgba(0,0,0,0.03); transition: transform 0.2s ease, box-shadow 0.2s ease; margin-bottom: 24px; }
.lc-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.06); }

.lc-header { padding: 20px 24px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.lc-header-left { display: flex; align-items: center; gap: 12px; }
.lc-product-badge { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; background: #e0f2fe; color: #0284c7; padding: 4px 10px; border-radius: 8px; }
.lc-venue-name { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin: 0; }

.lc-header-badges { display: flex; align-items: center; gap: 10px; }
.lc-status-badge { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; padding: 6px 12px; border-radius: 12px; }
.lc-badge-active { background: #dcfce7; color: #166534; }
.lc-badge-inactive { background: #f1f5f9; color: #475569; }
.lc-status-dot { width: 6px; height: 6px; border-radius: 50%; }
.lc-type-pill { font-size: 0.75rem; font-weight: 600; color: #64748b; background: #fff; border: 1px solid #cbd5e1; padding: 4px 12px; border-radius: 99px; text-transform: capitalize; }

.lc-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 24px; padding: 24px; }
.lc-field { display: flex; flex-direction: column; gap: 6px; }
.lc-field-wide { grid-column: span 3; }
.lc-field-label { font-size: 0.75rem; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.lc-field-value { font-size: 0.95rem; font-weight: 600; color: #1e293b; }

.lc-copyable { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 8px 12px; transition: border-color 0.2s ease; }
.lc-copyable:focus-within, .lc-copyable:hover { border-color: #cbd5e1; }
.lc-key-wrap { background: #fffbeb; border-color: #fde68a; }
.lc-key-value { color: #92400e; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: 0.5px; }
.lc-copy-btn { background: transparent; border: none; color: #94a3b8; cursor: pointer; padding: 4px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.lc-copy-btn:hover { background: #e2e8f0; color: #334155; }

.lc-lock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; font-size: 0.85rem; font-weight: 600; }
.lc-lock-unlocked { background: #f1f5f9; color: #64748b; }
.lc-lock-locked { background: #fee2e2; color: #b91c1c; }

@media (max-width: 640px) {
  .lc-fields { grid-template-columns: 1fr; }
  .lc-field-wide { grid-column: span 1; }
}

/* ── Venue Edit Button + Modal Form ────────────────────── */
.lc-header-left { display: flex; align-items: center; gap: 8px; }
.lc-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.lc-edit-btn:hover { background: #f1f5f9; color: #e64a19; border-color: #cbd5e1; }

#venue-edit-form { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
#venue-edit-form .form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; text-align: left; }
#venue-edit-form label { font-size: 0.8rem; font-weight: 600; color: #64748b; }
.form-error {
  color: #c62828;
  background: #fff3f0;
  border: 1px solid rgba(211,47,47,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin: 0 0 14px;
  text-align: left;
}
.form-error[hidden] { display: none !important; }

.profile-edit-form { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.profile-edit-form[hidden] { display: none !important; }
.profile-edit-form .form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.profile-edit-form label { font-size: 0.8rem; font-weight: 600; color: #64748b; }
.profile-edit-btn { padding: 8px 16px !important; font-size: 0.85rem !important; }
