/* ═══════════════════════════════════════════════════
   SIDEBAR CSS — index-sidebar.css
   Design: Transparent sidebar — full-page chalkboard shows through
   Background image is on body in mainindex.css
   Include: <link href="css/index-sidebar.css" rel="stylesheet">
═══════════════════════════════════════════════════ */

:root {
    --sb-w:        300px;
    --sb-orange:   #E8650A;
    --sb-gold:     rgba(232, 101, 10, 0.20);
    --sb-white:    #ffffff;
    --sb-dim:      rgba(255, 255, 255, 0.62);
    --sb-rule:     rgba(255, 255, 255, 0.12);
    --sb-hover:    rgba(255, 255, 255, 0.09);
}

/* ── Sidebar Shell — semi-transparent so chalkboard shows through ── */
.erp-sidebar {
    width: var(--sb-w);
    flex-shrink: 0;
    /* Dark green glass — the chalkboard behind it tints through */
    background: linear-gradient(180deg,
        rgba(1, 46, 41, 0.82) 0%,
        rgba(2, 60, 53, 0.78) 45%,
        rgba(1, 36, 32, 0.86) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 10;
    /* Right edge separator — subtle chalk line */
    border-right: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 4px 0 28px rgba(0, 0, 0, 0.35);
}

/* Chalkboard texture radial hints */
.erp-sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 15%, rgba(255,255,255,0.04) 0%, transparent 55%),
        radial-gradient(circle at 75% 85%, rgba(232,101,10,0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Header ── */
.sb-header {
    padding: 28px 20px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid var(--sb-rule);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* Circular Logo */
.sb-logo-wrap {
    position: relative;
    width: 148px;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.sb-logo-wrap::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.22);
}

.sb-logo-wrap::after {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 50%;
    border: 1px solid rgba(232, 101, 10, 0.30);
}

.sb-logo-img {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(2, 60, 53, 0.6);
    position: relative;
    z-index: 1;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.50),
        0 0 0 3px rgba(255, 255, 255, 0.10);
    transition: transform 0.3s ease, box-shadow 0.3s;
    border: 3px solid rgba(255, 255, 255, 0.15);
}
.sb-logo-wrap:hover .sb-logo-img {
    transform: scale(1.03);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.60);
}

/* Org Name */
.sb-org {
    text-align: center;
    width: 100%;
    padding: 14px 10px 0;
}

.sb-org h1 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 19px;
    font-weight: 900;
    color: var(--sb-white);
    line-height: 1.3;
    border-bottom: 1px solid rgba(255, 255, 255, 0.20);
    padding-bottom: 10px;
    margin-bottom: 0;
}

.sb-badge {
    display: block;
    margin-top: 8px;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.3px;
    color: var(--sb-dim);
    text-align: center;
    line-height: 1.5;
}

/* ── Nav ── */
.sb-nav {
    padding: 16px 12px 8px;
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sb-nav::-webkit-scrollbar { width: 3px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.sb-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border-radius: 9px;
    text-decoration: none;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.80);
    border-left: 3px solid transparent;
    transition: all 0.22s ease;
    position: relative;
    overflow: hidden;
}

.sb-nav-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}
.sb-nav-item:hover::after { transform: translateX(100%); }

.sb-icon {
    width: 32px; height: 32px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.08);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.22s;
}
.sb-icon svg {
    width: 15px; height: 15px;
    stroke: rgba(255, 255, 255, 0.65);
    fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.22s;
}
.sb-icon-office svg { width: 15px; height: 15px; stroke: none; }

.sb-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-arrow {
    font-size: 18px; color: rgba(255,255,255,0.30);
    line-height: 1; transition: all 0.22s; flex-shrink: 0;
}

.sb-nav-item:hover {
    color: var(--sb-white);
    background: var(--sb-hover);
    border-left-color: var(--sb-orange);
    padding-left: 18px;
}
.sb-nav-item:hover .sb-icon { background: var(--sb-gold); }
.sb-nav-item:hover .sb-icon svg { stroke: var(--sb-orange); }
.sb-nav-item:hover .sb-arrow { color: var(--sb-orange); }

/* ── Footer ── */
.sb-footer {
    padding: 14px 14px 16px;
    border-top: 1px solid var(--sb-rule);
    position: relative; z-index: 1; flex-shrink: 0;
}

.sb-contact {
    display: flex; align-items: flex-start; gap: 6px;
    font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
    font-size: 10.5px; color: var(--sb-dim); line-height: 1.6; margin-bottom: 8px;
}
.sb-contact svg {
    stroke: var(--sb-dim); fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: 2px;
}

.sb-policy-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.sb-policy-row a { font-size: 10px; color: var(--sb-dim); text-decoration: none; white-space: nowrap; transition: color 0.18s; }
.sb-policy-row a:hover { color: var(--sb-orange); }
.sb-policy-row span { font-size: 10px; color: rgba(255,255,255,0.25); }

.sb-copy { font-size: 10px; color: rgba(255,255,255,0.40); line-height: 1.5; margin-bottom: 3px; }

.sb-powered { font-size: 10.5px; color: rgba(255,255,255,0.45); margin-bottom: 6px; }
.sb-powered a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.18s; }
.sb-powered a:hover { color: var(--sb-orange); }

.sb-ver {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 4px; font-size: 9.5px;
    color: rgba(255,255,255,0.55); font-weight: 700; letter-spacing: 0.8px;
}
.sb-ver-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--sb-orange); flex-shrink: 0; }

/* ── Mobile Toggle ── */
.sb-toggle {
    display: none;
    position: fixed; top: 14px; left: 14px; z-index: 200;
    width: 42px; height: 42px; border-radius: 8px;
    background: rgba(1, 46, 41, 0.88);
    border: 1.5px solid rgba(255,255,255,0.25);
    cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.50);
}
.sb-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }

.sb-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 50;
    background: rgba(1, 42, 38, 0.55);
    backdrop-filter: blur(4px);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .erp-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 285px;
        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: 110px; height: 110px; }
    .sb-logo-wrap { width: 110px; height: 110px; }
    .sb-org h1    { font-size: 16px; }
}