/* Korak Hub — INDIANMARK client console (Oct 2026). Corporate look: navy + red, white cards, clear tables; phone: sidebar slides in,
   tables become cards (td[data-l] shows its column name). No outside files needed. */
:root {
  --navy: #0f2e4f; --navy2: #123a63; --navy3: #1d4f82; --red: #c8102e; --bg: #f3f5f9; --card: #fff; --line: #e2e7ee; --line2: #eef1f5;
  --ink: #1b2533; --muted: #66768a; --ok: #12805c; --ok-bg: #e6f5ee; --warn: #a15c00; --warn-bg: #fff3df; --bad: #b4232c; --bad-bg: #fdecec;
  --info: #1d5fa8; --info-bg: #e8f1fb; --radius: 10px; --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 2px 10px rgba(16, 32, 56, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font: 14px/1.5 "Segoe UI", "Inter", system-ui, -apple-system, Roboto, "Noto Sans Tamil", Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--info); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
.ic { width: 18px; height: 18px; fill: currentColor; flex: none; vertical-align: -3px; }
.ic.big { width: 40px; height: 40px; opacity: .35; }

/* ── layout ── */
.shell { display: flex; min-height: 100vh; }
.side { width: 248px; background: linear-gradient(180deg, var(--navy) 0%, #0b2440 100%); color: #c9d6e6; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand .logo { width: 36px; height: 36px; border-radius: 9px; background: var(--red); display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: .5px; }
.brand b { display: block; font-size: 16px; line-height: 1.1; } .brand small { color: #9fb3cc; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav .grp { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #7f95b0; padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; color: #d4deeb; padding: 9px 12px; border-radius: 8px; margin: 2px 0; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
.nav a .cnt { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 7px; font-weight: 700; }
.side .me { border-top: 1px solid rgba(255,255,255,.08); padding: 12px 18px; font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.side .me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--navy3); color: #fff; display: grid; place-items: center; font-weight: 700; }
.side .me a { color: #c9d6e6; } .side .me small { display: block; color: #7f95b0; }
.main { margin-left: 248px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { height: 60px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.top .search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; color: var(--muted); }
.top .search input { border: 0; background: transparent; height: 38px; flex: 1; font: inherit; color: var(--ink); outline: none; min-width: 0; }
.top .sp { flex: 1; }
.top .who { font-size: 12.5px; color: var(--muted); text-align: right; } .top .who b { color: var(--ink); display: block; font-size: 13px; }
.burger { display: none; width: 40px; height: 40px; border-radius: 8px; align-items: center; justify-content: center; cursor: pointer; color: var(--navy); }
.burger:hover { background: var(--bg); }
#navT { display: none; }
.veil { display: none; }
.content { padding: 24px; max-width: 1400px; width: 100%; }
.foot { margin-top: auto; padding: 14px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); background: #fff; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ── page heading ── */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ph h1 { font-size: 22px; color: var(--navy); } .ph .sub { color: var(--muted); margin-top: 3px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── cards, KPIs ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--line2); font-weight: 650; color: var(--navy); }
.card-h .ic { color: var(--navy3); } .card-h .r { margin-left: auto; font-weight: 400; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px 18px; } .card-b.flush { padding: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--ink); position: relative; overflow: hidden; }
a.kpi:hover { text-decoration: none; border-color: #c8d3e1; transform: translateY(-1px); transition: .15s; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--navy3); }
.kpi.ok::before { background: var(--ok); } .kpi.warn::before { background: #e08a00; } .kpi.bad::before { background: var(--bad); }
.kpi-ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--info); }
.kpi.ok .kpi-ic { background: var(--ok-bg); color: var(--ok); } .kpi.warn .kpi-ic { background: var(--warn-bg); color: var(--warn); } .kpi.bad .kpi-ic { background: var(--bad-bg); color: var(--bad); }
.kpi-ic .ic { width: 22px; height: 22px; }
.kpi-l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi-v { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.15; } .kpi-n { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.grid2 > *, .grid3 > * { min-width: 0; }

/* ── tables ── */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; } .t tbody tr:hover td { background: #fafbfd; }
.t .n { text-align: right; white-space: nowrap; } .t .nw { white-space: nowrap; }
.t .main-c a { font-weight: 600; } .t small, .muted { color: var(--muted); } .t small { display: block; font-size: 12px; }

/* ── pills, flash, empty ── */
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: #eef1f5; color: #4a5a6d; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); } .pill.muted { background: #f1f3f6; color: #6b7a8c; } .pill.neutral { background: #e9edf2; color: #4a5a6d; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #c3ccd7; margin-right: 6px; vertical-align: 1px; }
.dot.ok { background: var(--ok); } .dot.warn { background: #e08a00; } .dot.bad { background: var(--bad); }
.flash { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 9px; margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe3d1; } .flash.err { background: var(--bad-bg); color: var(--bad); border: 1px solid #f2c3c6; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }

/* ── forms, buttons ── */
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 16px; }
.form .wide { grid-column: 1 / -1; }
.f { display: flex; flex-direction: column; gap: 5px; } .f > span { font-size: 12px; font-weight: 600; color: #4a5a6d; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1px solid #cfd8e3; border-radius: 8px; padding: 8px 11px; min-height: 38px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy3); box-shadow: 0 0 0 3px rgba(29, 79, 130, .14); }
.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 600; padding: 8px 15px; border-radius: 8px; border: 1px solid #cfd8e3; background: #fff; color: var(--ink); cursor: pointer; min-height: 38px; white-space: nowrap; }
.btn:hover { text-decoration: none; background: #f6f8fb; }
.btn.primary { background: var(--navy2); border-color: var(--navy2); color: #fff; } .btn.primary:hover { background: var(--navy); }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; } .btn.ghost { background: transparent; border-color: transparent; color: var(--info); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .f { min-width: 160px; } .filters .f.grow { flex: 1; min-width: 220px; }

/* ── tabs, key-value, timeline ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-color: var(--red); } .tabs a:hover { text-decoration: none; color: var(--navy); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: 13.5px; } .kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--line); margin-left: 8px; }
.tl li:last-child { border-color: transparent; }
.tl li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--navy3); }
.tl li.pub::before { border-color: var(--ok); } .tl li.int::before { border-color: #9aa8b8; }
.tl .h { font-size: 12.5px; color: var(--muted); } .tl .b { white-space: pre-wrap; margin-top: 4px; background: #f8fafc; border: 1px solid var(--line2); border-radius: 8px; padding: 9px 12px; }
.key { font-family: Consolas, "DejaVu Sans Mono", monospace; background: #0f2e4f; color: #fff; padding: 12px 14px; border-radius: 8px; word-break: break-all; }

/* ── login ── */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.login .art h2 { font-size: 34px; line-height: 1.2; margin: 22px 0 12px; } .login .art p { color: #c9d6e6; max-width: 440px; }
.login .art ul { padding-left: 18px; color: #c9d6e6; } .login .box { display: grid; place-items: center; padding: 32px; background: #fff; }
.login form { width: 100%; max-width: 360px; } .login h1 { color: var(--navy); font-size: 24px; margin-bottom: 6px; }
.login .f { margin-top: 14px; } .login .btn { width: 100%; justify-content: center; margin-top: 20px; min-height: 44px; }

/* ── phone and tablet ── */
@media (max-width: 1100px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .2s; }
  #navT:checked ~ .shell .side { box-shadow: 0 0 40px rgba(0,0,0,.3); }
  #navT:checked ~ .shell .side { transform: none; }
  #navT:checked ~ .shell .veil { display: block; position: fixed; inset: 0; background: rgba(10, 25, 45, .45); z-index: 25; }
  .main { margin-left: 0; } .burger { display: inline-flex; }
  .top { padding: 0 12px; } .top .who { display: none; } .content { padding: 16px; }
  .ph h1 { font-size: 19px; }
  .t.cards thead { display: none; }
  .t.cards, .t.cards tbody, .t.cards tr, .t.cards td { display: block; width: 100%; }
  .t.cards tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .t.cards td { border: 0; padding: 3px 0; text-align: left !important; }
  .t.cards td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 110px; color: var(--muted); font-size: 12px; font-weight: 600; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; }
  .login { grid-template-columns: 1fr; } .login .art { display: none; }
  .filters .f { min-width: 0; flex: 1 1 140px; }
}
@media print { .side, .top, .foot, .ph-actions, .actions, .filters, .burger { display: none !important; } .main { margin: 0; } .card { box-shadow: none; } }

/* license form: module chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid #d5dce3; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.chip:has(input:checked) { border-color: #123a63; background: #eaf0f7; color: #123a63; font-weight: 600; }
.chip input { margin: 0; accent-color: #123a63; }
