:root {
    --primary: #146b45;
    --primary-dark: #0d4f33;
    --primary-soft: #e8f5ef;
    --gold: #c79a30;
    --danger: #b42318;
    --muted: #667085;
    --border: #e4e7ec;
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #101828;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0b3d2a 0%, #0f5b3c 100%);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 22px 16px;
    overflow-y: auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 22px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    margin-bottom: 0;
}
.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #fff;
    color: var(--primary);
    font-weight: 900;
    font-size: 22px;
}
.brand-title { font-weight: 800; line-height: 1.2; }
.brand-title span { display: block; font-size: 12px; opacity: .78; font-weight: 500; margin-top: 4px; }
.nav-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; opacity: .65; margin: 22px 12px 8px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    margin-bottom: 5px;
    color: rgba(255,255,255,.86);
    transition: .15s ease;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.14); color: #fff; }
.nav-icon { width: 24px; text-align: center; }
.main {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
}
.topbar {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: rgba(255,255,255,.9);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}
.topbar h1 { margin: 0; font-size: 22px; }
.topbar small { color: var(--muted); display: block; margin-top: 4px; }
.content { padding: 28px; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(16,24,40,.04);
}
.card-body { padding: 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.stat-card { padding: 20px; }
.stat-card .label { color: var(--muted); font-size: 13px; }
.stat-card .value { font-size: 28px; font-weight: 800; margin-top: 8px; }
.stat-card .hint { font-size: 12px; color: var(--muted); margin-top: 8px; }
.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 0;
}
.search-form { display: flex; gap: 10px; flex-wrap: wrap; }
.form-control {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    background: #fff;
    color: var(--text);
    outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea.form-control { min-height: 110px; resize: vertical; }
.form-label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 13px; }
.form-help { color: var(--muted); font-size: 12px; margin-top: 5px; }
.form-field.full { grid-column: 1 / -1; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
    min-height: 42px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-light { background: #fff; color: var(--text); border-color: var(--border); }
.btn-light:hover { background: #f9fafb; }
.btn-danger { background: #fff1f0; color: var(--danger); border-color: #fecdca; }
.btn-gold { background: #fff7e6; color: #946200; border-color: #f6d68b; }
.btn-sm { padding: 7px 10px; min-height: 34px; font-size: 12px; border-radius: 9px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: #f9fafb; }
td { font-size: 14px; }
.table-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 12px;
}
.thumb {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--border);
    background: #f2f4f7;
}
.empty {
    text-align: center;
    padding: 46px 16px;
    color: var(--muted);
}
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 0;
    border: 1px solid;
}
.alert-success { background: #ecfdf3; color: #027a48; border-color: #abefc6; }
.alert-error { background: #fff1f0; color: var(--danger); border-color: #fecdca; }
.error-list { margin: 0; padding-left: 18px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.pagination { margin-top: 16px; }
.report-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; }
.report-menu a { display: block; padding: 11px 12px; border-radius: 11px; margin-bottom: 6px; color: var(--muted); }
.report-menu a.active, .report-menu a:hover { color: var(--primary-dark); background: var(--primary-soft); font-weight: 800; }

/* Professional login page based on the college reference design */
.login-page-pro {
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #ffffff;
}
.login-pro-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 48% 52%;
    background: #ffffff;
}
.login-pro-left {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 18%, rgba(255,255,255,.22), transparent 28%),
        linear-gradient(140deg, #0b4b33 0%, #06371f 62%, #0e5d3d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 38px;
}
.login-pro-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 100%),
        linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 100%);
    background-size: 56px 56px;
    opacity: .18;
}
.login-pro-content {
    position: relative;
    width: min(470px, 100%);
    z-index: 2;
}

.login-card-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.login-card-brand-text {
    min-width: 0;
}
.login-card-brand-text h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    color: #0b1f17;
    font-weight: 850;
}
.login-card-brand-text p {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--muted);
}
.login-pro-card {
    width: 100%;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.68);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0,0,0,.28);
    padding: 26px;
    backdrop-filter: blur(8px);
}
.login-pro-card .login-title {
    text-align: left;
    margin-bottom: 20px;
}
.login-pro-card .login-title h1 {
    margin: 0 0 4px;
    font-size: 28px;
    color: #0b1f17;
}
.login-pro-card .login-title p {
    margin: 0;
    color: var(--muted);
}
.login-field {
    margin-bottom: 14px;
}
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 18px;
    color: var(--muted);
    font-size: 14px;
}
.login-actions {
    margin-top: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}
.login-actions .btn {
    justify-content: center;
}
.login-pro-right {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(5, 77, 45, .10), transparent 32%),
        #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 46px;
}
.login-pro-right-top {
    position: absolute;
    top: 0;
    left: 18%;
    right: 0;
    height: 46px;
    background: linear-gradient(90deg, #0d5f3c 0%, #0b6c43 58%, rgba(13,95,60,.12) 58%, rgba(13,95,60,.12) 100%);
}
.login-pro-logo-stage {
    width: min(520px, 78%);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle, rgba(255,255,255,.98) 0 52%, rgba(230,247,237,.92) 53% 57%, rgba(20,107,69,.12) 58% 100%);
    box-shadow: inset 0 0 0 1px rgba(20,107,69,.08);
}
.login-pro-logo-stage img {
    width: 78%;
    height: 78%;
    object-fit: contain;
    display: block;
}
.login-pro-fallback-logo {
    width: 72%;
    height: 72%;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 92px;
    font-weight: 900;
}
.login-pro-ribbon {
    position: absolute;
    left: 9%;
    right: 5%;
    bottom: 34px;
    min-height: 60px;
    background: linear-gradient(90deg, #19854e, #0c6b43);
    color: #ffffff;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 11px 18px;
    box-shadow: 0 12px 28px rgba(8,71,43,.22);
}
.login-pro-ribbon strong {
    display: block;
    font-size: 18px;
    letter-spacing: .04em;
}
.login-pro-ribbon span {
    display: block;
    font-size: 12px;
    margin-top: 2px;
    opacity: .9;
}
.print-only { display: none; }


@media (max-width: 900px) {
    .login-page-pro { overflow: auto; }
    .login-pro-shell { display: block; min-height: 100vh; }
    .login-pro-left { min-height: 100vh; padding: 24px; }
    .login-pro-right { display: none; }
    .login-pro-brand h2 { font-size: 20px; }
    .login-pro-card { padding: 22px; }
}

@media print {
    .sidebar, .topbar, .no-print, .toolbar, .report-menu, .form-actions { display: none !important; }
    .main { margin: 0; width: 100%; }
    .content { padding: 0; }
    .card { box-shadow: none; border: none; }
    body { background: #fff; }
    .print-only { display: block; }
}
@media (max-width: 980px) {
    .sidebar { position: relative; width: 100%; inset: auto; }
    .app-shell { display: block; }
    .main { width: 100%; margin-left: 0; }
    .grid-2, .grid-3, .grid-4, .report-layout { grid-template-columns: 1fr; }
    .topbar { height: auto; align-items: flex-start; gap: 14px; padding: 18px; flex-direction: column; }
    .content { padding: 18px; }
}
.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}
.settings-logo-preview {
    width: 92px;
    height: 92px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 6px;
}
