/*
 * Portal NOC — tema korporat ICON+ (D-17).
 * Warna resmi: utama #035B71 (Pantone 7477 C), aksen #00A2B9 (Pantone 3135 C).
 * Dimuat SETELAH style.css & qa-style.css. Shell baru memakai kelas nx-* agar tidak bentrok dengan CSS lama.
 */

:root {
  --nx-primary: #035B71;
  --nx-primary-ink: #035B71;
  --nx-on-primary: #ffffff;
  --nx-accent: #00A2B9;
  /* Sidebar terang (pilihan user 2026-10-17); teal ICON+ tetap pada brand bar HP, panel login, tombol & menu aktif. */
  --nx-side: #ffffff;
  --nx-side-text: #24343b;
  --nx-side-sub: #566a71;
  --nx-side-on: #e3f1f4;
  --nx-side-on-text: #035B71;
  --nx-side-mark: #035B71;
  --nx-side-line: #d5dde0;
  --nx-side-hover: #eef5f7;
  --nx-brand: #035B71;
  --nx-brand-text: #ffffff;
  --nx-bg: #f2f5f6;
  --nx-card: #ffffff;
  --nx-line: #d5dde0;
  --nx-line2: #e4eaec;
  --nx-text: #18262b;
  --nx-muted: #566a71;
  --nx-label: #34474e;
  --nx-soft: #eaf1f3;
  --nx-input: #ffffff;
  --nx-input-line: #b3c1c6;
  --nx-ok: #1e6b3a;
  --nx-warn: #8a5a00;
  --nx-bad: #a12a2a;
  --nx-info: #035B71;
  --nx-font: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --nx-primary: #00A2B9;
  --nx-primary-ink: #3DC3D6;
  --nx-on-primary: #06181d;
  --nx-side: #0B1B21;
  --nx-side-text: #E1EBEE;
  --nx-side-sub: #93A9B0;
  --nx-side-on: #12313a;
  --nx-side-on-text: #E1EBEE;
  --nx-side-mark: #00A2B9;
  --nx-side-line: rgba(255, 255, 255, .15);
  --nx-side-hover: rgba(255, 255, 255, .06);
  --nx-brand: #0B1B21;
  --nx-brand-text: #E1EBEE;
  --nx-bg: #0A1418;
  --nx-card: #101E24;
  --nx-line: #203840;
  --nx-line2: #182B32;
  --nx-text: #E1EBEE;
  --nx-muted: #93A9B0;
  --nx-label: #BFD0D5;
  --nx-soft: #15272E;
  --nx-input: #0C181D;
  --nx-input-line: #2D4952;
  --nx-ok: #72C793;
  --nx-warn: #E3B55A;
  --nx-bad: #F09090;
  --nx-info: #3DC3D6;
  color-scheme: dark;
}

/*
 * Variabel CSS lama (style.css / qa-style.css) diarahkan ke token tema agar gaya lama yang memakainya
 * ikut warna ICON+ dan mode gelap. Warna yang ditulis langsung di atribut style halaman diganti per halaman (U2).
 */
:root,
:root[data-theme="dark"] {
  --primary: var(--nx-primary);
  --primary-hover: var(--nx-primary-ink);
  --primary-dark: var(--nx-primary-ink);
  --primary-accent: var(--nx-accent);
  --accent: var(--nx-accent);
  --primary-light: var(--nx-soft);
  --primary-tint: var(--nx-soft);
  --primary-border: var(--nx-line);
  --bg: var(--nx-bg);
  --page-bg: var(--nx-bg);
  --app-bg: var(--nx-bg);
  --surface: var(--nx-card);
  --surface-card: var(--nx-card);
  --surface-alt: var(--nx-card);
  --surface-secondary: var(--nx-soft);
  --surface-soft: var(--nx-soft);
  --surface2: var(--nx-soft);
  --border: var(--nx-line);
  --border-subtle: var(--nx-line);
  --border-color: var(--nx-line);
  --text: var(--nx-text);
  --text-primary: var(--nx-text);
  --text-main: var(--nx-text);
  --text-body: var(--nx-text);
  --text-secondary: var(--nx-muted);
  --text-muted: var(--nx-muted);
  --success: var(--nx-ok);
  --warning: var(--nx-warn);
  --danger: var(--nx-bad);
  --info: var(--nx-info);
  --font-family: var(--nx-font);
}

html.is-logged-in,
html.is-logged-in body {
  background: var(--nx-bg) !important;
}

html.is-logged-in body {
  margin: 0;
  color: var(--nx-text);
  font-family: var(--nx-font) !important;
}

/* ───────── Shell ───────── */
.nx-app {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.nx-side {
  position: sticky;
  top: 0;
  /* Sticky makes its own stacking layer; keep it (and its flyouts) above page content, below modals. */
  z-index: 1001;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--nx-side);
  color: var(--nx-side-text);
  border-right: 1px solid var(--nx-side-line);
  font-family: var(--nx-font);
}

.nx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--nx-side-line);
}

.nx-brand img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 3px;
  padding: 2px;
}

.nx-brand b {
  display: block;
  font-size: 15px;
  letter-spacing: .02em;
}

.nx-brand span {
  display: block;
  font-size: 12px;
  color: var(--nx-side-sub);
}

.nx-modules {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  flex: 1;
}

.nx-modules a {
  display: block;
  padding: 10px 20px;
  color: var(--nx-side-text) !important;
  text-decoration: none !important;
  font-size: 14.5px;
  font-weight: 600;
  border-left: 3px solid transparent;
}

.nx-modules a:hover,
.nx-modules a:focus-visible {
  background: var(--nx-side-hover);
}

.nx-modules a.on {
  font-weight: 700;
  background: var(--nx-side-on);
  color: var(--nx-side-on-text) !important;
  border-left-color: var(--nx-side-mark);
}

.nx-mod-icon {
  width: 18px;
  text-align: center;
  margin-right: 10px;
  color: var(--nx-side-sub);
  font-size: 14px;
  flex-shrink: 0;
}

.nx-modules a.on .nx-mod-icon {
  color: var(--nx-side-on-text);
}

.nx-qs-open {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nx-qs-icon {
  font-size: 13px;
  color: var(--nx-side-sub);
  flex-shrink: 0;
}

.nx-qs-text {
  flex: 1;
  text-align: left;
}

.nx-side-toggle-wrap {
  padding: 8px 16px;
  border-top: 1px solid var(--nx-side-line);
}

.nx-side-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--nx-side-sub);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 120ms ease, color 120ms ease;
}

.nx-side-toggle:hover,
.nx-side-toggle:focus-visible {
  background: var(--nx-side-hover);
  color: var(--nx-side-text);
  outline: none;
}

.nx-side-toggle-icon {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.nx-me-trigger {
  display: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  margin: 0 auto;
}

.nx-me .nx-me-trigger {
  text-decoration: none;
}

.nx-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--nx-soft);
  color: var(--nx-side-text);
  border: 1px solid var(--nx-side-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
}

.nx-fly-head {
  display: none;
}

/* Modul berisi beberapa halaman: klik → flyout di samping sidebar */
.nx-mod.has-sub {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nx-mod.has-sub .nx-mod-label {
  flex: 1;
  min-width: 0;
}

/* Jumlah yang menunggu di menu (MenuBadges) */
.nx-badge {
  margin-left: auto;
  margin-right: 10px;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--nx-primary);
  color: var(--nx-on-primary);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.nx-fly .nx-badge {
  margin-right: 0;
  padding-left: 6px;
}

.nx-modules .nx-fly a {
  gap: 16px;
}

.nx-mod:not(.has-sub) {
  display: flex !important;
  align-items: center;
}

.nx-mod:not(.has-sub) .nx-badge {
  margin-right: 0;
}

.nx-chev {
  width: 7px;
  height: 7px;
  margin-right: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  opacity: .55;
}

.nx-mod.has-sub[aria-expanded="true"] {
  background: var(--nx-side-hover);
}

.nx-fly {
  position: fixed;
  z-index: 1001;
  min-width: 220px;
  max-width: 300px;
  padding: 4px 0;
  background: var(--nx-card);
  border: 1px solid var(--nx-line);
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
  font-family: var(--nx-font);
}

.nx-fly[hidden] {
  display: none;
}

.nx-modules .nx-fly a {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  border-left: 3px solid transparent;
  color: var(--nx-text) !important;
  opacity: 1;
  font-size: 14px;
  white-space: nowrap;
}

.nx-modules .nx-fly a + a {
  border-top: 1px solid var(--nx-line2);
}

.nx-modules .nx-fly a:hover,
.nx-modules .nx-fly a:focus-visible {
  background: var(--nx-soft);
  outline: none;
}

.nx-modules .nx-fly a.on {
  font-weight: 700;
  border-left-color: var(--nx-primary);
  background: transparent;
}

.nx-me {
  padding: 14px 20px 16px;
  border-top: 1px solid var(--nx-side-line);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nx-me .who b {
  display: block;
  font-size: 14px;
}

.nx-me .who span {
  color: var(--nx-side-sub);
}

.nx-me .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.nx-me a,
.nx-me button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--nx-side-text) !important;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.nx-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Baris sub-menu modul + konteks shift (di dalam #main-content-wrapper agar ikut navigasi SPA) */
.nx-subbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  margin: -1px 0 20px;
  padding: 0 4px;
  border-bottom: 1px solid var(--nx-line);
  font-family: var(--nx-font);
}

/* Tab halaman terakhir dibuka (seperti iCRM) */
.nx-tabs {
  display: flex;
  align-self: flex-end;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
  margin-bottom: -1px;
  padding-top: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.nx-tab {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  background: var(--nx-soft);
  border: 1px solid var(--nx-line);
  border-top-width: 2px;
  border-top-color: transparent;
  border-radius: 3px 3px 0 0;
}

.nx-tab a {
  display: block;
  padding: 7px 12px;
  color: var(--nx-muted) !important;
  text-decoration: none !important;
  white-space: nowrap;
  font-size: 13.5px;
}

.nx-tab a:hover {
  color: var(--nx-text) !important;
}

.nx-tab a:has(+ .nx-tab-x) {
  padding-right: 4px;
}

.nx-tab-x {
  align-self: stretch;
  padding: 0 9px 0 4px;
  border: 0;
  background: none;
  color: var(--nx-muted);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.nx-tab-x:hover,
.nx-tab-x:focus-visible {
  color: var(--nx-bad);
}

.nx-tab.on {
  background: var(--nx-bg);
  border-top-color: var(--nx-primary);
  border-bottom-color: var(--nx-bg);
}

.nx-tab.on a {
  color: var(--nx-text) !important;
  font-weight: 700;
}

.nx-ctx {
  font-size: 13px;
  color: var(--nx-muted);
  padding: 8px 0;
}

.nx-ctx b {
  color: var(--nx-text);
  font-weight: 600;
}

/* Bottom room so the last rows can scroll clear of the NOVA button. */
#main-content-wrapper.nx-main {
  padding: 0 28px 88px !important;
}

/* Garis loading navigasi (#turbo-loader) */
#turbo-loader {
  background: var(--nx-accent) !important;
  box-shadow: none !important;
  height: 3px !important;
}

/* ───────── HP: menu jadi laci ───────── */
.nx-mbar {
  display: none;
}

@media (max-width: 900px) {
  .nx-app {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Wide legacy page content scrolls inside the content area instead of widening the page (keeps the menu button visible). */
  #main-content-wrapper.nx-main {
    overflow-x: auto;
  }

  .nx-mbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--nx-brand);
    color: var(--nx-brand-text);
    font-family: var(--nx-font);
  }

  .nx-mbar button {
    height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 2px;
    background: transparent;
    color: var(--nx-brand-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  .nx-side {
    display: none;
  }

  .nx-app.menu-open .nx-side {
    display: flex;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 270px;
    height: auto;
    z-index: 999;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35);
  }

  /* Di laci HP, flyout jadi lipatan di bawah modul. */
  .nx-mod.has-sub[aria-expanded="true"] .nx-chev {
    transform: rotate(45deg);
  }

  .nx-fly {
    position: static;
    min-width: 0;
    max-width: none;
    padding: 0 0 6px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .nx-modules .nx-fly a {
    padding: 8px 20px 8px 36px;
    color: var(--nx-side-text) !important;
    font-weight: 400;
    white-space: normal;
  }

  .nx-modules .nx-fly a + a {
    border-top: 0;
  }

  .nx-modules .nx-fly a:hover,
  .nx-modules .nx-fly a:focus-visible {
    background: var(--nx-side-hover);
  }

  .nx-modules .nx-fly a.on {
    font-weight: 700;
    color: var(--nx-side-on-text) !important;
    border-left-color: var(--nx-side-mark);
  }
}

/* ───────── Sidebar Ciut (Mode Ikon) — D-24 ───────── */
@media (min-width: 901px) {
  .nx-app {
    transition: grid-template-columns 150ms ease;
  }

  .nx-side {
    transition: width 150ms ease;
  }

  html[data-side="mini"] .nx-app {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  html[data-side="mini"] .nx-brand {
    padding: 16px 0 14px;
    justify-content: center;
  }

  html[data-side="mini"] .nx-brand-text {
    display: none;
  }

  html[data-side="mini"] .nx-qs-open {
    width: 40px;
    height: 38px;
    margin: 10px auto;
    padding: 0;
    justify-content: center;
  }

  html[data-side="mini"] .nx-qs-open .nx-qs-text,
  html[data-side="mini"] .nx-qs-open kbd {
    display: none;
  }

  html[data-side="mini"] .nx-qs-icon {
    margin-right: 0;
    font-size: 15px;
    opacity: 1;
  }

  html[data-side="mini"] .nx-modules .nx-mod {
    padding: 12px 0;
    justify-content: center;
    position: relative;
    text-align: center;
  }

  html[data-side="mini"] .nx-mod-icon {
    margin-right: 0;
    font-size: 16px;
  }

  html[data-side="mini"] .nx-mod-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html[data-side="mini"] .nx-chev {
    display: none;
  }

  html[data-side="mini"] .nx-mod .nx-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    margin: 0;
    padding: 0 4px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 16px;
  }

  html[data-side="mini"] .nx-side-toggle-wrap {
    padding: 8px 0;
  }

  html[data-side="mini"] .nx-side-toggle {
    justify-content: center;
    padding: 8px 0;
    width: 40px;
    margin: 0 auto;
  }

  html[data-side="mini"] .nx-side-toggle-text {
    display: none;
  }

  html[data-side="mini"] .nx-side-toggle-icon {
    transform: rotate(180deg);
  }

  html[data-side="mini"] .nx-me {
    padding: 12px 0 16px;
    align-items: center;
    position: relative;
  }

  html[data-side="mini"] .nx-me-trigger {
    display: flex;
  }

  html[data-side="mini"] .nx-me-body {
    display: none;
  }

  html[data-side="mini"] .nx-me-body.is-open {
    display: flex;
    position: fixed;
    z-index: 1002;
    min-width: 200px;
    background: var(--nx-card);
    border: 1px solid var(--nx-line);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    padding: 12px 16px;
    flex-direction: column;
    gap: 10px;
  }

  html[data-side="mini"] .nx-me-body.is-open .who b {
    color: var(--nx-text);
  }

  html[data-side="mini"] .nx-me-body.is-open .who span {
    color: var(--nx-muted);
  }

  html[data-side="mini"] .nx-me-body.is-open .links a,
  html[data-side="mini"] .nx-me-body.is-open .links button {
    color: var(--nx-text) !important;
  }

  html[data-side="mini"] .nx-fly-head {
    display: block;
    font-weight: 700;
    padding: 8px 16px 6px;
    border-bottom: 1px solid var(--nx-line);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--nx-muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nx-app,
  .nx-side,
  .nx-side * {
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .nx-side-toggle-wrap {
    display: none !important;
  }

  #main-content-wrapper.nx-main {
    padding: 0 16px 80px !important;
  }
}

/* ───────── Komponen bersama ───────── */
.page-header,
.task-tracker-header {
  background: var(--nx-card) !important;
  border: 1px solid var(--nx-line) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.page-header h1,
.page-header-left h1,
.task-tracker-header h1,
.task-tracker-header-content h1 {
  color: var(--nx-text) !important;
  font-weight: 700 !important;
  font-size: 20px !important;
}

.page-header p,
.page-header-left p,
.task-tracker-header p,
.task-tracker-header-content p {
  color: var(--nx-muted) !important;
}

/* Dialog konfirmasi keluar */
.nx-logout {
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .45);
}

.nx-logout-box {
  width: 100%;
  max-width: 380px;
  padding: 22px 22px 18px;
  background: var(--nx-card);
  border: 1px solid var(--nx-line);
  border-radius: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  font-family: var(--nx-font);
}

#logout-modal h3,
#idle-modal h3,
#confirm-modal h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: var(--nx-text) !important;
  -webkit-text-fill-color: var(--nx-text) !important;
}

#logout-modal p,
#idle-modal p,
#confirm-modal p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--nx-muted) !important;
}

.nx-logout-btns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.nx-logout-btns button {
  min-width: 96px;
  height: 38px;
  padding: 0 16px;
  border-radius: 3px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#btn-cancel-logout,
#btn-idle-logout,
#btn-confirm-no {
  background: var(--nx-card);
  color: var(--nx-text);
  border: 1px solid var(--nx-input-line);
}

#btn-confirm-logout {
  background: var(--nx-bad);
  color: #ffffff;
  border: 1px solid var(--nx-bad);
}

:root[data-theme="dark"] #btn-confirm-logout {
  color: #1a0b0b;
}

#btn-confirm-yes.is-danger {
  background: var(--nx-bad);
  border-color: var(--nx-bad);
  color: #ffffff;
}

:root[data-theme="dark"] #btn-confirm-yes.is-danger {
  color: #1a0b0b;
}

#btn-idle-stay,
#btn-confirm-yes {
  background: var(--nx-primary);
  color: var(--nx-on-primary);
  border: 1px solid var(--nx-primary);
}

.nx-logout-btns button:focus-visible {
  outline: 2px solid var(--nx-primary);
  outline-offset: 2px;
}

.nx-logout-wait {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nx-bg);
  color: var(--nx-muted);
  font-family: var(--nx-font);
  font-size: 15px;
  font-weight: 600;
}

/* Toast */
#noc-toast-container > div {
  border-radius: 3px !important;
  font-family: var(--nx-font);
}

:root[data-theme="dark"] #noc-toast-container > div {
  background: var(--nx-card) !important;
  color: var(--nx-text) !important;
  border-color: var(--nx-line) !important;
}

/* ═════════ Standar halaman (D-17) — dipakai semua halaman yang sudah dirapikan ═════════ */
.nx-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--nx-font);
  color: var(--nx-text);
}

.nx-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.nx-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--nx-text);
  letter-spacing: -.01em;
}

.nx-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--nx-muted);
}

.nx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  border-radius: 2px;
  border: 1px solid var(--nx-input-line);
  background: var(--nx-card);
  color: var(--nx-text) !important;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  cursor: pointer;
}

.nx-btn:hover {
  border-color: var(--nx-primary);
}

.nx-btn.primary {
  background: var(--nx-primary);
  border-color: var(--nx-primary);
  color: var(--nx-on-primary) !important;
}

.nx-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--nx-primary-ink) !important;
  text-decoration: underline;
  cursor: pointer;
}

.nx-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--nx-muted);
}

.nx-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nx-filters select,
.nx-filters input {
  height: 34px;
  border: 1px solid var(--nx-input-line);
  border-radius: 2px;
  background: var(--nx-input);
  color: var(--nx-text);
  font: inherit;
  font-size: 14px;
  padding: 0 10px;
}

.nx-filters .nx-btn,
.nx-filters button:not(.nx-link) {
  height: 34px;
}

.nx-loading {
  color: var(--nx-primary-ink);
  font-weight: 600;
}

.nx-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--nx-card);
  border: 1px solid var(--nx-line);
}

.nx-figs > a,
.nx-figs > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-right: 1px solid var(--nx-line2);
  color: inherit !important;
  text-decoration: none !important;
}

.nx-figs .l {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--nx-muted);
}

.nx-figs .v {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.nx-figs .s {
  font-size: 12.5px;
  color: var(--nx-muted);
}

.nx-figs > a:hover .v,
.nx-figs > a:focus-visible .v {
  color: var(--nx-primary-ink);
  text-decoration: underline;
}

.nx-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nx-grid .span-2 {
  grid-column: span 2;
}

@media (max-width: 1100px) {
  .nx-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .nx-grid .span-2 {
    grid-column: auto;
  }
}

.nx-panel {
  background: var(--nx-card);
  border: 1px solid var(--nx-line);
  min-width: 0;
}

.nx-panel-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--nx-line2);
}

.nx-panel-h h2 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--nx-text);
}

.nx-panel-h span,
.nx-panel-h a {
  font-size: 12.5px;
}

.nx-panel-h span {
  color: var(--nx-muted);
}

.nx-panel-b {
  padding: 14px 16px;
}

.nx-chart {
  position: relative;
  height: 230px;
}

.nx-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--nx-muted);
  font-size: 13px;
}

.nx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.nx-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--nx-muted);
  padding: 8px 16px;
  border-bottom: 1px solid var(--nx-line);
  background: var(--nx-soft);
  white-space: nowrap;
}

.nx-table td {
  padding: 9px 16px;
  border-bottom: 1px solid var(--nx-line2);
  color: var(--nx-text);
  vertical-align: middle;
}

.nx-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Long lists meant to be read or screenshotted in one view (e.g. Rekap Shift): tighter rows. Phones keep the card layout. */
/* .nx-page .nx-table td below forces 9px 16px with !important, so the dense variant needs the same weight. */
@media (min-width: 701px) {
  .nx-page .nx-table.nx-table-dense th {
    padding: 6px 12px !important;
  }

  .nx-page .nx-table.nx-table-dense td {
    padding: 4px 12px !important;
    font-size: 13px !important;
    line-height: 1.35;
  }

  .nx-page .nx-table.nx-table-dense td[colspan] {
    padding: 5px 12px !important;
    font-size: 12px !important;
  }
}

.nx-num {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
}

.nx-muted {
  color: var(--nx-muted) !important;
}

.nx-meter {
  height: 8px;
  background: var(--nx-line2);
}

.nx-meter > i {
  display: block;
  height: 100%;
  background: var(--nx-primary);
}

.nx-stack {
  display: flex;
  height: 14px;
  background: var(--nx-line2);
  overflow: hidden;
}

.nx-stack > i {
  display: block;
  height: 100%;
}

.nx-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  vertical-align: -1px;
}


.nx-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--nx-line2);
  font-size: 13.5px;
}

.nx-list li:last-child {
  border-bottom: 0;
}

.nx-count {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
}

.nx-count.zero {
  color: var(--nx-muted);
  font-weight: 400;
}

.nx-grid .span-3 {
  grid-column: 1 / -1;
}

.nx-stack-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.nx-tag {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--nx-primary-ink);
}

.nx-tag.bad {
  color: var(--nx-bad);
}

.nx-tag.warn {
  color: var(--nx-warn);
}

.nx-note {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--nx-warn);
  border-left-width: 4px;
  background: var(--nx-card);
  color: var(--nx-text);
  font-size: 13.5px;
}

/* Strip "Hari ini" Beranda petugas: shift yang berjalan diberi garis atas teal */
.nx-today > .now {
  box-shadow: inset 0 3px 0 var(--nx-primary);
  background: var(--nx-soft);
}

/* Komposisi shift satu hari (Beranda MOD / Koordinator) */
.nx-duty {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nx-duty-col {
  padding: 12px 16px 14px;
  border-right: 1px solid var(--nx-line2);
  border-top: 3px solid transparent;
  min-width: 0;
}

.nx-duty-col:last-child {
  border-right: 0;
}

.nx-duty-col.now {
  border-top-color: var(--nx-primary);
  background: var(--nx-soft);
}

.nx-duty-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin-bottom: 8px;
}

.nx-duty-h b {
  font-size: 14px;
}

.nx-duty-h > span:not(.nx-tag) {
  font-size: 12.5px;
  color: var(--nx-muted);
}

.nx-gap {
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--nx-bad);
}

.nx-duty ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-duty li {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  font-size: 13.5px;
}

.nx-duty li .r {
  flex: 0 0 62px;
  color: var(--nx-muted);
  font-size: 12px;
  font-weight: 700;
  padding-top: 1px;
}

.nx-duty li .n {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nx-duty li .s {
  color: var(--nx-muted);
  font-size: 12px;
}

.nx-duty-empty {
  font-size: 13px;
}

.nx-duty-away {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--nx-line2);
  font-size: 13px;
  color: var(--nx-muted);
}

.nx-duty-away b {
  color: var(--nx-text);
}

.nx-duty-away i {
  font-style: normal;
}

@media (max-width: 700px) {
  .nx-duty {
    grid-template-columns: minmax(0, 1fr);
  }

  .nx-duty-col {
    border-right: 0;
    border-bottom: 1px solid var(--nx-line2);
  }
}

[wire\:loading\.class] {
  transition: opacity .15s ease;
}

.nx-dim {
  opacity: .55;
}

/* Warna seri grafik/distribusi: dua teal ICON+ dan satu amber kalem agar tiga seri (mis. Pagi/Siang/Malam) bisa dibedakan di terang maupun gelap. */
:root {
  --nx-c1: #035B71;
  --nx-c2: #00A2B9;
  --nx-c3: #B07C14;
}

:root[data-theme="dark"] {
  --nx-c1: #3DC3D6;
  --nx-c2: #1E7F8E;
  --nx-c3: #D9A845;
}

.nx-c1 { background: var(--nx-c1) !important; }
.nx-c2 { background: var(--nx-c2) !important; }
.nx-c3 { background: var(--nx-c3) !important; }

/* Halaman standar menang atas aturan lama style.css / qa-style.css (yang banyak memakai !important). */
.nx-page h1,
.nx-page h2,
.nx-page h3 {
  color: var(--nx-text) !important;
  font-family: var(--nx-font) !important;
}

.nx-page a:not(.nx-btn) {
  color: var(--nx-primary-ink) !important;
}

.nx-page .nx-figs > a {
  color: var(--nx-text) !important;
}

.nx-page .nx-table,
.nx-page .nx-table tr,
.nx-page .nx-table td {
  background: transparent !important;
  color: var(--nx-text);
  font-family: var(--nx-font) !important;
}

.nx-page .nx-table th {
  background: var(--nx-soft) !important;
  color: var(--nx-muted) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: var(--nx-font) !important;
}

.nx-page .nx-table td.nx-muted,
.nx-page .nx-table .nx-muted {
  color: var(--nx-muted) !important;
}

.nx-page .nx-filters select,
.nx-page .nx-filters input {
  background: var(--nx-input) !important;
  color: var(--nx-text) !important;
  border-color: var(--nx-input-line) !important;
}

/* CSS lama memaksa -webkit-text-fill-color (warna gelap) di banyak elemen; di halaman standar warna teks harus ikut `color` tema. */
.nx-page,
.nx-page * {
  -webkit-text-fill-color: currentColor !important;
}

.nx-page .nx-table td {
  color: var(--nx-text) !important;
}

.nx-page .nx-table td {
  border-bottom: 1px solid var(--nx-line2) !important;
  padding: 9px 16px !important;
  font-size: 13.5px !important;
}

.nx-page .nx-table th {
  border-bottom: 1px solid var(--nx-line) !important;
  padding: 8px 16px !important;
  font-size: 12px !important;
}

.nx-page .nx-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

/* ───────── Mode Laporan (D-17) ───────── */
.nx-report-head {
  display: none;
}

body.nx-report .nx-head,
body.nx-report .nx-side,
body.nx-report .nx-mbar,
body.nx-report .nx-subbar,
body.nx-report .nx-filters,
body.nx-report .nx-actions:not(.nx-report-actions) {
  display: none !important;
}

body.nx-report .nx-app {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.nx-report #main-content-wrapper.nx-main {
  padding: 20px 24px 40px !important;
  max-width: 100% !important;
}

body.nx-report .nx-report-head {
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--nx-line);
}

body.nx-report .nx-report-head h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--nx-text);
}

body.nx-report .nx-report-head .nx-report-meta {
  font-size: 12.5px;
  color: var(--nx-muted);
}

.nx-report-exit {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 99999;
}

@media print {
  .nx-report-exit {
    display: none !important;
  }
}

/* ───────── Sub-navigasi internal halaman (.nx-subnav) ───────── */
.nx-page .nx-subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--nx-line);
  margin-bottom: 8px;
}

.nx-page .nx-subnav a,
.nx-page .nx-subnav button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--nx-muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  border-radius: 0;
  margin-bottom: -1px;
}

.nx-page .nx-subnav a:hover,
.nx-page .nx-subnav button:hover {
  color: var(--nx-text);
}

.nx-page .nx-subnav a.active,
.nx-page .nx-subnav button.active {
  color: var(--nx-primary-ink) !important;
  border-bottom-color: var(--nx-primary) !important;
}


/* ───────── Paginasi standar (resources/views/vendor/livewire/tailwind.blade.php) ───────── */
.nx-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  font-family: var(--nx-font);
  font-size: 13px;
  color: var(--nx-muted);
}

.nx-pager-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nx-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--nx-input-line);
  border-radius: 2px;
  background: var(--nx-card);
  color: var(--nx-text);
  -webkit-text-fill-color: currentColor;
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

button.nx-pager-btn:hover {
  border-color: var(--nx-primary);
  color: var(--nx-primary-ink);
}

.nx-pager-btn.on {
  background: var(--nx-primary);
  border-color: var(--nx-primary);
  color: var(--nx-on-primary);
  font-weight: 700;
  cursor: default;
}

.nx-pager-btn[aria-disabled="true"] {
  color: var(--nx-muted);
  opacity: .6;
  cursor: default;
}

.nx-pager-gap {
  padding: 0 4px;
}

/* ───────── Matriks Roster & Modal Dialog (D-17) ───────── */
.nx-page .nx-roster-box {
  overflow: auto;
  max-height: 72vh;
  position: relative;
}

.nx-page .nx-roster-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
}

.nx-page .nx-roster-table th,
.nx-page .nx-roster-table td {
  border-right: 1px solid var(--nx-line2) !important;
  border-bottom: 1px solid var(--nx-line2) !important;
  padding: 6px 8px !important;
  text-align: center;
}

.nx-page .nx-roster-table th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nx-soft) !important;
  color: var(--nx-muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.nx-page .nx-roster-table .nx-sticky-col {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--nx-card) !important;
  text-align: left;
  min-width: 180px;
}

.nx-page .nx-roster-table th.nx-sticky-col {
  z-index: 15;
  background: var(--nx-soft) !important;
}

.nx-page .nx-roster-table .nx-today {
  background: var(--nx-soft) !important;
}

.nx-page .nx-shift-btn {
  display: inline-block;
  min-width: 20px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--nx-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  border-radius: 2px;
}

.nx-page .nx-shift-btn:hover {
  background: var(--nx-soft);
  color: var(--nx-primary-ink);
}

.nx-page .nx-shift-l {
  color: var(--nx-muted) !important;
  font-weight: 400;
}

.nx-page .nx-shift-c {
  color: var(--nx-bad) !important;
  font-weight: 700;
}

.nx-page .nx-modal-backdrop,
.nx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  /* Above the sidebar (1001) even where a page sets a lower inline z-index. */
  z-index: 9999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}


/* style.css lama memberi .page padding 24px 32px !important; shell sudah memberi jarak (#main-content-wrapper.nx-main). */
#main-content-wrapper > .page {
  padding: 0 !important;
}

/* Teks di atas latar --nx-bad (badge hitungan, tombol tolak): terang di mode terang, gelap di mode gelap agar terbaca. */
:root {
  --nx-on-bad: #ffffff;
}

:root[data-theme="dark"] {
  --nx-on-bad: #2a0d0d;
}

/* Placeholder ikut token: aturan teks .nx-page * (currentColor) membuatnya nyaris tak terlihat di mode gelap. */
.nx-page input::placeholder,
.nx-page textarea::placeholder {
  color: var(--nx-muted) !important;
  -webkit-text-fill-color: var(--nx-muted) !important;
  opacity: 1;
}

/* CSS lama memaksa semua table berlatar putih dan teks td #172B3A (!important); tabel apa pun di halaman standar
   (mis. matriks roster) ikut tema. Latar per sel tidak disentuh. */
.nx-page table,
.nx-page table tr {
  background: transparent !important;
}

.nx-page table td {
  color: var(--nx-text) !important;
}

/* ───────── Matriks Roster: warna per shift, kelompok, hari ini, pemilih shift bersama ───────── */
:root {
  --nx-sh-p-bg: #FFF1C7;
  --nx-sh-p-fg: #6E4B00;
  --nx-sh-s-bg: #D6F0F4;
  --nx-sh-s-fg: #035B71;
  --nx-sh-m-bg: #DCE2F2;
  --nx-sh-m-fg: #23356B;
  --nx-sh-c-bg: #FBE1E1;
  --nx-sh-c-fg: #A61B1B;
  --nx-row-hover: rgba(3, 91, 113, .07);
}

:root[data-theme="dark"] {
  --nx-sh-p-bg: #3A2F12;
  --nx-sh-p-fg: #F2CF7A;
  --nx-sh-s-bg: #0F3A42;
  --nx-sh-s-fg: #7FDCE8;
  --nx-sh-m-bg: #1F2A4A;
  --nx-sh-m-fg: #AFBEF0;
  --nx-sh-c-bg: #401C1C;
  --nx-sh-c-fg: #F4A7A7;
  --nx-row-hover: rgba(255, 255, 255, .06);
}

.nx-page .nx-roster-table td {
  background: var(--rc-bg, transparent) !important;
  color: var(--rc-fg, var(--nx-text)) !important;
}

.nx-page .nx-roster-table td.nx-sticky-col {
  --rc-bg: var(--nx-card);
}

.nx-page .nx-rc-p { --rc-bg: var(--nx-sh-p-bg); --rc-fg: var(--nx-sh-p-fg); }
.nx-page .nx-rc-s { --rc-bg: var(--nx-sh-s-bg); --rc-fg: var(--nx-sh-s-fg); }
.nx-page .nx-rc-m { --rc-bg: var(--nx-sh-m-bg); --rc-fg: var(--nx-sh-m-fg); }
.nx-page .nx-rc-c { --rc-bg: var(--nx-sh-c-bg); --rc-fg: var(--nx-sh-c-fg); }
.nx-page .nx-rc-r { --rc-fg: var(--nx-text); }
.nx-page .nx-rc-l { --rc-fg: var(--nx-muted); }

.nx-page .nx-roster-table .nx-shift-btn,
.nx-page .nx-roster-table .nx-shift-btn:hover {
  color: inherit !important;
  background: transparent;
  font-weight: 700;
}

.nx-page .nx-roster-table .nx-rc-l .nx-shift-btn {
  font-weight: 400;
}

.nx-page .nx-roster-table button.nx-shift-btn:hover {
  outline: 1px solid currentColor;
}

/* Legend swatches */
.nx-page .nx-rc-key {
  display: inline-block;
  min-width: 22px;
  margin-left: 10px;
  padding: 1px 4px;
  text-align: center;
  font-weight: 700;
  background: var(--rc-bg, transparent);
  color: var(--rc-fg, var(--nx-text)) !important;
  border: 1px solid var(--nx-line2);
  border-radius: 2px;
}

/* Today column: header in primary, cells framed. */
.nx-page .nx-roster-table th.nx-today {
  background: var(--nx-primary) !important;
  color: var(--nx-on-primary) !important;
}

.nx-page .nx-roster-table th.nx-weekend:not(.nx-today) {
  color: var(--nx-bad) !important;
}

.nx-page .nx-roster-table td.nx-today {
  box-shadow: inset 2px 0 0 var(--nx-primary), inset -2px 0 0 var(--nx-primary);
}

/* Row hover: tint on top of the shift colour (legacy CSS turned the row white). */
.nx-page .nx-roster-table tbody tr:not(.nx-roster-group):hover td {
  background: var(--rc-bg, transparent) !important;
  box-shadow: inset 0 0 0 9999px var(--nx-row-hover);
}

.nx-page .nx-roster-table tbody tr:not(.nx-roster-group):hover td.nx-today {
  box-shadow: inset 2px 0 0 var(--nx-primary), inset -2px 0 0 var(--nx-primary), inset 0 0 0 9999px var(--nx-row-hover);
}

/* Group divider rows (siklus libur / kategori). */
.nx-page .nx-roster-table tr.nx-roster-group td {
  --rc-bg: var(--nx-soft);
  text-align: left;
  padding: 7px 8px !important;
  font-size: 12px;
  font-weight: 700;
  color: var(--nx-primary-ink) !important;
  border-top: 1px solid var(--nx-line) !important;
}

.nx-page .nx-roster-table tr.nx-roster-group td > span {
  position: sticky;
  left: 8px;
}

/* Shared shift picker. */
.nx-page .nx-roster-pick {
  position: fixed;
  z-index: 60;
  transform: translate(-50%, calc(-100% - 6px));
  display: flex;
  gap: 3px;
  padding: 4px;
  background: var(--nx-card);
  border: 1px solid var(--nx-line);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}

.nx-page .nx-roster-pick .nx-btn {
  height: 26px;
  min-width: 26px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--rc-bg, var(--nx-card)) !important;
  color: var(--rc-fg, var(--nx-text)) !important;
}

.nx-page .nx-roster-pick .nx-btn.is-current {
  outline: 2px solid var(--nx-primary);
  outline-offset: -2px;
}

/* --nx-surface dipakai beberapa halaman Kualitas (U6) sebagai latar isian/kotak: alias dari --nx-card agar ikut tema. */
:root {
  --nx-surface: var(--nx-card);
  /* Dipakai halaman U7 (Checklist, Outbound, Profil) sebagai warna garis: alias --nx-line. */
  --nx-border: var(--nx-line);
}

/* Wrapper halaman lama memakai id page-*; CSS lama memberi [id^="page-"] padding 24px !important. */
.nx-page[id^="page-"] {
  padding: 0 !important;
}

/* CSS lama memaksa -webkit-text-fill-color gelap pada input/select (mis. input[type=date]) dengan selektor yang
   lebih spesifik daripada `.nx-page *`; isian di halaman standar ikut warna teks tema. */
.nx-page input:not([type="checkbox"]):not([type="radio"]),
.nx-page select,
.nx-page textarea {
  -webkit-text-fill-color: currentColor !important;
}

/* Isian & judul di halaman standar ikut tema: CSS lama memberi input/select latar putih dan h3–h6 warna gelap. */
.nx-page input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="range"]),
.nx-page select,
.nx-page textarea {
  background-color: var(--nx-input) !important;
  color: var(--nx-text) !important;
  border-color: var(--nx-input-line);
}

.nx-page :is(h3, h4, h5, h6):not([style*="color"]) {
  color: var(--nx-text) !important;
}

/* Satu font untuk seluruh portal (dipilih user 2026-10-15): CSS lama memasang Roboto/Inter di banyak elemen sehingga
   tampilan bercampur. Ikon Font Awesome dikecualikan. Angka di tabel & ringkasan selebar sama agar kolom lurus. */
html body,
html body *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not([class*=" fa-"]):not([class^="fa-"]) {
  font-family: var(--nx-font) !important;
}

html body table,
html body .nx-num,
html body .nx-figs .v,
html body .nx-roster-table {
  font-variant-numeric: tabular-nums;
}

/* Profil (U7): qa-style.css lama memaksa avatar/badge/kotak angka profil berlatar terang dan nama berwarna gelap. */
.nx-page #profil-avatar-big {
  background: var(--nx-soft) !important;
  color: var(--nx-primary-ink) !important;
  border: 1px solid var(--nx-line) !important;
}

.nx-page .profil-name,
.nx-page .profil-badge,
.nx-page .profil-stat-item {
  color: var(--nx-text) !important;
}

.nx-page .profil-badge,
.nx-page .profil-stat-item {
  background: var(--nx-card) !important;
  border-color: var(--nx-line) !important;
}

.nx-page .profil-stat-item .psi-num {
  color: var(--nx-primary-ink) !important;
}

.nx-page .profil-stat-item .psi-label {
  color: var(--nx-muted) !important;
}

/* Roster: sel yang bisa diubah (td[data-d]) langsung dapat diklik, tanpa tombol per sel. */
.nx-page .nx-roster-table td[data-d] {
  cursor: pointer;
  font-weight: 700;
}

.nx-page .nx-roster-table td.nx-rc-l {
  font-weight: 400;
}

.nx-page .nx-roster-table td[data-d]:hover {
  outline: 1px solid currentColor;
  outline-offset: -3px;
}

/* ───────── Pencarian cepat (Ctrl+K) ───────── */
[x-cloak] {
  display: none !important;
}

.nx-qs-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 16px 4px;
  padding: 7px 10px;
  border: 1px solid var(--nx-side-line);
  border-radius: 3px;
  background: transparent;
  color: var(--nx-side-sub);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.nx-qs-open:hover,
.nx-qs-open:focus-visible {
  background: var(--nx-side-hover);
  color: var(--nx-side-text);
}

.nx-qs-open kbd {
  white-space: nowrap;
  font: inherit;
  font-size: 11px;
  padding: 0 5px;
  border: 1px solid var(--nx-side-line);
  border-radius: 2px;
}

.nx-qs {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(0, 0, 0, .45);
}

.nx-qs-box {
  width: 100%;
  max-width: 600px;
  background: var(--nx-card);
  border: 1px solid var(--nx-line);
  border-radius: 3px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
  font-family: var(--nx-font);
  overflow: hidden;
}

.nx-qs-box input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--nx-line);
  background: var(--nx-card);
  color: var(--nx-text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.nx-qs-list {
  max-height: 55vh;
  overflow-y: auto;
  padding: 4px 0 8px;
}

.nx-qs-h {
  padding: 10px 18px 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--nx-muted);
}

.nx-qs-list a,
.nx-qs-row {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 18px;
  color: var(--nx-text) !important;
  text-decoration: none !important;
  border-left: 3px solid transparent;
  font-size: 14px;
}

.nx-qs-list a:hover,
.nx-qs-list a:focus {
  background: var(--nx-soft);
  border-left-color: var(--nx-primary);
  outline: none;
}

.nx-qs-list small,
.nx-qs-hint {
  color: var(--nx-muted);
  font-size: 12.5px;
}

.nx-qs-hint {
  padding: 8px 18px;
}

.nx-qs-foot {
  display: flex;
  justify-content: space-between;
  padding: 8px 18px;
  border-top: 1px solid var(--nx-line2);
  font-size: 12px;
  color: var(--nx-muted);
}

@media (max-width: 900px) {
  .nx-qs {
    padding-top: 8vh;
  }
}

/* ───────── Tabel tiket di HP: tiap baris jadi kartu berlabel (data-label) ───────── */
@media (max-width: 700px) {
  .nx-table.nx-cards-sm thead {
    display: none;
  }

  .nx-table.nx-cards-sm,
  .nx-table.nx-cards-sm tbody,
  .nx-table.nx-cards-sm tr {
    display: block;
    width: 100%;
  }

  .nx-table.nx-cards-sm tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--nx-line);
  }

  .nx-table.nx-cards-sm tbody tr:last-child {
    border-bottom: 0;
  }

  .nx-table.nx-cards-sm td {
    display: flex;
    gap: 12px;
    width: auto;
    max-width: none !important;
    padding: 3px 16px !important;
    border: 0 !important;
    text-align: left !important;
  }

  .nx-table.nx-cards-sm td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 92px;
    color: var(--nx-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
  }

  .nx-table.nx-cards-sm td.nx-cards-actions {
    padding-top: 8px !important;
  }
}

/* Roster: nama + role·site dalam satu kolom; baris milik user disorot */
.nx-page .nx-roster-table .nx-roster-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.nx-page .nx-roster-table .nx-roster-meta {
  font-size: 11px;
  white-space: nowrap;
}

.nx-page .nx-roster-table tr.nx-roster-me td.nx-sticky-col {
  background: var(--nx-side-on) !important;
  box-shadow: inset 3px 0 0 var(--nx-primary);
}

.nx-page .nx-roster-table tr.nx-roster-me td {
  border-top: 1px solid var(--nx-primary);
  border-bottom: 1px solid var(--nx-primary);
}

.nx-page .nx-roster-table tr.nx-flash td {
  animation: nxFlash 1.6s ease-out;
}

@keyframes nxFlash {
  0%, 40% { box-shadow: inset 0 0 0 2px var(--nx-accent); }
  100% { box-shadow: none; }
}

/* ───────── Isian nilai QA 0–10 (Penilaian NOC L1) ───────── */
/* CSS lama mengecilkan font & bentuk input; ukuran dipaksa agar angka nilai terbaca jelas. */
.nx-page input.nx-score-circle {
  display: block;
  width: 84px !important;
  height: 84px !important;
  box-sizing: border-box;
  margin: 10px auto 6px;
  padding: 0 !important;
  border: 3px solid var(--nx-input-line);
  border-radius: 50% !important;
  background: var(--nx-card) !important;
  text-align: center;
  font-size: 34px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.nx-page input.nx-score-circle::-webkit-inner-spin-button,
.nx-page input.nx-score-circle::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.nx-page input.nx-score-circle:focus-visible {
  outline: 2px solid var(--nx-primary);
  outline-offset: 3px;
}
