﻿/* Set padding to keep content from hitting the edges */
.body-content {
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 15px;
}
:root {
    --sb-bg: #0b1220;
    --sb-bg2: #0f1a2f;
    --sb-surface: #111c33;
    --sb-surface2: #0f192e;
    --sb-text: #e9eefc;
    --sb-muted: rgba(233, 238, 252, .7);
    --sb-border: rgba(255,255,255,.08);
    --sb-accent: #4f8cff; /* adjust to your brand if needed */
    --sb-accent2: #22c55e;
    --sb-danger: #ef4444;
    --sb-warn: #f59e0b;
    --sb-radius: 14px;
    --sb-shadow: 0 12px 30px rgba(0,0,0,.35);
}

body {
    background: radial-gradient(1200px 600px at 20% -10%, rgba(79,140,255,.15), transparent 60%), radial-gradient(900px 500px at 90% 0%, rgba(34,197,94,.12), transparent 55%), #0a1020;
}

.sb-wrapper {
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.sb-sidebar {
    width: 270px;
    background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg2) 100%);
    border-right: 1px solid var(--sb-border);
    padding: 18px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.brand {
    color: var(--sb-text);
    font-weight: 800;
    letter-spacing: .2px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 14px;
}

    .brand i {
        font-size: 22px;
        color: var(--sb-accent);
        margin-right: 8px;
    }

    .brand .brand-row {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 16px;
    }

    .brand small {
        color: var(--sb-muted);
        font-weight: 600;
    }

.sb-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--sb-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all .18s ease;
    margin: 4px 0;
}

    .sb-nav a:hover {
        background: rgba(255,255,255,.06);
        color: var(--sb-text);
    }

    .sb-nav a.active {
        background: linear-gradient(90deg, rgba(79,140,255,.22), rgba(79,140,255,.08));
        color: var(--sb-text);
        border: 1px solid rgba(79,140,255,.25);
    }

.sb-nav i {
    font-size: 18px;
    min-width: 22px;
    color: rgba(233,238,252,.85);
}

/* Content container */
.sb-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.sb-topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: rgba(10, 16, 32, .72);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sb-border);
    padding: 14px 18px;
}

.sb-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sb-titleblock {
    min-width: 0;
}

    .sb-titleblock .title {
        color: var(--sb-text);
        font-weight: 800;
        margin: 0;
        line-height: 1.15;
        font-size: 16px;
    }

    .sb-titleblock .subtitle {
        color: var(--sb-muted);
        margin: 2px 0 0;
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 60vw;
    }

.sb-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sb-iconbtn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--sb-border);
    background: rgba(255,255,255,.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sb-text);
    transition: all .18s ease;
    position: relative;
}

    .sb-iconbtn:hover {
        background: rgba(255,255,255,.08);
        transform: translateY(-1px);
    }

.sb-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--sb-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 18px;
    box-shadow: 0 8px 18px rgba(239,68,68,.25);
}

    .sb-badge.show {
        display: inline-flex;
    }

.sb-userchip {
    border: 1px solid var(--sb-border);
    background: rgba(255,255,255,.04);
    color: var(--sb-text);
    padding: 8px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    max-width: 260px;
}

    .sb-userchip .name {
        max-width: 170px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* Notification dropdown */
.sb-dd {
    width: 360px;
    max-width: 92vw;
    border-radius: 14px;
    border: 1px solid var(--sb-border);
    background: rgba(17, 28, 51, .98);
    box-shadow: var(--sb-shadow);
    overflow: hidden;
}

    .sb-dd .dd-head {
        padding: 12px 14px;
        border-bottom: 1px solid var(--sb-border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

        .sb-dd .dd-head .h {
            color: var(--sb-text);
            font-weight: 800;
            margin: 0;
            font-size: 13px;
        }

    .sb-dd .dd-body {
        max-height: 320px;
        overflow: auto;
    }

    .sb-dd .dd-item {
        padding: 10px 14px;
        border-bottom: 1px solid rgba(255,255,255,.06);
        cursor: pointer;
        transition: background .15s ease;
    }

        .sb-dd .dd-item:hover {
            background: rgba(255,255,255,.05);
        }

        .sb-dd .dd-item .t {
            color: var(--sb-text);
            font-weight: 750;
            font-size: 12.5px;
            margin: 0 0 2px;
        }

        .sb-dd .dd-item .m {
            color: var(--sb-muted);
            font-size: 12px;
            margin: 0;
        }

    .sb-dd .dd-foot {
        padding: 10px 14px;
        display: flex;
        justify-content: space-between;
        gap: 10px;
        border-top: 1px solid var(--sb-border);
    }

/* Main */
.sb-main {
    padding: 18px;
}

.sb-footer {
    margin-top: auto;
    padding: 14px 18px;
    border-top: 1px solid var(--sb-border);
    color: var(--sb-muted);
    font-size: 12px;
    background: rgba(10, 16, 32, .55);
}
/* Mobile responsiveness */
@media (max-width: 1199px) {
    .sb-auth-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .sb-card-body {
        padding: 12px;
    }

    .sb-card-head {
        padding: 14px 12px 10px 12px;
    }

    .sb-title {
        font-size: 16px;
    }
}
@@media (max-width: 1200px) {
    .sb-preview-split {
        grid-template-columns: 1fr 380px;
    }
}

@@media (max-width: 992px) {
    .sb-preview-split {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    #studentPdfStage {
        height: 65vh;
    }
}

@@media (max-width: 576px) {
    #studentPdfStage {
        height: 60vh;
    }
}
/* Mobile: collapse sidebar */
@media (max-width: 992px) {

  .sb-main { padding: 14px; }

  .sb-titleblock .subtitle { max-width: 44vw; }

  .sb-auth-shell { grid-template-columns: 1fr; }

  .sb-brand-panel { display: none !important; }
    
    /* Center the card at 90vw */
    .sb-card {
        width: 95vw !important;
        margin-left: auto !important;
        margin-right: auto !important;
        min-width: 0; /* prevent overflow in grid */
        justify-self: center; 
    }
    .sb-sidebar {
        display: none;
    }

    .sb-main {
        padding: 14px;
    }

    .sb-titleblock .subtitle {
        max-width: 44vw;
    }
}

