/* GZS.Senzorika design tokens — single source of truth.
   Loaded after the Telerik theme; :root overrides win the cascade. */
:root {
  /* Brand — teal (primary) */
  --brand-50:  #EAF3F5;
  --brand-100: #CFE4E8;
  --brand-500: #328C9F;
  --brand-600: #2B7A8B;
  --brand-700: #245F6C;
  --on-brand:  #FFFFFF;

  /* Action — lime green (confirm/submit) */
  --action-50:   #F1F7E7;
  --action-500:  #80C342;
  --action-600:  #6DA834;
  --action-text: #2E5010;

  /* Chrome — slate (header/drawer) */
  --chrome-600: #586F7E;
  --chrome-700: #445565;
  --chrome-800: #3C4A56;
  --on-chrome:  #FFFFFF;

  /* Danger */
  --danger-50:  #FEECEC;
  --danger-500: #DC2626;
  --danger-600: #B91C1C;
  --danger-700: #991B1B;
  --on-danger:  #FFFFFF;

  /* Warning */
  --warn-50:  #FFF6E5;
  --warn-700: #7A4B00;

  /* Neutrals */
  --surface:       #FFFFFF;
  --surface-alt:   #FAFBFC;
  --page:          #F4F6F7;
  --border:        #E4E7EA;
  --border-strong: #C9D0D5;
  --text:          #243137;
  --text-muted:    #667079;
  --text-faint:    #9AA3A9;

  /* Elevation & shape */
  --shadow-card: 0 1px 2px rgba(16,24,40,.06), 0 2px 8px rgba(16,24,40,.08);
  --radius:      8px;
  --radius-card: 12px;

  /* Typography */
  --font-sans:  'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-caption: 12px;
  --fs-body:    14px;
  --fs-subtitle:16px;
  --fs-title:   18px;
  --fs-display: 28px;

  /* Spacing */
  --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
}

/* Telerik (kendo-theme-bootstrap) — map primary role to brand teal.
   Component rules read var(--kendo-color-primary, <fallback>); overriding
   here recolors buttons, grid selection, pager, checkbox, switch natively. */
:root {
  --kendo-color-primary:           var(--brand-500);
  --kendo-color-primary-hover:     var(--brand-600);
  --kendo-color-primary-active:    var(--brand-700);
  --kendo-color-primary-subtle:    var(--brand-50);
  --kendo-color-primary-emphasis:  rgba(50,140,159,.4);
  --kendo-color-on-primary:        var(--on-brand);
  --kendo-color-primary-on-subtle: #1C4A54;
}

/* ===== Base ===== */
html, body { font-family: var(--font-sans); font-weight: 400; }
body { background: var(--page); color: var(--text); }

/* ===== Buttons ===== */
.btn-action, .btn-primary-brand, .btn-secondary, .btn-danger, .btn-danger-solid,
.gumb {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border: 1px solid transparent;
  border-radius: var(--radius); font-family: var(--font-sans);
  font-size: var(--fs-body); font-weight: 600; line-height: 1;
  white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-action, .gumb { background: var(--action-500); color: var(--action-text); }
.btn-action:hover, .gumb:hover { background: var(--action-600); }
.btn-primary-brand { background: var(--brand-500); color: var(--on-brand); }
.btn-primary-brand:hover { background: var(--brand-600); }
/* Bootstrap 4 ships its own .btn-secondary/.btn-danger whose :hover sets color:#fff.
   That beats our rest-state colour (specificity 0,2,0 vs 0,1,0), so the label turned
   white on our light hover background and vanished. Restate the colour on :hover. */
.btn-secondary { background: var(--surface); color: var(--chrome-800); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--page); color: var(--chrome-800); border-color: var(--chrome-600); }
.btn-danger { background: var(--surface); color: var(--danger-600); border-color: var(--danger-500); }
.btn-danger:hover { background: var(--danger-50); color: var(--danger-600); }
.btn-danger-solid, .finishButton {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border: none; border-radius: var(--radius);
  font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 600;
  cursor: pointer; background: var(--danger-500); color: var(--on-danger);
  transition: background-color .15s ease;
}
.btn-danger-solid:hover, .finishButton:hover { background: var(--danger-600); }
.btn-action:focus-visible, .btn-primary-brand:focus-visible, .btn-secondary:focus-visible,
.btn-danger:focus-visible, .btn-danger-solid:focus-visible, .gumb:focus-visible,
.finishButton:focus-visible {
  outline: none; box-shadow: 0 0 0 3px rgba(50,140,159,.35);
}
/* Bootstrap 4's reboot ships `button:focus { outline: -webkit-focus-ring-color auto 5px }`,
   which fires on plain :focus — i.e. on every MOUSE click — and paints a gold ring over our
   buttons. Kill it for design-system buttons; the brand ring above stays on :focus-visible,
   so keyboard focus is still clearly indicated. */
.btn-action:focus, .btn-primary-brand:focus, .btn-secondary:focus, .btn-danger:focus,
.btn-danger-solid:focus, .gumb:focus, .finishButton:focus,
.btn-iaction:focus, .btn-isecondary:focus, .btn-idanger:focus,
.utilityIconButtonGrey:focus, .btn-icon:focus, .leave-session-btn:focus,
.panel-card-head:focus, .filter-card-head:focus {
  outline: none;
}

/* Disabled state — lets a toolbar action stay in place (greyed) instead of
   popping in and out of the layout when its precondition isn't met yet. */
.btn-action:disabled, .btn-primary-brand:disabled, .btn-secondary:disabled,
.btn-danger:disabled, .btn-danger-solid:disabled, .gumb:disabled,
.finishButton:disabled,
.btn-iaction:disabled, .btn-isecondary:disabled, .btn-idanger:disabled {
  opacity: .45; cursor: not-allowed;
}

/* Grey icon button — re-point existing class + new alias */
.utilityIconButtonGrey, .btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: var(--radius);
  background: var(--page); color: var(--text-muted);
  border: 1px solid var(--border); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.utilityIconButtonGrey:hover, .btn-icon:hover {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}

/* Compact icon action buttons (grid row actions) */
.btn-iaction, .btn-isecondary, .btn-idanger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; font-size: 14px; flex: 0 0 auto;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-iaction { background: var(--action-500); color: var(--action-text); }
.btn-iaction:hover { background: var(--action-600); }
.btn-isecondary { background: var(--surface); color: var(--chrome-800); border: 1px solid var(--border-strong); }
.btn-isecondary:hover { background: var(--page); }
.btn-idanger { background: var(--surface); color: var(--danger-600); border: 1px solid var(--danger-500); }
.btn-idanger:hover { background: var(--danger-50); }

/* Leave-session pill (grey → red hover) — global, dedupes 2 scoped copies */
.leave-session-wrapper { display: flex; justify-content: center; margin-top: 24px; }
.leave-session-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  background: var(--page); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.leave-session-btn:hover { background: var(--danger-50); color: var(--danger-700); border-color: var(--danger-500); }

/* Text helper — re-point */
.buttonText {
  font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 400;
  color: var(--text); display: inline-flex; align-items: center;
}

/* ===== Surfaces ===== */
.card { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.section-title { font-family: var(--font-sans); font-size: var(--fs-subtitle); font-weight: 600; color: var(--brand-500); }

/* Clamp long text in grid cells to 2 lines (use with title="" for full text) */
.grid-clamp { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }

/* Collapsible section card — the shared shape FilterComponent's .filter-card established.
   Use for any "header + toggle + body" block so sections on one page match (a TelerikPanelBar
   with a single item is the thing this replaces). */
.panel-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden;
}
.panel-card-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; background: transparent; border: none;
  cursor: pointer; font-family: var(--font-sans);
}
.panel-card-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; color: var(--brand-600);
}
.panel-card-title i { color: var(--brand-500); }
.panel-card-chevron { color: var(--text-muted); font-size: 13px; }
.panel-card-body { padding: 4px 18px 18px; border-top: 1px solid var(--border); }
.panel-card-head:hover, .filter-card-head:hover { background: var(--surface-alt); }
.panel-card-head:focus-visible, .filter-card-head:focus-visible {
  outline: none; box-shadow: inset 0 0 0 2px rgba(50,140,159,.35);
}

/* ===== Sponsor logo bar (shared MainLayout/LoginLayout footer) ===== */
.sponsor-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2.5rem; padding: 1rem 0; }
.sponsor-bar img { height: 60px; width: auto; }

/* ============================================================
   MODERNIZATION LAYER — visible refresh of Telerik surfaces.
   Restyles shared component classes so every page modernizes
   at once. Keeps brand teal/green/slate; adds air, soft
   elevation, rounded corners, hover/focus language.
   ============================================================ */

/* ---- Data grid: the app's hero surface ---- */
.k-grid {
    border: none;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    background: var(--surface);
    font-family: var(--font-sans);
    overflow: hidden;
}
.k-grid .k-grid-header,
.k-grid .k-grid-header-wrap,
.k-grid .k-grid-footer {
    border-color: var(--border);
    background: var(--surface-alt);
}
.k-grid th.k-header,
.k-grid .k-header {
    background: var(--surface-alt);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 12px 16px;
    border-color: var(--border);
}
.k-grid td,
.k-grid .k-table-td {
    padding: 11px 16px;
    border-color: var(--border);
    color: var(--text);
    font-size: var(--fs-body);
    vertical-align: middle;
}
.k-grid .k-table-row:hover td,
.k-grid .k-master-row:hover td,
.k-grid tr:hover > td {
    background: var(--brand-50);
}
.k-grid .k-alt,
.k-grid .k-table-alt-row {
    background: var(--surface-alt);
}
.k-grid .k-grid-pager,
.k-pager {
    border: none;
    background: var(--surface);
    color: var(--text-muted);
    padding: 8px 12px;
}

/* ---- Windows / dialogs ---- */
.k-window {
    border: none;
    border-radius: var(--radius-card);
    box-shadow: 0 12px 44px rgba(16, 24, 40, .20), 0 2px 8px rgba(16, 24, 40, .10);
    overflow: hidden;
}
.k-window-titlebar,
.k-window-title {
    font-family: var(--font-sans);
}
.k-window-titlebar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    padding: 14px 20px;
}
.k-window-title { font-weight: 600; font-size: var(--fs-title); }
.k-window-content { padding: 20px; color: var(--text); }

/* Responsive modals: on phones, fit the viewport and scroll the body instead of overflowing */
@media (max-width: 768px) {
    .k-window,
    .k-window.k-centered {
        width: 94vw !important;
        max-width: 94vw !important;
        height: auto !important;
        max-height: 92vh !important;
        left: 3vw !important;
        top: 4vh !important;
        /* k-centered positions via translate(-50%,-50%); cancel it since we set explicit left/top */
        transform: none !important;
    }
    .k-window-content {
        padding: 16px;
        max-height: calc(92vh - 58px);
        overflow-y: auto;
    }
    /* Neutralise Bootstrap row gutters that push modal forms past the edge */
    .k-window-content .row { margin-left: 0; margin-right: 0; }
    .k-window-content .row > [class^="col"],
    .k-window-content .row > [class*=" col"] { padding-left: 0; padding-right: 0; }
}

/* ---- Inputs, pickers, dropdowns ---- */
.k-input, .k-picker, .k-textbox, .k-dropdownlist, .k-combobox, .k-datepicker, .k-textarea {
    border-radius: var(--radius);
    border-color: var(--border-strong);
    font-family: var(--font-sans);
}
.k-input:hover, .k-picker:hover { border-color: var(--chrome-600); }
.k-input.k-focus, .k-picker.k-focus, .k-input:focus-within, .k-picker:focus-within {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(50, 140, 159, .18);
}

/* ---- Telerik buttons: rounded, tokenized ---- */
.k-button {
    border-radius: var(--radius);
    font-family: var(--font-sans);
}
.k-button-solid-primary {
    border-color: var(--brand-500);
    background: var(--brand-500);
}
.k-button-solid-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }

/* ---- Tabs ---- */
/* Telerik 12 renders <li class="k-tabstrip-item"><span class="k-link">. The old ".k-item" selector no
   longer matches anything, so tab theming was silently dead and tabs fell back to the default link
   blue. Target the v12 classes: muted = inactive, brand teal = hover/active. */
.k-tabstrip-items .k-tabstrip-item .k-link { color: var(--text-muted); font-weight: 500; }
.k-tabstrip-items .k-tabstrip-item:hover .k-link { color: var(--brand-500); }
.k-tabstrip-items .k-tabstrip-item.k-active .k-link { color: var(--brand-500); font-weight: 600; }
.k-tabstrip-items .k-tabstrip-item.k-active::after { border-color: var(--brand-500); }

/* ---- Status pills (opt-in, used by the sweep) ---- */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600;
    padding: 2px 10px; border-radius: 999px; line-height: 1.6; }
.pill-done   { background: var(--action-50); color: var(--action-text); }
.pill-active { background: var(--brand-50);  color: #1C4A54; }
.pill-danger { background: var(--danger-50); color: var(--danger-700); }
.pill-muted  { background: var(--surface-alt); color: var(--text-muted); }

/* ---- Page scaffolding helpers (opt-in) ---- */
.page-title { font-family: var(--font-sans); font-size: 22px; font-weight: 600; color: var(--text);
    margin: 0 0 1.25rem; letter-spacing: -.01em; }
.page-subtitle { color: var(--text-muted); font-size: var(--fs-body); margin: -0.75rem 0 1.25rem; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 1rem; }

/* ---- Stat cards (dashboards) ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { display: flex; align-items: center; gap: 14px; background: var(--surface);
    border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 16px 18px; }
.stat-card-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
    background: var(--brand-50); color: var(--brand-600); }
.stat-card-icon.is-green { background: var(--action-50); color: var(--action-text); }
.stat-card-icon.is-slate { background: #EDF1F3; color: var(--chrome-700); }
.stat-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; }
.stat-value { font-size: 26px; font-weight: 600; color: var(--text); line-height: 1.15; }

/* ===== Dashboard ===== */
.stat-card-icon.is-gold { background: #FBF3DC; color: #8A6100; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
/* The tile is an <a> when it navigates — kill the link underline/colour, keep the card look. */
.stat-card-link { cursor: pointer; text-decoration: none; color: inherit;
  transition: box-shadow .15s ease, border-color .15s ease; }
.stat-card-link:hover { text-decoration: none; color: inherit;
  box-shadow: 0 2px 4px rgba(16,24,40,.08), 0 6px 16px rgba(16,24,40,.12); }
.stat-card-link:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(50,140,159,.35); }

.dash-worklist { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px; margin-bottom: 22px; }
.dash-work-card { background: var(--surface); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.dash-work-head { display: flex; align-items: center; gap: 8px; font-weight: 600;
  font-size: 14px; color: var(--text); }
.dash-work-head i { color: var(--brand-500); }
.dash-work-count { font-size: 24px; font-weight: 600; color: var(--text); line-height: 1.15; }
.dash-work-empty { font-size: 13px; color: var(--text-muted); }
.dash-work-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.dash-work-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  width: 100%; text-align: left; font-size: 13px; font-family: var(--font-sans);
  padding: 7px 0; border: none; border-top: 1px solid var(--border);
  background: none; color: var(--text); cursor: pointer; }
.dash-work-item:hover { color: var(--brand-600); }
.dash-work-item .meta { color: var(--text-muted); white-space: nowrap; }

.dash-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; background: var(--brand-50); border: 1px solid var(--brand-100);
  border-left: 4px solid var(--brand-500); border-radius: var(--radius-card);
  padding: 16px 18px; margin-bottom: 22px; }
.dash-banner-text { display: flex; flex-direction: column; gap: 2px; }
.dash-banner-title { font-weight: 600; font-size: 15px; color: var(--brand-700); }
.dash-banner-sub { font-size: 13px; color: var(--text-muted); }

.dash-chart { padding: 18px 20px; margin-bottom: 22px; }
.dash-chart-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.dash-chart-title { font-weight: 600; font-size: 15px; color: var(--text); }
.dash-chart-scope { font-size: 12.5px; color: var(--text-muted); }
.dash-chart-link { font-size: 13px; font-weight: 600; color: var(--brand-600); text-decoration: none; }
.dash-chart-link:hover { text-decoration: underline; }

.dash-snapshot { padding: 16px 18px; margin-bottom: 22px; }
.dash-snapshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.dash-snapshot-k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); font-weight: 600; }
.dash-snapshot-v { font-size: 20px; font-weight: 600; color: var(--text); }

/* ---- Responsive switch: grid on desktop, cards on mobile ---- */
.show-mobile { display: none; }
@media (max-width: 1024px) {
    .show-desktop { display: none !important; }
    .show-mobile { display: block; }
    .data-cards { display: flex; }
}

/* ---- Mobile data cards (replace wide grids on phones) ---- */
.data-cards { flex-direction: column; gap: 10px; }
.data-card { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
    padding: 14px 16px; text-align: left; width: 100%; border: none; cursor: pointer; }
/* brand-500 matches the manufacturer pages, which five pages used to force with an inline
   `style="color: var(--brand-500)"` override. Set it once here so every card title agrees. */
.data-card-title { font-weight: 600; font-size: 15px; color: var(--brand-500); margin-bottom: 8px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* Two icon buttons in a card title (edit + delete) need to stay side by side. */
.data-card-title-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.data-card-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0;
    font-size: 13px; border-top: 1px solid var(--border); }
.data-card-row:first-of-type { border-top: none; }
.data-card-row > .k { color: var(--text-muted); white-space: nowrap; }
.data-card-row > .v { color: var(--text); text-align: right; }
.data-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.data-card-actions > * { flex: 1; justify-content: center; }
/* "Prikaži več (N)" under a paginated card list. Was duplicated in three page-scoped
   blocks with drifting margins; single definition so every list looks the same. */
.show-more-btn { width: 100%; justify-content: center; margin-top: 2px; }
/* Shared empty state for a card list (pages used to hand-roll a card, a bare <p>, or nothing). */
.data-card-empty { background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
    padding: 22px 16px; text-align: center; color: var(--text-muted); font-size: var(--fs-body); }

/* ---- Selectable card grid (entity pickers: subevents, etc.) ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.select-card { display: flex; flex-direction: column; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-card);
    box-shadow: var(--shadow-card); padding: 18px 18px 16px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.select-card:hover { transform: translateY(-2px); border-color: var(--brand-100);
    box-shadow: 0 6px 18px rgba(16,24,40,.10), 0 2px 6px rgba(16,24,40,.08); }
.select-card-title { font-size: var(--fs-subtitle); font-weight: 600; color: var(--brand-600);
    line-height: 1.3; margin-bottom: 12px; }
.select-card-meta { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.select-card-meta > div { display: flex; align-items: center; gap: 9px;
    font-size: var(--fs-body); color: var(--text-muted); }
.select-card-meta i { width: 16px; flex: 0 0 16px; text-align: center; color: var(--text-faint); }
.select-card-action { margin-top: auto; }
.select-card-action > * { width: 100%; }

/* Empty state for card grids / lists */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state i { font-size: 34px; color: var(--text-faint); margin-bottom: 14px; }
.empty-state p { margin: 0; font-size: var(--fs-subtitle); }

/* ---- Bootstrap .form-control inputs modernized (app-wide) ---- */
.form-control {
    border-radius: var(--radius); border: 1px solid var(--border-strong);
    font-family: var(--font-sans); font-size: var(--fs-body);
    height: 40px; padding: 8px 12px; color: var(--text); background: var(--surface);
}
.form-control:focus {
    border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(50, 140, 159, .18); outline: none;
}
textarea.form-control { height: auto; min-height: 84px; }
.labelFont { font-family: var(--font-sans); font-size: var(--fs-body); color: var(--text); }

/* ---- Login / auth pages ---- */
.login-shell { min-height: 100vh; display: flex; flex-direction: column;
    background: linear-gradient(160deg, var(--chrome-600), var(--chrome-800)); }
.login-topbar { padding: 18px 26px; color: #fff; font-size: 20px; font-weight: 500; }
.login-main { flex: 1; display: flex; align-items: safe center; justify-content: center; padding: 24px; }
.register-wrap { width: 100%; max-width: 780px; }
.login-footer { background: rgba(255, 255, 255, .96); }
.login-footer .sponsor-bar { gap: 2rem; padding: 12px 0; }
.login-footer .sponsor-bar img { height: 44px; }
.login-card { background: var(--surface); border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28); padding: 36px 40px; width: 100%; max-width: 430px; }
.login-logo { display: block; max-width: 230px; height: auto; margin: 0 auto 24px;
    background: #26333D; border-radius: 12px; padding: 16px 20px; }
.login-title { font-size: 22px; font-weight: 600; color: var(--text); text-align: center;
    margin: 0 0 24px; letter-spacing: -.01em; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.login-submit { width: 100%; height: 44px; margin-top: 8px; font-size: 15px; }
.login-links { display: flex; align-items: center; justify-content: space-between;
    margin-top: 20px; font-size: 14px; flex-wrap: wrap; gap: 8px; }
.login-link { color: var(--brand-600); background: none; border: none; padding: 0;
    cursor: pointer; font-size: 14px; text-decoration: none; }
.login-link:hover { text-decoration: underline; }

/* Company registration (/register): the login card, wider, with the dialog kit's sections and fields inside. */
.login-card.register-card { max-width: 780px; margin: 0 auto; }
.login-card.register-narrow { max-width: 480px; }
.register-back { display: inline-block; margin-bottom: 12px; }
.register-intro { margin: -12px 0 20px; font-size: 14px; color: var(--text-muted); text-align: center; }
.register-card .dlg-section { padding: 16px 0 2px; }
.register-card .validation-message { margin-top: 4px; font-size: 12px; color: var(--danger-700); }
.register-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--text);
    cursor: pointer; }
.register-check input { width: 16px; height: 16px; accent-color: var(--brand-500); }
.register-foot { padding-top: 12px; border-top: 1px solid var(--border); }
.register-links { justify-content: center; gap: 6px; color: var(--text-muted); }
.register-done { text-align: center; }
.register-done .register-intro { margin-top: 0; }
.register-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.register-button:hover { text-decoration: none; }
@media (max-width: 520px) {
    .login-card { padding: 28px 22px; border-radius: 14px; }
}

/* ============================================================
   APP SHELL — modern sidebar rail + slim topbar (MainLayout).
   Responsive: full rail -> icon rail (<=1180) -> slide-over (<=768).
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; background: var(--page); }

/* Sidebar */
.app-sidebar {
    width: 232px; flex: 0 0 232px;
    background: #26333D; color: #A9BAC5;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; z-index: 40;
}
.app-brand {
    display: flex; align-items: center; justify-content: center;
    padding: 14px 14px 12px; white-space: nowrap;
}
.app-brand-logo {
    width: 100%; height: auto; display: block;
    background-color: transparent;
}
.app-brand-mark {
    display: none;
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
    background: var(--action-500); color: #26333D;
    align-items: center; justify-content: center;
    font-weight: 700; font-size: 17px;
}
.app-nav { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.app-nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 11px; border-radius: 8px;
    color: #A9BAC5; font-size: 14px; text-decoration: none;
    white-space: nowrap; position: relative; cursor: pointer;
    transition: background .12s ease, color .12s ease;
}
.app-nav-icon { width: 18px; flex: 0 0 18px; text-align: center; font-size: 15px; }
.app-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.app-nav-item.active { background: rgba(50,140,159,.18); color: #fff; font-weight: 500; }
.app-nav-item.active::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; border-radius: 2px; background: #3FB0C6;
}
.app-sidebar-footer {
    padding: 12px 18px; color: #6E8290; font-size: 12px;
    border-top: 1px solid rgba(255,255,255,.07); white-space: nowrap;
}

/* Main column */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
    height: 56px; flex: 0 0 56px;
    background: var(--surface); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px; padding: 0 20px;
    position: sticky; top: 0; z-index: 30;
}
/* Event pages put the event name in the title (100+ characters). Two lines with an ellipsis
   fit the 56px bar; unclamped, a phone wrapped it to five lines spilling out of the bar. */
.app-topbar-title { font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.25; min-width: 0;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-topbar-right { margin-left: auto; display: flex; align-items: center; position: relative; }
.app-hamburger {
    display: none; background: transparent; border: none;
    color: var(--text-muted); font-size: 18px; cursor: pointer;
    width: 38px; height: 38px; border-radius: 8px;
}
.app-hamburger:hover { background: var(--page); color: var(--text); }

.app-user { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 5px 6px; border-radius: 8px; }
.app-user:hover { background: var(--page); }
.app-user-avatar {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
    background: var(--brand-500); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
}
.app-user-name { font-size: 14px; color: var(--text); font-weight: 500; }
.app-user-caret { font-size: 11px; color: var(--text-muted); }
.app-user-menu {
    position: absolute; top: calc(100% + 6px); right: 0; min-width: 170px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.12);
    padding: 6px; z-index: 50;
}
/* Velja za <a> in <button> - meni ima oboje, zato tu resetiramo gumb. */
.app-user-menu-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    color: var(--text); text-decoration: none; font-size: 14px; border-radius: 7px;
    width: 100%; background: none; border: none; cursor: pointer;
    font-family: inherit; text-align: left; white-space: nowrap;
}
.app-user-menu-item:hover { background: var(--page); color: var(--brand-600); }

/* SuperAdmin: vstop v podjetje */
.impersonation-panel { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 4px 2px; }
.impersonation-state { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 16px; }
.impersonation-state i { color: var(--brand-500); }
.impersonation-hint { margin: 0; color: var(--text-muted); max-width: 640px; }
/* Izbirnik in gumb v isti vrstici; align-items: flex-end poravna gumb z vnosnim poljem (label je nad njim). */
.impersonation-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.impersonation-field { margin: 0; }

.app-content { flex: 1; padding: 24px; min-width: 0; }
.app-footer { border-top: 1px solid var(--border); background: var(--surface); }
.app-footer .sponsor-bar { gap: 2rem; padding: 14px 0; }
.app-footer .sponsor-bar img { height: 46px; }

.app-scrim { display: none; }

/* Judge kiosk (Ocenjevalec on iPad): strip the nav drawer and every affordance
   that would open it, so the live scoring screen can't be navigated away from. */
.app-shell.judge-kiosk .app-sidebar,
.app-shell.judge-kiosk .app-scrim,
.app-shell.judge-kiosk .app-hamburger,
.app-shell.judge-kiosk .app-collapse-toggle { display: none !important; }

/* Desktop collapse toggle + collapsed icon rail */
.app-collapse-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: none; color: var(--text-muted);
    font-size: 18px; cursor: pointer; width: 38px; height: 38px; border-radius: 8px;
}
.app-collapse-toggle:hover { background: var(--page); color: var(--text); }
.app-shell.sidebar-collapsed .app-sidebar { width: 68px; flex-basis: 68px; }
.app-shell.sidebar-collapsed .app-brand { justify-content: center; padding: 14px 0; }
.app-shell.sidebar-collapsed .app-brand-logo { display: none; }
.app-shell.sidebar-collapsed .app-brand-mark { display: inline-flex; }
.app-shell.sidebar-collapsed .app-nav-text,
.app-shell.sidebar-collapsed .app-sidebar-footer { display: none; }
.app-shell.sidebar-collapsed .app-nav { align-items: center; }
.app-shell.sidebar-collapsed .app-nav-item { justify-content: center; padding: 11px; gap: 0; }
.app-shell.sidebar-collapsed .app-nav-item.active::before { display: none; }

@media (max-width: 1180px) {
    .app-sidebar { width: 68px; flex-basis: 68px; }
    .app-brand { justify-content: center; padding: 14px 0; }
    .app-brand-logo { display: none; }
    .app-brand-mark { display: inline-flex; }
    .app-nav-text, .app-sidebar-footer { display: none; }
    .app-nav { align-items: center; }
    .app-nav-item { justify-content: center; padding: 11px; gap: 0; }
    .app-nav-item.active::before { display: none; }
}
@media (max-width: 768px) {
    .app-sidebar {
        position: fixed; left: 0; top: 0; bottom: 0; height: 100%;
        width: 240px; flex-basis: 240px;
        transform: translateX(-100%); transition: transform .22s ease;
        box-shadow: 0 0 40px rgba(0,0,0,.3);
    }
    .app-brand { justify-content: center; padding: 16px; }
    .app-brand-logo { display: block; }
    .app-brand-mark { display: none; }
    .app-nav-text { display: inline; }
    .app-sidebar-footer { display: block; }
    .app-nav { align-items: stretch; }
    .app-nav-item { justify-content: flex-start; padding: 9px 11px; gap: 12px; }
    .app-nav-item.active::before { display: block; }
    .app-shell.sidebar-open .app-sidebar { transform: translateX(0); }
    .app-shell.sidebar-open .app-scrim {
        display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35;
    }
    .app-hamburger { display: inline-flex; align-items: center; justify-content: center; }
    .app-collapse-toggle { display: none; }
    .app-user-name, .app-user-caret { display: none; }
    .app-content { padding: 16px; }
    .app-footer .sponsor-bar img { height: 38px; }
}

/* Narrow screens: let wide data grids scroll instead of squishing cells
   (grids show between 1025-1180px; below 1024 they become cards) */
@media (max-width: 1180px) {
    .k-grid { overflow-x: auto; }
    .k-grid td, .k-grid .k-table-td,
    .k-grid th.k-header, .k-grid .k-header { white-space: nowrap; }
}

/* ============================================================
   LIVE ASSESSMENT
   Admin console: OcenjevanjePage + LiveAssessment (desktop/laptop).
   Judge scoring sheets: Live[Complex|Simple]AssessmentSheet (iPad 9,
   tablet-first, touch targets ~40px). Shared classes live here so the
   two admin twins and the two sheets stay visually identical.
   ============================================================ */

/* ---- Admin console ---- */
.live-admin-card { max-width: 1200px; margin: 0 auto; }
.live-admin-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }

.live-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.live-toolbar-end { margin-left: auto; }

.live-panels { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: flex-start; justify-content: space-between; }
.live-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.live-start-btn { min-width: 180px; }

.live-previous { flex: 0 1 340px; background: var(--surface-alt); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 14px; }
.live-previous-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); margin-bottom: 8px; }
.live-previous-list { list-style: none; margin: 0 0 10px; padding: 0; max-height: 200px; overflow-y: auto;
    display: flex; flex-direction: column; }
.live-previous-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 6px 0; font-size: 14px; border-top: 1px solid var(--border); }
.live-previous-list li:first-child { border-top: none; }
.live-previous-code { font-weight: 600; color: var(--text); }
.live-previous-grade { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted);
    font-variant-numeric: tabular-nums; }

.live-divider { height: 1px; background: var(--border); margin: 2px 0; }

/* Judge image approvals */
.live-images { display: flex; flex-wrap: wrap; gap: 16px; }
.live-image-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius-card);
    overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); max-width: 360px; }
.live-image { display: block; width: 100%; height: auto; }
.live-image-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }

/* Product switch tabs (judge grading >1 product at once) */
.score-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 16px; }
.score-tab { height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
.score-tab:hover { border-color: var(--brand-500); }
.score-tab.is-active { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }

/* ---- Judge scoring sheet (shared by Complex + Simple) ---- */
.score-sheet { max-width: 1200px; margin: 0 auto; overflow: hidden; }
.score-header { display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
    padding: 16px 22px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.score-header-block { display: flex; flex-direction: column; gap: 2px; }
.score-caption { font-size: 12px; color: var(--text-muted); font-weight: 500; letter-spacing: .02em; }
.score-code { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.1; }
.score-header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.score-body { padding: 18px 22px; }
.score-footer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px;
    padding: 16px 22px; border-top: 1px solid var(--border); background: var(--surface-alt); }
.score-footer-note { flex: 1 1 320px; }
.score-footer-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.score-final { display: flex; align-items: baseline; gap: 8px; }
.score-final-label { font-size: 14px; color: var(--text-muted); font-weight: 500; }
.score-final-value { font-size: 30px; font-weight: 700; color: var(--brand-600); font-variant-numeric: tabular-nums; }
.score-save-btn { min-width: 150px; height: 46px; font-size: 15px; }

/* File/camera input styled as a neutral pill */
.score-file input[type=file], .score-file.k-upload { max-width: 260px; }

/* Category property list — responsive multi-column that never crams the
   grade buttons (keeps the "whole sheet at a glance" feel of the paper form) */
.score-props { list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 26px; }
.score-prop { display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 6px 2px; border-bottom: 1px solid var(--border); break-inside: avoid; }
.score-prop-name { font-size: 13.5px; color: var(--text); flex: 1 1 auto; min-width: 0; }
.score-grades { display: inline-flex; gap: 4px; flex: 0 0 auto; }

/* Grade-deduction buttons — sized for iPad touch without dominating the row */
.grade-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border-strong);
    background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
    user-select: none; -webkit-tap-highlight-color: transparent;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease; margin: 0; }
.grade-btn:hover { border-color: var(--brand-500); }
.grade-btn.is-selected { background: var(--action-500); border-color: var(--action-600); color: var(--action-text); }
.grade-btn.is-disabled { background: var(--surface-alt); color: var(--text-faint);
    border-color: var(--border); cursor: not-allowed; }
.grade-btn.is-disabled:hover { border-color: var(--border); }

/* Padding inside each category card (content below the teal header band) */
.score-cat-body { padding: 12px 16px 14px; }

/* Category confirm row */
.score-cat-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.score-cat-foot .k-textarea, .score-cat-foot .k-input { max-width: 360px; }
.score-cat-confirm { margin-left: auto; }

/* ---- Category cards inside the live complex sheet's panelbar ----
   Scoped under .score-sheet (already present in the rendered markup) so the
   teal header band and its white text always load together from this file;
   other panelbars stay untouched. The assessment-sheet editors have no PanelBar:
   they draw the same band with .sheet-cat-band (Sheet editor block, end of file). */
.score-sheet .k-panelbar { border-color: transparent; background: transparent; }
.score-sheet .k-panelbar > .k-item,
.score-sheet .k-panelbar > .k-panelbar-header {
    margin-bottom: 16px; border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; box-shadow: var(--shadow-card); background: var(--surface); }
.score-sheet .k-panelbar > .k-item > .k-link,
.score-sheet .k-panelbar > .k-panelbar-header > .k-link {
    color: #fff; background-color: var(--brand-500); border-radius: 0; padding: 11px 16px; }
.score-sheet .k-panelbar > .k-item > .k-link:hover,
.score-sheet .k-panelbar > .k-panelbar-header > .k-link:hover,
.score-sheet .k-panelbar > .k-item > .k-link.k-selected,
.score-sheet .k-panelbar > .k-item > .k-link.k-state-selected,
.score-sheet .k-panelbar > .k-panelbar-header > .k-link.k-selected,
.score-sheet .k-panelbar > .k-panelbar-header > .k-link.k-state-selected {
    color: #fff; background-color: var(--brand-600); }
.score-sheet .k-panelbar .k-link .k-icon,
.score-sheet .k-panelbar .k-link .k-panelbar-toggle,
.score-sheet .k-panelbar .k-link .k-svg-icon { color: #fff; fill: #fff; }

/* Category header row — sits on the teal band, so every piece of text is white */
.score-cat-head { display: flex; align-items: center; gap: 10px; width: 100%; }
.score-sheet .score-cat-title { font-size: 15px; font-weight: 700; letter-spacing: .02em; color: #fff; text-transform: uppercase; }
.score-sheet .score-cat-ponder { font-size: 12.5px; font-weight: 400; color: rgba(255,255,255,.82); }
.score-cat-flag { display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%; font-size: 11px; background: rgba(255,255,255,.9); }
.score-cat-flag.is-ok { color: var(--action-600); }
.score-cat-flag.is-todo { color: var(--danger-600); }
.score-sheet .score-cat-grade { margin-left: auto; font-size: 13px; color: rgba(255,255,255,.9);
    font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-sheet .score-cat-grade b { color: #fff; font-size: 15px; margin-left: 2px; }

/* Simple sheet: horizontal grade table */
.score-table-wrap { overflow-x: auto; }
.score-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.score-table th, .score-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: center; }
.score-table thead .score-table-cat { background: var(--brand-50); color: var(--brand-700);
    font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 13px; }
.score-table thead .score-table-prop { background: var(--surface-alt); color: var(--text-muted);
    font-weight: 600; font-size: 13px; }
.score-table tbody td { background: var(--surface); }
.score-table .k-input, .score-table .k-numerictextbox { width: 90px; }

/* Read-only variants of the sheet (UserReport -> Complex/SimpleListReport). The grade is
   plain text instead of a numeric box, so it carries the emphasis the input used to. */
.score-table-value { font-size: 17px; font-weight: 700; color: var(--brand-600);
    font-variant-numeric: tabular-nums; }
.score-judge { font-size: 15px; font-weight: 600; color: var(--text); }
/* Scoped, not on .pill globally: only this footer is narrow enough to break the label. */
.score-final .pill { white-space: nowrap; }

/* ---- Vrni list ocenjevalcu (return dialog) ---- */
.return-grader-list { display: flex; flex-direction: column; gap: 8px;
  max-height: 320px; overflow-y: auto; }

/* A row is a <button>, so Space presses it without scrolling the page: font and colour are inherited back
   from the page, as the browser's own button styling would otherwise replace them. */
.return-grader { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); cursor: pointer; font: inherit; color: var(--text); }
.return-grader:hover:not(.is-disabled) { background: var(--surface-alt); }
.return-grader.is-selected { border-color: var(--brand-500); box-shadow: 0 0 0 1px var(--brand-500) inset; }
.return-grader.is-disabled { opacity: .45; cursor: not-allowed; }
/* Bootstrap's `button:focus` ring painted on every click of a row; the keyboard ring is the .sheet-* buttons' one
   (and keeps the selected row's inset border). */
.return-grader:focus { outline: none; }
.return-grader:focus-visible { box-shadow: 0 0 0 3px rgba(50,140,159,.35); }
.return-grader.is-selected:focus-visible { box-shadow: 0 0 0 1px var(--brand-500) inset, 0 0 0 3px rgba(50,140,159,.35); }

.return-grader-text, .return-grader-name, .return-grader-reason { display: block; }
.return-grader-name { font-weight: 600; color: var(--text); }
.return-grader-meta { display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
  color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.return-grader-reason { font-size: 12px; color: var(--text-muted); }

/* ---- Returned-sheet banner on the judge's scoring screen ---- */
.score-returned { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 12px 16px; margin-bottom: 14px; border-radius: var(--radius-card);
  background: var(--brand-50); border: 1px solid var(--brand-500); }
.score-returned i { color: var(--brand-500); }
.score-returned-title { font-weight: 600; color: #1C4A54; }
.score-returned-meta { display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
  color: var(--text-muted); font-size: 13px; }

/* ---- Award templates (Priznanja → Predloge) ---- */
/* The toolbar is a Bootstrap .card, which is a flex COLUMN: say row explicitly or the buttons stack. */
.award-toolbar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 16px; }
.award-toolbar label { margin: 0; }
/* <a class="btn-secondary|btn-isecondary"> link buttons: Bootstrap's a:hover must not underline them or recolour the icon. */
.award-toolbar a, .award-row-actions a { text-decoration: none; }
.award-toolbar a:hover, .award-row-actions a:hover { color: var(--chrome-800); }
.award-spacer { flex: 1; }
.award-muted { color: var(--text-muted); font-size: 13px; margin: 0; }
.award-form { display: flex; flex-direction: column; gap: 6px; }
.award-form label { font-weight: 600; font-size: 13px; margin: 8px 0 0; color: var(--text); }
.award-error { color: var(--danger-600); font-size: 13px; margin: 8px 0 0; }
.award-warning { color: #7a4d00; background: #fff4dc; border-radius: 6px; padding: 6px 10px; font-size: 13px; margin: 8px 0 0; }
.award-fonts { padding: 16px 18px; margin-top: 18px; }
.award-fonts-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.award-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.award-table th, .award-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.award-table th { color: var(--text-muted); font-weight: 600; }

/* The toolbar's search box: the magnifier sits inside the field, so the text starts after it. */
.award-search { position: relative; flex: 0 1 320px; min-width: 200px; }
.award-search > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-faint); pointer-events: none; }
.award-search .form-control { height: 36px; padding: 0 12px 0 34px; }

/* The templates list: ONE card, the templates grouped by year, a row each. The card is a Bootstrap .card, a flex COLUMN, which
   is what is wanted here (the groups stack); overflow clips the hover backgrounds to its rounded corners. */
.award-list { overflow: hidden; }
.award-group + .award-group { border-top: 1px solid var(--border); }
/* The year header is a <button> across the whole width, so all of it toggles. Bootstrap's button:focus ring paints on every mouse
   click: only the keyboard ring (:focus-visible) stays, as on .panel-card-head. */
.award-year-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 18px; border: 0; background: var(--surface-alt); font-family: var(--font-sans); text-align: left; cursor: pointer; }
.award-year-head:hover:not(:disabled) { background: var(--brand-50); }
.award-year-head:focus { outline: none; }
.award-year-head:focus-visible { box-shadow: inset 0 0 0 2px rgba(50, 140, 159, .35); }
/* While a search is shown every group is open and its header only labels it: no pointer, and the chevron fades. */
.award-year-head:disabled { cursor: default; }
.award-year-head:disabled > i { opacity: .35; }
.award-year { font-size: 15px; font-weight: 600; color: var(--brand-600); }
.award-year-count { margin-left: auto; font-size: 13px; color: var(--text-muted); }
.award-year-head > i { width: 12px; font-size: 12px; text-align: center; color: var(--text-muted); }

.award-rows { list-style: none; margin: 0; padding: 0; }
.award-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 18px; border-top: 1px solid var(--border); cursor: pointer; }
.award-row:hover { background: var(--brand-50); }
.award-row-tile { flex: 0 0 36px; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 16px; background: var(--brand-50); color: var(--brand-600); }
/* The tile is brand-50, like the hovered row: darken it then, or it disappears. */
.award-row:hover .award-row-tile { background: var(--brand-100); }
.award-row-main { flex: 1 1 0; min-width: 0; }
.award-row-line1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.award-row-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; line-height: 20px; color: var(--brand-600); text-decoration: none; }
.award-row-name:hover { color: var(--brand-700); text-decoration: underline; }
.award-row-line1 .pill { flex: 0 0 auto; padding: 0 9px; line-height: 20px; white-space: nowrap; }
/* The one pill whose text can be long (the event's name) may shrink; the text is cut with an ellipsis. */
.award-row-line1 .award-chip { flex: 0 1 auto; min-width: 0; max-width: 260px; }
.award-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* .pill-muted is the alt surface, nearly white on a white row: an edge keeps it reading as a pill. */
.award-row-line1 .pill-muted { border: 1px solid var(--border); line-height: 18px; }
/* .pill-active is brand-50, like the hovered row: darken it then, or the pill disappears. */
.award-row:hover .pill-active { background: var(--brand-100); }
.award-row-line2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; line-height: 18px; color: var(--text-muted); }
/* Room for four icon buttons (4 x 34 px + 3 x 6 px), the first at the left: Uredi, Podvoji and Arhiviraj sit in the same place
   in every row, whether or not the row also has Izbriši (only a template no event uses has it). */
.award-row-actions { display: flex; flex: 0 0 154px; gap: 6px; }
/* The icon buttons lose the browser's focus outline (the .btn-i*:focus rule in the button block at the top): without a ring a keyboard
   user could not see which one is focused. */
.award-row-actions .btn-isecondary:focus-visible, .award-row-actions .btn-idanger:focus-visible { box-shadow: 0 0 0 3px rgba(50, 140, 159, .35); }
/* An archived template: a muted row (the Arhivirana pill says why). */
.award-row.is-archived .award-row-tile { background: var(--page); color: var(--text-faint); }
.award-row.is-archived:hover .award-row-tile { background: var(--border); }
.award-row.is-archived .award-row-name { color: var(--text-muted); }
.award-list-empty { margin: 0; padding: 22px 16px; text-align: center; font-size: var(--fs-body); color: var(--text-muted); }
@media (max-width: 1024px) {
    .award-search { flex: 1 1 100%; }
    /* The buttons wrap under the text, in line with it (the tile's 36 px and the 12 px gap); the chips wrap under the name too. */
    .award-row { flex-wrap: wrap; row-gap: 6px; }
    .award-row-line1 { flex-wrap: wrap; row-gap: 4px; }
    .award-row-actions { flex: 0 0 100%; padding-left: 48px; }
    /* A touch screen has no tooltip, so the details line wraps instead of being cut: the date and the user tell similar templates apart. */
    .award-row-line2 { white-space: normal; }
}

/* ---- Award template editor ---- */
.ae-topbar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 12px; }
.ae-topbar label { margin: 0; }
.ae-name { max-width: 420px; font-weight: 600; }
.ae-size { color: var(--text-muted); font-size: 13px; }
.ae-testbar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: 12px; }
.ae-testbar label { font-size: 12px; color: var(--text-muted); margin: 0; }
.ae-testbar .ae-event { max-width: 320px; }
.ae-testbar .ae-product { width: 380px; }
.ae-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.ae-canvas-col { min-width: 0; }
.ae-hint { color: var(--text-muted); font-size: 12px; margin-top: 8px; }
.ae-panel-col { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
.ae-host { width: 100%; }
/* The zoom buttons, and the frame the page scrolls in when it is larger than the frame. */
.ae-zoom { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ae-zoom-btn { min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface);
    color: var(--text); font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; }
.ae-zoom-btn:hover { background: var(--brand-50); border-color: var(--brand-500); }
.ae-zoom-btn:focus { outline: none; }
.ae-zoom-btn:focus-visible { box-shadow: 0 0 0 3px rgba(50,140,159,.35); }
.ae-zoom-level { min-width: 52px; font-size: 13px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.ae-view { display: flex; height: calc(100vh - 350px); min-height: 380px; padding: 22px 12px 12px; overflow: auto;
    border: 1px solid var(--border); border-radius: 8px; background: var(--surface-alt); }
.ae-page { position: relative; flex: none; margin: auto; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.ae-canvas { position: absolute; left: 0; top: 0; }
.ae-layer { position: absolute; inset: 0; cursor: crosshair; outline: none; }
.ae-field { position: absolute; border: 1px dashed rgba(50, 140, 159, .9); cursor: move; }
.ae-field.is-selected { border: 2px solid var(--brand-500); }
.ae-field.is-overflow { border-color: var(--danger-600); background: rgba(217, 45, 32, .07); }
.ae-chip { position: absolute; top: -18px; left: -1px; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 3px; background: var(--brand-500); color: #fff; white-space: nowrap; pointer-events: none; }
.ae-field.is-overflow .ae-chip { background: var(--danger-600); }
.ae-handle { position: absolute; width: 9px; height: 9px; background: var(--brand-500); border: 1px solid #fff; }
.ae-nw { left: -5px; top: -5px; cursor: nwse-resize; }
.ae-ne { right: -5px; top: -5px; cursor: nesw-resize; }
.ae-sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.ae-se { right: -5px; bottom: -5px; cursor: nwse-resize; }
.ae-ghost { position: absolute; border: 1px dashed var(--brand-500); background: rgba(50, 140, 159, .08); pointer-events: none; }
.ae-panel { padding: 14px 16px; }
.ae-panel-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ae-l { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 10px 0 4px; }
.ae-row { display: flex; gap: 6px; align-items: center; }
.ae-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.ae-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ae-grid4 span { font-size: 11px; color: var(--text-muted); text-align: center; }
.ae-seg { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.ae-seg button { flex: 1; border: 0; background: #fff; padding: 5px 0; font-size: 12px; color: var(--text); }
.ae-seg button.is-on { background: var(--brand-500); color: #fff; }
.ae-checks { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 13px; }
.ae-resolved { font-size: 12px; color: var(--text-muted); margin-top: 4px; white-space: pre-line; }
.ae-warnings { padding: 12px 16px; font-size: 13px; }
.ae-warnings ul { margin: 6px 0 0; padding-left: 18px; color: #7a4d00; }
.ae-panel-empty { padding: 16px; color: var(--text-muted); font-size: 13px; }
.ae-mobile-note { padding: 16px; }

/* ---- Award panel on EventReport ---- */
.award-panel { padding: 14px 18px; margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.award-panel-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.award-panel-row select { max-width: 360px; }
/* The "Uredi predlogo" link is a .btn-secondary: Bootstrap's a:hover must not underline it (same fix as .award-toolbar a). */
.award-panel-row a { text-decoration: none; }
/* The inline "could not be loaded" message sits in the row next to its retry button: no .award-error top margin. */
.award-panel-row .award-error { margin: 0; }
.award-panel-title { font-weight: 600; display: inline-flex; gap: 8px; align-items: center; margin-right: 8px; }
.award-panel-title i { color: var(--brand-500); }
.award-panel-scope { font-size: 13px; color: var(--text-muted); }
/* The label sits over the bar and the track. The fill is brand-500 lightened (70% + white) so the dark label has
   5.45:1 against it (it had 3.73:1 on brand-500) and 11.79:1 against the track. */
.award-progress { position: relative; height: 22px; border-radius: 11px; background: #eef1f3; overflow: hidden; }
.award-progress-bar { position: absolute; left: 0; top: 0; bottom: 0; background: #70afbc; transition: width .2s; }
.award-progress span { position: relative; display: block; text-align: center; font-size: 12px; font-weight: 600; line-height: 22px; color: var(--text); }
.award-summary { font-size: 13px; }
.award-summary ul { margin: 6px 0 0; padding-left: 18px; max-height: 220px; overflow-y: auto; }
.award-summary .is-error { color: var(--danger-600); }
.award-summary .is-warning { color: #7a4d00; }
/* ---- Invite mail editor (Components/Email/MailEditor.razor) ---- */
.mail-editor .k-editor { border-color: var(--border); border-radius: var(--radius); box-shadow: none; }
.mail-editor .k-editor-toolbar { background: var(--surface-alt); border-bottom: 1px solid var(--border); padding: 6px 8px; gap: 4px; flex-wrap: wrap; }
.mail-editor .k-editor-content .ProseMirror { font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); padding: 16px 20px; min-height: 100%; }
.mail-editor .ProseMirror img { max-width: 100%; height: auto; }
.mail-editor-tool { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: var(--fs-body); cursor: pointer; }
.mail-editor-tool:hover:not(:disabled) { border-color: var(--border-strong); }
.mail-editor-tool:disabled { opacity: .5; cursor: default; }
/* ---- Manufacturer invite dialog (Components/Email/ManufacturerInviteDialog.razor) ---- */
.invite-test-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 8px 12px; border-radius: var(--radius); background: #FFF8E1; color: #7A5B00; font-size: 13px; }
.invite-test-banner code { color: inherit; }
/* Real sending refused (the app is on the dev database). */
.invite-test-banner.is-blocked { background: var(--danger-50); color: var(--danger-700); }
/* minmax(0, 1fr) and min-width: 0 keep a wide pasted table from widening the compose column: it scrolls inside the editor (.ProseMirror is overflow: auto). */
.invite-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.invite-compose { min-width: 0; }
.invite-recipient-list { list-style: none; margin: 0; padding: 0; max-height: 62vh; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.invite-recipient { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.invite-recipient:last-child { border-bottom: none; }
.invite-recipient-icon { width: 18px; text-align: center; color: var(--text-faint); }
.invite-recipient-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.invite-recipient-name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-recipient-email, .invite-recipient-status { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite-recipient.is-sent .invite-recipient-icon, .invite-recipient.is-sent .invite-recipient-status { color: var(--action-text); }
.invite-recipient.is-failed .invite-recipient-icon, .invite-recipient.is-failed .invite-recipient-status { color: var(--danger-700); }
/* No warning token exists in the design system; amber matches the test banner. */
.invite-recipient.is-warning .invite-recipient-icon, .invite-recipient.is-warning .invite-recipient-status { color: #B26A00; }
.invite-recipient.is-sending .invite-recipient-icon { color: var(--brand-500); }
.invite-recipient.is-muted { opacity: .6; }
.invite-compose .form-control { margin-bottom: 14px; }
.invite-editor-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.invite-progress { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-alt); }
.invite-progress-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: var(--fs-body); color: var(--text); }
.invite-progress-track { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.invite-progress-bar { height: 100%; background: var(--brand-500); transition: width .3s ease; }
.invite-summary { margin: 10px 0 0; font-size: var(--fs-body); color: var(--text); }
.invite-preview { width: 100%; height: 65vh; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
/* The window is 1180px wide; .k-window clips its overflow, so on 769-1200px viewports never let it outgrow the screen (max-width beats the inline width).
   Nor the screen's height: .k-window-content (overflow: auto) scrolls instead. At <=768px the global modal rule's !important 94vw/92vh take over. */
.invite-window.k-window { max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
@media (max-width: 900px) {
    .invite-layout { grid-template-columns: minmax(0, 1fr); }
    .invite-recipient-list { max-height: 30vh; }
}
/* ---- Dialogs (Components/Dialogs: AppDialog and its kit; every dialog renders through it) ---- */
/* Never wider or taller than the screen: the content scrolls and the footer stays in view. The sections carry
   their own padding so the sticky footer spans the whole window. */
.app-dialog.k-window { max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
.app-dialog .k-window-content { padding: 0; }
.dlg-title { display: inline-flex; align-items: center; gap: 10px; }
.dlg-section { padding: 18px 20px 4px; }
.dlg-section + .dlg-section { border-top: 1px solid var(--border); }
.dlg-section-title { margin: 0 0 12px; font-size: var(--fs-caption); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-600); }
.dlg-section > .dlg-hint { margin: -4px 0 12px; }
.dlg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.dlg-span-2 { grid-column: 1 / -1; }
.dlg-field { min-width: 0; margin-bottom: 14px; }
.dlg-label { display: block; margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--text); }
.dlg-req { margin-left: 2px; font-weight: 700; color: var(--danger-600); }
.dlg-opt { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--text-faint); }
.dlg-hint { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); }
.dlg-input-unit { display: flex; align-items: center; gap: 8px; }
.dlg-unit { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.app-dialog .dlg-number { max-width: 140px; text-align: right; font-variant-numeric: tabular-nums; }
/* Sits on the net weight box's line. */
.dlg-check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
.dlg-check label { margin: 0; font-size: 14px; color: var(--text); }
.dlg-dropdown { width: 100%; }
.app-dialog textarea.form-control { min-height: 72px; resize: vertical; }
/* The Blazor template's green/red outlines (site.css) clash with the tokenized boxes: a red border instead. */
.app-dialog .valid.modified:not([type=checkbox]) { outline: none; }
.app-dialog .invalid { outline: none; border-color: var(--danger-500); }
.app-dialog .validation-message { margin-top: 4px; font-size: 12px; color: var(--danger-700); }
/* The nutrition table reads like the one on a label: one row per value, "od tega" rows indented. */
.dlg-table { margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dlg-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.dlg-row:last-child { border-bottom: none; }
.dlg-row:nth-child(even) { background: var(--surface-alt); }
.dlg-row-label { margin: 0; font-size: 14px; color: var(--text); }
.dlg-row.is-sub .dlg-row-label { padding-left: 18px; color: var(--text-muted); }
.dlg-row-input { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.app-dialog .dlg-row-input .dlg-number { width: 110px; }
.dlg-row-input .dlg-unit { min-width: 30px; }
.app-dialog .dlg-row-input input:not(.dlg-number) { width: 240px; }
.dlg-row .validation-message { grid-column: 1 / -1; text-align: right; }
.dlg-footer { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--border); }
.dlg-error { margin: 0; font-size: 13px; color: var(--danger-700); }
.dlg-actions { display: flex; gap: 10px; margin-left: auto; }
/* Extra footer buttons, on the left (DialogFooter's ChildContent). */
.dlg-footer-start { display: flex; gap: 10px; }
/* A confirm's message (ConfirmDialog). */
.dlg-lead { margin: 0 0 14px; font-size: 15px; color: var(--text); }
/* A boxed remark under a message: brand by default, .is-danger and .is-warn for what the user must not miss. */
.dlg-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--brand-50); color: #1C4A54; }
.dlg-note.is-danger { background: var(--danger-50); color: var(--danger-700); }
.dlg-note.is-warn { background: var(--warn-50); color: var(--warn-700); }
/* A read-only list (DialogFacts): the label left, the value right; one column on a phone. */
.dlg-facts { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 6px 16px; margin: 0 0 14px; }
.dlg-facts dt { font-size: 13px; font-weight: 600; }
.dlg-facts dd { margin: 0; white-space: pre-line; }
/* An empty state: no rows, nothing to pick. */
.dlg-empty { padding: 16px; text-align: center; color: var(--text-muted); }
/* A scrollable checklist for pickers. */
.dlg-list { max-height: 40vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
@media (max-width: 640px) {
    .dlg-section { padding: 14px 14px 2px; }
    .dlg-grid { grid-template-columns: minmax(0, 1fr); }
    /* Label above the boxes: the energy row's two boxes do not fit beside it. */
    .dlg-row { grid-template-columns: minmax(0, 1fr); padding: 8px 10px; }
    .dlg-row-input { justify-content: flex-start; }
    .dlg-row .validation-message { text-align: left; }
    .app-dialog .dlg-row-input input:not(.dlg-number) { width: 100%; }
    .dlg-footer { padding: 10px 14px; }
    .dlg-actions { width: 100%; }
    .dlg-actions button { flex: 1; }
    .dlg-facts { grid-template-columns: minmax(0, 1fr); }
}

/* Sheet editor (complex + simple) */
/* The assessment-sheet editors (Components/AssessmentSheet/ComplexAssessmentSheet, SimpleAssessmentSheet) draw the
   judge's own sheet (.score-sheet, .score-header, .score-cat-head, .score-prop, .grade-btn above) and add only what
   editing needs. Everything here sits under .sheet-editor or uses a .sheet-* class, so the judge's sheet is untouched.
   Shared by both editors: .sheet-edit-banner, .sheet-save-status, .sheet-cat, .sheet-cat-band, .sheet-cat-edit,
   .sheet-cat-empty, .sheet-add-row, .sheet-add-btn, .sheet-placeholder, .sheet-name. Desktop only. */
/* 1400px instead of the judge's 1200px: still the judge's 3 columns, but each editor row also carries the grades the
   judge doesn't see and "Izbriši", so the names need the extra width to stay on one line. */
.sheet-editor { max-width: 1400px; margin: 0 auto; }
.sheet-editor .score-sheet { max-width: none; }

/* The thin banner on top, with the autosave status at its right. It stays in view under the top bar. */
.sheet-edit-banner { position: sticky; top: 56px; z-index: 20; display: flex; align-items: center; gap: 12px;
    margin-bottom: 8px; padding: 8px 14px; border: 1px solid #F3E2B0; border-radius: var(--radius);
    background: var(--warn-50); color: var(--warn-700); font-size: 13.5px; line-height: 1.35; }
.sheet-edit-banner-text { flex: 1 1 auto; min-width: 0; }
.sheet-save-status { flex: 0 0 auto; margin-left: auto; padding: 2px 10px; border-radius: 999px;
    font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--surface); }
.sheet-save-status:empty { display: none; }
/* Saving, or a click that came while a save was running (ignored, not queued): neutral, never red. */
.sheet-save-status.is-saving, .sheet-save-status.is-waiting { color: var(--text-muted); }
.sheet-save-status.is-saved { color: var(--action-text); background: var(--action-50); }
.sheet-save-status.is-failed { color: var(--danger-700); background: var(--danger-50); white-space: normal; }
.sheet-editor-help { margin: 0 0 12px; padding: 0 2px; font-size: 13px; color: var(--text-muted); }

/* Header: greyed sample values where the judge sees real ones, and the sheet's name with "✎ Preimenuj". */
.sheet-placeholder { color: var(--text-faint); }
.sheet-editor .score-code.is-date { font-size: 20px; font-weight: 400; }
.sheet-editor .score-header-actions { gap: 14px; }
.sheet-name { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.2; }

/* A category: the judge's card with its teal band, always open (no PanelBar in the editor). */
.sheet-cat { margin-bottom: 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
    box-shadow: var(--shadow-card); background: var(--surface); }
.sheet-cat-band { padding: 11px 16px; background: var(--brand-500); color: #fff; }
.sheet-cat-edit { margin-left: auto; flex: 0 0 auto; padding: 4px 10px; border: none; border-radius: 6px;
    background: #fff; color: #1C4A54; font-family: var(--font-sans); font-size: 13px; font-weight: 600;
    line-height: 1.3; cursor: pointer; }
.sheet-cat-edit:hover { background: var(--brand-50); }
.sheet-cat-edit:focus { outline: none; }
.sheet-cat-edit:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.6); }
/* A category without properties: the judge could not grade it. */
.sheet-cat-empty { margin: 0; padding: 10px 16px; background: var(--danger-50); color: var(--danger-700);
    font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--border); }
/* A sheet without categories: the same red line, on its own - the judge could not use the sheet at all. */
.sheet-empty-state { margin: 0 0 16px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--danger-50); color: var(--danger-700); font-size: 13.5px; font-weight: 600; }

/* "+ Dodaj lastnost" under each category, "+ Dodaj kategorijo" under the last one. */
.sheet-add-row { padding: 10px 16px; border-top: 1px dashed var(--border-strong); }
.sheet-add-row.is-sheet { border: 1px dashed var(--border-strong); border-radius: 10px; background: var(--surface-alt); }
.sheet-add-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
    border: 1px solid var(--brand-100); border-radius: var(--radius); background: var(--surface);
    color: var(--brand-600); font-family: var(--font-sans); font-size: var(--fs-body); font-weight: 600;
    white-space: nowrap; cursor: pointer; }
.sheet-add-btn:hover { background: var(--brand-50); border-color: var(--brand-500); }
.sheet-add-btn:focus { outline: none; }
.sheet-add-btn:focus-visible { box-shadow: 0 0 0 3px rgba(50,140,159,.35); }

/* Rows use the judge's own grid (3 columns on a full-width sheet), so the editor has the judge's layout. "Izbriši"
   sits next to the name and wraps under it when the column is narrow, so the name keeps the judge's width. */
.sheet-editor .sheet-prop { gap: 8px; }
.sheet-prop .score-prop-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
/* The name looks like a small field with a pencil, so it is plain that it can be clicked and changed. */
.sheet-prop-name-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 6px;
    border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text);
    font: inherit; text-align: left; cursor: pointer; overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0,0,0,.04); }
.sheet-prop-name-pencil { flex: 0 0 auto; color: var(--brand-600); font-size: 13px; }
.sheet-prop-name-btn:hover { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.sheet-prop-name-btn:focus { outline: none; }
.sheet-prop-name-btn:focus-visible { box-shadow: 0 0 0 3px rgba(50,140,159,.35); border-radius: 4px; }
.sheet-rename { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.sheet-editor .sheet-rename-input { height: 30px; padding: 2px 8px; font-size: 13.5px; }
.sheet-rename-problem { font-size: 12.5px; font-weight: 600; color: var(--danger-700); }
.sheet-rename-hint { font-size: 12px; color: var(--text-muted); }
.sheet-prop-delete { flex: 0 0 auto; padding: 3px 5px; border: 1px solid transparent; border-radius: 6px;
    background: none; color: var(--danger-600); font-family: var(--font-sans); font-size: 13px; font-weight: 600;
    cursor: pointer; }
.sheet-prop-delete:hover { background: var(--danger-50); border-color: var(--danger-500); }
.sheet-prop-delete:focus { outline: none; }
.sheet-prop-delete:focus-visible { box-shadow: 0 0 0 3px rgba(220,38,38,.25); }

/* Grade buttons (SheetGradeToggles, in the editor's rows and in the property dialog): the judge's look, but every one
   from 4 to 0 is a button that allows or blocks its grade. */
.sheet-grade-toggles button.grade-btn { padding: 0; font-family: var(--font-sans); line-height: 1; }
.sheet-grade-toggles .grade-btn.is-disabled { cursor: pointer; }
.sheet-grade-toggles .grade-btn.is-disabled:hover { border-color: var(--brand-500); }
.sheet-grade-toggles .grade-btn:focus { outline: none; }
.sheet-grade-toggles .grade-btn:focus-visible { box-shadow: 0 0 0 3px rgba(50,140,159,.35); }
/* The 5 is always allowed and cannot be clicked. */
.sheet-grade-toggles .grade-btn.sheet-grade-fixed { cursor: default; }
.sheet-grade-toggles .grade-btn.sheet-grade-fixed:hover { border-color: var(--border-strong); }
/* Below the judge's range: the judge's sheet does not draw these at all. */
.sheet-grade-toggles .grade-btn.sheet-grade-hidden { background: transparent; border-style: dashed; border-color: var(--border-strong);
    color: var(--text-faint); }
.sheet-grade-toggles .grade-btn.sheet-grade-hidden:hover { border-color: var(--brand-500); color: var(--text-muted); }

.sheet-editor-foot { display: flex; margin-top: 16px; }

/* The property dialog's preview row ("Tako bo vrstica videti na listu"): drawn only. */
.sheet-prop-preview { padding: 2px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.sheet-prop-preview .score-prop { border-bottom: none; }
.sheet-prop-preview .grade-btn,
.sheet-prop-preview .grade-btn:hover { cursor: default; border-color: var(--border-strong); }
.sheet-prop-preview .grade-btn.is-disabled,
.sheet-prop-preview .grade-btn.is-disabled:hover { border-color: var(--border); }

/* The sheet list: "Prazen list" and "Prazna kategorija" next to a sheet's name. */
.sheet-list-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sheet-list-name .grid-clamp { min-width: 0; }
.data-card .sheet-list-name { margin-bottom: 8px; }

/* The simple (testenine) editor: the judge's own table (.score-table above), with the property headers as clickable
   name fields, greyed boxes where the judge types, and two editor-only rows below ("Izbriši", "+ Dodaj lastnost"). */
.sheet-table-cat { display: inline-flex; align-items: center; gap: 10px; }
.sheet-table .score-table-prop .sheet-prop-name-btn { font-weight: 600; color: var(--text); }
.sheet-table .score-table-prop.sheet-table-empty { color: var(--danger-700); background: var(--danger-50);
    white-space: normal; }
.sheet-table-box { display: inline-block; width: 90px; height: 30px; line-height: 28px; border: 1px solid var(--border);
    border-radius: 6px; background: var(--surface-alt); color: var(--text-faint); }
.sheet-table tbody .sheet-table-edit-row td { padding: 6px 8px; background: var(--surface-alt); border-top-style: dashed; }
.sheet-prop-edit { padding: 3px 8px; border: 1px solid var(--brand-100); border-radius: 6px; background: var(--surface);
    color: var(--brand-600); font-family: var(--font-sans); font-size: 13px; font-weight: 600; cursor: pointer; }
.sheet-prop-edit:hover { background: var(--brand-50); border-color: var(--brand-500); }
.sheet-prop-edit:focus { outline: none; }
.sheet-prop-edit:focus-visible { box-shadow: 0 0 0 3px rgba(50,140,159,.35); }
