/* Gaya antarmuka BotSec-Shortener dengan tipografi tajam editorial dan font IoskeleyMono */

@font-face {
  font-family: 'IoskeleyMono';
  src: url('/fonts/IoskeleyMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IoskeleyMono';
  src: url('/fonts/IoskeleyMono-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'IoskeleyMono';
  src: url('/fonts/IoskeleyMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IoskeleyMono';
  src: url('/fonts/IoskeleyMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IoskeleyMono';
  src: url('/fonts/IoskeleyMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg-canvas: #fafaf8;
  --bg-surface: #ffffff;
  --bg-subtle: #f3f4f6;
  --bg-elevated: #ffffff;
  --border-hairline: #e2e4e9;
  --border-strong: #c9cdd6;
  --text-ink: #111318;
  --text-muted: #5c6370;
  --text-faint: #848b98;
  --accent: #084ccf;
  --accent-hover: #063ca8;
  --accent-soft: rgba(8, 76, 207, 0.08);
  --accent-border: rgba(8, 76, 207, 0.24);
  --real: #0f8a5f;
  --real-soft: rgba(15, 138, 95, 0.1);
  --bot: #c83737;
  --bot-soft: rgba(200, 55, 55, 0.1);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.1);
  --grid-line: rgba(17, 19, 24, 0.045);
  --scroll-track: transparent;
  --scroll-thumb: #cdd2dc;
  --scroll-thumb-hover: #a7b0bf;
  --shadow-card: 0 1px 2px rgba(17, 19, 24, 0.04);
  --shadow-modal: 0 20px 48px rgba(17, 19, 24, 0.14);
  --radius-sm: 4px;
  --radius-md: 6px;
}

[data-theme='dark'] {
  color-scheme: dark;
  --bg-canvas: #0b0d11;
  --bg-surface: #11141a;
  --bg-subtle: #171b23;
  --bg-elevated: #161a22;
  --border-hairline: #232834;
  --border-strong: #323949;
  --text-ink: #f0f3f8;
  --text-muted: #98a2b3;
  --text-faint: #6c7587;
  --accent: #4c8dff;
  --accent-hover: #6aa2ff;
  --accent-soft: rgba(76, 141, 255, 0.12);
  --accent-border: rgba(76, 141, 255, 0.3);
  --real: #22c58b;
  --real-soft: rgba(34, 197, 139, 0.12);
  --bot: #f87171;
  --bot-soft: rgba(248, 113, 113, 0.12);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.12);
  --grid-line: rgba(240, 243, 248, 0.04);
  --scroll-track: transparent;
  --scroll-thumb: #2b3240;
  --scroll-thumb-hover: #3e485c;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}

/* Scrollbar tipis yang serasi dengan tema Light / Dark */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

html,
body {
  height: 100%;
  background: var(--bg-canvas);
  color: var(--text-ink);
  font-family: 'IoskeleyMono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.blueprint-bg {
  background-color: var(--bg-canvas);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Tata letak layar Login Admin */
.login-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.login-header {
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-ink);
  min-width: 0;
}

.brand-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.login-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-title {
  margin-top: 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.login-body {
  padding: 24px;
}

.login-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-subtle);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tata letak utama Dashboard */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: width 0.16s ease;
}

/* Mode sidebar terlipat: hanya tampilkan ikon */
.sidebar.collapsed {
  width: 64px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-tag,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-pill,
.sidebar.collapsed #logout-btn span {
  display: none;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .sidebar-nav {
  padding: 14px 8px;
}

.sidebar.collapsed .nav-section {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-hairline);
}

.sidebar.collapsed .nav-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 10px 0;
}

.sidebar.collapsed .nav-icon {
  width: 17px;
  height: 17px;
}

.sidebar.collapsed .sidebar-footer {
  padding: 10px 8px;
  align-items: center;
}

.sidebar.collapsed #logout-btn {
  width: 40px !important;
  height: 36px;
  padding: 0;
}

.sidebar-brand {
  height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  padding: 0 8px 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-ink);
}

.nav-item.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.85;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-meta {
  min-width: 0;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-menu-btn,
.sidebar-collapse-btn {
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.sidebar-collapse-btn:hover,
.mobile-menu-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-ink);
  border-color: var(--border-strong);
}

.mobile-menu-btn {
  display: none;
}

.page-breadcrumb {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.page-breadcrumb span {
  color: var(--text-faint);
  font-weight: 400;
  margin-right: 6px;
}

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

.page-content {
  padding: 24px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Komponen Header Halaman */
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-hairline);
}

.section-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

/* Panel & Kartu */
.panel {
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
}

.panel-body {
  padding: 18px;
}

/* Grid KPI bergaya editorial struktur garis tipis */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
  margin-bottom: 20px;
}

.kpi-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--border-hairline);
}

.kpi-cell:last-child {
  border-right: none;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.kpi-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi-value.real {
  color: var(--real);
}

.kpi-value.bot {
  color: var(--bot);
}

.kpi-value.accent {
  color: var(--accent);
}

.kpi-note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-faint);
}

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

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

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

/* Form & Kontrol Input */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group.compact {
  margin-bottom: 0;
}

.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.input,
.select,
.textarea {
  width: 100%;
  background: var(--bg-surface);
  color: var(--text-ink);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.select option {
  background-color: var(--bg-surface);
  color: var(--text-ink);
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Tombol */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.1s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.16s ease;
}

.btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.btn:active:not(:disabled),
.nav-item:active:not(:disabled),
.titlebar-btn:active:not(:disabled),
.frameless-version-pill:active:not(:disabled),
.ctx-menu-item:active:not(:disabled),
.sidebar-collapse-btn:active:not(:disabled),
.mobile-menu-btn:active:not(:disabled),
.link-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.95);
}

.btn:focus-visible,
.nav-item:focus-visible,
.titlebar-btn:focus-visible,
.link-btn:focus-visible,
.frameless-version-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes btnClickPulse {
  0% {
    transform: scale(0.94);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.42);
  }
  55% {
    transform: scale(1.02);
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.is-clicked {
  animation: btnClickPulse 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.is-success-flash {
  border-color: var(--real) !important;
  box-shadow: 0 0 0 3px var(--real-soft) !important;
  color: var(--real) !important;
}

.is-busy {
  opacity: 0.72;
  cursor: wait !important;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-danger {
  color: var(--bot);
  border-color: rgba(200, 55, 55, 0.3);
  background: var(--bot-soft);
}

.btn-danger:hover:not(:disabled) {
  background: var(--bot);
  border-color: var(--bot);
  color: #ffffff;
}

.btn-sm {
  padding: 5px 9px;
  font-size: 11px;
}

/* Banner Info */
.info-banner {
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  color: var(--text-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 12.5px;
}

.alert-error {
  padding: 10px 12px;
  background: var(--bot-soft);
  border: 1px solid rgba(200, 55, 55, 0.35);
  color: var(--bot);
  border-radius: var(--radius-sm);
  font-size: 12px;
  margin-bottom: 14px;
}

/* Tabel Data */
.table-toolbar {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-hairline);
  white-space: nowrap;
}

td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 12.5px;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-subtle);
}

.truncate-url {
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

.truncate-isp {
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  vertical-align: middle;
}

/* Sel Origin (Bendera + IP) dan Browser/OS beserta ikon SVG */
.origin-cell,
.browser-os-cell,
.panel-title-wrap,
.kpi-header-row,
.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.kpi-header-row {
  width: 100%;
  justify-content: space-between;
}

.flag-icon {
  width: 18px;
  height: 13px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(128, 128, 128, 0.25);
}

.tech-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

.ui-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}

.ago-text {
  color: var(--text-muted);
  font-size: 11.5px;
  white-space: nowrap;
}

/* Perapian badge kolom RULES pada Shortlink Manager */
.rules-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.rules-cell .badge {
  height: 22px;
  padding: 0 7px;
  line-height: 1;
  gap: 5px;
  font-size: 11px;
}

.rules-cell .flag-icon {
  width: 15px;
  height: 11px;
}

.rules-cell .ui-icon {
  width: 12px;
  height: 12px;
}

/* Gaya Landing Page editorial modern */
.landing-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-canvas);
}

.landing-container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
}

.landing-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.landing-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  transition: color 0.12s ease;
}

.landing-link:hover {
  color: var(--text-ink);
}

.landing-hero {
  padding: 68px 0;
  border-bottom: 1px solid var(--border-hairline);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 36px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.hero-title {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 14px;
}

.hero-subtitle {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 540px;
}

.hero-metrics {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.hero-metrics div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-metrics strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-ink);
}

.hero-metrics span {
  font-size: 11px;
  color: var(--text-muted);
}

.hero-terminal {
  background: #0d1016;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  min-width: 0;
}

.hero-terminal-head {
  padding: 10px 14px;
  background: #141922;
  border-bottom: 1px solid #232834;
  color: #98a2b3;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-hairline);
}

.landing-section-alt {
  background: var(--bg-surface);
}

.landing-h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.feature-cell {
  padding: 22px;
  border-right: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}

.feature-cell:nth-child(3n) {
  border-right: none;
}

.feature-cell:nth-last-child(-n + 3) {
  border-bottom: none;
}

.feature-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}

.feature-cell h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature-cell p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

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

.arch-card,
.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-border);
}

.arch-step {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.arch-card h3 {
  font-size: 15px;
  font-weight: 600;
}

.arch-card p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.pricing-price {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.pricing-price span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

.landing-footer {
  margin-top: auto;
  padding: 22px 0;
  background: var(--bg-surface);
}

.landing-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mono-code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
}

/* Badge Status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-real {
  background: var(--real-soft);
  color: var(--real);
  border-color: rgba(15, 138, 95, 0.25);
}

.badge-bot {
  background: var(--bot-soft);
  color: var(--bot);
  border-color: rgba(200, 55, 55, 0.25);
}

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

.badge-neutral {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-color: var(--border-hairline);
}

.badge-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-color: rgba(180, 83, 9, 0.25);
}

/* Pagination */
.pagination-bar {
  padding: 12px 18px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Grafik SVG & Stat Strip */
.chart-header-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 5px;
}

.chart-container {
  width: 100%;
  height: 220px;
}

/* Tata letak berdampingan Line Graph + Globe with Raised Arcs (responsif di HP) */
.analytics-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  align-items: stretch;
}

.analytics-split-grid > .panel {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.analytics-split-grid > .panel > .panel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.amchart-box {
  width: 100%;
  height: 320px;
  position: relative;
}

.stat-strip-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
}

.stat-strip-cell {
  padding: 14px 18px;
  text-align: center;
  border-right: 1px solid var(--border-hairline);
}

.stat-strip-cell:last-child {
  border-right: none;
}

.stat-strip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-strip-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

/* List Ranking Ringkas */
.rank-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.rank-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 2px;
  overflow: hidden;
}

.rank-bar-fill {
  height: 100%;
  background: var(--accent);
}

/* Blok Kode Dokumentasi */
.code-block {
  max-width: 100%;
  background: #0d1016;
  color: #e6edf3;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 14px;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre;
  scrollbar-width: thin;
  scrollbar-color: #2e3748 transparent;
}

.code-block::-webkit-scrollbar-thumb {
  background-color: #2e3748;
}

.code-block::-webkit-scrollbar-thumb:hover {
  background-color: #414d63;
}

/* Modal Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 13, 17, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 90;
}

.modal-card {
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  color: var(--text-ink);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-modal);
  font-size: 12px;
  max-width: 340px;
}

.toast.error {
  border-left-color: var(--bot);
}

.toast.success {
  border-left-color: var(--real);
}

.empty-state {
  padding: 36px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  cursor: pointer;
}

/* Tombol Ikon Tanpa Teks & Tooltip Kustom */
.btn-icon-only {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon-only .ui-icon {
  width: 14px;
  height: 14px;
  margin: 0;
}

.action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translate(-50%, 3px);
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  color: var(--text-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: var(--shadow-modal);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 250;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

[data-tooltip-pos="bottom"]::after {
  bottom: auto;
  top: calc(100% + 7px);
  transform: translate(-50%, -3px);
}

[data-tooltip-pos="bottom"]:hover::after,
[data-tooltip-pos="bottom"]:focus-visible::after {
  transform: translate(-50%, 0);
}

[data-tooltip-pos="bottom-end"]::after {
  left: auto;
  right: 0;
  bottom: auto;
  top: calc(100% + 7px);
  transform: translateY(-3px);
}

[data-tooltip-pos="bottom-end"]:hover::after,
[data-tooltip-pos="bottom-end"]:focus-visible::after {
  transform: translateY(0);
}

.confirm-modal-msg {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-ink);
  margin: 0;
}

/* Titlebar Frameless Aplikasi Desktop Portabel */
.frameless-titlebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  padding: 0 8px 0 12px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 300;
  user-select: none;
  --wails-draggable: drag;
}

.frameless-titlebar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.frameless-app-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: contain;
  flex-shrink: 0;
}

.frameless-app-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-ink);
  letter-spacing: -0.01em;
}

.frameless-version-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid transparent;
  cursor: pointer;
  --wails-draggable: no-drag;
}

.frameless-version-pill:hover {
  border-color: var(--accent);
}

.frameless-titlebar-right {
  display: flex;
  align-items: center;
  gap: 4px;
  --wails-draggable: no-drag;
}

.titlebar-divider {
  width: 1px;
  height: 16px;
  background: var(--border-hairline);
  margin: 0 4px;
}

.titlebar-btn {
  width: 30px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.titlebar-btn svg {
  width: 13px;
  height: 13px;
}

.titlebar-btn:hover {
  background: var(--bg-canvas);
  color: var(--text-ink);
  border-color: var(--border-hairline);
}

.titlebar-btn-danger:hover {
  background: var(--bot);
  color: #ffffff;
  border-color: var(--bot);
}

.update-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--real);
  box-shadow: 0 0 0 2px var(--bg-surface);
}

body.has-frameless-bar .login-shell,
body.has-frameless-bar .app-shell {
  margin-top: 38px;
  min-height: calc(100vh - 38px);
}

body.has-frameless-bar .app-shell {
  height: calc(100vh - 38px);
}

body.has-frameless-bar .sidebar {
  height: calc(100vh - 38px);
  top: 38px;
}

body.has-frameless-bar .topbar {
  top: 0;
}

/* Menu Konteks Kustom Klik Kanan Aplikasi Portabel */
.custom-context-menu {
  position: fixed;
  min-width: 205px;
  padding: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-modal);
  z-index: 400;
  font-family: var(--font-mono);
}

.ctx-menu-item {
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-ink);
  font-family: inherit;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.ctx-menu-item:hover:not(:disabled) {
  background: var(--accent-subtle);
  color: var(--accent);
}

.ctx-menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ctx-menu-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ctx-menu-left .ui-icon {
  width: 13px;
  height: 13px;
  margin: 0;
}

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

/* Modal About & Progress Bar Download Kustom */
.about-modal-card {
  max-width: 640px;
}

.about-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.about-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  padding: 6px;
  background: var(--bg-canvas);
  object-fit: contain;
}

.about-hero-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.about-hero-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-ink);
}

.about-hero-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.about-box {
  border: 1px solid var(--border-hairline);
  background: var(--bg-canvas);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.about-update-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.about-meta-table {
  width: 100%;
  border-collapse: collapse;
}

.about-meta-table tr {
  border-bottom: 1px solid var(--border-hairline);
}

.about-meta-table tr:last-child {
  border-bottom: none;
}

.about-meta-table th {
  width: 125px;
  padding: 6px 8px 6px 0;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
  vertical-align: top;
}

.about-meta-table td {
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-ink);
  word-break: break-all;
}

.about-meta-link {
  color: var(--accent);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.download-progress-track {
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: var(--border-hairline);
  overflow: hidden;
  margin: 10px 0;
}

.download-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}

@media (max-width: 1024px) {
  .kpi-grid,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-cell:nth-child(2) {
    border-right: none;
  }
  .kpi-cell:nth-child(1),
  .kpi-cell:nth-child(2) {
    border-bottom: 1px solid var(--border-hairline);
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .analytics-split-grid,
  .hero-grid,
  .feature-grid,
  .arch-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .feature-cell {
    border-right: none;
    border-bottom: 1px solid var(--border-hairline) !important;
  }
  .feature-cell:last-child {
    border-bottom: none !important;
  }
}

@media (max-width: 768px) {
  .landing-links {
    display: none;
  }
  .landing-hero {
    padding: 40px 0;
  }
  .hero-title {
    font-size: 26px;
  }
  .topbar {
    padding: 0 12px;
    gap: 8px;
  }
  .page-breadcrumb span {
    display: none;
  }
  .topbar-actions .badge {
    font-size: 10px;
    padding: 2px 5px;
  }
  .page-content {
    padding: 16px 12px;
  }
  .amchart-box {
    height: 280px;
  }
  .sidebar {
    position: fixed;
    left: -260px;
    transition: left 0.18s ease;
  }
  .sidebar.open {
    left: 0;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .sidebar-collapse-btn {
    display: none;
  }
  .kpi-grid,
  .grid-4,
  .stat-strip-3 {
    grid-template-columns: 1fr;
  }
  .kpi-cell,
  .stat-strip-cell {
    border-right: none;
    border-bottom: 1px solid var(--border-hairline);
  }
  .kpi-cell:last-child,
  .stat-strip-cell:last-child {
    border-bottom: none;
  }
}
