/* ================================================================
   NormarTab — REFA Instrument design tokens
   Load BEFORE mma.css and sdd.css so they can consume these vars.
   ================================================================ */

/* ── IBM Plex — bundled locally (offline-first; no CDN) ─────────
   Complete builds: cover latin-ext (č š ž). URLs resolve relative
   to this file: _content/NormarCapture.UI/fonts/…                 */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/IBMPlexSans-Bold.woff2') format('woff2');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Ink / text ─────────────────────────────────────────────── */
  --ink:       #0F1B2D;
  --ink-soft:  #475569;
  --ink-mut:   #7A8AA0;

  /* ── Chrome / dark nav surface ──────────────────────────────── */
  --chrome:      #122A42;
  --chrome-hi:   #1D4468;
  --chrome-line: #0B1E30;

  /* ── Page surfaces ───────────────────────────────────────────── */
  --surface: #F4F6F9;
  --card:    #FFFFFF;
  --line:    #E3E8EF;

  /* ── Brand colours ───────────────────────────────────────────── */
  --primary:    #1F6FEB;
  --primary-hi: #155ED0;
  --accent:     #E8622C;

  /* ── REFA category colours ───────────────────────────────────── */
  --c-main: #1E8E3E;   /* Glavno delo */
  --c-aux:  #1F6FEB;   /* Pomožno     */
  --c-dist: #D93025;   /* Motnje      */
  --c-pers: #F5A623;   /* Osebno      */

  /* ── Status ─────────────────────────────────────────────────── */
  --ok:   #1E8E3E;
  --warn: #F5A623;
  --bad:  #D93025;

  /* ── Shape ───────────────────────────────────────────────────── */
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 1px 2px rgba(15,27,45,.06), 0 2px 8px rgba(15,27,45,.06);

  /* ── Typography ─────────────────────────────────────────────── */
  --font-ui:   'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ── Spacing scale ───────────────────────────────────────────── */
  --sp-1: .25rem;
  --sp-2: .5rem;
  --sp-3: .75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;

  /* ── App chrome metrics ──────────────────────────────────────── */
  --nav-h: 54px;

  /* ── SyncButton legacy compat ────────────────────────────────── */
  --mma-text-secondary: var(--ink-mut);
}

/* ── Base ────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--surface);
}

/* ── App shell layout ────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  min-height: 0;
}

/* ── Offset sticky per-study header below AppNav ─────────────────── */
/* MmaStudyView uses .mma-app-header { position:sticky; top:0 }.
   Now that a 54px nav sits above it, push the offset down. */
.mma-app-header {
  top: var(--nav-h);
}

/* ── AppNav — persistent instrument top bar ──────────────────────── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: var(--nav-h);
  padding: 0 var(--sp-4);
  background: var(--chrome);
  border-bottom: 1px solid var(--chrome-line);
  color: #fff;
  /* prevent any child from busting the line-height */
  font-size: 0;
}

/* Brand block */
.app-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
  text-decoration: none;
}

.app-nav-glyph {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  opacity: .92;
}

.app-nav-product {
  font-family: var(--font-ui);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
  white-space: nowrap;
}

.app-nav-tag {
  font-family: var(--font-mono);
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--accent);
  background: rgba(232,98,44,.18);
  border: 1px solid rgba(232,98,44,.4);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  text-transform: uppercase;
}

/* Segmented method switcher */
.app-nav-methods {
  display: inline-flex;
  align-items: center;
  background: var(--chrome-line);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.app-nav-seg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  white-space: nowrap;
  transition: background .12s, color .12s;
}

.app-nav-seg:hover { color: #fff; background: rgba(255,255,255,.1); }
.app-nav-seg.active { background: var(--chrome-hi); color: #fff; }

/* Right: actions */
.app-nav-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.app-nav-clock {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  letter-spacing: .02em;
  white-space: nowrap;
}

.app-nav-link {
  font-family: var(--font-ui);
  font-size: .82rem;
  font-weight: 500;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  white-space: nowrap;
  transition: color .12s;
}

.app-nav-link:hover  { color: #fff; }
.app-nav-link.active { color: #fff; font-weight: 600; }

/* ── SyncButton chip — compact override inside AppNav ────────────── */
/* Scope: everything inside .app-sync-chip overrides the standalone card style */
.app-sync-chip {
  --mma-text-secondary: rgba(255,255,255,.5);
  display: inline-flex;
  align-items: center;
}

.app-sync-chip .mma-card {
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  border: none;
}

.app-sync-chip .mma-card > div {
  gap: var(--sp-2);
  flex-wrap: nowrap;
}

.app-sync-chip .mma-btn {
  height: 28px;
  padding: 0 10px;
  font-size: .75rem;
  border-radius: var(--radius-sm);
}

.app-sync-chip .mma-badge {
  height: 18px;
  font-size: .68rem;
  padding: 0 6px;
}

/* ── Reusable numeric readout helper ─────────────────────────────── */
.num-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── DevExpress (blazing-berry) recolor: berry purple #5f368d → app accent ───
   This file loads after the theme; the theme scopes its vars with :where()
   (zero specificity), so these plain-class rules win.                        */
:root {
  --bs-primary: #E8622C;
  --bs-primary-rgb: 232, 98, 44;
  --dxbl-client-component-palette-primary: #E8622C;
}
/* Standalone selector included: the berry theme sets standalone primaries via the
   two-class `.dxbl-btn-standalone.dxbl-btn-primary` (#6F42C1), which out-specifies a
   single class — grid/toolbar buttons are matched by a zero-specificity :where() rule,
   which is why the gap only shows on standalone DxButtons (e.g. the office "Koš"). */
.dxbl-btn-primary,
.dxbl-btn-standalone.dxbl-btn-primary {
  --dxbl-btn-bg: #E8622C;
  --dxbl-btn-border-color: #E8622C;
  --dxbl-btn-hover-bg: #D0551F;
  --dxbl-btn-hover-border-color: #D0551F;
  --dxbl-btn-active-bg: #B8481A;
  --dxbl-btn-active-border-color: #B8481A;
  /* disabled + focused shades (the theme uses lighter / brighter berries here) */
  --dxbl-btn-disabled-bg: #F3B095;
  --dxbl-btn-disabled-border-color: #F3B095;
  --dxbl-btn-focus-bg: #D0551F;
  --dxbl-btn-focus-border-bg: #D0551F;
  --dxbl-btn-focus-outline-color: #E8622C;
}
.dxbl-btn {
  --dxbl-btn-focus-outline-color: #E8622C;
  --dxbl-btn-focus-shadow-color: rgba(232, 98, 44, 0.5);
}
/* focused text editors (DxTextBox / DxSpinEdit / DxComboBox): border + glow */
.dxbl-text-edit {
  --dxbl-text-edit-focus-border-color: #E8622C;
  --dxbl-text-edit-focus-shadow-color: rgba(232, 98, 44, 0.25);
  --dxbl-edit-dropdown-btn-focus-outline-color: #E8622C;
}
.dxbl-grid {
  --dxbl-grid-focus-frame-color: #E8622C;
  --dxbl-grid-column-chooser-focus-frame-color: #E8622C;
  --dxbl-pager-active-page-btn-bg: #E8622C;
  --dxbl-pager-page-btn-hover-bg: rgba(232, 98, 44, 0.12);
}
/* The berry theme re-declares the pager tokens ON the pager (`.dxbl-pager { --dxbl-pager-active-
   page-btn-bg: #5f368d }`) and the hover token on the active button itself, so the inherited
   .dxbl-grid values above never reach them — the grid pagers stayed purple. Same selectors,
   later in the cascade, win. */
.dxbl-pager { --dxbl-pager-active-page-btn-bg: #E8622C; }
.dxbl-pager > .dxbl-btn.dxbl-btn-outline-secondary.dxbl-pager-active-page-btn {
  --dxbl-pager-page-btn-hover-bg: rgba(232, 98, 44, 0.12);
}
/* Likewise the dropdown-button focus outline token lives on .dxbl-edit-dropdown, not .dxbl-text-edit. */
.dxbl-edit-dropdown { --dxbl-edit-dropdown-btn-focus-outline-color: #E8622C; }
/* Remaining berry-purple tokens the theme sets for components the apps use (accordion, calendar
   in date editors, loading panel / wait indicator, windows, toolbars, tree views, progress bars,
   toasts, message boxes, link buttons). Declared at :root and on each component root so the
   override wins wherever the theme put its own declaration. */
:root, .dxbl-accordion, .dxbl-calendar, .dxbl-loading-panel, .dxbl-wait-indicator, .dxbl-window,
.dxbl-toolbar, .dxbl-treeview, .dxbl-progress-bar, .dxbl-toast, .dxbl-message-box, .dxbl-btn,
.dxbl-btn-link, .dxbl-menu, .dxbl-dropdown, .dxbl-btn-dropdown-popup, .dxbl-toolbar-dropdown, .dxbl-menu-dropdown {
  --dxbl-accordion-focus-outline-color: #E8622C;
  --dxbl-btn-link-hover-color: #D0551F;
  --dxbl-btn-dropdown-btn-focus-outline-color: #E8622C;
  --dxbl-btn-toolbar-focus-outline-color: #E8622C;
  --dxbl-calendar-item-focus-outline-color: #E8622C;
  --dxbl-calendar-today-border-color: #E8622C;
  --dxbl-loading-panel-message-color: #E8622C;
  --dxbl-wait-indicator-color: #E8622C;
  --dxbl-window-focus-outline-color: #E8622C;
  --dxbl-toolbar-dropdown-btn-focus-outline-color: #E8622C;
  --dxbl-menu-dropdown-item-focus-outline-color: #E8622C;
  --dxbl-treeview-item-focus-outline-color: #E8622C;
  --dxbl-treeview-checkbox-checked-hover-bg: #D0551F;
  --dxbl-progress-bar-indicator-color: #E8622C;
  --dxbl-progress-bar-track-color: rgba(232, 98, 44, 0.2);
  --dxbl-toast-accent-line-color: #E8622C;
  --dxbl-toast-icon-color: #E8622C;
  --dxbl-message-box-header-icon-color: #E8622C;
}
.dxbl-checkbox {
  --dxbl-checkbox-check-element-checked-bg: #E8622C;
  --dxbl-checkbox-radio-check-bg: #E8622C;
  --dxbl-checkbox-radio-checked-border-color: #E8622C;
  --dxbl-checkbox-switch-checked-bg: #E8622C;
  /* hover shades of the checked states (the theme darkens the berry to #4c2b71) */
  --dxbl-checkbox-check-element-checked-hover-bg: #D0551F;
  --dxbl-checkbox-switch-checked-hover-bg: #D0551F;
  --dxbl-checkbox-radio-checked-hover-bg: #D0551F;
  --dxbl-checkbox-radio-checked-hover-border-color: #D0551F;
  --dxbl-checkbox-checked-focus-shadow-color: rgba(232, 98, 44, 0.5);
  --dxbl-checkbox-unchecked-focus-shadow-color: rgba(232, 98, 44, 0.5);
}
.dxbl-tabs {
  --dxbl-tabs-tab-selected-color: #E8622C;
  --dxbl-tabs-tab-focus-outline-color: #E8622C;
}
.dxbl-list-box { --dxbl-list-box-focus-frame-color: #E8622C; }
/* Hard-coded in the theme (no token): the keyboard-focused item in a list box — which is what
   every DxComboBox dropdown renders — gets `outline: .15rem solid #5f368d`. */
.dxbl-list-box-item-focused,
.dxbl-list-box > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content > table > tbody > tr:focus {
  outline-color: var(--accent) !important;
}
/* DxListBox — and therefore every DxComboBox dropdown: the selected item's tint is a hard-coded
   purple ::before overlay (90% opacity, 30% when disabled), the same idiom as the grid row
   overlays above, so it gets the same chrome colour; the theme's opacities stay. */
.dxbl-list-box-render-container > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content > ul > li.dxbl-list-box-item-selected::before,
.dxbl-list-box > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content > ul > li.dxbl-list-box-item-selected::before,
.dxbl-list-box-render-container > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content > table > tbody > tr.dxbl-list-box-item-selected > td::before,
.dxbl-list-box > .dxbl-scroll-viewer > .dxbl-scroll-viewer-content > table > tbody > tr.dxbl-list-box-item-selected > td::before {
  background-color: var(--chrome) !important;
}
/* Centred grid columns — shared with the office (its SDD page uses the same classes as the
   tablet's recording grid; sdd.css keeps its own copies for the tablet-only views).
   Header cells: TextAlignment aligns data cells only, so the grid's CustomizeElement tags the
   header cell with .sdd-th-center; DevExpress wraps the caption in a flex container, hence both
   rules. Combo editors: the input text and the dropdown items (a body-level portal, own class). */
.sdd-th-center { text-align: center; }
.sdd-th-center div { justify-content: center; }
.sdd-edit-center input { text-align: center; }
.sdd-drop-center .dxbl-listbox-item,
.sdd-drop-center li { justify-content: center; text-align: center; }
.dxbl-menu, .dxbl-context-menu {
  --dxbl-menu-item-focus-outline-color: #E8622C;
  --dxbl-context-menu-item-focus-outline-color: #E8622C;
}

/* The berry theme also HARDCODES #5f368d (no token behind it) on a few painted pseudo-
   elements, which the token overrides above cannot reach. Their selectors are 7+ classes
   deep, so `!important` on a plain selector is the pragmatic override (same pattern the
   Snemanje grid used before this became app-wide).                                   */
/* DxTabs: the 3px indicator under the active tab is a ::after fill. */
.dxbl-tabs .dxbl-tabs-item.dxbl-active::after { background-color: var(--accent) !important; }
/* DxGrid: every grid gets the Snemanje look — the focused row (plain, selected, hovered)
   and the in-place edit row are td::before overlays; the theme's own opacities stay
   (90% / 100% focused, 8% edit row, 3% read-only editors in it). */
.dxbl-grid .dxbl-grid-focused-row > td::before,
.dxbl-grid tr.dxbl-grid-edit-row > td::before,
.dxbl-grid tr.dxbl-grid-edit-row > td > .dxbl-text-edit.dxbl-readonly::before,
.dxbl-grid tr.dxbl-grid-edit-row > td > .dxbl-text-edit.dxbl-disabled::before,
.dxbl-grid tr.dxbl-grid-edit-row > td > .dxbl-text-edit:disabled::before {
  background-color: var(--chrome) !important;
}
/* DxGrid column drag affordances + loading text */
.dxbl-grid .dxbl-grid-columns-separator.dxbl-active { background-color: var(--accent) !important; }
.dxbl-grid .dxbl-grid-drop-target-indicator.dxbl-active {
  box-shadow: inset 2px 2px 0 var(--accent), inset -2px -2px 0 var(--accent) !important;
}
.dxbl-grid .dxbl-grid-empty-data-loading { color: var(--accent) !important; }
.dxbl-btn.dxbl-grid-filter-menu-funnel-btn.dxbl-grid-filter-menu-funnel-btn-filled {
  --dxbl-btn-color: var(--accent);
  --dxbl-btn-hover-color: var(--accent);
}
/* The column chooser is a popup outside .dxbl-grid; the theme re-sets its token there. */
.dxbl-grid-column-chooser-dialog { --dxbl-grid-column-chooser-focus-frame-color: var(--accent); }
/* DxSplitter (Vsi sistemi panes): separator while dragged / focused */
.dxbl-splitter {
  --dxbl-splitter-separator-active-bg: var(--accent);
  --dxbl-splitter-separator-focused-bg: var(--accent);
}

/* Uniform DxGrid data-row height everywhere (the Odseki command buttons make its
   rows taller than plain-text grids). `height` on a <td> acts as a min-height, so
   short rows grow to match while the button rows stay put. The Snemanje REFA form
   is a custom .z2-form table, not a DxGrid, so it is unaffected.
   Edit rows are pinned too (the Snemanje grid rule, now app-wide): the integrated
   cell editors render ~31px tall, so without this a row shrank the moment it was
   focused or edited and the grid shifted under the pointer. !important beats the
   theme's own edit-cell height. */
.dxbl-grid-table > tbody > tr > td { height: 38px !important; }

/* ── Print / Save-as-PDF: the REFA grid (Zeitaufnahmebogen), paginating both ways ──
   A dedicated .z2-print-sheet renders the grid as continuation page-sets (cycle
   columns split across pages) so it never clips; odseks that exceed page height
   flow to more pages (section blocks kept whole, header repeated). Hidden on
   screen; revealed only in print.                                               */
.z2-print-sheet { display: none; }
.z2-print-watermark { display: none; }

@media print {
  /* Demo stamp: position:fixed repeats the overlay on EVERY printed page. */
  .z2-print-watermark { display: flex !important; position: fixed; inset: 0; align-items: center;
                        justify-content: center; z-index: 2147483647; pointer-events: none; }
  .z2-print-watermark span { transform: rotate(-28deg); font-size: 7vw; font-weight: 800;
                             letter-spacing: .06em; white-space: nowrap; color: rgba(232, 98, 44, .18);
                             -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body * { visibility: hidden !important; }
  dx-license { display: none !important; }        /* DevExpress eval watermark lives outside <body> */
  .z2-print-sheet { display: block !important; position: absolute; left: 0; top: 0; width: 100%; }
  .z2-print-sheet, .z2-print-sheet * { visibility: visible !important; }
  /* cycle-column continuation: each page-set on its own page */
  .z2-print-page { padding: 8mm; box-sizing: border-box; page-break-after: always; break-after: page; }
  .z2-print-page:last-child { page-break-after: auto; break-after: auto; }
  /* vertical pagination for many odseks: keep each section's 4 rows together, repeat the header */
  .z2-print-sheet tbody.z2-seg { page-break-inside: avoid; break-inside: avoid; }
  .z2-print-sheet thead { display: table-header-group; }
  /* .z2-form-app draws only right/bottom cell borders (the wrapper supplies the outer
     left/top frame on screen); the print table has no wrapper, so add its left+top edges. */
  .z2-print-sheet table.z2-form-app { border-left: 1px solid var(--line, #e6e6e6); border-top: 1px solid var(--line, #e6e6e6); }
  /* fixed layout can clip; let identity text wrap so nothing is lost */
  .z2-print-sheet td.z2-fz-name, .z2-print-sheet th.z2-fz-name { white-space: normal; word-break: break-word; }
}

/* Top-level @page (print-only by nature): margin:0 removes the browser's auto header/
   footer (date, page title, URL); the real page margin is the .z2-print-page padding.
   NB: some browsers only honor this when the print dialog's Margins = "Default"; the
   "Headers and footers" dialog checkbox can still force them on — CSS can't override that. */
@page { size: A4 landscape; margin: 0; }

/* ── Language selector (AppNav + login) ─────────────────────────────────── */
.app-lang-select {
  background: rgba(255, 255, 255, 0.08); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 6px;
  padding: 3px 6px; font-size: 0.85rem; cursor: pointer;
}
.app-lang-select option { color: #111; background: #fff; }
.auth-card .app-lang-select { background: transparent; color: inherit; border-color: var(--line, #ccc); margin-left: auto; }

/* ── User menu (top-right): language / categories / sync / logout in a DxDropDown ── */
.app-user-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.08); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px;
  padding: 3px 10px 3px 4px; font-size: .82rem; cursor: pointer;
}
.app-user-btn:hover { background: rgba(255, 255, 255, 0.16); }
.app-user-avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent, #e8622c); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
}
.app-user-caret { font-size: .65rem; opacity: .75; }
.app-user-menu-body { display: flex; flex-direction: column; padding: 6px; min-width: 250px; font-size: .9rem; }
.app-user-menu-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none;
  background: none; border: none; font: inherit; text-align: left; cursor: pointer;
}
.app-user-menu-link:hover, .app-user-menu-logout:hover { background: rgba(0, 0, 0, 0.06); }
.app-user-menu-logout { color: #b71c1c; font-weight: 600; }
/* the shared selector is styled for the dark bar — restyle for the light popup */
.app-user-menu .app-lang-select { background: #fff; color: #111; border-color: var(--line, #ccc); }
/* SyncButton ships as a card — flatten it inside the menu */
.app-user-menu-sync .mma-card { margin: 0 !important; padding: 4px 10px; border: none; box-shadow: none; background: transparent; }

/* ── Responsive nav: shed the widest non-essential items as the viewport narrows,
      so MMA/SDD/Z2, user/logout, Kategorije, language and sync always stay reachable. ── */
@media (max-width: 1100px) {
  .app-nav-clock { display: none; }
}
@media (max-width: 820px) {
  .app-nav-tag { display: none; }        /* REFA chip */
  .app-user-name { display: none; }      /* keep the logout button */
}
@media (max-width: 640px) {
  .app-nav-product { display: none; }    /* brand text; the glyph stays */
  .app-nav { gap: var(--sp-2); padding: 0 var(--sp-2); }
  .app-nav-actions { gap: var(--sp-2); }
  .app-nav-seg { padding: 0 10px; }
  .app-lang-select { width: 64px; }      /* truncated in the box; the dropdown shows full names */
}
@media (max-width: 480px) {
  /* Small phones: two rows (brand + methods / actions) instead of clipping or scrolling. */
  .app-nav { flex-wrap: wrap; height: auto; min-height: var(--nav-h); padding: 4px var(--sp-2); row-gap: 2px; }
  .app-nav-actions { margin-left: auto; }
}

/* ── Wait indicators ──────────────────────────────────────────────
   One canonical in-app indicator: while the BusyService is active,
   the nav "N" glyph is wrapped in a DxWaitIndicator (Flip animation,
   custom Template). NormarWait (inline flipping N) is only for
   screens without the nav bar (login).                             */
.app-nav-glyph-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: none;
}
.app-nav-glyph-slot .app-nav-glyph { display: block; }
.app-nav-glyph-wait { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.normar-wait { display: inline-flex; vertical-align: -0.15em; margin-right: 0.45em; }
.normar-wait-glyph { width: 1.05em; height: 1.05em; }

/* Row checkbox for multi-select in the analysis/bin lists.
   NOTE: named .mma-check — .mma-select is taken by the <select> styling in mma.css. */
.mma-check { width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--clr-primary, #1f6feb); }

/* Demo ribbon in the nav bar: same chip as the REFA tag, accent colour, links to normar.si. */
.app-nav-demo { background: #16c2e6; color: #06121f; text-decoration: none; margin-left: 6px; }
.app-nav-demo:hover { background: #0e9fc0; color: #06121f; }

/* Unified back button (tablet + demo + office): compact left-arrow chip. */
.nv-back { min-width: 2.2rem; padding: 2px 10px; font-size: 1rem; line-height: 1.5;
           border: 1px solid var(--line); border-radius: var(--radius-sm);
           background: var(--card); color: var(--ink); cursor: pointer; flex: none; }
.nv-back:hover:not(:disabled) { background: var(--surface); }
.nv-back:disabled { opacity: .5; cursor: default; }

/* Product logo (BrandWordmark): the SVG wordmark rendered inline — frame+words follow
   currentColor, the 4 stays accent orange. Height sets the size; width follows. */
.nv-wordmark { height: 2.6em; width: auto; display: inline-block; vertical-align: middle; }

/* Outline / text primary buttons and tag boxes: the theme's berry shades for their focus and
   disabled states. Not used by the apps today; covered so a future use comes up in the accent. */
.dxbl-btn-standalone.dxbl-btn-outline-primary, .dxbl-btn-standalone.dxbl-btn-text-primary,
.dxbl-btn-outline-primary, .dxbl-btn-text-primary {
  --dxbl-btn-color: #E8622C;
  --dxbl-btn-hover-color: #D0551F;
  --dxbl-btn-focus-color: #D0551F;
  --dxbl-btn-disabled-color: #F3B095;
  --dxbl-btn-disabled-border-color: #F3B095;
}
.dxbl-tag-box { --dxbl-tag-box-tag-outline-focus-color: #E8622C; }

/* Soft M/V methodology validation (shared by the office grids and the tablet): the conflicting
   code stays editable; an orange exclamation mark follows it (no frame) and the tooltip on the code
   and the mark explains why. .sdd-mv-warn-ico is the same mark as an element of its own (pickers). */
.sdd-mv-warn { cursor: help; }
.sdd-mv-warn::after { content: "!"; color: var(--warn); font-weight: 700; margin-left: 4px; }
.sdd-mv-warn-ico { color: var(--warn); font-weight: 700; margin-left: 4px; cursor: help; }
.sdd-mv-warn-text { color: var(--warn); font-weight: 600; }
/* Codes that came from an accepted AI suggestion (SddActivity.AiTags): a dotted primary underline
   in the grids and a small star next to the activity picker, so hand-picked and AI-proposed
   classifications can be told apart at a glance. */
.sdd-ai-set { border-bottom: 2px dotted var(--primary); }
.sdd-ai-ico { color: var(--primary); margin-left: 3px; cursor: help; font-size: .85em; vertical-align: super; line-height: 0; }
/* the analyst's one-line note on an activity (SddActivity.Description) under its name in the Dogodki list */
.sdd-act-note { display: block; color: var(--ink-mut, #6b7280); font-size: .8em; line-height: 1.2; }
/* the AI classifier's open question on a still-empty code (office and tablet share the class) */
.sdd-ai-ask { display: inline-block; min-width: 1.35em; padding: 0 .3em; border: 1px solid var(--primary); border-radius: .7em; color: var(--primary); background: transparent; font: inherit; font-size: .8em; line-height: 1.4; cursor: pointer; }
.sdd-ai-ask:hover { background: var(--primary); color: #fff; }

/* SDD result charts (shared by the tablet's Rezultati tab and the office's SDD page): the chart card
   header (eyebrow + metric / type chips + copy button) and the copy button's placement. */
.sdd-rez-chart { margin-top: 1.25rem; }
.sdd-rez-chart-head { display: flex; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.sdd-rez-chart-head > .mma-chip-row, .sdd-rez-chart-head > .bo-chip-row { margin-bottom: 0; }
.sdd-rez-chart-head > .mma-eyebrow, .sdd-rez-chart-head > h3 { margin: 0; }
.sdd-copy-btn { margin-left: auto; }
.sdd-copy-note { font-size: .82rem; color: var(--ink-mut); }

/* Build stamp in the nav bar (upper right, left of the user button): small and quiet. */
.app-nav-version {
    display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
    font-size: 0.58rem; line-height: 1.15; opacity: 0.4; letter-spacing: 0.02em; white-space: nowrap;
    align-self: center; margin-right: var(--sp-2);
}
.app-nav-version-row { display: block; }
@media (max-width: 900px) { .app-nav-version { display: none; } }

/* The one toast (ToastHost, both apps): bottom-centre, slides in, fades out during its last 220 ms. */
.app-toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.92); color: #fff;
  padding: 0.55rem 1.1rem; border-radius: 8px; font-size: 0.9rem;
  z-index: 2000; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  animation: app-toast-in 0.18s ease-out;
}
.app-toast-out { animation: app-toast-out 0.22s ease-in forwards; }
@keyframes app-toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes app-toast-out { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, 8px); } }
