/* ==========================================================================
   Bastions Business Consultants Portal - Design System

   Two palettes coexist:
   - Public palette (--pub-*): light, navy/gold, matches bastions.co.za.
     Used by the landing hub, avenue placeholder pages and login.
   - Dashboard palette (--bg/--accent/etc): dark analytics theme. Used only
     by the authenticated BSPB dashboard (app-shell + sidebar).
   ========================================================================== */

:root {
    /* ---- Public brand (from bastions.co.za) ---- */
    --pub-bg: #ffffff;
    --pub-navy: #00244d;
    --pub-navy-deep: #001830;
    --pub-navy-soft: rgba(0, 36, 77, 0.06);
    --pub-navy-border: rgba(0, 36, 77, 0.18);
    --pub-gold: #c9a227;
    --pub-gold-bright: #e0bc4a;
    --pub-gold-soft: rgba(201, 162, 39, 0.14);
    --pub-text: #14202f;
    --pub-text-secondary: #4d5b6c;
    --pub-text-muted: #8590a0;
    --pub-border: #e3e7ee;
    --pub-font-heading: 'Poppins', 'Inter', sans-serif;

    --bg: #0a0d13;
    --bg-elevated: #10141d;
    --bg-card: #151a25;
    --bg-card-hover: #1a2130;
    --border: #232a3a;
    --border-soft: #1a2030;

    --text-primary: #eef1f7;
    --text-secondary: #9aa5ba;
    --text-muted: #5f6a80;

    --accent: #d4a542;
    --accent-bright: #eec06a;
    --accent-soft: rgba(212, 165, 66, 0.12);
    --accent-border: rgba(212, 165, 66, 0.35);

    --positive: #3ecf8e;
    --positive-soft: rgba(62, 207, 142, 0.12);

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--pub-bg);
    color: var(--pub-text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---- Flash messages ---- */
.flash-stack {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
}
.flash {
    background: var(--bg-card);
    border: 1px solid var(--accent-border);
    color: var(--text-primary);
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    animation: slidein 0.25s ease-out;
}
@keyframes slidein {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   Authenticated app shell (sidebar + content)
   ========================================================================== */

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text-primary);
}

.sidebar {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    padding: 28px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 28px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-soft);
}
.brand-mark {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}
.brand-text .name {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.brand-text .sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.shop-switcher {
    padding: 14px 12px;
    margin-bottom: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.shop-switcher label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.shop-switcher select {
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.84rem;
}
.shop-switcher-note {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 8px 0 0;
    line-height: 1.4;
}

.nav-section-label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 12px;
    margin: 6px 0 10px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    border-left: 2px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-link svg { flex-shrink: 0; opacity: 0.85; }
.nav-link:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}
.nav-link.active {
    background: var(--accent-soft);
    color: var(--accent-bright);
    border-left-color: var(--accent);
}
.nav-link.active svg { opacity: 1; }

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-bright);
    flex-shrink: 0;
}
.user-name {
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logout-btn {
    color: var(--text-muted);
    display: flex;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease;
}
.logout-btn:hover { color: var(--text-primary); background: var(--bg-card); }

.content {
    padding: 40px 48px;
    max-width: 1160px;
    min-width: 0;
}

.page-header {
    margin-bottom: 32px;
}
.page-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}
.page-title {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}
.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
}

/* ---- Stat strip ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 36px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0.6;
}
.stat-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ---- Cards / panels ---- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* ---- Subsection headings + recent-reports grid ---- */
.subsection-heading {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text-primary);
    margin: 32px 0 14px;
}
.subsection-heading .muted {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.recent-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}
.recent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    min-width: 0;
}
.recent-card-title {
    font-size: 0.85rem;
    font-weight: 650;
    color: var(--accent-bright);
    margin-bottom: 8px;
}
.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.action-card:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}
.action-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    color: var(--accent-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.action-card h3 {
    font-size: 1.05rem;
    margin: 0 0 6px;
    font-weight: 650;
}
.action-card p {
    color: var(--text-secondary);
    font-size: 0.87rem;
    margin: 0 0 18px;
    line-height: 1.5;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn:hover { border-color: var(--accent-border); color: var(--accent-bright); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    border-color: transparent;
    color: #14110a;
}
.btn-primary:hover { color: #14110a; filter: brightness(1.06); }
.btn-block { width: 100%; justify-content: center; }

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}
.empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent-bright);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state h3 {
    font-size: 1.1rem;
    margin: 0 0 8px;
    font-weight: 650;
}
.empty-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ---- Dashboard-area status pills (engines) ---- */
.action-card .status-pill,
.empty-state .status-pill,
.engine-banner-title .status-pill,
.contact-table .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    width: fit-content;
    margin-bottom: 12px;
}
.engine-banner-title .status-pill,
.contact-table .status-pill { margin: 0 0 0 8px; }
.status-pill.local {
    background: var(--positive-soft);
    color: var(--positive);
}
.status-pill.in_development {
    background: var(--accent-soft);
    color: var(--accent-bright);
}

/* ---- Engine toggle (segmented control) ---- */
.engine-toggle {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    margin-bottom: 20px;
}
.engine-toggle a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: background 0.15s ease, color 0.15s ease;
}
.engine-toggle a:hover { color: var(--text-primary); }
.engine-toggle a.active {
    background: var(--accent-soft);
    color: var(--accent-bright);
}

/* ---- Engine banner: which engine's reports you're viewing ---- */
.engine-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
}
.engine-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.engine-banner-body { flex: 1; min-width: 0; }
.engine-banner-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}
.engine-banner-title h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}
.engine-banner-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ---- Sample-data banner ---- */
.sample-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border: 1px solid var(--accent-border);
    background: var(--accent-soft);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    font-size: 0.87rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
.sample-banner svg { flex-shrink: 0; color: var(--accent-bright); margin-top: 2px; }
.sample-banner strong { color: var(--text-primary); }

/* ---- Contact directory table ---- */
.contact-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    margin-bottom: 8px;
}
.contact-table {
    width: 100%;
    border-collapse: collapse;
}
.contact-table th {
    text-align: left;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.contact-table td {
    padding: 14px 20px;
    font-size: 0.87rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    white-space: nowrap;
}
.contact-table tr:last-child td { border-bottom: none; }
.contact-table tr:hover td { background: var(--bg-card-hover); }
.contact-table td:first-child { color: var(--text-primary); font-weight: 600; }
.contact-table code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-bright);
    background: var(--accent-soft);
    padding: 2px 8px;
    border-radius: 6px;
}

/* ---- Report explorer (nested folders) ---- */
.report-tree { display: flex; flex-direction: column; gap: 10px; }
.report-folder {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    overflow: hidden;
}
.report-folder > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    font-weight: 600;
    font-size: 0.92rem;
    user-select: none;
}
.report-folder > summary::-webkit-details-marker { display: none; }
.report-folder > summary .chevron {
    transition: transform 0.15s ease;
    color: var(--text-muted);
}
.report-folder[open] > summary .chevron { transform: rotate(90deg); }
.report-folder > summary .folder-icon { color: var(--accent-bright); }
.report-folder > summary .count {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
}
.folder-contents {
    padding: 4px 14px 12px 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.report-folder .report-folder {
    background: var(--bg-elevated);
}
.file-list {
    padding: 6px 0 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.file-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
}
.file-row:hover { background: var(--bg-card-hover); }
.file-row .file-icon { color: var(--text-muted); flex-shrink: 0; }
.file-row .file-info { flex: 1; min-width: 0; }
.file-row .file-title { font-size: 0.86rem; color: var(--text-primary); }
.file-row .file-name {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-row .file-status {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ==========================================================================
   Login screen
   ========================================================================== */

.login-shell {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    min-height: 100vh;
}

.login-hero {
    position: relative;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(circle at 15% 15%, rgba(212,165,66,0.10), transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(62,207,142,0.06), transparent 40%),
        var(--bg-elevated);
    border-right: 1px solid var(--border-soft);
    overflow: hidden;
}
.login-hero-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.login-hero-body {
    max-width: 460px;
}
.login-hero-body .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 18px;
}
.login-hero-body h1 {
    font-size: 2.4rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin: 0 0 18px;
}
.login-hero-body h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent-bright), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.login-hero-body p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}
.chart-decoration {
    margin-top: 8px;
}
.login-hero-footer {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.login-card {
    width: 100%;
    max-width: 380px;
}
.login-card h2 {
    font-size: 1.4rem;
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.login-card .lead {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin: 0 0 28px;
}

.field {
    margin-bottom: 18px;
}
.field label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 7px;
    font-weight: 500;
}
.field input {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.92rem;
    font-family: var(--font);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus {
    outline: none;
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder { color: var(--text-muted); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .card-grid, .stat-grid, .recent-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        padding: 14px 16px;
        overflow-x: auto;
        gap: 16px;
    }
    .brand {
        border-bottom: none;
        padding: 0 16px 0 0;
        margin-bottom: 0;
        margin-right: 0;
        flex-shrink: 0;
    }
    .brand-text .sub { display: none; }
    .nav-section-label { display: none; }
    .shop-switcher {
        flex-shrink: 0;
        padding: 6px 10px;
        margin-bottom: 0;
    }
    .shop-switcher label,
    .shop-switcher-note { display: none; }
    .shop-switcher select { width: auto; }
    .nav-links {
        flex-direction: row;
        flex-shrink: 0;
    }
    .nav-link { white-space: nowrap; }
    .sidebar-footer {
        margin-top: 0;
        margin-left: auto;
        border-top: none;
        padding-top: 0;
        padding-left: 16px;
        flex-shrink: 0;
    }
    .content { padding: 28px 20px; }
    .stat-grid, .card-grid, .recent-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Public site (header, hero, avenue grid, avenue pages, login)
   ========================================================================== */

.pub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 48px;
    border-bottom: 1px solid var(--pub-border);
}
.pub-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pub-logo img {
    height: 36px;
    width: 36px;
    object-fit: contain;
    display: block;
}
.pub-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.pub-logo-text .name {
    font-family: var(--pub-font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--pub-navy);
    letter-spacing: 0.02em;
}
.pub-logo-text .sub {
    font-size: 0.63rem;
    color: var(--pub-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.pub-header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}
.pub-header-user {
    font-size: 0.88rem;
    color: var(--pub-text-secondary);
}
.pub-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1.6px solid var(--pub-navy);
    color: var(--pub-navy);
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease;
}
.pub-btn:hover { background: var(--pub-navy); color: #fff; }
.pub-btn-solid {
    background: var(--pub-navy);
    color: #fff;
    border-color: var(--pub-navy);
}
.pub-btn-solid:hover { background: var(--pub-navy-deep); color: #fff; }
.pub-link-muted {
    font-size: 0.85rem;
    color: var(--pub-text-secondary);
}
.pub-link-muted:hover { color: var(--pub-navy); }

/* ---- Intro (title + slogan) ---- */
.pub-intro {
    text-align: center;
    padding: 56px 48px 40px;
}
.pub-intro h1 {
    font-family: var(--pub-font-heading);
    font-size: 2.3rem;
    color: var(--pub-navy);
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}
.pub-slogan {
    color: var(--pub-text-secondary);
    font-size: 1.05rem;
    margin: 0;
}

/* ---- Avenue grid ---- */
.pub-section {
    padding: 0 48px 64px;
    max-width: 1180px;
    margin: 0 auto;
}

/* ---- Belief statement ---- */
.pub-belief {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 48px 72px;
    text-align: center;
}
.pub-belief p {
    color: var(--pub-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

.avenue-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.avenue-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pub-border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.avenue-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0,36,77,0.10);
    border-color: var(--pub-navy-border);
}
.avenue-media {
    height: 150px;
    background: var(--pub-navy-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.avenue-media img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.avenue-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.avenue-body h3 {
    font-family: var(--pub-font-heading);
    font-size: 1.05rem;
    color: var(--pub-navy);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}
.avenue-body p {
    color: var(--pub-text-secondary);
    font-size: 0.87rem;
    line-height: 1.55;
    margin: 0 0 16px;
    flex: 1;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 999px;
    width: fit-content;
    margin-bottom: 14px;
}
.status-pill.external {
    background: var(--pub-navy-soft);
    color: var(--pub-navy);
}
.status-pill.login {
    background: var(--pub-gold-soft);
    color: #8a6d10;
}
.status-pill.available {
    background: rgba(62, 207, 142, 0.12);
    color: #1f8a5c;
}
.avenue-card .pub-btn { align-self: flex-start; }

/* ---- Footer ---- */
.pub-footer {
    border-top: 1px solid var(--pub-border);
    padding: 24px 48px;
    text-align: center;
    color: var(--pub-text-muted);
    font-size: 0.82rem;
}

/* ---- Public login ---- */
.pub-login-shell {
    min-height: calc(100vh - 82px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(circle at 85% 15%, rgba(201,162,39,0.07), transparent 40%),
        var(--pub-bg);
}
.pub-login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border: 1px solid var(--pub-border);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px rgba(0,36,77,0.08);
}
.pub-login-card h2 {
    font-family: var(--pub-font-heading);
    color: var(--pub-navy);
    font-size: 1.4rem;
    margin: 0 0 6px;
}
.pub-login-card .lead {
    color: var(--pub-text-secondary);
    font-size: 0.88rem;
    margin: 0 0 26px;
}
.pub-field { margin-bottom: 18px; }
.pub-field label {
    display: block;
    font-size: 0.8rem;
    color: var(--pub-text-secondary);
    margin-bottom: 7px;
    font-weight: 500;
}
.pub-field input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1.4px solid var(--pub-border);
    background: #fbfcfe;
    color: var(--pub-text);
    font-size: 0.92rem;
    font-family: var(--font);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.pub-field input:focus {
    outline: none;
    border-color: var(--pub-navy);
    box-shadow: 0 0 0 3px var(--pub-navy-soft);
}
@media (max-width: 900px) {
    .avenue-grid { grid-template-columns: 1fr 1fr; }
    .pub-intro { padding: 40px 24px 32px; }
    .pub-intro h1 { font-size: 1.9rem; }
    .pub-header { padding: 16px 20px; }
    .pub-section { padding: 0 20px 48px; }
    .pub-belief { padding: 0 24px 56px; }
}
@media (max-width: 620px) {
    .avenue-grid { grid-template-columns: 1fr; }
}
