:root {
  --bg: #0b0f14;
  --panel: #0f1520;
  --panel2: #111a28;
  --text: #e7edf6;
  --muted: #93a4bd;
  --border: rgba(255, 255, 255, .10);
  --accent: #22c7c7;
  --accent2: #0ea5e9;
  --danger: #ff6b6b;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, .45);
}

/* ===== THEME: Dark (compact desktop-style) — default ===== */
body.theme-dark {
  --bg: #1e1e1e;
  --panel: #252526;
  --panel2: #2d2d30;
  --text: #cccccc;
  --muted: #858585;
  --border: rgba(255, 255, 255, .12);
  --accent: #007acc;
  --accent2: #3794ff;
  --danger: #f14c4c;
  --shadow: 0 18px 50px rgba(0, 0, 0, .4);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, .5);
  background:
    radial-gradient(1400px 600px at 10% -5%, rgba(0, 122, 204, .08), transparent 55%),
    radial-gradient(1200px 500px at 90% 10%, rgba(55, 148, 255, .06), transparent 50%),
    var(--bg);
}

body.theme-dark .sidebar {
  background: rgba(37, 37, 38, .92);
}

body.theme-dark .brand {
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border-color: var(--border);
}

body.theme-dark .brand:hover {
  border-color: rgba(0, 122, 204, .35);
}

body.theme-dark .logo {
  background: linear-gradient(135deg, rgba(0, 122, 204, .15), rgba(55, 148, 255, .1));
  border-color: rgba(0, 122, 204, .3);
  box-shadow: 0 6px 16px rgba(0, 122, 204, .15);
}

body.theme-dark .search {
  background: rgba(37, 37, 38, .8);
}

body.theme-dark .search:focus {
  border-color: rgba(0, 122, 204, .5);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, .15);
  background: rgba(37, 37, 38, .9);
}

body.theme-dark .ipDisplay {
  background: rgba(37, 37, 38, .5);
}

body.theme-dark .navGroupToggle:hover {
  border-color: rgba(0, 122, 204, .25);
}

body.theme-dark .navGroupToggle.active {
  background: rgba(0, 122, 204, .15);
  border-color: rgba(0, 122, 204, .35);
  color: var(--accent);
}

body.theme-dark .navItem:hover {
  border-color: rgba(0, 122, 204, .25);
}

body.theme-dark .navItem.active {
  border-color: rgba(0, 122, 204, .4);
  background: rgba(0, 122, 204, .15);
  box-shadow: 0 4px 20px rgba(0, 122, 204, .2);
}

body.theme-dark .navFooter {
  border-top-color: rgba(255, 255, 255, .08);
}

body.theme-dark .card:hover {
  border-color: rgba(0, 122, 204, .35);
}

body.theme-dark .badge {
  background: rgba(0, 122, 204, .18);
  border-color: rgba(0, 122, 204, .35);
  color: rgba(0, 122, 204, .95);
}

body.theme-dark .input,
.body.theme-dark .textarea {
  background: rgba(37, 37, 38, .8);
}

body.theme-dark .input:focus,
body.theme-dark .textarea:focus {
  border-color: rgba(0, 122, 204, .5);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, .12);
}

body.theme-dark .btn.primary {
  background: rgba(0, 122, 204, .2);
  border-color: rgba(0, 122, 204, .5);
}

body.theme-dark .status.ok {
  color: rgba(0, 122, 204, .95);
}

body.theme-dark .fileDropZone:hover {
  border-color: rgba(0, 122, 204, .4);
  background: rgba(0, 122, 204, .06);
}

body.theme-dark .fileDropZone.dragOver {
  background: rgba(0, 122, 204, .12);
}

body.theme-dark .fileInfo {
  background: rgba(0, 122, 204, .12);
  border-color: rgba(0, 122, 204, .35);
}

body.theme-dark .tab.active {
  border-color: rgba(0, 122, 204, .5);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, .12);
  background: rgba(0, 122, 204, .1);
}

body.theme-dark .toolLocalItem.active {
  border-color: rgba(0, 122, 204, .5);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, .12);
  background: rgba(0, 122, 204, .1);
}

body.theme-dark .template-btn.active {
  background: rgba(0, 122, 204, .18);
  border-color: rgba(0, 122, 204, .45);
  color: var(--accent);
}

body.theme-dark .template-btn:hover {
  border-color: rgba(0, 122, 204, .3);
}

body.theme-dark .lenRange::-webkit-slider-thumb {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 122, 204, .4);
}

body.theme-dark .lenRange::-moz-range-thumb {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 122, 204, .4);
}

body.theme-dark .diffAdded {
  background: rgba(0, 122, 204, .18);
  color: #6eb3ff;
  border-left-color: var(--accent);
}

body.theme-dark .portOpen {
  border-color: rgba(0, 122, 204, .35);
  background: rgba(0, 122, 204, .1);
}

body.theme-dark .presetDiv:hover {
  border-color: rgba(0, 122, 204, .4);
}

body.theme-dark .presetDiv input:checked+span {
  color: var(--accent);
}

body.theme-dark .presetUidInput:focus {
  border-color: rgba(0, 122, 204, .5);
  box-shadow: 0 0 0 4px rgba(0, 122, 204, .12);
}

body.theme-dark .excelFormSection {
  background: var(--panel);
}

body.theme-dark .chk {
  background: rgba(37, 37, 38, .6);
}

body.theme-dark .code {
  background: rgba(37, 37, 38, .8);
}

body.theme-dark .lenInput {
  background: rgba(37, 37, 38, .8);
}

/* ===== THEME: Light (JLM brand — #3ECFD2, #001849) — redup, gradasi putih → teal → biru ===== */
body.theme-light {
  --bg: #e4e8ef;
  --panel: rgba(255, 255, 255, .92);
  --panel2: #dce0e8;
  --text: #001849;
  --muted: #4a5568;
  --border: rgba(0, 24, 73, .14);
  --accent: #3ECFD2;
  --accent2: #2eb8bb;
  --danger: #d64545;
  --shadow: 0 18px 50px rgba(0, 24, 73, .1);
  --shadow-lg: 0 26px 70px rgba(0, 24, 73, .14);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, .98) 0%, rgba(62, 207, 210, .08) 35%, rgba(0, 24, 73, .04) 70%, rgba(62, 207, 210, .06) 100%),
    linear-gradient(120deg, rgba(62, 207, 210, .06) 0%, transparent 50%, rgba(0, 24, 73, .06) 100%),
    #e4e8ef;
}

body.theme-light .sidebar {
  background: rgba(255, 255, 255, .88);
  border-right-color: var(--border);
}

body.theme-light .brand {
  background: linear-gradient(135deg, rgba(255, 255, 255, .85), rgba(62, 207, 210, .06));
  border-color: var(--border);
}

body.theme-light .brand:hover {
  border-color: rgba(62, 207, 210, .4);
}

body.theme-light .logo {
  background: linear-gradient(135deg, rgba(62, 207, 210, .2), rgba(62, 207, 210, .12));
  border-color: rgba(62, 207, 210, .35);
  box-shadow: 0 6px 16px rgba(62, 207, 210, .2);
}

body.theme-light .search {
  background: rgba(255, 255, 255, .9);
  color: var(--text);
  border-color: var(--border);
}

body.theme-light .search:focus {
  border-color: rgba(62, 207, 210, .5);
  box-shadow: 0 0 0 4px rgba(62, 207, 210, .15);
  background: #fff;
}

body.theme-light .ipDisplay {
  background: rgba(248, 250, 252, .9);
  border-color: var(--border);
}

body.theme-light .navGroupToggle:hover {
  border-color: rgba(62, 207, 210, .25);
  background: rgba(62, 207, 210, .06);
}

body.theme-light .navGroupToggle.active {
  background: rgba(62, 207, 210, .12);
  border-color: rgba(62, 207, 210, .35);
  color: var(--accent);
}

body.theme-light .navItem:hover {
  border-color: rgba(62, 207, 210, .25);
  background: rgba(62, 207, 210, .06);
}

body.theme-light .navItem.active {
  border-color: rgba(62, 207, 210, .4);
  background: rgba(62, 207, 210, .14);
  box-shadow: 0 4px 20px rgba(62, 207, 210, .2);
}

body.theme-light .navFooter {
  border-top-color: rgba(0, 24, 73, .12);
}

body.theme-light .card {
  background: rgba(255, 255, 255, .75);
}

body.theme-light .card:hover {
  border-color: rgba(62, 207, 210, .4);
}

body.theme-light .badge {
  background: rgba(62, 207, 210, .18);
  border-color: rgba(62, 207, 210, .4);
  color: #001849;
}

body.theme-light .input,
body.theme-light .textarea {
  background: rgba(255, 255, 255, .95);
  color: var(--text);
  border-color: var(--border);
}

body.theme-light .input:focus,
body.theme-light .textarea:focus {
  border-color: rgba(62, 207, 210, .5);
  box-shadow: 0 0 0 4px rgba(62, 207, 210, .15);
}

body.theme-light .btn.primary {
  background: rgba(62, 207, 210, .2);
  border-color: rgba(62, 207, 210, .5);
  color: #001849;
}

body.theme-light .status.ok {
  color: #0d9488;
}

body.theme-light .fileDropZone {
  background: rgba(248, 250, 252, .9);
}

body.theme-light .fileDropZone:hover {
  border-color: rgba(62, 207, 210, .45);
  background: rgba(62, 207, 210, .08);
}

body.theme-light .fileDropZone.dragOver {
  background: rgba(62, 207, 210, .14);
}

body.theme-light .fileInfo {
  background: rgba(62, 207, 210, .14);
  border-color: rgba(62, 207, 210, .4);
  color: #001849;
}

body.theme-light .tab.active {
  border-color: rgba(62, 207, 210, .5);
  box-shadow: 0 0 0 4px rgba(62, 207, 210, .12);
  background: rgba(62, 207, 210, .12);
  color: #001849;
}

body.theme-light .toolLocalItem.active {
  border-color: rgba(62, 207, 210, .5);
  box-shadow: 0 0 0 4px rgba(62, 207, 210, .12);
  background: rgba(62, 207, 210, .12);
  color: #001849;
}

body.theme-light .template-btn.active {
  background: rgba(62, 207, 210, .2);
  border-color: rgba(62, 207, 210, .5);
  color: #001849;
}

body.theme-light .template-btn:hover {
  border-color: rgba(62, 207, 210, .35);
}

body.theme-light .lenRange::-webkit-slider-thumb {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(62, 207, 210, .4);
}

body.theme-light .lenRange::-moz-range-thumb {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(62, 207, 210, .4);
}

body.theme-light .diffAdded {
  background: rgba(62, 207, 210, .2);
  color: #0d9488;
  border-left-color: var(--accent);
}

body.theme-light .portOpen {
  border-color: rgba(62, 207, 210, .4);
  background: rgba(62, 207, 210, .12);
}

body.theme-light .presetDiv:hover {
  border-color: rgba(62, 207, 210, .4);
  background: rgba(62, 207, 210, .06);
}

body.theme-light .presetDiv input:checked+span {
  color: var(--accent);
}

body.theme-light .presetUidInput:focus {
  border-color: rgba(62, 207, 210, .5);
  box-shadow: 0 0 0 4px rgba(62, 207, 210, .15);
}

body.theme-light .excelFormSection {
  background: var(--panel);
  border-color: var(--border);
}

body.theme-light .chk {
  background: rgba(255, 255, 255, .9);
}

body.theme-light .code {
  background: rgba(248, 250, 252, .95);
  color: var(--text);
}

body.theme-light .lenInput {
  background: rgba(255, 255, 255, .95);
  color: var(--text);
}

body.theme-light .row,
body.theme-light .box {
  background: rgba(255, 255, 255, .6);
}

body.theme-light .panel,
body.theme-light .kv {
  background: rgba(255, 255, 255, .82);
}

body.theme-light .sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 24, 73, .2);
}

body.theme-light .sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 24, 73, .35);
}

/* ===== LOGIN PAGE ===== */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  width: 88px;
  height: 88px;
  border-radius: 20px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(34, 199, 199, .35) 0%, rgba(14, 165, 233, .25) 50%, rgba(34, 199, 199, .2) 100%);
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow:
    0 8px 24px rgba(34, 199, 199, .25),
    0 2px 8px rgba(0, 0, 0, .2),
    inset 0 1px 0 rgba(255, 255, 255, .4),
    inset 0 -1px 0 rgba(0, 0, 0, .1);
}

.login-logo-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35) 0%, transparent 100%);
  border-radius: 20px 20px 50% 50% / 0 0 100% 100%;
  pointer-events: none;
}

.login-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

body.theme-dark .login-logo-wrap {
  background: linear-gradient(145deg, rgba(0, 122, 204, .3) 0%, rgba(55, 148, 255, .2) 50%, rgba(0, 122, 204, .15) 100%);
  border-color: rgba(255, 255, 255, .2);
  box-shadow:
    0 8px 24px rgba(0, 122, 204, .3),
    0 2px 8px rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .3),
    inset 0 -1px 0 rgba(0, 0, 0, .15);
}

body.theme-light .login-logo-wrap {
  background: linear-gradient(145deg, rgba(62, 207, 210, .4) 0%, rgba(62, 207, 210, .25) 50%, rgba(62, 207, 210, .15) 100%);
  border-color: rgba(62, 207, 210, .5);
  box-shadow:
    0 8px 24px rgba(62, 207, 210, .25),
    0 2px 8px rgba(0, 24, 73, .08),
    inset 0 1px 0 rgba(255, 255, 255, .6),
    inset 0 -1px 0 rgba(0, 0, 0, .05);
}

.login-title {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 8px;
  color: var(--text);
}

.login-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-field label {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  text-align: left;
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 32, .75);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

body.theme-dark .login-input {
  background: rgba(37, 37, 38, .8);
}

body.theme-light .login-input {
  background: rgba(255, 255, 255, .95);
  color: var(--text);
}

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(34, 199, 199, .12);
}

body.theme-dark .login-input:focus {
  box-shadow: 0 0 0 4px rgba(0, 122, 204, .15);
}

body.theme-light .login-input:focus {
  box-shadow: 0 0 0 4px rgba(62, 207, 210, .15);
}

.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(34, 199, 199, .18);
  border-color: rgba(34, 199, 199, .45);
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.theme-dark .login-btn {
  background: rgba(0, 122, 204, .2);
  border-color: rgba(0, 122, 204, .5);
}

body.theme-light .login-btn {
  background: rgba(62, 207, 210, .2);
  border-color: rgba(62, 207, 210, .5);
  color: #001849;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 199, 199, .3);
}

body.theme-dark .login-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 122, 204, .3);
}

body.theme-light .login-btn:hover {
  box-shadow: 0 4px 12px rgba(62, 207, 210, .3);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.login-error {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 107, 107, .15);
  border: 1px solid rgba(255, 107, 107, .3);
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.login-spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

.login-register-wrap {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
}

.login-register-text {
  color: var(--muted);
  margin-right: 6px;
}

.login-register-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.login-register-link:hover {
  text-decoration: underline;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.login-footer p {
  margin: 0.25rem 0;
}

.login-footer .mt-2 {
  margin-top: 0.5rem;
}

.login-footer a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-footer a:hover {
  color: var(--accent2);
  text-decoration: underline;
}

/* ===== THEME: GreeNSO (current NSO Hub green/teal) ===== */
body.theme-greenso {
  --bg: #0b0f14;
  --panel: #0f1520;
  --panel2: #111a28;
  --text: #e7edf6;
  --muted: #93a4bd;
  --border: rgba(255, 255, 255, .10);
  --accent: #22c7c7;
  --accent2: #0ea5e9;
  --danger: #ff6b6b;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --shadow-lg: 0 26px 70px rgba(0, 0, 0, .45);
  background:
    radial-gradient(1300px 700px at 12% -8%, rgba(34, 199, 199, .18), transparent 65%),
    radial-gradient(1200px 700px at 88% 12%, rgba(14, 165, 233, .16), transparent 60%),
    var(--bg);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1300px 700px at 12% -8%, rgba(34, 199, 199, .18), transparent 65%),
    radial-gradient(1200px 700px at 88% 12%, rgba(14, 165, 233, .16), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: auto;
    max-height: 100vh;
    overflow-y: auto;
  }
}

.sidebar {
  grid-column: 1;
  background: rgba(15, 21, 32, .8);
  backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .1);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .2);
}

.brand {
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.brand:hover {
  border-color: rgba(34, 199, 199, .3);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.brandRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 199, 199, .2), rgba(14, 165, 233, .18));
  border: 1px solid rgba(34, 199, 199, .3);
  padding: 8px;
  box-shadow: 0 6px 16px rgba(34, 199, 199, .18);
}

.brandTitle {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.brandSub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.searchWrap {
  margin-top: 16px;
}

.search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 32, .75);
  color: var(--text);
  outline: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.search:focus {
  border-color: rgba(34, 199, 199, .55);
  box-shadow: 0 0 0 4px rgba(34, 199, 199, .12);
  background: rgba(15, 21, 32, .8);
}

.ipDisplay {
  margin-top: 20px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 32, .5);
}

.ipText {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.ipAddress {
  color: var(--accent);
  font-size: 16px;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  word-break: break-all;
  text-decoration: none;
  display: inline;
  margin-bottom: 0;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.ipAddress:hover {
  color: var(--accent2);
  text-decoration: underline;
}

.ipIsp {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 4px;
  word-break: break-word;
  font-style: italic;
}

/* Activity Logs - IP link readable on dark/GreeNSO */
.logIpLink {
  color: var(--text) !important;
  text-decoration: underline;
}

.logIpLink:hover {
  color: var(--accent) !important;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.navGroup {
  margin-top: 12px;
}

.navGroupToggle {
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.navGroupToggle:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(34, 199, 199, .2);
}

.navGroupToggle.active {
  background: rgba(34, 199, 199, .12);
  border-color: rgba(34, 199, 199, .3);
  color: var(--accent);
}

.navGroupIcon {
  font-size: 10px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
  color: var(--muted);
  display: inline-block;
}

.navGroupToggle.active .navGroupIcon {
  transform: rotate(180deg);
  color: var(--accent);
}

.navGroupItems {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 0;
  padding-left: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding-top: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navGroupItems.expanded {
  max-height: 1000px;
  opacity: 1;
  margin-top: 6px;
  padding-top: 4px;
}

.navGroupTitle {
  margin-top: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 8px 4px;
}

.navItem {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
}

.navItem::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  transition: height 0.2s ease;
}

.navItem:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(34, 199, 199, .2);
  transform: translateX(4px);
}

.navItem.active {
  border-color: rgba(34, 199, 199, .4);
  background: rgba(34, 199, 199, .12);
  box-shadow: 0 4px 20px rgba(34, 199, 199, .2);
  transform: translateX(4px);
}

.navItem.active::before {
  height: 60%;
}

.themeSwitcher {
  padding: 12px 4px;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.themeSwitcherLabel {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.themeSwitcherBtns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.themeBtn {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.themeBtn:hover {
  background: rgba(255, 255, 255, .08);
  border-color: var(--accent);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent, #22c3c3);
}
.lang-btn.active {
  background: rgba(34, 199, 199, 0.15);
  border-color: rgba(34, 199, 199, 0.45);
  color: var(--accent, #22c3c3);
}

.themeBtn.active {
  background: rgba(34, 199, 199, .15);
  border-color: rgba(34, 199, 199, .45);
  color: var(--accent);
}

body.theme-dark .themeBtn.active {
  background: rgba(0, 122, 204, .2);
  border-color: rgba(0, 122, 204, .5);
  color: var(--accent);
}

body.theme-light .themeBtn.active {
  background: rgba(62, 207, 210, .2);
  border-color: rgba(62, 207, 210, .5);
  color: #001849;
}

.navFooter {
  margin-top: auto;
  padding: 16px 4px 0;
  border-top: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footerText {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.footerLink {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footerLink:hover {
  color: var(--accent2);
  text-decoration: underline;
}

.main {
  grid-column: 2;
  padding: 32px;
  overflow-x: hidden;
  min-width: 0;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 920px) {
  .main {
    grid-column: 1;
    padding: 20px;
  }
}

.pageHeader {
  margin-bottom: 16px;
}

.view {
  width: 100%;
  margin-top: 0;
}

.hidden {
  display: none;
}

.pageTitle {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.pageDesc {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
  box-shadow: var(--shadow);
  padding: 16px;
  cursor: pointer;
  transition: .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 199, 199, .35);
}

.cardTitle {
  font-weight: 900;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(34, 199, 199, .14);
  color: rgba(34, 199, 199, .9);
}

.cardDesc {
  color: var(--muted);
  font-size: 13px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panelHeader {
  margin-bottom: 12px;
}

.panelTitle {
  font-weight: 900;
  font-size: 18px;
}

.panelSub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

/* Manage Users — filter row */
.admin-users-filters-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-users-filters-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-users-filter-keyword {
  grid-column: span 2;
  min-width: 0;
}

@media (max-width: 720px) {
  .admin-users-filter-keyword {
    grid-column: span 1;
  }
}

.admin-users-filter-control {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
}

.admin-users-filters-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.admin-users-filter-action-btn {
  min-width: 132px;
  height: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media(min-width:960px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Fix layout untuk ping & traceroute - kolom kiri tidak ikut memanjang */
.grid2-fixed {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media(min-width:960px) {
  .grid2-fixed {
    grid-template-columns: 400px 1fr;
  }

  .grid2-fixed>.stack:first-child {
    max-width: 400px;
    position: sticky;
    top: 20px;
    align-self: start;
  }
}

.gridConfig {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media(min-width:960px) {
  .gridConfig {
    grid-template-columns: 460px 1fr;
  }
}

.stack {
  display: grid;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}

.rowTitle {
  font-weight: 800;
}

.rowSub {
  color: var(--muted);
  font-size: 12px;
}

.box {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
}

.boxTop {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.input,
.textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 32, .75);
  color: var(--text);
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input:focus,
.textarea:focus {
  border-color: rgba(34, 199, 199, .55);
  box-shadow: 0 0 0 4px rgba(34, 199, 199, .12);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 850;
  cursor: pointer;
  transition: .15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: rgba(34, 199, 199, .18);
  border-color: rgba(34, 199, 199, .45);
}

.btn.ghost {
  background: transparent;
}

.status {
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.status.ok {
  color: rgba(34, 199, 199, .95);
}

.status.bad {
  color: var(--danger);
}

.kv {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .02);
}

.kvRow {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.kvRow:last-child {
  border-bottom: none;
}

.kvK {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}

.kvV {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.muted {
  color: var(--muted);
}

.whoisResult {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
  min-height: 400px;
  overflow-y: auto;
}

.whoisResult .kv {
  border: none;
  background: transparent;
}

/* Config Diff */
.diffResult {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
  padding: 16px;
  max-height: 600px;
  overflow-y: auto;
}

.diffView {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.diffLine {
  padding: 2px 8px;
  white-space: pre-wrap;
  word-break: break-all;
}

.diffAdded {
  background: rgba(34, 199, 199, .15);
  color: #4dd4d4;
  border-left: 3px solid var(--accent);
}

.diffDeleted {
  background: rgba(255, 107, 107, .15);
  color: #ff8e8e;
  border-left: 3px solid var(--danger);
}

.diffEqual {
  color: var(--muted);
}

/* Port Scanner */
.portResult {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
  padding: 16px;
  min-height: 400px;
  max-height: 600px;
  overflow-y: auto;
}

.portResults {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portItem {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.portOpen {
  border-color: rgba(34, 199, 199, .3);
  background: rgba(34, 199, 199, .08);
}

.portClosed {
  opacity: 0.6;
}

/* Ping Results */
.pingResults {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.6;
}

.pingResults .pingResults {
  padding: 12px;
  background: rgba(255, 255, 255, .02);
  border-radius: 8px;
}

/* Traceroute Results */
.traceResults {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.8;
}

.traceResults .traceResults {
  padding: 12px;
  background: rgba(255, 255, 255, .02);
  border-radius: 8px;
}

/* File Upload */
.fileUploadArea {
  margin-bottom: 12px;
}

.fileDropZone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .02);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fileDropZone:hover {
  border-color: rgba(34, 199, 199, .4);
  background: rgba(34, 199, 199, .05);
}

.fileDropZone.dragOver {
  border-color: var(--accent);
  background: rgba(34, 199, 199, .1);
  transform: scale(1.02);
}

.fileDropContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fileDropIcon {
  font-size: 32px;
  margin-bottom: 4px;
}

.fileDropText {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.fileDropSub {
  color: var(--muted);
  font-size: 12px;
}

.fileInfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(34, 199, 199, .1);
  border: 1px solid rgba(34, 199, 199, .3);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}

.fileRemove {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.fileRemove:hover {
  background: rgba(255, 107, 107, .2);
  color: var(--danger);
}

.cheats {
  display: grid;
  gap: 12px;
}

.cheatSection {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  overflow: hidden;
}

.cheatHeader {
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.cheatBody {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.code {
  white-space: pre;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 32, .75);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.lenControls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lenInput {
  width: 110px;
  text-align: right;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 32, .75);
  color: var(--text);
}

.lenRange {
  width: 100%;
  height: 32px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, .05);
  border-radius: 999px;
  outline: none;
}

.lenRange::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(34, 199, 199, .4);
  transition: all 0.2s ease;
}

.lenRange::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(34, 199, 199, .6);
}

.lenRange::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(34, 199, 199, .4);
  transition: all 0.2s ease;
}

.lenRange::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(34, 199, 199, .6);
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 850;
  cursor: pointer;
}

.tab.active {
  border-color: rgba(34, 199, 199, .55);
  box-shadow: 0 0 0 4px rgba(34, 199, 199, .10);
  background: rgba(34, 199, 199, .08);
}

.tabView.hidden {
  display: none;
}

.modePills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .02);
  border-radius: 999px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 850;
}

.pill input {
  accent-color: var(--accent);
}

.permList {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, .02);
}

.permRow {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.permRow:last-child {
  border-bottom: none;
}

.permName a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 950;
}

.permDesc {
  color: var(--muted);
  font-size: 13px;
}

.permPreview {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  padding: 12px;
}

.divisionCard {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.divisionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.permGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media(max-width:860px) {
  .permGrid {
    grid-template-columns: 1fr;
  }
}

.chk {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 21, 32, .55);
}

.chk input {
  accent-color: var(--accent);
}

.presetDivisions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.presetDivRow {
  display: flex;
  align-items: center;
  gap: 12px;
}

.presetDiv {
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.presetDiv:hover {
  background: rgba(15, 21, 32, .8);
  border-color: rgba(34, 199, 199, .4);
}

.presetDiv input:checked+span {
  color: rgba(34, 199, 199, 1);
  font-weight: 800;
}

.presetUidInput {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(15, 21, 32, .75);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.presetUidInput:focus {
  border-color: rgba(34, 199, 199, .55);
  box-shadow: 0 0 0 4px rgba(34, 199, 199, .12);
  background: rgba(15, 21, 32, .9);
}

.gridConfig {
  align-items: start;
}

#resultBox {
  min-height: 560px;
}

#jbis-conf .stack {
  min-width: 0;
}

.toolSplit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
  width: 100%;
}

.toolLocalMenu {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  padding: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolLocalItem {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.toolLocalItem.active {
  border-color: rgba(34, 199, 199, .55);
  box-shadow: 0 0 0 4px rgba(34, 199, 199, .10);
  background: rgba(34, 199, 199, .08);
}

.toolLocalContent {
  min-width: 0;
  width: 100%;
}

.jbisView.hidden {
  display: none;
}

/* Excel Duplicate Finder - Sticky Form */
.excelFormSection {
  position: sticky;
  top: 20px;
  z-index: 10;
  background: var(--panel);
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.excelResultsSection {
  min-height: 400px;
}

/* CS Dashboard - Template Buttons */
.template-selector {
  display: grid;
  gap: 8px;
}

.template-btn {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.template-btn:hover {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(34, 199, 199, .3);
}

.template-btn.active {
  background: rgba(34, 199, 199, .18);
  border-color: rgba(34, 199, 199, .45);
  color: var(--accent);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 4px;
}

.toast-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.toast-close:hover {
  color: var(--danger);
}

.toast-body {
  color: var(--text);
  word-break: break-word;
}

.toast-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.toast.success {
  border-left-color: var(--accent);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.info {
  border-left-color: var(--accent2);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s;
}

.modal.modal--wide {
  max-width: min(960px, 96vw);
  width: 96%;
}

.modal.modal--wide .modal-body {
  font-size: 15px;
  line-height: 1.6;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-weight: 600;
  font-size: 16px;
}

.modal-body {
  padding: 16px;
  overflow-y: auto;
  max-height: 80vh;
}

.modal-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-footer .btn.danger {
  color: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
  background: transparent;
}

.modal-footer .btn.danger:hover {
  background: rgba(241, 76, 76, 0.12);
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
}

/* ----- Topology (workflow-editor style, React Flow–like) ----- */
.topology-canvas-wrap {
  position: relative;
  /* Match canvas fill (#1a1a1a) — dot grid is drawn on canvas (zooms with view) */
  background-color: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.topology-canvas-wrap #topologyCanvas {
  border-radius: 8px;
}

.topology-canvas-wrap #topologyCanvas canvas {
  border-radius: 8px;
}

/* Glow effect for edges (vis-network draws on canvas; we style container) */
.topology-canvas-wrap .vis-network canvas {
  transition: filter 0.2s ease;
}

/* Toolbar: modern SaaS workflow style */
.topology-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(15, 17, 23, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px 8px 0 0;
}

.topology-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.topology-toolbar-group .btn {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  transition: background 0.2s, border-color 0.2s;
}

.topology-toolbar-group .btn:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(148, 163, 184, 0.3);
}

.topology-toolbar-group .btn.primary {
  background: rgba(20, 184, 166, 0.25);
  border-color: rgba(20, 184, 166, 0.5);
  color: #5eead4;
}

.topology-toolbar-group .btn.primary:hover {
  background: rgba(20, 184, 166, 0.35);
  border-color: #2dd4bf;
}

.topology-toolbar-group .btn.danger-style {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.topology-toolbar-group .btn.danger-style:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #f87171;
}

/* Zoom controls & minimap: floating panel like React Flow */
.topology-zoom-controls {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
  width: auto;
  height: auto;
}

.topology-zoom-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.topology-zoom-btn:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.2);
}


/* Sidebar: Add Node + Search */
.topology-sidebar .rowTitle {
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topology-sidebar .input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-radius: 6px;
}

.topology-sidebar .input::placeholder {
  color: #64748b;
}

.topology-device-item {
  transition: background 0.15s ease;
}

.topology-device-item:hover {
  background: rgba(51, 65, 85, 0.5);
}

/* Topology: Libraries / Network Symbols panel */
.topology-symbol-library {
  max-height: 280px;
  overflow-y: auto;
}
.topology-library-category {
  margin-bottom: 4px;
}
.topology-library-category-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}
.topology-library-category-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.topology-library-icon:hover {
  background: rgba(59, 130, 246, 0.2) !important;
}

/* Zoom info: floating label */
#topologyZoomInfo {
  background: rgba(15, 17, 23, 0.9) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #94a3b8 !important;
  font-size: 12px;
}

/* Status toast: smooth appear */
#topologyStatus.success {
  background: rgba(20, 184, 166, 0.2);
  border: 1px solid rgba(20, 184, 166, 0.4);
  color: #5eead4;
}

#topologyStatus.error {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

#topologyStatus.info {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.topology-list-wrap .devices-table {
  width: 100%;
  border-collapse: collapse;
}

.topology-list-wrap .devices-table th,
.topology-list-wrap .devices-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  word-break: break-word;
  vertical-align: top;
}

.topology-list-wrap .devices-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
  white-space: normal;
  word-break: break-word;
  vertical-align: bottom;
  min-width: 72px;
}


.topology-list-wrap .devices-table .btn.small {
  padding: 6px 10px;
  font-size: 12px;
  margin-right: 6px;
}

.topology-list-wrap .devices-table .btn.small.danger {
  color: var(--danger);
  border-color: var(--danger);
}

/* Modal Simpan topologi: hindari overlay nyangkut */
.modalOverlay.topology-save-modal-overlay {
  animation: none;
}
.topology-save-modal-box {
  pointer-events: auto;
  flex-shrink: 0;
}
.modalOverlay .topology-save-modal-box {
  max-height: 90vh;
  overflow-y: auto;
}

/* ISR: tabel kiri — kolom fixed + wrap agar Izin / Nomor ISR tidak saling timpa */
#isrTableWrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

#isrTableWrap table.isr-sites-table {
  table-layout: fixed;
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
}

#isrTableWrap table.isr-sites-table col.isr-col-no {
  width: 2.5rem;
}
#isrTableWrap table.isr-sites-table col.isr-col-izin {
  width: 32%;
}
#isrTableWrap table.isr-sites-table col.isr-col-nomor {
  width: 22%;
}
#isrTableWrap table.isr-sites-table col.isr-col-mulai {
  width: 4.6rem;
}
#isrTableWrap table.isr-sites-table col.isr-col-akhir {
  width: 4.6rem;
}
#isrTableWrap table.isr-sites-table col.isr-col-status {
  width: 5rem;
}
#isrTableWrap table.isr-sites-table col.isr-col-linkrole {
  width: 5.25rem;
}
#isrTableWrap table.isr-sites-table col.isr-col-pdf {
  width: 2.4rem;
}

#isrTableWrap table.isr-sites-table th,
#isrTableWrap table.isr-sites-table td {
  box-sizing: border-box;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 8px 6px;
  font-size: 15px;
  font-weight: 400;
  text-align: left;
}

#isrTableWrap table.isr-sites-table thead th {
  font-weight: 600;
}

#isrTableWrap table.isr-sites-table .isr-th-no,
#isrTableWrap table.isr-sites-table .isr-td-no {
  text-align: center;
}

#isrTableWrap table.isr-sites-table .isr-th-pdf,
#isrTableWrap table.isr-sites-table .isr-td-pdf {
  text-align: center;
}

#isrTableWrap table.isr-sites-table .isr-td-izin,
#isrTableWrap table.isr-sites-table .isr-td-nomor,
#isrTableWrap table.isr-sites-table .isr-th-izin,
#isrTableWrap table.isr-sites-table .isr-th-nomor {
  min-width: 0;
}

/* Hover & baris terpilih: warna di <td> agar menang atas theme insight (sortable-table td { background !important }) */
#isrTableWrap table.isr-sites-table tbody tr.isr-row td {
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

#isrTableWrap table.isr-sites-table tbody tr.isr-row:hover td {
  background: rgba(34, 199, 199, 0.14);
}

#isrTableWrap table.isr-sites-table tbody tr.isr-row-selected td {
  background: rgba(34, 199, 199, 0.18);
}

#isrTableWrap table.isr-sites-table tbody tr.isr-row-selected td:first-child {
  box-shadow: inset 4px 0 0 0 rgba(34, 199, 199, 0.95);
}

#isrTableWrap table.isr-sites-table tbody tr.isr-row-selected:hover td {
  background: rgba(34, 199, 199, 0.24);
}

/* Insight / minimal: timpa background td yang !important */
body.insight-style #isrTableWrap table.isr-sites-table tbody tr.isr-row:hover td {
  background: rgba(6, 182, 212, 0.16) !important;
}

body.insight-style #isrTableWrap table.isr-sites-table tbody tr.isr-row-selected td {
  background: rgba(6, 182, 212, 0.22) !important;
}

body.insight-style #isrTableWrap table.isr-sites-table tbody tr.isr-row-selected td:first-child {
  box-shadow: inset 4px 0 0 0 rgb(6, 182, 212) !important;
}

body.insight-style #isrTableWrap table.isr-sites-table tbody tr.isr-row-selected:hover td {
  background: rgba(6, 182, 212, 0.28) !important;
}

body.insight-style.theme-dark #isrTableWrap table.isr-sites-table tbody tr.isr-row:hover td {
  background: rgba(34, 211, 238, 0.14) !important;
}

body.insight-style.theme-dark #isrTableWrap table.isr-sites-table tbody tr.isr-row-selected td {
  background: rgba(34, 211, 238, 0.2) !important;
}

body.insight-style.theme-dark #isrTableWrap table.isr-sites-table tbody tr.isr-row-selected td:first-child {
  box-shadow: inset 4px 0 0 0 rgb(34, 211, 238) !important;
}

body.insight-style.theme-dark #isrTableWrap table.isr-sites-table tbody tr.isr-row-selected:hover td {
  background: rgba(34, 211, 238, 0.26) !important;
}

/* Isi nomor: satu tingkat lebih kecil dari sel tabel (15px → 14px) */
#isrTableWrap table.isr-sites-table .isr-td-nomor .isr-nomor-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.4;
}

#isrTableWrap table.isr-sites-table .isr-nomor-line {
  position: relative;
  padding-left: 0.75em;
  margin: 0;
  max-width: 100%;
}

#isrTableWrap table.isr-sites-table .isr-nomor-line::before {
  content: '\2022';
  position: absolute;
  left: 0;
  top: 0.12em;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72em;
  line-height: 1;
}

#isrTableWrap table.isr-sites-table .isr-nomor-text {
  word-break: break-word;
}

#isrTableWrap table.isr-sites-table .isr-izin-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

#isrTableWrap table.isr-sites-table .isr-td-no,
#isrTableWrap table.isr-sites-table .isr-th-no {
  white-space: nowrap;
}

#isrTableWrap table.isr-sites-table .isr-td-pdf,
#isrTableWrap table.isr-sites-table .isr-th-pdf {
  white-space: nowrap;
}

/* Tanggal / status / PDF: font sama 12px, padding sedikit lebih rapat */
#isrTableWrap table.isr-sites-table .isr-th-mulai,
#isrTableWrap table.isr-sites-table .isr-th-akhir,
#isrTableWrap table.isr-sites-table .isr-td-mulai,
#isrTableWrap table.isr-sites-table .isr-td-akhir {
  padding: 8px 4px;
}

#isrTableWrap table.isr-sites-table .isr-th-status,
#isrTableWrap table.isr-sites-table .isr-td-status {
  padding: 8px 4px;
}

#isrTableWrap table.isr-sites-table .isr-th-linkrole,
#isrTableWrap table.isr-sites-table .isr-td-linkrole {
  padding: 8px 4px;
}

#isrTableWrap table.isr-sites-table .isr-linkrole-pill {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  box-sizing: border-box;
}

#isrTableWrap table.isr-sites-table .isr-status-pill {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  box-sizing: border-box;
}

#isrTableWrap table.isr-sites-table .isr-th-pdf,
#isrTableWrap table.isr-sites-table .isr-td-pdf {
  padding: 8px 3px;
}

#isrTableWrap table.isr-sites-table .isr-td-pdf {
  vertical-align: middle;
}

#isrTableWrap .isr-pdf-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel2);
  color: var(--text);
  cursor: pointer;
}

#isrTableWrap .isr-pdf-dl-btn .fa-file-pdf {
  font-size: 0.95rem;
  color: #4ade80;
}

#isrTableWrap .isr-pdf-dl-btn:hover {
  border-color: rgba(34, 199, 199, 0.45);
  background: rgba(34, 199, 199, 0.08);
}

#view-database-isr textarea.input.isr-station-field {
  margin-bottom: 10px;
  min-height: 8.5em;
  max-height: 22em;
  resize: vertical;
  line-height: 1.45;
  box-sizing: border-box;
  font-family: inherit;
}

/* ISR: dua panel + splitter (lebar kiri diset lewat JS) */
.isr-page-grid {
  display: grid;
  gap: 0;
  align-items: start;
  /* grid-template-columns di-set dari tools.isr.js */
}

.isr-grid-splitter {
  width: 100%;
  min-width: 0;
  cursor: col-resize;
  align-self: stretch;
  min-height: 160px;
  border-radius: 5px;
  background: transparent;
  position: relative;
  touch-action: none;
  box-sizing: border-box;
}

.isr-grid-splitter::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 12px;
  bottom: 12px;
  width: 3px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--border);
  opacity: 0.85;
}

.isr-grid-splitter:hover::after,
.isr-grid-splitter:focus-visible::after {
  background: rgba(34, 199, 199, 0.55);
  opacity: 1;
}

body.isr-splitter-dragging {
  cursor: col-resize !important;
  user-select: none !important;
}

@media (max-width: 960px) {
  #isrPageGrid.isr-page-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  #isrPageGrid .isr-grid-splitter {
    display: none;
  }

  #isrPageGrid .isr-grid-left,
  #isrPageGrid .isr-grid-right {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ===== BIS Request ===== */
.bis-page-header-split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bis-page-header-text {
  flex: 1;
  min-width: 200px;
}

.bis-page-header-actions {
  flex-shrink: 0;
  margin-left: auto;
}

.bis-header-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bis-header-toolbar .btn {
  white-space: nowrap;
}

.bis-download-wrap {
  position: relative;
}

.bis-download-wrap .bis-chevron {
  font-size: 10px;
  margin-left: 6px;
  opacity: 0.75;
}

.bis-download-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 200;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bis-download-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.bis-download-item:hover {
  background: var(--panel2);
  border-color: var(--border);
}

@media (max-width: 640px) {
  .bis-page-header-actions {
    margin-left: 0;
    width: 100%;
  }
  .bis-header-toolbar {
    justify-content: stretch;
  }
  .bis-header-toolbar .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.bis-view-pane.hidden {
  display: none !important;
}

.bis-notify-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.bis-notify-btn:hover {
  background: var(--panel);
  border-color: rgba(34, 199, 199, 0.35);
}

.bis-notify-btn.bis-notify-pulse {
  animation: bis-bell-pulse 1.6s ease-in-out infinite;
}

@keyframes bis-bell-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 199, 199, 0); }
  50% { box-shadow: 0 0 0 4px rgba(34, 199, 199, 0.25); }
}

.bis-notify-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.bis-notify-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 340px;
  max-width: min(480px, 96vw);
  max-height: 380px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  z-index: 200;
}

.bis-notify-head {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.bis-notify-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(380px - 44px);
  overflow-y: auto;
  overflow-x: hidden;
}

.bis-notify-list .bis-notify-footer {
  position: sticky;
  bottom: 0;
  background: var(--panel);
  margin: 6px -6px -6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  z-index: 1;
}

.bis-notify-item {
  text-align: left;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.bis-notify-item:hover {
  background: var(--panel2);
  border-color: var(--border);
}

.bis-notify-item-title {
  display: block;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.35;
}

.bis-notify-item-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}

.bis-notify-empty {
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* BIS SLA — peringatan di judul daftar */
.bis-sla-title-wrap {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  vertical-align: middle;
}

.bis-sla-badge {
  display: inline-block;
  font-size: 11px;
  line-height: 1.2;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
}

.bis-sla-yellow {
  background: rgba(234, 179, 8, 0.25);
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.45);
}

.bis-sla-warn-red-inline {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--danger);
  margin-right: 4px;
  vertical-align: middle;
}

/* BIS List: tabel lebih lebar, scroll horizontal di layar sempit */
.bis-list-panel {
  max-width: none;
  width: 100%;
}

.bis-list-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bis-table.bis-table-wide {
  width: 100%;
  min-width: 1520px;
  table-layout: auto;
}

.bis-table {
  font-size: 14px;
  white-space: nowrap;
}

.bis-table th.bis-col-title,
.bis-table td.bis-col-title {
  white-space: normal;
  min-width: 180px;
  max-width: 320px;
  word-break: break-word;
}

.bis-table th,
.bis-table td {
  padding: 14px 18px;
  vertical-align: middle;
  line-height: 1.45;
}

.bis-table thead th {
  font-size: 13px;
  font-weight: 600;
  padding: 12px 18px;
}

.bis-mono {
  font-family: ui-monospace, monospace;
  font-size: 11px;
}

.bis-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.bis-status-open {
  background: rgba(34, 199, 199, 0.15);
  color: #5eead4;
  border: 1px solid rgba(34, 199, 199, 0.35);
}

.bis-status-closed {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  border: 1px solid var(--border);
}

.bis-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.bis-modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.bis-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.bis-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.bis-modal-body {
  padding: 16px;
}

.bis-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

.bis-modal-actions-row {
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.bis-modal-actions-row .btn {
  min-width: 0;
}

.bis-modal-actions-row .btn.bis-delete-btn {
  border-color: rgba(239, 68, 68, 0.45);
  color: var(--danger);
}

.bis-modal-actions-row .btn.bis-delete-btn:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger);
}

.bis-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.bis-detail-full {
  grid-column: 1 / -1;
}

.bis-k {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bis-sla-col {
  white-space: nowrap;
  font-size: 12px;
}

td.bis-sla-cell {
  font-size: 12px;
  vertical-align: middle;
}

.bis-sla-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.bis-sla-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
  margin-top: 4px;
  max-width: 220px;
}

.bis-sla-bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
}

.bis-sla-bar.bis-sla-bar-warn > span {
  background: #eab308;
}

.bis-sla-bar.bis-sla-bar-danger > span {
  background: var(--danger);
}

/* SOP Bring-In-Service — collapsible di halaman BIS SLA Report */
details.bis-sla-sop-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  background: rgba(148, 163, 184, 0.06);
  margin-bottom: 18px;
  overflow: hidden;
}

details.bis-sla-sop-details > summary.bis-sla-sop-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 40px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  user-select: none;
  position: relative;
}

details.bis-sla-sop-details > summary.bis-sla-sop-summary:focus {
  outline: none;
}

details.bis-sla-sop-details > summary.bis-sla-sop-summary:focus-visible {
  box-shadow: inset 0 0 0 2px var(--accent);
  border-radius: var(--radius-sm, 12px);
}

details.bis-sla-sop-details > summary.bis-sla-sop-summary::-webkit-details-marker {
  display: none;
}

details.bis-sla-sop-details > summary.bis-sla-sop-summary::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.2s ease;
}

details.bis-sla-sop-details[open] > summary.bis-sla-sop-summary::after {
  transform: translateY(-15%) rotate(-135deg);
}

.bis-sla-sop-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.bis-sla-sop-sub {
  font-size: 12px;
  line-height: 1.4;
  font-weight: normal;
}

.bis-sla-sop-inner {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--border);
}

.bis-sla-sop-inner .bis-report-definitions {
  margin-bottom: 0;
  margin-top: 4px;
  border: none;
  background: transparent;
  padding: 8px 0 0;
}

.bis-report-definitions {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  padding: 12px 14px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  margin-bottom: 16px;
}

.bis-report-definitions dt {
  font-weight: 600;
  color: var(--text);
  margin-top: 10px;
}

.bis-report-definitions dt:first-child {
  margin-top: 0;
}

.bis-report-definitions dd {
  margin: 4px 0 0 0;
  padding: 0;
}

/* BIS SLA Report — panel & tabel per user */
.bis-sla-report-body {
  padding: 18px 20px 22px;
}

.bis-sla-report-content {
  max-width: 100%;
}

.bis-sla-report-content .bis-report-kpi-grid {
  margin-bottom: 28px;
}

.bis-sla-report-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.bis-sla-report-section-title:first-of-type {
  margin-top: 8px;
}

.bis-sla-report-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  background: var(--panel, var(--panel2));
  -webkit-overflow-scrolling: touch;
}

table.bis-sla-report-table {
  width: 100%;
  min-width: 880px;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

table.bis-sla-report-table thead th {
  text-align: right;
  padding: 14px 18px 12px;
  font-weight: 600;
  color: var(--text);
  vertical-align: bottom;
  line-height: 1.35;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

table.bis-sla-report-table thead th.bis-sla-col-user {
  text-align: left;
  padding-left: 20px;
  min-width: 11rem;
  max-width: 22rem;
  white-space: normal;
}

table.bis-sla-report-table tbody td {
  text-align: right;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

table.bis-sla-report-table tbody td.bis-sla-col-user {
  text-align: left;
  padding-left: 20px;
  font-variant-numeric: normal;
  word-break: break-word;
}

table.bis-sla-report-table tbody tr:last-child td {
  border-bottom: none;
}

a.bis-sla-ticket-timeline-link {
  color: var(--link, #3b82f6);
  font-weight: 600;
  text-decoration: none;
}

a.bis-sla-ticket-timeline-link:hover {
  text-decoration: underline;
}

.bis-sla-lifelines-legend {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
  font-size: 13px;
}

.bis-sla-lifeline-row:hover {
  background: color-mix(in srgb, var(--accent, #3b82f6) 8%, transparent);
}

table.bis-sla-report-table thead th.bis-sla-col-metric,
table.bis-sla-report-table tbody td.bis-sla-col-metric {
  min-width: 6.5rem;
  padding-left: 22px;
  padding-right: 22px;
}

/* ITSM ticket list — reuse BIS SLA Report table chrome */
.bis-ticket-list-panel .bis-ticket-list-table-wrap {
  max-height: 65vh;
  overflow-y: auto;
  margin-top: 12px;
}

table.bis-sla-report-table.bis-ticket-list-table {
  min-width: 1020px;
}

tr.bis-sla-user-row-click {
  cursor: pointer;
}

tr.bis-sla-user-row-click:hover td {
  background: color-mix(in srgb, var(--accent, #3b82f6) 12%, transparent);
}

tr.bis-sla-user-row-click:focus-visible {
  outline: 2px solid var(--accent, #3b82f6);
  outline-offset: -2px;
}

/* Skor SLA linear (0–100%, plafon 100%) */
.bis-sla-linear-score {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bis-sla-linear-full {
  color: var(--success, #22c55e);
}

.bis-sla-linear-good {
  color: #84cc16;
}

.bis-sla-linear-warn {
  color: #eab308;
}

.bis-sla-linear-bad {
  color: var(--danger, #ef4444);
}

/* BIS list: timeline column (NSO / DEV / SuperUser) */
.bis-table.bis-hide-timeline .bis-timeline-th,
.bis-table.bis-hide-timeline .bis-timeline-cell {
  display: none !important;
}

.bis-timeline-th {
  width: 2.75rem;
  text-align: center !important;
  vertical-align: middle !important;
}

.bis-timeline-cell {
  text-align: center !important;
  vertical-align: middle !important;
  width: 2.75rem;
}

.bis-timeline-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--accent, #3b82f6);
  border-radius: 8px;
  text-decoration: none;
}

.bis-timeline-icon-btn:hover {
  background: color-mix(in srgb, var(--accent, #3b82f6) 14%, transparent);
  color: var(--accent, #60a5fa);
}

.bis-timeline-bis-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bis-timeline-bis-link:hover {
  color: var(--accent, #3b82f6);
}

.bis-timeline-inline-link {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent, #3b82f6);
  text-decoration: none;
}

.bis-timeline-inline-link:hover {
  text-decoration: underline;
}

/* Location Database — wide dropdown + responsive add form */
#view-database-location .location-db-add-row {
  display: grid;
  grid-template-columns: minmax(320px, 3.2fr) minmax(150px, 1.1fr) minmax(120px, 0.9fr) minmax(120px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
}

#view-database-location .location-db-select-wide {
  width: 100%;
  min-width: 300px;
  max-width: 100%;
  font-size: 14px;
  padding: 10px 12px;
  line-height: 1.4;
}

#view-database-location .location-db-select-wide option {
  font-size: 14px;
  padding: 6px 4px;
}

@media (max-width: 960px) {
  #view-database-location .location-db-add-row {
    grid-template-columns: 1fr;
  }

  #view-database-location .location-db-select-wide {
    min-width: 0;
  }
}

/* Location Database — KPI cards as filters */
#view-database-location .location-db-kpi .location-db-kpi-filter {
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

#view-database-location .location-db-kpi .location-db-kpi-filter:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #0d9488) 45%, transparent);
}

#view-database-location .location-db-kpi .location-db-kpi-filter.location-db-kpi-active {
  box-shadow: 0 0 0 2px var(--accent, #0d9488);
  border-color: var(--accent, #0d9488);
}

#view-database-location .location-db-kpi .location-db-kpi-filter:focus-visible {
  outline: 2px solid var(--accent, #0d9488);
  outline-offset: 2px;
}

#view-database-location .location-db-map-launch {
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

#view-database-location .location-db-map-launch:hover {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #0d9488) 45%, transparent);
}

#view-database-location .location-db-map-launch:focus-visible {
  outline: 2px solid var(--accent, #0d9488);
  outline-offset: 2px;
}

#view-database-location-map .location-map-tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

#view-database-location-map .location-map-tab-row .btn {
  flex: 1;
  font-size: 12px;
  padding: 8px 10px;
}

#view-database-location-map .location-map-panel.hidden {
  display: none !important;
}

/* Location map — list sidebar + map (theme: .panel / .box) */
/* Home / All Devices — per-brand filter cards grid (summary Total Brand / Total Devices Model lives in separate section) */
.home-brand-unified-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* Home — Capacity parent-category snapshot */
.home-capacity-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.home-capacity-summary-link {
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.home-capacity-summary-link:hover {
  text-decoration: underline;
  color: var(--accent, #0d9488);
}

.home-capacity-summary-period {
  font-size: 12px;
  margin-bottom: 10px;
}

.home-capacity-summary-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

#view-home .home-capacity-parent-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  border-left-width: 4px;
  border-left-style: solid;
  min-height: 138px;
  gap: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

#view-home .home-capacity-parent-title {
  width: 100%;
  margin-bottom: 0;
}

#view-home .home-capacity-parent-card[data-cap-report-href] {
  cursor: pointer;
}

#view-home .home-capacity-parent-card[data-cap-report-href]:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.36);
}

#view-home .home-capacity-parent-card[data-cap-report-href]:focus-visible {
  outline: 2px solid var(--accent, #0d9488);
  outline-offset: 2px;
}

#view-home .home-capacity-parent-util {
  width: 100%;
  text-align: center;
  font-size: clamp(1.35rem, 3.5vw, 1.65rem);
  font-weight: 700;
  line-height: 1.2;
  margin-top: auto;
  margin-bottom: auto;
}

#view-home .home-capacity-parent-sub {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.35;
}

.home-capacity-miss-count {
  font-weight: 400;
  opacity: 0.85;
  font-size: 11px;
}

#view-home .home-capacity-parent-card.home-capacity-tier--green {
  border-left: 3px solid #22c55e;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.08)),
    rgba(15, 23, 42, 0.8);
}

#view-home .home-capacity-parent-card.home-capacity-tier--yellow {
  border-left: 3px solid #eab308;
  background:
    linear-gradient(180deg, rgba(234, 179, 8, 0.2), rgba(234, 179, 8, 0.08)),
    rgba(15, 23, 42, 0.8);
}

#view-home .home-capacity-parent-card.home-capacity-tier--red {
  border-left: 3px solid #ef4444;
  background:
    linear-gradient(180deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.08)),
    rgba(15, 23, 42, 0.8);
}

/* Pastikan tier tetap terlihat meski tema insight/minimal override .kpi-card */
body.insight-style #view-home .home-capacity-parent-card.home-capacity-tier--green {
  border-left-color: #22c55e !important;
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.24), rgba(34, 197, 94, 0.12)) !important;
}

body.insight-style #view-home .home-capacity-parent-card.home-capacity-tier--yellow {
  border-left-color: #eab308 !important;
  background:
    linear-gradient(180deg, rgba(234, 179, 8, 0.24), rgba(234, 179, 8, 0.12)) !important;
}

body.insight-style #view-home .home-capacity-parent-card.home-capacity-tier--red {
  border-left-color: #ef4444 !important;
  background:
    linear-gradient(180deg, rgba(239, 68, 68, 0.24), rgba(239, 68, 68, 0.12)) !important;
}

body.theme-light #view-home .home-capacity-tier--green {
  border-left-color: #16a34a;
}

body.theme-light #view-home .home-capacity-tier--yellow {
  border-left-color: #ca8a04;
}

body.theme-light #view-home .home-capacity-tier--red {
  border-left-color: #dc2626;
}

/* Smart card Detail Location — ikon peta besar, di tengah kartu */
#view-home .detail-location-map-card,
#view-all-devices .detail-location-map-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  min-height: 112px;
}

#view-home .detail-location-map-card .kpi-label,
#view-all-devices .detail-location-map-card .kpi-label {
  margin-bottom: 0;
}

#view-home .detail-location-map-card .detail-location-map-card-icon,
#view-all-devices .detail-location-map-card .detail-location-map-card-icon {
  font-size: clamp(2.125rem, 5.5vw, 3rem);
  font-weight: 600;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#view-home .detail-location-map-card .detail-location-map-card-icon i,
#view-all-devices .detail-location-map-card .detail-location-map-card-icon i {
  line-height: 1;
}

#view-home .home-embed-map-canvas {
  width: 100%;
  height: min(56vh, 540px);
  min-height: 300px;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

#view-database-location .location-db-embed-map-canvas {
  width: 100%;
  height: min(52vh, 520px);
  min-height: 300px;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

body.theme-light #view-home .home-embed-map-canvas,
body.theme-light #view-database-location .location-db-embed-map-canvas {
  background: #f8fafc;
}

#view-database-location-map .location-map-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

#view-database-location-map .location-map-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: min(72vh, 720px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
  box-sizing: border-box;
}

#view-database-location-map .location-map-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

@media (min-width: 900px) {
  #view-database-location-map .location-map-layout {
    flex-direction: row;
    align-items: stretch;
    gap: 16px;
  }

  #view-database-location-map .location-map-sidebar {
    flex: 0 0 clamp(320px, 34vw, 400px);
    max-width: 420px;
    max-height: min(90vh, 960px);
    align-self: stretch;
  }
}

#view-database-location-map .location-map-picker-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

#view-database-location-map .location-map-picker-head .btn {
  font-size: 12px;
  padding: 7px 8px;
}

#view-database-location-map .location-map-google-wrap {
  margin-top: 0;
}

#view-database-location-map .location-map-google-iframe {
  width: 100%;
  height: min(300px, 32vh);
  min-height: 260px;
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: var(--panel, rgba(255, 255, 255, 0.04));
}

/* Location map (Leaflet) — tall canvas for readable map tiles */
#view-database-location-map .location-map-canvas {
  width: 100%;
  flex: 1;
  height: min(82vh, 880px);
  min-height: min(420px, 70vh);
  border-radius: var(--radius, 12px);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: var(--shadow);
}

@media (min-width: 900px) {
  #view-database-location-map .location-map-canvas {
    min-height: 480px;
  }
}

body.theme-light #view-database-location-map .location-map-canvas {
  background: rgba(255, 255, 255, 0.55);
}

#view-database-location-map .location-map-canvas .leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 12px;
  font-family: inherit;
  z-index: 1;
}

#view-home .home-embed-map-canvas .leaflet-container,
#view-database-location .location-db-embed-map-canvas .leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 12px;
  font-family: inherit;
  z-index: 1;
}

/* Leaflet popup: force readable dark text (global dark theme was making links/body white on white) */
#view-database-location-map .leaflet-popup-content-wrapper {
  background: #fff !important;
  color: #111 !important;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

#view-database-location-map .leaflet-popup-tip {
  background: #fff !important;
}

#view-database-location-map .leaflet-popup-content {
  margin: 12px 14px 12px 16px !important;
  color: #111 !important;
  font-size: 14px;
  line-height: 1.45;
}

#view-database-location-map .leaflet-popup-content strong {
  color: #111 !important;
}

#view-database-location-map .leaflet-popup-content a {
  color: #0b57d0 !important;
}

#view-database-location-map .leaflet-popup-content a:hover {
  color: #0842a0 !important;
  text-decoration: underline;
}

#view-database-location-map .location-map-popup-inner {
  color: #111 !important;
}

#view-database-location-map .location-map-popup-inner strong {
  color: #111 !important;
  font-weight: 600;
}

#view-database-location-map .location-map-popup-inner a {
  color: #0b57d0 !important;
}

#view-database-location-map .location-map-popup-inner .location-map-show-devices-btn {
  font-size: 12px;
  padding: 6px 10px;
}

#view-database-location-map .location-map-dev-host-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

#view-database-location-map .location-map-dev-host-list li {
  margin: 0;
  padding: 4px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  line-height: 1.3;
}

#view-database-location-map .location-map-dev-host-list li:last-child {
  border-bottom: none;
}

#view-database-location-map .location-map-dev-host-list a {
  display: block;
  word-break: break-word;
}

/* Device popup: daftar device 1 kolom, scroll vertikal, lebar mengikuti konten (tidak melebar ke samping) */
#view-home .leaflet-popup.location-map-device-popup,
#view-database-location .leaflet-popup.location-map-device-popup,
#view-database-location-map .leaflet-popup.location-map-device-popup {
  max-width: min(98vw, 680px);
}

/* Show devices: fit-content, dibatasi supaya tetap vertikal / tidak selebar layar */
#view-home .leaflet-popup.location-map-device-popup:has(.location-map-popup-expanded) .leaflet-popup-content-wrapper,
#view-database-location .leaflet-popup.location-map-device-popup:has(.location-map-popup-expanded) .leaflet-popup-content-wrapper,
#view-database-location-map .leaflet-popup.location-map-device-popup:has(.location-map-popup-expanded) .leaflet-popup-content-wrapper {
  width: fit-content !important;
  max-width: min(98vw, 680px) !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

#view-home .leaflet-popup.location-map-device-popup:has(.location-map-popup-expanded) .leaflet-popup-content,
#view-database-location .leaflet-popup.location-map-device-popup:has(.location-map-popup-expanded) .leaflet-popup-content,
#view-database-location-map .leaflet-popup.location-map-device-popup:has(.location-map-popup-expanded) .leaflet-popup-content {
  width: fit-content !important;
  max-width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
}

#view-home .location-map-popup-device .location-map-popup-cols,
#view-database-location .location-map-popup-device .location-map-popup-cols,
#view-database-location-map .location-map-popup-device .location-map-popup-cols {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}

#view-home .location-map-popup-device.location-map-popup-expanded,
#view-database-location .location-map-popup-device.location-map-popup-expanded,
#view-database-location-map .location-map-popup-device.location-map-popup-expanded {
  width: max-content;
  max-width: 100%;
}

#view-home .location-map-popup-device.location-map-popup-expanded .location-map-popup-cols,
#view-database-location .location-map-popup-device.location-map-popup-expanded .location-map-popup-cols,
#view-database-location-map .location-map-popup-device.location-map-popup-expanded .location-map-popup-cols {
  width: max-content;
  max-width: 100%;
}

#view-home .location-map-popup-device .location-map-popup-col-main,
#view-database-location .location-map-popup-device .location-map-popup-col-main,
#view-database-location-map .location-map-popup-device .location-map-popup-col-main {
  flex: 0 0 auto;
  min-width: 0;
  max-width: 300px;
}

#view-home .location-map-popup-device .location-map-popup-col-devices,
#view-database-location .location-map-popup-device .location-map-popup-col-devices,
#view-database-location-map .location-map-popup-device .location-map-popup-col-devices {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  overflow: visible;
  margin: 0 0 0 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}

#view-home .location-map-popup-device.location-map-popup-expanded .location-map-popup-col-devices,
#view-database-location .location-map-popup-device.location-map-popup-expanded .location-map-popup-col-devices,
#view-database-location-map .location-map-popup-device.location-map-popup-expanded .location-map-popup-col-devices {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(78vw, 380px);
}

#view-home .location-map-popup-device .location-map-popup-col-devices[hidden],
#view-database-location .location-map-popup-device .location-map-popup-col-devices[hidden],
#view-database-location-map .location-map-popup-device .location-map-popup-col-devices[hidden] {
  display: none !important;
}

#view-home .location-map-popup-device .location-map-dev-host-list,
#view-database-location .location-map-popup-device .location-map-dev-host-list,
#view-database-location-map .location-map-popup-device .location-map-dev-host-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, auto);
  row-gap: 10px;
  column-gap: 0;
  align-items: start;
  align-content: start;
  justify-content: stretch;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2px 6px 4px 0;
  list-style: none;
  font-size: 13px;
  line-height: 1.45;
  /* ±10 baris terlihat, sisanya scroll ke bawah; tinggi ikut isi jika < 10 item */
  max-height: min(50vh, calc(10 * (1.45em + 6px) + 9 * 10px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#view-home .location-map-popup-device .location-map-dev-host-list li,
#view-database-location .location-map-popup-device .location-map-dev-host-list li,
#view-database-location-map .location-map-popup-device .location-map-dev-host-list li {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

#view-home .location-map-popup-device .location-map-dev-host-list a,
#view-database-location .location-map-popup-device .location-map-dev-host-list a,
#view-database-location-map .location-map-popup-device .location-map-dev-host-list a {
  display: block;
  min-width: 0;
  padding: 3px 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.45;
}

/* Same popup readability for embedded location maps */
#view-home .leaflet-popup-content-wrapper,
#view-database-location .leaflet-popup-content-wrapper {
  background: #fff !important;
  color: #111 !important;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

#view-home .leaflet-popup-tip,
#view-database-location .leaflet-popup-tip {
  background: #fff !important;
}

#view-home .leaflet-popup-content,
#view-database-location .leaflet-popup-content {
  margin: 12px 14px 12px 16px !important;
  color: #111 !important;
  font-size: 14px;
  line-height: 1.45;
}

#view-home .leaflet-popup-content a,
#view-all-devices .leaflet-popup-content a,
#view-database-location .leaflet-popup-content a {
  color: #0b57d0 !important;
}

#view-home .location-map-popup-inner a,
#view-database-location .location-map-popup-inner a {
  color: #0b57d0 !important;
}

#view-database-location-map .leaflet-popup-close-button {
  color: #333 !important;
  font-weight: 700;
}

#view-database-location-map .leaflet-popup-close-button:hover {
  color: #000 !important;
}

#view-database-location-map .location-map-search-wrap {
  display: flex;
  justify-content: stretch;
  margin-bottom: 8px;
}

#view-database-location-map .location-map-search {
  width: 100%;
  max-width: none;
  text-align: left;
}

#view-database-location-map .location-map-search::placeholder {
  text-align: left;
}

#view-database-location-map .location-map-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 96px;
  max-height: min(220px, 30vh);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius, 12px);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

body.theme-light #view-database-location-map .location-map-checkboxes {
  background: rgba(255, 255, 255, 0.75);
}

@media (min-width: 900px) {
  #view-database-location-map .location-map-checkboxes {
    max-height: none;
    flex: 1 1 0;
    min-height: 120px;
  }
}

/* One row per location: [checkbox] [label text] — not stacked vertically */
#view-database-location-map .location-map-checkboxes label.chk {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
  padding: 5px 6px;
  border: none;
  border-radius: var(--radius-sm, 12px);
  background: transparent;
  color: var(--text);
}

#view-database-location-map .location-map-checkboxes label.chk:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.theme-light #view-database-location-map .location-map-checkboxes label.chk:hover {
  background: rgba(0, 24, 73, 0.06);
}

#view-database-location-map .location-map-checkboxes label.chk input {
  margin: 0;
  flex: 0 0 auto;
}

#view-database-location-map .location-map-checkboxes label.chk span {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

#view-database-location-map .location-map-checkboxes label.chk.location-map-chk-hidden {
  display: none !important;
}

/* Checkbox: avoid solid white fill from global input styles */
#view-database-location-map .location-map-checkboxes input[type="checkbox"] {
  width: 1.15em;
  height: 1.15em;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent, #0d9488);
  background-color: transparent !important;
  color: inherit;
}

/* Admin → Settings → Maintenance: per route (submenu), grouped by tool category */
.admin-maint-tree-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  min-width: 0;
  /* Page scroll (main-content) handles height — nested max-height + overflow here
     clipped expanded <details> bodies and looked “cut off” when opening groups. */
}

.admin-maint-category-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.admin-maint-category-details[open] {
  overflow: visible;
  box-shadow: 0 0 0 1px rgba(13, 148, 136, 0.12);
}

.admin-maint-category-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.admin-maint-category-summary::-webkit-details-marker {
  display: none;
}

.admin-maint-summary-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  min-width: 0;
}

.admin-maint-route-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  font-family: ui-monospace, system-ui, sans-serif;
}

.admin-maint-summary-chevron {
  flex-shrink: 0;
  font-size: 12px;
  opacity: 0.65;
  transition: transform 0.2s ease;
}

.admin-maint-category-details[open] .admin-maint-summary-chevron {
  transform: rotate(180deg);
}

.admin-maint-category-body {
  padding: 0 12px 12px;
}

.admin-maint-category-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.admin-maint-category-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.admin-maint-category-actions {
  display: flex;
  gap: 6px;
}

.admin-maint-category-actions .btn {
  padding: 4px 10px;
  font-size: 12px;
}

.admin-maint-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px 16px;
}

.admin-maint-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
}

.admin-maint-item input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--accent, #0d9488);
}

.admin-maint-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.admin-maint-item-title {
  font-weight: 500;
}

.admin-maint-route {
  font-size: 11px;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

/* Global maintenance: block sidebar & extra header actions; keep user menu for profile / log out */
body.nso-global-maintenance #sidebar,
body.nso-global-maintenance .mobile-menu-btn {
  pointer-events: none;
  opacity: 0.65;
}

body.nso-global-maintenance .main-header .main-header-right > *:not(.user-menu-wrap):not(.bis-notify-wrap) {
  pointer-events: none;
  opacity: 0.65;
}

body.nso-global-maintenance .main-header .bis-notify-wrap {
  pointer-events: auto;
  opacity: 1;
}

/* Changelog — rendered Markdown */
.nso-changelog-md {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text, inherit);
}

.nso-changelog-md h1,
.nso-changelog-md h2,
.nso-changelog-md h3 {
  margin: 1.1em 0 0.45em;
  font-weight: 600;
  line-height: 1.25;
}

.nso-changelog-md h1 { font-size: 1.5rem; }
.nso-changelog-md h2 { font-size: 1.25rem; border-bottom: 1px solid var(--border, rgba(255,255,255,0.08)); padding-bottom: 0.25em; }
.nso-changelog-md h3 { font-size: 1.05rem; }

.nso-changelog-md p { margin: 0.65em 0; }
.nso-changelog-md ul,
.nso-changelog-md ol { margin: 0.5em 0 0.5em 1.35em; padding: 0; }
.nso-changelog-md li { margin: 0.25em 0; }

.nso-changelog-md a {
  color: var(--accent, #3b82f6);
  text-decoration: underline;
}

.nso-changelog-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.12em 0.35em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--border, #334155) 35%, transparent);
}

.nso-changelog-md pre {
  overflow: auto;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  background: color-mix(in srgb, var(--border, #334155) 40%, transparent);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
}

.nso-changelog-md pre code {
  padding: 0;
  background: none;
  border-radius: 0;
}

.nso-changelog-md blockquote {
  margin: 0.75em 0;
  padding: 0.35em 0 0.35em 1em;
  border-left: 3px solid var(--accent, #3b82f6);
  color: var(--muted, inherit);
}

.nso-changelog-fallback {
  white-space: pre-wrap;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

/* Admin Server Status */
.admin-server-kpi-row {
  gap: 12px;
}

.admin-server-smart-card {
  position: relative;
  border-radius: 12px;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.admin-server-smart-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

body.theme-light .admin-server-smart-card:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

.admin-server-card-online .kpi-value {
  font-variant-numeric: tabular-nums;
}

.admin-server-card-online-link {
  cursor: pointer;
  color: inherit;
}

.admin-server-card-online-link:hover {
  border-color: rgba(13, 148, 136, 0.35);
}

.admin-server-card-online-link:focus-visible {
  outline: 2px solid var(--accent, #0d9488);
  outline-offset: 3px;
}

.admin-server-card-sub {
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-server-online-wrap {
  min-height: 40px;
}

.admin-server-online-empty {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}

.admin-server-online-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.admin-server-user-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-server-user-card:hover {
  border-color: rgba(13, 148, 136, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.admin-server-user-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.admin-server-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.28), rgba(59, 130, 246, 0.22));
  color: var(--accent, #0d9488);
  flex-shrink: 0;
  font-size: 16px;
}

.admin-server-user-title {
  min-width: 0;
  flex: 1;
}

.admin-server-user-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.admin-server-user-ip {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.admin-server-user-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.admin-server-user-dl > div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
  align-items: start;
}

.admin-server-user-dl dt {
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.admin-server-user-dl dd {
  margin: 0;
  word-break: break-word;
}

.admin-server-user-route {
  font-size: 11px;
}

.admin-server-user-ua-row dd {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}

.admin-server-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.admin-server-chart-box {
  padding: 12px;
}

#adminServerServiceTableWrap table {
  width: 100%;
  border-collapse: collapse;
}

#adminServerServiceTableWrap td,
#adminServerServiceTableWrap th {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

#adminServerPm2TableWrap table {
  width: 100%;
  min-width: 1100px;
  table-layout: auto;
}

#adminServerPm2TableWrap td,
#adminServerPm2TableWrap th {
  white-space: nowrap;
}

/* Admin Settings sub menu */
.admin-settings-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.admin-settings-panel.hidden {
  display: none !important;
}

/* Admin Email notifications sub-tabs */
.admin-email-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.admin-email-panel.hidden {
  display: none !important;
}

/* API Management (admin-api-keys) sub-tabs */
.admin-api-mgmt-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.admin-api-mgmt-panel.hidden {
  display: none !important;
}

/* ===== NSO Hub Journey (Information) ===== */
.nso-journey-mount {
  padding: 8px 12px 24px;
  max-width: 100%;
  margin: 0 auto;
}

.nso-journey {
  position: relative;
}

.nso-journey-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 20px;
}

.nso-journey-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nso-journey-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nso-journey-hero {
  position: relative;
  text-align: center;
  padding: 28px 20px 32px;
  margin-bottom: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(118deg, rgba(45, 90, 105, 0.35) 0%, rgba(30, 58, 72, 0.5) 38%, rgba(34, 180, 198, 0.22) 72%, rgba(94, 234, 212, 0.18) 100%);
  overflow: hidden;
}

.nso-journey-hero__glow {
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(ellipse at 18% 0%, rgba(45, 110, 120, 0.35), transparent 50%),
    radial-gradient(ellipse at 88% 20%, rgba(45, 212, 191, 0.22), transparent 52%);
  pointer-events: none;
}

.nso-journey-title {
  position: relative;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  font-weight: 700;
  margin: 0 auto 8px;
  max-width: 920px;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.nso-journey-sub {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.nso-journey-body {
  margin-top: 20px;
}

.nso-journey-settings-shell {
  margin-top: 8px;
}

.nso-journey-h2 {
  font-size: 1.15rem;
  margin: 28px 0 10px;
  font-weight: 600;
}

.nso-journey-muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 16px;
}

.nso-journey-md p {
  line-height: 1.65;
  margin: 0 0 14px;
  color: var(--text);
  font-size: 14px;
}

.nso-journey-prose-h2 {
  margin-top: 32px;
}

.nso-journey-prose .nso-journey-prose-h2:first-of-type {
  margin-top: 22px;
}

.nso-journey-benefits-ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.nso-journey-benefits-ol > li {
  margin-bottom: 18px;
}

.nso-journey-benefits-ol > li:last-child {
  margin-bottom: 8px;
}

.nso-journey-benefit-title {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.nso-journey-benefit-ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-weight: 400;
}

.nso-journey-benefit-ul li {
  margin-bottom: 6px;
}

.nso-journey-forward-ul {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.nso-journey-forward-ul li {
  margin-bottom: 8px;
}

/* Infographic: horizontal alternating timeline (central spine + nodes + callouts) */
.nso-journey-ig-wrap {
  margin-top: 8px;
}

.nso-journey-ig {
  margin-top: 8px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(900px 320px at 50% 45%, rgba(12, 74, 110, 0.2), transparent 72%),
    var(--panel);
  overflow: visible;
}

.nso-journey-ig-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  border-radius: inherit;
}

.nso-journey-ig-scroller {
  --nso-ig-pad-y: 16px;
  --nso-ig-row1: 228px;
  --nso-ig-row2: 112px;
  --nso-ig-row3: 228px;
  position: relative;
  padding: var(--nso-ig-pad-y) 0 22px;
  min-width: min-content;
}

.nso-journey-ig-spine {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--nso-ig-pad-y) + var(--nso-ig-row1) + var(--nso-ig-row2) / 2 - 3px);
  height: 7px;
  border-radius: 4px;
  z-index: 0;
  pointer-events: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 2px 14px rgba(0, 0, 0, 0.35);
}

.nso-journey-ig-cols {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  min-width: min-content;
  padding: 0 6px;
}

.nso-journey-ig-col {
  flex: 0 0 208px;
  width: 208px;
  min-width: 176px;
  display: grid;
  grid-template-rows: var(--nso-ig-row1) var(--nso-ig-row2) var(--nso-ig-row3);
  align-items: stretch;
}

.nso-journey-ig-cell--r1,
.nso-journey-ig-cell--r3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 0;
  overflow: visible;
}

.nso-journey-ig-col--bottom .nso-journey-ig-cell--r1 {
  justify-content: flex-start;
}

.nso-journey-ig-col--bottom .nso-journey-ig-cell--r3 {
  justify-content: flex-start;
}

.nso-journey-ig-cell--r2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.nso-journey-ig-axis {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nso-journey-ig-node {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ig-n1, #fb923c), var(--ig-n2, #ea580c));
  /* rgba only — html2canvas cannot parse color-mix() */
  box-shadow:
    0 0 0 3px rgba(15, 23, 42, 0.92),
    0 0 0 5px rgba(45, 212, 191, 0.22),
    0 3px 12px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.nso-journey-ig-pill {
  max-width: 198px;
  padding: 6px 12px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  line-height: 1.25;
  text-align: center;
  color: #f8fafc;
  background: linear-gradient(180deg, var(--ig-p1, #1e3a5f) 0%, var(--ig-p2, #0f172a) 100%);
  border: 1px solid rgba(248, 250, 252, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  word-break: break-word;
}

.nso-journey-ig-axis-date {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nso-journey-ig-connector {
  width: 3px;
  flex: 1 1 36px;
  min-height: 28px;
  max-height: 88px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--ig-c1, #94a3b8), var(--ig-c2, #475569));
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.22);
}

.nso-journey-ig-connector--down {
  margin-top: 6px;
  margin-bottom: 0;
}

.nso-journey-ig-connector--up {
  margin-bottom: 6px;
  margin-top: 0;
  background: linear-gradient(0deg, var(--ig-c1, #94a3b8), var(--ig-c2, #475569));
}

.nso-journey-ig-card {
  width: 100%;
  padding: 0 6px;
}

.nso-journey-ig-card__inner {
  padding: 12px 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ig-cbd, var(--border));
  background: linear-gradient(
    152deg,
    var(--ig-cb, rgba(255, 255, 255, 0.04)) 0%,
    rgba(45, 212, 191, 0.09) 45%,
    var(--panel2) 88%
  );
  box-shadow: var(--shadow);
  border-left-width: 4px;
  border-left-color: var(--ig-n1, var(--accent));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.nso-journey-ig-card__inner[role="button"] {
  cursor: pointer;
  text-align: left;
}

.nso-journey-ig-card__inner[role="button"]:focus-visible {
  outline: 2px solid var(--accent, #22d3ee);
  outline-offset: 2px;
}

.nso-journey-ig-card__inner:hover {
  transform: translateY(-2px);
  border-color: var(--ig-cbd, rgba(34, 199, 199, 0.45));
  box-shadow: var(--shadow-lg);
}

.nso-journey-ig-card__title {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  font-weight: 600;
}

.nso-journey-ig-card__list {
  margin: 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
}

.nso-journey-ig-card__list li {
  margin-bottom: 6px;
}

.nso-journey-ig-card__list li:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .nso-journey-ig-scroller {
    --nso-ig-pad-y: 12px;
    --nso-ig-row1: 190px;
    --nso-ig-row2: 100px;
    --nso-ig-row3: 190px;
  }

  .nso-journey-ig-col {
    flex-basis: 172px;
    width: 172px;
    min-width: 158px;
  }
}

.nso-journey-thanks {
  margin: 28px 0 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.nso-journey-footer {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.nso-journey-footer.nso-journey-footer--brand {
  margin-top: 32px;
  padding-top: 0;
  border-top: none;
}

.nso-journey-closing {
  margin: 0 0 12px;
  font-size: 14px;
}

.nso-journey-contacts {
  margin: 0 0 20px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.nso-journey-contacts a {
  color: var(--accent);
}

.nso-journey-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nso-journey-logo {
  flex-shrink: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel2);
}

.nso-journey-copy {
  font-size: 12px;
  color: var(--muted);
}

.nso-journey-settings .nso-journey-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 16px 0;
  background: var(--panel);
}

.nso-journey-settings legend {
  padding: 0 8px;
  font-weight: 600;
  font-size: 14px;
}

.nso-journey-radio {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
}

.nso-journey-radio:last-of-type {
  margin-bottom: 0;
}

.nso-journey-radio input {
  margin-top: 3px;
  flex-shrink: 0;
}

.nso-journey-lock {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0 4px;
  cursor: default;
}

.nso-journey-settings-status {
  min-height: 1.2em;
  font-size: 13px;
  margin: 12px 0 10px;
}

/* CS Response Generator — Generate / History tabs */
.cs-dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.cs-dashboard-tabs .cs-tab-btn:not(.primary) {
  opacity: 0.85;
}

.cs-tab-panel.hidden {
  display: none !important;
}

.cs-history-list {
  margin-top: 8px;
}

/* Maintenance Pong (global/menu maintenance) */
.maint-pong-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) minmax(260px, 1fr);
  gap: 12px;
}

.maint-pong-game,
.maint-pong-lb {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--panel2);
}

#maintPongCanvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b1220;
}

#maintPongVsCanvas {
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b1220;
}

.maint-pong-tools {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pong-lb-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
  border-bottom: 1px dashed var(--border);
  padding: 7px 0;
  align-items: center;
  font-size: 13px;
}

.pong-lb-row:last-child {
  border-bottom: none;
}

.pong-rank {
  color: var(--muted);
  font-weight: 700;
}

.pong-score {
  font-weight: 700;
  color: #22d3ee;
}

.pong-user-link {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0;
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
}

.pong-user-link:hover {
  color: #22d3ee;
}

.pong-when {
  grid-column: 2 / 4;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .maint-pong-grid {
    grid-template-columns: 1fr;
  }
}

/* Home easter egg: Konami modal + snake */
.konami-modal {
  max-width: 1180px;
  width: min(98vw, 1180px);
}

.konami-wrap {
  position: relative;
  overflow: hidden;
}

.konami-fx-canvas {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  max-height: 220px;
  pointer-events: none;
  z-index: 0;
}

.konami-head,
.konami-grid {
  position: relative;
  z-index: 1;
}

.konami-title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 800;
}

.konami-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.konami-sub.konami-sub--lead {
  font-size: 18px;
  color: var(--text);
}

.konami-sub.konami-sub--timing {
  font-size: 18px;
  color: var(--text);
}

.konami-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 18px;
}

.konami-game {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--panel2);
}

.konami-snake-canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0b1220;
}

.konami-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.konami-leaderboard {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--panel2);
  min-height: 220px;
}

.konami-lb-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 8px;
  align-items: center;
  border-bottom: 1px dashed var(--border);
  padding: 7px 0;
  font-size: 13px;
}

.konami-lb-row:last-child {
  border-bottom: none;
}

.konami-rank {
  color: var(--muted);
  font-weight: 700;
}

.konami-date {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 920px) {
  .konami-grid {
    grid-template-columns: 1fr;
  }
}

/* Register — email verification */
.register-verify-banner {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.12) !important;
  color: var(--text, #e5e7eb) !important;
}

.register-post-verify {
  padding: 0 0 1rem;
}

.register-post-verify__lead {
  margin-bottom: 0.75rem;
  line-height: 1.45;
}