/* ============================================================
   Admin Hub Shell — matches GTI Admin Hub visual style
   Uses Bootstrap 4 layout conventions
   ============================================================ */

:root {
    --sh-brand:      #DE0437;
    --sh-brand-dark: #b0032c;
    --sh-topbar-h:   64px;
    --sh-sidebar-w:  240px;
    --sh-sidebar-bg: #ffffff;
    --sh-sidebar-border: #e9ecef;
    --sh-text-muted: #6c757d;
    --sh-bg:         #f4f5f7;
}

/* ─── Base ─────────────────────────────────────────────────── */
body {
    background: var(--sh-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Topbar ────────────────────────────────────────────────── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--sh-topbar-h);
    z-index: 200;
    background: var(--sh-brand);
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.top-navbar {
    height: 100%;
    padding: 0 1rem;
}

.navbar-header {
    width: var(--sh-sidebar-w);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.navbar-brand {
    color: #fff !important;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none !important;
    padding: 0;
}

.navbar-brand .logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.2);
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: -.5px;
}

.navbar-brand .logo-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.2px;
}

.top-navbar .navbar-nav {
    flex-direction: row;
    align-items: center;
    gap: .5rem;
}

.top-navbar .navbar-nav .nav-link {
    color: rgba(255,255,255,.85);
    font-size: 13px;
    padding: .25rem .5rem;
}

.top-navbar .navbar-nav .user-chip {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: rgba(255,255,255,.9);
    font-size: 13px;
    font-weight: 500;
    background: rgba(255,255,255,.12);
    border-radius: 20px;
    padding: .25rem .75rem .25rem .5rem;
}

.top-navbar .navbar-nav .user-chip .avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.btn-topbar-logout {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    font-size: 12px;
    border-radius: 6px;
    padding: .28rem .75rem;
    cursor: pointer;
    transition: background .15s;
}
.btn-topbar-logout:hover { background: rgba(255,255,255,.25); color: #fff; }

/* ─── Left Sidebar ──────────────────────────────────────────── */
.left-sidebar {
    position: fixed;
    top: var(--sh-topbar-h);
    left: 0;
    width: var(--sh-sidebar-w);
    height: calc(100vh - var(--sh-topbar-h));
    background: var(--sh-sidebar-bg);
    border-right: 1px solid var(--sh-sidebar-border);
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 1px 0 4px rgba(0,0,0,.05);
    overflow: hidden;
}

.scroll-sidebar {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.scroll-sidebar::-webkit-scrollbar { width: 4px; }
.scroll-sidebar::-webkit-scrollbar-track { background: transparent; }
.scroll-sidebar::-webkit-scrollbar-thumb { background: #dee2e6; border-radius: 2px; }

/* Sidebar nav */
.sidebar-nav { padding: .5rem 0; }
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; }

.sidebar-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.25rem;
    color: var(--sh-text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.sidebar-nav > ul > li > a i {
    font-size: 1.15rem;
    width: 22px;
    flex-shrink: 0;
    color: #adb5bd;
    transition: color .15s;
}

.sidebar-nav > ul > li > a:hover {
    color: var(--sh-brand);
    background: rgba(222,4,55,.05);
    text-decoration: none;
}
.sidebar-nav > ul > li > a:hover i { color: var(--sh-brand); }

.sidebar-nav > ul > li.active > a {
    color: var(--sh-brand);
    border-left-color: var(--sh-brand);
    background: rgba(222,4,55,.06);
    font-weight: 600;
}
.sidebar-nav > ul > li.active > a i { color: var(--sh-brand); }

.sidebar-nav .hide-menu {
    opacity: 1;
    transition: opacity .2s;
}

/* Sidebar footer */
.sidebar-footer {
    padding: .7rem 1.25rem;
    border-top: 1px solid var(--sh-sidebar-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.sidebar-footer .link {
    color: var(--sh-text-muted);
    font-size: 1.2rem;
    text-decoration: none;
    transition: color .15s;
}
.sidebar-footer .link:hover { color: var(--sh-brand); }

/* ─── Page Wrapper ──────────────────────────────────────────── */
.page-wrapper {
    margin-left: var(--sh-sidebar-w);
    padding-top: var(--sh-topbar-h);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ─── Route Planner Tab Nav ─────────────────────────────────── */
.rp-tabnav {
    background: #fff;
    border-bottom: 2px solid var(--sh-sidebar-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: flex-end;
    gap: 0;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    z-index: 10;
}

.rp-tabnav .tab-btn {
    padding: .72rem 1.3rem;
    border: none;
    background: transparent;
    color: var(--sh-text-muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}

.rp-tabnav .tab-btn:hover { color: var(--sh-brand); background: rgba(222,4,55,.03); }

.rp-tabnav .tab-btn.active {
    color: var(--sh-brand);
    border-bottom-color: var(--sh-brand);
    font-weight: 600;
}

.rp-tabnav .tab-btn i { font-size: 1rem; }

/* ─── Hidden utility ────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Risk rating selector ──────────────────────────────────── */
.risk-selector {
    display: flex;
    gap: .4rem;
    margin-top: .3rem;
}
.risk-selector input[type="radio"] { display: none; }
.risk-selector label {
    flex: 1;
    text-align: center;
    padding: .4rem .2rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    margin: 0;
    color: #6c757d;
}
.risk-selector input[value="1"]:checked + label { border-color: #16a34a; background: #dcfce7; color: #166534; }
.risk-selector input[value="2"]:checked + label { border-color: #65a30d; background: #ecfccb; color: #3f6212; }
.risk-selector input[value="3"]:checked + label { border-color: #d97706; background: #fef3c7; color: #92400e; }
.risk-selector input[value="4"]:checked + label { border-color: #ea580c; background: #ffedd5; color: #7c2d12; }
.risk-selector input[value="5"]:checked + label { border-color: #dc2626; background: #fee2e2; color: #7f1d1d; }
.risk-selector label:hover { border-color: #adb5bd; color: #495057; }
