/* ============================
   Terra West Self Storage — Styles
   Version: 1.0 | April 2026
   Brand: forest green + warm gold + cream
   ============================ */

/* --- Font imports --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables --- */
:root {
    /* Primary — Forest greens */
    --forest: #1F4530;
    --forest-mid: #2E5E3E;
    --forest-light: #7E9F6E;
    --forest-pale: #D7E2D4;

    /* Accent — Golds */
    --gold: #B28E52;
    --gold-warm: #C9A570;
    --gold-pale: #E5C98A;
    --gold-tint: #F0E3C6;

    /* Neutrals */
    --cream: #FAF7EE;
    --cream-alt: #F5F0E2;
    --ivory: #FFFCF4;
    --paper: #FFFFFF;

    /* Ink */
    --ink: #1B2A22;
    --ink-mid: #3A4A3F;
    --ink-muted: #6B7A70;
    --ink-faint: #9AA59F;

    /* Borders */
    --border: #E2DCCC;
    --border-light: #EFE9D7;

    /* Status */
    --success: #4F7A4F;
    --warning: #B28E52;
    --danger:  #9A4E3A;
    --info:    #6B8296;

    /* Fonts */
    --font-display: 'Cinzel', 'EB Garamond', Georgia, serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

    /* Shell */
    --sidebar-w: 240px;
    --topbar-h: 64px;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 2px rgba(31, 69, 48, 0.06);
    --shadow-md: 0 4px 12px rgba(31, 69, 48, 0.08);
}

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

/* Ensure HTML `hidden` attribute beats class-based display rules.
   Without this, elements like .tenant-switcher (display:flex) and
   .journey-strip (display:grid) override the user-agent
   `[hidden]{display:none}` and leak demo-only chrome onto public views. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--ink-mid);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--forest-mid); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-body);
    color: var(--ink);
    line-height: 1.3;
}
h1 { font-size: 28px; font-weight: 600; letter-spacing: -0.3px; }
h2 { font-size: 22px; font-weight: 600; }
h3 { font-size: 18px; font-weight: 600; }

.eyebrow {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--forest);
}

/* --- App shell: sidebar + main --- */
.app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--forest);
    color: var(--cream);
    padding: 24px 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255, 252, 244, 0.1);
    margin-bottom: 16px;
}

.sidebar-brand img {
    width: 100%;
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.sidebar-brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--cream);
    margin-top: 8px;
}

.sidebar-brand-tag {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--gold-pale);
    margin-top: 2px;
}

.sidebar-nav { list-style: none; padding: 0 12px; flex: 1; }
.sidebar-nav li { margin-bottom: 2px; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(250, 247, 238, 0.75);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.sidebar-nav a:hover { background: rgba(255, 252, 244, 0.06); color: var(--cream); }
.sidebar-nav a.active { background: rgba(229, 201, 138, 0.15); color: var(--gold-pale); }
.sidebar-nav .icon { width: 18px; opacity: 0.85; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 252, 244, 0.1);
    font-size: 12px;
    color: rgba(250, 247, 238, 0.55);
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--topbar-h);
    background: var(--cream-alt);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.topbar-actions { display: flex; gap: 10px; align-items: center; }

.content { padding: 28px 32px; flex: 1; }

.page-header { margin-bottom: 24px; }
.page-header h1 { margin-bottom: 4px; }
.page-header .sub { color: var(--ink-muted); font-size: 14px; }

/* --- KPI cards --- */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.kpi-card {
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.kpi-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 32px;
    color: var(--forest);
    line-height: 1.1;
    letter-spacing: 1px;
}

.kpi-delta {
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 6px;
}

.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* --- Panels --- */
.panel {
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.panel-title { font-size: 15px; font-weight: 600; color: var(--ink); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:hover { background: var(--cream-alt); border-color: var(--ink-faint); }

.btn-primary {
    background: var(--forest);
    color: var(--cream);
    border-color: var(--forest);
}
.btn-primary:hover { background: var(--forest-mid); border-color: var(--forest-mid); color: var(--cream); }

.btn-gold {
    background: var(--gold);
    color: var(--paper);
    border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-warm); border-color: var(--gold-warm); color: var(--paper); }

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ink-mid);
}
.btn-ghost:hover { background: var(--cream-alt); border-color: var(--border); }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; margin-bottom: 18px; }

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--paper);
    color: var(--ink);
    font-size: 14px;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--forest-light);
    box-shadow: 0 0 0 3px rgba(126, 159, 110, 0.15);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

thead { background: var(--cream-alt); }

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

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--ink-mid);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--forest-pale); background: rgba(215, 226, 212, 0.35); }

/* --- Badges (pill-shaped) --- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

.badge-success { background: rgba(79, 122, 79, 0.14); color: var(--success); }
.badge-warning { background: rgba(178, 142, 82, 0.16); color: var(--gold); }
.badge-danger  { background: rgba(154, 78, 58, 0.14); color: var(--danger); }
.badge-info    { background: rgba(107, 130, 150, 0.14); color: var(--info); }
.badge-neutral { background: var(--cream-alt); color: var(--ink-muted); }

.inline-notice {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.82);
    color: var(--ink-mid);
    font-size: 13px;
    line-height: 1.5;
}

.inline-notice strong { color: var(--ink); }
.inline-notice.success { border-color: rgba(79, 122, 79, 0.22); background: rgba(79, 122, 79, 0.1); }
.inline-notice.info { border-color: rgba(107, 130, 150, 0.22); background: rgba(107, 130, 150, 0.09); }

.journey-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.journey-step-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.journey-step-card .step-kicker {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ink-muted);
}

.journey-step-card h3 {
    margin: 6px 0 8px;
    font-size: 17px;
}

.journey-step-card p {
    color: var(--ink-muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.journey-step-card a {
    font-size: 13px;
    font-weight: 600;
}

/* --- Unit map (compact mini-map, used on dashboard) --- */
.unit-map {
    display: grid;
    grid-template-columns: repeat(18, 1fr);
    gap: 4px;
    margin-top: 16px;
}

.unit-cell {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--paper);
    cursor: pointer;
    transition: transform 0.1s ease;
    position: relative;
}

.unit-cell:hover { transform: scale(1.08); z-index: 2; box-shadow: var(--shadow-md); }

.unit-cell .num { font-size: 10px; font-weight: 700; line-height: 1; }
.unit-cell .sz  { font-size: 8px; opacity: 0.85; line-height: 1; margin-top: 2px; }

.unit-cell.available { background: var(--forest-light); }
.unit-cell.occupied  { background: var(--forest); }
.unit-cell.reserved  { background: var(--info); }
.unit-cell.overlocked{ background: var(--danger); }
.unit-cell.delinquent { background: var(--warning); }
.unit-cell.lien { background: var(--danger); }
.unit-cell.online_move_in { background: var(--info); }
.unit-cell.system_use { background: var(--ink-muted); }
.unit-cell.maintenance { background: var(--ink-faint); }

/* --- Site-map (full building layout, mirrors the scanned plan) --- */
.site-map { display: flex; flex-direction: column; gap: 24px; margin-top: 16px; overflow-x: auto; padding-bottom: 8px; }
.site-map-row { display: flex; flex-direction: column; gap: 6px; min-width: max-content; }
.site-map-label {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding-left: 4px;
}
.site-map-bay {
    display: flex;
    gap: 3px;
    padding: 6px;
    background: var(--cream-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.site-map-bay .unit-cell {
    aspect-ratio: auto;
    width: 38px;
    height: 56px;
    flex: 0 0 auto;
    border-radius: 4px;
    padding: 4px 2px;
}
/* Size-scaled cells so drive-ups visually read bigger, like the scan */
.site-map-bay .unit-cell[data-size="10x15"] { width: 44px; }
.site-map-bay .unit-cell[data-size="10x20"] { width: 52px; height: 64px; }
.site-map-bay .unit-cell[data-size="10x30"] { width: 64px; height: 68px; }
.site-map-bay .unit-cell[data-size="5x5"]   { width: 28px; height: 42px; }
.site-map-bay .unit-cell[data-size="5x10"]  { width: 32px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12px; color: var(--ink-muted); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; }

.state-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.state-chip {
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

button.state-chip {
    text-align: left;
    cursor: pointer;
    width: 100%;
}

button.state-chip.active {
    border-color: var(--forest);
    box-shadow: inset 0 0 0 1px var(--forest);
    background: rgba(215, 226, 212, 0.35);
}

.state-chip-label {
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 6px;
}

.state-chip-value {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--ink);
}

.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-group input,
.toolbar-group select {
    min-height: 36px;
}

.empty-state {
    border: 1px dashed var(--border);
    background: var(--cream-alt);
    border-radius: var(--radius-md);
    padding: 18px;
    color: var(--ink-muted);
}

.empty-state h3 {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 16px;
}

.empty-state p {
    margin: 0;
}

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

.row-stale {
    background: rgba(213, 139, 62, 0.08);
}

.unit-cell.dimmed {
    opacity: 0.2;
    filter: grayscale(0.2);
}

.unit-cell.selected {
    box-shadow: 0 0 0 3px rgba(191, 149, 63, 0.75);
    transform: scale(1.05);
}

.audit-banner {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(213, 139, 62, 0.35);
    background: rgba(213, 139, 62, 0.1);
    border-radius: var(--radius-md);
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.strategy-card {
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: var(--radius-md);
    padding: 16px;
}

.strategy-card h3,
.strategy-card h4 {
    margin: 0 0 8px;
}

.strategy-kpi-value {
    font-family: var(--font-display);
    font-size: 32px;
    color: var(--ink);
}

.strategy-kpi-sub {
    color: var(--ink-muted);
    font-size: 12px;
}

.strategy-callout {
    border-left: 4px solid var(--gold);
    background: rgba(191, 149, 63, 0.1);
    padding: 14px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.strategy-two-col {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
}

.strategy-list {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-muted);
}

.strategy-list li + li {
    margin-top: 8px;
}

@media (max-width: 980px) {
    .strategy-two-col {
        grid-template-columns: 1fr;
    }
}

/* --- Public pages (rent.html) --- */
.public-body { background: var(--cream); }

.public-header {
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-logo { height: 48px; }

.public-nav { display: flex; gap: 24px; align-items: center; }
.public-nav a { color: var(--ink-mid); font-weight: 500; font-size: 14px; }
.public-nav a:hover { color: var(--forest); }

.public-hero {
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 100%);
    color: var(--cream);
    padding: 80px 32px;
    text-align: center;
}

.public-hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 52px;
    color: var(--cream);
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.public-hero .lede {
    font-size: 18px;
    color: var(--gold-pale);
    max-width: 640px;
    margin: 0 auto 32px;
    line-height: 1.5;
}

.public-section { padding: 64px 32px; max-width: 1100px; margin: 0 auto; }
.public-section h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 32px;
    letter-spacing: 2px;
    color: var(--forest);
    text-align: center;
    margin-bottom: 12px;
}

.public-section .section-sub {
    text-align: center;
    color: var(--ink-muted);
    margin-bottom: 40px;
    font-size: 15px;
}

.size-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.size-card {
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.size-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-warm);
}

.size-card .size-icon {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.size-card .size-name { font-size: 13px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.size-card .size-price { font-family: var(--font-display); font-weight: 700; font-size: 36px; color: var(--forest); margin-bottom: 4px; }
.size-card .size-price-sub { font-size: 12px; color: var(--ink-muted); margin-bottom: 18px; }
.size-card .size-avail { font-size: 12px; color: var(--success); margin-bottom: 16px; font-weight: 500; }

.public-footer {
    background: var(--forest);
    color: var(--gold-pale);
    padding: 40px 32px;
    text-align: center;
    font-size: 13px;
}
.public-footer a { color: var(--gold-pale); }
.public-footer .foot-brand { font-family: var(--font-display); font-size: 16px; letter-spacing: 3px; color: var(--cream); margin-bottom: 8px; }

/* --- Tabs --- */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: -1px;
}
.tab.active { color: var(--forest); border-bottom-color: var(--forest); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Utility --- */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 12px; align-items: center; }
.text-muted { color: var(--ink-muted); }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }

/* --- Tenant portal specific --- */
.portal-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px;
}

.portal-header {
    background: var(--ivory);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-hero {
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-mid) 100%);
    color: var(--cream);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}
.balance-hero .balance-label { color: var(--gold-pale); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 8px; }
.balance-hero .balance-amount { font-family: var(--font-display); font-weight: 700; font-size: 52px; letter-spacing: 1px; margin-bottom: 16px; }

/* --- Responsive --- */
@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; }
    .unit-map { grid-template-columns: repeat(6, 1fr); }
}

@media (max-width: 600px) {
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
    .public-hero h1 { font-size: 36px; }
    .balance-hero .balance-amount { font-size: 40px; }
}

/* ======================================================================
   Management Portal additions — sidebar sections, role toggle, insight
   cards, budget table, forecast chart. Additive only; existing widgets
   retain their styles.
   ====================================================================== */
.sidebar-section-label {
    padding: 18px 18px 6px;
    font-family: var(--font-display, inherit);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream, #FAF7EE);
    opacity: 0.55;
    pointer-events: none;
}

.role-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--cream-alt, #F1ECDD);
    border: 1px solid var(--border, #d8cfb6);
    border-radius: var(--radius-sm, 6px);
    overflow: hidden;
    font-size: 12px;
}
.role-toggle .role-option {
    border: none;
    background: transparent;
    padding: 6px 12px;
    cursor: pointer;
    color: var(--ink-muted, #6b5b3b);
    font: inherit;
}
.role-toggle .role-option.active {
    background: var(--forest, #1F4530);
    color: var(--cream, #FAF7EE);
    font-weight: 600;
}

.insights-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.insight-card {
    border: 1px solid var(--border, #d8cfb6);
    border-left-width: 4px;
    border-radius: var(--radius-sm, 6px);
    background: var(--paper, #fff);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.insight-card.insight-high   { border-left-color: var(--danger, #b6412c); }
.insight-card.insight-medium { border-left-color: var(--gold,   #B28E52); }
.insight-card.insight-low    { border-left-color: var(--forest-light, #3E6649); }
.insight-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.insight-title { font-weight: 600; font-size: 15px; color: var(--ink, #2f2a1c); }
.insight-meta {
    margin-top: 4px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.insight-body {
    margin-top: 12px;
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--ink, #2f2a1c);
}
.insight-body strong { color: var(--forest, #1F4530); }
.insight-actions { display: flex; gap: 6px; }

.budget-table .section-row td {
    background: var(--cream-alt, #F1ECDD);
    font-weight: 600;
    color: var(--forest, #1F4530);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 11px;
    padding: 8px 12px;
}
.budget-table .total-row td {
    background: var(--paper, #fff);
    border-top: 2px solid var(--forest, #1F4530);
    font-size: 14px;
}

.trend-chart {
    width: 100%;
    overflow-x: auto;
    padding: 12px 4px;
}
.trend-chart svg { max-width: 100%; height: auto; }

.text-success { color: var(--success, #2e7d4f); }
.text-danger  { color: var(--danger, #b6412c); }

.form-input {
    border: 1px solid var(--border, #d8cfb6);
    background: var(--paper, #fff);
    padding: 6px 10px;
    border-radius: var(--radius-sm, 6px);
    font: inherit;
    color: var(--ink, #2f2a1c);
}

/* ---------- Modal (Unit detail, Rent flow) ---------- */
.tw-modal-backdrop {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(31, 69, 48, 0.55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 40px 16px; overflow-y: auto;
    animation: tw-fade-in 120ms ease-out;
}
@keyframes tw-fade-in { from { opacity: 0 } to { opacity: 1 } }
.tw-modal {
    background: var(--paper, #fff);
    border-radius: var(--radius, 10px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
    width: 100%; max-width: 720px;
    border: 1px solid var(--border, #d8cfb6);
    overflow: hidden;
}
.tw-modal.tw-modal-lg { max-width: 900px; }
.tw-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 22px;
    background: var(--forest, #1F4530); color: var(--cream, #FAF7EE);
    font-family: 'Cinzel', serif; letter-spacing: 0.06em;
}
.tw-modal-head .sub { font: 400 13px 'Inter', sans-serif; letter-spacing: 0; color: rgba(250,247,238,0.75); }
.tw-modal-close {
    background: transparent; border: 0; color: var(--cream, #FAF7EE);
    font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.tw-modal-body { padding: 22px; max-height: 70vh; overflow-y: auto; }
.tw-modal-foot {
    padding: 14px 22px; border-top: 1px solid var(--border, #d8cfb6);
    display: flex; justify-content: flex-end; gap: 10px; background: #faf9f4;
}
.tw-modal .field-row {
    display: grid; grid-template-columns: 160px 1fr; gap: 12px;
    align-items: center; margin-bottom: 12px;
}
.tw-modal .field-row label { font-size: 13px; color: var(--ink-soft, #5a523d); }
.tw-modal .field-row input, .tw-modal .field-row select, .tw-modal .field-row textarea {
    border: 1px solid var(--border, #d8cfb6); border-radius: 6px;
    padding: 8px 10px; font: inherit; background: #fff;
}
.tw-modal .tenant-card {
    margin-top: 18px; padding: 16px;
    border: 1px solid var(--border, #d8cfb6); border-left: 4px solid var(--gold, #B28E52);
    border-radius: 8px; background: #faf7ef;
}
.tw-modal .tenant-card h4 { margin: 0 0 4px; font-size: 15px; }
.tw-modal .mini-ledger { max-height: 180px; overflow-y: auto; margin-top: 10px; font-size: 12.5px; }
.tw-modal .mini-ledger table { width: 100%; border-collapse: collapse; }
.tw-modal .mini-ledger td { padding: 4px 6px; border-bottom: 1px solid #eee4cf; }

/* Rent / Apply wizard */
.rent-wizard-steps {
    display: flex; gap: 6px; margin-bottom: 20px;
    font-size: 12px; color: var(--ink-soft, #5a523d);
    letter-spacing: 0.08em; text-transform: uppercase;
}
.rent-wizard-steps .step {
    flex: 1; padding: 8px 10px; text-align: center;
    border-bottom: 3px solid var(--border, #d8cfb6);
}
.rent-wizard-steps .step.active { border-bottom-color: var(--gold, #B28E52); color: var(--forest, #1F4530); font-weight: 600; }
.rent-wizard-steps .step.done { border-bottom-color: var(--forest, #1F4530); color: var(--forest, #1F4530); }
.rent-unit-option {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border: 1px solid var(--border, #d8cfb6);
    border-radius: 8px; margin-bottom: 8px; cursor: pointer; background: #fff;
}
.rent-unit-option:hover { border-color: var(--gold, #B28E52); }
.rent-unit-option.selected { border-color: var(--forest, #1F4530); background: #f4f0e3; }
.esign-box {
    border: 2px dashed var(--gold, #B28E52); border-radius: 8px;
    padding: 20px; text-align: center; background: #faf7ef;
    font-family: 'Cinzel', serif; font-size: 22px; color: var(--forest, #1F4530);
    margin: 16px 0;
}
.gate-reveal {
    background: var(--forest, #1F4530); color: var(--gold-pale, #e7d6a8);
    padding: 24px; border-radius: 10px; text-align: center;
    font-family: 'Cinzel', serif; letter-spacing: 0.1em;
}
.gate-reveal .code { font-size: 40px; color: #fff; margin: 8px 0; letter-spacing: 0.2em; }

/* Tenant selector chrome */
.tenant-switcher {
    background: #faf7ef; border: 1px solid var(--border, #d8cfb6);
    border-radius: 8px; padding: 10px 14px; margin-bottom: 16px;
    display: flex; gap: 12px; align-items: center; font-size: 13px;
}
.tenant-switcher .pill {
    background: var(--gold, #B28E52); color: #fff;
    padding: 2px 8px; border-radius: 10px; font-size: 11px;
    letter-spacing: 0.08em; text-transform: uppercase;
}
.tenant-switcher select {
    flex: 1; border: 1px solid var(--border, #d8cfb6);
    border-radius: 6px; padding: 6px 8px; font: inherit;
}

/* ==========================================================
   Landing Page (rent.html) — v2 design upgrade
   ========================================================== */

.tw-landing { background: var(--cream); }

/* Top bar */
.tw-topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 36px;
    background: rgba(255, 252, 244, 0.92);
    backdrop-filter: saturate(1.2) blur(10px);
    -webkit-backdrop-filter: saturate(1.2) blur(10px);
    border-bottom: 1px solid var(--border-light);
}
.tw-topbar .brand { display: flex; align-items: center; gap: 12px; }
.tw-topbar .brand img { height: 38px; }
.tw-topbar nav { display: flex; gap: 8px; align-items: center; }
.tw-topbar nav a.link {
    padding: 8px 14px; font-size: 13.5px; font-weight: 500;
    color: var(--ink-mid); border-radius: 6px;
    letter-spacing: 0.02em;
}
.tw-topbar nav a.link:hover { color: var(--forest); background: var(--forest-pale); }
.tw-topbar nav a.cta {
    padding: 9px 18px; font-size: 13px; font-weight: 600;
    background: var(--gold); color: #fff; border-radius: 6px;
    letter-spacing: 0.04em; text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(178, 142, 82, 0.35);
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.tw-topbar nav a.cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(178, 142, 82, 0.45); color: #fff; }
.tw-topbar nav a.mgr {
    padding: 8px 14px; font-size: 13px; font-weight: 500;
    border: 1px solid var(--forest); color: var(--forest);
    border-radius: 6px;
}
.tw-topbar nav a.mgr:hover { background: var(--forest); color: #fff; }

/* Hero */
.tw-hero {
    position: relative; overflow: hidden;
    padding: 110px 32px 130px;
    text-align: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(178,142,82,0.18), transparent 70%),
        linear-gradient(180deg, var(--forest) 0%, #173524 100%);
    color: var(--cream);
}
.tw-hero::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(transparent 0, transparent calc(100% - 1px), rgba(229, 201, 138, 0.06) calc(100% - 1px)),
        linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(229, 201, 138, 0.06) calc(100% - 1px));
    background-size: 44px 44px;
    pointer-events: none;
    mask: radial-gradient(ellipse 70% 60% at 50% 50%, #000 40%, transparent 95%);
    -webkit-mask: radial-gradient(ellipse 70% 60% at 50% 50%, #000 40%, transparent 95%);
}
.tw-hero .eyebrow {
    font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase;
    color: var(--gold-pale); margin-bottom: 18px; font-weight: 500;
}
.tw-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(44px, 7vw, 84px);
    line-height: 1.02; letter-spacing: 0.06em;
    color: var(--cream); font-weight: 600;
    margin: 0 0 20px;
}
.tw-hero h1 .accent { color: var(--gold-pale); }
.tw-hero .lede {
    max-width: 620px; margin: 0 auto 36px;
    font-size: 17px; line-height: 1.6;
    color: rgba(250, 247, 238, 0.85);
}
.tw-hero .hero-actions {
    display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
    position: relative; z-index: 2;
}
.tw-hero .btn-hero {
    padding: 14px 28px; border-radius: 6px;
    font-weight: 600; font-size: 14px;
    letter-spacing: 0.06em; text-transform: uppercase;
    transition: transform 120ms ease, box-shadow 120ms ease;
}
.tw-hero .btn-hero:hover { transform: translateY(-2px); }
.tw-hero .btn-hero.primary {
    background: var(--gold); color: #fff;
    box-shadow: 0 6px 24px rgba(178, 142, 82, 0.45);
}
.tw-hero .btn-hero.primary:hover { box-shadow: 0 10px 32px rgba(178, 142, 82, 0.55); color: #fff; }
.tw-hero .btn-hero.ghost {
    background: rgba(250, 247, 238, 0.06); color: var(--cream);
    border: 1px solid rgba(250, 247, 238, 0.3);
}
.tw-hero .btn-hero.ghost:hover { background: rgba(250, 247, 238, 0.14); color: var(--cream); }

/* Hero stats */
.tw-hero-stats {
    display: flex; justify-content: center; gap: 48px;
    margin-top: 56px; flex-wrap: wrap;
    position: relative; z-index: 2;
}
.tw-hero-stats .stat { text-align: center; }
.tw-hero-stats .stat .num {
    font-family: var(--font-display); font-size: 34px;
    color: var(--gold-pale); letter-spacing: 0.04em; font-weight: 600;
}
.tw-hero-stats .stat .lbl {
    font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
    color: rgba(250, 247, 238, 0.6); margin-top: 4px;
}

/* Portal entry cards */
.portal-entry-section {
    background: var(--cream);
    padding: 72px 32px 60px;
    position: relative; margin-top: -60px; z-index: 3;
}
.portal-entry-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px; max-width: 1080px; margin: 0 auto;
}
.portal-card {
    background: var(--paper);
    border-radius: 12px;
    padding: 36px 32px;
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 40px rgba(31, 69, 48, 0.08);
    display: flex; flex-direction: column; gap: 14px;
    text-decoration: none; color: var(--ink);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    position: relative; overflow: hidden;
}
.portal-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--gold);
}
.portal-card.rent::before     { background: linear-gradient(90deg, var(--gold), var(--gold-warm)); }
.portal-card.tenant::before   { background: linear-gradient(90deg, var(--forest-light), var(--forest-mid)); }
.portal-card.mgr::before      { background: linear-gradient(90deg, var(--forest), #0E2A1B); }
.portal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(31, 69, 48, 0.14);
    border-color: var(--gold);
    color: var(--ink);
}
.portal-card .pc-icon {
    width: 52px; height: 52px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--forest-pale); color: var(--forest);
    font-family: var(--font-display); font-size: 22px;
}
.portal-card.rent .pc-icon   { background: var(--gold-tint); color: var(--gold); }
.portal-card.tenant .pc-icon { background: var(--forest-pale); color: var(--forest); }
.portal-card.mgr .pc-icon    { background: var(--forest); color: var(--gold-pale); }
.portal-card .pc-label {
    font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--ink-muted); font-weight: 600;
}
.portal-card h3 {
    font-family: var(--font-display); font-size: 22px;
    color: var(--forest); letter-spacing: 0.04em; margin: 0;
}
.portal-card p {
    font-size: 14px; line-height: 1.6; color: var(--ink-mid); margin: 0;
}
.portal-card .pc-arrow {
    margin-top: 8px; color: var(--gold); font-weight: 600; font-size: 13px;
    letter-spacing: 0.06em; text-transform: uppercase;
    display: flex; align-items: center; gap: 8px;
}
.portal-card .pc-arrow::after { content: '→'; transition: transform 180ms ease; }
.portal-card:hover .pc-arrow::after { transform: translateX(4px); }
.portal-card .pc-features {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
    font-size: 13px; color: var(--ink-muted);
}
.portal-card .pc-features li::before {
    content: '✓'; color: var(--gold); font-weight: 700; margin-right: 8px;
}

/* Sizes section — refined */
.tw-section { padding: 80px 32px; max-width: 1200px; margin: 0 auto; }
.tw-section .section-eyebrow {
    text-align: center; font-size: 11px; letter-spacing: 0.28em;
    text-transform: uppercase; color: var(--gold);
    font-weight: 600; margin-bottom: 10px;
}
.tw-section h2 {
    text-align: center; font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 42px); color: var(--forest);
    letter-spacing: 0.04em; margin-bottom: 10px;
}
.tw-section .section-sub {
    text-align: center; max-width: 560px; margin: 0 auto 44px;
    color: var(--ink-muted); font-size: 15px;
}
.tw-size-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
}
.tw-size-card {
    background: var(--paper); border: 1px solid var(--border-light);
    border-radius: 10px; padding: 24px 20px; text-align: center;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
    display: flex; flex-direction: column; gap: 8px;
}
.tw-size-card:hover {
    transform: translateY(-3px); border-color: var(--gold);
    box-shadow: 0 14px 36px rgba(31, 69, 48, 0.1);
}
.tw-size-card .dim {
    font-family: var(--font-display); font-size: 24px;
    color: var(--forest); letter-spacing: 0.06em; font-weight: 600;
}
.tw-size-card .nm {
    font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-muted); font-weight: 500;
}
.tw-size-card .price {
    font-family: var(--font-display); font-size: 30px;
    color: var(--gold); margin-top: 8px;
}
.tw-size-card .price .per { font-size: 12px; color: var(--ink-muted); letter-spacing: 0.1em; }
.tw-size-card .avail {
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--success); margin-top: 4px;
}
.tw-size-card .avail.none { color: var(--ink-faint); }
.tw-size-card button {
    margin-top: 14px; padding: 10px 16px;
    background: var(--forest); color: #fff;
    border: 0; border-radius: 6px; cursor: pointer;
    font-weight: 600; font-size: 12px; letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 120ms ease;
}
.tw-size-card button:hover { background: var(--forest-mid); }
.tw-size-card button:disabled { background: var(--ink-faint); cursor: not-allowed; }

/* Features row */
.tw-feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}
.tw-feature {
    text-align: center; padding: 10px 6px;
}
.tw-feature .ico {
    width: 56px; height: 56px; margin: 0 auto 14px;
    border-radius: 50%; background: var(--gold-tint); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 20px; font-weight: 600;
}
.tw-feature h4 {
    font-family: var(--font-display); font-size: 16px;
    color: var(--forest); letter-spacing: 0.04em; margin-bottom: 6px;
}
.tw-feature p { color: var(--ink-muted); font-size: 13.5px; line-height: 1.6; }

/* Contact panel */
.tw-contact {
    max-width: 640px; margin: 0 auto;
    background: var(--paper); border-radius: 12px;
    padding: 36px; border: 1px solid var(--border-light);
    box-shadow: 0 8px 28px rgba(31, 69, 48, 0.06);
}
.tw-contact .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tw-contact .form-group label {
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-muted); font-weight: 600; display: block; margin-bottom: 6px;
}
.tw-contact input, .tw-contact textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: 6px;
    background: var(--cream); font: inherit; color: var(--ink);
}
.tw-contact input:focus, .tw-contact textarea:focus {
    outline: none; border-color: var(--gold); background: #fff;
}
.tw-contact button {
    margin-top: 18px; width: 100%; padding: 14px;
    background: var(--forest); color: #fff; border: 0; border-radius: 6px;
    font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
    cursor: pointer; transition: background 120ms ease;
}
.tw-contact button:hover { background: var(--forest-mid); }

/* Footer */
.tw-footer {
    background: var(--forest); color: rgba(250, 247, 238, 0.8);
    padding: 48px 32px 36px; text-align: center;
}
.tw-footer .brand-line {
    font-family: var(--font-display); font-size: 20px;
    color: var(--gold-pale); letter-spacing: 0.18em; margin-bottom: 12px;
}
.tw-footer .foot-links {
    margin-top: 14px; font-size: 13px;
    display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
}
.tw-footer .foot-links a { color: var(--gold-pale); }
.tw-footer .foot-links a:hover { color: #fff; }
.tw-footer .legal {
    margin-top: 22px; font-size: 11px;
    color: rgba(250, 247, 238, 0.4); letter-spacing: 0.06em;
}

@media (max-width: 600px) {
    .tw-topbar { padding: 12px 18px; }
    .tw-topbar nav a.link { display: none; }
    .tw-contact .form-grid { grid-template-columns: 1fr; }
    .journey-strip { grid-template-columns: 1fr; }
}

/* ==========================================================
   Tenant Portal v2 — Cubby-parity expansion
   ========================================================== */

.tp-shell { max-width: 1100px; margin: 0 auto; padding: 24px 28px 60px; }

/* Tab nav */
.tp-tabnav {
    position: sticky; top: 64px; z-index: 20;
    background: var(--cream);
    margin: 0 -28px 24px; padding: 0 28px;
    border-bottom: 1px solid var(--border-light);
    display: flex; gap: 4px; overflow-x: auto;
    scrollbar-width: none;
}
.tp-tabnav::-webkit-scrollbar { display: none; }
.tp-tabnav a {
    padding: 14px 18px; font-size: 13px; font-weight: 500;
    color: var(--ink-muted); border-bottom: 3px solid transparent;
    white-space: nowrap; letter-spacing: 0.02em;
    transition: color 120ms ease, border-color 120ms ease;
}
.tp-tabnav a:hover { color: var(--forest); }
.tp-tabnav a.active {
    color: var(--forest); border-bottom-color: var(--gold); font-weight: 600;
}

/* Tab panels */
.tp-tab-panel { display: none; }
.tp-tab-panel.active { display: block; }

/* Panel variants */
.tp-card {
    background: var(--paper);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(31, 69, 48, 0.04);
}
.tp-card h3 {
    font-family: var(--font-display); font-size: 16px;
    color: var(--forest); letter-spacing: 0.06em;
    margin-bottom: 14px; font-weight: 600;
}
.tp-card .card-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border-light);
}
.tp-card .card-row:last-child { border-bottom: 0; }
.tp-card .card-row .label { font-size: 13px; color: var(--ink-muted); }
.tp-card .card-row .value { font-weight: 500; color: var(--ink); }

/* Toggle switch */
.tp-toggle {
    position: relative; display: inline-block;
    width: 44px; height: 24px; cursor: pointer;
}
.tp-toggle input { display: none; }
.tp-toggle .slider {
    position: absolute; inset: 0;
    background: var(--border); border-radius: 24px;
    transition: background 180ms ease;
}
.tp-toggle .slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; top: 3px; left: 3px;
    background: #fff; border-radius: 50%;
    transition: transform 180ms ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.tp-toggle input:checked + .slider { background: var(--forest); }
.tp-toggle input:checked + .slider::before { transform: translateX(20px); }

/* Big gate-code display */
.tp-gate-card {
    background: var(--forest); color: var(--cream);
    padding: 28px; border-radius: 10px; text-align: center;
}
.tp-gate-card .hint {
    font-size: 11px; letter-spacing: 0.22em;
    text-transform: uppercase; color: var(--gold-pale);
}
.tp-gate-card .code {
    font-family: var(--font-display); font-size: 44px;
    color: #fff; letter-spacing: 0.3em; margin: 12px 0 4px;
}
.tp-gate-card .unit {
    font-size: 13px; color: rgba(250,247,238,0.7);
    letter-spacing: 0.1em; text-transform: uppercase;
}
.tp-gate-card .actions { margin-top: 18px; display: flex; justify-content: center; gap: 10px; }
.tp-gate-card .actions button {
    background: rgba(250,247,238,0.12); color: var(--cream);
    border: 1px solid rgba(250,247,238,0.3);
    padding: 8px 16px; border-radius: 6px; font-size: 12px;
    letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}

/* Unit list (for multi-lease tenants) */
.tp-unit-list { display: grid; gap: 10px; }
.tp-unit-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 16px; border: 1px solid var(--border-light);
    border-radius: 8px; background: var(--ivory);
    cursor: pointer; transition: border-color 120ms ease;
}
.tp-unit-item:hover { border-color: var(--gold); }
.tp-unit-item.active { border-color: var(--forest); background: var(--forest-pale); }
.tp-unit-item .unit-num { font-family: var(--font-display); font-size: 20px; color: var(--forest); font-weight: 600; }
.tp-unit-item .unit-meta { font-size: 12px; color: var(--ink-muted); }

/* Insurance card */
.tp-plan {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    gap: 12px; margin-top: 12px;
}
.tp-plan-option {
    border: 2px solid var(--border-light); border-radius: 8px;
    padding: 16px 14px; text-align: center; cursor: pointer;
    transition: border-color 120ms ease, background 120ms ease;
}
.tp-plan-option:hover { border-color: var(--gold); }
.tp-plan-option.selected { border-color: var(--forest); background: var(--forest-pale); }
.tp-plan-option .tier {
    font-family: var(--font-display); font-size: 14px;
    color: var(--forest); letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 4px;
}
.tp-plan-option .coverage { font-size: 20px; color: var(--ink); font-weight: 600; }
.tp-plan-option .cost { font-size: 13px; color: var(--gold); margin-top: 4px; }

/* Referral panel */
.tp-referral-code {
    display: inline-block; padding: 8px 14px;
    background: var(--gold-tint); color: var(--forest);
    font-family: monospace; font-size: 16px; letter-spacing: 0.12em;
    border-radius: 6px; font-weight: 700;
}

/* Authorized users rows */
.tp-auth-user {
    display: grid; grid-template-columns: 1fr auto auto;
    gap: 12px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border-light);
}
.tp-auth-user:last-child { border-bottom: 0; }

/* Document row */
.tp-doc-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border-light);
}
.tp-doc-row:last-child { border-bottom: 0; }
.tp-doc-row .doc-meta { display: flex; gap: 10px; align-items: center; }
.tp-doc-row .doc-icon {
    width: 36px; height: 36px; border-radius: 6px;
    background: var(--gold-tint); color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 14px; font-weight: 600;
}

/* Section grid for 2-col layouts */
.tp-grid-2 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 720px) {
    .tp-grid-2 { grid-template-columns: 1fr; }
    .tp-plan { grid-template-columns: 1fr; }
}

/* ==================== Rental Application Wizard ==================== */

/* Steps bar */
.app-steps-bar {
    display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 20px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.app-step {
    display: flex; align-items: center; gap: 6px; padding: 10px 14px;
    font-size: 12px; color: var(--ink-faint); white-space: nowrap; border-bottom: 3px solid transparent;
    margin-bottom: -2px; transition: all 0.2s;
}
.app-step .num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 600;
    background: var(--border); color: var(--ink-faint);
}
.app-step .lbl { display: none; }
.app-step.active { color: var(--forest, #1F4530); border-bottom-color: var(--gold, #B28E52); }
.app-step.active .num { background: var(--gold, #B28E52); color: #fff; }
.app-step.active .lbl { display: inline; font-weight: 600; }
.app-step.done { color: var(--forest, #1F4530); border-bottom-color: var(--forest, #1F4530); }
.app-step.done .num { background: var(--forest, #1F4530); color: #fff; font-size: 13px; }

@media (min-width: 800px) {
    .app-step .lbl { display: inline; }
    .app-step { padding: 10px 10px; font-size: 12.5px; }
}

/* Section titles */
.app-section-title {
    font-family: 'Cinzel', serif; font-size: 18px; color: var(--forest, #1F4530);
    margin: 0 0 8px; padding: 0;
}
.app-subsection {
    font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 600;
    color: var(--forest, #1F4530); margin: 20px 0 8px; padding-top: 16px;
    border-top: 1px solid var(--border);
}
.app-hint { font-size: 13px; color: var(--ink-muted); margin: 4px 0 12px; line-height: 1.5; }
.app-step1-section-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--ink-muted);
    margin: 6px 0 10px;
}
.app-unit-list { max-height: 220px; overflow-y: auto; margin-top: 4px; }
.app-unit-summary {
    background: var(--forest, #1F4530); color: var(--cream, #FAF7EE); padding: 10px 16px;
    border-radius: 8px; font-size: 14px; font-weight: 600; margin-bottom: 20px;
    letter-spacing: 0.02em;
}

/* Lease terms cards */
.app-terms-section { display: flex; flex-direction: column; gap: 12px; }
.app-term-card {
    background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 16px;
}
.app-term-card h4 {
    margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--forest, #1F4530);
    font-family: 'Inter', sans-serif;
}
.app-term-card p { margin: 4px 0; font-size: 13px; color: var(--ink-mid); line-height: 1.55; }
.app-lien-notice {
    background: #fff3cd; border: 1px solid #e0c97a; border-radius: 6px; padding: 12px;
    font-size: 12px; font-weight: 600; color: #7c5e00; line-height: 1.5;
}
.app-initial-check {
    display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px;
    border-top: 1px dashed var(--border); font-size: 13px; color: var(--forest); cursor: pointer;
}
.app-initial-check input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--forest, #1F4530);
}

/* Insurance options */
.app-insurance-options { display: flex; flex-direction: column; gap: 12px; }
.app-ins-opt {
    border: 2px solid var(--border); border-radius: 10px; padding: 16px;
    background: var(--paper); transition: border-color 0.2s, background 0.2s;
}
.app-ins-opt.selected { border-color: var(--forest, #1F4530); background: var(--cream-alt); }
.app-ins-opt label { cursor: pointer; font-size: 14px; }
.app-ins-opt input[type="radio"] { accent-color: var(--forest, #1F4530); margin-right: 6px; }
.app-coverage-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-left: 24px; }
.app-cov-choice {
    display: flex; align-items: center; gap: 8px; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.app-cov-choice.selected { background: var(--forest, #1F4530); color: #fff; border-color: var(--forest); }
.app-cov-choice.selected strong { color: var(--gold, #B28E52); }
.app-cov-choice input[type="radio"] { accent-color: var(--gold, #B28E52); }
.app-decline-warning {
    background: #fff3cd; border: 1px solid #e0c97a; border-radius: 6px; padding: 12px;
    font-size: 12px; color: #7c5e00; line-height: 1.5;
}
.hidden { display: none !important; }

/* Addendums */
.app-addendum-section { display: flex; flex-direction: column; gap: 16px; }
.app-addendum-q {
    background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px;
}
.app-addendum-q .q-text { font-size: 13.5px; color: var(--ink-mid); margin-bottom: 8px; }
.app-addendum-q .q-options { display: flex; gap: 20px; }
.app-addendum-q .q-options label { font-size: 13px; cursor: pointer; }
.app-addendum-q .q-options input[type="radio"] { accent-color: var(--forest, #1F4530); margin-right: 4px; }

/* Review grid */
.app-review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
@media (max-width: 600px) { .app-review-grid { grid-template-columns: 1fr; } }
.app-review-card {
    background: var(--cream); border: 1px solid var(--border); border-radius: 8px; padding: 14px;
}
.app-review-card h4 {
    margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--gold, #B28E52); font-weight: 700;
}
.app-review-card div { font-size: 13px; color: var(--ink-mid); line-height: 1.5; }

/* Legal box */
.app-legal-box {
    background: var(--cream-alt); border: 1px solid var(--border); border-radius: 8px; padding: 18px;
    margin-bottom: 20px; max-height: 180px; overflow-y: auto;
}
.app-legal-box p { font-size: 12.5px; color: var(--ink-mid); line-height: 1.55; margin: 6px 0; }

/* E-sign area */
.app-esign-area { margin-top: 4px; }
.app-esign-box {
    border: 2px dashed var(--border); border-radius: 10px; padding: 28px 20px;
    text-align: center; background: var(--paper); transition: all 0.3s;
}
.app-esign-box.signed {
    border-color: var(--forest, #1F4530); border-style: solid; background: var(--forest-pale);
}
.app-esign-box .sig-prompt { font-size: 14px; color: var(--ink-faint); }
.app-esign-box .sig-mark { font-size: 32px; color: var(--forest, #1F4530); }
.app-esign-box .sig-name {
    font-family: 'Cinzel', serif; font-size: 24px; color: var(--forest, #1F4530);
    margin-top: 4px;
}
.app-esign-box .sig-date { font-size: 12px; color: var(--ink-muted); margin-top: 6px; }

/* Cost breakdown */
.app-cost-breakdown {
    background: var(--cream); border: 1px solid var(--border); border-radius: 10px; padding: 16px;
}
.cost-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: var(--ink-mid); }
.cost-row + .cost-row { border-top: 1px solid var(--border); }
.cost-row.total {
    border-top: 2px solid var(--forest, #1F4530); margin-top: 4px; padding-top: 12px;
    font-size: 18px; font-weight: 700; color: var(--forest, #1F4530);
}

/* Confirmation */
.app-confirmation { text-align: center; padding: 10px 0; }
.app-conf-icon {
    width: 60px; height: 60px; border-radius: 50%; background: var(--forest, #1F4530);
    color: #fff; font-size: 28px; display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.app-confirmation h3 {
    font-family: 'Cinzel', serif; color: var(--forest, #1F4530); font-size: 22px; margin: 0 0 8px;
}
.app-gate-reveal {
    background: var(--forest, #1F4530); color: var(--cream, #FAF7EE); border-radius: 12px;
    padding: 24px; margin: 20px auto; max-width: 320px;
}
.app-gate-reveal .gate-label { font-size: 12px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.08em; }
.app-gate-reveal .gate-code {
    font-family: 'Cinzel', serif; font-size: 42px; font-weight: 700;
    color: var(--gold, #B28E52); margin: 8px 0;
}
.app-gate-reveal .gate-unit { font-size: 14px; opacity: 0.85; }
.app-conf-details {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    max-width: 400px; margin: 20px auto; text-align: left;
}
.app-conf-details .detail {
    display: flex; flex-direction: column; background: #faf7ee;
    border-radius: 8px; padding: 10px 14px; font-size: 13px;
}
.app-conf-details .detail span { font-size: 11px; color: #7a7160; text-transform: uppercase; letter-spacing: 0.05em; }
.app-conf-details .detail strong { color: var(--forest, #1F4530); margin-top: 2px; }
