/* v2 - the second round of the redesign (branch ui-v2, 17.11.2026), after
   shadcn/ui's dashboard: the menu's teal frames the page and the content sits
   in a panel (SidebarInset), a header inside the panel says where the reader
   is (SiteHeader + Breadcrumb), the menu has its icons and narrows to them,
   the user menu is at its foot (NavUser), and tabs, tables and badges take
   the shapes of the same library. The one move of our own is the deadline
   gauge: how close a call is, drawn the same way wherever a call is listed.

   Loaded after look.css and before print.css, so a rule here is the current
   word on its selector while the round is being looked at locally. Colours
   come from tokens.css only. */

/* ---- icons ------------------------------------------------------------- */
.ico { flex: none; display: inline-block; vertical-align: -3px; }

/* ---- the frame and the panel (>= 1200 px) ------------------------------ */
.siteheader { display: none; }
@media (min-width: 1200px) {
  body.page-app { background: var(--frame); }
  /* The strip above the panel stays the frame while the page scrolls under
     the header; without it the rows would show through above it. */
  body.page-app::before { content: ""; position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: var(--frame-gap); background: var(--frame); }
  .page-app .app { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  html.side-icons .page-app .app { grid-template-columns: var(--sidebar-w-icons) minmax(0, 1fr); }
  /* Above the panel's header (30), so the user menu opens over the page;
     under the strip (40), which is the same teal. */
  .page-app .sidebar { z-index: 35; background: transparent; border-right: 0; padding: calc(var(--frame-gap) + 6px) 8px var(--frame-gap) 10px; }
  .page-app .app-body {
    margin: var(--frame-gap) var(--frame-gap) var(--frame-gap) 0;
    min-height: calc(100vh - 2 * var(--frame-gap));
    background: var(--surface-100);
    border-radius: var(--panel-radius);
    box-shadow: var(--panel-shadow);
  }
  .page-app .main { padding: 24px 32px 48px; }

  .siteheader {
    position: sticky; top: var(--frame-gap); z-index: 30;
    display: flex; align-items: center; gap: 8px;
    height: var(--siteheader-h); padding: 0 16px 0 12px;
    background: var(--surface-100);
    border-bottom: 1px solid var(--border);
  }
  /* Square header, rounded look: two caps paint the frame outside the
     panel's corner arc, so nothing that scrolls under the header shows in
     its corners. */
  .siteheader::before, .siteheader::after { content: ""; position: absolute; top: 0; width: var(--panel-radius); height: var(--panel-radius); pointer-events: none; }
  .siteheader::before { left: 0; background: radial-gradient(circle at 100% 100%, transparent calc(var(--panel-radius) - 0.5px), var(--frame) var(--panel-radius)); }
  .siteheader::after { right: 0; background: radial-gradient(circle at 0 100%, transparent calc(var(--panel-radius) - 0.5px), var(--frame) var(--panel-radius)); }
  /* The header carries the search on wide screens. */
  .sidebar .nav2-search { display: none; }
}
@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
  .page-app .app { transition: grid-template-columns 200ms var(--ease-brief); }
}

.siteheader-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--ink-muted); cursor: pointer;
  transition: background-color var(--dur-hover), color var(--dur-hover);
}
.siteheader-toggle:hover { background: var(--surface-sunk); color: var(--ink); }
.siteheader-sep { width: 1px; height: 16px; background: var(--border-firm); margin: 0 4px; }
.crumbs ol { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; font: 400 14px/20px var(--font-sans); color: var(--ink-muted); min-width: 0; }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; min-width: 0; }
.crumbs li + li::before {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor; opacity: 0.6;
  -webkit-mask: url(/static/img/chevron-right.svg) center / contain no-repeat;
  mask: url(/static/img/chevron-right.svg) center / contain no-repeat;
}
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--ink); text-decoration: none; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; max-width: 48ch; }
.siteheader-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.siteheader-search {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; width: 260px;
  padding: 0 6px 0 10px; border: 1px solid var(--outline-border); border-radius: var(--radius-md);
  background: var(--surface-200); color: var(--ink-faint); box-shadow: var(--shadow-xs);
  font: 400 13px/18px var(--font-sans); text-align: left; cursor: pointer;
  transition: border-color var(--dur-hover), color var(--dur-hover);
}
.siteheader-search:hover { border-color: var(--control-border); color: var(--ink-muted); }
.siteheader-search .kbd { margin-left: auto; }

/* ---- the menu ----------------------------------------------------------- */
.nav2-item, .nav2-addons summary { gap: 10px; }
.nav2-ico { opacity: 0.85; }
.nav2-item[aria-current] .nav2-ico, .nav2-item:hover .nav2-ico { opacity: 1; }
.nav2-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav2-dotbox { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; }
.nav2-label { padding: 18px 10px 6px; letter-spacing: 0.01em; }
.sidebar .brand { padding: 2px 8px 16px; }

/* Narrowed to its icons. The words leave the screen and stay in the
   accessibility tree; each item's title says them on hover. */
@media (min-width: 1200px) {
  html.side-icons .sidebar { padding-left: 8px; padding-right: 8px; overflow: visible; }
  html.side-icons .sidebar .nav2-text,
  html.side-icons .sidebar .userblock-btn .userblock-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  html.side-icons .sidebar .nav2-count,
  html.side-icons .sidebar .userblock-chev,
  html.side-icons .sidebar .brand-name,
  html.side-icons .sidebar .nav2-off::after { display: none; }
  html.side-icons .sidebar .brand { justify-content: center; padding: 2px 0 16px; }
  /* A group's name keeps its words for the list it labels; on the rail it
     draws as a hairline between groups. */
  html.side-icons .sidebar .nav2-label { font-size: 0; line-height: 0; padding: 12px 10px; }
  html.side-icons .sidebar .nav2-label::before { content: ""; display: block; height: 1px; background: color-mix(in srgb, var(--side-ink) 22%, transparent); }
  html.side-icons .sidebar .nav2-item,
  html.side-icons .sidebar .nav2-addons summary { justify-content: center; width: 40px; min-height: 36px; padding: 0; margin: 0 auto; }
  html.side-icons .sidebar .nav2 { overflow-x: hidden; }
  html.side-icons .sidebar .userblock-btn { justify-content: center; padding: 6px 0; }
}

/* ---- the user menu ------------------------------------------------------ */
.userblock.popmenu { position: relative; display: block; padding: 0; border-top: 0; margin-top: 8px; }
.sidebar .userblock { border-top: 0; padding: 0; }
.userblock-btn {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-md);
  list-style: none; cursor: pointer; transition: background-color var(--dur-hover);
}
.userblock-btn::-webkit-details-marker { display: none; }
.sidebar .userblock-btn:hover, .sidebar .userblock[open] .userblock-btn { background: var(--side-hover); }
.userblock-btn .avatar { width: 32px; height: 32px; border-radius: var(--radius-md); }
.userblock-text { flex: 1 1 auto; }
.userblock-sub { display: block; font: 400 12px/16px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .userblock-sub, .sidebar .userblock-chev { color: var(--side-label); }
.popmenu-panel {
  position: absolute; z-index: 50; left: 0; right: 0; bottom: calc(100% + 6px);
  padding: 4px; background: var(--surface-200); color: var(--ink);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
@media (min-width: 1200px) {
  html.side-icons .sidebar .popmenu-panel { left: calc(100% + 10px); right: auto; bottom: 0; width: 240px; }
}
.userblock-head { display: flex; flex-direction: column; padding: 8px 10px 6px; }
.userblock-head .userblock-name { color: var(--ink); }
.userblock-head .userblock-sub { color: var(--ink-muted); }
.popmenu-list { list-style: none; margin: 0; padding: 0; }
.popmenu-list a {
  display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 6px 10px; border-radius: var(--radius-sm);
  font: 400 14px/20px var(--font-sans); color: var(--ink);
}
.popmenu-list a:hover { background: var(--surface-sunk); text-decoration: none; }
.popmenu-list .ico { color: var(--ink-muted); }
.popmenu-sep { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
.sidebar .userblock-links, .sidebar .userblock-links a { color: var(--ink); }
/* In the phone's menu the user menu opens in place, under its button. */
.menu-panel .userblock-btn:hover, .menu-panel .userblock[open] .userblock-btn { background: var(--surface-sunk); }
.menu-panel .userblock-sub, .menu-panel .userblock-chev { color: var(--ink-muted); }
.menu-panel .popmenu-panel { position: static; margin-top: 4px; box-shadow: none; }

/* ---- the phone's bar ---------------------------------------------------- */
@media (max-width: 1199px) {
  .topbar { background: var(--frame); border-bottom: 0; }
}

/* ---- the deadline gauge -------------------------------------------------
   A thirty-day ruler with a tick at every week; the fill is the time left,
   so it drains as the deadline comes. Steps of three days (data-g 0-10). */
.gauge {
  position: relative; display: block; width: 72px; height: 4px; margin-top: 6px;
  border-radius: 2px; overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(23.33% - 1px), var(--surface-100) calc(23.33% - 1px), var(--surface-100) 23.33%, transparent 23.33%),
    linear-gradient(90deg, transparent calc(46.67% - 1px), var(--surface-100) calc(46.67% - 1px), var(--surface-100) 46.67%, transparent 46.67%),
    linear-gradient(90deg, transparent calc(70% - 1px), var(--surface-100) calc(70% - 1px), var(--surface-100) 70%, transparent 70%),
    var(--gauge-track);
}
.gauge-fill { position: absolute; inset: 0 auto 0 0; width: 4%; border-radius: 2px; background: var(--gauge-far); }
.gauge-week .gauge-fill { background: var(--gauge-week); }
.gauge-near .gauge-fill { background: var(--gauge-near); }
.gauge[data-g="1"] .gauge-fill { width: 10%; }
.gauge[data-g="2"] .gauge-fill { width: 20%; }
.gauge[data-g="3"] .gauge-fill { width: 30%; }
.gauge[data-g="4"] .gauge-fill { width: 40%; }
.gauge[data-g="5"] .gauge-fill { width: 50%; }
.gauge[data-g="6"] .gauge-fill { width: 60%; }
.gauge[data-g="7"] .gauge-fill { width: 70%; }
.gauge[data-g="8"] .gauge-fill { width: 80%; }
.gauge[data-g="9"] .gauge-fill { width: 90%; }
.gauge[data-g="10"] .gauge-fill { width: 100%; }
/* The ticks are drawn over the fill too: the week marks stay readable. */
.gauge::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent calc(23.33% - 1px), var(--surface-200) calc(23.33% - 1px), var(--surface-200) 23.33%, transparent 23.33%),
    linear-gradient(90deg, transparent calc(46.67% - 1px), var(--surface-200) calc(46.67% - 1px), var(--surface-200) 46.67%, transparent 46.67%),
    linear-gradient(90deg, transparent calc(70% - 1px), var(--surface-200) calc(70% - 1px), var(--surface-200) 70%, transparent 70%);
}
@media (forced-colors: active) { .gauge { display: none; } }

/* ---- Pregled dana: the two tabs as cards (shadcn's section cards) -------
   Each card is still the tab link it was: the number of rows behind it on
   top, its name under it, and the one open drawn in the brand. */
.dash-tabs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  max-width: 760px; margin: 0 0 28px; border-bottom: 0; overflow: visible;
}
.dash-tabs a, .dash-tabs .dash-tab-off {
  position: relative; display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 2px;
  margin: 0; padding: 14px 18px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-200); box-shadow: var(--shadow-xs);
  font: 500 13px/18px var(--font-sans); color: var(--ink-muted); white-space: normal;
  transition: border-color var(--dur-hover), box-shadow var(--dur-hover);
}
.dash-tabs .dash-tab-n {
  margin: 0; opacity: 1; font: 600 30px/38px var(--font-sans); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.dash-tabs a:hover { border-color: var(--border-firm); color: var(--ink); text-decoration: none; }
.dash-tabs a[aria-current] {
  border-color: var(--brand); color: var(--ink);
  background: linear-gradient(to top, color-mix(in srgb, var(--brand) 6%, var(--surface-200)), var(--surface-200));
  box-shadow: 0 0 0 1px var(--brand), var(--shadow-xs);
}
.dash-tabs a[aria-current] .dash-tab-n { color: var(--brand); }
.dash-tabs .dash-tab-off { opacity: 1; color: var(--ink-faint); background: var(--surface-100); box-shadow: none; }
.dash-tabs .dash-tab-off .dash-tab-n { color: var(--ink-faint); }
.dash-brief { margin-bottom: 24px; }
.dash-section-head { border-bottom: 0; padding-bottom: 0; align-items: center; }
.dash-more {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px;
  border: 1px solid var(--outline-border); border-radius: var(--radius-md);
  background: var(--surface-200); box-shadow: var(--shadow-xs); color: var(--ink); font: 500 13px/18px var(--font-sans);
}
.dash-more:hover { background: var(--surface-sunk); text-decoration: none; }
.dash-section-sub { margin-top: 2px; }
@media (max-width: 719px) {
  .dash-tabs { gap: 8px; }
  .dash-tabs a, .dash-tabs .dash-tab-off { padding: 12px 14px; }
  .dash-tabs .dash-tab-n { font-size: 24px; line-height: 30px; }
}

/* ---- labels: sentence case, as shadcn writes them ------------------------
   The small capitals with tracking were the Brifing voice; v2 names a value
   the way a form names its field. */
.kpi-label, .meta-label, .verdict-label, .admin-count, .h-sub {
  text-transform: none; letter-spacing: 0; font: 500 13px/18px var(--font-sans); color: var(--ink-muted);
}
.verdict-value { font: 600 22px/28px var(--font-sans); letter-spacing: -0.01em; }
.verdict-text { font: 500 15px/22px var(--font-sans); letter-spacing: 0; }
.verdict .gauge { width: 120px; height: 5px; margin-top: 8px; }
@media screen and (max-width: 719px) {
  table.data.cards td::before { text-transform: none; letter-spacing: 0; font: 500 12px/16px var(--font-sans); }
}

/* ---- the filter bar (shadcn's data-table toolbar) ------------------------ */
.filters-q { position: relative; }
.filters-q::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px;
  background: var(--ink-faint); pointer-events: none;
  -webkit-mask: url(/static/img/search.svg) center / contain no-repeat; mask: url(/static/img/search.svg) center / contain no-repeat;
}
.filters-q .input { padding-left: 34px; }
.filters-reset {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px;
  border-radius: var(--radius-md); color: var(--ink-muted); font: 500 13px/18px var(--font-sans);
}
.filters-reset::before {
  content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url(/static/img/x.svg) center / contain no-repeat; mask: url(/static/img/x.svg) center / contain no-repeat;
}
.filters-reset:hover { background: var(--surface-sunk); color: var(--ink); text-decoration: none; }
/* The oblast's categories open from a faceted button: dashed until one is
   picked, as shadcn draws a filter that is not yet set. */
.cat-tree-title { font: 500 13px/18px var(--font-sans); color: var(--ink-muted); }
.cat-oblast > summary { border-style: dashed; border-color: var(--control-border); box-shadow: none; min-height: 32px; }
.cat-oblast > summary:hover { background: var(--surface-sunk); }
.cat-oblast[open] > summary { border-style: solid; background: var(--surface-200); }
.cat-oblast > summary::before {
  content: ""; width: 14px; height: 14px; background: var(--ink-muted); margin-right: -2px;
  -webkit-mask: url(/static/img/plus-circle.svg) center / contain no-repeat; mask: url(/static/img/plus-circle.svg) center / contain no-repeat;
}
.cat-n, .pill-count {
  display: inline-flex; align-items: center; min-width: 20px; height: 18px; padding: 0 6px; justify-content: center;
  border-radius: 999px; background: var(--surface-sunk); color: var(--ink-muted);
  font: 500 11px/18px var(--font-sans); font-variant-numeric: tabular-nums; opacity: 1;
}
.pill[aria-current] .pill-count { background: var(--brand-soft); color: var(--brand); }
/* An Excel download says so with its icon. */
.btn[href$=".xlsx"]::before, .btn[href*=".xlsx?"]::before {
  content: ""; width: 15px; height: 15px; margin-right: 6px; background: currentColor; flex: none;
  -webkit-mask: url(/static/img/download.svg) center / contain no-repeat; mask: url(/static/img/download.svg) center / contain no-repeat;
}
.list-title { font: 600 16px/24px var(--font-sans); }
.list-count { color: var(--ink-faint); font-weight: 400; }

/* ---- the beam (Magic UI's BorderBeam), on the screen shown on the first
   page and beside the sign-in form ---------------------------------------- */
@property --beam-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.beam { position: relative; }
.beam::after {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--beam-angle), transparent 0deg 290deg, var(--beam-a) 325deg, var(--beam-b) 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(black 0 0) content-box, linear-gradient(black 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
@media (prefers-reduced-motion: no-preference) {
  .beam::after { animation: beam-run 9s linear infinite; }
}
@media (prefers-reduced-motion: reduce) { .beam::after { display: none; } }
@keyframes beam-run { to { --beam-angle: 360deg; } }

/* ---- sign in (after shadcn's login-04) ---------------------------------- */
.page-login .pub-main { max-width: 1200px; }
.auth-split {
  display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 0; align-items: stretch;
  margin: 4vh auto 0; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  background: var(--surface-200); box-shadow: var(--shadow-md);
}
.auth-split .auth-card { max-width: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; padding: 40px 40px 32px; }
.auth-brand { margin-bottom: 20px; }
.auth-title { font: 600 24px/32px var(--font-sans); letter-spacing: -0.02em; margin-bottom: 4px; }
.auth-split .form-actions .btn { width: 100%; }
.auth-side {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 24px;
  padding: 40px 0 40px 40px; background: var(--frame); color: var(--side-ink); overflow: hidden;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--side-ink) 22%, transparent) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, black, transparent);
  mask-image: radial-gradient(ellipse 80% 70% at 30% 30%, black, transparent);
}
.auth-side-say { position: relative; max-width: 36ch; padding-right: 40px; font: 500 18px/28px var(--font-sans); color: var(--side-ink-strong); text-wrap: balance; }
.auth-shot { position: relative; margin: 0; border-radius: 12px 0 0 12px; overflow: hidden; box-shadow: var(--shadow-md); }
.auth-shot img { display: block; width: 100%; height: auto; }
@media (max-width: 899px) {
  .auth-split { grid-template-columns: 1fr; margin-top: 0; }
  .auth-side { display: none; }
  .auth-split .auth-card { padding: 28px 22px; }
}

/* ---- tabs (shadcn's Tabs): a segmented list, the open one raised -------
   Pregled dana's two are cards (above) and keep their own rules. */
.tabs:not(.dash-tabs) {
  display: inline-flex; gap: 2px; max-width: 100%; padding: 3px; margin-bottom: 20px;
  background: var(--surface-sunk); border: 0; border-radius: 10px;
}
.tabs:not(.dash-tabs) a {
  padding: 5px 12px; margin: 0; border: 0; border-radius: 7px;
  font: 500 14px/20px var(--font-sans); color: var(--ink-muted);
  transition: background-color var(--dur-hover), color var(--dur-hover);
}
.tabs:not(.dash-tabs) a:hover { color: var(--ink); background: color-mix(in srgb, var(--surface-200) 60%, transparent); }
.tabs:not(.dash-tabs) a[aria-current] { background: var(--surface-200); color: var(--ink); box-shadow: var(--shadow-xs); }

/* ---- a group's heading inside a list: sentence case, and on the phone a
   plain heading over its cards rather than an empty card of its own. ----- */
.tn-group-head { text-transform: none; letter-spacing: 0; font: 600 13px/18px var(--font-sans); color: var(--ink); background: var(--surface-100); }
.tn-group-n { display: inline-flex; align-items: center; min-width: 20px; height: 18px; padding: 0 6px; justify-content: center; border-radius: 999px; background: var(--surface-sunk); color: var(--ink-muted); font: 500 11px/18px var(--font-sans); }
@media screen and (max-width: 719px) {
  table.data.cards tr.tn-head-row { display: block; padding: 4px 2px 0; background: transparent; border: 0; box-shadow: none; margin: 0 0 6px; }
  table.data.cards tr.tn-head-row th { display: block; padding: 0; border: 0; background: transparent; }
}

/* ---- the phone's bar: brand, then the menu on the right ----------------- */
@media (max-width: 1199px) {
  .topbar .menu { margin-left: auto; }
  .topbar .menu > summary { display: inline-flex; align-items: center; gap: 8px; }
  .topbar .menu > summary::before {
    content: ""; width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url(/static/img/menu.svg) center / contain no-repeat; mask: url(/static/img/menu.svg) center / contain no-repeat;
  }
}

/* ---- the panel's edge: nothing in the light, a hairline in the dark ---- */
@media (min-width: 1200px) {
  .page-app .app-body { box-shadow: 0 0 0 1px var(--panel-edge), var(--panel-shadow); }
}

/* ---- staff pages: the customer's shell, framed in graphite --------------
   The menu's own custom properties take the staff values on the body, so
   every rule above draws the staff menu without a rule of its own. */
.page-internal {
  --frame: var(--int-bg); --side-bg: var(--int-bg); --side-border: var(--int-bg);
  --side-ink: var(--int-ink); --side-label: var(--int-label); --side-hover: var(--int-hover);
  --side-active-bg: var(--int-active-bg); --side-field: var(--int-field); --side-field-border: var(--int-field-border);
}
.siteheader .badge-interno { white-space: nowrap; }
.topbar-interno { margin-left: 2px; }
@media (min-width: 1200px) {
  /* Firme: the companies are a column of the panel, the company beside it. */
  .page-admin .main { padding: 0; }
  .page-admin .admin-grid { min-height: calc(100vh - 2 * var(--frame-gap) - var(--siteheader-h)); }
  .page-admin .admin-list { border-bottom-left-radius: var(--panel-radius); }
  .page-admin-page .main { padding: 24px 32px 48px; }
}

/* ---- the theme switch in the user menu (shadcn's mode toggle, three-way) */
.popmenu-theme {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 2px 6px 6px 10px; margin: 0 0 4px; border-bottom: 1px solid var(--border);
}
.popmenu-theme-label { font: 400 14px/20px var(--font-sans); color: var(--ink); }
.theme-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius-md); background: var(--surface-sunk); }
.theme-seg button {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 26px;
  border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); cursor: pointer;
  transition: background-color var(--dur-hover), color var(--dur-hover);
}
.theme-seg button:hover { color: var(--ink); }
.theme-seg button[aria-pressed="true"] { background: var(--surface-200); color: var(--ink); box-shadow: var(--shadow-xs); }

/* ---- the logo on a dark ground ------------------------------------------
   Two drawings in the brand link; the theme decides which one shows. On the
   menu's white chip the light drawing stays, whatever the theme. */
.brand-logo-dark { display: none; }
@media screen {
  :root[data-theme="dark"] .brand-logo-light { display: none; }
  :root[data-theme="dark"] .brand-logo-dark { display: block; }
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-logo-dark { display: block; }
}
:root .sidebar .brand-logo-light, :root .topbar .brand-logo-light { display: block; }
:root .sidebar .brand-logo-dark, :root .topbar .brand-logo-dark { display: none; }
