/* KVR College Office — additions to /admin/admin.css */
.year-pick { padding: 10px 18px 4px; }
.year-pick label { font-size: .78rem; color: #c9adb2; display: block; margin-bottom: 3px; }
.year-pick select { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.year-pick option { color: #000; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.filters label.field { margin-bottom: 0; min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }

/* attendance posting */
.periods { display: flex; flex-wrap: wrap; gap: 6px; }
.periods button { min-width: 54px; padding: 8px 10px; border: 1px solid #c9c6bf; border-radius: 6px; background: #fff; font: 600 1rem var(--sans); cursor: pointer; position: relative; }
.periods button[aria-pressed="true"] { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.periods button .tick { display: block; font-size: .7rem; font-weight: 600; color: var(--neem); }
.periods button[aria-pressed="true"] .tick { color: #f3d58c; }
.roll { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.roll button { width: 100%; display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.roll button:hover { border-color: #b9b5ad; }
.roll .rn { font-weight: 700; font-size: 1.05rem; text-align: center; }
.roll .nm { line-height: 1.25; }
.roll .st { font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #e2efe6; color: var(--neem); }
.roll button[aria-pressed="true"] { background: #fbeaea; border-color: #e3a9ad; }
.roll button[aria-pressed="true"] .st { background: var(--danger); color: #fff; }
.roll.disabled button { cursor: default; opacity: .75; }
.save-bar { position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 12px 20px; margin: 16px -20px -18px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-radius: 0 0 8px 8px; }
.save-bar .counts { flex: 1; font-weight: 600; }
.counts .a { color: var(--danger); }

/* registers and reports */
.reg th, .reg td { text-align: center; }
.reg td.l, .reg th.l { text-align: left; }
.cell-a { color: var(--danger); font-weight: 700; }
.cell-p { color: var(--neem); }
.cell-n { color: #aaa; }
.res-Eligible { color: var(--neem); font-weight: 600; }
.res-Condonation { color: #8a5d00; font-weight: 600; }
.res-Detained { color: var(--danger); font-weight: 700; }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.class-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.class-card h3 { margin: 0 0 2px; }
.dots { display: flex; gap: 5px; margin: 8px 0 6px; }
.dot { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; background: #f0efec; color: #999; text-decoration: none; }
.dot.done { background: #e2efe6; color: var(--neem); }
.dot.nh { background: #eee; color: #888; text-decoration: line-through; }
a.dot:hover { outline: 2px solid var(--maroon); }

/* student form */
.student-head { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.photo-box img, .photo-box .ph { width: 120px; height: 150px; object-fit: cover; border-radius: 6px; background: #f0efec; display: flex; align-items: center; justify-content: center; color: #999; font-size: .85rem; border: 1px solid var(--line); }
.photo-box .btn-row { margin-top: 6px; }
fieldset.group { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px 2px; margin: 0 0 16px; }
fieldset.group legend { font-weight: 700; padding: 0 6px; color: var(--maroon); }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.aadhaar { font-family: Consolas, monospace; letter-spacing: .05em; }
.thumb-s { width: 32px; height: 40px; object-fit: cover; border-radius: 3px; background: #eee; vertical-align: middle; }
.key-box { font-family: Consolas, monospace; background: #f4f3f0; padding: 10px; border-radius: 6px; word-break: break-all; }
pre.code { background: #f4f3f0; padding: 10px; border-radius: 6px; overflow-x: auto; font-size: .85rem; }

@media (max-width: 860px) {
  .row4 { grid-template-columns: 1fr 1fr; }
  .student-head { grid-template-columns: 1fr; }
  .roll { grid-template-columns: 1fr; }
  .save-bar { margin: 16px -14px -18px; padding: 10px 14px; }
}

/* printing: reports and student profile */
.print-only { display: none; }
@media print {
  body { background: #fff; font-size: 11pt; }
  .side, .no-print, .filters, .btn, #toast, .page-top .btn-row { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .panel { border: 0; padding: 0; }
  .print-only { display: block; }
  .table th, .table td { padding: 3px 5px; }
  fieldset.group { break-inside: avoid; }
  input, select, textarea { border: 0 !important; padding: 0 !important; background: none !important; }
}

/* print only a chosen block (receipts, pay slips, bills) */
#print-root { display: none; }
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
}
@page { margin: 12mm; }
.doc { font-size: 10.5pt; color: #000; }
.doc h1 { font-size: 15pt; margin: 0; text-align: center; }
.doc .sub { text-align: center; margin: 2px 0 8px; font-size: 9.5pt; }
.doc .title { text-align: center; font-weight: 700; border-top: 1.5px solid #000; border-bottom: 1.5px solid #000; padding: 3px 0; margin: 6px 0 10px; letter-spacing: .02em; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { border: 1px solid #555; padding: 3px 6px; text-align: left; vertical-align: top; }
.doc td.r, .doc th.r { text-align: right; }
.doc .meta td { border: 0; padding: 2px 0; }
.doc .sign { display: flex; justify-content: space-between; margin-top: 34px; }
.doc .small { font-size: 8.5pt; }
.doc .cancelled { color: #a00; font-weight: 700; text-align: center; font-size: 14pt; border: 2px solid #a00; padding: 4px; margin: 6px 0; }
.doc.receipt { max-width: 150mm; }
.doc .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.money { text-align: right; font-variant-numeric: tabular-nums; }
.total-row td { font-weight: 700; background: #f4f3f0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px; font: 600 .95rem var(--sans); cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--maroon); border-bottom-color: var(--maroon); }
.picker { position: relative; }
.picker-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.12); max-height: 280px; overflow-y: auto; }
.picker-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 12px; cursor: pointer; font: inherit; }
.picker-list button:hover, .picker-list button:focus-visible { background: #f4f3f0; }
.marks-grid input { width: 80px; text-align: right; }
.bar { height: 10px; background: var(--maroon); border-radius: 2px; display: inline-block; vertical-align: middle; }
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stat-row .stat { flex: 1; min-width: 150px; }

/* exam seating: room grid with the board at the top */
.room-grid-wrap { overflow-x: auto; }
.room-grid-wrap .board { text-align: center; font-size: .8rem; letter-spacing: .04em; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; padding: 3px; margin: 0 auto 8px; max-width: 360px; }
.room-grid { border-collapse: separate; border-spacing: 0 6px; margin: 0 auto; }
.room-grid th { font-size: .75rem; color: var(--muted); font-weight: 600; padding: 0 4px; text-align: center; }
.room-grid td { padding: 0; }
.room-grid td.aisle, .room-grid th.aisle { width: 22px; }
.room-grid td.seat { min-width: 96px; height: 38px; border: 1px solid #b9b2a6; border-left-width: 0; background: #fff; text-align: center; vertical-align: middle; line-height: 1.1; padding: 2px 5px; }
.room-grid td.seat.bench-start, .room-grid td.seat:first-child { border-left-width: 1px; border-radius: 4px 0 0 4px; }
.room-grid td.seat.bench-end { border-radius: 0 4px 4px 0; }
.room-grid td.seat.bench-start.bench-end { border-radius: 4px; }
.room-grid td.seat b { display: block; font-variant-numeric: tabular-nums; font-size: .86rem; }
.room-grid td.seat small { font-size: .7rem; color: #555; }
.room-grid td.empty { background: #f6f4ef; }
.room-grid td.unusable { min-width: 96px; text-align: center; color: #b00; background: repeating-linear-gradient(45deg, #fff, #fff 4px, #f3e3e3 4px, #f3e3e3 8px); border: 1px solid #e0c4c4; }
.room-grid td.nobench { min-width: 96px; }
.room-grid td.g1 { background: #eef4fb; } .room-grid td.g2 { background: #f6f1e4; } .room-grid td.g3 { background: #eef6ee; }
.room-grid td.g4 { background: #f7eef4; } .room-grid td.g5 { background: #f0eef8; } .room-grid td.g6 { background: #eef7f6; } .room-grid td.g7 { background: #f8f0ea; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; }
tr.is-hidden td { color: #999; }
table.dform td { width: 16.6%; }
.notice-doc td, .notice-doc th { font-size: 12pt; padding: 6px 8px; }
/* landscape pages for wide printouts (seating plans, room summary) */
@page wide { size: A4 landscape; margin: 10mm; }
@media print {
  body.print-landscape #print-root { page: wide; }
  .seat-doc .room-grid td.seat { min-width: 0; height: 30px; background: #fff !important; }
  .seat-doc .room-grid td.seat b { font-size: 9.5pt; }
  .seat-doc .room-grid td.empty { background: #fff; }
  .seat-doc { break-after: page; page-break-after: always; }
  .seat-doc:last-child { break-after: auto; page-break-after: auto; }
  .seat-doc .room-grid { table-layout: fixed; width: 100%; }
  .seat-doc .room-grid td.aisle, .seat-doc .room-grid th.aisle { width: 3%; border: 0; }
}

/* exam rooms: column-by-column bench editor */
.col-builder { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.col-cell { display: grid; gap: 4px; padding: 8px; border: 1px solid #d9d2c6; border-radius: 6px; background: #faf8f4; min-width: 104px; }
.col-cell .col-name { font-weight: 600; font-size: .85rem; }
.col-cell label { display: grid; gap: 2px; font-size: .78rem; color: #555; }
.col-cell input, .col-cell select { width: 100%; }
