/* ============================================================
   1report — Global Stylesheet
   Design: Dark Navy + Teal | Hospitality Intelligence Platform
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* ===== TOKENS ===== */
:root {
  --bg-base:      #0A1628;
  --bg-panel:     #0D1F3C;
  --bg-card:      #112240;
  --bg-card-alt:  #0F1E38;
  --bg-input:     #162B4A;
  --border:       rgba(0, 212, 168, 0.12);
  --border-light: rgba(255,255,255,0.06);

  --teal:         #00D4A8;
  --teal-dim:     rgba(0, 212, 168, 0.15);
  --teal-glow:    0 0 24px rgba(0, 212, 168, 0.25);

  --white:        #FFFFFF;
  --text-primary: #E8F0FB;
  --text-secondary: #8BA3C7;
  --text-muted:   #4A6080;

  --gold:         #F0A500;
  --gold-dim:     rgba(240,165,0,0.15);
  --rose:         #F05060;
  --rose-dim:     rgba(240,80,96,0.15);
  --emerald:      #00C98B;
  --emerald-dim:  rgba(0,201,139,0.15);
  --amber:        #F0A020;
  --amber-dim:    rgba(240,160,32,0.15);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius:       10px;
  --radius-lg:    16px;
  --radius-xl:    24px;

  --shadow-card:  0 4px 24px rgba(0,0,0,0.3);
  --shadow-teal:  0 8px 32px rgba(0,212,168,0.15);
  --transition:   0.18s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  /* Subtle background grid */
  background-image:
    linear-gradient(rgba(0,212,168,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,168,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; color: var(--white); }
h1 { font-size: 48px; letter-spacing: -0.02em; }
h2 { font-size: 36px; letter-spacing: -0.01em; }
h3 { font-size: 22px; }
h4 { font-size: 17px; }
p { color: var(--text-secondary); }
a { color: var(--teal); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* ===== LOGO ===== */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, #0D2A4A 0%, #1A3A5C 100%);
  border: 1.5px solid var(--teal);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--teal-glow);
  flex-shrink: 0;
}
.logo-icon svg { width: 22px; height: 22px; }
.logo-wordmark { font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.logo-wordmark .one { color: var(--teal); }
.logo-wordmark .report { color: var(--white); }
.logo-sub { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); display: block; margin-top: -2px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all var(--transition);
  white-space: nowrap;
}
.btn-teal { background: var(--teal); color: #0A1628; }
.btn-teal:hover { background: #00EBC0; box-shadow: var(--teal-glow); }
.btn-outline { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-outline:hover { background: var(--teal-dim); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1.5px solid var(--border-light); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-danger { background: var(--rose); color: white; }
.btn-danger:hover { background: #E03040; }
.btn-success { background: var(--emerald); color: #0A1628; }
.btn-success:hover { background: #00E09B; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 15px 32px; font-size: 16px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.card-sm { padding: 16px; }
.card-lg { padding: 32px; }
.card:hover { border-color: rgba(0,212,168,0.2); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary); margin-bottom: 7px;
}
input, select, textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius);
  font-family: var(--font-body); font-size: 14px;
  color: var(--text-primary); outline: none;
  transition: border-color var(--transition);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,212,168,0.1); }
select option { background: var(--bg-card); }
input[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ===== BADGES & STATUS ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em;
}
.badge::before { content:''; width:5px; height:5px; border-radius:50%; }
.badge-teal { background: var(--teal-dim); color: var(--teal); }
.badge-teal::before { background: var(--teal); }
.badge-green { background: var(--emerald-dim); color: var(--emerald); }
.badge-green::before { background: var(--emerald); }
.badge-red { background: var(--rose-dim); color: var(--rose); }
.badge-red::before { background: var(--rose); }
.badge-gold { background: var(--gold-dim); color: var(--gold); }
.badge-gold::before { background: var(--gold); }
.badge-amber { background: var(--amber-dim); color: var(--amber); }
.badge-amber::before { background: var(--amber); }
.badge-muted { background: rgba(139,163,199,0.12); color: var(--text-secondary); }
.badge-muted::before { background: var(--text-muted); }

/* ===== TABLES ===== */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.table-header h4 { font-size: 15px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
thead { background: rgba(0,0,0,0.2); }
th {
  padding: 11px 16px; font-size: 11px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.06em; text-align: left;
}
td { padding: 13px 16px; font-size: 13px; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,212,168,0.03); }
.td-name { font-weight: 600; color: var(--text-primary); }
.td-num { font-family: var(--font-display); font-weight: 700; color: var(--white); }
.td-pos { color: var(--emerald); font-weight: 600; }
.td-neg { color: var(--rose); font-weight: 600; }

/* ===== KPI CARDS ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.kpi-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  transition: border-color var(--transition);
}
.kpi-card:hover { border-color: rgba(0,212,168,0.3); }
.kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px; }
.kpi-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--white); }
.kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.kpi-trend { font-size: 12px; margin-top: 6px; font-weight: 600; }
.trend-up { color: var(--emerald); }
.trend-down { color: var(--rose); }

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px; background: var(--bg-panel);
  border-right: 1px solid var(--border-light);
  position: fixed; top: 0; left: 0;
  height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  z-index: 50;
}
.sidebar-logo-wrap { padding: 24px 20px; border-bottom: 1px solid var(--border-light); }
.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 12px 20px 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; color: var(--text-secondary);
  font-size: 13px; font-weight: 500; cursor: pointer;
  border-left: 3px solid transparent;
  transition: all var(--transition); text-decoration: none;
}
.sidebar-link:hover { color: var(--text-primary); background: rgba(0,212,168,0.05); }
.sidebar-link.active { color: var(--teal); background: rgba(0,212,168,0.08); border-left-color: var(--teal); }
.sidebar-link .nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar-section-label { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); padding: 16px 20px 6px; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid var(--border-light); }
.user-pill { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, #0099CC 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: var(--bg-base); flex-shrink: 0;
}
.avatar-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.avatar-role { font-size: 11px; color: var(--text-muted); }

/* ===== MAIN LAYOUT ===== */
.with-sidebar { margin-left: 240px; }
.main-content { padding: 32px; min-height: 100vh; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 26px; }
.page-header p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 12px; align-items: center; }
.flex-gap-sm { display: flex; gap: 8px; align-items: center; }

/* ===== TOP NAV (landing) ===== */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,22,40,0.9);
  backdrop-filter: blur(12px);
}
.topnav-links { display: flex; gap: 32px; }
.topnav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.topnav-links a:hover { color: var(--teal); }
.topnav-actions { display: flex; gap: 12px; }

/* ===== TABS ===== */
.tab-nav {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px; overflow-x: auto;
}
.tab-btn {
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  color: var(--text-muted); border: none; background: none;
  cursor: pointer; border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all var(--transition);
  font-family: var(--font-body);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ===== WIDGET ===== */
.widget {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
}
.widget-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.widget-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--white); }
.metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border-light);
}
.metric-row:last-child { border-bottom: none; }
.metric-label { font-size: 13px; color: var(--text-secondary); }
.metric-value { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--white); text-align: right; }
.metric-sub { font-size: 11px; color: var(--text-muted); text-align: right; }
.widget-total {
  background: rgba(0,212,168,0.06); border: 1px solid rgba(0,212,168,0.15);
  border-radius: 8px; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px;
}
.widget-total-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.widget-total-value { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--teal); }

/* ===== TOGGLES ===== */
.toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: 24px; transition: 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 16px; height: 16px; left: 3px; top: 3px;
  background: var(--text-muted); border-radius: 50%; transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--teal-dim); border-color: var(--teal); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); background: var(--teal); }

/* ===== MODALS ===== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  z-index: 200; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px;
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 19px; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 20px; cursor: pointer; padding: 4px; }
.modal-close:hover { color: var(--white); }
.modal-footer { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ===== BANNERS ===== */
.banner { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; display: flex; gap: 10px; align-items: flex-start; }
.banner p { font-size: 13px; line-height: 1.5; }
.banner-teal { background: var(--teal-dim); border: 1px solid rgba(0,212,168,0.25); }
.banner-teal p { color: var(--teal); }
.banner-gold { background: var(--gold-dim); border: 1px solid rgba(240,165,0,0.25); }
.banner-gold p { color: var(--gold); }
.banner-red { background: var(--rose-dim); border: 1px solid rgba(240,80,96,0.25); }
.banner-red p { color: var(--rose); }
.banner-emerald { background: var(--emerald-dim); border: 1px solid rgba(0,201,139,0.25); }
.banner-emerald p { color: var(--emerald); }

/* ===== ARCH NOTE ===== */
.arch-note {
  background: linear-gradient(135deg, #060E1C 0%, #0A1A30 100%);
  border: 1px solid rgba(0,212,168,0.2); border-radius: var(--radius-lg); padding: 24px;
}
.arch-note h4 { color: var(--teal); font-size: 14px; margin-bottom: 10px; }
.arch-note p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.arch-tag {
  display: inline-block; background: rgba(0,212,168,0.1); color: var(--teal);
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 4px; margin: 3px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--bg-card); border: 1px solid var(--teal);
  color: var(--text-primary); padding: 14px 20px;
  border-radius: var(--radius); font-size: 13px; font-weight: 500;
  box-shadow: var(--teal-glow); z-index: 999;
  display: none; align-items: center; gap: 10px;
}
.toast.show { display: flex; }

/* ===== MISC UTILITIES ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.widgets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-teal { color: var(--teal); }
.text-muted { color: var(--text-muted); font-size: 13px; }
.text-sm { font-size: 12px; }
.text-center { text-align: center; }
.divider { border: none; border-top: 1px solid var(--border-light); margin: 20px 0; }
.settings-section {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px;
}
.settings-section h3 {
  font-size: 15px; font-weight: 700; color: var(--white);
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.perm-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-input); border-radius: var(--radius); padding: 12px 14px;
  border: 1px solid var(--border-light);
}
.perm-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }

/* ===== BAR CHART ===== */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar { background: var(--teal-dim); border: 1px solid rgba(0,212,168,0.2); border-radius: 4px 4px 0 0; width: 100%; transition: background var(--transition); }
.bar:hover, .bar.highlight { background: var(--teal); }
.bar-label { font-size: 10px; color: var(--text-muted); }

/* ===== CURRENCY SWITCHER ===== */
.currency-switcher { display: flex; gap: 8px; justify-content: center; margin-bottom: 40px; }
.currency-btn {
  padding: 8px 20px; border-radius: 20px;
  border: 1.5px solid var(--border-light);
  background: transparent; font-size: 13px; font-weight: 600;
  cursor: pointer; color: var(--text-secondary); transition: all var(--transition);
  font-family: var(--font-body);
}
.currency-btn.active { background: var(--teal); color: var(--bg-base); border-color: var(--teal); }
.currency-btn:hover:not(.active) { border-color: var(--teal); color: var(--teal); }

/* ===== PRICING CARDS ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.pricing-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px; position: relative;
  transition: all var(--transition);
}
.pricing-card:hover { border-color: rgba(0,212,168,0.3); transform: translateY(-2px); }
.pricing-card.featured { border-color: var(--teal); box-shadow: var(--teal-glow); }
.featured-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: var(--bg-base);
  font-size: 11px; font-weight: 800; padding: 4px 16px;
  border-radius: 20px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.plan-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.plan-price { font-family: var(--font-display); font-size: 38px; font-weight: 800; color: var(--white); margin: 16px 0 4px; }
.plan-price span { font-size: 16px; font-weight: 500; color: var(--text-muted); }
.plan-period { font-size: 12px; color: var(--text-muted); margin-bottom: 24px; }
.plan-features { list-style: none; margin-bottom: 28px; }
.plan-features li { padding: 8px 0; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border-light); }
.plan-features li:last-child { border-bottom: none; }
.check { color: var(--teal); font-size: 14px; }

/* ===== TAX ROW ===== */
.tax-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.tax-row:last-child { border-bottom: none; }
.tax-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.tax-rate-input { width: 80px; }
.tax-locked { color: var(--text-muted); font-size: 11px; }

/* ===== ACTIVITY FEED ===== */
.feed-item { display: flex; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border-light); align-items: flex-start; }
.feed-item:last-child { border-bottom: none; }
.feed-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.feed-text { font-size: 13px; color: var(--text-secondary); }
.feed-text strong { color: var(--text-primary); }
.feed-time { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ===== SPINNER ===== */
.spinner { width: 40px; height: 40px; border: 3px solid var(--border-light); border-top-color: var(--teal); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== PLAN SELECTOR ===== */
.plan-selector { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.plan-option {
  border: 1.5px solid var(--border-light); border-radius: var(--radius);
  padding: 14px 10px; text-align: center; cursor: pointer; transition: all var(--transition);
  background: var(--bg-input);
}
.plan-option:hover, .plan-option.selected { border-color: var(--teal); background: var(--teal-dim); }
.plan-option .po-name { font-weight: 700; font-size: 14px; font-family: var(--font-display); color: var(--white); }
.plan-option .po-price { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== PAYMENT ===== */
.payment-tabs { display: flex; border: 1px solid var(--border-light); border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.payment-tab { flex: 1; padding: 12px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: all var(--transition); background: transparent; border: none; font-family: var(--font-body); }
.payment-tab.active { background: var(--teal); color: var(--bg-base); }
.payment-summary { background: var(--bg-input); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; border: 1px solid var(--border-light); }
.payment-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--text-secondary); }
.payment-row.total { font-weight: 700; color: var(--white); border-top: 1px solid var(--border-light); padding-top: 10px; margin-top: 6px; font-size: 15px; }

/* ===== RIGHTS GRID ===== */
.rights-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.right-chip {
  border: 1.5px solid var(--border-light); border-radius: var(--radius);
  padding: 10px 12px; cursor: pointer; transition: all var(--transition);
  background: var(--bg-input);
}
.right-chip.selected { border-color: var(--teal); background: var(--teal-dim); }
.right-chip p { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.right-chip span { font-size: 11px; color: var(--text-muted); }

/* ===== SUPER ADMIN BADGE ===== */
.super-badge {
  display: inline-block; font-size: 10px; font-weight: 800;
  background: var(--gold); color: var(--bg-base);
  padding: 2px 8px; border-radius: 4px; margin-top: 6px;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* ===== SEARCH INPUT ===== */
.search-wrap { position: relative; }
.search-wrap input { padding-left: 36px; }
.search-wrap::before { content: '🔍'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; z-index: 1; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal-dim); }

/* ============================================================
   1report — UPDATE 2: Top Bar, Clock, AI Widget, New Reports
   ============================================================ */

/* ===== TOP BAR ===== */
.topbar {
  position: fixed; top: 0; left: 240px; right: 0;
  height: 60px; background: var(--bg-panel);
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center;
  padding: 0 28px; z-index: 40;
  backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.topbar-page-title { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--white); }
.topbar-breadcrumb { font-size: 12px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 20px; }

/* Clock */
.topbar-clock {
  display: flex; flex-direction: column; align-items: flex-end;
  border-right: 1px solid var(--border-light); padding-right: 20px;
}
.clock-time { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--teal); letter-spacing: 0.04em; line-height: 1; }
.clock-date { font-size: 10px; color: var(--text-muted); margin-top: 2px; letter-spacing: 0.04em; }

/* User info */
.topbar-user { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.topbar-user:hover .avatar { box-shadow: 0 0 0 2px var(--teal); }
.user-details { text-align: right; }
.user-details .u-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.user-details .u-role { font-size: 11px; color: var(--text-muted); }
.topbar-notif { position: relative; cursor: pointer; }
.notif-btn { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); transition: color var(--transition); }
.notif-btn:hover { color: var(--teal); }
.notif-dot { position: absolute; top: 0; right: 0; width: 8px; height: 8px; background: var(--rose); border-radius: 50%; border: 2px solid var(--bg-panel); }

/* Adjust main content for topbar */
.with-sidebar .main-content { padding-top: 88px; }

/* ===== AI CHAT WIDGET ===== */
.ai-widget {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 300; display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.ai-bubble {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--teal) 0%, #0099CC 100%);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 4px 20px rgba(0,212,168,0.4);
  transition: all var(--transition); font-size: 24px;
  border: 2px solid rgba(255,255,255,0.15);
}
.ai-bubble:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(0,212,168,0.6); }
.ai-bubble.open { background: linear-gradient(135deg, #0099CC 0%, #006699 100%); }
.ai-window {
  width: 360px; height: 520px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  display: none; flex-direction: column;
}
.ai-window.open { display: flex; }
.ai-header {
  padding: 16px 18px; background: linear-gradient(135deg, #0A2040 0%, #0D1F3C 100%);
  border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; gap: 12px;
}
.ai-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0099CC);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.ai-header-info { flex: 1; }
.ai-header-info .ai-name { font-size: 14px; font-weight: 700; color: var(--white); }
.ai-header-info .ai-status { font-size: 11px; color: var(--teal); display: flex; align-items: center; gap: 4px; }
.ai-status-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.ai-close { background: none; border: none; color: var(--text-muted); font-size: 18px; cursor: pointer; }
.ai-close:hover { color: var(--white); }
.ai-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ai-msg { max-width: 85%; }
.ai-msg.bot { align-self: flex-start; }
.ai-msg.user { align-self: flex-end; }
.ai-msg-bubble {
  padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5;
}
.ai-msg.bot .ai-msg-bubble { background: var(--bg-input); color: var(--text-primary); border-bottom-left-radius: 4px; }
.ai-msg.user .ai-msg-bubble { background: var(--teal); color: var(--bg-base); font-weight: 500; border-bottom-right-radius: 4px; }
.ai-msg-time { font-size: 10px; color: var(--text-muted); margin-top: 4px; padding: 0 4px; }
.ai-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.ai-typing span { width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; animation: bounce 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0);} 30%{transform:translateY(-6px);} }
.ai-whatsapp-btn {
  display: flex; align-items: center; gap: 8px;
  background: #25D366; color: white;
  border: none; border-radius: var(--radius); padding: 10px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  margin-top: 8px; width: 100%; justify-content: center;
  transition: background var(--transition); font-family: var(--font-body);
}
.ai-whatsapp-btn:hover { background: #1DAD56; }
.ai-footer { padding: 12px; border-top: 1px solid var(--border-light); }
.ai-input-row { display: flex; gap: 8px; }
.ai-input {
  flex: 1; background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 10px 14px;
  color: var(--text-primary); font-size: 13px; font-family: var(--font-body);
  outline: none;
}
.ai-input:focus { border-color: var(--teal); }
.ai-input::placeholder { color: var(--text-muted); }
.ai-send {
  width: 38px; height: 38px; background: var(--teal); border: none;
  border-radius: var(--radius); cursor: pointer; display: flex;
  align-items: center; justify-content: center; font-size: 16px;
  transition: all var(--transition); flex-shrink: 0;
}
.ai-send:hover { background: #00EBC0; }
.ai-quick-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-chip {
  background: var(--bg-input); border: 1px solid var(--border-light);
  border-radius: 12px; padding: 4px 10px; font-size: 11px;
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
  font-family: var(--font-body);
}
.ai-chip:hover { border-color: var(--teal); color: var(--teal); }

/* ===== NEW REPORT PAGES ===== */
.occ-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.progress-bar-wrap { margin-top: 8px; }
.progress-bar { height: 6px; background: var(--border-light); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 3px; }

/* ===== CPANEL TOPBAR BUTTON ===== */
.cpanel-topbar-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid rgba(0,212,168,0.25);
  color: var(--teal); font-size: 11px; font-weight: 700;
  text-decoration: none; letter-spacing: 0.03em;
  transition: all var(--transition); white-space: nowrap;
  background: rgba(0,212,168,0.06);
}
.cpanel-topbar-btn:hover {
  background: var(--teal); color: var(--bg-base);
  border-color: var(--teal); opacity: 1;
}

/* ===== SIDEBAR CPANEL LINK ===== */
.sidebar-cpanel-link {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 14px 0;
  padding: 10px 14px;
  background: rgba(240,165,0,0.1);
  border: 1px solid rgba(240,165,0,0.25);
  border-radius: var(--radius);
  color: var(--gold); font-size: 12px; font-weight: 700;
  text-decoration: none; transition: all var(--transition);
  letter-spacing: 0.02em;
}
.sidebar-cpanel-link:hover {
  background: var(--gold); color: var(--bg-base); opacity: 1;
}

/* ===== TOPBAR CURRENCY + FLAG ===== */
.topbar-currency {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  background: rgba(0,212,168,0.06);
  border: 1px solid rgba(0,212,168,0.15);
  border-radius: 10px;
  cursor: default;
  transition: all var(--transition);
}
.topbar-currency:hover {
  background: rgba(0,212,168,0.1);
  border-color: rgba(0,212,168,0.3);
}
.currency-flag {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.currency-details {
  display: flex; flex-direction: column; align-items: flex-start;
}
.currency-code {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 800;
  color: var(--teal); line-height: 1.1;
  letter-spacing: 0.04em;
}
.currency-symbol {
  font-size: 10px; font-weight: 600;
  color: var(--text-muted); letter-spacing: 0.04em;
}

/* Tighten clock spacing now we have more topbar items */
.topbar-clock {
  border-right: 1px solid var(--border-light);
  padding-right: 16px;
  margin-right: 4px;
}

/* ===== USER DROPDOWN (topbar) ===== */
.topbar-user {
  cursor: pointer;
  position: relative;
  border-radius: 10px;
  padding: 4px 6px;
  transition: background var(--transition);
}
.topbar-user:hover { background: rgba(255,255,255,0.04); }

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 200;
}
.user-dropdown.open { display: block; }

.user-dropdown-name {
  font-size: 13px; font-weight: 700;
  color: var(--text-primary);
}
.user-dropdown-role {
  font-size: 11px; color: var(--text-muted); margin-top: 2px;
}
.user-dropdown-signout {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
.user-dropdown-signout:hover { color: var(--rose); opacity: 1; }
.user-dropdown-link {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  transition: color var(--transition);
  letter-spacing: 0.02em;
}
.user-dropdown-link:hover { color: var(--teal); }

/* ===== COLLAPSIBLE SIDEBAR GROUPS ===== */
.nav-group { }

.nav-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px 5px;
  cursor: pointer;
  user-select: none;
  transition: opacity var(--transition);
}
.nav-group-header:hover { opacity: 0.85; }

.nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
}

.nav-group-toggle {
  font-size: 9px; color: var(--text-muted);
  transition: transform 0.2s;
  line-height: 1;
}
.nav-group-toggle.collapsed { transform: rotate(-90deg); }

.nav-group-items {
  overflow: hidden;
  max-height: 600px;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 1;
}
.nav-group-items.collapsed {
  max-height: 0;
  opacity: 0;
}

/* Keep old nav-section-label working for non-grouped items */
.nav-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 12px 20px 6px;
}
