/* =====================================================
   VSPS ADMIN PANEL — admin.css
   Color palette mirrors the main site variables
===================================================== */

:root {
    --primary:        #10316b;
    --primary-dark:   #0a2540;
    --primary-light:  #1a4a9a;
    --secondary:      #e5a93b;
    --secondary-dark: #c88f1d;
    --white:          #ffffff;
    --off-white:      #f4f6fb;
    --text:           #333333;
    --text-light:     #666666;
    --border:         #e2e6f0;
    --danger:         #dc3545;
    --success:        #28a745;
    --sidebar-w:      260px;
    --topbar-h:       62px;
    --radius:         12px;
    --shadow:         0 4px 24px rgba(16,49,107,0.10);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--off-white);
    color: var(--text);
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; display: block; }


/* =====================================================
   LOGIN SCREEN
===================================================== */

body.login-mode {
    overflow: hidden;
}

body.login-mode .mgr-modal-backdrop,
body.login-mode .modal-overlay,
body.login-mode .admin-shell {
    display: none !important;
}

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background-color: #0f172a;
    background-image:
        linear-gradient(135deg, rgba(10,37,64,0.85) 0%, rgba(16,49,107,0.80) 100%),
        url('../assets/images/gallery/LoginScreen.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Glassmorphism card so the form stays legible over the photo background */
.login-card {
    background: rgba(255,255,255,0.88);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255,255,255,0.5);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    padding: 6px;
}

.login-logo h2 {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 4px;
}

.login-logo span {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.admin-input,
.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.2s;
    outline: none;
}

.admin-input:focus,
.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16,49,107,0.10);
}

textarea.admin-input {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.login-error {
    color: var(--danger);
    font-size: 0.85rem;
    margin-bottom: 16px;
    display: none;
}

.login-error.show { display: block; }

.btn-login {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover { background: var(--primary-dark); }


/* =====================================================
   ADMIN SHELL LAYOUT
===================================================== */

.admin-shell {
    display: flex;
    min-height: 100vh;
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
    width: var(--sidebar-w);
    background: var(--primary-dark);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    padding: 4px;
    flex-shrink: 0;
}

.sidebar-logo h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.sidebar-logo span {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
}

.sidebar-nav {
    padding: 16px 0 24px;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.35);
    padding: 16px 20px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: rgba(255,255,255,0.70);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--white);
}

.nav-item.active {
    background: rgba(229,169,59,0.15);
    color: var(--secondary);
    border-left-color: var(--secondary);
}

.nav-icon { font-size: 1rem; width: 20px; text-align: center; }


/* =====================================================
   TOP BAR
===================================================== */

.admin-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--primary);
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
}

.btn-preview {
    padding: 8px 18px;
    background: var(--off-white);
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.2s;
}

.btn-preview:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}


/* =====================================================
   MAIN CONTENT AREA
===================================================== */

.admin-main {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    padding: 24px 28px;
    flex: 1;
    min-width: 0;
    max-width: calc(100vw - var(--sidebar-w));
    min-height: calc(100vh - var(--topbar-h));
    box-sizing: border-box;
    overflow-x: hidden;
}


/* =====================================================
   PANELS
===================================================== */

.panel { 
    display: none; 
    animation: fadeInPanel 0.2s ease;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}
.panel.active { display: block; }

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.panel-header {
    margin-bottom: 24px;
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.panel-header p {
    font-size: 0.9rem;
    color: var(--text-light);
}


/* =====================================================
   CARDS & GRID
===================================================== */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.admin-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

.admin-card.full {
    grid-column: 1 / -1;
}

.admin-card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}


/* =====================================================
   UPLOAD ZONE
===================================================== */

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--off-white);
    margin-bottom: 14px;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(16,49,107,0.04);
}

.upload-zone.dragover {
    border-color: #0284c7 !important;
    background: #e0f2fe !important;
    transform: scale(1.01);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.18);
}

.upload-icon { font-size: 2rem; margin-bottom: 8px; }

.upload-zone p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.upload-zone span {
    font-size: 0.78rem;
    color: var(--text-light);
}

.img-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
    margin-top: 6px;
}

/* =====================================================
   REMOVE-UPLOAD BUTTON (used under every preview so an
   accidental upload can be cleared before saving)
===================================================== */
.btn-remove-file {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    padding: 6px 14px;
    background: #fff0f0;
    border: 1px solid #ffc5c5;
    border-radius: 6px;
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.btn-remove-file:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

/* Small circular variant for floating over a thumbnail */
.btn-remove-file.is-floating {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    line-height: 22px;
    text-align: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.preview-with-remove {
    position: relative;
    display: inline-block;
    max-width: 100%;
}


/* =====================================================
   SLIDES LIST (for carousels, leadership, etc.)
===================================================== */

.slides-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.slide-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary);
}

.slide-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.slide-item-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-remove {
    padding: 6px 14px;
    background: #fff0f0;
    border: 1px solid #ffc5c5;
    border-radius: 6px;
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.slide-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.slide-fields .full { grid-column: 1 / -1; }

.slide-fields label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.slide-img-preview {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--border);
    margin-top: 8px;
    display: none;
}

.slide-img-preview.show { display: block; }

.slide-upload-btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--off-white);
    border: 2px solid var(--border);
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
}

.slide-upload-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Green variant for gallery upload button */
.slide-upload-btn[style*="1a6b3c"] {
    background: #f0fdf4;
    border-color: #1a6b3c;
    color: #1a6b3c;
}
.slide-upload-btn[style*="1a6b3c"]:hover {
    background: #1a6b3c;
    color: #fff;
    border-color: #1a6b3c;
}

.evt-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: var(--off-white);
    border-radius: 8px;
    border: 1.5px dashed var(--border);
    min-height: 44px;
}


/* =====================================================
   GALLERY ADMIN GRID
===================================================== */

.gallery-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.gallery-admin-item {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.gallery-admin-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.gallery-item-meta {
    padding: 12px;
}

.gallery-item-meta select,
.gallery-item-meta input {
    width: 100%;
    margin-bottom: 8px;
}

.gallery-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(220,53,69,0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gallery-item-remove:hover { background: var(--danger); }


/* =====================================================
   BG GRID
===================================================== */

#bgGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.bg-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.bg-card-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.bg-card-body {
    padding: 16px;
}

.bg-card-body label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.bg-card-body p {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-family: monospace;
}

.bg-upload-btn {
    display: inline-block;
    padding: 7px 14px;
    background: var(--off-white);
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.bg-upload-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.bg-new-preview {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-top: 8px;
    display: none;
}


/* =====================================================
   BUTTONS
===================================================== */

.btn-add {
    padding: 11px 22px;
    background: rgba(16,49,107,0.07);
    border: 2px dashed var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.btn-add:hover {
    background: var(--primary);
    color: var(--white);
    border-style: solid;
}

.save-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.btn-save {
    padding: 13px 30px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 9px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(16,49,107,0.25);
}

.btn-save:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16,49,107,0.3);
}


/* =====================================================
   TOAST
===================================================== */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 9999;
    transform: translateY(80px);
    opacity: 0;
    transition: all 0.35s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.info    { background: #2563eb; }


/* =====================================================
   CIRCULAR ITEM SPECIFIC
===================================================== */

.cat-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text);
    background: var(--white);
    outline: none;
    cursor: pointer;
}

.cat-select:focus { border-color: var(--primary); }

.circ-cat-label {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.date-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    color: var(--text);
    background: var(--white);
    outline: none;
}

.date-input:focus { border-color: var(--primary); }


/* =====================================================
   MOBILE RESPONSIVE
===================================================== */

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .admin-topbar {
        left: 0;
    }

    .admin-main {
        margin-left: 0;
        padding: 20px 16px;
    }

    .sidebar-toggle {
        display: block;
    }

    .slide-fields {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .login-screen {
        background-attachment: scroll; /* "fixed" is unreliable on mobile browsers */
    }

    .login-card {
        padding: 32px 24px;
    }

    .gallery-admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #bgGrid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
}

.sidebar-overlay.show { display: block; }

/* ── Event Date Picker — admin panel enhancement ─────────────────────
   Makes the new <input type="date"> in the carousel slide builder look
   consistent with other admin-input fields.
──────────────────────────────────────────────────────────────────── */
.slide-event-date {
    /* Inherits .admin-input base styles; these fine-tune it */
    color: #334155;
    cursor: pointer;
}

.slide-event-date::-webkit-calendar-picker-indicator {
    /* Style the calendar icon to match the school brand colour */
    filter: invert(20%) sepia(60%) saturate(600%) hue-rotate(195deg);
    cursor: pointer;
    opacity: 0.8;
}

.slide-event-date:focus {
    outline: none;
    border-color: var(--primary, #10316b);
    box-shadow: 0 0 0 3px rgba(16,49,107,.12);
}

/* =====================================================
   STUDENT & TEACHER MANAGEMENT DESIGN SYSTEM
===================================================== */

/* Header action buttons */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.btn-action.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-action.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,49,107,0.2);
}

.btn-action.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 1.5px solid var(--border);
}

.btn-action.btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-action.btn-danger {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn-action.btn-danger:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Stat / Metric Summary Cards */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(16,49,107,0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: 2px;
}

/* Admin Toolbar & Search Filters */
.admin-toolbar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

.admin-input-sm {
    padding: 7px 12px;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.admin-input-sm:focus {
    border-color: var(--primary);
}

.search-input-wrap {
    flex: 1;
    min-width: 240px;
    max-width: 380px;
}

.admin-search-input {
    width: 100%;
    padding: 8px 14px 8px 36px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.88rem;
    background: #f8fafc url("data:image/svg2+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat 12px center;
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
}

.admin-search-input:focus {
    border-color: var(--primary);
    background-color: #fff;
}

/* Modern Data Tables */
.table-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.portal-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 13px 16px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.portal-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: #1e293b;
    vertical-align: middle;
}

.portal-table tbody tr {
    transition: background-color 0.15s;
}

.portal-table tbody tr:hover {
    background-color: #f1f5f9;
}

.portal-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Pill Badges */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: capitalize;
}

.badge-approved, .badge-active, .badge-paid {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-pending, .badge-processing {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fef08a;
}

.badge-rejected, .badge-blocked {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.badge-role {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* Table Inline Action Buttons */
.btn-sm-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: 4px;
}

.btn-sm-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fafc;
}

.btn-sm-action.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-sm-action.primary:hover {
    background: var(--primary-light);
}

.btn-sm-action.danger {
    color: #dc2626;
    border-color: #fecaca;
    background: #fef2f2;
}

.btn-sm-action.danger:hover {
    background: #dc2626;
    color: #fff;
}

/* Attendance Buttons */
.att-toggle-group {
    display: inline-flex;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.att-btn {
    padding: 6px 12px;
    border: none;
    background: #fff;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    border-right: 1px solid var(--border);
}

.att-btn:last-child {
    border-right: none;
}

.att-btn.active-p {
    background: #28a745;
    color: #fff;
}

.att-btn.active-a {
    background: #dc3545;
    color: #fff;
}

.att-btn.active-l {
    background: #e5a93b;
    color: #fff;
}

.att-btn.active-h {
    background: #0284c7;
    color: #fff;
}

/* Official Certificate Generator & Preview Canvas */
.cert-preview-wrapper {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    position: relative;
    color: #1e293b;
    font-family: 'Times New Roman', Times, serif;
}

.cert-border {
    border: 4px double #10316b;
    padding: 16px;
    background: #fff;
}

.cert-inner-border {
    border: 1px solid #c88f1d;
    padding: 24px 20px;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" opacity="0.02"><text x="50%" y="50%" font-size="20" font-family="serif" text-anchor="middle" dominant-baseline="middle">VSPS</text></svg>') repeat;
}

.cert-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.cert-logo-seal img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.cert-title-block h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #10316b;
    letter-spacing: 1px;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.cert-subtitle {
    font-size: 0.85rem;
    color: #c88f1d;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
}

.cert-addr {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
    font-family: 'Inter', sans-serif;
}

.cert-banner {
    background: #10316b;
    color: #ffffff;
    text-align: center;
    padding: 7px 0;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 2px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.cert-body {
    font-size: 1.02rem;
    line-height: 1.9;
    color: #1e293b;
    text-align: justify;
    margin-bottom: 30px;
}

.cert-body strong {
    color: #10316b;
    border-bottom: 1px dotted #94a3b8;
    padding: 0 4px;
}

.tc-details-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tc-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.tc-row span {
    color: #475569;
    font-weight: 600;
}

.tc-row strong {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 36px;
    padding-top: 16px;
    font-family: 'Inter', sans-serif;
}

.cert-sign-box {
    text-align: left;
}

.cert-sign-line {
    font-weight: 700;
    font-size: 0.95rem;
    color: #10316b;
    border-top: 1.5px solid #334155;
    padding-top: 6px;
    display: inline-block;
    min-width: 140px;
}

.cert-seal-text {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}

.cert-date-line {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

/* Wall of Fame Cards */
.wof-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.wof-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.wof-img-wrap {
    height: 180px;
    background: linear-gradient(135deg, #10316b, #1a4a9a);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.wof-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wof-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.wof-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wof-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 2px;
}

.wof-class {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 10px;
}

.wof-award-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 12px;
}

.wof-desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 14px;
    flex: 1;
}

.wof-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* Printable Clean Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #ccPrintArea, #ccPrintArea *,
    #tcPrintArea, #tcPrintArea *,
    .printable-slip, .printable-slip * {
        visibility: visible;
    }
    #ccPrintArea, #tcPrintArea, .printable-slip {
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
}

/* =====================================================
   MGR PORTAL STYLES (Manage Student & Manage Teacher)
/* =====================================================
   MGR PORTAL STYLES (Manage Student & Manage Teacher)
===================================================== */

.mgr-top-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.mgr-page-header {
    margin-bottom: 16px;
}

.mgr-page-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.2px;
    margin: 0;
    line-height: 1.3;
}

/* Top Action Buttons Bar */
.mgr-action-buttons-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 0;
}

.mgr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    color: #ffffff !important;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    transition: filter 0.15s ease, transform 0.1s ease;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.3;
}

.mgr-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.mgr-btn:active {
    transform: translateY(0);
}

/* Button Color Variants from Reference */
.mgr-btn-green {
    background-color: #4caf50 !important; /* Green */
}

.mgr-btn-cyan {
    background-color: #48c0d2 !important; /* Cyan / Teal */
}

.mgr-btn-orange {
    background-color: #f2784b !important; /* Coral / Orange */
}

.mgr-btn-light-blue {
    background-color: #5dade2 !important; /* Light Blue */
}

.mgr-btn-red {
    background-color: #d9534f !important; /* Red / Coral Red */
}

/* Main Box / Card */
.mgr-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.mgr-card-header {
    background-color: #008080 !important; /* Dark Teal matching screenshot */
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 6px 6px 0 0;
}

.mgr-card-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
}

.mgr-card-body {
    padding: 16px 20px;
    background-color: #f8fafc;
    overflow: visible;
}

/* Multi-select Dropdown Component for Subject Selection */
.mgr-multiselect-container {
    position: relative;
    width: 100%;
}

.mgr-multiselect-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    height: 38px;
    padding: 6px 12px;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    font-size: 0.90rem;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mgr-multiselect-btn:focus,
.mgr-multiselect-btn.open {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.mgr-multiselect-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 290px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18), 0 4px 10px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    padding: 0;
    overflow: hidden;
}

.mgr-multiselect-header {
    padding: 8px 12px;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mgr-multiselect-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    border-radius: 5px;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.15s ease;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.mgr-multiselect-select-all {
    background-color: #0284c7 !important;
    color: #ffffff !important;
}

.mgr-multiselect-select-all:hover {
    background-color: #0369a1 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(2,132,199,0.3);
}

.mgr-multiselect-clear {
    background-color: #e2e8f0 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

.mgr-multiselect-clear:hover {
    background-color: #cbd5e1 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

.mgr-multiselect-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mgr-multiselect-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
    font-size: 0.86rem;
    color: #1e293b;
}

.mgr-multiselect-item:hover {
    background: #eff6ff;
}

.mgr-multiselect-item input[type="checkbox"] {
    accent-color: #0284c7;
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

/* Search Box Container */
.mgr-search-box-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #e2e8f0;
    padding: 12px 18px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.mgr-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mgr-filter-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.mgr-select-wrap {
    flex: 1;
    min-width: 160px;
}

.mgr-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 12px;
    font-size: 0.90rem;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    outline: none;
    height: 38px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mgr-select:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.mgr-btn-center-row {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.mgr-search-btn {
    background-color: #0284c7;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 6px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    height: 38px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
    transition: background-color 0.15s, transform 0.1s;
    margin-left: auto;
}

.mgr-search-btn:hover {
    background-color: #0369a1;
    transform: translateY(-1px);
}

/* Data Tables */
.mgr-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.mgr-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    text-align: left;
}

.mgr-table thead th {
    background-color: #f1f5f9;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.90rem;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    white-space: nowrap;
}

.mgr-table tbody td {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.90rem;
    vertical-align: middle;
}

/* Alternating Row Tint Colors from Reference Screenshot */
.mgr-table tbody tr.row-tint-green {
    background-color: #effaf4; /* Soft Mint Green */
}

.mgr-table tbody tr.row-tint-peach {
    background-color: #fbf2ee; /* Soft Light Peach */
}

.mgr-table tbody tr:hover {
    filter: brightness(0.97);
}

/* Action Icon Buttons */
.mgr-action-btn-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mgr-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.92rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: opacity 0.15s, transform 0.1s;
}

.mgr-icon-btn:hover {
    opacity: 0.9;
    transform: scale(1.06);
}

.mgr-icon-download {
    background-color: #f2784b; /* Orange Download */
}

.mgr-icon-expand {
    background-color: #4caf50; /* Green Expand */
}

.mgr-icon-edit {
    background-color: #48c0d2; /* Cyan Edit */
}

.mgr-icon-delete {
    background-color: #d9534f; /* Red Delete */
}

.mgr-icon-purge {
    background-color: #881337; /* Dark Wine / Deep Crimson Permanent Delete */
}

.mgr-icon-purge:hover {
    background-color: #4c0519;
}

/* Status Badges */
.mgr-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mgr-status-active {
    background-color: #d4edda;
    color: #155724;
}

/* Footer Tag */
.mgr-page-footer {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

/* Modal Popup Framework */
.mgr-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 25, 47, 0.55);
    backdrop-filter: blur(4px);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.mgr-modal-backdrop.show {
    display: flex !important;
}

.mgr-modal-dialog {
    background: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    border-top: 4px solid var(--primary);
    animation: mgrModalSlideIn 0.22s ease-out;
}

@keyframes mgrModalSlideIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mgr-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid #e5e9f2;
}

.mgr-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.mgr-modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #8892b0;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
}

.mgr-modal-close-btn:hover {
    color: var(--danger);
    background: #fdf2f2;
}

.mgr-modal-body {
    padding: 22px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.mgr-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid #e5e9f2;
    background: #fafbfc;
    border-radius: 0 0 8px 8px;
}

.mgr-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .mgr-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   MODERN TEACHER & STUDENT SUB-VIEWS (Forms & Sub-Pages)
===================================================== */
.teacher-subview {
    display: none;
    animation: subviewFadeIn 0.25s ease-out;
}

.teacher-subview.active {
    display: block;
}

@keyframes subviewFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header with < Back Button */
.mgr-header-with-back {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eef2f6;
}

.mgr-header-with-back h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mgr-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #d9534f;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(217, 83, 79, 0.25);
    transition: all 0.2s ease;
}

.mgr-back-btn:hover {
    background: #c9302c;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(217, 83, 79, 0.35);
}

/* Modern Card with Top Bar / Accent Header */
.mgr-modern-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(16, 49, 107, 0.06);
    overflow: hidden;
    margin-bottom: 26px;
}

.mgr-modern-card-header {
    background: linear-gradient(135deg, #10316b 0%, #17428b 100%);
    color: #ffffff;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mgr-modern-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mgr-modern-card-header.header-orange {
    background: linear-gradient(135deg, #e5a93b 0%, #d89624 100%);
    color: #ffffff;
}

.mgr-modern-card-header.header-teal {
    background: linear-gradient(135deg, #177e89 0%, #11626b 100%);
    color: #ffffff;
}

.mgr-modern-card-body {
    padding: 26px 28px;
    background: #ffffff;
}

/* Form Grids */
.mgr-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.mgr-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.mgr-form-grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

@media (max-width: 900px) {
    .mgr-form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .mgr-form-grid-3,
    .mgr-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Input Fields & Groups */
.mgr-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mgr-input-group label {
    font-size: 0.84rem;
    font-weight: 600;
    color: #2d3748;
}

.mgr-input-group label span.req {
    color: #e53e3e;
    margin-left: 2px;
}

.mgr-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.mgr-field-wrapper .mgr-field-icon {
    position: absolute;
    right: 14px;
    color: #8892b0;
    pointer-events: none;
    font-size: 0.9rem;
}

.mgr-form-input {
    width: 100%;
    padding: 11px 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.mgr-form-input:focus {
    border-color: #10316b;
    box-shadow: 0 0 0 3px rgba(16, 49, 107, 0.12);
}

.mgr-form-input::placeholder {
    color: #94a3b8;
}

/* OR Divider */
.mgr-or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 8px 0 16px 0;
}

.mgr-or-divider::before,
.mgr-or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1.5px solid #e2e8f0;
}

.mgr-or-divider span {
    padding: 0 16px;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Custom File Upload Box */
.mgr-file-upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 6px;
    transition: border-color 0.2s;
}

.mgr-file-upload-box:hover {
    border-color: var(--primary);
}

.mgr-file-btn {
    padding: 6px 14px;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}

.mgr-file-btn:hover {
    background: #cbd5e1;
}

/* Center Submit Buttons */
.mgr-submit-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid #edf2f7;
}

.mgr-btn-primary-submit {
    padding: 12px 42px;
    background: #10316b;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(16, 49, 107, 0.25);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mgr-btn-primary-submit:hover {
    background: #0a2540;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(16, 49, 107, 0.35);
}

/* Search Bar Area */
.mgr-search-card-body {
    background: #f8fafc;
    padding: 22px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 22px;
}

/* Allotment & Subject Tables */
.mgr-allotment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.mgr-allotment-table th {
    background: #10316b;
    color: #ffffff;
    padding: 11px 14px;
    font-weight: 600;
    text-align: left;
    border: 1px solid #1a4a9a;
}

.mgr-allotment-table td {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

.mgr-allotment-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.mgr-allotment-table tr:hover {
    background-color: #f1f5f9;
}

/* =====================================================
   CLASS SUBJECTS MASTER STYLING
===================================================== */
.mgr-class-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.mgr-class-chip-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #334155;
    border: 1.5px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.mgr-class-chip-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    margin: 0;
}

.mgr-class-chip-item:hover {
    border-color: #10316b;
    background: #e2e8f0;
}

.mgr-class-chip-item.active {
    background: #10316b;
    color: #ffffff;
    border-color: #10316b;
    box-shadow: 0 2px 8px rgba(16, 49, 107, 0.25);
}

.mgr-class-chip-item.active::before {
    content: "✓ ";
    font-weight: 800;
}

.mgr-quick-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.mgr-btn-mini {
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.mgr-btn-mini:hover {
    background: #10316b;
    color: #ffffff;
    border-color: #10316b;
}

.mgr-badge-class-pill {
    display: inline-block;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 2px 3px;
}

.mgr-badge-subject-type {
    display: inline-block;
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.76rem;
    font-weight: 700;
}

.mgr-subject-row,
.mgr-exam-section {
    transition: all 0.2s ease;
}

.mgr-subject-row:hover,
.mgr-exam-section:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .mgr-subject-row,
    .exam-section-fields-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}



/* =====================================================
   TEACHER FULL PROFILE DOSSIER & PRINT STYLING
===================================================== */
.profile-modal-dialog {
    max-width: 840px !important;
    width: 95% !important;
    border-radius: 12px;
}

.profile-dossier-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-hero-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #10316b 0%, #071e42 100%);
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(16, 49, 107, 0.2);
}

.profile-avatar-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 3px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.mgr-teacher-photo-thumb {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    vertical-align: middle;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    flex-shrink: 0;
}

.profile-hero-info h3 {
    font-size: 1.35rem;
    margin: 0 0 6px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #ffffff;
}

.profile-hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.profile-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-section-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.profile-section-header {
    background: #f8fafc;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-section-body {
    padding: 14px 16px;
}

.profile-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.profile-field-unit {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.profile-field-unit .pfl-label {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.profile-field-unit .pfl-val {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

/* =====================================================
   STUDENT SUMMARY DASHBOARD TABLE & ACTION BUTTONS (IMAGE 3)
===================================================== */
.stu-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #ffffff;
}

.stu-summary-table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 7px 6px;
    border: 1px solid #cbd5e1;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    line-height: 1.25;
}

.stu-summary-table td {
    padding: 5px 6px;
    border: 1px solid #cbd5e1;
    text-align: center;
    vertical-align: middle;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.85rem;
    line-height: 1.25;
}

.stu-summary-table tr.row-tint-green {
    background-color: #f0fdf4 !important;
}

.stu-summary-table tr.row-tint-peach {
    background-color: #fefce8 !important;
}

.stu-summary-table tr.row-tint-pink {
    background-color: #fdf2f8 !important;
}

.stu-summary-table tr:hover {
    filter: brightness(0.97);
}

.stu-action-cluster {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    min-width: 260px;
}

.stu-action-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.stu-btn-action {
    display: inline-block;
    padding: 5px 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: all 0.12s ease;
    flex: 1;
    line-height: 1.25;
}

.stu-btn-action:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.stu-btn-view {
    background-color: #16a34a !important; /* Green */
}

.stu-btn-del {
    background-color: #dc2626 !important; /* Red */
}

.stu-btn-orange {
    background-color: #ea580c !important; /* Orange */
}

.stu-btn-amber {
    background-color: #d97706 !important; /* Amber / Yellow */
}

.stu-btn-dataslip {
    background-color: #b43403 !important; /* Deep Red-Orange */
}

/* Drag and Drop Zone for Students */
.stu-dropzone {
    border: 2px dashed #0284c7;
    background: #f0f9ff;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stu-dropzone:hover, .stu-dropzone.dragover {
    background: #e0f2fe;
    border-color: #0369a1;
}

.stu-preview-badge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.mgr-btn-red {
    background-color: #d9534f !important; /* Crimson / Red */
}

/* Class Students Detailed Table (Direct View Matching User Screenshot) */
.stu-class-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.90rem;
    background: #ffffff;
}

.stu-class-detail-table th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 700;
    font-size: 0.88rem;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    text-align: left;
    white-space: nowrap;
}

.stu-class-detail-table td {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    vertical-align: middle;
    color: #334155;
    font-size: 0.90rem;
}

/* Student Table Pure White Rows */
.stu-class-detail-table tbody tr,
.stu-class-detail-table tr.detail-tint-green,
.stu-class-detail-table tr.detail-tint-yellow,
.stu-class-detail-table tr.detail-tint-pink,
.stu-class-detail-table tr.detail-tint-blue {
    background-color: #ffffff !important;
}

.stu-class-detail-table tbody tr:hover {
    background-color: #f8fafc !important;
}

.stu-inline-roll {
    width: 65px;
    padding: 4px 8px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    font-size: 0.88rem;
    background: #ffffff;
    font-weight: 600;
    height: 32px;
}

.stu-inline-house {
    width: 120px;
    padding: 4px 8px;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    font-size: 0.85rem;
    background: #ffffff;
    margin-top: 4px;
    display: block;
    height: 32px;
}

/* Action Icons Grid */
.stu-detail-actions {
    display: grid;
    grid-template-columns: 32px 32px;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.stu-icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.12s ease;
    text-decoration: none;
    line-height: 1;
}

.stu-icon-btn:hover {
    filter: brightness(1.15);
    transform: scale(1.05);
}

.stu-icon-expand {
    background-color: #5cb85c !important; /* Green */
}

.stu-icon-edit {
    background-color: #5bc0de !important; /* Cyan */
}

.stu-icon-delete {
    background-color: #d9534f !important; /* Red */
    grid-column: span 1;
}

.stu-concession-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #22c55e;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

/* =====================================================
   FULL 27-ROW STUDENT FORM (ADD / UPDATE) - SCREENSHOT ACCURATE
===================================================== */
.stu-fullform-dialog {
    max-width: 1100px !important;
    width: 96% !important;
    max-height: 92vh !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
}

.stu-fullform-header {
    background: #f26522 !important; /* Distinctive Orange Header Bar */
    color: #ffffff !important;
    padding: 12px 20px !important;
    text-align: center !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.stu-fullform-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    letter-spacing: 0.5px !important;
}

.stu-fullform-close {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 2px 8px !important;
}

.stu-fullform-close:hover {
    color: #fee2e2 !important;
}

.stu-fullform-body {
    padding: 22px 26px !important;
    overflow-y: auto !important;
    flex: 1 1 auto !important;
    background: #ffffff !important;
}

.stu-fullform-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.stu-form-row {
    display: flex !important;
    gap: 14px !important;
    width: 100% !important;
}

.stu-form-col-1 {
    flex: 1 1 100% !important;
    width: 100% !important;
}

.stu-form-col-2 {
    flex: 1 1 50% !important;
    width: 50% !important;
}

.stu-form-col-3 {
    flex: 1 1 33.333% !important;
    width: 33.333% !important;
}

.stu-form-ctrl {
    width: 100% !important;
    height: 38px !important;
    padding: 6px 12px !important;
    font-size: 0.88rem !important;
    color: #334155 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    outline: none !important;
    font-family: inherit !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

.stu-form-ctrl::placeholder {
    color: #94a3b8 !important;
    font-size: 0.86rem !important;
}

.stu-form-ctrl:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}

.stu-file-group {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 4px 0 !important;
}

.stu-file-label {
    min-width: 120px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
}

.stu-file-input {
    font-size: 0.85rem !important;
    color: #475569 !important;
}

.stu-fullform-footer {
    padding: 16px 20px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    text-align: center !important;
    flex-shrink: 0 !important;
}

.stu-btn-submit-main {
    background-color: #337ab7 !important; /* Standard Web Primary Blue */
    color: #ffffff !important;
    border: 1px solid #2e6da4 !important;
    padding: 8px 36px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease !important;
}

.stu-btn-submit-main:hover {
    background-color: #286090 !important;
    border-color: #204d74 !important;
}

@media (max-width: 768px) {
    .stu-form-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .stu-form-col-2, .stu-form-col-3 {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* Examination Master Split Grid & Live Subject Preview Styles */
@media (max-width: 980px) {
    .exam-form-split-grid {
        grid-template-columns: 1fr !important;
    }
}

.exam-subjects-preview-panel {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.exam-subject-preview-pill {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.exam-subject-preview-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.06) !important;
    border-color: #cbd5e1 !important;
}

/* Admin Manage Student Marks Table Styles */
#adminMarksMainTable {
    width: 100%;
    border-collapse: collapse;
}

#adminMarksMainTable th {
    background: #f1f5f9;
    color: #1e293b;
    font-size: 0.8rem;
    padding: 10px 8px;
    vertical-align: middle;
    border: 1px solid #cbd5e1;
}

#adminMarksMainTable td {
    padding: 8px 6px;
    vertical-align: middle;
    border: 1px solid #cbd5e1;
    font-size: 0.86rem;
}

.admin-mark-input {
    width: 100%;
    max-width: 80px;
    padding: 6px 4px;
    font-size: 0.92rem;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    transition: all 0.15s;
    background: #ffffff;
    box-sizing: border-box;
}

.admin-mark-input:focus {
    border-color: #10316b;
    box-shadow: 0 0 0 3px rgba(16, 49, 107, 0.15);
    outline: none;
}

.admin-mark-input.input-error {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
}

.admin-att-select {
    padding: 6px 6px;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    cursor: pointer;
}

.admin-att-select.att-absent,
.admin-att-select.att-ab {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border-color: #f87171 !important;
}

.admin-att-select.att-na {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
}

.admin-att-select.att-medical {
    background: #fef3c7;
    color: #b45309;
    border-color: #fcd34d;
}

/* Master Cumulative Marks Table Styling & Sticky Header */
#panel-manage-marks {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

#adminMarksTableContainer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#adminMarksTableContainer .mgr-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#adminMarksTableContainer .mgr-card-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
}

#adminMarksTableContainer .mgr-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
    display: block;
}

#adminMarksMainTable {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
}

#adminMarksMainTable thead {
    position: sticky;
    top: 0;
    z-index: 20;
}

#adminMarksMainTable thead tr.tp-cumul-hdr-row-1 th {
    position: sticky;
    top: 0;
    z-index: 22;
}

#adminMarksMainTable thead tr.tp-cumul-hdr-row-2 th {
    position: sticky;
    top: 38px;
    z-index: 21;
}

#adminMarksMainTable thead tr.tp-cumul-hdr-row-3 th {
    position: sticky;
    top: 72px;
    z-index: 20;
}

/* Sticky Student Identity Columns (Roll No, Student Name, Student ID) */
.admin-col-sticky-1 {
    position: sticky !important;
    left: 0 !important;
    width: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
    box-sizing: border-box;
}

.admin-col-sticky-2 {
    position: sticky !important;
    left: 55px !important;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    box-sizing: border-box;
}

.admin-col-sticky-3 {
    position: sticky !important;
    left: 235px !important;
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    box-sizing: border-box;
    border-right: 2px solid #cbd5e1 !important;
}

#adminMarksMainTable thead th.admin-col-sticky-1,
#adminMarksMainTable thead th.admin-col-sticky-2,
#adminMarksMainTable thead th.admin-col-sticky-3,
#tpCumulMasterTable thead th.admin-col-sticky-1,
#tpCumulMasterTable thead th.admin-col-sticky-2,
#tpCumulMasterTable thead th.admin-col-sticky-3,
#tpCommentsTable thead th.admin-col-sticky-1,
#tpCommentsTable thead th.admin-col-sticky-2,
#tpCommentsTable thead th.admin-col-sticky-3 {
    z-index: 35 !important;
    background: #f1f5f9 !important;
}

#adminMarksMainTable tbody td.admin-col-sticky-1,
#adminMarksMainTable tbody td.admin-col-sticky-2,
#adminMarksMainTable tbody td.admin-col-sticky-3,
#tpCumulMasterTable tbody td.admin-col-sticky-1,
#tpCumulMasterTable tbody td.admin-col-sticky-2,
#tpCumulMasterTable tbody td.admin-col-sticky-3,
#tpCommentsTable tbody td.admin-col-sticky-1,
#tpCommentsTable tbody td.admin-col-sticky-2,
#tpCommentsTable tbody td.admin-col-sticky-3 {
    z-index: 5 !important;
    background: #ffffff !important;
}

#adminMarksMainTable tbody tr:hover td.admin-col-sticky-1,
#adminMarksMainTable tbody tr:hover td.admin-col-sticky-2,
#adminMarksMainTable tbody tr:hover td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr:hover td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr:hover td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr:hover td.admin-col-sticky-3,
#tpCommentsTable tbody tr:hover td.admin-col-sticky-1,
#tpCommentsTable tbody tr:hover td.admin-col-sticky-2,
#tpCommentsTable tbody tr:hover td.admin-col-sticky-3 {
    background: #f8fafc !important;
}

/* Row Highlighting for Ranks 1 (Gold), 2 (Silver), 3 (Bronze) and No Rank */
#adminMarksMainTable tbody tr.row-rank-1,
#adminMarksMainTable tbody tr.row-rank-1 td,
#tpCumulMasterTable tbody tr.row-rank-1,
#tpCumulMasterTable tbody tr.row-rank-1 td,
#tpCommentsTable tbody tr.row-rank-1,
#tpCommentsTable tbody tr.row-rank-1 td {
    background-color: #fef9c3 !important;
    color: #1e293b;
}

#adminMarksMainTable tbody tr.row-rank-1 td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-rank-1 td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-rank-1 td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-rank-1 td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-rank-1 td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-rank-1 td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-rank-1 td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-rank-1 td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-rank-1 td.admin-col-sticky-3 {
    background-color: #fef9c3 !important;
}

#adminMarksMainTable tbody tr.row-rank-1:hover td,
#tpCumulMasterTable tbody tr.row-rank-1:hover td,
#tpCommentsTable tbody tr.row-rank-1:hover td,
#adminMarksMainTable tbody tr.row-rank-1:hover td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-rank-1:hover td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-rank-1:hover td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-rank-1:hover td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-rank-1:hover td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-rank-1:hover td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-rank-1:hover td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-rank-1:hover td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-rank-1:hover td.admin-col-sticky-3 {
    background-color: #fef08a !important;
}

#adminMarksMainTable tbody tr.row-rank-2,
#adminMarksMainTable tbody tr.row-rank-2 td,
#tpCumulMasterTable tbody tr.row-rank-2,
#tpCumulMasterTable tbody tr.row-rank-2 td,
#tpCommentsTable tbody tr.row-rank-2,
#tpCommentsTable tbody tr.row-rank-2 td {
    background-color: #e2e8f0 !important;
    color: #1e293b;
}

#adminMarksMainTable tbody tr.row-rank-2 td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-rank-2 td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-rank-2 td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-rank-2 td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-rank-2 td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-rank-2 td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-rank-2 td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-rank-2 td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-rank-2 td.admin-col-sticky-3 {
    background-color: #e2e8f0 !important;
}

#adminMarksMainTable tbody tr.row-rank-2:hover td,
#tpCumulMasterTable tbody tr.row-rank-2:hover td,
#tpCommentsTable tbody tr.row-rank-2:hover td,
#adminMarksMainTable tbody tr.row-rank-2:hover td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-rank-2:hover td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-rank-2:hover td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-rank-2:hover td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-rank-2:hover td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-rank-2:hover td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-rank-2:hover td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-rank-2:hover td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-rank-2:hover td.admin-col-sticky-3 {
    background-color: #cbd5e1 !important;
}

#adminMarksMainTable tbody tr.row-rank-3,
#adminMarksMainTable tbody tr.row-rank-3 td,
#tpCumulMasterTable tbody tr.row-rank-3,
#tpCumulMasterTable tbody tr.row-rank-3 td,
#tpCommentsTable tbody tr.row-rank-3,
#tpCommentsTable tbody tr.row-rank-3 td {
    background-color: #ffedd5 !important;
    color: #1e293b;
}

#adminMarksMainTable tbody tr.row-rank-3 td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-rank-3 td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-rank-3 td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-rank-3 td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-rank-3 td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-rank-3 td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-rank-3 td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-rank-3 td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-rank-3 td.admin-col-sticky-3 {
    background-color: #ffedd5 !important;
}

#adminMarksMainTable tbody tr.row-rank-3:hover td,
#tpCumulMasterTable tbody tr.row-rank-3:hover td,
#tpCommentsTable tbody tr.row-rank-3:hover td,
#adminMarksMainTable tbody tr.row-rank-3:hover td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-rank-3:hover td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-rank-3:hover td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-rank-3:hover td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-rank-3:hover td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-rank-3:hover td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-rank-3:hover td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-rank-3:hover td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-rank-3:hover td.admin-col-sticky-3 {
    background-color: #fed7aa !important;
}

/* Red Row Highlighting for Students with 'No Rank' (Failed / Ineligible) */
#adminMarksMainTable tbody tr.row-no-rank,
#adminMarksMainTable tbody tr.row-no-rank td,
#tpCumulMasterTable tbody tr.row-no-rank,
#tpCumulMasterTable tbody tr.row-no-rank td,
#tpCommentsTable tbody tr.row-no-rank,
#tpCommentsTable tbody tr.row-no-rank td {
    background-color: #fee2e2 !important;
    color: #1e293b;
}

#adminMarksMainTable tbody tr.row-no-rank td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-no-rank td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-no-rank td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-no-rank td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-no-rank td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-no-rank td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-no-rank td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-no-rank td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-no-rank td.admin-col-sticky-3 {
    background-color: #fee2e2 !important;
}

#adminMarksMainTable tbody tr.row-no-rank input.admin-mark-input,
#adminMarksMainTable tbody tr.row-no-rank select.admin-att-select {
    background-color: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b;
}

#adminMarksMainTable tbody tr.row-no-rank input.admin-mark-input:focus,
#adminMarksMainTable tbody tr.row-no-rank select.admin-att-select:focus {
    background-color: #ffffff !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

#adminMarksMainTable tbody tr.row-no-rank:hover td,
#tpCumulMasterTable tbody tr.row-no-rank:hover td,
#tpCommentsTable tbody tr.row-no-rank:hover td,
#adminMarksMainTable tbody tr.row-no-rank:hover td.admin-col-sticky-1,
#adminMarksMainTable tbody tr.row-no-rank:hover td.admin-col-sticky-2,
#adminMarksMainTable tbody tr.row-no-rank:hover td.admin-col-sticky-3,
#tpCumulMasterTable tbody tr.row-no-rank:hover td.admin-col-sticky-1,
#tpCumulMasterTable tbody tr.row-no-rank:hover td.admin-col-sticky-2,
#tpCumulMasterTable tbody tr.row-no-rank:hover td.admin-col-sticky-3,
#tpCommentsTable tbody tr.row-no-rank:hover td.admin-col-sticky-1,
#tpCommentsTable tbody tr.row-no-rank:hover td.admin-col-sticky-2,
#tpCommentsTable tbody tr.row-no-rank:hover td.admin-col-sticky-3 {
    background-color: #fecaca !important;
}


#adminMarksMainTable th,
#tpCumulMasterTable th,
#tpCommentsTable th {
    font-size: 0.8rem;
    padding: 8px 6px;
    text-align: center;
    white-space: nowrap;
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    box-sizing: border-box;
}

#adminMarksMainTable td,
#tpCumulMasterTable td,
#tpCommentsTable td {
    font-size: 0.86rem;
    padding: 6px 5px;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

#adminMarksMainTable tbody tr:hover td,
#tpCumulMasterTable tbody tr:hover td,
#tpCommentsTable tbody tr:hover td {
    background-color: #f8fafc;
}

.tp-rank-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.82rem;
    white-space: nowrap;
}
.tp-rank-badge.rank-1 { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.tp-rank-badge.rank-2 { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.tp-rank-badge.rank-3 { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }

/* Color Scale & Performance Indicators Bar */
.marks-color-scale-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.marks-color-scale-title {
    font-weight: 800;
    color: #1e293b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    margin-right: 4px;
}

.marks-scale-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.78rem;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.marks-scale-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}

.marks-scale-topper {
    background: #fef08a;
    color: #854d0e;
    border-color: #eab308;
}

.marks-scale-rank1 {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}

.marks-scale-rank2 {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.marks-scale-rank3 {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}

.marks-scale-passed {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bfdbfe;
}

.marks-scale-gt {
    background: #fef3c7;
    color: #92400e;
    border-color: #fcd34d;
}

.marks-scale-pct {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.marks-scale-failed {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.marks-scale-absent {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.marks-scale-na {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
}




