/* ============================================================
   PropFlow CRM — Top Navigation Layout Styles (v4)
   Companion to _TopNav_Layout.cshtml
   Free to use, modify, and distribute. No license restrictions.
   ============================================================ */

/* ── Import shared font faces (reuse from propflow.css) ── */
/* NOTE: propflow.css is loaded before this file — fonts already declared */

/* ── Layout root vars (override sidebar vars) ── */
:root {
    --topnav-h: 60px; /* main navbar height */
    --subnav-h: 44px; /* optional secondary nav strip height */
    --tn-transition: 0.2s ease;
    --tn-dropdown-w: 220px;
    --tn-radius: 10px;
}

/* ── Full-width main — no left margin ── */
#tn-main {
    margin-left: 0 !important;
    margin-top: calc(var(--topnav-h) + var(--safe-top));
    min-height: calc(100vh - var(--topnav-h) - var(--safe-top));
    padding: 28px 32px;
    padding-bottom: calc(28px + var(--safe-bottom));
    transition: background var(--tn-transition);
}

/* ════════════════════════════════════════
   TOP NAVBAR
   ════════════════════════════════════════ */
#topnav {
    position: fixed;
    top: var(--safe-top);
    left: 0;
    right: 0;
    height: var(--topnav-h);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: background var(--tn-transition), border-color var(--tn-transition);
}

/* Brand */
.tn-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
    padding-right: 28px;
    border-right: 1px solid var(--border);
    margin-right: 6px;
    height: 100%;
}

.tn-brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.tn-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.3px;
}

.tn-brand-sub {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: .5px;
    margin-top: -2px;
}

/* ── Nav items container ── */
#tn-nav-items {
    display: flex;
    align-items: stretch;
    flex: 1;
    height: 100%;
    overflow: visible;
}

/* ── Nav item (top-level) ── */
.tn-item {
    position: relative;
    display: flex;
    align-items: center;
}

.tn-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 100%;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--tn-transition);
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: 'Outfit', sans-serif;
}

    .tn-link:hover {
        color: var(--text-primary);
        background: var(--bg-hover);
    }

    .tn-link.active {
        color: var(--accent-light);
        border-bottom-color: var(--accent);
    }

    .tn-link .tn-icon {
        font-size: 15px;
    }

    .tn-link .tn-badge {
        font-size: 10px;
        font-weight: 700;
        padding: 1px 6px;
        border-radius: 10px;
        background: var(--danger);
        color: #fff;
    }

    .tn-link .tn-chevron {
        font-size: 11px;
        color: var(--text-muted);
        transition: transform var(--tn-transition);
        margin-left: 2px;
    }

.tn-item.open > .tn-link .tn-chevron {
    transform: rotate(180deg);
}

/* ── Mega / dropdown ── */
.tn-dropdown {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    min-width: var(--tn-dropdown-w);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0 var(--tn-radius) var(--tn-radius) var(--tn-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
    padding: 6px 0;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    pointer-events: none;
}

.tn-item.open > .tn-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: all;
}
/* dropdown section label */
.tn-dd-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 16px 4px;
}
/* dropdown link */
.tn-dd-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--tn-transition);
    border-left: 3px solid transparent;
    min-height: 40px;
    white-space: nowrap;
}

    .tn-dd-link:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
        border-left-color: var(--border-light);
    }

    .tn-dd-link.active {
        color: var(--accent-light);
        background: color-mix(in srgb, var(--accent) 8%, transparent);
        border-left-color: var(--accent);
    }

@supports not (color: color-mix(in srgb,red,blue)) {
    .tn-dd-link.active {
        background: rgba(45,125,210,.08);
    }
}

.tn-dd-link .dd-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.tn-dd-link .dd-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    flex-shrink: 0;
}

.tn-dd-divider {
    border-top: 1px solid var(--border);
    margin: 4px 0;
}

/* Wide / multi-column dropdown */
.tn-dropdown.wide {
    min-width: 480px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 12px;
    gap: 0;
    border-radius: var(--tn-radius);
}

    .tn-dropdown.wide .tn-dd-col {
        display: flex;
        flex-direction: column;
    }

    .tn-dropdown.wide .tn-dd-col-title {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: var(--text-muted);
        padding: 4px 10px 6px;
        border-bottom: 1px solid var(--border);
        margin-bottom: 4px;
    }

    .tn-dropdown.wide .tn-dd-link {
        border-radius: 6px;
        border-left: none;
        padding: 8px 10px;
    }

        .tn-dropdown.wide .tn-dd-link:hover {
            border-left: none;
        }

        .tn-dropdown.wide .tn-dd-link.active {
            border-left: none;
        }

/* ── Right side of topnav ── */
.tn-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
    padding-left: 16px;
}

.tn-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--tn-transition);
    position: relative;
    font-size: 15px;
}

    .tn-btn:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
        border-color: var(--border-light);
    }

.tn-notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    border: 1.5px solid var(--bg-surface);
}

.tn-theme {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: all var(--tn-transition);
}

    .tn-theme:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

.tn-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.tn-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    width: 220px;
    transition: width .25s ease, border-color var(--tn-transition);
}

    .tn-search:focus-within {
        border-color: var(--accent);
        width: 280px;
    }

    .tn-search input {
        background: none;
        border: none;
        outline: none;
        color: var(--text-primary);
        font-size: 13px;
        font-family: 'Outfit', sans-serif;
        width: 100%;
        min-width: 0;
    }

        .tn-search input::placeholder {
            color: var(--text-muted);
        }

/* ════════════════════════════════════════
   MOBILE HAMBURGER & DRAWER
   ════════════════════════════════════════ */
#tn-hamburger {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: none;
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    margin-right: 8px;
    transition: all var(--tn-transition);
    flex-shrink: 0;
}

    #tn-hamburger:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

/* Overlay */
#tn-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay);
    z-index: 1080;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .25s ease;
}

    #tn-overlay.active {
        display: block;
        opacity: 1;
    }

/* Mobile drawer slides in from left */
#tn-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    z-index: 1090;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding-bottom: var(--safe-bottom);
    display: flex;
    flex-direction: column;
}

    #tn-drawer.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,.3);
    }

/* Drawer header */
.tn-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.tn-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-hover);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
}

/* Drawer flat nav items */
.tn-drawer-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 20px 5px;
}

.tn-drawer-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: all var(--tn-transition);
    min-height: 44px;
}

    .tn-drawer-link:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

    .tn-drawer-link.active {
        color: var(--accent-light);
        background: var(--bg-hover);
        border-left-color: var(--accent);
    }

    .tn-drawer-link .dr-icon {
        font-size: 16px;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
    }

    .tn-drawer-link .dr-badge {
        margin-left: auto;
        font-size: 10px;
        font-weight: 700;
        padding: 1px 6px;
        border-radius: 10px;
        background: var(--danger);
        color: #fff;
    }

/* Drawer expandable group */
.tn-drawer-group {
}

.tn-drawer-group-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    transition: all var(--tn-transition);
    min-height: 44px;
    user-select: none;
}

    .tn-drawer-group-header:hover {
        background: var(--bg-hover);
        color: var(--text-primary);
    }

.tn-drawer-group.has-active .tn-drawer-group-header {
    color: var(--accent-light);
    background: var(--bg-hover);
    border-left: 3px solid var(--accent);
}

.tn-drawer-group-header .dr-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.tn-drawer-group-chevron {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform .22s ease;
    margin-left: auto;
}

.tn-drawer-group.open .tn-drawer-group-chevron {
    transform: rotate(180deg);
}

.tn-drawer-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s ease;
    background: var(--bg-base);
}

.tn-drawer-group.open .tn-drawer-sub {
    max-height: 400px;
}

.tn-drawer-sub-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 20px 8px 50px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: all var(--tn-transition);
    min-height: 40px;
    position: relative;
}

    .tn-drawer-sub-link::after {
        content: '';
        position: absolute;
        left: 30px;
        top: 50%;
        transform: translateY(-50%);
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--border);
        transition: background var(--tn-transition);
    }

    .tn-drawer-sub-link:hover {
        background: var(--bg-hover);
        color: var(--text-secondary);
    }

        .tn-drawer-sub-link:hover::after {
            background: var(--border-light);
        }

    .tn-drawer-sub-link.active {
        color: var(--accent-light);
        background: rgba(45,125,210,.06);
        border-left-color: var(--accent);
    }

        .tn-drawer-sub-link.active::after {
            background: var(--accent-light);
        }

    .tn-drawer-sub-link .dr-sub-icon {
        font-size: 13px;
        flex-shrink: 0;
    }

.tn-drawer-divider {
    border-top: 1px solid var(--border);
    margin: 8px 0;
}

.tn-drawer-footer {
    margin-top: auto;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* ════════════════════════════════════════
   BOTTOM NAV (PWA mobile — 5 tabs)
   ════════════════════════════════════════ */
#tn-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    z-index: 950;
    align-items: stretch;
}

.tn-bnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: color var(--tn-transition);
    min-height: 44px;
}

    .tn-bnav-item:hover, .tn-bnav-item.active {
        color: var(--accent-light);
    }

.tn-bnav-icon {
    font-size: 20px;
    line-height: 1;
    position: relative;
}

.tn-bnav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
    font-weight: 700;
}

/* ================================================================
   TABS — Horizontal & Vertical  (v3 addition)
   ================================================================ */

/* ── Shared wrapper ── */
.pf-tabs {
    display: flex;
}

/* ─────────────────────────────────
   HORIZONTAL TABS
   Usage:
     <div class="pf-tabs-h">
       <button class="pf-tab active" data-tab="tab1">Label</button>
       …
     </div>
     <div class="pf-tab-panel active" id="tab1">…</div>
   ───────────────────────────────── */
.pf-tabs-h {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
}

.pf-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px; /* sit on top of wrapper border */
    transition: color var(--transition), border-color var(--transition);
    min-height: 44px; /* PWA touch target */
}

    .pf-tab:hover {
        color: var(--text-primary);
    }

    .pf-tab.active {
        color: var(--accent-light);
        border-bottom-color: var(--accent);
        background: none;
    }

    .pf-tab .tab-badge {
        font-size: 10px;
        font-weight: 700;
        padding: 1px 6px;
        border-radius: 10px;
        background: var(--danger);
        color: #fff;
    }

    .pf-tab .tab-icon {
        font-size: 14px;
    }

/* ─────────────────────────────────
   VERTICAL TABS
   Usage:
     <div class="pf-tabs pf-tabs-v-wrap">
       <div class="pf-tabs-v">
         <button class="pf-tab-v active" data-tab="t1">Label</button>
         …
       </div>
       <div class="pf-tab-panels">
         <div class="pf-tab-panel active" id="t1">…</div>
         …
       </div>
     </div>
   ───────────────────────────────── */
.pf-tabs-v-wrap {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

.pf-tabs-v {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 8px 0;
    background: var(--bg-hover);
    border-radius: 12px 0 0 12px;
}

.pf-tab-v {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    min-height: 44px;
}

    .pf-tab-v:hover {
        background: var(--bg-card);
        color: var(--text-primary);
    }

    .pf-tab-v.active {
        color: var(--accent-light);
        background: color-mix(in srgb, var(--accent) 8%, transparent);
        border-left-color: var(--accent);
    }

@supports not (color: color-mix(in srgb, red, blue)) {
    .pf-tab-v.active {
        background: rgba(45,125,210,.08);
    }
}

.pf-tab-v .tab-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.pf-tab-v .tab-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
}

.pf-tab-v-section {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 14px 16px 4px;
    pointer-events: none;
}

/* ── Shared panel ── */
.pf-tab-panels {
    flex: 1;
    min-width: 0;
}

.pf-tab-panel {
    display: none;
}

    .pf-tab-panel.active {
        display: block;
        animation: fadeUp .18s ease;
    }

/* Vertical panel gets left padding + border-radius on right side */
.pf-tabs-v-wrap .pf-tab-panels {
    padding: 20px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 12px 12px 0;
}

/* ── Responsive: vertical tabs stack on mobile ── */
@media (max-width: 600px) {
    .pf-tabs-v-wrap {
        flex-direction: column;
    }

    .pf-tabs-v {
        flex-direction: row;
        overflow-x: auto;
        min-width: 0;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        border-radius: 12px 12px 0 0;
        padding: 4px 8px;
        -webkit-overflow-scrolling: touch;
    }

    .pf-tab-v {
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 0;
        flex-shrink: 0;
        padding: 8px 14px;
    }

        .pf-tab-v.active {
            border-left-color: transparent;
            border-bottom-color: var(--accent);
            background: none;
        }

    .pf-tabs-v-wrap .pf-tab-panels {
        border-left: 1px solid var(--border);
        border-top: none;
        border-radius: 0 0 12px 12px;
    }

    .pf-tab-v-section {
        display: none;
    }
}

/* ════════════════════════════════════════
   HORIZONTAL TAB COMPONENT (standalone demo)
   ════════════════════════════════════════ */

/* Pill-style tab bar */
.pf-htab-bar {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    padding: 4px;
    background: var(--bg-hover);
    border-radius: 10px;
    border: 1px solid var(--border);
    width: fit-content;
    max-width: 100%;
}

.pf-htab-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 7px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all var(--tn-transition);
    white-space: nowrap;
    min-height: 36px;
}

    .pf-htab-btn:hover {
        color: var(--text-primary);
        background: var(--bg-card);
    }

    .pf-htab-btn.active {
        background: var(--bg-card);
        color: var(--accent-light);
        box-shadow: 0 1px 4px rgba(0,0,0,.2);
    }

    .pf-htab-btn .htab-icon {
        font-size: 14px;
    }

    .pf-htab-btn .htab-count {
        font-size: 10px;
        font-weight: 700;
        padding: 1px 7px;
        border-radius: 10px;
        background: var(--border);
        color: var(--text-muted);
        transition: all var(--tn-transition);
    }

    .pf-htab-btn.active .htab-count {
        background: var(--accent);
        color: #fff;
    }

/* Underline-style tab bar */
.pf-htab-bar-ul {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pf-htab-btn-ul {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all var(--tn-transition);
    white-space: nowrap;
    min-height: 44px;
}

    .pf-htab-btn-ul:hover {
        color: var(--text-primary);
    }

    .pf-htab-btn-ul.active {
        color: var(--accent-light);
        border-bottom-color: var(--accent);
    }

    .pf-htab-btn-ul .htab-icon {
        font-size: 15px;
    }

    .pf-htab-btn-ul .htab-badge {
        font-size: 10px;
        font-weight: 700;
        padding: 1px 6px;
        border-radius: 10px;
        background: var(--danger);
        color: #fff;
    }

/* Shared panel */
.pf-htab-panel {
    display: none;
}

    .pf-htab-panel.active {
        display: block;
        animation: fadeUp .18s ease;
    }

/* ════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ════════════════════════════════════════ */
@media (max-width: 1100px) {
    /* Hide text labels on some nav items, keep icons */
    .tn-link .tn-label {
        display: none;
    }

    .tn-search {
        width: 180px;
    }

        .tn-search:focus-within {
            width: 220px;
        }
}

@media (max-width: 860px) {
    /* Collapse nav into hamburger + drawer */
    #tn-nav-items {
        display: none;
    }

    #tn-hamburger {
        display: flex;
    }

    .tn-search {
        display: none;
    }

    #tn-main {
        padding: 16px 14px;
        padding-bottom: calc(72px + var(--safe-bottom));
    }
    /* Show bottom nav */
    #tn-bottom-nav {
        display: flex;
    }
}

@media (max-width: 480px) {
    #topnav {
        padding: 0 14px;
    }

    .tn-brand-sub {
        display: none;
    }

    .tn-btn {
        display: none;
    }

        .tn-btn.always-show {
            display: flex;
        }
}

/* PWA standalone */
@media (display-mode: standalone) {
    #topnav {
        top: var(--safe-top);
    }

    #tn-main {
        overflow-y: auto;
        height: calc(100vh - var(--topnav-h) - var(--safe-top));
    }

    body {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }
}
