/* ==========================================================================
   Enterprise Application Portal — design system
   Tema terang/gelap, komponen portal, dan halaman login.
   ========================================================================== */

/* ---------- Token ---------- */

:root {
  --bg: #f2f4f7;
  --bg-soft: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f5;
  --border: #e3e7ee;
  --border-strong: #d3d9e3;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #8a93a3;
  --accent: #0f9f6e;
  --accent-2: #0b8a8f;
  --accent-soft: rgba(15, 159, 110, 0.1);
  --ring: rgba(15, 159, 110, 0.18);
  --danger: #dc2626;
  --warn: #b45309;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 18px 40px -24px rgba(16, 24, 40, 0.35);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, 0.28);
  --radius: 16px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0b0e14;
  --bg-soft: #0d1118;
  --surface: #121722;
  --surface-2: #161c28;
  --surface-3: #1b2230;
  --border: #232b3a;
  --border-strong: #2e384b;
  --text: #e9eef7;
  --text-2: #b3bdcf;
  --muted: #8591a5;
  --accent: #2dd4a3;
  --accent-2: #37c2c7;
  --accent-soft: rgba(45, 212, 163, 0.12);
  --ring: rgba(45, 212, 163, 0.16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 20px 44px -22px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 26px 70px -20px rgba(0, 0, 0, 0.85);
}

/* ---------- Dasar ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1100px 540px at 8% -12%, rgba(15, 159, 110, 0.09), transparent 62%),
    radial-gradient(900px 520px at 108% 4%, rgba(47, 107, 255, 0.07), transparent 58%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#main {
  flex: 1 0 auto;
}

[data-theme="dark"] body {
  background:
    radial-gradient(1000px 520px at 8% -12%, rgba(45, 212, 163, 0.08), transparent 62%),
    radial-gradient(900px 520px at 108% 4%, rgba(79, 70, 229, 0.1), transparent 58%),
    var(--bg);
  background-attachment: fixed;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input {
  font: inherit;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.14em 0.42em;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--text-2);
  white-space: nowrap;
}

svg {
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-soft);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.noscript {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: 90vw;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: 12.5px;
  color: var(--text-2);
}

/* ---------- Topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.mark-glyph {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, #1fb877, #0c8f86);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(15, 159, 110, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.mark-glyph svg {
  width: 26px;
  height: 26px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand-text span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 420px;
  height: 40px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 4px var(--ring);
  background: var(--surface);
}

.search .icon {
  width: 16px;
  height: 16px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.search kbd {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
}

.search-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 70;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text);
}

.search-item:hover,
.search-item.is-active {
  background: var(--surface-2);
}

.search-item .si-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.search-item .si-icon .icon {
  width: 15px;
  height: 15px;
}

.search-item .si-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.search-item .si-text strong {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item .si-text span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item .si-kind {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  flex: none;
}

.search-empty {
  padding: 14px 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.topnav a {
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.topnav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.topnav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}

.theme-toggle button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border-radius: 6px;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}

.theme-toggle button:hover {
  color: var(--text);
}

.theme-toggle button.is-active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.theme-toggle .icon {
  width: 14px;
  height: 14px;
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-btn:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, #1fb877, #0c8f86);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
  max-width: 130px;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  font-size: 10px;
  color: var(--muted);
}

.user-btn > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  width: 232px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.menu-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
}

.menu-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.menu-sub {
  font-size: 11px;
  color: var(--muted);
}

.menu-panel a,
.menu-panel button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
}

.menu-panel a:hover,
.menu-panel button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.menu-panel .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.menu-panel .danger {
  color: var(--danger);
}

.menu-panel .danger .icon {
  color: var(--danger);
}

.menu-sep {
  height: 1px;
  margin: 5px 6px;
  background: var(--border);
}

/* ---------- Halaman & layout ---------- */

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 28px 64px;
}

.page--narrow {
  max-width: 980px;
}

.page--wide {
  max-width: 1120px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding: 10px 0 30px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow .pulse {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.eyebrow .pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.5;
  animation: pulse 2.4s ease-out infinite;
}

.hero h1 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.hero h1 span {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 620px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-2);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta .icon {
  width: 14px;
  height: 14px;
}

.sep {
  color: var(--border-strong);
}

.hero-stats {
  display: flex;
  gap: 0;
  padding: 4px 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 22px;
  min-width: 118px;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat-value {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-label {
  font-size: 10.5px;
  color: var(--muted);
}

.section {
  margin-top: 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-head p {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.link-arrow .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.link-arrow:hover .icon {
  transform: translateX(2px);
}

/* ---------- Kartu aplikasi ---------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 18px;
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent), transparent 72%);
}

.app-card--blue {
  --card-accent: #2f6bff;
  --card-tint: rgba(47, 107, 255, 0.08);
}

.app-card--emerald {
  --card-accent: #0f9f6e;
  --card-tint: rgba(15, 159, 110, 0.09);
}

.app-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--card-accent) 30%, var(--border));
  box-shadow: var(--shadow-md);
}

.app-top {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.app-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border: 1px solid transparent;
  flex: none;
}

.app-icon--sales {
  background: linear-gradient(150deg, #e5eeff, #f6faff);
  border-color: #d5e2ff;
}

.app-icon--accounting {
  background: linear-gradient(150deg, #ddf7ea, #f4fdf9);
  border-color: #c9efdd;
}

[data-theme="dark"] .app-icon--sales {
  background: linear-gradient(150deg, #17233d, #121a2b);
  border-color: #233557;
}

[data-theme="dark"] .app-icon--accounting {
  background: linear-gradient(150deg, #10312a, #0d1d22);
  border-color: #1c4a3d;
}

.app-illustration {
  width: 40px;
  height: 40px;
}

.app-id {
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.app-id h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.app-id p {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--muted);
}

.app-desc {
  font-size: 12.8px;
  line-height: 1.6;
  color: var(--text-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.chip:hover {
  color: var(--card-accent);
  border-color: color-mix(in srgb, var(--card-accent) 40%, var(--border));
  background: var(--card-tint);
}

.app-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.app-last {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

.btn--primary {
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--accent) 80%, transparent);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--accent) 90%, transparent);
}

.btn--ghost {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-2);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}

.btn--sm {
  height: 30px;
  padding: 0 10px;
  font-size: 11.5px;
  border-radius: 8px;
}

.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Status ---------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 16%, transparent);
}

.status--up {
  color: #0a7a53;
  background: #e7f8f0;
  border-color: #c9eedd;
}

.status--down {
  color: #9a5b00;
  background: #fff5e5;
  border-color: #ffe2b8;
}

.status--unknown {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--border);
}

[data-theme="dark"] .status--up {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.26);
}

[data-theme="dark"] .status--down {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.26);
}

.status-latency {
  font-size: 9.5px;
  font-weight: 500;
  opacity: 0.72;
}

/* ---------- Kartu utilitas ---------- */

.util-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.util-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.util-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.util-card > .icon {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.util-card:hover > .icon {
  transform: translate(1px, -1px);
  color: var(--util-color);
}

.util-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
  color: var(--util-color);
  background: color-mix(in srgb, var(--util-color) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--util-color) 18%, transparent);
}

.util-icon .icon {
  width: 19px;
  height: 19px;
}

.util-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.util-text strong {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
}

.util-text span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.util-card--violet {
  --util-color: #7c5cff;
}

.util-card--amber {
  --util-color: #d97706;
}

.util-card--cyan {
  --util-color: #0891b2;
}

.util-card--slate {
  --util-color: #64748b;
}

[data-theme="dark"] .util-card--violet {
  --util-color: #a78bfa;
}

[data-theme="dark"] .util-card--amber {
  --util-color: #fbbf24;
}

[data-theme="dark"] .util-card--cyan {
  --util-color: #22d3ee;
}

[data-theme="dark"] .util-card--slate {
  --util-color: #94a3b8;
}

/* ---------- Kartu umum ---------- */

.split {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.split--equal {
  grid-template-columns: 1fr 1fr;
}

.card {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card + .card {
  margin-top: 16px;
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card--warn {
  border-color: #f0d9a8;
  background: #fffcf4;
}

[data-theme="dark"] .card--warn {
  border-color: #4a3a1c;
  background: #171408;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card-head h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-head p {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.card-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 11.8px;
  line-height: 1.65;
  color: var(--muted);
}

.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

.db-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-2);
}

.db-pill .icon {
  width: 13px;
  height: 13px;
  color: var(--accent);
}

/* ---------- Aktivitas ---------- */

.activity-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.card--stretch {
  display: flex;
  flex-direction: column;
}

.card--stretch .activity-list {
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--muted);
}

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

.activity-list li:first-child {
  padding-top: 0;
}

.activity-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex: none;
}

.activity-icon .icon {
  width: 15px;
  height: 15px;
}

.activity-icon--ok {
  background: rgba(16, 185, 129, 0.1);
  color: #0a7a53;
}

.activity-icon--info {
  background: rgba(47, 107, 255, 0.1);
  color: #2f6bff;
}

.activity-icon--danger {
  background: rgba(220, 38, 38, 0.09);
  color: var(--danger);
}

.activity-icon--warn {
  background: rgba(217, 119, 6, 0.1);
  color: #b45309;
}

.activity-icon--neutral {
  background: var(--surface-2);
  color: var(--muted);
}

[data-theme="dark"] .activity-icon--ok {
  color: #6ee7b7;
}

[data-theme="dark"] .activity-icon--info {
  color: #93b4ff;
}

[data-theme="dark"] .activity-icon--warn {
  color: #fbbf24;
}

.activity-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  line-height: 1.35;
}

.activity-main strong {
  font-size: 12.3px;
  font-weight: 600;
}

.activity-main span {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list time {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
}

.empty-small {
  padding: 8px 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Status integrasi ---------- */

.health-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

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

.health-name {
  font-weight: 600;
  color: var(--text);
}

.health-url {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 46%;
}

.health-latency {
  min-width: 44px;
  text-align: right;
  font-size: 10.5px;
  color: var(--muted);
}

.db-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.db-row-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  flex: none;
}

.db-row-icon .icon {
  width: 15px;
  height: 15px;
}

.db-row-main {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.db-row-main strong {
  font-size: 11.5px;
  font-weight: 650;
}

.db-row-main span {
  font-size: 10.5px;
  color: var(--muted);
}

.db-row-latency {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}

.integration {
  display: flex;
  gap: 9px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
}

.integration .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--accent);
  flex: none;
}

.integration p {
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-2);
}

.integration code {
  font-size: 0.82em;
  white-space: normal;
}

/* ---------- Halaman daftar ---------- */

.page-head {
  padding: 8px 0 22px;
}

.page-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.page-head h1 {
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.page-head > p:not(.eyebrow),
.page-head > div > p:not(.eyebrow) {
  margin-top: 7px;
  font-size: 13px;
  color: var(--text-2);
  max-width: 640px;
}

.page--narrow .page-head {
  padding-top: 14px;
}

/* ---------- Tabel ---------- */

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

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

.table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}

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

.table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

.table strong {
  color: var(--text);
  font-weight: 600;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .nowrap {
  white-space: nowrap;
}

.table-sub {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.table--activity td {
  vertical-align: top;
}

.table code {
  white-space: nowrap;
}

/* ---------- Badge / tag ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--role {
  color: var(--accent);
  background: var(--accent-soft);
}

.badge--ok {
  color: #0a7a53;
  background: rgba(16, 185, 129, 0.1);
}

.badge--info {
  color: #2f6bff;
  background: rgba(47, 107, 255, 0.1);
}

.badge--danger {
  color: var(--danger);
  background: rgba(220, 38, 38, 0.09);
}

.badge--warn {
  color: #b45309;
  background: rgba(217, 119, 6, 0.1);
}

.badge--neutral {
  color: var(--muted);
  background: var(--surface-2);
}

[data-theme="dark"] .badge--ok {
  color: #6ee7b7;
}

[data-theme="dark"] .badge--info {
  color: #93b4ff;
}

[data-theme="dark"] .badge--danger {
  color: #fca5a5;
}

[data-theme="dark"] .badge--warn {
  color: #fbbf24;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-left: 5px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.tag--danger {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

/* ---------- Key-value ---------- */

.kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px 24px;
}

.kv > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.kv dt {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-size: 12.8px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.kv--compact {
  gap: 11px 20px;
}

.kv--compact dd {
  font-size: 12.3px;
}

.muted {
  color: var(--muted);
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
  background: var(--surface-2);
}

.tab.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 5px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  font-size: 9.5px;
  font-weight: 700;
}

/* ---------- Pagination ---------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted);
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-page {
  font-size: 11px;
  color: var(--text-2);
}

/* ---------- Status layanan ---------- */

.service-list {
  display: flex;
  flex-direction: column;
}

.service {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.service:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.service:first-child {
  padding-top: 0;
}

.service-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.service-main strong {
  font-size: 13px;
  font-weight: 650;
}

.service-url {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.method {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-2);
}

/* ---------- Panduan ---------- */

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps li {
  display: flex;
  gap: 12px;
}

.step-no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  flex: none;
}

.steps strong {
  display: block;
  font-size: 12.8px;
  font-weight: 650;
}

.steps p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.code-block {
  position: relative;
  margin-top: 12px;
}

.code-block pre {
  margin: 0;
  padding: 14px 44px 14px 16px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  overflow-x: auto;
}

.code-block code {
  padding: 0;
  background: none;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-2);
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: 9px;
  right: 9px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.copy-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.copy-btn .icon {
  width: 14px;
  height: 14px;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.3px;
  line-height: 1.55;
  color: var(--text-2);
}

.check-list .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--accent);
  flex: none;
}

.link {
  color: var(--accent);
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}

/* ---------- Launcher (portal) ---------- */

.page-portal {
  background: #f1f3f5;
}

[data-theme="dark"] .page-portal {
  background: #0b0e14;
}

.page-portal .topbar {
  position: static;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.page-portal .topbar-inner {
  height: 64px;
}

.page-portal #main {
  display: flex;
}

.launcher {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 76px;
  width: 100%;
  min-height: calc(100vh - 64px);
  padding: 32px 24px 64px;
}

.launcher-apps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 74px;
  flex-wrap: wrap;
}

.launcher-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.launcher-card {
  position: relative;
  display: grid;
  place-items: center;
  width: 220px;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 24px 48px -32px rgba(16, 24, 40, 0.38), 0 2px 4px rgba(16, 24, 40, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.launcher-tile:hover .launcher-card {
  transform: translateY(-4px);
  box-shadow: 0 28px 50px -30px rgba(16, 24, 40, 0.45);
}

.launcher-tile--blue:hover .launcher-card {
  border-color: rgba(47, 107, 255, 0.35);
}

.launcher-tile--emerald:hover .launcher-card {
  border-color: rgba(15, 159, 110, 0.35);
}

.launcher-tile--amber:hover .launcher-card {
  border-color: rgba(180, 83, 9, 0.35);
}

.launcher-art {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
}

.launcher-art--sales {
  background: radial-gradient(circle at 30% 25%, #e9f1ff, #f8fbff);
}

.launcher-art--accounting {
  background: radial-gradient(circle at 30% 25%, #e1f8ed, #f6fdf9);
}

.launcher-art--purchasing {
  background: radial-gradient(circle at 30% 25%, #fef3c7, #fffbeb);
}

[data-theme="dark"] .launcher-art--sales {
  background: radial-gradient(circle at 30% 25%, #17233d, #101724);
}

[data-theme="dark"] .launcher-art--accounting {
  background: radial-gradient(circle at 30% 25%, #10312a, #0d1c1a);
}

[data-theme="dark"] .launcher-art--purchasing {
  background: radial-gradient(circle at 30% 25%, #3a2a10, #1c1710);
}

.launcher-svg {
  width: 96px;
  height: 96px;
}

.launcher-label {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  text-align: center;
}

.tile-status {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.tile-status .status-dot {
  width: 8px;
  height: 8px;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent);
}

.tile-status.status--up {
  color: #12a05c;
}

.tile-status.status--down {
  color: #d97706;
}

.tile-status.status--unknown {
  color: #9aa3b2;
}

[data-theme="dark"] .tile-status.status--up {
  color: #34d399;
}

[data-theme="dark"] .tile-status.status--down {
  color: #fbbf24;
}

.tool-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
}

.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 116px;
}

.tool-card {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: var(--surface);
  box-shadow: 0 10px 24px -20px rgba(16, 24, 40, 0.4);
  color: var(--tool-color, var(--muted));
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.tool-card .icon {
  width: 26px;
  height: 26px;
}

.tool:hover .tool-card {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tool-color) 45%, var(--border));
  box-shadow: 0 16px 30px -22px rgba(16, 24, 40, 0.5);
}

.tool-label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-2);
  text-align: center;
}

.tool--violet {
  --tool-color: #7c5cff;
}

.tool--amber {
  --tool-color: #d97706;
}

.tool--cyan {
  --tool-color: #0891b2;
}

.tool--slate {
  --tool-color: #64748b;
}

[data-theme="dark"] .tool--violet {
  --tool-color: #a78bfa;
}

[data-theme="dark"] .tool--amber {
  --tool-color: #fbbf24;
}

[data-theme="dark"] .tool--cyan {
  --tool-color: #22d3ee;
}

[data-theme="dark"] .tool--slate {
  --tool-color: #94a3b8;
}

/* ---------- Form pengguna ---------- */

.alert {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
}

.alert--success {
  color: #0a7a53;
  background: #e8f8f0;
  border-color: #c9eedd;
}

.alert--error {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

[data-theme="dark"] .alert--success {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .alert--error {
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.28);
}

.card-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.user-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

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

@media (max-width: 560px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.field small {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.field input,
.field select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.field input:focus,
.field select:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 4px var(--ring);
  background: var(--surface);
}

.field input[readonly] {
  color: var(--muted);
  cursor: not-allowed;
}

.access-set {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.access-set legend {
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
}

.check input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.check span {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.check strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.check small {
  font-size: 10.5px;
  color: var(--muted);
}

.check--active {
  margin-top: -4px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Error ---------- */

.error-card {
  max-width: 560px;
  margin: 40px auto;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-code {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  height: 42px;
  margin-bottom: 14px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-2);
}

.error-card .eyebrow {
  justify-content: center;
  letter-spacing: 0.16em;
}

.error-card h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.error-hint {
  margin-top: 8px;
  font-size: 12.8px;
  color: var(--muted);
  line-height: 1.65;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translate(-50%, 12px);
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 28px;
  font-size: 11px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

.dot {
  opacity: 0.6;
}

/* ---------- Login ---------- */

.page-login {
  display: block;
  min-height: 100vh;
  background: #0a0a0b;
  color: #e9e9ee;
}

[data-theme="dark"] .page-login,
.page-login {
  background: #0a0a0b;
}

.login-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 48px 20px;
  overflow: hidden;
  isolation: isolate;
}

.login-glow {
  position: absolute;
  inset: -20% -10%;
  z-index: -1;
  background:
    radial-gradient(620px 340px at 28% 22%, rgba(34, 163, 89, 0.1), transparent 62%),
    radial-gradient(700px 400px at 76% 82%, rgba(47, 107, 255, 0.07), transparent 64%),
    radial-gradient(900px 500px at 50% 50%, rgba(255, 255, 255, 0.02), transparent 70%);
  pointer-events: none;
}

.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: min(880px, 100%);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand .mark-glyph {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.login-brand .mark-glyph svg {
  width: 30px;
  height: 30px;
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.login-brand-text strong {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: #f2f2f4;
}

.login-brand-text span {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #767d8b;
}

.login-card {
  width: 100%;
  padding: 40px 46px 26px;
  border: 1px solid #242427;
  border-radius: 20px;
  background: linear-gradient(180deg, #161618, #131315);
  box-shadow:
    0 40px 90px -40px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.login-card.is-error {
  animation: shake 0.36s ease;
}

.login-head {
  margin-bottom: 26px;
  text-align: center;
}

.login-head h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #ececef;
  padding-left: 0.3em;
}

.login-head p {
  max-width: 520px;
  margin: 12px auto 0;
  font-size: 12.3px;
  line-height: 1.65;
  color: #8b8f9a;
}

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
  padding: 0 14px 0 18px;
  border: 1px solid #2c2c31;
  border-radius: 13px;
  background: #0c0c0e;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field:focus-within {
  border-color: #2f9e63;
  box-shadow: 0 0 0 3px rgba(47, 158, 99, 0.11);
}

.auth-field-icon {
  display: grid;
  place-items: center;
  color: #5c6270;
}

.auth-field-icon .icon {
  width: 17px;
  height: 17px;
}

.auth-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #f4f4f6;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.auth-field input::placeholder {
  color: #555a66;
  letter-spacing: 0.02em;
}

.auth-field input[type="password"]::placeholder {
  letter-spacing: 0.18em;
}

.auth-reveal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #7c8290;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-reveal:hover {
  color: #cfd2d9;
  background: #1b1b1f;
}

.auth-reveal .icon {
  width: 17px;
  height: 17px;
}

.auth-help {
  margin: 12px 2px 0;
  font-size: 11px;
  line-height: 1.55;
  color: #6e7480;
}

.auth-help code {
  background: #1b1b1f;
  color: #9aa2b1;
  font-size: 10.5px;
}

.form-error {
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(220, 38, 38, 0.32);
  border-radius: 9px;
  background: rgba(220, 38, 38, 0.11);
  color: #ffa8a8;
  font-size: 12px;
  line-height: 1.5;
}

.form-error:empty {
  display: none;
}

.btn-check {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 60px;
  margin-top: 16px;
  border-radius: 10px;
  background: #22a559;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: background 0.15s ease, transform 0.12s ease;
}

.btn-check:hover {
  background: #26b05c;
}

.btn-check:active {
  transform: translateY(1px);
}

.btn-check[data-loading="true"] {
  cursor: progress;
  opacity: 0.9;
}

.btn-check[data-loading="true"] .btn-check-label {
  opacity: 0.75;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-check[data-loading="true"] .spinner {
  display: block;
}

.login-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #232327;
  font-size: 11px;
  color: #6e7480;
}

.login-note .icon {
  width: 14px;
  height: 14px;
}

.login-setup {
  max-width: 560px;
  padding: 9px 14px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.07);
  color: #c9a25e;
  font-size: 11px;
  text-align: center;
  line-height: 1.55;
}

.login-foot {
  font-size: 10.5px;
  color: #565b67;
  letter-spacing: 0.02em;
}

.login-foot span {
  opacity: 0.6;
}

/* ---------- Animasi ---------- */

@keyframes pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Responsif ---------- */

@media (max-width: 1120px) {
  .topnav {
    display: none;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    gap: 12px;
    padding: 0 16px;
  }

  .brand-text {
    display: none;
  }

  .user-meta {
    display: none;
  }

  .user-btn {
    padding-right: 6px;
  }

  .search {
    max-width: none;
  }

  .page {
    padding: 26px 18px 48px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 24px;
  }

  .hero-stats {
    width: 100%;
  }

  .stat {
    flex: 1;
    padding: 10px 16px;
    min-width: 0;
  }

  .split,
  .split--equal {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    padding: 14px 18px;
  }
}

@media (max-width: 720px) {
  .launcher {
    gap: 46px;
    padding: 28px 16px 48px;
  }

  .launcher-apps {
    gap: 26px;
  }

  .launcher-card {
    width: 160px;
    height: 160px;
    border-radius: 20px;
  }

  .launcher-art {
    width: 104px;
    height: 104px;
  }

  .launcher-svg {
    width: 76px;
    height: 76px;
  }

  .launcher-label {
    font-size: 14px;
  }

  .tool-row {
    gap: 18px 22px;
    max-width: 320px;
  }

  .tool {
    width: 96px;
  }

  .tool-label {
    font-size: 11px;
  }

  .topbar-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 11px 16px 12px;
    row-gap: 10px;
  }

  .brand {
    order: 1;
  }

  .topbar-actions {
    order: 2;
  }

  .page-head--row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .health-url {
    display: none;
  }

  .service {
    flex-wrap: wrap;
  }

  .service-meta {
    margin-left: auto;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-card {
    padding: 28px 22px 20px;
    border-radius: 16px;
  }

  .login-head h1 {
    font-size: 15px;
    letter-spacing: 0.26em;
    padding-left: 0.26em;
  }

  .auth-field {
    height: 56px;
    padding-left: 14px;
  }

  .btn-check {
    height: 54px;
    font-size: 16px;
  }

  .login-brand .mark-glyph {
    width: 38px;
    height: 38px;
  }

  .login-brand-text strong {
    font-size: 13px;
  }
}

@media (max-width: 400px) {
  .launcher-apps {
    gap: 20px;
  }

  .launcher-card {
    width: 150px;
    height: 150px;
  }

  .launcher-art {
    width: 100px;
    height: 100px;
  }

  .launcher-svg {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 22px 14px 40px;
  }

  .status-latency {
    display: none;
  }

  .util-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    width: 100%;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .error-card {
    padding: 26px 20px;
  }
}

/* ---- Company Setup ---- */
.setup-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}
.setup-hero > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.setup-hero strong { display: block; margin: 6px 0 2px; }
.setup-hero p { margin: 0; color: var(--muted); font-size: 13px; }
.setup-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent-soft, #e8f5ee);
  color: var(--accent, #147a4b);
  font-weight: 700;
  font-size: 12px;
}
@media (max-width: 820px) { .setup-hero { grid-template-columns: 1fr; } }
