/* Notive UI foundation v3 "Quiet Instrument". Loaded last by every page.
   Rules here refine shared and legacy styles without changing their cascade:
   selectors start with `html` so they win over equal shared selectors, while
   legacy rules that use IDs or inline styles keep their current behaviour. */

/* ---------- Foundations ---------- */
:root {
  /* Type scale: 11 · 12 · 13 · 14 · 16 · 20 · 28 */
  --ns-text-2xs: 11px; --ns-text-xs: 12px; --ns-text-sm: 13px; --ns-text-md: 14px;
  --ns-text-lg: 16px; --ns-text-xl: 20px; --ns-text-2xl: 28px;
  --ns-leading-tight: 1.25; --ns-leading: 1.5;
  /* Motion: feedback only, never decoration. */
  --ns-ease: cubic-bezier(.2, .7, .2, 1);
  --ns-duration-fast: 120ms; --ns-duration: 160ms; --ns-duration-slow: 220ms;
  /* Surfaces: canvas → panel → floating (glass). */
  --ns-border-strong: #BAC2AE;
  --ns-hover: #EEF1E6;
  --ns-glass-bg: rgba(255, 255, 255, .78);
  --ns-glass-line: rgba(28, 37, 48, .10);
  --ns-glass-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 18px 48px rgba(16, 26, 40, .16), 0 2px 6px rgba(16, 26, 40, .06);
  /* Status: on-air has its own hue; neutral is always grey. */
  --ns-onair: #c42f45; --ns-onair-soft: #fdebee; --ns-neutral: var(--ns-muted);
  --ns-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23616e7c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}
:root[data-theme='dark'] {
  --ns-border-strong: #566044;
  --ns-hover: #272E1F;
  --ns-glass-bg: rgba(27, 35, 41, .74);
  --ns-glass-line: rgba(234, 240, 244, .10);
  --ns-glass-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 22px 56px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .3);
  --ns-onair: #ff8e9f; --ns-onair-soft: #45242b;
  --ns-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239daebc' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
}

/* ---------- Form controls ---------- */
/* One select treatment everywhere; background-color only, so the chevron survives. */
html .ns-workspace select:not([multiple]):not([size]):not([hidden]),
html .login-main select {
  appearance: none; -webkit-appearance: none;
  background-color: var(--ns-surface);
  background-image: var(--ns-chevron);
  background-repeat: no-repeat; background-size: 16px; background-position: right 10px center;
  padding-right: 34px; text-overflow: ellipsis;
}
html .ns-workspace :is(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='hidden']):not([type='file']), select, textarea) {
  border-color: var(--ns-border-strong);
  transition: border-color var(--ns-duration-fast) var(--ns-ease), box-shadow var(--ns-duration-fast) var(--ns-ease);
}
html .ns-workspace :is(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='hidden']):not([type='file']), select, textarea):hover:not(:disabled):not(:focus) {
  border-color: var(--ns-control);
}
html .ns-workspace :is(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='color']):not([type='hidden']):not([type='file']), select, textarea):focus {
  border-color: var(--ns-accent);
  box-shadow: 0 0 0 3px var(--ns-accent-soft);
}
html .ns-workspace :is(input[type='checkbox'], input[type='radio']) { accent-color: var(--ns-accent); }
/* Checkbox labels read left to right on every width. */
html .ns-workspace label.f:has(> input:is([type='checkbox'], [type='radio'])) {
  display: inline-flex; flex-direction: row; align-items: center; flex-wrap: nowrap;
  gap: 10px; min-height: var(--ns-control-height); text-align: left; line-height: 1.5; cursor: pointer;
}
html .ns-workspace label.f > input:is([type='checkbox'], [type='radio']) {
  flex: 0 0 16px; width: 16px; min-width: 16px; max-width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0;
}
html .ns-workspace :is(input, select, textarea):user-invalid { border-color: var(--ns-bad); }

/* ---------- Buttons ---------- */
html .ns-workspace .btn {
  transition: background-color var(--ns-duration-fast) var(--ns-ease), border-color var(--ns-duration-fast) var(--ns-ease),
    color var(--ns-duration-fast) var(--ns-ease), transform var(--ns-duration-fast) var(--ns-ease);
}
html .ns-workspace .btn:not(:disabled):active { transform: translateY(1px); }
html .ns-workspace .btn:not(.pri):not(.live):not(.dgr):not(.bad):not(.danger):not(.ghost) { border-color: var(--ns-border-strong); }
/* Quiet secondary: keeps lime for the one primary action per view. */
html .ns-workspace .btn.ns-btn-secondary {
  background: var(--ns-surface); border-color: var(--ns-border-strong); color: var(--ns-text);
}
html .ns-workspace .btn.ns-btn-secondary:hover { background: var(--ns-hover); }

/* ---------- Typography & numbers ---------- */
html .ns-workspace :is(td, th, .tile .v, .kpi, .num, .tbl-num) { font-variant-numeric: tabular-nums; }
html .ns-workspace th { font-size: var(--ns-text-2xs); font-weight: 600; letter-spacing: .01em; color: var(--ns-secondary); }
html .ns-workspace .badge { font-size: var(--ns-text-2xs); }
html .ns-workspace .tile .k { font-size: var(--ns-text-xs); color: var(--ns-secondary); }
html .ns-workspace .tile .n { font-size: var(--ns-text-2xs); line-height: 1.45; }
html .ns-workspace .tile .v { letter-spacing: -.02em; }

/* ---------- Status ---------- */
/* Live metric: on-air colour only when something is actually on air. */
html .ns-workspace .tile.hot .v { color: var(--ns-onair); }
html .ns-workspace .tile:not(.hot):not(.warn):not(.bad):not(.good) .v { color: var(--ns-text); }

/* ---------- Tables ---------- */
html .ns-workspace tbody tr { transition: background-color var(--ns-duration-fast) var(--ns-ease); }
html .ns-workspace :is(.tw, .tbl-wrap) tbody tr:hover > td { background-color: var(--ns-hover); }
/* Row actions stay visible when a wide table scrolls horizontally (Trends). */
html .ns-trends #tbl.utama td:last-child,
html .ns-trends #tbl.utama th:last-child {
  position: sticky; right: 0; z-index: 1;
  background-color: var(--ns-surface);
  box-shadow: -1px 0 0 var(--ns-border), -10px 0 12px -10px rgba(16, 26, 40, .18);
}
html .ns-trends #tbl.utama th:last-child { background-color: var(--ns-inset); }
html .ns-trends #tbl.utama tbody tr:hover > td:last-child { background-color: var(--ns-hover); }
html .ns-trends #tbl.utama td:last-child { min-width: 96px; }
html .ns-trends #tbl.utama td:last-child .btn { display: flex; width: 100%; white-space: nowrap; }
html .ns-trends #tbl.utama td:last-child .btn + .btn { margin-top: 6px; }

/* Data Channel group rows (Team): a real disclosure chevron instead of a 9px glyph. */
html .ns-team .gArw {
  width: 16px; height: 16px; margin-right: 6px; font-size: 0; vertical-align: -3px; transform: none;
  background-color: currentColor; color: var(--ns-secondary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform var(--ns-duration) var(--ns-ease);
}
html .ns-team .gArw.open { transform: rotate(90deg); }
html .ns-team :is(.grpA, .grpT, .grpN)[data-grp]:hover td { filter: none; background-color: var(--ns-hover); }

/* Bulk actions appear only when rows are selected. */
html .ns-workspace .ns-bulkbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 8px 8px 8px 14px;
  border: 1px solid var(--ns-border); border-radius: var(--ns-radius);
  background: var(--ns-inset);
}
html .ns-workspace .ns-bulkbar[data-count='0'] { display: none; }
html .ns-workspace .ns-bulkbar-count { font-size: var(--ns-text-xs); color: var(--ns-secondary); margin-right: auto; }
html .ns-workspace .ns-bulkbar-count b { color: var(--ns-text); }

/* Stacked tables (data-ns-stack): each row becomes a card on phones. */
@media (max-width: 640px) {
  html .ns-workspace table[data-ns-stack] { min-width: 0 !important; width: 100%; border-collapse: separate; }
  html .ns-workspace table[data-ns-stack] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  html .ns-workspace table[data-ns-stack] tbody tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--ns-border); }
  html .ns-workspace table[data-ns-stack] tbody tr[data-ns-group] { padding: 0; }
  html .ns-workspace table[data-ns-stack] tbody :is(td, th) {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 5px 0 !important; border: 0; text-align: right; min-width: 0; white-space: normal;
  }
  html .ns-workspace table[data-ns-stack] tbody :is(td, th)::before {
    content: attr(data-label); flex: none; max-width: 45%;
    color: var(--ns-muted); font-size: var(--ns-text-xs); font-weight: 500; text-align: left;
  }
  html .ns-workspace table[data-ns-stack] tbody :is(td, th):is([data-label=''], :not([data-label]))::before { content: none; }
  html .ns-workspace table[data-ns-stack] tbody :is(td, th):is([data-label=''], :not([data-label])) { justify-content: flex-start; }
  html .ns-workspace table[data-ns-stack] tbody td > :is(select, input:not([type='checkbox'])) { max-width: 55%; min-width: 0; }
  html .ns-workspace table[data-ns-stack] tbody tr[data-ns-group] > td { display: flex; flex-wrap: wrap; align-items: center; column-gap: 2px; padding: 10px 14px !important; text-align: left; }
  html .ns-workspace table[data-ns-stack] .gMeta { float: none; display: flex; align-items: center; gap: 8px; flex-basis: 100%; margin-top: 4px; }
  html .ns-workspace .tw:has(> table[data-ns-stack]) { overflow-x: visible; }
}

/* ---------- Floating surfaces (glass, used sparingly) ---------- */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html .ns-dialog {
    background: var(--ns-glass-bg);
    border-color: var(--ns-glass-line);
    box-shadow: var(--ns-glass-shadow);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
            backdrop-filter: blur(24px) saturate(160%);
  }
  html .ns-dialog::backdrop {
    -webkit-backdrop-filter: blur(3px);
            backdrop-filter: blur(3px);
  }
}
html .ns-dialog[open] { animation: ns-surface-in var(--ns-duration-slow) var(--ns-ease); }
html .ns-workspace .ns-command-item { transition: background-color var(--ns-duration-fast) var(--ns-ease), color var(--ns-duration-fast) var(--ns-ease); }
@keyframes ns-surface-in { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Icons that replace decorative emoji (notive-ui.js) ---------- */
.ns-ei {
  display: inline-block; width: 1.05em; height: 1.05em; flex: none;
  vertical-align: -.15em; margin-right: .3em;
  background-color: currentColor;
  -webkit-mask: var(--ns-ei) center / contain no-repeat;
          mask: var(--ns-ei) center / contain no-repeat;
}
.ns-ei[data-tone='live'] { color: var(--ns-onair); }
.ns-ei[data-tone='good'] { color: var(--ns-good); }
.ns-ei[data-tone='warn'] { color: var(--ns-warn); }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html .ns-workspace *, html .ns-dialog, html .ns-dialog * { transition: none !important; animation: none !important; }
  html .ns-workspace .btn:active { transform: none; }
}

/* Metric values never break mid-number (e.g. "Rp150.22 / 0"). */
html .ns-workspace .tile .v { white-space: nowrap; font-size: clamp(18px, 1.55vw, 26px); }

/* ---------- Sidebar priority (notive-workspace.js arrangeNavigation) ---------- */
html .ns-workspace .side .ns-navgroup {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  border: 0; background: none; cursor: pointer; text-align: left;
  font: 600 var(--ns-text-2xs)/1.4 var(--ns-font); letter-spacing: .02em; color: var(--ns-muted);
  padding: 16px 10px 6px; border-radius: 6px;
}
html .ns-workspace .side .ns-navgroup:first-child { padding-top: 4px; }
html .ns-workspace .side .ns-navgroup:hover { color: var(--ns-secondary); }
html .ns-workspace .side .ns-navgroup .ns-icon {
  width: 12px; height: 12px; opacity: 0; transform: rotate(90deg);
  transition: transform var(--ns-duration) var(--ns-ease), opacity var(--ns-duration-fast) var(--ns-ease);
}
html .ns-workspace .side .ns-navgroup:is(:hover, :focus-visible) .ns-icon,
html .ns-workspace .side .ns-navgroup[aria-expanded='false'] .ns-icon { opacity: 1; }
html .ns-workspace .side .ns-navgroup[aria-expanded='false'] .ns-icon { transform: none; }
html .ns-workspace .side .ns-nav-folded { display: none !important; }
html .ns-workspace .side .ns-primary-action { width: auto; align-self: stretch; margin: 0 14px 8px; justify-content: center; }
html .ns-workspace .side .ns-primary-action[hidden] { display: none; }

/* ---------- Filters ---------- */
html .ns-workspace select.ns-filter-active:not([multiple]):not([size]):not([hidden]) {
  border-color: var(--ns-accent);
  background-color: var(--ns-accent-soft);
  color: var(--ns-text); font-weight: 550;
}
html .ns-workspace .ns-filter-reset { color: var(--ns-accent); }
html .ns-workspace .ns-filter-reset[hidden] { display: none; }
html .ns-workspace .ns-filter-reset:hover { background: var(--ns-accent-soft); color: var(--ns-accent); }

/* Group rows are buttons for keyboard users too. */
html .ns-workspace tr[data-grp]:focus-visible { outline: 2px solid var(--ns-focus); outline-offset: -2px; }

/* Trends: the API-key setup note lives in Setelan; Ringkasan already lists it under Perlu perhatian. */
html body.ns-trends:not([data-ns-page='atur']) #peringatan .ns-setup-note { display: none; }
/* The shared mobile drawer forces .navgrp to block; keep group headers as full-width rows. */
html .ns-workspace .side .ns-navgroup:not([style*='display: none']) { display: flex !important; }

/* ---------- Ringkasan: "Perlu perhatian" (Notive.attention) ---------- */
html .ns-workspace .ns-priority-count {
  font-style: normal; font-size: var(--ns-text-2xs); font-weight: 650; line-height: 1;
  min-width: 20px; padding: 4px 7px; border-radius: 999px; text-align: center;
  color: var(--ns-warn); background: var(--ns-warn-soft);
}
html .ns-workspace .ns-priority-count.calm { color: var(--ns-good); background: var(--ns-good-soft); }
html .ns-workspace .ns-priority-head > span { margin-left: auto; }
html .ns-workspace .ns-priority-more {
  padding: 10px 18px 12px 33px; font-size: var(--ns-text-xs); color: var(--ns-muted);
  border-top: 1px solid var(--ns-border);
}

/* ---------- Forms in steps (Live: Buat tugas) ---------- */
html .ns-workspace .ns-form-step { padding: 4px 0 18px; margin-bottom: 14px; border-bottom: 1px solid var(--ns-border); }
html .ns-workspace .ns-step-title {
  display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 10px; align-items: center;
  margin: 0 0 14px; font-size: var(--ns-text-md); font-weight: 650; letter-spacing: -.01em; color: var(--ns-text);
}
html .ns-workspace .ns-step-title small {
  grid-column: 2; font-size: var(--ns-text-xs); font-weight: 400; color: var(--ns-muted); letter-spacing: 0; margin-top: 2px;
}
html .ns-workspace .ns-step-no {
  display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 999px;
  font-size: var(--ns-text-2xs); font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ns-on-brand); background: var(--ns-brand);
}
html .ns-workspace .ns-step-no.ns-step-optional { color: var(--ns-secondary); background: var(--ns-inset); border: 1px solid var(--ns-border); }
html .ns-workspace .ns-step-card > h2 { display: flex; align-items: center; gap: 10px; }
html .ns-workspace .ns-step-card > h2 > .hint { margin-left: auto; }
html .ns-workspace .ns-field-help { display: block; margin-top: 6px; font-size: var(--ns-text-2xs); font-weight: 400; color: var(--ns-muted); text-transform: none; letter-spacing: 0; }
html .ns-workspace .ns-step-lead { margin: 0 0 10px; font-size: var(--ns-text-sm); color: var(--ns-secondary); line-height: 1.55; }
html .ns-workspace .ns-help-details > summary { cursor: pointer; font-size: var(--ns-text-xs); font-weight: 600; color: var(--ns-accent); width: max-content; }
/* Save stays reachable at the end of a long form. */
html .ns-workspace .ns-form-actions {
  position: sticky; bottom: 0; z-index: 5; margin: 8px -18px -16px; padding: 12px 18px;
  border-top: 1px solid var(--ns-border); border-radius: 0 0 var(--ns-radius) var(--ns-radius);
  background: var(--ns-glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%);
}
@media (max-width: 640px) {
  html .ns-workspace .ns-form-actions { margin: 8px -14px -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  html .ns-workspace .ns-form-actions > .btn { flex: 1; }
}
html .ns-workspace .ns-form-step > .bar { align-items: flex-start; }
html .ns-workspace .ns-form-step :is(.note, .warnbox, .errbox) { margin-bottom: 14px; }
/* Inline validation (Live Buat tugas) */
html .ns-workspace [aria-invalid='true'] { border-color: var(--ns-bad) !important; box-shadow: 0 0 0 3px var(--ns-bad-soft) !important; }
html .ns-workspace .ns-field-error { display: block; margin-top: 6px; font-size: var(--ns-text-xs); font-weight: 500; color: var(--ns-bad); text-transform: none; letter-spacing: 0; }
/* Cards clip their corners with overflow:hidden, which also disables sticky children. */
html .ns-workspace .card:has(.ns-form-actions) { overflow: visible; }

/* ---------- Merged pages (segment tabs) ---------- */
html .ns-workspace .side .ns-nav-merged { display: none !important; }
html .ns-workspace .side .ns-nav-merge-active { background: var(--ns-accent-soft); color: var(--ns-accent); font-weight: 650; }
html .ns-workspace .ns-segments {
  display: flex; gap: 2px; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  margin: 14px 0 18px; padding: 3px; border: 1px solid var(--ns-border); border-radius: 10px; background: var(--ns-inset);
}
html .ns-workspace .ns-segments::-webkit-scrollbar { display: none; }
html .ns-workspace .ns-segments[hidden] { display: none; }
html .ns-workspace .ns-segments > button {
  flex: none; min-height: 32px; padding: 6px 14px; border: 0; border-radius: 7px; background: transparent;
  font: 550 var(--ns-text-xs)/1.3 var(--ns-font); color: var(--ns-secondary); cursor: pointer; white-space: nowrap;
  transition: background-color var(--ns-duration-fast) var(--ns-ease), color var(--ns-duration-fast) var(--ns-ease), box-shadow var(--ns-duration-fast) var(--ns-ease);
}
html .ns-workspace .ns-segments > button:hover { color: var(--ns-text); }
html .ns-workspace .ns-segments > button[aria-selected='true'] { background: var(--ns-surface); color: var(--ns-text); box-shadow: 0 1px 2px rgba(16, 26, 40, .08), 0 0 0 1px var(--ns-border); }
html .ns-workspace .ns-segments > button:focus-visible { outline: 2px solid var(--ns-focus); outline-offset: 1px; }
/* Search field icon needs its own gutter on every width (Live mobile overrode it). */
html .ns-workspace .ns-search input.ns-search-input { padding-left: 38px !important; }

/* ---------- Finishing pass: spacing, intrinsic control widths, and calm actions ---------- */
html .ns-workspace .bar { column-gap: 12px; row-gap: 14px; }
html .ns-workspace .btn { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
html .ns-workspace :is(.ns-priority-row, .ns-team-task) > .btn { white-space: normal; }
html .ns-workspace .ns-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
html .ns-workspace .ns-row-actions > .btn { margin: 0; }
html .ns-workspace .ns-check-label { flex: 0 1 auto; padding: 8px 0; }
html .ns-workspace .ns-check-label > span { min-width: 0; }
html .ns-workspace :is(.tw, .tbl-wrap) { scrollbar-gutter: auto; }

/* The calculator keeps the count and its apply action together. */
html .ns-team .ns-schedule-calculator { align-items: flex-end; margin: 18px 0 0; }
html .ns-team .ns-schedule-calculator > label.f { flex: 0 1 112px; }
html .ns-team .ns-schedule-calculator > label.f:first-child { flex-basis: 176px; }
html .ns-team .ns-calculator-result { flex: 1 1 160px; align-self: center; color: var(--ns-secondary); font-size: 13px; line-height: 1.6; }
html .ns-team .ns-calculator-result:empty { display: none; }
html .ns-team .ns-selection-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-left: auto; }
html .ns-team .ns-selection-count { display: inline-flex; align-items: center; gap: 8px; color: var(--ns-muted); font-size: 12px; white-space: nowrap; }
html .ns-team .ns-selection-count > b { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; padding: 4px 8px; border: 1px solid var(--ns-border); border-radius: 7px; color: var(--ns-text); background: var(--ns-inset); font-variant-numeric: tabular-nums; }

/* Table actions have a real column, rather than squeezing words into narrow cells. */
html .ns-team #tblMateri { min-width: 1180px; }
html .ns-team #tblMateri :is(th, td):last-child:not([colspan]) { min-width: 96px; text-align: right; }
html .ns-team #tblMateri select { width: 100%; }
html .ns-team .ns-channel-link-cell { min-width: 260px; }
html .ns-team .ns-channel-link-field { display: flex; align-items: center; gap: 8px; }
html .ns-team .ns-channel-link-field > input { flex: 1 1 160px; width: 100%; min-width: 160px; }
html .ns-team .ns-channel-link-field > .ns-open-link { flex: 0 0 40px; min-width: 40px; width: 40px; min-height: 40px; padding: 0; font-size: 18px; }
html .ns-team #tblCh .ns-row-actions { flex-wrap: nowrap; }
html .ns-team #tblTp { min-width: 980px; }
html .ns-team #tblTp :is(th, td):last-child:not([colspan]) { min-width: 140px; text-align: right; }
html .ns-team #tblTp td:last-child > .btn + .btn { margin-left: 8px; }
html .ns-team .ns-table-toolbar { padding: 16px 18px; margin: 0; border-bottom: 1px solid var(--ns-border); align-items: center; gap: 12px; }
html .ns-team .ns-bonus-toolbar { margin: 16px 0 18px; }
html .ns-team .ns-bonus-toolbar > label.f { width: min(320px, 100%); }

/* A report is a short status card; its action is a separate control. */
html .ns-team .ns-report-summary-list { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
html .ns-team .ns-report-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; max-width: 100%; padding: 12px 14px; border: 1px solid var(--ns-border); border-left: 3px solid var(--ns-control); border-radius: 10px; background: var(--ns-inset); color: var(--ns-secondary); font-size: 12px; }
html .ns-team .ns-report-summary[data-tone='bad'] { color: var(--ns-bad); background: var(--ns-bad-soft); border-left-color: var(--ns-bad); }
html .ns-team .ns-report-summary[data-tone='good'] { color: var(--ns-good); background: var(--ns-good-soft); border-left-color: var(--ns-good); }
html .ns-team .ns-report-summary-copy { min-width: 0; line-height: 1.65; overflow-wrap: anywhere; }
html .ns-team .ns-report-status { gap: 8px 12px; margin-bottom: 16px; }
html .ns-team .ns-report-status > .pill { margin: 0; padding: 5px 9px; border-radius: 6px; font-size: 11px; line-height: 1.4; }
html .ns-team .ns-report-status > .pill[data-tone='good'] { color: var(--ns-good); background: var(--ns-good-soft); border-color: var(--ns-border); }
html .ns-team .ns-report-status > .pill[data-tone='warn'] { color: var(--ns-warn); background: var(--ns-warn-soft); border-color: var(--ns-border); }

/* Seasonal context wraps independently of its calendar action. */
html .ns-trends .mban { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px 20px; padding: 16px 18px; }
html .ns-trends .ns-season-items { display: flex; flex-wrap: wrap; gap: 10px 24px; min-width: 0; }
html .ns-trends .ns-season-items > span { flex: 1 1 280px; min-width: 0; line-height: 1.7; }
html .ns-trends .mban > .btn { margin: 0; justify-self: end; }
html .ns-trends .seg > button { gap: 8px; }
html .ns-trends .seg > button > i { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; padding: 2px 7px; line-height: 1.2; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  html .ns-team .ns-selection-actions { width: 100%; margin-left: 0; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--ns-border); }
  html .ns-trends .mban { grid-template-columns: minmax(0, 1fr); }
  html .ns-trends .mban > .btn { justify-self: start; }
}
@media (max-width: 640px) {
  html .ns-workspace .btn.sm { min-height: 44px; }
  html .ns-workspace .ns-segments > button { min-height: 40px; }
  html .ns-workspace .ns-check-label { padding: 10px 0; }
  html .ns-team .ns-schedule-calculator > .btn { flex: 1 1 100%; }
  html .ns-team .ns-selection-actions { gap: 12px; }
  html .ns-team .ns-selection-actions > .btn { flex: 1 1 auto; }
  html .ns-team .ns-report-summary { width: 100%; }
  html .ns-team #tblMateri :is(th, td):last-child:not([colspan]) { min-width: 0; text-align: left; }
  html .ns-team .ns-channel-link-cell { min-width: 0; }
  html .ns-team .ns-channel-link-field { flex: 1 1 100%; }
  html .ns-team .ns-channel-link-field > input { flex-basis: 100px; min-width: 0; }
  html .ns-team .ns-channel-link-field > .ns-open-link { flex-basis: 44px; min-width: 44px; min-height: 44px; }
  html .ns-team .ns-table-toolbar > .sp { display: none; }
  html .ns-team .ns-table-toolbar > span { flex-basis: 100%; line-height: 1.6; }
}
