/* ═══════════════════════════════════════════════════
   SIDEBAR CSS — sidebar.css
   Include: <link href="sidebar.css" rel="stylesheet">
═══════════════════════════════════════════════════ */

:root {
    --sb-w: 320px;
    --sb1: #562210;
    --sb2: #481C0D;
    --sb3: #3A160A;
    --gold: #C8922A;
    --gold-lt: #E8B84A;
    --gold-dk: #9A6A10;
    --gold-glow: #FFD97A;
    --sb-rule: rgba(255, 255, 255, 0.15);
    --sb-text: #FFFFFF;
    --sb-dim: rgba(255, 255, 255, 0.55);
}

/* ── Sidebar Shell ── */
.erp-sidebar {
    width: var(--sb-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--sb1) 0%, var(--sb2) 60%, var(--sb3) 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 10;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

.sb-topbar { display: none; }
.sb-addr   { display: none; }
.sb-orn    { display: none; }

/* ── Header ── */
.sb-header {
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* Circular Logo */
.sb-logo-wrap {
    position: relative;
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.sb-logo-img {
    width: 156px;
    height: 156px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--sb2);
    position: relative;
    z-index: 1;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s;
}

.sb-logo-wrap:hover .sb-logo-img {
    transform: scale(1.04);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
}

/* Org Name */
.sb-org {
    text-align: center;
    width: 100%;
    padding: 16px 12px 4px;
}

.sb-org h1 {
    font-family: 'Merriweather', serif;
    font-size: 22px;
    font-weight: 900;
    color: #FFFFFF;
    line-height: 1.3;
    letter-spacing: -0.2px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.45);
    padding-bottom: 8px;
    margin-bottom: 0;
}

.sb-badge {
    display: block;
    margin-top: 7px;
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

/* ── Nav ── */
.sb-nav {
    padding: 14px 10px 8px;
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
}

.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sb-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-family: 'Lato', sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.22s ease;
    letter-spacing: 0.2px;
}

/* Shimmer sweep on hover */
.sb-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.07) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.45s ease;
    pointer-events: none;
}
.sb-nav a:hover::before { transform: translateX(100%); }

/* Arrow dot */
.sb-nav a .dot {
    font-size: 0;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.22s ease;
}

.sb-nav a .dot::before {
    content: '›';
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
    transition: all 0.22s ease;
    display: block;
}

.sb-nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.10);
    border-left-color: var(--gold-lt);
    padding-left: 18px;
    letter-spacing: 0.4px;
}

.sb-nav a:hover .dot { background: rgba(200,146,42,0.28); transform: translateX(3px); }
.sb-nav a:hover .dot::before { content: '»'; color: var(--gold-glow); }

/* Highlighted nav links */
.sb-nav-hl {
    color: rgba(255, 255, 255, 0.92) !important;
    border-left-color: rgba(200, 146, 42, 0.5) !important;
    background: rgba(200, 146, 42, 0.08) !important;
}
.sb-nav-hl .dot { background: rgba(200, 146, 42, 0.2) !important; }
.sb-nav-hl .dot::before { content: '»' !important; font-size: 14px !important; color: var(--gold-lt) !important; }
.sb-nav-hl:hover { border-left-color: var(--gold-glow) !important; background: rgba(200,146,42,0.16) !important; }

/* ── Footer ── */
.sb-footer {
    padding: 14px 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.sb-footer p {
    font-family: 'Lato', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.7;
}

.sb-policy-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
    margin-top: 5px;
}

.sb-policy-row a {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s;
}
.sb-policy-row a:hover { color: var(--gold-lt); }

.sb-policy-row span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.sb-ver {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 700;
    letter-spacing: 1px;
}
.sb-ver::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
}

/* ── Mobile Toggle ── */
.sb-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 200;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #3D1A08;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 14px rgba(61, 26, 8, 0.5);
}
.sb-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s;
}

.sb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(61, 26, 8, 0.6);
    backdrop-filter: blur(4px);
}

/* ── Marquee / Stats (preserved) ── */
.sb-marquee-wrap {
    overflow: hidden;
    border-top: 1px solid rgba(200, 146, 42, 0.1);
    padding: 5px 0;
    background: rgba(200, 146, 42, 0.04);
}
.sb-marquee {
    display: flex;
    gap: 28px;
    width: max-content;
    animation: marqueeScroll 22s linear infinite;
}
.sb-marquee span {
    font-size: 10px;
    font-weight: 600;
    color: var(--sb-text);
    white-space: nowrap;
    letter-spacing: 0.3px;
    opacity: 0.85;
}
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.sb-marquee-wrap:hover .sb-marquee { animation-play-state: paused; }

/* ── Responsive ── */
@media (max-width: 960px) {
    .erp-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 300px;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 100;
    }
    .erp-sidebar.open { transform: translateX(0); }
    .sb-overlay.open  { display: block; }
    .sb-toggle        { display: flex; }
}

@media (max-width: 480px) {
    .sb-logo-img { width: 120px; height: 120px; }
}
