/* ATIR Case Portal — LTO Lahore
   Colours are taken from the LTO emblem (deep green on white) with a small gold accent.
   Everything is sized in rem so the "Text size" buttons enlarge the whole page. */

:root {
  --g-950: #03240a; --g-900: #052e0f; --g-800: #0a4219; --g-700: #0f5724; --g-600: #167034; --g-500: #2b8a49;
  --g-300: #9fcdaa; --g-200: #cfe5d4; --g-100: #e4f1e7; --g-50: #f3f8f4;
  --gold: #c79a1b; --gold-soft: #fbf3d9;
  --ink: #16201a; --ink-2: #3d4a42; --ink-3: #56625a;
  --line: #d3dcd5; --line-2: #9fafa4; --bg: #f1f5f2; --surface: #ffffff;
  --red: #a8201a; --red-soft: #fdecea; --red-line: #efb5b0;
  --amber: #8a5200; --amber-soft: #fff3d9; --amber-line: #e8cc8e;
  --blue: #0b4f9c; --blue-soft: #e7f0fb; --blue-line: #b3cbe9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(5, 46, 15, .07), 0 2px 8px rgba(5, 46, 15, .06);
  --focus: #f5b301;
}

html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }          /* 17px base: comfortable for older eyes */
html[data-size="large"] { font-size: 121.875%; }                       /* 19.5px */
html[data-size="xlarge"] { font-size: 137.5%; }                        /* 22px */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 1rem; line-height: 1.55; color: var(--ink); background: var(--bg); }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 700; color: var(--g-900); }
h2 { font-size: 1.25rem; line-height: 1.3; font-weight: 700; color: var(--g-900); }
h3 { font-size: 1.06rem; line-height: 1.35; font-weight: 700; }
a { color: var(--g-700); text-underline-offset: 3px; }
a:hover { color: var(--g-900); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.ico { flex: none; vertical-align: -0.22em; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }
.hidden, [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* a hidden label sits where its text would be; inside a sliding table it must stay inside the slide, or it makes the whole page slide sideways */
.table-wrap, .pills.slide, .card, .step, .field, th, td { position: relative; }
.stack > * + * { margin-top: 1.25rem; }
.gap-top { margin-top: 1.25rem; }

/* Anything that can be clicked shows a thick gold ring when reached with the keyboard */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* kept above the page until it is reached with the Tab key. (Not pushed out to the left: in Urdu, right-to-left, that made every page slide sideways.) */
.skip-link { position: absolute; left: 0; top: 0; transform: translateY(-120%); background: var(--focus); color: #000; padding: .7rem 1rem; font-weight: 700; z-index: 100; }
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------------ top of the page */
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead-in { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.5rem; max-width: 108rem; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: 4.1rem; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 1.45rem; line-height: 1.15; color: var(--g-900); letter-spacing: .1px; }
.brand-text span { font-size: .92rem; color: var(--ink-2); }
.masthead-space { flex: 1; }
.fbr-logo { width: 7.4rem; height: auto; flex: none; }
.textsize { display: flex; align-items: center; gap: .35rem; font-size: .9rem; color: var(--ink-2); }
.textsize button { border: 2px solid var(--line-2); background: var(--surface); border-radius: 8px; width: 2.6rem; height: 2.6rem; cursor: pointer; font-weight: 700; color: var(--g-800); line-height: 1; }
.textsize button:nth-of-type(1) { font-size: .95rem; }
.textsize button:nth-of-type(2) { font-size: 1.2rem; }
.textsize button:nth-of-type(3) { font-size: 1.5rem; }
.textsize button[aria-pressed="true"] { background: var(--g-800); border-color: var(--g-800); color: #fff; }

.shortcuts { display: flex; gap: .5rem; flex-wrap: nowrap; margin-left: 1rem; }
.shortcut { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.8rem; padding: .35rem .85rem; border: 2px solid var(--g-200); border-radius: 10px; background: var(--g-50); color: var(--g-900); font-weight: 700; font-size: .98rem; text-decoration: none; white-space: nowrap; }
.shortcut:hover { border-color: var(--g-700); background: var(--g-100); color: var(--g-900); }
.shortcut .ico { color: var(--g-700); }
.shortcut.urgent { border-color: var(--red-line); background: #fff8f7; color: var(--red); }
.shortcut.urgent .ico { color: var(--red); }
.count { display: inline-block; min-width: 1.55rem; padding: 0 .45rem; border-radius: 999px; background: var(--red); color: #fff; font-size: .85rem; font-weight: 700; line-height: 1.55rem; text-align: center; }
.clock { margin-left: auto; text-align: right; line-height: 1.2; white-space: nowrap; padding: 0 .4rem; }
.clock-time { display: block; font-size: 1.55rem; font-weight: 700; color: var(--g-900); }
.clock-date { display: block; font-weight: 600; color: var(--ink); }
.clock-zone { display: block; font-size: .8rem; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }

.userbar { background: var(--g-800); color: #fff; border-bottom: 4px solid var(--gold); }
.userbar-in { display: flex; align-items: center; gap: .9rem; padding: .45rem 1.5rem; max-width: 108rem; margin: 0 auto; }
.quick-search { display: flex; flex: 1 1 16rem; max-width: 34rem; margin: 0; }
.quick-search input { flex: 1; min-width: 0; min-height: 2.6rem; padding: .35rem .8rem; border: 2px solid #fff; border-right: 0; border-radius: 8px 0 0 8px; background: #fff; color: var(--ink); font-size: 1rem; }
.quick-search button { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.6rem; padding: .35rem .9rem; border: 2px solid #fff; border-radius: 0 8px 8px 0; background: var(--gold-soft); color: var(--g-900); font-weight: 700; cursor: pointer; }
.quick-search button:hover { background: #fff; }
.bell { position: relative; display: inline-flex; align-items: center; gap: .45rem; min-height: 2.6rem; padding: .3rem .8rem; border: 2px solid rgba(255, 255, 255, .55); border-radius: 8px; color: #fff; font-weight: 700; text-decoration: none; margin-left: auto; white-space: nowrap; }
.bell:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.bell.has-new { border-color: var(--focus); }
.userbar .who { display: flex; align-items: center; gap: .55rem; text-align: left; line-height: 1.25; white-space: nowrap; }
.userbar .who small { display: block; opacity: .85; font-size: .85rem; }
.userbar form { margin: 0; }
.btn-signout { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.6rem; padding: .35rem 1rem; background: #fff; color: var(--g-900); border: 2px solid #fff; border-radius: 8px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-signout:hover { background: var(--gold-soft); }
.menu-btn { display: none; align-items: center; gap: .5rem; min-height: 2.6rem; padding: .35rem .9rem; background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, .7); border-radius: 8px; font-weight: 700; cursor: pointer; }
.sidebar .close-menu { display: none; width: 100%; margin-bottom: .6rem; }
.bottom-nav { display: none; }
.demo-banner { background: var(--gold-soft); border-bottom: 1px solid var(--amber-line); color: #5c3b00; text-align: center; padding: .4rem 1rem; font-weight: 600; font-size: .95rem; }

.layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); max-width: 108rem; margin: 0 auto; min-height: calc(100vh - 12rem); }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: 1rem .75rem 2rem; }
.nav-group { margin: 1.1rem .7rem .35rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nav-group:first-child { margin-top: .2rem; }
.sidebar a { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; margin: .12rem 0; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 1.05rem; font-weight: 600; }
.sidebar a:hover { background: var(--g-100); color: var(--g-900); }
.sidebar a.active { background: var(--g-800); color: #fff; }
.sidebar .count { margin-left: auto; }
.sidebar a.active .count { background: #fff; color: var(--red); }
.main { padding: 1.5rem 1.75rem 3.5rem; min-width: 0; }
.footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: .9rem; padding: .9rem 1.5rem; text-align: center; }

/* ------------------------------------------------------------------ page heading */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head p { color: var(--ink-2); margin-top: .3rem; max-width: 52rem; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; margin-bottom: .8rem; padding: .35rem .2rem; }
.eyebrow { font-size: 1.05rem; font-weight: 700; color: var(--g-700); letter-spacing: .01em; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.9rem; padding: .5rem 1.15rem; background: var(--surface); color: var(--g-800); border: 2px solid var(--g-700); border-radius: 8px; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--g-100); color: var(--g-900); }
.btn.primary { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.btn.primary:hover { background: var(--g-900); border-color: var(--g-900); color: #fff; }
.btn.danger { border-color: var(--red); color: var(--red); }
.btn.danger:hover { background: var(--red-soft); }
.btn.alert { background: var(--red); border-color: var(--red); color: #fff; }
.btn.alert:hover { background: #861812; border-color: #861812; }
.btn.quiet { border-color: var(--line-2); color: var(--ink); font-weight: 600; }
.btn.big { min-height: 3.4rem; padding: .7rem 1.6rem; font-size: 1.12rem; }
.btn.small { min-height: 2.4rem; padding: .3rem .8rem; font-size: .95rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.inline-form { display: inline; margin: 0; }

/* ------------------------------------------------------------------ notices (messages to the user) */
.notice { display: flex; gap: .85rem; align-items: flex-start; padding: .95rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line); border-left-width: 7px; background: var(--surface); margin-bottom: 1.1rem; font-size: 1.05rem; }
.notice > .ico { margin-top: .12rem; }
.notice.good { background: #eaf6ed; border-color: #a9d3b3; border-left-color: var(--g-600); }
.notice.good > .ico { color: var(--g-600); }
.notice.bad { background: var(--red-soft); border-color: var(--red-line); border-left-color: var(--red); }
.notice.bad > .ico { color: var(--red); }
.notice.warn { background: var(--amber-soft); border-color: var(--amber-line); border-left-color: var(--amber); }
.notice.warn > .ico { color: var(--amber); }
.notice.info { background: var(--blue-soft); border-color: var(--blue-line); border-left-color: var(--blue); }
.notice.info > .ico { color: var(--blue); }
.notice ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.notice a { color: inherit; font-weight: 600; }
.notice.compact { font-size: 1rem; padding: .7rem .9rem; margin-bottom: .8rem; }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.card-head h2 { display: flex; align-items: center; gap: .55rem; }
.card-body { padding: 1.2rem; }
.card-body.flush { padding: 0; }
.card.attention { border-color: var(--red-line); }
.card.attention .card-head { background: var(--red-soft); border-bottom-color: var(--red-line); border-radius: var(--radius) var(--radius) 0 0; }
.card.attention .card-head h2 { color: var(--red); }
.empty { padding: 2rem 1.2rem; text-align: center; color: var(--ink-3); font-size: 1.05rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }

/* ------------------------------------------------------------------ home: big task tiles and numbers */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem; background: var(--surface); border: 2px solid var(--g-200); border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); min-height: 9.5rem; }
.tile:hover { border-color: var(--g-700); background: var(--g-50); color: var(--ink); }
.tile-icon { width: 3.2rem; height: 3.2rem; border-radius: 12px; display: grid; place-items: center; background: var(--g-800); color: #fff; }
.tile strong { font-size: 1.28rem; line-height: 1.2; color: var(--g-900); }
.tile span.desc { color: var(--ink-2); }
.tile .go { margin-top: auto; font-weight: 700; color: var(--g-700); display: inline-flex; align-items: center; gap: .4rem; }
.tile.urgent { border-color: var(--red-line); background: #fff8f7; }
.tile.urgent .tile-icon { background: var(--red); }
.tile.urgent strong, .tile.urgent .go { color: var(--red); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
a.stat:hover { border-color: var(--g-700); }
.stat .lbl { font-size: .95rem; font-weight: 600; color: var(--ink-2); }
.stat .val { font-size: 2.1rem; line-height: 1.15; font-weight: 700; color: var(--g-900); }
.stat .sub { font-size: .9rem; color: var(--ink-3); }
.stat.bad .val { color: var(--red); }
.stat.good .val { color: var(--g-600); }

.bars { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.bar-row { display: grid; grid-template-columns: minmax(7rem, 42%) 1fr 2.4rem; gap: .7rem; align-items: center; }
.bar-row .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
svg.bar { width: 100%; height: .8rem; display: block; }
.bar-bg { fill: var(--g-100); }
.bar-fill { fill: var(--g-600); }
.bar.gold .bar-fill { fill: var(--gold); }
.bar.dark .bar-fill { fill: var(--g-900); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; background: var(--g-800); color: #fff; font-size: .95rem; font-weight: 700; padding: .7rem .9rem; white-space: nowrap; }
.table th:first-child { border-top-left-radius: 0; }
.table td { padding: .8rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:nth-child(even) td { background: var(--g-50); }
.table tbody tr:hover td { background: var(--g-100); }
.table tr:last-child td { border-bottom: 0; }
.table .appeal { font-weight: 700; color: var(--g-800); white-space: nowrap; text-decoration: none; }
a.appeal { text-decoration: underline; }
.table .sub { font-size: .92rem; color: var(--ink-3); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.actions-cell { white-space: nowrap; text-align: right; }
.table td.col-case { min-width: 15rem; }
.table td.col-remarks { min-width: 14rem; }
.row-action { margin-top: .5rem; }
.table tr.is-missing td { background: #fff5f4 !important; }
.table tr.is-missing td:first-child { box-shadow: inset 5px 0 0 var(--red); }
.table.plain th { background: var(--g-50); color: var(--ink-2); border-bottom: 2px solid var(--line); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.2rem; border-top: 1px solid var(--line); }
.pager-nav { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pager-pos { font-weight: 600; }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .65rem; border-radius: 999px; font-size: .88rem; font-weight: 700; white-space: nowrap; background: #eef1ee; color: var(--ink-2); border: 1px solid var(--line-2); }
.badge.good { background: #e3f3e7; color: #14632b; border-color: #9fcdaa; }
.badge.green { background: var(--g-100); color: var(--g-800); border-color: var(--g-300); }
.badge.warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.badge.bad { background: var(--red-soft); color: var(--red); border-color: var(--red-line); }
.badge.info { background: var(--blue-soft); color: var(--blue); border-color: var(--blue-line); }

/* ------------------------------------------------------------------ forms */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.15rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem 1.25rem; align-items: start; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem; min-width: 0; }
.field-foot:empty { display: none; }
/* In a row of boxes the labels can be one or two lines long. The three parts of every field share the rows of the form grid,
   so the boxes of a row always start at the same height (browsers without "subgrid" keep the simple layout above). */
@supports (grid-template-rows: subgrid) {
  .form-grid > .field { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: .3rem; align-content: start; }
  .form-grid > .field > label, .form-grid > .field > .label-line { align-self: end; }
  .form-grid > .field-group, .form-grid > :not(.field):not(datalist) { grid-row: span 3; }
  .form-grid > .field > .tick:first-child { grid-row: 2; margin-top: 0; }
}
.field > label { font-weight: 700; font-size: 1.02rem; color: var(--ink); }
.field .req { color: var(--red); font-weight: 600; font-size: .88rem; }
.field .opt { color: var(--ink-3); font-weight: 500; font-size: .88rem; }
.field .help { color: var(--ink-3); font-size: .9rem; }
.field .error { color: var(--red); font-weight: 700; display: flex; gap: .4rem; align-items: flex-start; }
.input { width: 100%; min-height: 2.9rem; padding: .5rem .8rem; background: var(--surface); border: 2px solid var(--line-2); border-radius: 8px; font-size: 1rem; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 2.7rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f5724' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 1.25rem; }
[dir="rtl"] select.input { padding-right: .8rem; padding-left: 2.7rem; background-position: left .75rem center; }
.dd { position: relative; }
.dd-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; pointer-events: none; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: .6rem; text-align: start; cursor: pointer; font-weight: 600; }
.dd-btn .dd-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-btn .dd-text.is-blank { color: var(--ink-3); font-weight: 500; }
.dd-btn .ico { color: var(--g-700); transition: transform .15s; }
.dd-btn[aria-expanded="true"] { border-color: var(--g-700); }
.dd-btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.dd-list { position: absolute; z-index: 65; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: .35rem; list-style: none; max-height: 19rem; overflow-y: auto;
  background: var(--surface); border: 2px solid var(--g-700); border-radius: 10px; box-shadow: 0 12px 30px rgba(5, 46, 15, .22); }
.dd-list.up { top: auto; bottom: calc(100% + 6px); }
.dd-list li { display: flex; align-items: center; gap: .55rem; padding: .6rem .75rem; border-radius: 7px; cursor: pointer; line-height: 1.35; }
.dd-list li::before { content: ""; width: 1.1rem; flex: none; }
.dd-list li[aria-selected="true"] { font-weight: 700; color: var(--g-900); background: var(--g-100); }
.dd-list li[aria-selected="true"]::before { content: "✓"; color: var(--g-700); font-weight: 700; }
.dd-list li.is-active { background: var(--g-700); color: #fff; }
.dd-list li.is-active::before { color: #fff; }
.filter-row .dd-list { min-width: 15rem; }
textarea.input { min-height: 6.2rem; resize: vertical; line-height: 1.5; }
.input:hover { border-color: var(--g-600); }
.input:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--g-700); }
.input[readonly], .input:disabled { background: var(--g-50); color: var(--ink-2); }
.has-error .input { border-color: var(--red); background: #fffafa; }
.tick { display: flex; align-items: flex-start; gap: .7rem; font-weight: 600; cursor: pointer; padding: .35rem 0; }
.form-grid > .field > .tick:first-child, .filter-row > .field > .tick:first-child { margin-top: 1.9rem; min-height: 2.9rem; align-items: center; padding: 0; }
.ticks { display: grid; grid-template-columns: minmax(0, 1fr); gap: .15rem; }
.tick input { width: 1.5rem; height: 1.5rem; flex: none; margin: .1rem 0 0; accent-color: var(--g-700); }
.pw-wrap { display: flex; gap: .5rem; }
.pw-wrap .input { flex: 1; }
.pw-toggle { min-width: 6.2rem; }
.form-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; padding-top: .4rem; }
.quick-dates { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .15rem; }
.day-note { font-weight: 700; color: var(--g-700); }
.day-note:empty { display: none; }
.day-note.weekend { color: var(--red); }
.preview-box { background: var(--g-50); border: 2px dashed var(--g-300); border-radius: 8px; padding: .7rem 1rem; font-size: 1.3rem; font-weight: 700; color: var(--g-900); letter-spacing: .01em; }

/* numbered steps of a form */
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.step-head { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--g-50); border-radius: var(--radius) var(--radius) 0 0; }
.step-num { width: 2.3rem; height: 2.3rem; border-radius: 50%; background: var(--g-800); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; flex: none; }
.step-head p { color: var(--ink-2); font-size: .95rem; }
.step-body { padding: 1.2rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.15rem; }

/* large choices instead of a dropdown (hearing outcome) */
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.choice { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .95rem; border: 2px solid var(--line-2); border-radius: 10px; cursor: pointer; background: var(--surface); }
.choice:hover { border-color: var(--g-600); background: var(--g-50); }
.choice input { width: 1.45rem; height: 1.45rem; margin: .15rem 0 0; flex: none; accent-color: var(--g-700); }
.choice b { display: block; font-size: 1.08rem; }
.choice span { color: var(--ink-2); font-size: .93rem; }
.choice:has(input:checked), .choice.is-checked { border-color: var(--g-700); background: var(--g-100); box-shadow: inset 0 0 0 1px var(--g-700); }

/* filters above a list */
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.pills { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.7rem; padding: .35rem 1rem; border: 2px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; }
.pill:hover { border-color: var(--g-700); background: var(--g-50); color: var(--ink); }
.pill.on { background: var(--g-800); border-color: var(--g-800); color: #fff; }
.pill .n { background: rgba(0, 0, 0, .08); border-radius: 999px; padding: 0 .5rem; font-size: .9rem; }
.pill.on .n { background: rgba(255, 255, 255, .22); }
.pill.red { border-color: var(--red-line); color: var(--red); }
.pill.red.on { background: var(--red); border-color: var(--red); color: #fff; }
.filter-row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.filter-row .field { flex: 1 1 11rem; }
.filter-row .field.wide { flex: 2 1 18rem; }
.filter-row .field.narrow { flex: 0 1 11rem; }
.label-line { font-weight: 700; color: var(--ink-2); }

details.more { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
details.more > summary { cursor: pointer; padding: .85rem 1.1rem; font-weight: 700; font-size: 1.05rem; color: var(--g-800); list-style-position: inside; }
details.more > summary:hover { background: var(--g-50); }
details.more[open] > summary { border-bottom: 1px solid var(--line); }
details.more > .more-body { padding: 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }

/* ------------------------------------------------------------------ case page */
.case-head { display: flex; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; align-items: flex-start; margin-bottom: 1.25rem; }
.case-head .tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.facts dt { font-size: .88rem; font-weight: 700; color: var(--ink-3); }
.facts dd { margin: .1rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
dl { margin: 0; }
.position { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 1.5rem; }
.position h3 { color: var(--g-700); font-size: .95rem; margin-bottom: .2rem; }
.timeline { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.hearing { border: 1px solid var(--line); border-left: 7px solid var(--g-600); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.hearing.is-missing { border-left-color: var(--red); background: #fffaf9; }
.hearing.is-upcoming { border-left-color: var(--blue); }
.hearing-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); }
.hearing-head .when { font-size: 1.12rem; font-weight: 700; }
.hearing-body { padding: 1rem 1.1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.hearing-body h4 { font-size: .9rem; font-weight: 700; color: var(--ink-3); }
.hearing-body p { white-space: pre-wrap; overflow-wrap: anywhere; }
.hearing-foot { padding: .6rem 1.1rem; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: .9rem; display: flex; gap: .5rem 1.5rem; flex-wrap: wrap; }
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.doc-list li { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; }
.doc-list .grow { flex: 1; min-width: 10rem; }

/* ------------------------------------------------------------------ calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { padding: .55rem; font-weight: 700; background: var(--g-800); color: #fff; text-align: center; border-right: 1px solid var(--g-700); }
.cal .day { display: flex; flex-direction: column; gap: .3rem; min-height: 6.6rem; padding: .5rem; background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
a.day:hover { background: var(--g-100); }
.cal .day.out { background: #f6f7f6; color: var(--ink-3); }
.cal .day.weekend { background: #faf8f1; }
.cal .day.today { box-shadow: inset 0 0 0 3px var(--gold); }
.cal .date { font-size: 1.15rem; font-weight: 700; }
.cal .chip { display: block; font-size: .85rem; font-weight: 700; padding: .1rem .45rem; border-radius: 6px; }
.chip.listed { background: var(--blue-soft); color: var(--blue); }
.chip.done { background: #e3f3e7; color: #14632b; }
.chip.missing { background: var(--red-soft); color: var(--red); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: .9rem 1.2rem; }

/* ------------------------------------------------------------------ roles & rights */
.rights th.role, .rights td.role { text-align: center; width: 8.5rem; }
.rights td.role input { width: 1.6rem; height: 1.6rem; accent-color: var(--g-700); }
.rights tr.group td { background: var(--g-100) !important; font-weight: 700; color: var(--g-900); }
.rights .always { color: var(--g-600); font-weight: 700; }

/* ------------------------------------------------------------------ profile */
.avatar { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; flex: none; background: var(--g-100); border: 2px solid var(--g-200); display: inline-grid; place-items: center; }
.avatar.initials { background: var(--g-700); color: #fff; font-weight: 700; font-size: 1.1rem; border-color: var(--g-700); }
.avatar.small { width: 2.5rem; height: 2.5rem; font-size: .95rem; }
.avatar.big { width: 6.5rem; height: 6.5rem; font-size: 2.3rem; border-width: 3px; }
.userbar .avatar { border-color: rgba(255, 255, 255, .7); }
.userbar .avatar.initials { background: #fff; color: var(--g-800); }
.userbar a.who { color: #fff; text-decoration: none; border-radius: 8px; padding: .1rem .3rem; }
.userbar a.who:hover { background: rgba(255, 255, 255, .12); }
.person { display: flex; align-items: center; gap: .7rem; }
.profile-head { display: flex; align-items: center; gap: 1.4rem; padding: 1.3rem 1.5rem; flex-wrap: wrap; }
.profile-id { min-width: 14rem; }
.profile-id p { color: var(--ink-2); font-size: 1.05rem; }
.profile-id .tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.profile-facts { flex: 1 1 24rem; grid-template-columns: repeat(2, minmax(0, 1fr)); border-left: 1px solid var(--line); padding-left: 1.4rem; }
.photo-row { display: flex; align-items: center; gap: 1rem; }
.role-card h3 { font-size: 1.15rem; color: var(--g-900); }

/* ------------------------------------------------------------------ help page */
.help-steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
.help-steps li { counter-increment: step; display: flex; gap: .85rem; align-items: flex-start; font-size: 1.05rem; }
.help-steps li::before { content: counter(step); width: 2rem; height: 2rem; flex: none; border-radius: 50%; background: var(--g-800); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* ------------------------------------------------------------------ sign-in pages */
.guest { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); background: var(--surface); }
.guest-art { background: linear-gradient(160deg, var(--g-800), var(--g-950)); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 1.2rem; border-right: 6px solid var(--gold); }
.guest-art img { width: 15rem; max-width: 60%; height: auto; }
.guest-art h1 { color: #fff; font-size: 2.3rem; }
.guest-art p { font-size: 1.15rem; opacity: .92; max-width: 28rem; }
.guest-art .motto { font-weight: 700; color: var(--gold-soft); letter-spacing: .04em; }
.guest-form { display: flex; flex-direction: column; padding: 1.5rem 2rem 2rem; }
.guest-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.guest-top img { width: 8.5rem; height: auto; }
.guest-box { width: 100%; max-width: 31rem; margin: auto; padding: 1.5rem 0; }
.guest-box h2 { font-size: 1.9rem; margin-bottom: .3rem; }
.guest-box .lead { color: var(--ink-2); margin-bottom: 1.4rem; font-size: 1.08rem; }
.guest-foot { color: var(--ink-3); font-size: .9rem; text-align: center; }

/* ------------------------------------------------------------------ open / closed */
.state { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .6rem; border-radius: 6px; font-size: .85rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.state.open { background: var(--g-100); color: var(--g-800); border: 1px solid var(--g-300); }
.state.closed { background: #2f3a33; color: #fff; border: 1px solid #2f3a33; }
.state-banner { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: 1rem 1.3rem; border-radius: var(--radius); border: 2px solid var(--g-300); background: var(--g-50); margin-bottom: 1.1rem; }
.state-banner.closed { border-color: #2f3a33; background: #eef0ee; }
.state-banner .big { font-size: 1.35rem; font-weight: 700; color: var(--g-900); display: inline-flex; align-items: center; gap: .5rem; }
.state-banner.closed .big { color: #1c2520; }
.state-banner .steps { display: flex; gap: .4rem 1.6rem; flex-wrap: wrap; flex: 1; }
.state-banner .steps div { min-width: 9rem; }
.state-banner dt { font-size: .85rem; font-weight: 700; color: var(--ink-3); }
.state-banner dd { margin: 0; font-weight: 700; }

/* ------------------------------------------------------------------ dashboard */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.kpi { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--g-700); }
.kpi-icon { width: 2.7rem; height: 2.7rem; border-radius: 10px; display: grid; place-items: center; background: var(--g-100); color: var(--g-800); flex: none; }
.kpi .lbl { font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.kpi .val { font-size: 2rem; line-height: 1.15; font-weight: 700; color: var(--g-900); }
.kpi .sub { font-size: .9rem; color: var(--ink-3); }
.kpi.alert .kpi-icon { background: var(--red-soft); color: var(--red); }
.kpi.alert .val { color: var(--red); }
.kpi.warn .kpi-icon { background: var(--amber-soft); color: var(--amber); }
.chart-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
.chart-row { display: grid; grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr) 3rem; gap: .8rem; align-items: center; }
.chart-row .lab { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
a.lab:hover { text-decoration: underline; }
.chart-row .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
svg.hbar { display: block; width: 100%; height: 1.1rem; overflow: visible; }
.hbar .fill { fill: var(--g-600); }
.hbar .fill.second { fill: #b07d0e; }
.hbar .gap { fill: var(--surface); }
.hbar .track { fill: var(--g-50); }
.legend-keys { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .95rem; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: .45rem; }
.key i { width: 1rem; height: 1rem; border-radius: 3px; background: var(--g-600); display: inline-block; }
.key i.second { background: #b07d0e; }
.tip { position: fixed; z-index: 90; max-width: 20rem; padding: .5rem .75rem; background: #1c2520; color: #fff; border-radius: 8px; font-size: .95rem; line-height: 1.4; pointer-events: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.feed { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; }
.feed li { display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: 1.8rem 0 .9rem; }
.section-title p { color: var(--ink-2); }

/* ------------------------------------------------------------------ searching without reloading the page */
[data-live-region].is-loading [data-live-part] { opacity: .45; transition: opacity .15s; }
.live-status { font-weight: 600; }
.quick-search { position: relative; }
.quick-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; background: var(--surface); color: var(--ink); border: 2px solid var(--g-700); border-radius: 10px; box-shadow: 0 10px 28px rgba(5, 46, 15, .25); overflow: hidden; }
.quick-results a { display: block; padding: .7rem .9rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.quick-results a:last-child { border-bottom: 0; }
.quick-results a:hover, .quick-results a:focus { background: var(--g-100); outline: none; }
.quick-results b { color: var(--g-800); }
.quick-results .all { font-weight: 700; color: var(--g-700); background: var(--g-50); }
.quick-results p { margin: 0; padding: .7rem .9rem; color: var(--ink-3); }
.chart-row.wide-num { grid-template-columns: minmax(9rem, 38%) minmax(0, 1fr) 7.5rem; }

/* ------------------------------------------------------------------ notifications */
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list li { border-bottom: 1px solid var(--line); }
.note-list li:last-child { border-bottom: 0; }
.note-item { display: flex; gap: .9rem; align-items: flex-start; padding: .95rem 1.2rem; text-decoration: none; color: inherit; }
a.note-item:hover { background: var(--g-50); }
.note-item.is-new { background: #fffbea; box-shadow: inset 5px 0 0 var(--gold); }
.note-icon { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--g-100); color: var(--g-800); flex: none; }
.note-item.kind-security .note-icon, .note-item.kind-stay .note-icon { background: var(--red-soft); color: var(--red); }
.note-item.kind-reminder .note-icon { background: var(--amber-soft); color: var(--amber); }
.note-item b { display: block; font-size: 1.05rem; }
.note-item .when { color: var(--ink-3); font-size: .9rem; }

/* ------------------------------------------------------------------ attachments, live search, codes, text size */
.files { list-style: none; margin: 0; padding: 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.files li { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .5rem .35rem .7rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); }
.files a { font-weight: 700; }
.file-drop { border: 2px dashed var(--g-300); border-radius: 10px; background: var(--g-50); padding: 1rem; }
.file-drop input[type="file"] { width: 100%; font-size: 1rem; }
.file-drop input[type="file"]::file-selector-button { min-height: 2.7rem; padding: .4rem 1rem; margin-right: .8rem; border: 2px solid var(--g-700); border-radius: 8px; background: #fff; color: var(--g-800); font-weight: 700; font-size: 1rem; cursor: pointer; }
.suggest { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.suggest-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .75rem 1rem; border: 2px solid var(--line-2); border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--ink); }
.suggest-item:hover, .suggest-item:focus { border-color: var(--g-700); background: var(--g-50); color: var(--ink); }
.suggest-item b { color: var(--g-800); font-size: 1.08rem; }
.suggest-item .go { font-weight: 700; color: var(--g-700); white-space: nowrap; }
.code-input { font-size: 2rem !important; letter-spacing: .5em; text-align: center; font-weight: 700; max-width: 16rem; }
.size-choices { display: flex; gap: .6rem; flex-wrap: wrap; }
.size-choices button { min-width: 6.5rem; }
.size-choices button[aria-pressed="true"] { background: var(--g-800); border-color: var(--g-800); color: #fff; }
.size-sample-normal { font-size: 1.0625rem; }
.size-sample-large { font-size: 1.22rem; }
.size-sample-xlarge { font-size: 1.375rem; }
textarea.input.tall { min-height: 9rem; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .55rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; }
.check-list .ico { color: var(--g-600); margin-top: .15rem; }

/* ------------------------------------------------------------------ language button and Urdu (right-to-left) */
.lang-switch { margin: 0; display: inline-flex; }
.lang-switch button { min-height: 2.6rem; padding: .3rem .9rem; border: 2px solid rgba(255, 255, 255, .55); border-radius: 8px; background: transparent; color: #fff; font-weight: 700; font-size: 1.05rem; cursor: pointer; font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }
.lang-switch button:hover { background: rgba(255, 255, 255, .14); }
.guest-top .lang-switch button { border-color: var(--line-2); color: var(--g-800); background: var(--surface); width: auto; height: 2.6rem; font-size: 1.05rem; }
html[lang="ur"] body { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Noto Naskh Arabic", "Segoe UI", Tahoma, "Geeza Pro", Arial, sans-serif; line-height: 1.9; }
html[lang="ur"] h1, html[lang="ur"] h2, html[lang="ur"] h3 { line-height: 1.7; }
html[lang="ur"] .btn, html[lang="ur"] .pill, html[lang="ur"] .shortcut, html[lang="ur"] .sidebar a { line-height: 1.7; }
html[lang="ur"] .nav-group, html[lang="ur"] .state, html[lang="ur"] .clock-zone { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .ico.flip { transform: scaleX(-1); }
[dir="rtl"] .table th, [dir="rtl"] .table.cards td { text-align: right; }
[dir="rtl"] .table .num, [dir="rtl"] .chart-row .num { text-align: left; }
[dir="rtl"] .table td.actions-cell { text-align: left; }
[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--line); }
[dir="rtl"] .sidebar .count, [dir="rtl"] .clock, [dir="rtl"] .bell, [dir="rtl"] .userbar .who { margin-left: 0; margin-right: auto; }
[dir="rtl"] .clock { text-align: left; }
[dir="rtl"] .clock-time { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .shortcuts { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .notice { border-left-width: 1px; border-right-width: 7px; }
[dir="rtl"] .notice.good { border-right-color: var(--g-600); } [dir="rtl"] .notice.bad { border-right-color: var(--red); }
[dir="rtl"] .notice.warn { border-right-color: var(--amber); } [dir="rtl"] .notice.info { border-right-color: var(--blue); }
[dir="rtl"] .notice ul, [dir="rtl"] ul, [dir="rtl"] ol { padding-left: 0; padding-right: 1.2rem; }
[dir="rtl"] .hearing { border-left-width: 1px; border-right: 7px solid var(--g-600); }
[dir="rtl"] .hearing.is-missing { border-right-color: var(--red); } [dir="rtl"] .hearing.is-upcoming { border-right-color: var(--blue); }
[dir="rtl"] .table tr.is-missing td:first-child { box-shadow: inset -5px 0 0 var(--red); }
[dir="rtl"] .quick-search input { border-right: 2px solid #fff; border-left: 0; border-radius: 0 8px 8px 0; }
[dir="rtl"] .quick-search button { border-radius: 8px 0 0 8px; }
[dir="rtl"] .profile-facts { border-left: 0; border-right: 1px solid var(--line); padding-left: 0; padding-right: 1.4rem; }
[dir="rtl"] .guest-art { border-right: 0; border-left: 6px solid var(--gold); }
[dir="rtl"] svg.hbar { transform: scaleX(-1); }
[dir="rtl"] .note-item.is-new { box-shadow: inset -5px 0 0 var(--gold); }
[dir="rtl"] .help-steps, [dir="rtl"] .note-list, [dir="rtl"] .files, [dir="rtl"] .doc-list, [dir="rtl"] .feed, [dir="rtl"] .check-list, [dir="rtl"] .suggest { padding-right: 0; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="password"], [dir="rtl"] input[type="date"], [dir="rtl"] input[type="time"], [dir="rtl"] .code-input { direction: ltr; text-align: right; }

/* ------------------------------------------------------------------ printed pages (case report, cause list) */
body.print-page { background: #e9ecea; }
.print-bar { max-width: 62rem; margin: 1rem auto; padding: 0 1rem; display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.sheet { max-width: 62rem; margin: 0 auto 2rem; background: #fff; padding: 2rem 2.4rem; box-shadow: var(--shadow); font-size: .95rem; }
.sheet.landscape { max-width: 82rem; }
.sheet-head { display: grid; grid-template-columns: 7rem 1fr 7rem; align-items: center; gap: 1rem; border-bottom: 3px solid var(--g-800); padding-bottom: .9rem; margin-bottom: 1rem; text-align: center; }
.sheet-head img { max-height: 5rem; width: auto; margin: 0 auto; display: block; }
.sheet-head .org { font-weight: 700; letter-spacing: .06em; font-size: .9rem; color: var(--g-800); }
.sheet-head h1 { font-size: 1.35rem; margin: .25rem 0 .1rem; }
.sheet h2 { font-size: 1.05rem; margin: 1.3rem 0 .5rem; color: var(--g-800); text-transform: uppercase; letter-spacing: .04em; }
.sheet table { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { border: 1px solid #9aa79e; padding: .4rem .55rem; text-align: left; vertical-align: top; }
.sheet th { background: var(--g-100); font-size: .85rem; }
.sheet .foot { margin-top: 1.4rem; padding-top: .6rem; border-top: 1px solid #9aa79e; font-size: .85rem; font-style: italic; color: var(--ink-2); }

/* ------------------------------------------------------------------ register new case: always in sight */
.nav-cta { display: flex; align-items: center; justify-content: center; gap: .6rem; margin: .2rem 0 .9rem; padding: .85rem 1rem; border-radius: 10px; background: var(--g-700); color: #fff !important;
  font-size: 1.08rem; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.sidebar a.nav-cta:hover { background: var(--g-800); color: #fff; }
.sidebar a.nav-cta.active { background: var(--g-900); box-shadow: inset 0 0 0 3px var(--gold); }
.shortcut.primary { background: var(--g-700); border-color: var(--g-700); color: #fff; }
.shortcut.primary .ico { color: #fff; }
.shortcut.primary:hover { background: var(--g-800); border-color: var(--g-800); color: #fff; }
.tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile.primary { background: var(--g-800); border-color: var(--g-800); color: #fff; }
.tile.primary strong, .tile.primary .go { color: #fff; }
.tile.primary span.desc { color: #dcebe0; }
.tile.primary .tile-icon { background: #fff; color: var(--g-800); }
.tile.primary:hover { background: var(--g-900); border-color: var(--g-900); color: #fff; }
.field-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; min-width: 0; }
.choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ------------------------------------------------------------------ stay orders */
.stay-card.is-over { border-color: var(--red-line); }
.stay-card.is-over > .card-head { background: var(--red-soft); border-bottom-color: var(--red-line); border-radius: var(--radius) var(--radius) 0 0; }
.stay-card.is-urgent > .card-head { background: var(--amber-soft); border-radius: var(--radius) var(--radius) 0 0; }
.stay-meter { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.stay-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.stay-figures > div { padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: var(--g-50); }
.stay-figures b { display: block; font-size: 1.7rem; line-height: 1.15; color: var(--g-900); font-variant-numeric: tabular-nums; }
.stay-figures span { color: var(--ink-2); font-size: .93rem; }
.stay-figures .warn { background: var(--amber-soft); border-color: var(--amber-line); }
.stay-figures .warn b { color: var(--amber); }
.stay-figures .bad { background: var(--red-soft); border-color: var(--red-line); }
.stay-figures .bad b { color: var(--red); }
svg.meter { display: block; height: 16px; max-width: 100%; }
svg.meter .track { fill: var(--g-100); }
svg.meter .fill { fill: var(--g-600); }
svg.meter.near .fill { fill: #b07d0e; }
svg.meter.over .fill { fill: var(--red); }
.table td svg.meter { height: 10px; margin-top: .35rem; min-width: 6rem; }
details.more.flat { border: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
details.more.flat > .more-body.flush { padding: 0; }
.table tr.is-urgent td { background: #fff9ec !important; }
.table tr.is-urgent td:first-child { box-shadow: inset 5px 0 0 #b07d0e; }
.table tr.is-now td { background: #eef8f0 !important; }
.table tr.is-now td:first-child { box-shadow: inset 5px 0 0 var(--g-600); }
.table tr.is-editing td { background: var(--gold-soft) !important; }
.stay-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.stay-tab { display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; padding: .8rem 1rem; border: 2px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.stay-tab b { font-size: 1.8rem; line-height: 1.1; color: var(--g-900); font-variant-numeric: tabular-nums; }
.stay-tab span { font-weight: 700; }
.stay-tab small { color: var(--ink-3); font-size: .88rem; }
.stay-tab:hover { border-color: var(--g-600); color: var(--ink); }
.stay-tab.on { border-color: var(--g-800); background: var(--g-100); box-shadow: inset 0 0 0 1px var(--g-800); }
.stay-tab.warn b { color: var(--amber); }
.stay-tab.bad b { color: var(--red); }
.stay-tab.warn.on { border-color: #b07d0e; background: var(--amber-soft); box-shadow: inset 0 0 0 1px #b07d0e; }
.stay-tab.bad.on { border-color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }

.print-only { display: none; }
@media print {
  .print-only { display: block; }
  .print-head { display: grid; grid-template-columns: 4.6rem 1fr 6.4rem; align-items: center; gap: 1rem; text-align: center; border-bottom: 2.5pt solid #0a4219; padding-bottom: .6rem; margin-bottom: .9rem; }
  .print-head img { max-height: 4.4rem; width: auto; margin: 0 auto; display: block; }
  .print-head .org { font-weight: 700; letter-spacing: .05em; font-size: .85rem; color: #0a4219; }
  .print-head .doc { font-size: 1.25rem; font-weight: 700; }
  .print-foot { margin-top: 1.2rem; padding-top: .5rem; border-top: 1pt solid #9aa79e; font-size: .8rem; font-style: italic; color: #3d4a42; display: flex; justify-content: space-between; gap: 1rem; }
  .page-head h1 { font-size: 1.2rem; }
  html { font-size: 11pt !important; }
  body, body.print-page { background: #fff; }
  .masthead, .userbar, .sidebar, .footer, .print-bar, .no-print, .demo-banner, .skip-link, .pager-nav { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; }
  .sheet, .sheet.landscape { box-shadow: none; padding: 0; margin: 0; max-width: none; }
  .sheet.landscape { page: wide; }
  .sheet table { font-size: 9.5pt; }
  .sheet thead { display: table-header-group; }
  .sheet tr { break-inside: avoid; }
  .sheet th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .card, .step, .hearing { box-shadow: none; }
  .step, .hearing, .table tr, .kpi, .tile { break-inside: avoid; }
  .card { border-color: #b9c4bc; }
  .table-wrap { overflow: visible; }
  table.table { font-size: 9.5pt; }
  .table thead { display: table-header-group; }                 /* the headings repeat on every sheet */
  .table th, .table td { padding: .35rem .45rem; }
  .table th { background: #e4f1e7 !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge, .hbar, .bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dd-btn .ico, select.input { background-image: none; }
  a { color: #000; text-decoration: none; }
  .main { page: wide; }                                         /* ordinary pages print on a landscape sheet */
  .btn, .pills, .live-status { display: none !important; }
  @page { size: A4; margin: 14mm 14mm 16mm;
    @bottom-left { content: "ATIR Case Portal · Lahore Taxpayers Office · system generated"; font: 8pt Inter, Arial, sans-serif; color: #4c5a51; }
    @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 8pt Inter, Arial, sans-serif; color: #4c5a51; } }
  @page wide { size: A4 landscape; margin: 11mm 12mm 15mm; }
}

/* ------------------------------------------------------------------ smaller screens */
@media screen and (max-width: 1640px) {
  .masthead-in { flex-wrap: wrap; row-gap: .5rem; }     /* the shortcuts move to their own row and keep their names */
  .shortcuts { order: 9; flex: 1 1 100%; margin-left: 0; flex-wrap: wrap; }
  .shortcut { flex: 1 1 auto; justify-content: center; }
}
@media screen and (max-width: 1500px) {
  .tiles.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media screen and (max-width: 1250px) {
  .tiles, .tiles.five, .stats, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stay-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .bell span, .btn-signout span { display: none; }
}
@media screen and (max-width: 960px) {
  body { padding-bottom: 4.6rem; }                      /* room for the bottom menu */
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .shortcuts, .fbr-logo, .userbar .who small { display: none; }
  .masthead-in { padding: .5rem 1rem; }
  .brand img { width: 3.2rem; }
  .brand-text strong { font-size: 1.2rem; }
  .brand-text span { display: none; }
  .clock-time { font-size: 1.2rem; }
  .clock-date { font-size: .85rem; }
  .clock-zone { display: none; }
  .userbar-in { padding: .4rem 1rem; gap: .5rem; flex-wrap: wrap; }
  .quick-search { order: 5; flex: 1 1 100%; max-width: none; }
  .bell { display: none; }                              /* it is in the bottom menu */
  .userbar .who { margin-left: auto; }
  .sidebar { display: none; position: fixed; inset: 0; z-index: 70; overflow-y: auto; padding: 1rem 1rem 6rem; border: 0; }
  .sidebar.open { display: block; }
  .sidebar .close-menu { display: inline-flex; }
  .sidebar a { font-size: 1.15rem; padding: .9rem 1rem; }
  .main { padding: 1rem .9rem 2rem; }
  .footer { padding-bottom: 1.2rem; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--surface); border-top: 2px solid var(--g-200); box-shadow: 0 -4px 14px rgba(5, 46, 15, .12); padding-bottom: env(safe-area-inset-bottom); }
  .bottom-nav a, .bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 4.1rem; padding: .3rem .2rem; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: .82rem; font-weight: 700; text-decoration: none; cursor: pointer; }
  .bottom-nav a.active { color: var(--g-800); box-shadow: inset 0 4px 0 var(--g-700); background: var(--g-50); }
  .bottom-nav .count { position: absolute; top: .3rem; left: 55%; }
  .grid-2, .choices, .choices.two, .position { grid-template-columns: minmax(0, 1fr); }
  .form-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
  .page-head { margin-bottom: .9rem; }
  .page-head .actions, .page-head .actions .btn { width: 100%; }
  .case-head .actions, .case-head .actions .btn { width: 100%; }
  .form-actions .btn.big { flex: 1 1 100%; }
  .chart-row { grid-template-columns: minmax(5.5rem, 40%) minmax(0, 1fr) 2.4rem; }
  .profile-facts { border-left: 0; padding-left: 0; }
  .guest { display: block; }
  .guest-art { flex-direction: row; justify-content: flex-start; text-align: start; padding: .8rem 1rem; border: 0; border-bottom: 5px solid var(--gold); gap: .8rem; }
  .guest-art img { width: 3.4rem; max-width: none; }
  .guest-art h1 { font-size: 1.35rem; }
  .guest-art p { display: none; }
  .guest-form { padding: .8rem 1.1rem 2rem; }
  .guest-top { justify-content: space-between; }
  .guest-top .textsize > span, .guest-top .textsize [data-size-btn] { display: none; }
  .guest-top img { width: 5.2rem; }
  .guest-box { padding: .9rem 0 1rem; margin: 0 auto; }
  .guest-box h2 { font-size: 1.6rem; }
  .guest-box .lead { font-size: 1rem; margin-bottom: 1rem; }
  .guest-box .btn.big { min-height: 3.6rem; font-size: 1.2rem; }
  .guest-box .input { min-height: 3.3rem; font-size: 1.1rem; }
  .guest-foot { margin-top: 1rem; }
  .cal .day { min-height: 4.4rem; padding: .25rem; }
  .cal .date { font-size: 1rem; }
  .cal .chip { font-size: .72rem; padding: 0 .2rem; overflow: hidden; white-space: nowrap; }
  .legend { padding: .7rem .9rem; gap: .5rem; }
  .sheet { padding: 1.2rem; }
  .sheet-head { grid-template-columns: 3.6rem 1fr 3.6rem; gap: .5rem; }
}
@media screen and (max-width: 900px) {
  /* the day buttons are one row that slides sideways, so the list itself starts higher on the screen */
  .pills.slide { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -.4rem; padding: .15rem .4rem .35rem; }
  .pills.slide::-webkit-scrollbar { display: none; }
  .pills.slide .pill { flex: none; width: auto; }
  /* wide tables become a list of cards: each cell on its own line with its heading above it */
  .table.cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table.cards, .table.cards tbody { display: block; }
  .table.cards tr { display: block; padding: .8rem 1rem; border-bottom: 10px solid var(--bg); }
  .table.cards tr:last-child { border-bottom: 0; }
  .table.cards td { display: block; padding: .3rem 0; border: 0; min-width: 0 !important; white-space: normal !important; text-align: left; background: transparent !important; }
  .table.cards tbody tr:nth-child(even) { background: var(--surface); }
  .table.cards td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-3); }
  .table.cards td.serial { display: none; }
  .table.cards td.actions-cell { padding-top: .6rem; }
  .table.cards td.actions-cell .btn, .table.cards .row-action .btn { width: 100%; }
  .table.cards tr.is-missing { box-shadow: inset 6px 0 0 var(--red); background: #fff5f4; }
  .table.cards tr.is-missing td:first-child { box-shadow: none; }
  .stats, .facts { grid-template-columns: minmax(0, 1fr); }
  .tiles, .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .tile { min-height: 0; padding: .9rem; }
  .tile .desc { display: none; }
  .tile strong { font-size: 1.1rem; }
  .tile-icon { width: 2.7rem; height: 2.7rem; }
  .kpi { flex-direction: column; gap: .4rem; padding: .8rem; }
  .kpi .val { font-size: 1.7rem; }
  .kpi-icon { width: 2.2rem; height: 2.2rem; }
  .pills .pill { flex: 1 1 auto; justify-content: center; }
  .card-head { padding: .8rem 1rem; }
  .card-body { padding: 1rem; }
  .step-body { padding: 1rem; }
  .hearing-head .actions, .hearing-head .actions .btn { width: 100%; }
  .state-banner { padding: .9rem 1rem; }
  h1 { font-size: 1.45rem; }
  .rights th.role, .rights td.role { width: 5.5rem; }
}
@media screen and (max-width: 420px) {
  .userbar .who b { display: none; }
  .clock-date { display: none; }
}

/* ------------------------------------------------------------------ nothing leaves the screen, boxes line up */
.main, .card, .step, .step-body, .card-body, .more-body, .field, .form-grid > *, .filter-row > *, .grid-2 > *, .split > *, .stack, .stack > *, .notice > div { min-width: 0; }
.main { overflow-wrap: break-word; }
.input, .dd, .dd-btn, .pw-wrap, .preview-box, .file-drop { max-width: 100%; min-width: 0; }
.main img { max-width: 100%; height: auto; }
.notice > div { flex: 1 1 auto; }
.table.rights { min-width: 40rem; }                     /* the rights table keeps its shape and slides sideways inside its card */

@media screen and (max-width: 900px) {
  html { font-size: 100%; }                             /* 16px on phones and small tablets; the text-size choice in the profile still enlarges it */
  html[data-size="large"] { font-size: 112.5%; }
  html[data-size="xlarge"] { font-size: 125%; }
  .btn { white-space: normal; text-align: center; }
  .table.cards td.actions-cell { display: grid; gap: .5rem; text-align: start; }
  .table.cards td.actions-cell:empty { display: none; }
  .table.cards .inline-form { display: block; }
  .table.cards td svg.meter { max-width: 14rem; }
  .table.cards tr.is-urgent { box-shadow: inset 6px 0 0 #b07d0e; background: #fff9ec; }
  .table.cards tr.is-now { box-shadow: inset 6px 0 0 var(--g-600); background: #eef8f0; }
  .table.cards tr.is-urgent td:first-child, .table.cards tr.is-now td:first-child { box-shadow: none; }
  .stay-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .stay-tab { padding: .65rem .8rem; }
  .stay-tab b { font-size: 1.5rem; }
  .nav-cta { font-size: 1.15rem; padding: 1rem; }
}
@media screen and (max-width: 700px) {
  .form-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .filter-row { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: .8rem; }
  .form-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }       /* buttons under each other, each as wide as the boxes */
  .form-actions .btn { width: 100%; }
  .form-actions .live-status:empty { display: none; }
  .quick-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .quick-dates .btn { width: 100%; padding-inline: .4rem; }
  .card-head { align-items: stretch; }
  .card-head > .btn, .card-head > .actions, .card-head > .actions .btn, .card-head > form, .card-head > form .btn { width: 100%; }
  .actions .btn { flex: 1 1 100%; }
  .pw-toggle { min-width: 0; padding-inline: .8rem; }
  .preview-box { font-size: 1.1rem; }
  .step-head { padding: .8rem 1rem; }
  .notice { padding: .8rem .9rem; gap: .65rem; }
  .profile-head { padding: 1rem; gap: 1rem; }
  .stay-figures { gap: .5rem; }
  .stay-figures > div { padding: .5rem .55rem; }
  .stay-figures b { font-size: 1.35rem; }
  .stay-figures span { font-size: .85rem; }
  .state-banner .steps div { min-width: 0; flex: 1 1 100%; }
  .tiles.five .tile.primary { grid-column: 1 / -1; }    /* Register New Case: the first thing on the phone, full width */
  .tile.primary .desc { display: block; }
}
/* iPhone and iPad: date and time boxes otherwise come out narrower than the other boxes, with the text in the middle */
@supports (-webkit-touch-callout: none) {
  input.input[type="date"], input.input[type="time"], input.input[type="month"] { -webkit-appearance: none; appearance: none; display: block; width: 100%; text-align: left; line-height: 1.8rem; }
  input.input::-webkit-date-and-time-value { text-align: left; margin: 0; }
  [dir="rtl"] input.input[type="date"], [dir="rtl"] input.input[type="time"] { text-align: right; }
  [dir="rtl"] input.input::-webkit-date-and-time-value { text-align: right; }
  select.input, textarea.input, input.input { font-size: max(1rem, 16px); }      /* below 16px the iPhone zooms into the page when a box is tapped */
}
.badge { max-width: 100%; }
.table td.actions-cell { white-space: normal; }
.table td.actions-cell .btn, .table td.actions-cell .inline-form { margin: .15rem 0 .15rem .3rem; }
.userbar-in > * { min-width: 0; }
.quick-search input { width: 100%; }
@media screen and (max-width: 900px) {
  .badge { white-space: normal; text-align: start; border-radius: 12px; }
  .table.cards td.actions-cell .btn, .table.cards td.actions-cell .inline-form { margin: 0; }
}
@media screen and (max-width: 400px) {
  .quick-search button span { display: none; }           /* very narrow phones: the magnifying glass alone */
  .quick-search button { padding-inline: .8rem; }
  .userbar-in { gap: .4rem; }
  .menu-btn { padding-inline: .6rem; }
}
.btn { white-space: normal; text-align: center; }           /* a long label goes onto two lines instead of being cut off */
@media screen and (max-width: 700px) {
  .state-banner { flex-direction: column; align-items: stretch; gap: .7rem; }
  .state-banner .big { font-size: 1.25rem; }
  .state-banner .steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; flex: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }      /* short facts side by side; a box with nothing in it is left out on a phone */
  .facts .is-empty { display: none; }
  .quick-search input::placeholder { font-size: .95rem; }
}
@media screen and (max-width: 700px) {
  .chart-row.wide-num { grid-template-columns: minmax(0, 1fr) auto; row-gap: .15rem; }     /* name on its own line, then the bar and the amount */
  .chart-row.wide-num .lab { grid-column: 1 / -1; }
  .chart-row .num { white-space: nowrap; }
}

/* ------------------------------------------------------------------ stay order reminders on the home page */
.remind-top { display: flex; align-items: center; gap: .6rem; padding: .7rem 1.2rem; background: var(--red-soft); color: var(--red); border-bottom: 1px solid var(--red-line); font-size: 1.05rem; }
.remind-list { list-style: none; margin: 0; padding: 0; }
.remind-list li { display: flex; align-items: center; gap: 1rem; padding: .8rem 1.2rem; border-bottom: 1px solid var(--line); border-inline-start: 6px solid #b07d0e; }
.remind-list li:last-child { border-bottom: 0; border-end-start-radius: var(--radius); }
.remind-list .grow { flex: 1 1 auto; min-width: 0; }
.remind-list .appeal { font-weight: 700; color: var(--g-800); text-decoration: none; }
.remind-list .sub { color: var(--ink-3); font-size: .93rem; }
.remind-list .tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .25rem; }
.remind-when { flex: none; width: 5.2rem; text-align: center; padding: .35rem .3rem; border-radius: 8px; background: var(--amber-soft); border: 1px solid var(--amber-line); color: var(--amber); line-height: 1.15; }
.remind-when b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.remind-when small { font-size: .78rem; font-weight: 700; }
.remind-list li.today, .remind-list li.urgent { border-inline-start-color: var(--red); }
.remind-list li.today { background: #fff5f4; }
.remind-list li.today .remind-when, .remind-list li.urgent .remind-when { background: var(--red-soft); border-color: var(--red-line); color: var(--red); }
.remind-list li.today .remind-when b { font-size: 1.15rem; padding: .2rem 0; }
.remind-list li.ended { border-inline-start-color: var(--line-2); }
.remind-list li.ended .remind-when { background: #eef1ee; border-color: var(--line-2); color: var(--ink-2); }
.remind-list li.mine { box-shadow: inset 0 0 0 9999px rgba(11, 79, 156, .035); }
@media screen and (max-width: 700px) {
  .remind-list li { flex-wrap: wrap; gap: .7rem; padding: .8rem 1rem; }
  .remind-list .grow { flex: 1 1 60%; }
  .remind-list li > .btn { width: 100%; }
  .remind-when { width: 4.6rem; }
}

/* ------------------------------------------------------------------ dropdown lists page
   The lists stand in two columns of the same height (each card as tall as its own list, no empty space inside).
   In every row the parts keep the same place and size: name, Rename, up, down, Switch off. */
.list-grid { columns: 2 27rem; column-gap: 1.25rem; }
.list-card { break-inside: avoid; margin: 0 0 1.25rem; container-type: inline-size; }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { border-bottom: 1px solid var(--line); }
.list-rows li:nth-child(even) { background: var(--g-50); }
.list-row { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "name name" "rename tools"; gap: .45rem .6rem; align-items: center; margin: 0; padding: .7rem 1rem; }
.list-row .list-name { grid-area: name; }
.list-row .list-rename { grid-area: rename; justify-self: start; }
.list-row .list-tools { grid-area: tools; justify-self: end; display: flex; gap: .4rem; }
.list-row .input, .list-row .btn { min-height: 2.6rem; }
.list-row .btn.list-rename { min-width: 6.2rem; }
.list-tools .btn { min-width: 2.7rem; padding-inline: .5rem; }
.list-tools .btn.toggle { min-width: 6.9rem; }
.list-name.off { display: flex; align-items: center; min-height: 2.6rem; padding: .3rem .8rem; border: 2px dashed var(--line-2); border-radius: 8px; color: var(--ink-3); font-weight: 600; overflow-wrap: anywhere; }
.list-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: end; margin: 0; padding: .9rem 1rem 1rem; background: var(--g-50); border-radius: 0 0 var(--radius) var(--radius); }
@container (min-width: 37rem) {                         /* a wide card: everything on one line */
  .list-row { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name rename tools"; }
}
@media print { .list-grid { columns: 1; } }
.table.wide-table { min-width: 78rem; font-size: .95rem; }           /* twelve columns: slides sideways inside its card on a narrow screen */
.table.wide-table td.col-case { min-width: 13rem; }
.preview-box.small { font-size: 1rem; padding: .55rem .8rem; }
.group-row td { background: var(--g-100) !important; font-weight: 700; color: var(--g-900); font-size: 1.05rem; }
@media screen and (max-width: 900px) { .table.wide-table { min-width: 0; } .table.cards tr.group-row { padding: .6rem 1rem; } }

/* ---- Tribunal orders: the four stages, attach-a-PDF in a table row ---- */
.stage-flow { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; counter-reset: none; }
.stage-flow li { display: grid; grid-template-columns: auto 1fr; column-gap: .65rem; align-items: center; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stage-flow li b { grid-row: span 2; width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center; background: #eef1ee; color: var(--ink-2); font-size: .95rem; }
.stage-flow li span { font-weight: 700; line-height: 1.25; }
.stage-flow li small { color: var(--ink-3); font-size: .85rem; }
.stage-flow li.busy b, .stage-flow li.now b { background: var(--amber-soft); color: var(--amber); }
.stage-flow li.now { border-color: var(--amber-line); }
.stage-flow li.done b { background: var(--g-800); color: #fff; }
.pdf-attach { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.pdf-attach input[type="file"] { max-width: 15rem; font-size: .9rem; }
.decision-line { font-size: 1.15rem; }
@media (max-width: 760px) { .stage-flow { grid-template-columns: 1fr 1fr; } }
.section-title h2 { display: flex; align-items: center; gap: .55rem; margin: 0; }
.kpi.long .val { font-size: 1.5rem; }

/* ---- Users table: room for the name, the two buttons stacked and never pushed out of the card ---- */
.users-table td:first-child { min-width: 16rem; }
.users-table td:first-child b { white-space: nowrap; }
.users-table .actions-cell { width: 1%; }
.users-table th:last-child, .users-table td:last-child { padding-right: 1.25rem; }
.users-table .row-actions { display: flex; flex-direction: column; align-items: stretch; gap: .45rem; width: 11.5rem; margin-left: auto; }
.users-table td.actions-cell .row-actions > *, .users-table td.actions-cell .row-actions .inline-form .btn { display: flex; width: 100%; box-sizing: border-box; margin: 0; white-space: nowrap; justify-content: center; }
.users-table .badge { white-space: nowrap; }
@media (max-width: 760px) {
  .users-table .row-actions { width: auto; margin-left: 0; }
  .users-table td:first-child { min-width: 0; }
  .users-table .row-actions { flex-direction: row; flex-wrap: wrap; }
  .users-table .row-actions .btn, .users-table .row-actions .inline-form { width: auto; }
}
