/* ═══════════════════════════════════════════
   M RESORT — Dashboard Styles
   Brand: Gold #F5C42E · Navy #1C2D4E · White
═══════════════════════════════════════════ */

:root {
  --gold:        #F5C42E;
  --gold-dark:   #D4A017;
  --gold-light:  #FEF3C7;
  --gold-faint:  #FFFBEB;
  --navy:        #1C2D4E;
  --navy-mid:    #24406E;
  --navy-light:  #2D5FA8;
  --navy-faint:  #EEF2FA;
  --white:       #FFFFFF;
  --bg:          #F3F4F8;
  --surface:     #FFFFFF;
  --border:      #E5E7EB;
  --text:        #111827;
  --text-mid:    #374151;
  --text-muted:  #6B7280;
  --green:       #10B981;
  --green-faint: #ECFDF5;
  --red:         #EF4444;
  --red-faint:   #FEF2F2;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg:   0 4px 24px rgba(0,0,0,.12);
  --sidebar-w:   240px;
  --topbar-h:    64px;
  --font:        'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: var(--font); font-size: .9rem; }
svg { fill: currentColor; flex-shrink: 0; }

/* ── PAGE SHELL ── */
.page { position: fixed; inset: 0; }
.page.hidden { display: none; }
#page-app { display: flex; }

/* ══════════════════════════════
   LOGO BADGE
══════════════════════════════ */
.logo-badge {
  position: relative;
  width: 56px; height: 56px;
  flex-shrink: 0;
}
.logo-badge.sm { width: 38px; height: 38px; }

.logo-outer-ring {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--gold) 0deg 220deg, #7CB9D4 220deg 360deg);
  padding: 3px;
  display: flex; align-items: center; justify-content: center;
}
.logo-badge.sm .logo-outer-ring { padding: 2px; }

.logo-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
}

.logo-letter {
  font-size: 1.5rem;
  font-weight: 800;
  font-style: italic;
  color: var(--white);
  line-height: 1;
  letter-spacing: -1px;
}
.logo-badge.sm .logo-letter { font-size: 1rem; }

.logo-text-block { margin-top: 6px; text-align: center; }
.logo-brand { font-size: .7rem; font-weight: 800; letter-spacing: 2px; color: var(--navy); }

/* ══════════════════════════════
   LOGIN PAGE — Split Screen
══════════════════════════════ */
.login-bg {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
}

/* LEFT: white form panel */
.login-card {
  width: 420px;
  min-width: 360px;
  height: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  overflow-y: auto;
}

/* decorative dots bottom */
.login-card::after {
  content: '● ● ●';
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .55rem;
  letter-spacing: 6px;
  color: var(--navy);
  opacity: .25;
}

.login-logo-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: 28px;
}

.login-title {
  font-size: 1.35rem; font-weight: 800; color: var(--navy);
  text-align: center; margin-bottom: 4px;
}
.login-sub {
  font-size: .82rem; color: var(--text-muted);
  text-align: center; margin-bottom: 24px;
}

.login-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }

/* input icon styling */
.login-form .field-group { position: relative; }
.login-form .field-group label { display: none; }
.login-form .field-group input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid #D1D5DB;
  border-radius: 99px;
  font-size: .88rem;
  color: var(--text);
  outline: none;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.login-form .field-group input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(28,45,78,.1);
}
.login-form .field-group::before {
  content: '';
  position: absolute;
  left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  opacity: .4;
  pointer-events: none;
}
.field-group.f-username::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231C2D4E'%3E%3Cpath d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z'/%3E%3C/svg%3E");
}
.field-group.f-password::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231C2D4E'%3E%3Cpath d='M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z'/%3E%3C/svg%3E");
}

.btn-primary.w-full {
  border-radius: 99px;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 12px;
  background: var(--navy);
  color: var(--white);
  transition: background .15s, transform .1s;
}
.btn-primary.w-full:hover { background: var(--navy-mid); transform: translateY(-1px); }

/* no ::after — hero panel is a real div (.login-hero) */

/* Welcome text on right panel */
.login-hero {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 56px 60px;
  position: relative;
  overflow: hidden;
  order: -1; /* show BEFORE the form card = LEFT side */
  background:
    radial-gradient(ellipse at 25% 75%, rgba(245,196,46,.45) 0%, transparent 45%),
    radial-gradient(ellipse at 75% 25%, rgba(45,95,168,.65) 0%, transparent 50%),
    radial-gradient(ellipse at 55% 55%, rgba(28,45,78,.85) 0%, transparent 55%),
    linear-gradient(135deg, #1C2D4E 0%, #1a3560 45%, #0d1a30 100%);
}

/* fluid blob shapes */
.login-hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  background: radial-gradient(circle, rgba(245,196,46,.3) 0%, rgba(45,95,168,.2) 50%, transparent 70%);
  top: -100px; left: -100px;
  animation: blob1 12s ease-in-out infinite alternate;
}
.login-hero::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  background: radial-gradient(circle, rgba(45,95,168,.25) 0%, rgba(245,196,46,.15) 60%, transparent 80%);
  bottom: -80px; right: -80px;
  animation: blob1 10s ease-in-out infinite alternate-reverse;
}

@keyframes blob1 {
  0%   { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: translate(0,0) scale(1); }
  50%  { border-radius: 70% 30% 50% 50% / 30% 60% 40% 70%; transform: translate(20px,-20px) scale(1.05); }
  100% { border-radius: 50% 50% 30% 70% / 60% 40% 60% 40%; transform: translate(-10px,15px) scale(.97); }
}

.hero-tag {
  font-size: .65rem; font-weight: 700; letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
  position: relative; z-index: 1;
}
.hero-title {
  font-size: 3.5rem; font-weight: 900;
  color: var(--white);
  line-height: 1.05;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.hero-title span { color: var(--gold); }
.hero-desc {
  font-size: .9rem; color: rgba(255,255,255,.55);
  max-width: 340px; line-height: 1.7;
  position: relative; z-index: 1;
}

@media (max-width: 820px) {
  .login-hero { display: none; }
  .login-card { width: 100%; min-width: 0; padding: 40px 28px; }
}

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  transition: transform .25s ease;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand { display: flex; flex-direction: column; }
.sb-title { font-size: .8rem; font-weight: 800; letter-spacing: 2px; color: var(--gold); }
.sb-sub   { font-size: .65rem; color: rgba(255,255,255,.45); letter-spacing: .5px; }

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: .6rem; font-weight: 700; letter-spacing: 1.5px;
  color: rgba(255,255,255,.3);
  padding: 12px 8px 4px;
  display: block;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .83rem; font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: all .15s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.08); color: var(--white); }
.nav-item.active {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
}
.nav-item.active svg { color: var(--navy); }

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 8px;
}

.user-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.06);
}
.user-pill-info { display: flex; flex-direction: column; min-width: 0; }
.user-pill-name { font-size: .8rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pill-role { font-size: .65rem; color: rgba(255,255,255,.4); }

.user-avatar-sm {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-size: .8rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.btn-logout {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 500;
  color: rgba(255,255,255,.5);
  transition: all .15s;
  width: 100%;
}
.btn-logout svg { width: 16px; height: 16px; }
.btn-logout:hover { background: rgba(239,68,68,.15); color: #f87171; }

/* ══════════════════════════════
   MAIN AREA
══════════════════════════════ */
.main-area {
  flex: 1;
  min-width: 0;
  display: flex; flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* TOPBAR */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
  box-shadow: 0 1px 0 var(--border);
}

.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.menu-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  display: none;
}
.menu-toggle svg { width: 20px; height: 20px; }
.menu-toggle:hover { background: var(--bg); }

.topbar-title { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.topbar-sub   { font-size: .75rem; color: var(--text-muted); }

/* Period Navigator */
.period-nav {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.period-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-mid);
  transition: all .15s;
}
.period-btn:hover { background: var(--white); color: var(--navy); }
.period-select {
  background: transparent;
  border: none;
  font-size: .82rem; font-weight: 600;
  color: var(--navy);
  padding: 2px 4px;
  cursor: pointer;
  outline: none;
  min-width: 120px;
}

.topbar-user {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--text-mid);
}

/* ══════════════════════════════
   VIEW CONTAINER
══════════════════════════════ */
.view {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex; flex-direction: column; gap: 20px;
}
.view.hidden { display: none; }

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card-title {
  font-size: .9rem; font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}

.card-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}
.card-header-row .card-title { margin: 0; padding: 0; border: none; }

/* ══════════════════════════════
   KPI CARDS
══════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--border);
  transition: transform .15s;
}
.kpi-card:hover { transform: translateY(-2px); }

.kpi-card.accent-gold  { border-left-color: var(--gold); }
.kpi-card.accent-navy  { border-left-color: var(--navy); }
.kpi-card.accent-green { border-left-color: var(--green); }
.kpi-card.accent-red   { border-left-color: var(--red); }

.kpi-icon-wrap {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
  color: var(--text-muted);
}
.kpi-icon-wrap svg { width: 22px; height: 22px; }
.kpi-icon-wrap.gold  { background: var(--gold-light);  color: var(--gold-dark); }
.kpi-icon-wrap.navy  { background: var(--navy-faint);  color: var(--navy); }
.kpi-icon-wrap.green { background: var(--green-faint); color: var(--green); }
.kpi-icon-wrap.red   { background: var(--red-faint);   color: var(--red); }

.kpi-body { min-width: 0; }
.kpi-val  { font-size: 1.35rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.kpi-lbl  { font-size: .73rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.kpi-hint { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* ══════════════════════════════
   SHARE CARD
══════════════════════════════ */
.share-card { width: 100%; }
.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.share-item {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.s-owner    { background: var(--navy); }
.s-investor { background: var(--navy-mid); }
.s-adj-inc  { background: var(--gold-light); }
.s-adj-exp  { background: var(--red-faint); }

.share-lbl { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.share-val { font-size: 1.1rem; font-weight: 800; }

.s-owner .share-lbl, .s-owner .share-val     { color: rgba(255,255,255,.7); color: var(--white); }
.s-investor .share-lbl, .s-investor .share-val { color: var(--white); }
.s-investor .share-lbl { color: rgba(255,255,255,.7); }
.s-adj-inc .share-lbl  { color: var(--gold-dark); }
.s-adj-inc .share-val  { color: var(--navy); }
.s-adj-exp .share-lbl  { color: var(--red); }
.s-adj-exp .share-val  { color: var(--navy); }

/* ══════════════════════════════
   CHART LAYOUT
══════════════════════════════ */
.section-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.section-row.two { grid-template-columns: 1fr 1fr; }

.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.charts-row.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.chart-card { display: flex; flex-direction: column; }
.chart-card.wide { }
.chart-card.full { grid-column: 1 / -1; }

.chart-wrap { position: relative; }
.chart-wrap canvas { max-width: 100%; }
.chart-wrap.donut { height: 200px; display: flex; align-items: center; justify-content: center; }
.chart-wrap.donut canvas { max-height: 200px; }
.chart-wrap.tall { height: 300px; }

.legend {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 12px;
  font-size: .75rem;
}
.legend-item {
  display: flex; align-items: center; gap: 7px;
  color: var(--text-mid);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.legend-name { flex: 1; }
.legend-pct  { font-weight: 700; color: var(--text); }

/* ══════════════════════════════
   MONTHLY SUMMARY TABLE
══════════════════════════════ */
.monthly-table-wrap {
  overflow-x: auto;
  font-size: .78rem;
}
.monthly-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.monthly-table-wrap th {
  text-align: left;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}
.monthly-table-wrap td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
}
.monthly-table-wrap tr:last-child td { border-bottom: none; }
.monthly-table-wrap tr.active-row td { background: var(--gold-faint); font-weight: 600; }
.monthly-table-wrap .r { text-align: right; }
.monthly-table-wrap .neg { color: var(--red); }
.monthly-table-wrap .pos { color: var(--green); }

/* ══════════════════════════════
   DATA TABLES
══════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.data-table th {
  text-align: left;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
}
.data-table tbody tr:hover { background: var(--gold-faint); }
.data-table tfoot td { border-top: 2px solid var(--border); border-bottom: none; background: var(--bg); }
.data-table .r  { text-align: right; }
.data-table .c  { text-align: center; }
.total-row td   { font-weight: 700; color: var(--navy); }

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: .68rem;
  font-weight: 600;
}
.badge-admin  { background: var(--navy-faint); color: var(--navy); }
.badge-viewer { background: var(--gold-light); color: var(--gold-dark); }

/* ══════════════════════════════
   FORMS
══════════════════════════════ */
.form-card { padding: 24px; }

.form-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.form-section:last-of-type { border-bottom: none; }

.fs-title {
  font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--navy);
  margin-bottom: 14px;
  padding-left: 8px;
  border-left: 3px solid var(--gold);
}

.form-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
}
.form-cols.four { grid-template-columns: repeat(4, 1fr); }

.field-group {
  display: flex; flex-direction: column; gap: 5px;
}
.field-group label {
  font-size: .75rem; font-weight: 600;
  color: var(--text-mid);
}
.field-group input,
.field-group select {
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s;
  outline: none;
  width: 100%;
}
.field-group input:focus,
.field-group select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,196,46,.15);
}
.field-group small {
  font-size: .68rem; color: var(--text-muted);
}

.req { color: var(--red); }

.form-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn-primary {
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: .84rem;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  transition: all .15s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-1px); }
.btn-primary.w-full { width: 100%; padding: 11px; font-size: .9rem; }

.btn-secondary {
  background: var(--navy-faint);
  color: var(--navy);
  font-weight: 600;
  font-size: .84rem;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.btn-secondary:hover { background: #dce6f7; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .84rem;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  transition: all .15s;
}
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }

.btn-danger {
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: .84rem;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  transition: all .15s;
}
.btn-danger:hover { background: #dc2626; }

.btn-icon {
  width: 30px; height: 30px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .8rem;
  transition: all .15s;
  cursor: pointer;
}
.btn-icon.edit   { background: var(--gold-light);  color: var(--gold-dark); }
.btn-icon.delete { background: var(--red-faint);   color: var(--red); }
.btn-icon.view   { background: var(--navy-faint);  color: var(--navy); }
.btn-icon:hover  { opacity: .8; }

/* ══════════════════════════════
   ALERTS
══════════════════════════════ */
.alert-error {
  background: var(--red-faint);
  border: 1px solid #fca5a5;
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: .8rem;
}

/* ══════════════════════════════
   MODALS
══════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: 16px;
  max-height: 90vh; overflow-y: auto;
}
.modal-box.sm { max-width: 360px; }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gold-light);
}
.modal-head h3 { font-size: 1rem; font-weight: 700; color: var(--navy); }
.modal-x {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all .15s;
}
.modal-x:hover { background: var(--bg); color: var(--text); }

.confirm-text {
  font-size: .88rem; color: var(--text-mid);
  line-height: 1.6;
}

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: .84rem; font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: all .25s;
  border-left: 4px solid var(--gold);
}
.toast.hidden { opacity: 0; pointer-events: none; transform: translateY(8px); }
.toast.success { border-left-color: var(--green); }
.toast.error   { border-left-color: var(--red); }

/* ══════════════════════════════
   UTILITIES
══════════════════════════════ */
.hidden { display: none !important; }

/* ══════════════════════════════
   VIEW ACTION BAR
══════════════════════════════ */
.view-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  background: var(--navy);
  color: var(--white);
  font-size: .83rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: all .15s;
  cursor: pointer;
  border: none;
}
.btn-pdf svg { width: 17px; height: 17px; fill: var(--gold); }
.btn-pdf:hover { background: var(--navy-mid); transform: translateY(-1px); }

/* ══════════════════════════════
   BRANDING PAGE
══════════════════════════════ */
.branding-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.brand-upload-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.brand-preview-wrap {
  height: 180px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1.5px solid var(--border);
  position: relative;
  overflow: hidden;
}
.brand-preview-wrap.cover { height: 200px; }

.brand-preview-img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}
.brand-preview-wrap.cover .brand-preview-img {
  object-fit: cover;
  padding: 0;
}

.brand-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: .78rem;
}
.cover-placeholder {
  background: linear-gradient(135deg, #1C2D4E, #24406E);
  width: 100%; height: 100%;
  justify-content: center;
  color: rgba(255,255,255,.5);
}

.brand-upload-info {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand-upload-info h4 {
  font-size: .88rem;
  font-weight: 700;
  color: var(--navy);
}
.brand-upload-info p {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: .8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s;
  width: fit-content;
}
.btn-upload svg { width: 15px; height: 15px; }
.btn-upload:hover { background: var(--gold-dark); }

.btn-sm { font-size: .75rem; padding: 6px 12px; margin-top: 2px; }

.btn-add-cat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1.5px dashed var(--gold);
  color: var(--gold-dark);
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-add-cat:hover { background: var(--gold-faint); }

.btn-remove-cat {
  background: none;
  border: none;
  cursor: pointer;
  color: #EF4444;
  font-size: 13px;
  padding: 0 2px;
  vertical-align: middle;
  line-height: 1;
  opacity: .7;
  transition: opacity .15s;
}
.btn-remove-cat:hover { opacity: 1; }

.sheet-mapping-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1.5px solid #BBF7D0;
  border-radius: 7px;
  margin-bottom: 6px;
}
.sheet-mapping-label {
  flex: 1;
  font-size: .87rem;
  font-weight: 700;
  color: #065F46;
}
.sheet-mapping-gid {
  font-size: .75rem;
  color: #6B7280;
  font-family: monospace;
}

.save-hint {
  font-size: .78rem;
  color: var(--green);
  font-weight: 600;
}

/* custom logo display */
.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.sidebar-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}
.login-logo-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: contain;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .share-grid { grid-template-columns: 1fr 1fr; }
  .charts-row { grid-template-columns: 1fr; }
  .charts-row.three { grid-template-columns: 1fr 1fr; }
  .form-cols { grid-template-columns: 1fr 1fr; }
  .form-cols.four { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar {
    position: fixed;
    transform: translateX(-240px);
    width: 240px;
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: flex; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .charts-row.three { grid-template-columns: 1fr; }
  .section-row.two { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .view { padding: 16px; }
  .form-cols { grid-template-columns: 1fr; }
  .form-cols.four { grid-template-columns: 1fr 1fr; }
  .period-nav { display: none; }
}

@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
  .share-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════
   LOGBOOK
══════════════════════════════ */
.lb-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.lb-date-row { display: flex; align-items: center; gap: 8px; }
.lb-date-input {
  padding: 6px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: .9rem; color: var(--navy); font-family: inherit;
}
.btn-icon-sq {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 1.2rem; color: var(--navy); cursor: pointer; transition: background .15s;
}
.btn-icon-sq:hover { background: var(--gold-light); }
.btn-sm-gold {
  padding: 6px 14px; background: var(--gold); color: var(--navy);
  border: none; border-radius: 8px; font-size: .82rem; font-weight: 700;
  cursor: pointer; transition: opacity .15s;
}
.btn-sm-gold:hover { opacity: .85; }
.lb-tabs {
  display: flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 3px;
}
.lb-tab {
  padding: 7px 18px; border: none; background: transparent; border-radius: 8px;
  font-size: .85rem; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.lb-tab.active { background: var(--surface); color: var(--navy); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.lb-panel { margin-bottom: 0; }
.lb-form-wrap {
  background: #F9FAFB; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 16px; margin-bottom: 16px;
}
.lb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field-span-2 { grid-column: span 2; }
.lb-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.lb-list { display: flex; flex-direction: column; gap: 10px; }
.lb-empty {
  text-align: center; color: var(--text-muted); font-size: .87rem;
  padding: 24px 0; font-style: italic;
}
.lb-card {
  display: flex; border: 1.5px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface); transition: box-shadow .15s;
}
.lb-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.lb-card-accent { width: 4px; flex-shrink: 0; }
.lb-card-body { flex: 1; padding: 12px 14px; min-width: 0; }
.lb-card-actions {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 8px; border-left: 1px solid var(--border);
}
.lb-card-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.lb-room-badge {
  background: var(--navy); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; letter-spacing: .5px;
}
.lb-status-badge, .lb-source-badge, .lb-cat-badge {
  font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 20px;
}
.lb-cat-badge { background: #FEF3C7; color: #92400E; }
.lb-card-guest { font-size: .95rem; font-weight: 700; color: var(--navy); }
.lb-card-dates { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.lb-card-amount { font-size: .88rem; font-weight: 700; color: #10B981; margin-top: 2px; }
.lb-card-notes { font-size: .78rem; color: #6B7280; margin-top: 4px; font-style: italic; }
.lb-file-input { font-size: .83rem; }
.receipt-preview { margin-top: 8px; }
.receipt-thumb {
  max-width: 120px; max-height: 90px; border-radius: 6px;
  border: 1.5px solid var(--border); object-fit: cover; cursor: pointer;
}
.lb-receipt-thumb {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
  cursor: pointer; color: var(--navy); font-size: .78rem; font-weight: 600; text-decoration: underline;
}
.lb-receipt-thumb img {
  width: 40px; height: 30px; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--border);
}

/* ══════════════════════════════
   CALENDAR
══════════════════════════════ */
.cal-nav-bar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.cal-nav-left { display: flex; align-items: center; gap: 12px; }
.cal-month-label {
  font-size: 1.1rem; font-weight: 800; color: var(--navy); min-width: 160px; text-align: center;
}
.cal-view-toggle {
  display: flex; gap: 4px; background: var(--bg); border-radius: 10px; padding: 3px;
}
.cal-toggle {
  padding: 6px 16px; border: none; background: transparent; border-radius: 8px;
  font-size: .83rem; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.cal-toggle.active { background: var(--surface); color: var(--navy); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px;
}
.cal-weekdays div {
  text-align: center; font-size: .75rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px; padding: 4px 0;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day {
  min-height: 80px; border: 1px solid #F3F4F6; border-radius: 6px;
  padding: 4px 6px; cursor: pointer; transition: background .12s; background: #FAFAFA;
}
.cal-day:hover { background: #F0F9FF; border-color: #BAE6FD; }
.cal-day-blank { background: transparent; border-color: transparent; cursor: default; }
.cal-day-today { border: 2px solid var(--gold); background: #FFFBEB; }
.cal-day-has-bookings { background: #F0FDF4; }
.cal-day-num { font-size: .82rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.cal-day-today .cal-day-num { color: #D97706; }
.cal-chips { display: flex; flex-wrap: wrap; gap: 2px; }
.cal-chip {
  font-size: .65rem; font-weight: 700; color: #fff;
  padding: 1px 5px; border-radius: 10px; white-space: nowrap;
}
.cal-chip-more { font-size: .65rem; color: var(--text-muted); font-weight: 600; padding: 1px 4px; }
.room-grid-outer { overflow-x: auto; }
.room-grid {
  display: grid; min-width: max-content;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  grid-template-columns: 80px repeat(31, 44px);
}
.rg-cell {
  padding: 6px 8px; font-size: .75rem; border-right: 1px solid #F3F4F6;
  border-bottom: 1px solid #F3F4F6; text-align: center; white-space: nowrap;
}
.rg-header-room {
  background: var(--navy); color: #fff; font-weight: 700; position: sticky; left: 0; z-index: 2;
}
.rg-header-day { background: #F3F4F6; font-weight: 700; color: var(--navy); }
.rg-today { background: #FEF3C7; color: #92400E; }
.rg-room-label {
  background: #F8FAFC; font-weight: 700; color: var(--navy); text-align: left;
  position: sticky; left: 0; z-index: 1; min-width: 80px;
}
.rg-booked { font-size: .7rem; font-weight: 700; cursor: pointer; transition: opacity .12s; }
.rg-booked:hover { opacity: .75; }
.rg-free { background: #fff; cursor: pointer; }
.rg-free:hover { background: #F0FDF4; }
.cal-day-panel {
  position: fixed; right: 0; top: 0; bottom: 0; width: 360px;
  background: var(--surface); box-shadow: -4px 0 24px rgba(0,0,0,.12);
  z-index: 200; display: flex; flex-direction: column; overflow: hidden;
}
.cal-day-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 2px solid var(--gold-light);
  background: var(--navy); color: #fff;
}
#calDayPanelTitle { font-size: .88rem; font-weight: 700; color: #fff; }
#calDayPanelContent { flex: 1; overflow-y: auto; padding: 16px; }
.cdp-section-title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════
   PAYMENT TOGGLE
══════════════════════════════════════ */
.pay-toggle { display: flex; gap: 16px; margin-top: 4px; flex-wrap: wrap; }
.pay-option { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: .85rem; font-weight: 500; color: var(--text); }
.pay-option input[type="radio"] { accent-color: var(--gold); width: 16px; height: 16px; cursor: pointer; }
.field-readonly { background: #F9FAFB !important; color: #6B7280 !important; cursor: not-allowed; }

/* ══════════════════════════════════════
   SERVICES SECTION
══════════════════════════════════════ */
.services-section { border-top: 1px solid var(--border); padding: 14px 0 6px; margin: 8px 0 0; }
.services-header  { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.services-label   { font-size: .82rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .5px; }
.services-list    { display: flex; flex-direction: column; gap: 8px; }
.services-empty   { font-size: .8rem; color: #9CA3AF; font-style: italic; padding: 4px 0 8px; }
.service-row      { display: grid; grid-template-columns: 160px 1fr 130px 32px; gap: 8px; align-items: center; }
.svc-type         { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: .82rem; background: #fff; color: var(--text); }
.svc-details      { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: .82rem; background: #fff; color: var(--text); width: 100%; min-width: 0; }
.svc-amt-wrap     { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.svc-currency     { padding: 0 7px; font-size: .82rem; color: #6B7280; background: #F9FAFB; border-right: 1px solid var(--border); display: flex; align-items: center; }
.svc-amount       { border: none; padding: 6px 8px; font-size: .82rem; width: 100%; background: transparent; color: var(--text); min-width: 0; }
.svc-amount:focus { outline: none; }
@media (max-width: 600px) {
  .service-row { grid-template-columns: 1fr 1fr; row-gap: 4px; }
  .service-row .btn-icon { grid-column: 2; justify-self: end; }
}

/* ══════════════════════════════════════
   CALENDAR AVAILABILITY BADGE
══════════════════════════════════════ */
.cal-day-top    { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.cal-avail-badge { font-size: .62rem; font-weight: 700; padding: 1px 5px; border-radius: 10px; white-space: nowrap; line-height: 1.4; }
.avail-ok   { background: #D1FAE5; color: #065F46; }
.avail-low  { background: #FEF3C7; color: #92400E; }
.avail-zero { background: #FEE2E2; color: #991B1B; }

/* ══════════════════════════════════════
   BOOKING CARD — NEW FIELDS
══════════════════════════════════════ */
.lb-card-meta-row  { display: flex; flex-wrap: wrap; gap: 5px; margin: 3px 0; }
.lb-meta-chip      { font-size: .74rem; padding: 2px 7px; background: #F3F4F6; border-radius: 12px; color: #374151; }
.lb-id-chip        { cursor: pointer; }
.lb-id-chip:hover  { background: #DBEAFE; color: #1E40AF; }
.lb-drive-link     { font-size: .74rem; padding: 2px 7px; background: #EDE9FE; border-radius: 12px; color: #6D28D9; text-decoration: none; }
.lb-drive-link:hover { background: #DDD6FE; }
.lb-pay-row        { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.lb-pay-badge      { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 12px; }
.lb-dp-hint        { font-size: .73rem; color: #6B7280; }
.lb-services-row   { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.lb-svc-chip       { font-size: .72rem; padding: 2px 8px; background: #EDE9FE; color: #6D28D9; border-radius: 10px; }

/* ══════════════════════════════════════
   DRIVE STATUS
══════════════════════════════════════ */
.drive-status           { margin-top: 4px; min-height: 20px; }
.drive-status-uploading { font-size: .78rem; color: #6B7280; }
.drive-link-badge       { font-size: .78rem; color: #6D28D9; text-decoration: none; padding: 2px 8px; background: #EDE9FE; border-radius: 10px; display: inline-block; margin-top: 2px; }
.drive-link-badge:hover { background: #DDD6FE; }
.receipt-pdf-label      { font-size: .8rem; color: #374151; padding: 4px 0; display: block; }

/* ══════════════════════════════════════
   MONTHLY SUMMARY DATE RANGE
══════════════════════════════════════ */
.summary-date-range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dr-label { font-size: .78rem; color: #6B7280; font-weight: 500; white-space: nowrap; }
.dr-input  { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: .8rem; color: var(--text); background: #fff; }
.dr-input:focus { outline: none; border-color: var(--gold); }

/* ══════════════════════════════════════
   PRICING MODAL
══════════════════════════════════════ */
.pricing-section-head { font-size: .8rem; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .5px; margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); }

/* ══════════════════════════════════════
   BTN SMALL OUTLINE
══════════════════════════════════════ */
.btn-sm-outline {
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px;
  font-size: .8rem; font-weight: 600; color: var(--text); background: #fff;
  cursor: pointer; transition: background .12s;
}
.btn-sm-outline:hover { background: #F3F4F6; }

/* ══════════════════════════════════════
   GUEST SEARCH
══════════════════════════════════════ */
.guest-search-input {
  padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: .83rem; color: var(--text); background: #fff; width: 220px;
  transition: border-color .15s;
}
.guest-search-input:focus { outline: none; border-color: var(--gold); }

/* ══════════════════════════════════════
   DISCOUNT FIELDS
══════════════════════════════════════ */
.discount-row { display: flex; gap: 8px; align-items: center; }
.discount-row select { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; background: #fff; color: var(--text); }
.discount-row input  { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; background: #fff; color: var(--text); }
.discount-row select:focus, .discount-row input:focus { outline: none; border-color: var(--gold); }
.lb-discount-row   { margin: 3px 0; }
.lb-discount-badge { font-size: .73rem; padding: 2px 8px; background: #FEF3C7; color: #92400E; border-radius: 10px; font-weight: 600; }

/* ══════════════════════════════════════
   PRICING CATEGORIES LIST
══════════════════════════════════════ */
.pricing-cat-list  { display: flex; flex-direction: column; gap: 8px; }
.pricing-cat-row   { display: grid; grid-template-columns: 1fr 130px 32px; gap: 8px; align-items: center; }
.pcat-label        { padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; background: #fff; color: var(--text); width: 100%; }
.pcat-label:focus  { outline: none; border-color: var(--gold); }

/* ══════════════════════════════════════
   CALENDAR AVAIL BADGE — NUMBER ONLY
══════════════════════════════════════ */
.cal-avail-badge {
  font-size: .7rem; font-weight: 800; padding: 1px 6px;
  border-radius: 10px; min-width: 22px; text-align: center;
}
.avail-ok   { background: #D1FAE5; color: #065F46; }
.avail-low  { background: #FEF3C7; color: #92400E; }
.avail-zero { background: #FEE2E2; color: #991B1B; }

/* ══════════════════════════════════════
   STATEMENTS PANEL
══════════════════════════════════════ */
.btn-sm-gold {
  padding: 5px 14px; border: none; border-radius: 6px;
  font-size: .8rem; font-weight: 700; background: var(--gold); color: var(--navy);
  cursor: pointer; transition: background .12s;
}
.btn-sm-gold:hover { background: var(--gold-dark); }
.stmt-controls    { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.stmt-type-toggle { display: flex; gap: 20px; }
.stmt-date-row    { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stmt-preview     { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 4px; }
.stmt-table-wrap  { overflow-x: auto; }
.stmt-table       { width: 100%; border-collapse: collapse; font-size: .83rem; }
.stmt-table thead th { background: var(--navy); color: #fff; padding: 8px 12px; text-align: left; font-size: .78rem; font-weight: 700; }
.stmt-table tbody tr:nth-child(even) { background: #F9FAFB; }
.stmt-table tbody td { padding: 7px 12px; border-bottom: 1px solid var(--border); }
.stmt-table tfoot td { padding: 9px 12px; background: var(--navy); color: #fff; font-weight: 700; }
.stmt-table .r    { text-align: right; }
.stmt-disc-badge  { font-size: .7rem; padding: 1px 6px; background: #FEF3C7; color: #92400E; border-radius: 8px; margin-left: 4px; }

/* ══════════════════════════════════════
   CONCERNS
══════════════════════════════════════ */
.concern-card       { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; }
.concern-card-head  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.concern-priority-badge { font-size: .72rem; font-weight: 800; padding: 2px 10px; border-radius: 12px; }
.concern-cat-badge  { font-size: .72rem; padding: 2px 9px; background: var(--navy-faint); color: var(--navy); border-radius: 12px; font-weight: 600; }
.concern-meta       { font-size: .75rem; color: var(--text-muted); margin-left: auto; }
.concern-title      { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.concern-desc       { font-size: .84rem; color: var(--text-mid); line-height: 1.5; margin-bottom: 6px; }
.concern-attach-thumb { max-width: 120px; max-height: 80px; border-radius: 6px; cursor: pointer; border: 1px solid var(--border); margin-top: 4px; display: block; }

/* ══════════════════════════════════════
   CLIENT LIST
══════════════════════════════════════ */
.client-card        { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px; }
.client-card-head   { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.client-avatar      { width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: var(--gold); font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.client-name        { font-size: .97rem; font-weight: 700; color: var(--text); }
.client-email       { font-size: .78rem; color: var(--text-muted); margin-top: 1px; }
.client-stats       { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.client-stat-badge  { font-size: .75rem; font-weight: 700; padding: 3px 10px; background: var(--navy-faint); color: var(--navy); border-radius: 12px; }
.client-stat-badge.green { background: #D1FAE5; color: #065F46; }
.client-section-title { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-muted); margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.client-table       { width: 100%; border-collapse: collapse; font-size: .82rem; }
.client-table th    { background: #F3F4F6; color: var(--navy); font-weight: 700; padding: 6px 10px; text-align: left; font-size: .76rem; }
.client-table td    { padding: 6px 10px; border-bottom: 1px solid #F3F4F6; }

/* ══════════════════════════════════════
   UPCOMING ARRIVALS
══════════════════════════════════════ */
.upcoming-card      { margin-bottom: 0; border-left: 4px solid var(--gold); }
.upcoming-head      { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.upcoming-title     { font-size: .9rem; font-weight: 700; color: var(--navy); }
.upcoming-count     { background: var(--gold); color: var(--navy); font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 12px; margin-left: 8px; }
.upcoming-list      { display: flex; flex-direction: column; gap: 8px; }
.upcoming-item      { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #FAFAFA; border-radius: 8px; border: 1px solid var(--border); flex-wrap: wrap; }
.upcoming-days-badge { font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 12px; white-space: nowrap; flex-shrink: 0; }
.upcoming-item-body { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; min-width: 0; }
.upcoming-guest     { font-size: .88rem; font-weight: 700; color: var(--navy); }
.upcoming-room      { font-size: .78rem; padding: 1px 8px; background: var(--navy-faint); color: var(--navy); border-radius: 10px; }
.upcoming-phone     { font-size: .78rem; color: var(--text-muted); }
.upcoming-dates     { font-size: .75rem; color: var(--text-muted); white-space: nowrap; margin-left: auto; }
.upcoming-source    { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }

/* ══════════════════════════════════════
   ARRIVED BUTTON
══════════════════════════════════════ */
.btn-arrived {
  padding: 5px 14px; border-radius: 20px; font-size: .75rem; font-weight: 700;
  background: var(--green); color: #fff; border: none; cursor: pointer;
  transition: background .15s, transform .1s; white-space: nowrap; flex-shrink: 0;
  letter-spacing: .3px;
}
.btn-arrived:hover  { background: #059669; transform: translateY(-1px); }
.btn-arrived:active { transform: translateY(0); }

/* ══════════════════════════════════════
   CANCEL BOOKING BUTTON
══════════════════════════════════════ */
.btn-icon.cancel {
  background: #FEF2F2; color: var(--red); border: 1px solid #FECACA;
}
.btn-icon.cancel:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ══════════════════════════════════════
   LIVE LOGBOOK KPI SECTION
══════════════════════════════════════ */
.live-banner {
  display: flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  animation: livePulse 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16,185,129,.6); }
  50%       { opacity: .7; box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}
.live-label { color: var(--green); }
.live-period {
  background: var(--green-faint); color: var(--green); font-size: .7rem;
  padding: 2px 8px; border-radius: 10px; font-weight: 700; letter-spacing: .5px;
}

.live-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .live-kpi-row { grid-template-columns: repeat(2, 1fr); } }

.live-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative; overflow: hidden;
  transition: box-shadow .2s, transform .15s;
  box-shadow: var(--shadow);
}
.live-kpi::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--navy);
}
.live-kpi:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.live-kpi.accent-green::before { background: var(--green); }
.live-kpi.accent-green .live-kpi-val { color: var(--green); }
.live-kpi.accent-red-live::before { background: var(--red); }
.live-kpi.accent-red-live .live-kpi-val { color: var(--red); }

.live-kpi-val {
  font-size: 1.35rem; font-weight: 800; color: var(--navy);
  letter-spacing: -.5px; line-height: 1.1;
}
.live-kpi-lbl {
  font-size: .72rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px; margin-top: 2px;
}
.live-kpi-hint {
  font-size: .71rem; color: var(--text-muted); margin-top: 3px;
}

/* ══════════════════════════════════════
   CONCERN STATUS ACTIONS
══════════════════════════════════════ */
.concern-actions {
  display: flex; align-items: center; gap: 6px; margin-left: auto; flex-shrink: 0;
}
.concern-status-badge {
  font-size: .71rem; font-weight: 700; padding: 2px 10px;
  border-radius: 12px; white-space: nowrap;
}
.concern-done {
  opacity: .65;
}
.concern-done .concern-title { text-decoration: line-through; color: var(--text-muted); }

.btn-concern-status {
  padding: 4px 12px; border-radius: 6px; font-size: .75rem; font-weight: 700;
  cursor: pointer; border: 1px solid; transition: all .15s; white-space: nowrap;
}
.btn-concern-status.pending {
  background: var(--green-faint); color: #065F46; border-color: #A7F3D0;
}
.btn-concern-status.pending:hover { background: var(--green); color: #fff; border-color: var(--green); }
.btn-concern-status.completed {
  background: var(--gold-faint); color: #92400E; border-color: #FDE68A;
}
.btn-concern-status.completed:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

/* ══════════════════════════════════════
   PROFESSIONAL UI ENHANCEMENTS
══════════════════════════════════════ */

/* Cards — universal lift on hover */
.kpi-card, .panel, .lb-card, .concern-card, .client-card, .expense-card {
  transition: box-shadow .2s ease, transform .15s ease;
}
.kpi-card:hover, .panel:hover {
  box-shadow: 0 8px 32px rgba(28,45,78,.1), 0 2px 8px rgba(28,45,78,.06);
}

/* KPI cards — colored top accent */
.kpi-card {
  position: relative; overflow: hidden;
  border-top: 3px solid var(--gold);
}

/* Sidebar — deeper navy bg for polish */
.sidebar { background: #162440; }
.nav-section-label { color: rgba(255,255,255,.35); }
.nav-item { color: rgba(255,255,255,.7); border-radius: 8px; margin: 1px 8px; padding: 9px 12px; }
.nav-item:hover   { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active  { background: var(--gold); color: var(--navy); font-weight: 700; }
.nav-item.active svg, .nav-item.active span { color: var(--navy); }

/* Topbar — subtle border */
.topbar {
  border-bottom: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
}

/* Page titles */
.view-title {
  font-size: 1.2rem; font-weight: 800; color: var(--navy);
  letter-spacing: -.3px;
}

/* Table rows — better hover */
.logbook-table tbody tr:hover { background: #F0F4FF; }

/* Buttons — gold primary polished */
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  box-shadow: 0 2px 8px rgba(245,196,46,.3);
  letter-spacing: .3px;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-dark) 0%, #B8860B 100%);
  box-shadow: 0 4px 14px rgba(245,196,46,.4);
  transform: translateY(-1px);
}

/* Form focus rings */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(245,196,46,.15);
}

/* Modal — bigger shadow */
.modal-box {
  box-shadow: 0 20px 60px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.1);
}

/* Badges — sharper */
.status-badge { font-weight: 700; letter-spacing: .3px; }

/* Section dividers in cards */
.panel .panel-title, .panel .section-title {
  font-size: .8rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--navy); border-bottom: 2px solid var(--gold);
  padding-bottom: 6px; margin-bottom: 12px;
}

/* ══════════════════════════════════════
   MARK REMAINING PAID BUTTON
══════════════════════════════════════ */
.btn-icon.pay-remaining {
  background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0;
  font-size: .72rem; padding: 3px 8px; white-space: nowrap; border-radius: 6px;
}
.btn-icon.pay-remaining:hover { background: #10B981; color: #fff; border-color: #10B981; }

/* ══════════════════════════════════════
   FULLY PAID BOOKING STYLES
══════════════════════════════════════ */
.lb-fully-paid-badge {
  margin-left: auto; font-size: .68rem; font-weight: 800;
  background: #D1FAE5; color: #065F46; padding: 2px 8px; border-radius: 10px;
  letter-spacing: .5px;
}
.lb-card-paid {
  border-left: 4px solid #10B981;
}
.lb-paid-lock {
  font-size: .72rem; color: #6B7280; display: flex; align-items: center; gap: 3px;
  white-space: nowrap; padding: 2px 6px; background: #F3F4F6; border-radius: 6px;
}
.lb-pay-badge.paid-full { font-weight: 700; }

/* Booking logged timestamp */
.lb-card-logged {
  font-size: .71rem; color: var(--text-muted); margin-top: 2px; font-style: italic;
}

/* Checked-out booking card */
.lb-card-checked-out {
  border-left: 4px solid #93C5FD;
  opacity: .85;
}
