/* ============================================================
   ANU Hostel Management System — styles.css
   Blue = structure & primary. Orange = needs attention.
   Green = confirmed / occupied / approved. Red = rejected / blocked.
   ============================================================ */

:root {
  --blue-800: #0A3271;
  --blue-700: #0D3E8A;
  --blue: #14509B;
  --blue-400: #5C8FD6;
  --blue-100: #E7F0FC;
  --blue-50: #F3F7FD;

  --orange-700: #B75708;
  --orange: #F07A13;
  --orange-100: #FEF1E3;

  --green-700: #0B6B41;
  --green: #12915A;
  --green-100: #E3F5EC;

  --red-700: #9E2A22;
  --red: #C8372D;
  --red-100: #FBEDEC;

  --ink: #0D1526;
  --ink-2: #2C3A4F;
  --muted: #64748B;
  --faint: #94A3B8;
  --line: #E3E8EF;
  --line-soft: #EFF2F7;
  --canvas: #F7F9FC;
  --white: #FFFFFF;

  --display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --r-xs: 6px;
  --r-sm: 9px;
  --r: 13px;
  --r-lg: 18px;
  --sh-sm: 0 1px 2px rgba(13, 21, 38, .06);
  --sh: 0 2px 10px rgba(13, 21, 38, .06);
  --sh-lg: 0 24px 60px rgba(13, 21, 38, .18);
  --side-w: 246px;
  --top-h: 64px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-family: var(--display); color: var(--ink); margin: 0; letter-spacing: -.02em; line-height: 1.22; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: .88em; letter-spacing: -.02em; }
.hidden { display: none !important; }
.wrap { width: min(1240px, 100% - 40px); margin-inline: auto; }
.muted { color: var(--muted); }

/* ---------- Public header ---------- */

.topnav {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topnav__in { height: 100%; display: flex; align-items: center; gap: 14px; }
.topnav__spacer { flex: 1; }

.brand { display: flex; align-items: center; gap: 11px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.seal {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(145deg, var(--blue), var(--blue-800));
  color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 12.5px; letter-spacing: .04em; flex: 0 0 auto;
}
.seal__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.seal__txt { display: none; }
.seal--text .seal__img { display: none; }
.seal--text .seal__txt, .seal:not(.seal--has):not(.seal--text) .seal__txt { display: block; }
.seal--has { background: #fff; border: 1px solid var(--line); padding: 3px; }
.idcard__top .seal--has, .side .seal--has { background: #fff; }

.brand__name { font-family: var(--display); font-weight: 700; font-size: 14.5px; color: var(--ink); display: block; line-height: 1.2; }
.brand__sub { font-size: 11.5px; color: var(--muted); display: block; line-height: 1.2; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 17px; border-radius: var(--r-sm);
  border: 1px solid transparent; background: var(--canvas); color: var(--ink-2);
  font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .07s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 1px 2px rgba(183, 87, 8, .28); }
.btn--primary:hover:not(:disabled) { background: var(--orange-700); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover:not(:disabled) { background: var(--blue-700); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover:not(:disabled) { background: var(--green-700); }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover:not(:disabled) { border-color: var(--blue-400); color: var(--blue); background: var(--blue-50); }
.btn--danger { background: #fff; border-color: var(--red); color: var(--red); }
.btn--danger:hover:not(:disabled) { background: var(--red-100); }
.btn--sm { padding: 6.5px 12px; font-size: 12.5px; }
.btn--wide { width: 100%; }
.btn--link { background: none; border: 0; color: var(--blue); padding: 3px; font-size: 13px; cursor: pointer; }
.btn--link:hover { text-decoration: underline; }

/* ---------- App shell ---------- */

.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; background: var(--canvas); }

.side {
  background: var(--white); border-right: 1px solid var(--line); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side__brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; border: 0; border-bottom: 1px solid var(--line-soft); margin-bottom: 10px; cursor: pointer; width: 100%; background: none; text-align: left; }
.side__label { font-size: 10.5px; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.navitem {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
  transition: background .14s, color .14s;
}
.navitem:hover { background: var(--blue-50); color: var(--blue); }
.navitem.is-on { background: var(--blue); color: #fff; font-weight: 600; }
.navitem__ic { width: 17px; text-align: center; flex: 0 0 auto; font-size: 13px; }
.navitem__count { margin-left: auto; font-family: var(--mono); font-size: 11px; background: var(--orange-100); color: var(--orange-700); padding: 1px 7px; border-radius: 999px; }
.navitem.is-on .navitem__count { background: rgba(255, 255, 255, .22); color: #fff; }

.side__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.sideuser { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; }
.sideuser__n { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.25; }
.sideuser__r { font-size: 11.5px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30; min-height: var(--top-h);
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px; padding: 10px 26px;
}
.topbar h1 { font-size: 18px; }
.topbar p { margin: 1px 0 0; font-size: 12.5px; color: var(--muted); }
.topbar__spacer { flex: 1; }
.content { padding: 22px 26px 60px; }

/* ---------- Avatars ---------- */

.av {
  border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; color: #fff;
  background: var(--blue); overflow: hidden; font-size: 12px; width: 34px; height: 34px;
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av--sm { width: 28px; height: 28px; font-size: 10.5px; }
.av--lg { width: 54px; height: 54px; font-size: 17px; }
.av--xl { width: 104px; height: 124px; font-size: 30px; border-radius: var(--r); }
.av--ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue-100); }

.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person__n { font-weight: 600; color: var(--ink); font-size: 13.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person__s { font-size: 11.5px; color: var(--muted); line-height: 1.3; }

/* ---------- Cards, metrics, tables ---------- */

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-sm); }
.card + .card { margin-top: 18px; }
.card__head { padding: 15px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.card__head h3 { font-size: 15px; }
.card__head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.card__body { padding: 20px; }
.card__spacer { flex: 1; }

.grid-m { display: grid; grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); gap: 13px; margin-bottom: 18px; }

.metric { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; position: relative; overflow: hidden; box-shadow: var(--sh-sm); }
.metric::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--blue-400); }
.metric--orange::before { background: var(--orange); }
.metric--green::before { background: var(--green); }
.metric--red::before { background: var(--red); }
.metric--blue::before { background: var(--blue); }
.metric__k { font-size: 12px; color: var(--muted); font-weight: 500; }
.metric__v { font-family: var(--display); font-weight: 800; font-size: 25px; color: var(--ink); line-height: 1.2; margin-top: 2px; }
.metric__d { font-size: 11.5px; color: var(--faint); margin-top: 1px; }

.tablescroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 18px; background: var(--blue-50); color: var(--blue-700);
  font-weight: 600; font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 9px 18px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--blue-50); }
table.data tr.clickable { cursor: pointer; }
.cell-sub { font-size: 11.5px; color: var(--muted); }
.num { font-family: var(--mono); font-size: 12.5px; }

.empty { padding: 42px 20px; text-align: center; }
.empty h4 { font-size: 15px; margin-bottom: 5px; }
.empty p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-soft); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }

/* ---------- Filters ---------- */

.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .select, .filters .input { padding: 8px 12px; font-size: 13px; width: auto; min-width: 130px; }
.filters .input--search { min-width: 268px; }
.filters__spacer { flex: 1; }
.filters__count { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }

/* ---------- Pills ---------- */

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--pending { background: var(--orange-100); color: var(--orange-700); }
.pill--active { background: var(--blue-100); color: var(--blue-700); }
.pill--success { background: var(--blue-100); color: var(--blue-700); }
.pill--final { background: var(--green-100); color: var(--green-700); }
.pill--rejected { background: var(--red-100); color: var(--red-700); }
.pill--plain { background: var(--line-soft); color: var(--muted); }
.pill--plain::before { display: none; }
.tag { display: inline-block; padding: 2px 9px; border-radius: var(--r-xs); font-size: 11.5px; font-weight: 600; background: var(--blue-50); color: var(--blue-700); border: 1px solid var(--blue-100); }

/* ---------- Forms ---------- */

.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field__hint { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.req { color: var(--orange); }

.input, .select, .textarea {
  width: 100%; padding: 9.5px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20, 80, 155, .12); }
.textarea { min-height: 84px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input.is-bad, .select.is-bad { border-color: var(--red); }
.err { color: var(--red); font-size: 12px; margin-top: 4px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }

.callout { border-left: 3px solid var(--blue); background: var(--blue-50); padding: 12px 15px; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 13px; color: var(--blue-800); margin-bottom: 18px; }
.callout--orange { border-left-color: var(--orange); background: var(--orange-100); color: var(--orange-700); }
.callout--red { border-left-color: var(--red); background: var(--red-100); color: var(--red-700); }
.callout--green { border-left-color: var(--green); background: var(--green-100); color: var(--green-700); }

/* ---------- Landing ---------- */

.hero { padding: 66px 0 54px; background: linear-gradient(180deg, var(--blue-50), #fff 72%); border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 52px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--green-700); background: var(--green-100); padding: 5px 11px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(32px, 4.2vw, 50px); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero__lede { font-size: 16.5px; color: var(--muted); margin: 16px 0 26px; max-width: 47ch; }
.hero__cta { display: flex; gap: 11px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 30px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero__stat b { font-family: var(--display); font-size: 20px; color: var(--ink); display: block; }
.hero__stat span { font-size: 12px; color: var(--muted); }

.rail { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; background: #fff; box-shadow: var(--sh); }
.rail__title { font-size: 11px; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.rail__row { display: flex; align-items: center; gap: 9px; }
.rail__node { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.rail__node--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.rail__node--orange { background: var(--orange-100); border-color: #F6CFA6; color: var(--orange-700); }
.rail__node--green { background: var(--green); border-color: var(--green); color: #fff; }
.rail__line { flex: 1; height: 2px; background: var(--line); min-width: 12px; }
.rail__fan { display: grid; grid-template-columns: 24px 1fr; margin: 11px 0; }
.rail__bracket { border-left: 2px solid var(--line); margin-left: 11px; }
.rail__parallel { display: grid; gap: 8px; }
.rail__caption { font-size: 12.5px; color: var(--muted); margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line); }

.strip { padding: 44px 0 52px; }
.strip h2 { font-size: 23px; }
.strip__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.strip__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.infocard { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: #fff; }
.infocard__step { font-family: var(--mono); font-size: 11.5px; color: var(--orange); margin-bottom: 8px; }
.infocard h3 { font-size: 15px; margin-bottom: 5px; }
.infocard p { margin: 0; font-size: 13px; color: var(--muted); }
.pagefoot { border-top: 1px solid var(--line); padding: 24px 0; font-size: 12.5px; color: var(--faint); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Auth + wizard ---------- */

.authpage { display: grid; place-items: center; padding: 44px 0 70px; background: var(--canvas); min-height: calc(100vh - var(--top-h)); }
.authcard { width: min(430px, 100%); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--sh); background: #fff; }
.authcard h2 { font-size: 21px; margin-bottom: 5px; }
.authcard > p { margin: 0 0 20px; color: var(--muted); font-size: 13.5px; }
.rolechips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.chip:hover { border-color: var(--blue-400); color: var(--blue); }
.chip.is-on { background: var(--blue-100); border-color: var(--blue-400); color: var(--blue-700); }

.applypage { background: var(--canvas); min-height: calc(100vh - var(--top-h)); padding-bottom: 60px; }
.pagehead { padding: 24px 0 16px; display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.pagehead h1 { font-size: 25px; }
.pagehead p { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }

.steps { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 3px; }
.step { flex: 1 1 0; min-width: 122px; text-align: left; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; }
.step__n { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.step__t { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.step.is-on { border-color: var(--blue); background: var(--blue-100); }
.step.is-on .step__t, .step.is-on .step__n { color: var(--blue-700); }
.step.is-done { border-color: #A9DDC2; background: var(--green-100); }
.step.is-done .step__n, .step.is-done .step__t { color: var(--green-700); }

.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; padding: 24px; box-shadow: var(--sh-sm); }
.panel__head { margin-bottom: 18px; }
.panel__head h2 { font-size: 18px; }
.panel__head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.panel__foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.saveflag { font-size: 12px; color: var(--faint); }
.saveflag b { color: var(--green-700); font-weight: 600; }

.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.drop { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 15px; background: var(--canvas); transition: border-color .15s, background .15s; }
.drop:hover { border-color: var(--blue-400); background: var(--blue-50); }
.drop.is-filled { border-style: solid; border-color: var(--green); background: var(--green-100); }
.drop__t { font-size: 13px; font-weight: 600; color: var(--ink); }
.drop__s { font-size: 11.5px; color: var(--muted); margin: 2px 0 9px; }
.drop input[type=file] { font-size: 12px; width: 100%; }
.filerow { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--green-700); font-weight: 600; }

.photopick { display: flex; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--canvas); margin-bottom: 18px; flex-wrap: wrap; }
.photopick__ph { width: 96px; height: 116px; border-radius: var(--r-sm); border: 1.5px dashed var(--line); background: #fff; display: grid; place-items: center; color: var(--faint); font-size: 11.5px; text-align: center; padding: 8px; overflow: hidden; flex: 0 0 auto; }
.photopick__ph img { width: 100%; height: 100%; object-fit: cover; }

.paygrid { display: grid; grid-template-columns: 236px 1fr; gap: 22px; }
.qrbox { border: 1px solid var(--line); border-radius: var(--r); padding: 15px; text-align: center; background: #fff; }
.qrbox svg { width: 100%; max-width: 180px; height: auto; }
.qrbox__amt { font-family: var(--display); font-weight: 800; font-size: 21px; color: var(--ink); margin-top: 9px; }
.qrbox__lbl { font-size: 11.5px; color: var(--muted); }
.paylist { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.payrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-soft); }
.payrow:last-child { border-bottom: 0; }
.payrow__k { font-size: 12px; color: var(--muted); }
.payrow__v { font-weight: 600; font-size: 13.5px; color: var(--ink); }

.reviewgroup { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.reviewgroup h4 { font-size: 11.5px; padding: 10px 16px; background: var(--canvas); border-bottom: 1px solid var(--line); font-family: var(--body); color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: 210px 1fr; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv__k { color: var(--muted); font-size: 12.5px; }
.kv__v { color: var(--ink); font-weight: 500; }

/* ---------- Timeline / signatures / ID card ---------- */

.track { display: grid; grid-template-columns: 1.12fr .88fr; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; align-content: start; }
.tl { position: relative; padding-left: 28px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 8px; width: 2px; background: var(--line); }
.tlitem { position: relative; padding-bottom: 17px; }
.tlitem:last-child { padding-bottom: 0; }
.tlitem__dot { position: absolute; left: -28px; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-size: 9.5px; color: var(--faint); }
.tlitem.is-done .tlitem__dot { background: var(--green); border-color: var(--green); color: #fff; }
.tlitem.is-now .tlitem__dot { border-color: var(--orange); color: var(--orange); box-shadow: 0 0 0 4px var(--orange-100); }
.tlitem.is-bad .tlitem__dot { background: var(--red); border-color: var(--red); color: #fff; }
.tlitem__t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tlitem.is-todo .tlitem__t { color: var(--faint); font-weight: 500; }
.tlitem__s { font-size: 12px; color: var(--muted); }
.tlgroup { border: 1px dashed var(--line); border-radius: var(--r); padding: 13px 15px; margin: 6px 0 14px; background: var(--canvas); }
.tlgroup__lbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 11px; }

.progressbar { height: 7px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 12px 0 6px; }
.progressbar span { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .45s cubic-bezier(.4, 0, .2, 1); }
.progresslbl { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

.sigs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.sig { border: 1px solid var(--line); border-radius: var(--r); padding: 11px; text-align: center; background: #fff; }
.sig__ink { height: 42px; display: grid; place-items: center; }
.sig__ink svg { height: 38px; width: auto; }
.sig__name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sig__role { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 6px; margin-top: 5px; }
.sig--wait { background: var(--canvas); border-style: dashed; }
.sig--wait .sig__ink { color: var(--faint); font-size: 11.5px; }

.idcard { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--sh); background: #fff; }
.idcard__top { background: linear-gradient(135deg, var(--blue), var(--blue-800)); color: #fff; padding: 14px 18px; display: flex; align-items: center; gap: 11px; }
.idcard__top .seal { background: rgba(255, 255, 255, .18); }
.idcard__top strong { font-family: var(--display); font-size: 13.5px; display: block; }
.idcard__top span { font-size: 11px; opacity: .88; }
.idcard__body { padding: 18px; display: grid; grid-template-columns: 104px 1fr; gap: 16px; }
.idcard__rows { display: grid; gap: 5px; align-content: start; }
.idrow { display: grid; grid-template-columns: 84px 1fr; font-size: 12.5px; }
.idrow b { color: var(--ink); font-weight: 600; }
.idrow span { color: var(--muted); }
.idcard__foot { border-top: 1px dashed var(--line); padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--faint); }

/* ---------- Hostel view ---------- */

.hostelgrid { display: grid; grid-template-columns: 1fr 336px; gap: 18px; align-items: start; }

.viewer { border: 1px solid var(--line); border-radius: var(--r); background: linear-gradient(180deg, #EEF4FD, #FFFFFF); overflow: hidden; position: relative; box-shadow: var(--sh-sm); }
#scene3d { display: block; width: 100%; height: 520px; touch-action: none; cursor: grab; }
#scene3d:active { cursor: grabbing; }
.viewer__bar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.viewer__bar > * { pointer-events: auto; }
.viewer__crumb { background: rgba(255, 255, 255, .93); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; font-size: 12.5px; font-weight: 600; color: var(--ink); box-shadow: var(--sh-sm); }
.viewer__hint { position: absolute; bottom: 12px; left: 12px; font-size: 11.5px; color: var(--muted); background: rgba(255, 255, 255, .92); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); }
.viewer__tip { position: absolute; padding: 6px 10px; background: var(--ink); color: #fff; font-size: 12px; border-radius: var(--r-xs); pointer-events: none; transform: translate(-50%, -150%); white-space: nowrap; z-index: 5; box-shadow: var(--sh); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; border: 1px solid rgba(0, 0, 0, .08); }

.segbar { display: inline-flex; padding: 3px; background: var(--canvas); border: 1px solid var(--line); border-radius: 999px; }
.segbar button { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.segbar button.is-on { background: var(--blue); color: #fff; }

.blocktabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.blocktab { border: 1px solid var(--line); background: #fff; border-radius: var(--r-sm); padding: 10px 13px; cursor: pointer; text-align: left; }
.blocktab b { font-family: var(--display); font-size: 14px; color: var(--ink); display: block; }
.blocktab span { font-size: 11.5px; color: var(--muted); }
.blocktab em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--green-700); }
.blocktab.is-on { border-color: var(--blue); background: var(--blue-50); box-shadow: inset 0 0 0 1px var(--blue); }

.floorplan { display: grid; gap: 20px; }
.floorrow__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.floorrow__head h4 { font-size: 13.5px; }
.quad { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, auto); gap: 7px; max-width: 620px; }
.quad__yard { grid-area: 2 / 2 / 7 / 7; border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: var(--green-100); display: grid; place-content: center; text-align: center; font-size: 12px; font-weight: 600; color: var(--green-700); padding: 10px; }
.quad__yard span { display: block; font-weight: 400; font-size: 10.5px; color: var(--muted); margin-top: 3px; }

.corridor { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; }
.corridor__gap { grid-column: 1 / -1; height: 20px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--line-soft), var(--line-soft) 14px, #fff 14px, #fff 28px); display: grid; place-items: center; font-size: 9.5px; color: var(--faint); letter-spacing: .18em; text-transform: uppercase; }

.roomcell { border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff; padding: 7px 4px; text-align: center; cursor: pointer; transition: transform .1s, box-shadow .15s, border-color .15s; }
.roomcell:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: var(--blue); }
.roomcell b { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.roomcell span { font-size: 10.5px; color: var(--muted); }
.roomcell--full { background: var(--green-100); border-color: #A9DDC2; }
.roomcell--full b, .roomcell--full span { color: var(--green-700); }
.roomcell--part { background: var(--orange-100); border-color: #F6CFA6; }
.roomcell--part b, .roomcell--part span { color: var(--orange-700); }
.roomcell--empty { border-style: dashed; }
.roomcell--maint { background: var(--red-100); border-color: #EFB9B4; }
.roomcell--maint b, .roomcell--maint span { color: var(--red-700); }

.beds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.bed { border: 1px solid var(--line); border-radius: var(--r); padding: 11px; display: flex; gap: 11px; align-items: center; cursor: pointer; background: #fff; transition: border-color .15s, box-shadow .15s; }
.bed:hover { border-color: var(--blue); box-shadow: var(--sh); }
.bed--free { border-style: dashed; background: var(--canvas); cursor: default; color: var(--faint); font-size: 12.5px; justify-content: center; }
.bed__no { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }

.statline { display: grid; gap: 12px; }
.statrow { display: flex; justify-content: space-between; font-size: 13px; }
.statrow b { font-family: var(--mono); color: var(--ink); }
.bar { height: 7px; background: var(--line-soft); border-radius: 999px; overflow: hidden; margin-top: 5px; }
.bar span { display: block; height: 100%; background: var(--green); }
.bar--orange span { background: var(--orange); }
.bar--blue span { background: var(--blue); }

/* ---------- Bio-data ---------- */

.bio__top { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; flex-wrap: wrap; }
.bio__id h3 { font-size: 19px; }
.bio__id p { margin: 3px 0 9px; color: var(--muted); font-size: 13px; }
.bio__chips { display: flex; gap: 7px; flex-wrap: wrap; }
.sectionlbl { font-family: var(--mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 20px 0 9px; }
.sectionlbl:first-child { margin-top: 0; }
.doclist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.docitem { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.docitem__ic { width: 30px; height: 30px; border-radius: 7px; background: var(--blue-100); color: var(--blue-700); display: grid; place-items: center; font-size: 10px; font-weight: 700; font-family: var(--mono); }
.docitem__t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.docitem__s { font-size: 11px; color: var(--muted); }
.docitem--open { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.docitem--open:hover { border-color: var(--blue); box-shadow: var(--sh); }
.docitem__go { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--blue); }

/* ---------- Modal, toast, dev ---------- */

.modal-backdrop { position: fixed; inset: 0; background: rgba(13, 21, 38, .48); display: grid; place-items: center; padding: 20px; z-index: 60; animation: fade .15s ease; }
.modal { width: min(900px, 100%); max-height: 90vh; background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-lg); display: flex; flex-direction: column; animation: rise .2s cubic-bezier(.2, .8, .2, 1); }
.modal--wide { width: min(1060px, 100%); }
.modal__head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal__head h3 { font-size: 17px; }
.modal__head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.modal__body { padding: 22px; overflow-y: auto; }
.modal__foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.xbtn { background: none; border: 0; font-size: 21px; line-height: 1; color: var(--faint); cursor: pointer; padding: 2px 6px; }
.xbtn:hover { color: var(--ink); }

.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 90; }
.toast { background: var(--ink); color: #fff; padding: 11px 15px; border-radius: var(--r-sm); font-size: 13px; box-shadow: var(--sh-lg); animation: rise .2s ease; max-width: 330px; }
.toast--ok { background: var(--green-700); }
.toast--bad { background: var(--red); }

.devpanel { position: fixed; right: 18px; bottom: 18px; width: 248px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-lg); padding: 14px; z-index: 80; }
.devpanel h4 { font-size: 12.5px; margin-bottom: 2px; }
.devpanel p { margin: 0 0 11px; font-size: 11px; color: var(--muted); }
.devpanel__list { display: grid; gap: 5px; margin-bottom: 11px; }
.devpanel__list button { text-align: left; padding: 6px 10px; font-size: 12px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.devpanel__list button:hover { background: var(--blue-50); border-color: var(--blue-400); color: var(--blue); }

.chartgrid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; margin-bottom: 18px; }
.chartbox { position: relative; height: 258px; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
.screen { animation: fade .16s ease; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Responsive ---------- */

.menubtn { display: none; }

@media (max-width: 1180px) {
  .hostelgrid, .chartgrid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 70; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--sh-lg); }
  .side.is-open { transform: none; }
  .menubtn { display: inline-flex; }
  .hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .strip__cards { grid-template-columns: repeat(2, 1fr); }
  .track, .paygrid { grid-template-columns: 1fr; }
  .corridor { grid-template-columns: repeat(5, 1fr); }
  .quad { max-width: 100%; gap: 5px; }
  .blocktabs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 26px); }
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 10px 16px; }
  .grid2, .grid3, .uploads, .doclist, .sigs, .beds { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 1px; }
  .corridor { grid-template-columns: repeat(4, 1fr); }
  #scene3d { height: 380px; }
  .filters .input--search { min-width: 100%; }
  .idcard__body { grid-template-columns: 1fr; }
}

/* ---------- Print ---------- */

@media print {
  .side, .topbar, .toasts, .devpanel, .noprint, .modal-backdrop, .topnav { display: none !important; }
  .shell { grid-template-columns: 1fr; background: #fff; }
  .content { padding: 0; }
  .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  @page { margin: 14mm; }
}
