:root{
  --navy:#1a3a5c; --navy-dark:#15304d; --navy-2:#234b74;
  --gold:#e8d5a3; --gold-ink:#b98a2e; --blue:#0d6efd;
  --bg:#f0f2f5; --card:#fff; --ink:#333a44; --muted:#6b7684;
  --line:#e8edf2; --line2:#d0dce8;
  --ok:#2e8b57; --ok-bg:#e3f4e9; --warn:#a9791a; --warn-bg:#fff2d9;
  --danger:#c0392b; --danger-bg:#fbe3e3; --info:#2f6db3; --info-bg:#e7f0fb;
}
*{box-sizing:border-box; margin:0; padding:0}
body{font-family:Arial,"Segoe UI",Helvetica,sans-serif; background:var(--bg); color:var(--ink); min-height:100vh; line-height:1.5}
a{color:var(--info); text-decoration:none}
a:hover{text-decoration:underline}
.mono{font-family:"Courier New",monospace; letter-spacing:.02em}
.muted{color:var(--muted)}
em{font-style:normal}

/* ── Header (OSM style) ── */
.header{background:var(--navy); color:#fff; padding:0 28px; height:72px; display:flex;
  align-items:center; justify-content:space-between; box-shadow:0 2px 8px rgba(0,0,0,.35);
  position:sticky; top:0; z-index:100}
.header-left{display:flex; align-items:center; gap:16px}
.header-left:hover{text-decoration:none}
.header-logo{width:54px; height:54px; border-radius:50%; background:#fff; overflow:hidden;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; padding:3px}
.header-logo img{width:100%; height:100%; object-fit:contain}
.header-title{display:flex; flex-direction:column; gap:2px}
.header-title .college{font-size:18px; font-weight:bold; color:var(--gold); letter-spacing:.3px}
.header-title .system{font-size:12px; color:#aac4e0; letter-spacing:.2px}
.header-right{display:flex; align-items:center; gap:16px; font-size:13px}
.user-info{color:#aac4e0}
.user-info em{color:var(--gold)}
.logout-btn{color:var(--gold); font-size:13px; padding:6px 13px; border:1px solid var(--gold); border-radius:5px}
.logout-btn:hover{background:rgba(255,255,255,.12); text-decoration:none}

/* ── Page shell ── */
.page-content{padding:26px; max-width:1200px; margin:0 auto}
.page-head{margin-bottom:22px; padding-bottom:12px; border-bottom:2px solid var(--line2)}
.page-head.row{display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; flex-wrap:wrap}
.page-head h1{font-size:22px; font-weight:bold; color:var(--navy)}
.eyebrow{font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--gold-ink); font-weight:bold; margin-bottom:4px}
.back{color:var(--muted); font-size:13px}
.footnote{margin-top:26px; font-size:13px; color:var(--muted)}
.section{font-size:16px; font-weight:bold; color:var(--navy); margin:22px 0 10px}

/* ── Cards / tiles ── */
.tiles{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px}
.tile{display:flex; flex-direction:column; gap:5px; background:var(--card); border-radius:10px;
  padding:20px; box-shadow:0 1px 5px rgba(0,0,0,.07); color:var(--ink); position:relative;
  border-top:3px solid var(--navy); transition:box-shadow .12s, transform .12s}
.tile:hover{box-shadow:0 6px 18px rgba(26,58,92,.14); transform:translateY(-2px); text-decoration:none}
.tile-tag{font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--gold-ink); font-weight:bold}
.tile-title{font-size:17px; font-weight:bold; color:var(--navy)}
.tile-desc{font-size:13px; color:var(--muted)}
.tile-soon{margin-top:6px; align-self:flex-start; font-size:11px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--gold-ink); background:#faf5e9; border:1px solid #ecdcb4; padding:2px 8px; border-radius:100px}
.panel,.card{background:var(--card); border-radius:10px; padding:18px 20px; box-shadow:0 1px 5px rgba(0,0,0,.07); margin-bottom:18px}
.panel h3{font-size:14px; font-weight:bold; color:var(--navy); margin-bottom:12px; padding-bottom:7px; border-bottom:1px solid var(--line)}
.meta{color:var(--muted); font-size:13px; margin:2px 0}
.body-text{white-space:pre-wrap; margin-top:10px}
.attach{font-size:13px; margin-top:10px}
.resolution{margin-top:12px; padding:10px 12px; background:var(--ok-bg); border-radius:6px; font-size:13px}

/* ── Buttons ── */
.btn{display:inline-block; padding:9px 16px; font-size:14px; font-family:inherit; font-weight:bold;
  border:0; border-radius:6px; cursor:pointer; text-align:center}
.btn:hover{text-decoration:none}
.btn-primary{background:var(--navy); color:#fff}
.btn-primary:hover{background:var(--navy-dark)}
.btn-ghost{background:#fff; border:1px solid var(--line2); color:var(--navy)}
.btn-ghost:hover{background:#eef2f6}
.btn-inline{width:auto}
.btn-block,.btn-full{width:100%; margin-top:4px}
.link-btn{background:none; border:0; color:var(--danger); cursor:pointer; font-size:13px; padding:0}

/* ── Forms ── */
label{display:block; font-size:13px; font-weight:bold; color:var(--navy); margin:0 0 6px}
input,select,textarea{width:100%; padding:10px 12px; margin-bottom:14px; font-size:14px; font-family:inherit;
  color:var(--ink); background:#fff; border:1px solid var(--line2); border-radius:6px}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--navy-2); box-shadow:0 0 0 3px rgba(26,58,92,.12)}
.form-wide{max-width:640px; background:var(--card); padding:22px; border-radius:10px; box-shadow:0 1px 5px rgba(0,0,0,.07)}
.actions{display:flex; gap:10px; justify-content:flex-end}
.actions .btn{width:auto}
.check{display:flex; align-items:center; gap:8px; font-weight:normal; font-size:13px; color:var(--ink); margin:2px 0 12px}
.check input{width:auto; margin:0}
.alert{padding:11px 14px; border-radius:6px; font-size:13px; margin-bottom:16px}
.alert-error{background:var(--danger-bg); border:1px solid #eab8b8; color:var(--danger)}
.alert-warning{background:var(--warn-bg); border:1px solid #eaddb0; color:var(--warn)}

/* ── Login ── */
.login-wrap{min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px}
.login-box{width:100%; max-width:400px; background:#fff; border-radius:12px; padding:34px 30px;
  box-shadow:0 6px 30px rgba(26,58,92,.18); border-top:4px solid var(--gold)}
.login-header{text-align:center; margin-bottom:22px}
.login-header .logo-img{width:74px; height:74px; object-fit:contain; margin-bottom:12px}
.login-header h2{font-size:18px; color:var(--navy)}
.login-header p{font-size:12px; color:var(--muted); margin-top:3px}
.login-note{font-size:13px; color:var(--muted); margin-bottom:16px; text-align:center}
.login-switch{margin-top:16px; font-size:13px; color:var(--muted); text-align:center}

/* ── Tabs / search ── */
.tabs{display:flex; gap:2px; border-bottom:2px solid var(--line); margin:18px 0}
.tabs a{padding:9px 14px; font-size:13px; color:var(--muted); border-bottom:3px solid transparent; margin-bottom:-2px}
.tabs a.on{color:var(--navy); border-bottom-color:var(--gold); font-weight:bold}
.tabs a:hover{color:var(--navy); text-decoration:none}
.searchbar{display:flex; gap:8px; margin-bottom:16px}
.searchbar input{margin:0}
.searchbar .btn{width:auto}

/* ── Tables ── */
.grid{width:100%; border-collapse:collapse; background:#fff; border-radius:10px; overflow:hidden; box-shadow:0 1px 5px rgba(0,0,0,.07)}
.grid th{text-align:left; font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--muted);
  padding:11px 14px; border-bottom:2px solid var(--line); background:#f7f9fb}
.grid td{padding:12px 14px; border-bottom:1px solid #eef1f4; font-size:13px}
.grid tbody tr{cursor:pointer}
.grid tbody tr:hover{background:#f4f8fc}
.grid tbody tr:last-child td{border-bottom:0}
.pager{display:flex; justify-content:space-between; align-items:center; margin-top:14px; font-size:13px; color:var(--muted)}
.pages{display:flex; gap:14px; align-items:center}
.empty{text-align:center; padding:48px 16px; color:var(--muted); background:#fff; border-radius:10px; box-shadow:0 1px 5px rgba(0,0,0,.07)}
.empty .btn{width:auto; margin-top:14px}

/* ── Badges ── */
.badge{display:inline-block; font-size:11px; font-weight:bold; padding:3px 9px; border-radius:100px; text-transform:capitalize}
.badges{display:flex; gap:6px}
.s-open{background:var(--info-bg); color:var(--info)}
.s-in_progress{background:var(--warn-bg); color:var(--warn)}
.s-resolved{background:var(--ok-bg); color:var(--ok)}
.s-closed{background:#eceff2; color:var(--muted)}
.p-low{background:#eef1f4; color:var(--muted)}
.p-normal{background:var(--info-bg); color:var(--info)}
.p-high{background:#fdecdd; color:#c26a1e}
.p-urgent{background:var(--danger-bg); color:var(--danger)}

/* ── Thread / conversation ── */
.thread{display:flex; flex-direction:column; gap:10px; margin-bottom:16px}
.msg{background:#fff; border:1px solid var(--line); border-radius:8px; padding:11px 14px; box-shadow:0 1px 3px rgba(0,0,0,.04)}
.msg.mine,.msg.staff{background:#f4f8fd; border-color:#dbe7f4}
.msg.internal{background:#fff8e8; border-color:#eadfb9}
.msg-head{font-size:12px; font-weight:bold; color:var(--navy); margin-bottom:4px}
.msg-body{white-space:pre-wrap; font-size:14px}
.tag-int{font-size:10px; background:#eadfb9; color:#8a6d1a; padding:1px 6px; border-radius:100px; margin-left:5px; text-transform:uppercase}
.reply textarea{margin-bottom:8px}
.reply .btn{width:auto}

/* ── Two-column detail ── */
.cols{display:grid; grid-template-columns:1fr 300px; gap:22px; align-items:start}
@media (max-width:820px){.cols{grid-template-columns:1fr}}
@media (max-width:600px){.header{padding:0 16px} .header-title .college{font-size:15px} .page-content{padding:18px}}
:focus-visible{outline:2px solid var(--gold); outline-offset:2px}

/* ── Booking ── */
.pickbar{display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap}
.pickbar > div{flex:1; min-width:160px}
.pickbar select,.pickbar input{margin:0}
.pickbar .btn{width:auto}
.head-actions{display:flex; gap:8px}
.slot-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px}
.slot{background:#fff; border:1px solid var(--line); border-radius:8px; padding:12px 13px; box-shadow:0 1px 4px rgba(0,0,0,.05)}
.slot.taken{background:#f4f5f7; border-style:dashed}
.slot-time{font-size:14px; font-weight:bold; color:var(--navy); margin-bottom:8px}
.slot-form{display:flex; gap:6px}
.slot-form input{margin:0; padding:7px 9px; font-size:13px}
.slot-form .btn{width:auto}
.btn-sm{padding:7px 12px; font-size:13px}
.slot-taken-label{font-size:13px; color:var(--muted)}
.slot.free .slot-taken-label{color:var(--ok)}
.day-picks{display:flex; flex-wrap:wrap; gap:6px 12px; margin-bottom:14px}
.daycheck{display:flex; align-items:center; gap:5px; font-weight:normal; font-size:13px; margin:0}
.daycheck input{width:auto; margin:0}

/* ── Booking approvals / in-charges ── */
.count-pill{background:#fff;color:var(--navy);border-radius:100px;padding:1px 7px;font-size:12px;font-weight:bold;margin-left:4px}
.approvals{display:flex;flex-direction:column;gap:12px}
.appr-card{display:flex;gap:18px;align-items:flex-start}
.appr-main{flex:1}
.appr-top{font-size:15px;color:var(--navy);margin-bottom:4px}
.appr-actions{width:220px;display:flex;flex-direction:column;gap:8px}
.appr-actions input{margin:0 0 6px}
.incharge-picks{display:flex;flex-wrap:wrap;gap:6px 14px;margin-bottom:12px}
@media (max-width:700px){.appr-card{flex-direction:column}.appr-actions{width:100%}}
