:root {
  --ink: #1b2430; --ink-2: #4a5566; --ink-3: #7a8494;
  --line: #e3e6eb; --line-2: #d3d8df;
  --bg: #f6f7f9; --panel: #ffffff;
  --brand: #1f3a5f; --brand-2: #2d5487; --brand-tint: #e9eff7;
  --good: #1d7a4f; --good-tint: #e6f4ec;
  --warn: #9a6200; --warn-tint: #fdf3e1;
  --bad: #b3261e; --bad-tint: #fbe9e7;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.45; }
a { color: var(--brand-2); }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-3); }
.boot { padding: 48px; color: var(--ink-3); }

/* ---- sign-in / setup cards ---- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 420px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.card.wide { max-width: 560px; }
.brandline { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.brandline img { width: 34px; height: 34px; }
.brandline b { font-size: 15px; }
.brandline span { display: block; font-size: 12px; color: var(--ink-3); }

/* ---- forms ---- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin: 12px 0 5px; }
input, select, textarea { width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-tint); border-color: var(--brand-2); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); margin: 10px 0; }
.check input { width: auto; }
button, .btn { font: inherit; font-weight: 600; border-radius: 8px; padding: 9px 14px; border: 1px solid var(--brand); background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover { background: var(--brand-2); }
button.ghost, .btn.ghost { background: #fff; color: var(--brand); border-color: var(--line-2); }
button.ghost:hover, .btn.ghost:hover { background: var(--brand-tint); }
button.danger { background: #fff; color: var(--bad); border-color: #f0c9c5; }
button.small, .btn.small { padding: 5px 10px; font-size: 12.5px; }
button:disabled { opacity: .55; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.err { background: var(--bad-tint); color: var(--bad); border-radius: 8px; padding: 9px 12px; margin-top: 12px; font-size: 13px; }
.ok { background: var(--good-tint); color: var(--good); border-radius: 8px; padding: 9px 12px; margin-top: 12px; font-size: 13px; }
.note { background: var(--warn-tint); color: #6b4500; border-radius: 8px; padding: 10px 12px; font-size: 13px; }

/* ---- app shell ---- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: #dfe7f2; padding: 18px 12px; display: flex; flex-direction: column; gap: 2px; }
.side .logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.side .logo img { width: 30px; height: 30px; }
.side .logo b { font-size: 14.5px; display: block; }
.side .logo span { font-size: 11.5px; color: #a9bad1; }
.side a { color: #dfe7f2; text-decoration: none; padding: 8px 10px; border-radius: 7px; display: flex; justify-content: space-between; align-items: center; }
.side a:hover { background: rgba(255, 255, 255, .07); }
.side a.on { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.side a.soon { color: #8ea2bf; pointer-events: none; }
.side .group { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8ea2bf; padding: 16px 10px 6px; }
.side .group-btn { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; width: 100%; cursor: pointer; margin-top: 10px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; padding: 10px 10px; border-radius: 7px; background: rgba(255, 255, 255, .06); }
.side .group-btn:hover { background: rgba(255, 255, 255, .11); }
.side .group-btn:focus-visible { outline: 2px solid #64C2E6; outline-offset: 1px; }
.side .group-btn .chev { font-size: 12px; color: #a9bad1; }
.side .grp { display: flex; flex-direction: column; gap: 1px; padding: 4px 0 4px 8px; }
.side .grp[hidden] { display: none; }
.tag { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #c9d6e8; }
.main { padding: 0 0 48px; min-width: 0; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 2; }
.test-banner { font-size: 12px; font-weight: 600; color: var(--warn); background: var(--warn-tint); padding: 4px 10px; border-radius: 99px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.who b { font-weight: 600; }
.page { padding: 24px 28px; max-width: 1180px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.kpis { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.kpi b { display: block; font-size: 20px; font-weight: 650; }
.kpi span { font-size: 12px; color: var(--ink-3); }
.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--brand-tint); color: var(--brand); }
.pill.grey { background: #eef0f3; color: var(--ink-2); }
.pill.bad { background: var(--bad-tint); color: var(--bad); }
.pill.good { background: var(--good-tint); color: var(--good); }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ---- dialog ---- */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgba(16, 24, 40, .25); }
dialog::backdrop { background: rgba(16, 24, 40, .45); }
dialog form { padding: 22px 24px; }
.temp { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; background: var(--brand-tint); padding: 10px 12px; border-radius: 8px; margin: 8px 0; user-select: all; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side .logo { width: 100%; padding-bottom: 8px; }
  .side .group { display: none; }
  .side .group-btn { width: auto; margin: 4px; }
  .side .grp { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .top { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .page { padding: 16px; }
  .row { grid-template-columns: 1fr; }
}

/* ---- Module 1 ---- */
.proj { width: auto; padding: 6px 10px; font-weight: 600; }
.top .who:first-child { gap: 12px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.tab { background: #fff; color: var(--ink-2); border: 1px solid var(--line-2); font-weight: 600; padding: 7px 12px; }
.tab:hover { background: var(--brand-tint); }
.tab.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tab .count { font-size: 11.5px; opacity: .8; margin-left: 4px; }
.search { max-width: 320px; margin-bottom: 10px; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f8fafc; }
tr.dim td { color: var(--ink-3); }
.small { font-size: 12px; }
.bad-t { color: var(--bad); font-weight: 600; }
.kpi.bad b { color: var(--bad); }
.crumbs { font-size: 13px; color: var(--ink-3); margin: 0 0 8px; }
.crumbs a { text-decoration: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .panel { margin-bottom: 16px; }
table.kv th { width: 38%; color: var(--ink-3); font-weight: 600; white-space: normal; }
table.kv th, table.kv td { border-bottom: 1px solid var(--line); padding: 7px 8px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
label.sub { margin-top: 4px; font-weight: 500; }
fieldset.appl { border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px 14px; margin: 14px 0 0; }
fieldset.appl legend { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 0 6px; }
details summary { cursor: pointer; color: var(--brand-2); font-weight: 600; margin-top: 12px; font-size: 13px; }
dialog.wide { width: min(720px, calc(100vw - 32px)); }
dialog form { max-height: calc(100vh - 48px); overflow-y: auto; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13.5px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

/* unit grid */
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line-2); }
.floors { display: flex; flex-direction: column; gap: 4px; overflow-x: auto; }
.floor { display: flex; gap: 4px; align-items: center; }
.fl { width: 30px; text-align: right; font-size: 11.5px; color: var(--ink-3); margin-right: 6px; flex: none; font-variant-numeric: tabular-nums; }
.unit { width: 52px; height: 28px; padding: 0; justify-content: center; font-size: 11.5px; font-weight: 600; border-radius: 6px; position: relative; flex: none; }
.s-available { background: #fff; color: var(--ink-2); border: 1px solid var(--line-2); }
.s-blocked { background: var(--warn-tint); color: var(--warn); border: 1px solid #f1d9a8; }
.s-booked { background: #dbe7f6; color: var(--brand); border: 1px solid #c3d5ee; }
.s-registered { background: var(--brand-2); color: #fff; border: 1px solid var(--brand-2); }
.s-held { background: #eceef1; color: var(--ink-2); border: 1px dashed #b8bfc9; }
.s-refuge, .s-rehab, .s-society { background: repeating-linear-gradient(45deg, #f1f2f4, #f1f2f4 4px, #e4e6ea 4px, #e4e6ea 8px); color: var(--ink-3); border: 1px solid var(--line-2); }
.unit:hover { filter: brightness(.95); background-color: inherit; }
.unit.overdue::after, .overdue-sw { content: ''; }
.unit.overdue::after { position: absolute; top: -1px; right: -1px; width: 0; height: 0; border-top: 10px solid var(--bad); border-left: 10px solid transparent; border-top-right-radius: 6px; }
.overdue-sw { background: var(--bad); border-color: var(--bad); }

/* ageing */
.ageing { display: grid; gap: 8px; max-width: 640px; }
.age { display: grid; grid-template-columns: 90px 1fr 110px; align-items: center; gap: 10px; font-size: 13px; }
.age .bar { height: 10px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.age .bar i { display: block; height: 100%; background: var(--bad); border-radius: 99px; }
.age b { text-align: right; font-variant-numeric: tabular-nums; }

/* statement */
.st-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--brand); padding-bottom: 12px; margin-bottom: 12px; }
.st-head .right { text-align: right; }
table.lines { margin: 14px 0; font-size: 12.5px; }
table.lines th, table.lines td { padding: 6px 8px; }

@media (max-width: 820px) { .two { grid-template-columns: 1fr; } .row3 { grid-template-columns: 1fr 1fr; } }
@media print {
  .no-print, .side, .top { display: none !important; }
  .shell { display: block; } body { background: #fff; } .page { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
}
.statement table.kv th { width: 16%; }
.statement table.kv td { width: 34%; }
.row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
textarea { resize: vertical; }
@media (max-width: 820px) { .row4 { grid-template-columns: 1fr 1fr; } }
.towers { display: grid; grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); gap: 16px; align-items: start; }
.towers > .panel { margin: 0; min-width: 0; }
@media (max-width: 640px) { .towers { grid-template-columns: 1fr; } }
.towers .tower h2 { margin: 0 0 10px; font-size: 16px; }

/* home: navy hero with the greeting, then project and tool tiles (same look as the staff portal's Home) */
.side .logo { text-decoration: none; flex-direction: column; align-items: flex-start; gap: 6px; }
.side .logo:hover { background: none; }
.side .logo img.wordmark { width: 128px; height: auto; }
.side .logo b { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #a9bad1; }
.side .logo div { display: flex; gap: 8px; align-items: baseline; }
.hero { background: #140C59; background-image: radial-gradient(1100px 340px at 85% -160px, rgba(100,194,230,.30), transparent 60%); color: #fff; margin: -24px -28px 0; padding: 28px 28px 74px; clip-path: inset(0 -100vmax 0 0); box-shadow: 100vmax 0 0 #140C59; }
.hero-in { display: grid; gap: 8px; }
.hero .eyebrow { font-weight: 600; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: #64C2E6; }
.hero h1 { font-size: clamp(26px, 4.2vw, 40px); font-weight: 800; line-height: 1.05; margin: 0; letter-spacing: -.02em; color: #fff; }
.hero p { margin: 0; color: #C6CCEB; max-width: 60ch; }
.hero .back { justify-self: start; color: #C6CCEB; text-decoration: none; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.hero .back:hover { color: #fff; }
.hnote { margin: -10px 0 0; color: var(--ink-3); font-size: 13px; }
.hm { margin-top: -48px; display: grid; gap: 26px; position: relative; }
.hgroup { display: grid; gap: 12px; }
.hgroup h2 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.hgroup:first-child h2 { color: #C6CCEB; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.tile { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: 0 1px 2px rgba(20,12,89,.05), 0 8px 24px rgba(20,12,89,.07); color: #140C59; text-decoration: none; min-height: 176px; }
a.tile:hover { border-color: var(--tone); transform: translateY(-2px); }
.tile .ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--tone); color: #fff; }
.tile .ic svg { width: 27px; height: 27px; }
.tile h3 { font-size: 19px; font-weight: 800; margin: 0; }
.tile p { margin: 3px 0 0; color: var(--ink-3); font-size: 14px; }
.tile .open { font-weight: 700; font-size: 14px; color: var(--tone); }
.tile .status { justify-self: start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #FBEFD9; color: #8A5A10; }
.tile.soon { background: #F7F8F5; box-shadow: none; border-style: dashed; }
.tile.soon .ic { opacity: .55; }
@media (max-width: 700px) { .hero { margin: -16px -16px 0; padding: 20px 16px 70px; } }
@media (prefers-reduced-motion: no-preference) { a.tile { transition: transform .15s, border-color .15s; } }

/* accounts registers: wide sheet-like tables */
.acc-grid { max-height: 70vh; overflow: auto; }
.acc-grid th { position: sticky; top: 0; background: #fff; z-index: 1; white-space: nowrap; }
.acc-grid td { white-space: nowrap; font-size: 12.5px; }
.acc-grid td.wrap { white-space: normal; min-width: 220px; max-width: 360px; }
.acc-grid tr[data-id] { cursor: pointer; }
.acc-grid tr[data-id]:hover td { background: #f8fafc; }
.acc-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; margin: 10px 0; }
.acc-form .wide { grid-column: 1 / -1; }
.good-t { color: var(--good); font-weight: 600; }
tr.tot td { background: #f7f8fb; }
dialog.wide { width: min(980px, 96vw); }

/* Daily To-Do */
.kpis + .panel { margin-top: 16px; }
.tdl { display: grid; margin-top: 12px; border-top: 1px solid var(--line); }
.td { display: grid; grid-template-columns: 28px 1fr 230px; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); align-items: start; }
.td.hi { border-left: 3px solid var(--bad); padding-left: 8px; }
.td.done .td-title, .td.done .td-title a { color: var(--ink-3); text-decoration: line-through; }
.td-tick input { width: 20px; height: 20px; margin-top: 2px; cursor: pointer; }
.td-title { font-weight: 650; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.td-title a { color: inherit; }
.td-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; color: var(--ink-3); }
.td-who { display: grid; gap: 6px; }
.td-who select, .td-who input { width: 100%; padding: 5px 8px; font-size: 13px; }
button.link { background: none; border: 0; padding: 0; color: var(--brand); font-size: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 760px) { .td { grid-template-columns: 28px 1fr; } .td-who { grid-column: 2; } }

/* Training */
.tr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.tr { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; }
.tr video { width: 100%; aspect-ratio: 16 / 10; background: #140C59; display: block; }
.tr-body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.tr-body h3 { margin: 0; font-size: 16.5px; }
.tr-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.sec { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 10px; }
.cancel-box { border-color: var(--bad); }

/* Dream India Realty logo on the sign-in card */
.brandlogo { display: grid; justify-items: start; gap: 6px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.brandlogo img { width: 230px; height: auto; max-width: 100%; }
.brandlogo span { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
