/* ISP Portal - app shell layout on top of theme.css tokens. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
a { color: inherit; text-decoration: none; }

.app-boot {
  display: grid; place-items: center; height: 100vh;
  color: hsl(var(--muted-foreground)); font-family: var(--font-sans);
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.shell.collapsed { grid-template-columns: 68px 1fr; }
.shell__main { display: flex; flex-direction: column; min-width: 0; }
.shell__content { padding: 1.5rem; flex: 1; }

@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-xl); }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
}

/* ---------- sidebar ---------- */
.sidebar {
  background: hsl(var(--sidebar)); color: hsl(var(--sidebar-foreground));
  border-right: 1px solid hsl(var(--sidebar-border));
  display: flex; flex-direction: column; gap: .25rem; padding: .75rem;
  overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; gap: .6rem; padding: .5rem .5rem .75rem; }
.sidebar__brand .logo {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / .7)); color: #fff; font-weight: 800;
}
.sidebar__brand .name { font-weight: 700; font-size: .95rem; line-height: 1.1; }
.sidebar__brand .sub { font-size: .7rem; color: hsl(var(--muted-foreground)); }
.sidebar__group { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); padding: .9rem .5rem .3rem; }
.nav-item {
  display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; min-height: 40px;
  border-radius: var(--radius); font-size: .82rem; font-weight: 500; color: hsl(var(--sidebar-foreground));
}
.nav-item:hover { background: hsl(var(--sidebar-accent) / .55); }
.nav-item.active { background: hsl(var(--sidebar-accent)); color: hsl(var(--sidebar-primary)); font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; opacity: .85; }
.collapsed .sidebar__brand .name, .collapsed .sidebar__brand .sub,
.collapsed .sidebar__group, .collapsed .nav-item span:not(.ico) { display: none; }
.collapsed .nav-item { justify-content: center; }

/* ---------- glass header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; min-height: 56px;
  display: flex; align-items: center; gap: .75rem; padding: .5rem 1rem;
  background: hsl(var(--card) / .72);
  backdrop-filter: blur(16px) saturate(1.8); -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid hsl(var(--border));
}
.topbar__search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: .5rem;
  padding: .45rem .75rem; border-radius: 999px;
  background: hsl(var(--muted) / .5); border: 1px solid hsl(var(--border) / .7);
  color: hsl(var(--muted-foreground)); font-size: .85rem;
}
.topbar__spacer { flex: 1; }
.topbar__user { display: flex; align-items: center; gap: .55rem; }
.topbar__user .avatar {
  width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center;
  background: hsl(var(--primary)); color: #fff; font-weight: 700; font-size: .8rem;
}
.topbar__user .who { line-height: 1.15; }
.topbar__user .who .n { font-weight: 600; font-size: .85rem; }
.topbar__user .who .r { font-size: .72rem; color: hsl(var(--muted-foreground)); }

.icon-btn {
  width: 36px; height: 36px; border-radius: var(--radius); border: none; background: transparent;
  color: hsl(var(--muted-foreground)); display: grid; place-items: center; cursor: pointer; font-size: 1rem;
}
.icon-btn:hover { background: hsl(var(--accent)); color: hsl(var(--foreground)); }

/* ---------- generic ---------- */
.page-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 .25rem; }
.page-sub { color: hsl(var(--muted-foreground)); font-size: .9rem; margin: 0 0 1.25rem; }

.card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--card-border));
  border-radius: 1rem; box-shadow: var(--shadow-sm); padding: 1.25rem 1.5rem;
}

.grid-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; margin-bottom: 1.5rem; }

.stat-card {
  position: relative; background: hsl(var(--card)); border: 1px solid hsl(var(--card-border));
  border-radius: 1rem; padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm); overflow: hidden;
}
.stat-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: hsl(var(--acc, var(--chart-1))); }
.stat-card .row { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-card .label { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.stat-card .value { font-size: 1.7rem; font-weight: 700; line-height: 1.15; margin-top: .35rem; }
.stat-card .hint { font-size: .78rem; color: hsl(var(--muted-foreground)); margin-top: .25rem; }
.stat-card .badge {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.05rem;
  background: linear-gradient(135deg, hsl(var(--acc, var(--chart-1))), hsl(var(--acc, var(--chart-1)) / .72));
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font-family: var(--font-sans); font-size: .85rem; font-weight: 600; cursor: pointer;
  border-radius: 999px; padding: .55rem 1.1rem; border: 1px solid transparent;
}
.btn.primary { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.primary:disabled { opacity: .6; cursor: default; }
.btn.ghost { background: transparent; color: hsl(var(--muted-foreground)); border-color: hsl(var(--border)); border-radius: var(--radius); font-size: .8rem; padding: .45rem .9rem; }
.btn.ghost:hover { color: hsl(var(--foreground)); }

/* theme.css styles bare `.field` as a filled input pill; here `.field` is a
   label + control WRAPPER, so cancel that background/border/padding bleed. */
.field {
  display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem;
  background: none; border: none; padding: 0; border-radius: 0;
}
.field label { font-size: .8rem; font-weight: 600; color: hsl(var(--foreground)); }
.field input, .field select, .field textarea {
  width: 100%; box-sizing: border-box;
  border-radius: .8rem; padding: .6rem .8rem; font-size: .9rem; font-family: var(--font-sans);
  background: hsl(var(--card)); color: hsl(var(--foreground)); border: 1px solid hsl(var(--input));
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid hsl(var(--ring) / .35); outline-offset: 1px; border-color: hsl(var(--ring));
}

.form-error { color: hsl(var(--destructive)); font-size: .82rem; margin-top: -.5rem; margin-bottom: 1rem; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: radial-gradient(1200px 500px at 50% -10%, hsl(var(--primary) / .10), transparent); }
.login-card { width: min(400px, 100%); background: hsl(var(--card)); border: 1px solid hsl(var(--card-border));
  border-radius: 1.25rem; box-shadow: var(--shadow-lg); padding: 2rem; }
.login-card .brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.login-card .brand .logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary) / .7)); color: #fff; font-weight: 800; }
.login-card h1 { font-size: 1.15rem; margin: 0; }
.login-card .muted { color: hsl(var(--muted-foreground)); font-size: .8rem; margin: .1rem 0 1.25rem; }
.login-hint { margin-top: 1rem; font-size: .75rem; color: hsl(var(--muted-foreground)); text-align: center; }

/* ---------- Blazor error UI ---------- */
#blazor-error-ui {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  background: hsl(var(--destructive)); color: #fff; padding: .75rem 1.25rem; font-size: .85rem;
}
#blazor-error-ui .reload { text-decoration: underline; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* ================= Items screen / data components ================= */

.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-header__actions { display: flex; gap: .5rem; }

.toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar__search { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; border-radius: 999px;
  background: hsl(var(--muted) / .5); border: 1px solid hsl(var(--border) / .7); min-width: 220px; flex: 1; max-width: 340px; }
.toolbar__search input { border: none; background: transparent; outline: none; font: inherit; color: hsl(var(--foreground)); width: 100%; font-size: .85rem; }
.toolbar select { padding: .4rem .6rem; border-radius: var(--radius); border: 1px solid hsl(var(--input));
  background: hsl(var(--card)); color: hsl(var(--foreground)); font: inherit; font-size: .82rem; }

.table-wrap { overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: .8rem; }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table thead th { text-align: left; padding: .6rem .8rem; font-size: .68rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / .4);
  border-bottom: 1px solid hsl(var(--border)); white-space: nowrap; }
.table tbody td { padding: .6rem .8rem; border-bottom: 1px solid hsl(var(--border) / .6); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: hsl(var(--accent) / .5); }
.table th.num, .table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: hsl(var(--foreground)); }
.table .mono { font-family: var(--font-mono); font-size: .8rem; }
.table .muted { color: hsl(var(--muted-foreground)); font-size: .8rem; }
.table__msg { text-align: center; padding: 2rem !important; color: hsl(var(--muted-foreground)); }
.row-actions { white-space: nowrap; text-align: right; }
.btn.danger-text { color: hsl(var(--destructive)); }
.btn.danger { background: hsl(var(--destructive)); color: #fff; border-radius: 999px; }

.badge { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; line-height: 1.5; }
.badge--green  { background: hsl(142 71% 45% / .14); color: hsl(142 64% 32%); }
.badge--amber  { background: hsl(38 92% 50% / .16);  color: hsl(32 80% 38%); }
.badge--red    { background: hsl(0 84% 60% / .14);   color: hsl(0 70% 45%); }
.badge--blue   { background: hsl(221 83% 53% / .13); color: hsl(221 70% 45%); }
.badge--slate  { background: hsl(220 13% 46% / .14); color: hsl(220 12% 40%); }
.dark .badge--green { color: hsl(142 60% 62%); }
.dark .badge--amber { color: hsl(38 90% 65%); }
.dark .badge--red   { color: hsl(0 80% 70%); }
.dark .badge--blue  { color: hsl(221 85% 72%); }
.dark .badge--slate { color: hsl(220 15% 70%); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1rem; flex-wrap: wrap; }
.pager__info { font-size: .78rem; color: hsl(var(--muted-foreground)); }
.pager__buttons { display: flex; align-items: center; gap: .6rem; }
.pager__page { font-size: .8rem; color: hsl(var(--muted-foreground)); }

/* ---- modal ---- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.45);
  display: flex; align-items: flex-start; justify-content: center; padding: 4rem 1rem; overflow-y: auto; }
.modal { background: hsl(var(--card)); border: 1px solid hsl(var(--card-border)); border-radius: 1rem;
  box-shadow: var(--shadow-xl); width: 100%; }
.modal--sm { max-width: 380px; }
.modal--md { max-width: 560px; }
.modal--lg { max-width: 820px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border)); }
.modal__head h2 { margin: 0; font-size: 1rem; }
.modal__body { padding: 1.25rem; }
.modal__foot { display: flex; justify-content: flex-end; gap: .5rem; padding: 1rem 1.25rem;
  border-top: 1px solid hsl(var(--border)); }

/* ---- forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.form-grid .field { margin-bottom: 0; }
.form-grid .switch { grid-column: 1 / -1; }
.form-grid .form-error { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.field select, .field input[type=number] {
  border-radius: .7rem; padding: .55rem .7rem; font-size: .9rem; font-family: var(--font-sans);
  background: hsl(var(--card)); color: hsl(var(--foreground)); border: 1px solid hsl(var(--input)); width: 100%;
}
.field__row { display: flex; gap: .5rem; align-items: center; }
.field__row select, .field__row input { flex: 1; }
.field__hint { font-size: .72rem; color: hsl(var(--muted-foreground)); }
.field__error { font-size: .74rem; color: hsl(var(--destructive)); }
.field--error input, .field--error select { border-color: hsl(var(--destructive)); }

.switch { display: flex; align-items: center; gap: .55rem; font-size: .85rem; cursor: pointer; }
.switch input { width: 16px; height: 16px; }

/* ---- spinner ---- */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid hsl(var(--muted-foreground) / .35);
  border-top-color: hsl(var(--primary)); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
.spinner--inline { width: 13px; height: 13px; border-width: 2px; margin-right: .35rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= Auth + Staff management ================= */

/* larger, touch-friendly controls (field staff, phone browsers) */
.btn--lg { padding: .7rem 1.3rem; font-size: .95rem; min-height: 46px; }
.input-lg {
  border-radius: .7rem; padding: .7rem .85rem; font-size: 1rem; min-height: 46px; width: 100%;
  font-family: var(--font-sans); background: hsl(var(--card)); color: hsl(var(--foreground));
  border: 1px solid hsl(var(--input));
}
.input-lg:focus { outline: 2px solid hsl(var(--ring) / .35); outline-offset: 1px; border-color: hsl(var(--ring)); }
.field--lg { gap: .4rem; margin-bottom: 1.15rem; }
.field--lg label { font-size: .9rem; font-weight: 600; }

.nav-item--soon { opacity: .45; cursor: default; }

/* staff list rows */
.row-click { cursor: pointer; }
.row--dim td { opacity: .55; }
.table td .badge + .badge { margin-left: .3rem; }

/* form sections */
.form-section { margin-bottom: 1.1rem; }
.form-section__title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin: 0 0 1rem; }
.form-section__title .ico { font-size: 1.05rem; }
.field--wide { grid-column: 1 / -1; }

/* permission grid */
.perm-group { margin-bottom: 1rem; }
.perm-group__area { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); margin: .6rem 0 .4rem; }
.perm { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .6rem; border-radius: var(--radius);
  cursor: pointer; min-height: 42px; }
.perm:hover { background: hsl(var(--accent) / .5); }
.perm input { width: 18px; height: 18px; margin-top: .1rem; flex-shrink: 0; }
.perm__label { font-size: .88rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.perm__tag { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .05rem .35rem; border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--muted-foreground)); }
.perm__tag--changed { background: hsl(38 92% 50% / .18); color: hsl(32 80% 38%); }
.perm--changed { background: hsl(38 92% 50% / .07); }
.dark .perm__tag--changed { color: hsl(38 90% 65%); }

/* temporary password modal */
.temp-pw { display: flex; align-items: center; gap: .6rem; margin: .9rem 0; flex-wrap: wrap; }
.temp-pw code { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; letter-spacing: .04em;
  padding: .5rem .8rem; border-radius: .6rem; background: hsl(var(--muted)); color: hsl(var(--foreground)); }

/* staff detail */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 780px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: .55rem 1rem; margin: 0; font-size: .88rem; }
.kv dt { color: hsl(var(--muted-foreground)); }
.kv dd { margin: 0; }
.perm-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; padding: .25rem .6rem;
  border-radius: 999px; background: hsl(var(--muted)); color: hsl(var(--foreground)); }
.chip--granted { background: hsl(142 71% 45% / .14); }
.chip--revoked { background: hsl(0 84% 60% / .12); text-decoration: line-through; opacity: .8; }
.chip__tag { font-size: .6rem; font-weight: 700; text-transform: uppercase; color: hsl(var(--muted-foreground)); }

/* access denied */
.access-denied { display: grid; place-items: center; text-align: center; gap: .5rem; padding: 4rem 1rem; }
.access-denied__icon { font-size: 2.5rem; }
.access-denied .btn { margin-top: 1rem; }

/* ================= Ease-of-use pass =================
   Bigger text + touch targets across the whole app. Field staff and less-literate
   users need large, obvious controls. Nothing below 44px that you tap. */

:root { font-size: 16.5px; }

/* sidebar navigation - big, obvious, icon + label */
.sidebar { gap: .15rem; padding: .85rem; }
.nav-item { font-size: .95rem; min-height: 48px; padding: .7rem .75rem; gap: .8rem; border-radius: 12px; }
.nav-item .ico { width: 24px; font-size: 1.15rem; opacity: .95; }
.sidebar__group { font-size: .72rem; padding: 1.1rem .55rem .35rem; }
.nav-item--soon { display: none; }          /* hide the not-yet screens - less clutter */

/* header */
.topbar { min-height: 64px; }
.topbar__user .who .n { font-size: .95rem; }
.topbar__user .who .r { font-size: .8rem; }
.icon-btn { width: 42px; height: 42px; font-size: 1.15rem; }

/* buttons - all of them, everywhere */
.btn { font-size: .95rem; min-height: 44px; padding: .6rem 1.2rem; }
.btn.ghost { min-height: 44px; }
.btn--lg { font-size: 1.05rem; min-height: 52px; padding: .8rem 1.5rem; }

/* tables - taller rows, bigger text, easier to tap */
.table { font-size: .95rem; }
.table thead th { font-size: .72rem; padding: .8rem 1rem; }
.table tbody td { padding: .95rem 1rem; }
.row-click td { cursor: pointer; }

/* form fields */
.field label { font-size: .95rem; }
.field input, .field select, .field input[type=number] { font-size: 1rem; padding: .7rem .85rem; min-height: 46px; }
.input-lg { min-height: 50px; font-size: 1.05rem; }
.field__hint { font-size: .82rem; }

/* permission grid - calmer, bigger */
.perm { min-height: 52px; padding: .7rem .7rem; gap: .8rem; }
.perm input { width: 22px; height: 22px; }
.perm__label { font-size: .98rem; }
.perm-group__area { font-size: .78rem; }

/* stat cards */
.stat-card .value { font-size: 2rem; }

/* language toggle in header */
.lang-toggle { display: inline-flex; border: 1px solid hsl(var(--border)); border-radius: 999px; overflow: hidden; }
.lang-toggle button { border: none; background: transparent; color: hsl(var(--muted-foreground));
  font: inherit; font-size: .85rem; font-weight: 600; padding: .4rem .8rem; cursor: pointer; min-height: 40px; }
.lang-toggle button.on { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

/* right-to-left when Urdu is active */
[dir="rtl"] .kv { direction: rtl; }
[dir="rtl"] .table thead th, [dir="rtl"] .table tbody td { text-align: right; }
[dir="rtl"] .page-header, [dir="rtl"] .toolbar { flex-direction: row-reverse; }
.login-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.login-card__top .brand { margin-bottom: 0; }

/* permission grid - "extra access" vs "removed" framing */
.perm--extra   { background: hsl(142 71% 45% / .08); }
.perm--removed  { background: hsl(0 84% 60% / .06); }
.perm--removed .perm__label { opacity: .6; }
.perm__tag--extra   { background: hsl(142 71% 45% / .18); color: hsl(142 64% 32%); }
.perm__tag--removed { background: hsl(0 84% 60% / .16); color: hsl(0 70% 45%); }
.dark .perm__tag--extra   { color: hsl(142 60% 62%); }
.dark .perm__tag--removed { color: hsl(0 80% 70%); }

/* ---------- roles screen ---------- */
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.role-card {
  background: hsl(var(--card)); border: 1px solid hsl(var(--card-border)); border-radius: 1rem;
  box-shadow: var(--shadow-sm); padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .6rem;
}
.role-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.role-card__name { font-weight: 700; font-size: 1.05rem; margin-right: .5rem; }
.role-card__count { font-size: .78rem; color: hsl(var(--muted-foreground)); white-space: nowrap; }
.role-card__desc { margin: 0; font-size: .88rem; color: hsl(var(--muted-foreground)); }
.role-card__meta { font-size: .82rem; color: hsl(var(--muted-foreground)); display: flex; gap: 1rem; }
.role-card__actions { display: flex; gap: .5rem; margin-top: auto; padding-top: .4rem; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .3rem; margin-bottom: 1rem; border-bottom: 1px solid hsl(var(--border)); }
.tab { border: none; background: transparent; font: inherit; font-weight: 600; font-size: .92rem;
  color: hsl(var(--muted-foreground)); padding: .6rem 1rem; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; }
.tab--on { color: hsl(var(--primary)); border-bottom-color: hsl(var(--primary)); }

/* ---------- stock: team blocks ---------- */
.team-block { margin-bottom: 1.25rem; }
.team-block:last-child { margin-bottom: 0; }
.team-block__name { font-weight: 700; font-size: .95rem; margin-bottom: .5rem; }

/* ---------- empty state ---------- */
.empty-state { display: grid; place-items: center; text-align: center; gap: .6rem; padding: 3rem 1rem;
  color: hsl(var(--muted-foreground)); }
.empty-state__icon { font-size: 2.25rem; }

/* ---------- purchases ---------- */
.row--link { cursor: pointer; }
.row--link:hover td { background: hsl(var(--muted) / 0.5); }

.totals { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem;
  margin-inline-start: auto; max-width: 22rem; }
.totals > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.totals > div > span:first-child { color: hsl(var(--muted-foreground)); }
.totals input { max-width: 9rem; }
.totals__grand { border-top: 1px solid hsl(var(--border)); padding-top: .5rem;
  font-weight: 600; font-size: 1.05rem; }

.table tfoot td { border-top: 1px solid hsl(var(--border)); font-size: .9rem; }

/* ---------- notice banner ---------- */
.notice { background: hsl(var(--muted) / 0.6); border: 1px solid hsl(var(--border));
  border-radius: .8rem; padding: .8rem 1rem; font-size: .9rem;
  color: hsl(var(--muted-foreground)); }
.notice--danger { background: hsl(var(--destructive) / 0.1);
  border-color: hsl(var(--destructive) / 0.4); color: hsl(var(--destructive)); }

/* ---------- reports ---------- */
.row--warn td { background: hsl(var(--warning, 38 92% 50%) / 0.12); }
.row--warn td:first-child { box-shadow: inset 3px 0 0 hsl(var(--warning, 38 92% 50%)); }
