/* St. Stephen's College theme: red + navy, on top of Kaiadmin */
:root { --ssc-red: #c8102e; --ssc-navy: #1b2a5c; --ssc-gold: #f2b705; }
body { font-family: "Public Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.sidebar[data-background-color="dark"], .logo-header[data-background-color="dark"] { background: var(--ssc-navy) !important; }
.sidebar .nav-secondary > .nav-item.active > a, .sidebar .nav-secondary > .nav-item > a:hover { background: rgba(255,255,255,.08) !important; }
.sidebar .nav > .nav-item.active > a:before { background: var(--ssc-red) !important; }
.sidebar .nav > .nav-item.active a i { color: var(--ssc-gold) !important; }
.logo-header .logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; text-decoration: none; }
.logo-header .logo img { height: 36px; width: auto; }
.logo-header .logo span { font-size: 14px; line-height: 1.1; }
.btn-primary, .bg-primary { background: var(--ssc-navy) !important; border-color: var(--ssc-navy) !important; }
.btn-danger, .bg-danger { background: var(--ssc-red) !important; border-color: var(--ssc-red) !important; }
.text-primary { color: var(--ssc-navy) !important; }
.page-header .page-title { color: var(--ssc-navy); }
.card-stats .icon-big.icon-primary { background: var(--ssc-navy); }
.card-stats .icon-big.icon-danger { background: var(--ssc-red); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--ssc-navy) 0%, #2c3e7a 55%, var(--ssc-red) 140%); padding: 24px; }
.auth-card { width: 100%; max-width: 420px; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-card .brand { text-align: center; padding: 28px 24px 8px; }
.auth-card .brand img { max-width: 100%; height: 64px; }
.badge-boys { background: #2563eb; color: #fff; }
.badge-girls { background: #db2777; color: #fff; }
.table td, .table th { vertical-align: middle; }
.room-tile { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px 12px; min-height: 92px; }
.room-tile.vacant { border-left: 5px solid #16a34a; }
.room-tile.partial { border-left: 5px solid #f59e0b; }
.room-tile.full { border-left: 5px solid var(--ssc-red); }
.room-tile.closed { border-left: 5px solid #9ca3af; background: #f9fafb; }
@media (max-width: 991px) { .logo-header .logo span { display: none; } }
.badge-secondary, .badge.bg-secondary { background: #6b7280 !important; color: #fff; }
.card-stats .icon-big.icon-secondary { background: #6b7280 !important; }

/* Student profile */
.student-photo { width: 132px; height: 160px; object-fit: cover; border-radius: 8px; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(26, 42, 94, .18); }
.student-photo-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #eef1f7; color: #1a2a5e; }
.student-photo-empty span { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.student-photo-empty small { font-size: .7rem; color: #8a94ad; margin-top: .35rem; }
.signature-box { border: 1px dashed #c9cfdd; border-radius: 6px; padding: .5rem; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fcfcfe; }
.signature-box img { max-height: 54px; max-width: 100%; }
.signature-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: #8a94ad; border-top: 1px solid #e3e7f0; margin-top: .35rem; padding-top: .2rem; width: 70%; }
.kv th { padding-left: 1.5rem !important; width: 38%; white-space: nowrap; color: #6b7590; font-weight: 600; }
.detail-section { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #c8102e; font-weight: 700; border-bottom: 1px solid #edf0f6; padding-bottom: .4rem; margin-bottom: .8rem; }
.detail-label { font-size: .75rem; color: #8a94ad; }
.detail-value { font-weight: 600; color: #1a2a5e; word-break: break-word; }
.form-section { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #c8102e; font-weight: 700; padding: 0 .6rem .3rem; margin: 1.2rem 0 .3rem; border-bottom: 1px solid #edf0f6; }
.file-preview { height: 72px; border-radius: 6px; border: 1px solid #e3e7f0; object-fit: contain; background: #fff; }

/* Student mess calendar */
.mess-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mess-cal-h { font-size: .7rem; text-transform: uppercase; color: #8a94ad; text-align: center; font-weight: 700; }
.mess-cal-d { border: 1px solid #edf0f6; border-radius: 6px; padding: 3px 4px; min-height: 48px; background: #fff; }
.mess-cal-d.today { border-color: #c8102e; box-shadow: 0 0 0 1px #c8102e inset; }
.mess-cal-d.future { opacity: .4; }
.mess-cal-d .n { font-size: .75rem; font-weight: 700; color: #1a2a5e; }
.mess-cal-d .m { display: flex; gap: 2px; flex-wrap: wrap; }
.mess-cal-d .m span { font-size: .6rem; width: 15px; height: 15px; line-height: 15px; text-align: center; border-radius: 3px; background: #f1f3f8; color: #b3bacb; font-weight: 700; }
.mess-cal-d .m span.on { background: #2e7d32; color: #fff; }

/* Monthly attendance register */
.register-wrap { max-height: 75vh; }
.register { font-size: .78rem; }
.register th, .register td { padding: .25rem .3rem !important; white-space: nowrap; }
.register thead th { position: sticky; top: 0; background: #f7f8fb; z-index: 2; font-size: .72rem; }
.register .dow { font-weight: 400; color: #8a94ad; font-size: .65rem; }
.register .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; }
.register thead .sticky-col { z-index: 3; background: #f7f8fb; }
.register .wkend { background: #fafbfd; }
.register th.today { background: #fde8eb; }
.reg { display: inline-block; min-width: 20px; padding: 1px 2px; border-radius: 3px; font-weight: 700; font-size: .68rem; color: #fff; }
.reg-success { background: #31ce36; } .reg-warning { background: #ffad46; } .reg-danger { background: #f25961; } .reg-info { background: #48abf7; }
.coupon-table td, .coupon-table th { padding: .55rem .6rem !important; } .coupon-table td:nth-child(2) { min-width: 170px; }

/* Department chips on the users page */
.dept-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem .35rem .35rem; border: 1px solid #e3e7f0; border-radius: 999px; color: #1a2a5e; font-size: .85rem; font-weight: 600; text-decoration: none; background: #fff; }
.dept-chip span { background: #1a2a5e; color: #fff; border-radius: 999px; min-width: 26px; text-align: center; padding: .1rem .45rem; font-size: .75rem; }
.dept-chip:hover, .dept-chip.active { border-color: #1a2a5e; background: #eef1f7; color: #1a2a5e; }
.dept-chip-key span { background: #ffad46; }
.btn-check:checked + .btn-outline-primary { color: #fff !important; background: #1a2a5e !important; border-color: #1a2a5e !important; }
/* Dense money tables (accounts summary) */
.table-compact > :not(caption) > * > * { padding: .55rem .7rem !important; height: auto !important; font-size: 13px; }
.table-compact thead th { font-size: 11px !important; letter-spacing: .04em; }
/* Checkbox and its label on one line */
.check-row { display: flex !important; gap: .5rem; align-items: flex-start; padding-left: 0 !important; }
.check-row .form-check-input { float: none !important; margin: .2rem 0 0 0 !important; flex-shrink: 0; }

/* Live attendance */
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #16a34a; margin-right: 4px; animation: live-pulse 1.6s infinite; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.6); } 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.punch-feed { max-height: 560px; overflow-y: auto; }
.badge-light { background: #eef1f7; color: #6b7590; }
