:root {
    --hgcl-navy: #0b3d5c;
    --hgcl-teal: #1a6b6b;
    --hgcl-sand: #e8eef2;
    --hgcl-accent: #c45c26;
    --sidebar-width: 260px;
}

body.app-body {
    background: linear-gradient(160deg, #f3f6f8 0%, #e7eef3 45%, #f7f4ef 100%);
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.guest-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 20%, rgba(26,107,107,.25), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(11,61,92,.3), transparent 35%),
        linear-gradient(145deg, #0b3d5c, #1a6b6b 55%, #0f4a5c);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.guest-wrap { width: 100%; max-width: 420px; }

.brand-mark {
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--hgcl-navy);
}

.login-logo {
    max-width: 260px;
    width: 100%;
    height: auto;
}

.guest-wrap .nav-pills .nav-link {
    color: var(--hgcl-navy);
    font-weight: 600;
}
.guest-wrap .nav-pills .nav-link.active {
    background: var(--hgcl-navy);
    color: #fff;
}
.letter-spacing {
    letter-spacing: .2em;
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 70px;
    background: #fff;
    border-radius: .5rem;
    padding: .35rem .5rem;
    display: block;
}

.topbar-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
}

.topbar-user {
    min-width: 0;
    max-width: 55%;
}

.topbar-username {
    max-width: 140px;
    display: inline-block;
    vertical-align: middle;
}

@media (min-width: 576px) {
    .topbar-username {
        max-width: 220px;
    }
}

#sidebar-wrapper {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: linear-gradient(180deg, #0b3d5c 0%, #0f4a5c 55%, #134e5e 100%);
    color: #fff;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    transition: margin-left .2s ease;
}

.sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidebar-brand .title { font-size: 1.1rem; font-weight: 700; }
.sidebar-brand .subtitle { font-size: .75rem; opacity: .75; }

.sidebar-nav a {
    color: rgba(255,255,255,.88);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem 1rem;
    border-left: 3px solid transparent;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-left-color: var(--hgcl-accent);
}
.sidebar-nav .nav-section {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .55;
    padding: 1rem 1rem .35rem;
}

.topbar {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #d9e2ea;
    padding: .75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}

.stat-card {
    border: 0;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(11,61,92,.06);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card-link { display: block; color: inherit; }
.stat-card-link:hover .stat-card {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(11,61,92,.12);
}
.stat-card .stat-label { font-size: .8rem; color: #5b6b77; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; color: var(--hgcl-navy); }
.stat-card .stat-action { color: var(--hgcl-teal); margin-top: .35rem; opacity: .85; }

.panel-card {
    border: 0;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(11,61,92,.06);
}

.btn-hgcl {
    background: var(--hgcl-navy);
    border-color: var(--hgcl-navy);
    color: #fff;
}
.btn-hgcl:hover { background: #0a334d; color: #fff; }

.btn-accent {
    background: var(--hgcl-accent);
    border-color: var(--hgcl-accent);
    color: #fff;
}
.btn-accent:hover { background: #a84c1f; color: #fff; }

.issue-card {
    border: 0;
    border-radius: .85rem;
    background: #fff;
    box-shadow: 0 6px 18px rgba(11,61,92,.06);
}

.step-indicator { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.step-pill {
    padding: .35rem .75rem;
    border-radius: 999px;
    background: #e8eef2;
    color: #4a5a66;
    font-size: .8rem;
}
.step-pill.active { background: var(--hgcl-navy); color: #fff; }
.step-pill.done { background: #d7ebe6; color: #1a6b6b; }

.capture-box {
    border: 2px dashed #9db2c0;
    border-radius: .85rem;
    padding: 1.25rem;
    text-align: center;
    background: #f8fbfd;
}

@media (max-width: 991.98px) {
    #sidebar-wrapper {
        margin-left: calc(var(--sidebar-width) * -1);
        position: fixed;
        z-index: 1040;
        height: 100vh;
    }
    #wrapper.toggled #sidebar-wrapper { margin-left: 0; }
    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.35);
        z-index: 1030;
    }
    #wrapper.toggled .sidebar-backdrop { display: block; }
}

.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #5b6b77;
    background: #f4f7fa;
}

.chart-box {
    position: relative;
    width: 100%;
}

.chart-box-sm {
    height: 160px;
    max-width: 220px;
    margin: 0 auto;
}

.chart-box-line {
    height: 140px;
}
