@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --sidebar-width: 240px;

  /* Primary */
  --color-primary: #2D2926;
  --color-accent: #B87333;
  --color-accent-light: #D4A76A;
  --color-accent-glow: rgba(184, 115, 51, 0.10);
  --color-cool: #4A6670;

  /* Backgrounds */
  --color-bg: #FAF9F6;
  --color-surface: #FFFFFF;
  --color-surface-elevated: #F5F3EF;

  /* Text */
  --color-text: #2D2926;
  --color-text-secondary: #6B635B;
  --color-text-muted: #9C948C;

  /* Borders */
  --color-border: #E8E4DF;
  --color-border-subtle: #F2EFEB;

  /* Semantic */
  --color-success: #16A34A;
  --color-success-bg: #DCFCE7;
  --color-success-text: #166534;
  --color-warning: #D97706;
  --color-warning-bg: #FEF3C7;
  --color-warning-text: #92400E;
  --color-critical: #DC2626;
  --color-critical-bg: #FEE2E2;
  --color-critical-text: #991B1B;

  /* Trend */
  --color-positive: #16A34A;
  --color-negative: #DC2626;
  --color-neutral-trend: #6B7280;

  /* Room States */
  --color-ooo: #9F7AEA;
  --color-ooo-bg: #F3E8FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    display: flex;
    min-height: 100vh;
}

/* ── Logo / Wordmark ── */
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: white;
}

.logo-text .accent {
    color: var(--color-accent);
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: var(--color-primary);
    color: white;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
    padding: 5px 0;
    letter-spacing: -0.03em;
    cursor: pointer;
}

.nav-item {
    padding: 11px 14px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-item.active {
    background: rgba(184, 115, 51, 0.15);
    color: var(--color-accent-light);
}

.nav-item.nav-loading {
    opacity: 0.5;
    cursor: default;
    font-style: italic;
}

.nav-section {
    margin-top: 24px;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.45;
    font-weight: 600;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Main Content ── */
.main-content {
    margin-left: 240px;
    padding: 20px;
    min-height: 100vh;
}

/* ── Top Bar ── */
.top-bar {
    background: var(--color-surface);
    padding: 18px 24px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(45, 41, 38, 0.05);
    border: 1px solid var(--color-border);
}

.top-bar-left h1 {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 4px;
}

.top-bar-left .date {
    font-size: 13px;
    color: var(--color-text-muted);
}

.top-bar-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.date-selector {
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: var(--color-surface);
    color: var(--color-text);
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.date-selector:focus {
    border-color: var(--color-accent);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

/* ── Alert Banner ── */
.alert-banner {
    background: var(--color-critical-bg);
    color: var(--color-critical-text);
    border: 1px solid var(--color-critical);
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-banner-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.alert-banner-content {
    flex: 1;
}

.alert-banner-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 3px;
    color: var(--color-critical-text);
}

.alert-banner-text {
    font-size: 13px;
    color: var(--color-critical-text);
    opacity: 0.85;
}

.alert-banner-action {
    background: var(--color-critical);
    color: white;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── KPI Cards ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--color-surface);
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    box-shadow: 0 2px 4px rgba(45, 41, 38, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(45, 41, 38, 0.06);
}

.kpi-card.trend-up {
    border-left-color: var(--color-positive);
}

.kpi-card.trend-down {
    border-left-color: var(--color-negative);
}

.kpi-card.trend-neutral {
    border-left-color: var(--color-border);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.kpi-label {
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.kpi-icon.purple { background: var(--color-ooo-bg); }
.kpi-icon.blue   { background: rgba(74, 102, 112, 0.12); }
.kpi-icon.green  { background: var(--color-success-bg); }
.kpi-icon.orange { background: var(--color-accent-glow); }
.kpi-icon.teal   { background: rgba(74, 102, 112, 0.08); }

.kpi-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums lining-nums;
}

.kpi-subtext {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.kpi-change {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 18px;
}

.kpi-change.positive { color: var(--color-positive); }
.kpi-change.negative { color: var(--color-negative); }
.kpi-change.neutral  { color: var(--color-text-muted); }

/* ── Dashboard Grid ── */
.dashboard-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 24px;
    margin-bottom: 28px;
}

/* ── Cards ── */
.card, .full-width-card {
    background: var(--color-surface);
    padding: 22px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 4px rgba(45, 41, 38, 0.04);
}

.full-width-card {
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    font-family: 'Outfit', sans-serif;
}

.card-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--color-text-secondary);
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.filter-btn.active {
    background: var(--color-accent);
    color: white;
    border-color: var(--color-accent);
    font-weight: 600;
}

/* ── Trend Chart ── */
.chart-wrapper {
    position: relative;
    height: 280px;
}

/* ── Property Quick View ── */
.property-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.loading-text {
    color: var(--color-text-muted);
    font-style: italic;
    font-size: 14px;
    padding: 20px 0;
    text-align: center;
}

.property-item {
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.property-item:hover {
    border-color: var(--color-accent);
    box-shadow: 0 3px 8px var(--color-accent-glow);
}

.property-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.property-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.property-brand {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.status-badge {
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.good     { background: var(--color-success-bg); color: var(--color-success-text); }
.status-badge.warning  { background: var(--color-warning-bg); color: var(--color-warning-text); }
.status-badge.critical { background: var(--color-critical-bg); color: var(--color-critical-text); }
.status-badge.na       { background: var(--color-surface-elevated); color: var(--color-text-muted); }

.property-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.property-metric {
    text-align: center;
    padding: 7px 4px;
    background: var(--color-surface-elevated);
    border-radius: 6px;
}

.property-metric-label {
    font-size: 10px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    margin-bottom: 3px;
}

.property-metric-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* ── Comparison Table ── */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--color-border);
    background: var(--color-surface-elevated);
}

.comparison-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--color-border-subtle);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.comparison-table tr:hover td {
    background: var(--color-surface-elevated);
}

.comparison-table .property-cell {
    font-weight: 600;
    color: var(--color-text);
}

.comparison-table .portfolio-row td {
    background: var(--color-surface-elevated);
    font-weight: 700;
    border-top: 2px solid var(--color-border);
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.trend-indicator.up   { background: var(--color-success-bg); color: var(--color-success-text); }
.trend-indicator.down { background: var(--color-critical-bg); color: var(--color-critical-text); }

.loading {
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
    padding: 30px !important;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .main-content {
        margin-left: 200px;
    }
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Filter Bar ── */
.filter-bar {
    background: var(--color-surface);
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 4px rgba(45, 41, 38, 0.04);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-bar .filter-btn { padding: 7px 14px; font-size: 13px; }

/* ── KPI Delta Label ── */
.kpi-delta {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    min-height: 16px;
    letter-spacing: 0.01em;
    color: var(--color-text-muted);
}

.kpi-delta.delta-positive { color: var(--color-positive); }
.kpi-delta.delta-negative { color: var(--color-negative); }

.filter-sep { color: var(--color-border); font-size: 18px; margin: 0 4px; }

/* ── Shared Form / Modal Styles ── */
.add-property-btn {
    float: right;
    background: var(--color-accent);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-property-btn:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(45, 41, 38, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--color-surface);
    margin: 5% auto;
    padding: 0;
    border-radius: 14px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 32px 120px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s;
}

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

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

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: var(--color-text);
}

.close-modal {
    font-size: 26px;
    font-weight: bold;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--color-critical);
}

#addPropertyForm {
    padding: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.form-group input,
.form-group select {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    color: var(--color-text);
    transition: border-color 0.2s;
    background: var(--color-surface);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.modal-footer {
    border-top: 1px solid var(--color-border);
    padding: 20px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary {
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-border);
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(184, 115, 51, 0.25);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Auth Pages ── */
.auth-container {
    flex: 1;            /* body is display:flex — grow to fill the full viewport width */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--color-primary);
}

.auth-card {
    background: var(--color-surface);
    padding: 40px;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(45, 41, 38, 0.08), 0 4px 16px rgba(45, 41, 38, 0.04);
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.auth-logo .accent {
    color: var(--color-accent);
}

.auth-subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-text);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-help {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-auth:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(184, 115, 51, 0.25);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.error-message {
    display: none;
    padding: 12px;
    background: var(--color-critical-bg);
    color: var(--color-critical-text);
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.auth-footer a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ── Alerts (inline page alerts) ── */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
}

.alert.show { display: block; }

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
    border-left: 4px solid var(--color-success);
}

.alert-error {
    background: var(--color-critical-bg);
    color: var(--color-critical-text);
    border-left: 4px solid var(--color-critical);
}

.alert-info {
    background: rgba(74, 102, 112, 0.10);
    color: var(--color-cool);
    border-left: 4px solid var(--color-cool);
}

/* ── Property Detail Page ── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-accent);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.property-header {
    background: var(--color-surface);
    padding: 25px 30px;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(45, 41, 38, 0.05);
    border: 1px solid var(--color-border);
}

.property-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-title-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.property-icon {
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.property-title {
    font-family: 'DM Serif Display', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 4px;
}

.property-subtitle { font-size: 13px; color: var(--color-text-muted); }

.kpi-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 1100px) { .kpi-grid-5 { grid-template-columns: repeat(3, 1fr); } }

.stat-list { display: flex; flex-direction: column; gap: 10px; }

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    background: var(--color-surface-elevated);
    border-radius: 6px;
}

.stat-label { font-size: 13px; color: var(--color-text-muted); font-weight: 600; }
.stat-value { font-size: 17px; font-weight: 700; color: var(--color-text); font-variant-numeric: tabular-nums; }

.stat-item.total-revenue-row {
    background: var(--color-accent-glow);
    border-left: 3px solid var(--color-accent);
}

.stat-item.total-revenue-row .stat-label { color: var(--color-text); }
.stat-item.total-revenue-row .stat-value { color: var(--color-accent); }

.daily-table { width: 100%; border-collapse: collapse; }

.daily-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--color-border);
    background: var(--color-surface-elevated);
}

.daily-table td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border-subtle);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.daily-table tr:hover { background: var(--color-surface-elevated); }
.daily-table tr.latest-row { background: var(--color-accent-glow); font-weight: 600; }

.filter-bar .filter-sep { color: var(--color-border); font-size: 18px; margin: 0 4px; }

.filter-bar input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--color-text);
    font-family: 'Outfit', sans-serif;
    background: var(--color-surface);
    cursor: pointer;
}

.filter-bar label { font-size: 12px; color: var(--color-text-muted); font-weight: 600; }

#periodLabel { font-size: 13px; color: var(--color-text-muted); margin-left: auto; }

.daily-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 0 2px;
}

.pagination-info { font-size: 13px; color: var(--color-text-muted); margin-right: 4px; }

.pagination-btn {
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    color: var(--color-text);
    transition: all 0.15s;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.pagination-btn:disabled { opacity: 0.35; cursor: default; }

/* ── Upload Page ── */
.upload-container, .preferences-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.upload-card, .preferences-card {
    background: var(--color-surface);
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(45, 41, 38, 0.06);
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
}

.upload-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

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

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

.form-select {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.file-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--color-surface-elevated);
}

.file-upload-area:hover {
    border-color: var(--color-accent);
    background: var(--color-accent-glow);
}

.file-upload-area.drag-over {
    border-color: var(--color-accent);
    background: var(--color-accent-glow);
}

.file-upload-icon { font-size: 48px; margin-bottom: 10px; }

.file-upload-text {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.file-upload-hint {
    font-size: 13px;
    color: var(--color-text-muted);
}

.file-input { display: none; }

.selected-file {
    display: none;
    margin-top: 15px;
    padding: 12px;
    background: var(--color-success-bg);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-success-text);
}

.selected-file.show { display: block; }

.upload-btn {
    width: 100%;
    padding: 14px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(184, 115, 51, 0.25);
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.history-table th {
    text-align: left;
    padding: 12px;
    background: var(--color-surface-elevated);
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--color-border);
}

.history-table td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border-subtle);
    font-size: 14px;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.history-table tr:hover { background: var(--color-surface-elevated); }

.status-success { background: var(--color-success-bg); color: var(--color-success-text); }
.status-error   { background: var(--color-critical-bg); color: var(--color-critical-text); }
.status-processing { background: var(--color-warning-bg); color: var(--color-warning-text); }

.help-text {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 5px;
}

.brand-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--color-surface-elevated);
    border-radius: 8px;
    margin-bottom: 15px;
}

.brand-logo { font-size: 24px; }
.brand-details { flex: 1; }
.brand-name { font-size: 14px; font-weight: 600; color: var(--color-text); }
.brand-template { font-size: 12px; color: var(--color-text-muted); }

/* ── Preferences Page ── */
.card-description {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 25px;
}

.samples-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 20px; }

.property-sample-card {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.property-sample-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 12px var(--color-accent-glow);
}

.property-code {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 3px;
}

.property-brand-tag {
    font-size: 12px;
    padding: 4px 10px;
    background: var(--color-accent-glow);
    color: var(--color-accent);
    border-radius: 12px;
    font-weight: 600;
}

.sample-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--color-surface-elevated);
    border-radius: 8px;
    margin-bottom: 15px;
}

.sample-info.has-sample {
    background: var(--color-success-bg);
    border-left: 4px solid var(--color-success);
}

.sample-info.no-sample {
    background: var(--color-warning-bg);
    border-left: 4px solid var(--color-warning);
}

.sample-icon { width: 22px; height: 22px; flex-shrink: 0; }
.sample-details { flex: 1; }
.sample-filename { font-size: 14px; font-weight: 600; color: var(--color-text); }
.sample-meta { font-size: 12px; color: var(--color-text-muted); margin-top: 3px; }

.upload-section { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    padding: 10px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    color: var(--color-text-secondary);
    transition: all 0.2s;
}
.file-select-btn svg { width: 16px; height: 16px; }

.file-select-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.delete-btn {
    padding: 8px 16px;
    background: var(--color-critical);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
}

.delete-btn:hover { opacity: 0.85; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-muted);
}

.empty-state-icon { font-size: 64px; margin-bottom: 20px; opacity: 0.5; }
.empty-state-text { font-size: 16px; margin-bottom: 10px; color: var(--color-text-secondary); }
.empty-state-hint { font-size: 14px; }

/* ── Team Management ── */
.team-section { display: none; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.members-table { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead { background: var(--color-surface-elevated); }

th {
    text-align: left;
    padding: 12px 15px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--color-border);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--color-border-subtle);
    font-size: 14px;
    color: var(--color-text);
}

tbody tr:hover { background: var(--color-surface-elevated); }

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.role-admin { background: var(--color-accent-glow); color: var(--color-accent); }
.role-user  { background: rgba(74, 102, 112, 0.12); color: var(--color-cool); }

.status-active   { background: var(--color-success-bg); color: var(--color-success-text); }
.status-inactive { background: var(--color-surface-elevated); color: var(--color-text-muted); }

.btn-danger {
    background: var(--color-accent);
    color: white;
    font-size: 12px;
    padding: 6px 12px;
}

.btn-success {
    background: var(--color-success);
    color: white;
    font-size: 12px;
    padding: 6px 12px;
}

.modal-title {
    font-size: 20px;
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: var(--color-text);
}

.close {
    font-size: 26px;
    font-weight: bold;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
}

.close:hover { color: var(--color-text); }

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.loading-members {
    text-align: center;
    padding: 40px;
    color: var(--color-text-muted);
}

/* ── Revenue breakdown section label ── */
.section-mini-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 2px 2px;
}

/* ════════════════════════════════════════════════════
   NEW LAYOUT — Dashboard + Property pages
   (matches Editorial Warmth mockups)
   ════════════════════════════════════════════════════ */

/* ── Sidebar overlay (mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 45;
}
.sidebar-overlay.visible { display: block; }

/* ── New sidebar sections ── */
.sidebar-logo {
    height: 64px;            /* match .topbar height so the wordmark aligns with the page title */
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-section {
    padding: 20px 16px 8px;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    padding: 0 8px;
    margin-bottom: 8px;
}

/* New sidebar nav items (replaces old .nav-item on dashboard/property) */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm, 6px);
    color: #A69E96;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 2px;
    text-decoration: none;
    cursor: pointer;
}
.sidebar-item:hover {
    color: #D4CEC7;
    background: rgba(255, 255, 255, 0.04);
}
.sidebar-item.active {
    color: var(--color-accent-light);
    background: rgba(184, 115, 51, 0.15);
}
.sidebar-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    stroke: currentColor;
}
.sidebar-item.active svg { opacity: 1; }

/* Sidebar property list items */
.sidebar-property {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm, 6px);
    color: #A69E96;
    font-size: 13px;
    font-weight: 400;
    transition: all 0.15s;
    margin-bottom: 1px;
    text-decoration: none;
    cursor: pointer;
}
.sidebar-property:hover {
    color: #D4CEC7;
    background: rgba(255, 255, 255, 0.04);
}
.sidebar-property.active {
    color: var(--color-accent-light);
    background: rgba(184, 115, 51, 0.15);
    font-weight: 600;
}
.sp-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sp-dot.good { background: var(--color-success); }
.sp-dot.warn { background: var(--color-warning); }
.sp-dot.crit { background: var(--color-critical); }

/* Sidebar footer / user area */
.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm, 6px);
}
.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-email {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Main area (flex sibling of sidebar) ── */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Topbar (sticky, blurred) ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(250, 249, 246, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--color-border);
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar-title {
    font-family: 'DM Serif Display', serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    color: var(--color-text);
}
.topbar-date {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}
.topbar-updated {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-success);
    animation: pulse-anim 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulse-anim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    color: var(--color-text);
    cursor: pointer;
    flex-shrink: 0;
}
.back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.15s;
    cursor: pointer;
}
.back-link:hover { color: var(--color-text); }
.back-link svg { width: 16px; height: 16px; }

/* ── Topbar user menu (avatar + name → dropdown with Logout) ── */
.user-menu { position: relative; }
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm, 6px);
    padding: 4px 8px 4px 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Outfit', sans-serif;
}
.user-menu-trigger:hover { background: var(--color-surface-elevated); border-color: var(--color-border); }
.user-menu-avatar {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.user-menu-name { font-size: 13px; font-weight: 600; color: var(--color-text); white-space: nowrap; }
.user-menu-trigger svg { width: 14px; height: 14px; color: var(--color-text-muted); transition: transform 0.15s; }
.user-menu.open .user-menu-trigger svg { transform: rotate(180deg); }
.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    box-shadow: 0 12px 40px rgba(45, 41, 38, 0.12);
    padding: 8px;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.user-menu.open .user-menu-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-menu-identity {
    padding: 8px 10px 12px;
    border-bottom: 1px solid var(--color-border-subtle);
    margin-bottom: 6px;
}
.user-menu-identity .um-name { font-size: 13px; font-weight: 700; color: var(--color-text); }
.user-menu-identity .um-email { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; word-break: break-all; }
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    background: none;
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    transition: background 0.15s;
}
.user-menu-item:hover { background: var(--color-surface-elevated); }
.user-menu-item.danger { color: var(--color-accent); }
.user-menu-item.danger:hover { background: var(--color-accent-glow); }
.user-menu-item svg { width: 16px; height: 16px; }

/* ── Content area ── */
.content {
    padding: 28px 32px 48px;
    width: 100%;
    max-width: none;   /* fluid — use the full width of the screen on large displays */
}

/* ── KPI card: auto-color left border via :has() ── */
/* Dashboard — uses .kpi-change.positive/.negative */
.kpi-card:has(.kpi-change.positive) { border-left-color: var(--color-positive); }
.kpi-card:has(.kpi-change.negative) { border-left-color: var(--color-negative); }
.kpi-card:has(.kpi-change.neutral)  { border-left-color: var(--color-neutral-trend); }
/* Property — uses .kpi-delta.delta-positive/.delta-negative */
.kpi-card:has(.kpi-delta.delta-positive) { border-left-color: var(--color-positive); }
.kpi-card:has(.kpi-delta.delta-negative) { border-left-color: var(--color-negative); }

/* KPI card body layout (no icon row) */
.kpi-card .kpi-label { margin-bottom: 8px; }
.kpi-sub { font-size: 12px; color: var(--color-text-muted); margin-top: 6px; }

/* kpi-change as trend display */
.kpi-change {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    margin-bottom: 2px;
}

/* ── Date tabs (replaces filter-bar on dashboard/property) ── */
.date-tabs {
    display: flex;
    gap: 4px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-sm, 6px);
    padding: 3px;
    margin-bottom: 24px;
    width: fit-content;
}
.date-tab {
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.date-tab:hover { color: var(--color-text-secondary); }
.date-tab.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

/* ── Card body ── */
.card-body { padding: 20px 24px 24px; }

/* ── Chart controls / toggle group ── */
.chart-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.chart-bar-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
}
.chart-bar-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--color-accent);
    opacity: 0.4;
}
.chart-toggle-group {
    display: flex;
    gap: 3px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-sm, 6px);
    padding: 2px;
}
.chart-toggle {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-family: 'Outfit', sans-serif;
    transition: all 0.15s;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}
.chart-toggle:hover { color: var(--color-text-secondary); }
.chart-toggle.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.toggle-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.expand-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all 0.15s;
    cursor: pointer;
    flex-shrink: 0;
}
.expand-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-glow);
}
.expand-btn svg { width: 16px; height: 16px; }

/* Chart legend */
.chart-legend { display: flex; gap: 20px; }
.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
}
.chart-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}
.chart-wrap { position: relative; height: 240px; }

/* ── Comparison / Data table ── */
.table-card { margin-bottom: 28px; }
.table-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    padding: 10px 24px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface-elevated);
}
.data-table th:last-child { text-align: center; }
.data-table td {
    padding: 14px 24px;
    font-size: 14px;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border-subtle);
    font-variant-numeric: tabular-nums lining-nums;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(245, 243, 239, 0.5); }
.data-table .row-total td {
    font-weight: 700;
    background: var(--color-surface-elevated);
    border-top: 2px solid var(--color-border);
}
.data-table .row-today td {
    font-weight: 600;
    background: var(--color-accent-glow);
}
.table-prop-name { font-weight: 600; }
.table-prop-brand { font-size: 11px; color: var(--color-text-muted); }
.table-trend { font-weight: 700; font-size: 13px; }
.table-trend.up   { color: var(--color-positive); }
.table-trend.down { color: var(--color-negative); }
td.td-status { text-align: center; }
.td-day-name { font-weight: 600; }
.td-day-date { font-size: 12px; color: var(--color-text-muted); }

/* ── 7-Day Forecast Strip ── */
.forecast-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}
.forecast-day {
    text-align: center;
    padding: 16px 8px;
    border-radius: var(--radius-md, 10px);
    background: var(--color-surface-elevated);
    transition: all 0.2s;
}
.forecast-day:hover {
    background: var(--color-accent-glow);
    transform: translateY(-2px);
}
.fd-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fd-date { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.fd-bar-wrap {
    height: 60px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin: 10px 0;
}
.fd-bar {
    width: 28px;
    border-radius: 4px 4px 0 0;
    background: var(--color-accent);
    transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.fd-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* ── Mobile bottom nav ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    z-index: 60;
    padding: 0 8px;
}
.bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.15s;
    background: none;
    border: none;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
}
.bnav-item.active { color: var(--color-accent); }
.bnav-item svg { width: 22px; height: 22px; stroke: currentColor; }

/* ════════════════════════════════════════════════════
   PROPERTY DETAIL PAGE — new mockup structures
   ════════════════════════════════════════════════════ */

/* Property header */
.prop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 20px;
    flex-wrap: wrap;
}
.prop-header-left { flex: 1; }
.prop-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 400;
    color: var(--color-text);
    margin-bottom: 6px;
    line-height: 1.2;
}
.prop-subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.prop-subtitle .sep { color: var(--color-border); }
.prop-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.prop-nav-btns { display: flex; gap: 4px; }
.prop-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all 0.15s;
    cursor: pointer;
}
.prop-nav-btn:hover {
    border-color: var(--color-text-secondary);
    color: var(--color-text);
}
.prop-nav-btn svg { width: 16px; height: 16px; stroke: currentColor; }

/* Date + compare pill controls */
.controls-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.pill-group {
    display: flex;
    gap: 4px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-sm, 6px);
    padding: 3px;
}
.pill {
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 4px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-family: 'Outfit', sans-serif;
    transition: all 0.15s;
    cursor: pointer;
    white-space: nowrap;
}
.pill:hover { color: var(--color-text-secondary); }
.pill.active {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

/* Date drawer (custom range) */
.date-drawer {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.date-drawer.open { display: flex; }
.drawer-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.drawer-dates { display: flex; align-items: center; gap: 8px; }
.drawer-dates input[type="date"] {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 6px 10px;
    color: var(--color-text);
    background: var(--color-bg);
    outline: none;
}
.drawer-dates input[type="date"]:focus { border-color: var(--color-accent); }
.drawer-sep { font-size: 12px; color: var(--color-text-muted); }
.drawer-apply {
    font-size: 13px;
    font-weight: 600;
    padding: 7px 20px;
    border-radius: var(--radius-sm, 6px);
    border: none;
    background: var(--color-accent);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    transition: all 0.15s;
    cursor: pointer;
}
.drawer-apply:hover { opacity: 0.88; }
.drawer-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    padding: 4px;
    display: flex;
    cursor: pointer;
    transition: color 0.15s;
}
.drawer-close:hover { color: var(--color-text); }
.drawer-close svg { width: 18px; height: 18px; stroke: currentColor; }

/* ── Last Night at a Glance panel ── */
.ln-section {
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border-subtle);
}
.ln-section:last-child { border-bottom: none; }
.ln-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.ln-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.ln-metric-name { font-size: 13px; font-weight: 500; color: var(--color-text-secondary); }
.ln-metric-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}
.ln-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 8px;
    border-top: 1px solid var(--color-border-subtle);
    margin-top: 8px;
}
.ln-total-name { font-size: 14px; font-weight: 700; color: var(--color-text); }
.ln-total-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}
.ln-room-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.ln-room-stat {
    text-align: center;
    padding: 10px 4px;
    border-radius: var(--radius-sm, 6px);
}
.ln-room-stat.sold   { background: var(--color-accent-glow); }
.ln-room-stat.ooo    { background: var(--color-ooo-bg); }
.ln-room-stat.vacant { background: var(--color-surface-elevated); }
.ln-room-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.1;
}
.ln-room-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* Room visual blocks */
.room-visual {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.room-block {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    transition: transform 0.15s;
    cursor: default;
}
.room-block:hover { transform: scale(1.3); }
.room-block.sold    { background: var(--color-accent); }
.room-block.vacant  { background: var(--color-border); }
.room-block.ooo     { background: var(--color-ooo); }
.room-legend {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.room-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-muted);
}
.room-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ── Period Comparison ── */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}
.period-list { display: flex; flex-direction: column; }
.period-card {
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-subtle);
}
.period-card:last-child { border-bottom: none; }
.period-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.period-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.pm-item-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.pm-item-row { display: flex; align-items: baseline; gap: 8px; }
.pm-item-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.pm-item-change { font-size: 12px; font-weight: 600; }
.pm-item-change.up   { color: var(--color-positive); }
.pm-item-change.down { color: var(--color-negative); }
.pm-bar-wrap {
    height: 6px;
    border-radius: 3px;
    background: var(--color-surface-elevated);
    margin-top: 8px;
    overflow: hidden;
}
.pm-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--color-accent);
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Expand Modal (property chart) ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(45, 41, 38, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 24px;
    overflow-y: auto;
}
.modal-overlay.open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.modal-container {
    background: var(--color-surface);
    border-radius: 16px;
    width: 100%;
    max-width: 1320px;
    box-shadow: 0 32px 120px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    border-bottom: 1px solid var(--color-border);
    gap: 16px;
    flex-wrap: wrap;
}
.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}
.modal-toggles {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}
.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm, 6px);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all 0.15s;
    cursor: pointer;
    flex-shrink: 0;
}
.modal-close:hover {
    border-color: var(--color-critical);
    color: var(--color-critical);
    background: var(--color-critical-bg);
}
.modal-close svg { width: 18px; height: 18px; stroke: currentColor; }
.modal-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    min-height: 460px;
}
.modal-chart {
    padding: 24px 28px;
    border-right: 1px solid var(--color-border);
}
.modal-chart-wrap {
    position: relative;
    height: 420px;
}
.modal-details {
    overflow-y: auto;
    max-height: 520px;
}
.md-section {
    padding: 18px 24px;
    border-bottom: 1px solid var(--color-border-subtle);
}
.md-section:last-child { border-bottom: none; }
.md-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}
.md-kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.md-kpi {
    padding: 12px;
    border-radius: var(--radius-sm, 6px);
    background: var(--color-surface-elevated);
}
.md-kpi-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}
.md-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.md-kpi-trend { font-size: 12px; font-weight: 600; margin-top: 2px; }
.md-kpi-trend.up   { color: var(--color-positive); }
.md-kpi-trend.down { color: var(--color-negative); }
.md-room-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}
.md-room-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.md-room-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.md-room-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

/* Per-property breakdown bars (expand modal, follows the selected metric) */
.md-prop-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
}
.md-prop-name {
    width: 92px;
    flex-shrink: 0;
    font-size: 12px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.md-prop-bar-wrap {
    flex: 1;
    height: 6px;
    background: var(--color-border-subtle);
    border-radius: 3px;
    overflow: hidden;
}
.md-prop-bar {
    display: block;
    height: 100%;
    border-radius: 3px;
}
.md-prop-val {
    width: 56px;
    flex-shrink: 0;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}
.md-prop-row.no-data .md-prop-val { color: var(--color-text-muted); font-weight: 500; }

/* ════════════════════════════════════════════════════
   RESPONSIVE — updated for new layout
   ════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .mobile-menu-btn { display: block; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .grid-2col { grid-template-columns: 1fr; }
    .modal-body { grid-template-columns: 1fr; }
    .modal-chart { border-right: none; border-bottom: 1px solid var(--color-border); }
    .modal-chart-wrap { height: 280px; }
}

@media (max-width: 768px) {
    .content { padding: 20px 16px 88px; }
    .topbar  { padding: 0 16px; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .kpi-value { font-size: 28px; }
    .kpi-card  { padding: 18px; }
    .forecast-strip { grid-template-columns: repeat(4, 1fr); }
    .forecast-day:nth-child(n+5) { display: none; }
    .bottom-nav { display: block; }
    .data-table th, .data-table td { padding: 10px 14px; }
    .td-hide-mobile { display: none; }
    .prop-header { flex-direction: column; }
    .prop-header-right { align-self: flex-start; }
    .controls-row { flex-direction: column; align-items: flex-start; }
    .date-drawer { flex-direction: column; align-items: flex-start; gap: 12px; }
    .drawer-dates { width: 100%; }
    .topbar-date { display: none; }
    .grid-2col { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .kpi-value { font-size: 24px; }
    .forecast-strip { grid-template-columns: repeat(3, 1fr); }
    .forecast-day:nth-child(n+4) { display: none; }
}
