/* ===================================
   GREENFIELD COLLEGE - MAIN STYLESHEET
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --sidebar-w: 260px;
    --topbar-h: 68px;

    --primary: #1a3a6c;
    --primary-dark: #0f2347;
    --primary-mid: #1e4a8a;
    --primary-light: #2d65c2;
    --accent: #2563eb;
    --accent-green: #16a34a;
    --accent-orange: #d97706;
    --accent-purple: #7c3aed;
    --accent-red: #dc2626;

    --bg: #f0f4f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 15px; }
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ======== LAYOUT ======== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition);
}

.page-content {
    flex: 1;
    padding: 28px 28px 40px;
    margin-top: var(--topbar-h);
}

/* ======== SIDEBAR ======== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(165deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-mid) 100%);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform var(--transition);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
    width: 40px; height: 40px;
    flex-shrink: 0;
}
.brand-logo svg { width: 100%; height: 100%; }

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.brand-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.08em;
    line-height: 1;
}
.brand-sub {
    font-size: 0.65rem;
    font-weight: 500;
    color: rgba(255,255,255,0.55);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.nav-item.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 60%;
    background: #fff;
    border-radius: 0 3px 3px 0;
}

.nav-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
}

.logout-item {
    color: rgba(255,150,150,0.8);
}
.logout-item:hover {
    background: rgba(220,50,50,0.15);
    color: #fca5a5;
}

.sidebar-footer {
    padding: 16px 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-copy {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.35);
    text-align: center;
    margin-top: 14px;
    line-height: 1.7;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    backdrop-filter: blur(2px);
}

/* ======== TOPBAR ======== */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    z-index: 90;
    box-shadow: var(--shadow-sm);
    transition: left var(--transition);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
}
.menu-toggle span {
    display: block;
    width: 20px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.topbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.notif-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}
.notif-btn:hover { background: var(--border-light); }
.notif-btn svg { width: 18px; height: 18px; color: var(--text-secondary); }
.notif-badge {
    position: absolute;
    top: -2px; right: -2px;
    width: 16px; height: 16px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
}
.user-id {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1;
}

.user-dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: flex;
}
.user-dropdown-btn svg { width: 14px; height: 14px; color: var(--text-secondary); }

.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    min-width: 180px;
    box-shadow: var(--shadow-md);
    z-index: 200;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}
.user-dropdown a:hover { background: var(--surface-2); color: var(--text-primary); }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.user-dropdown .logout-link { color: var(--accent-red); }

/* ======== CARDS & COMPONENTS ======== */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body { padding: 20px 22px; }

/* Stat cards */
.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-icon {
    width: 50px; height: 50px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.blue { background: #eff6ff; color: var(--accent); }
.stat-icon.green { background: #f0fdf4; color: var(--accent-green); }
.stat-icon.orange { background: #fffbeb; color: var(--accent-orange); }
.stat-icon.purple { background: #faf5ff; color: var(--accent-purple); }

.stat-info { flex: 1; }
.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* Summary tiles */
.summary-tile {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.tile-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.tile-icon svg { width: 24px; height: 24px; }
.tile-icon.blue { background: #dbeafe; color: #1d4ed8; }
.tile-icon.green { background: #dcfce7; color: #15803d; }
.tile-icon.purple { background: #ede9fe; color: #6d28d9; }
.tile-icon.orange { background: #fef3c7; color: #b45309; }

.tile-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}
.tile-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* Quick action buttons */
.quick-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-decoration: none;
    background: var(--surface);
    transition: all var(--transition);
    cursor: pointer;
}
.quick-action:hover { box-shadow: var(--shadow); border-color: var(--accent); transform: translateY(-1px); }
.quick-action.blue { background: linear-gradient(135deg, #eff6ff, #dbeafe); border-color: #bfdbfe; }
.quick-action.green { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }

.qa-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.qa-icon svg { width: 18px; height: 18px; }
.quick-action.blue .qa-icon { background: #2563eb; color: #fff; }
.quick-action.green .qa-icon { background: #16a34a; color: #fff; }

.qa-text { flex: 1; }
.qa-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 3px;
}
.qa-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.qa-arrow { color: var(--text-muted); }
.qa-arrow svg { width: 14px; height: 14px; }

/* ======== TABLES ======== */
.table-wrapper { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    white-space: nowrap;
}

thead th:first-child { border-radius: 0; }

tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition);
}
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child { border-bottom: none; }

tbody td {
    padding: 10px 14px;
    color: var(--text-secondary);
    vertical-align: middle;
}

tfoot td {
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--surface-2);
    border-top: 2px solid var(--border);
}

/* Grade badges */
.grade-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
}
.grade-A { background: #dcfce7; color: #15803d; }
.grade-B { background: #dbeafe; color: #1d4ed8; }
.grade-C { background: #fef3c7; color: #b45309; }
.grade-D { background: #fed7aa; color: #c2410c; }
.grade-F { background: #fee2e2; color: #b91c1c; }

.remark-pass { color: #16a34a; font-weight: 600; font-size: 0.75rem; }
.remark-fail { color: #dc2626; font-weight: 600; font-size: 0.75rem; }

/* ======== FORMS ======== */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--surface);
    transition: all var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.radio-item input[type="radio"] {
    width: 16px; height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ======== BUTTONS ======== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}
.btn-primary:hover { background: #1d4ed8; box-shadow: 0 4px 12px rgba(37,99,235,0.4); transform: translateY(-1px); }

.btn-success {
    background: var(--accent-green);
    color: #fff;
    box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}
.btn-success:hover { background: #15803d; }

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}
.btn-danger:hover { background: #b91c1c; }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; width: 100%; justify-content: center; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ======== ALERTS ======== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ======== ANNOUNCEMENTS ======== */
.announcement-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.announcement-item:last-child { border-bottom: none; }

.ann-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 6px;
}

.ann-content { flex: 1; }
.ann-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
}
.ann-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Quick links */
.quick-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition);
    border: 1px solid transparent;
}
.quick-link:hover {
    background: var(--surface-2);
    color: var(--accent);
    border-color: var(--border);
}
.quick-link svg { width: 14px; height: 14px; }

/* Admin access grid */
.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.access-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all var(--transition);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-secondary);
}
.access-item:hover { color: var(--accent); background: #eff6ff; border-color: #bfdbfe; }
.access-item svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Admin activity */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; }

.act-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.act-icon svg { width: 14px; height: 14px; color: var(--accent); }

.act-text {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.act-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ======== PAGE GRIDS ======== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }

.page-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

/* Student info panel */
.student-profile-card {
    display: flex;
    align-items: center;
    gap: 20px;
}
.student-avatar-lg {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: 3px solid var(--border);
}
.student-meta { flex: 1; }
.student-name-lg {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.meta-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    align-items: center;
}
.meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
}
.meta-value {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.meta-sep { color: var(--text-muted); }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}
.page-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
    text-decoration: none;
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Search / filter bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}
.search-input-wrap svg {
    position: absolute;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    width: 15px; height: 15px;
    color: var(--text-muted);
    pointer-events: none;
}
.search-input-wrap .form-control { padding-left: 36px; }

/* Status badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-info { background: #dbeafe; color: #1d4ed8; }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); }

/* Print result slip */
.result-slip {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
}
.slip-header {
    text-align: center;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 16px;
    margin-bottom: 20px;
}
.slip-school {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.05em;
}
.slip-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.slip-semester {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.slip-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.82rem;
}
.slip-info span { color: var(--text-muted); font-weight: 500; }
.slip-sign {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ======== LOGIN PAGE ======== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}
.login-logo-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px;
}
.login-logo-icon svg { width: 36px; height: 36px; }
.login-school {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.06em;
}
.login-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.login-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.login-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.login-input-icon {
    position: relative;
}
.login-input-icon svg {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}
.login-input-icon .form-control { padding-left: 40px; }

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 0.82rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.forgot-link:hover { text-decoration: underline; }

.role-tabs {
    display: flex;
    background: var(--surface-2);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
}
.role-tab {
    flex: 1;
    padding: 8px;
    text-align: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
    border: none;
    background: none;
    font-family: inherit;
}
.role-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

/* ======== UTILITY ======== */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.78rem; }
.fw-700 { font-weight: 700; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.view-all-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}
.view-all-link:hover { text-decoration: underline; }
.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ======== RESPONSIVE ======== */
@media (max-width: 1200px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 992px) {
    :root { --sidebar-w: 0px; }

    .sidebar {
        transform: translateX(-260px);
        width: 260px;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open { display: block; }

    .main-content { margin-left: 0; }
    .topbar { left: 0; }
    .menu-toggle { display: flex; }
    .grid-2 { grid-template-columns: 1fr; }
    .page-content { padding: 20px 18px 32px; }
}

@media (max-width: 768px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .grid-3 { grid-template-columns: 1fr; }
    .access-grid { grid-template-columns: 1fr; }
    .student-profile-card { flex-direction: column; text-align: center; }
    .topbar-title { font-size: 0.9rem; }
    .user-details { display: none; }
    .page-content { padding: 16px 14px 28px; }
    .card-body { padding: 16px; }
    .stat-value { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; gap: 10px; }
    .stat-icon { width: 40px; height: 40px; }
    .stat-icon svg { width: 18px; height: 18px; }
    .stat-value { font-size: 1.2rem; }
    .login-card { padding: 28px 22px; }
    .filter-bar { flex-direction: column; }
    .filter-bar > * { width: 100%; }
}

/* ======== PRINT ======== */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0; }
    .page-content { margin-top: 0; padding: 0; }
    .result-slip { border: 1px solid #000; box-shadow: none; }
}
