/* ===== CEK DOMAIN GSC - MODERN UI/UX STYLESHEET ===== */

/* Font Inter & System Fallback */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Common Brand Colors */
  --lime: #A3E635;
  --lime-hover: #bef264;
  --lime-dark: #65A30D;
  --lime-glow: rgba(163, 230, 53, 0.25);
  
  --danger: #F87171;
  --danger-hover: #EF4444;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --danger-border: rgba(248, 113, 113, 0.3);

  --success: #34D399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --success-border: rgba(52, 211, 153, 0.3);

  --info: #38BDF8;
  --info-bg: rgba(56, 189, 248, 0.12);
  --info-border: rgba(56, 189, 248, 0.3);

  --warning: #FB923C;
  --warning-bg: rgba(251, 146, 60, 0.12);
  --warning-border: rgba(251, 146, 60, 0.3);

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ====================================================
   DARK THEME (MOSTDOMAIN STYLE - DEFAULT)
   ==================================================== */
[data-theme="dark"], :root {
  --bg-app: #0B1220;
  --bg-card: #111A2E;
  --bg-card-subtle: #16223B;
  --bg-card-hover: #1A2845;
  --bg-input: #0E1626;
  --bg-header: rgba(17, 26, 46, 0.85);

  --border: #1E293B;
  --border-light: #283750;
  --border-focus: var(--lime);

  --text-main: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0B1220;

  --btn-primary-bg: var(--lime);
  --btn-primary-text: #0B1220;
  --btn-primary-hover: var(--lime-hover);

  --btn-secondary-bg: #1A2740;
  --btn-secondary-text: #E2E8F0;
  --btn-secondary-border: #283854;
  --btn-secondary-hover: #223354;

  --table-head-bg: #15223A;
  --table-border: #1E2B45;
  --table-row-hover: #16233B;
  --table-row-notfound: rgba(239, 68, 68, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.55);

  --status-gray-bg: rgba(148, 163, 184, 0.12);
  --status-gray-text: #CBD5E1;
  --status-gray-dot: #94A3B8;
}

/* ====================================================
   LIGHT THEME
   ==================================================== */
[data-theme="light"] {
  --bg-app: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F1F5F9;
  --bg-card-hover: #E2E8F0;
  --bg-input: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.88);

  --border: #E2E8F0;
  --border-light: #CBD5E1;
  --border-focus: #65A30D;

  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --btn-primary-bg: #84CC16;
  --btn-primary-text: #0F172A;
  --btn-primary-hover: #A3E635;

  --btn-secondary-bg: #FFFFFF;
  --btn-secondary-text: #1E293B;
  --btn-secondary-border: #CBD5E1;
  --btn-secondary-hover: #F1F5F9;

  --table-head-bg: #F1F5F9;
  --table-border: #E2E8F0;
  --table-row-hover: #F8FAFC;
  --table-row-notfound: #FEF2F2;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.09);

  --status-gray-bg: #F1F5F9;
  --status-gray-text: #475569;
  --status-gray-dot: #64748B;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Header & Navbar */
.app-header {
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--lime), #65A30D);
  color: #0B1220;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  box-shadow: 0 2px 8px rgba(163, 230, 53, 0.3);
}

.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--lime);
  background: rgba(163, 230, 53, 0.12);
  border: 1px solid rgba(163, 230, 53, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
}

.brand-text span {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-tabs {
  display: flex;
  background: var(--bg-card-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 2px;
}

/* Subnav tabs (e.g. Ubah Status vs Ubah Sold) */
.subnav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.subnav-tab {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  text-decoration: none;
}

.subnav-tab:hover {
  color: var(--text-main);
  border-color: var(--border);
}

.subnav-tab.active {
  color: #0B1220;
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 700;
  box-shadow: 0 2px 8px var(--lime-glow);
}

.nav-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 7px;
  user-select: none;
  text-decoration: none;
}

.nav-tab:hover {
  color: var(--text-main);
}

.nav-tab.active {
  color: #0B1220;
  background: var(--lime);
  font-weight: 700;
  box-shadow: 0 2px 8px var(--lime-glow);
}

/* Theme Switcher Button */
.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: var(--border-light);
}

/* Main Layout */
.main-container {
  max-width: 1440px;
  margin: 24px auto;
  padding: 0 24px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 20px;
  position: relative;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 12.5px;
  font-weight: normal;
  color: var(--text-secondary);
}

/* Step Card UI (for Bulk Update & Import) */
.step-card {
  border-left: 3px solid var(--border-light);
  transition: var(--transition);
}
.step-card.active-step {
  border-left-color: var(--lime);
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  color: #0B1220;
  font-size: 11px;
  font-weight: 800;
  margin-right: 8px;
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 16px;
  position: relative;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 12.5px;
}

textarea.form-control,
input.form-control,
select.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: inherit;
  transition: var(--transition);
}

textarea.form-control {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
}

textarea.form-control:focus,
input.form-control:focus,
select.form-control:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--lime-glow);
}

/* Textarea live line counter badge */
.textarea-wrapper {
  position: relative;
}

.line-counter-badge {
  position: absolute;
  bottom: 12px;
  right: 14px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 2px 6px var(--lime-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--btn-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
  color: var(--btn-secondary-text);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--btn-secondary-hover);
  border-color: var(--border-light);
  color: var(--text-main);
}

.btn-success {
  background: var(--success);
  color: #0B1220;
}

.btn-success:hover:not(:disabled) {
  background: #10B981;
}

.btn-danger {
  background: var(--danger);
  color: #0B1220;
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-hover);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Mini loading spinner */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* Modern Pill Badges with Colored Dot */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
  line-height: 1.3;
}

.badge-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  display: inline-block;
}

.badge-ok {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success-border);
}
.badge-ok .badge-dot {
  background: var(--success);
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

.badge-cf {
  background: var(--info-bg);
  color: var(--info);
  border-color: var(--info-border);
}
.badge-cf .badge-dot {
  background: var(--info);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

.badge-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border-color: var(--warning-border);
}
.badge-pending .badge-dot {
  background: var(--warning);
  box-shadow: 0 0 6px rgba(251, 146, 60, 0.6);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
  cursor: help;
}
.badge-danger .badge-dot {
  background: var(--danger);
  box-shadow: 0 0 6px rgba(248, 113, 113, 0.6);
}

.badge-gray {
  background: var(--status-gray-bg);
  color: var(--status-gray-text);
  border-color: var(--border);
}
.badge-gray .badge-dot {
  background: var(--status-gray-dot);
}

.badge-notfound {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.35);
}
.badge-notfound .badge-dot {
  background: #EF4444;
}

/* Tooltip */
.has-tooltip {
  position: relative;
}

.has-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #0F172A;
  color: #F8FAFC;
  border: 1px solid var(--border-light);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 100;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

/* Registrar info */
.reg-normal {
  font-weight: 500;
  color: var(--text-main);
}

.reg-notfound-container {
  display: flex;
  flex-direction: column;
}

.reg-notfound-title {
  color: var(--text-muted);
  font-weight: 600;
}

.reg-notfound-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Tables */
.table-container {
  /* Tanpa scroll di dalam kotak: halaman yang discroll, header tabel menempel di bawah header aplikasi */
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  position: relative;
}

.table-container thead th:first-child { border-top-left-radius: var(--radius); }
.table-container thead th:last-child { border-top-right-radius: var(--radius); }

@media (max-width: 1100px) {
  .table-container { overflow-x: auto; }
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-size: 13px;
}

thead th {
  background: var(--table-head-bg);
  padding: 10px 14px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: var(--header-h, 60px);
  z-index: 20;
}

thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
}

thead th.sortable:hover {
  color: var(--lime);
  background: var(--bg-card-hover);
}

.sort-indicator {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: var(--lime);
}

.sort-indicator.inactive {
  opacity: 0.3;
  color: var(--text-muted);
}

tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--table-border);
  vertical-align: middle;
  color: var(--text-main);
}

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

tbody tr {
  transition: background-color 0.12s ease;
}

tbody tr:hover {
  background-color: var(--table-row-hover);
}

tbody tr.tr-notfound {
  background-color: var(--table-row-notfound);
}

tbody tr.tr-notfound:hover {
  background-color: rgba(239, 68, 68, 0.12);
}

.col-idx {
  width: 45px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.col-domain-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.col-domain {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-main);
}

/* Inline domain copy icon button */
.btn-copy-inline {
  opacity: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 4px;
  border-radius: 4px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

tr:hover .btn-copy-inline {
  opacity: 1;
}

.btn-copy-inline:hover {
  color: var(--lime);
  background: rgba(163, 230, 53, 0.15);
}

/* Action buttons in row */
.row-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.btn-icon {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-subtle);
  border-color: var(--border);
  color: var(--text-main);
}

/* Summary Metric Cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.metric-card.metric-total {
  border-left: 3px solid #38BDF8;
}

.metric-card.metric-found {
  border-left: 3px solid var(--success);
}

.metric-card.metric-notfound {
  border-left: 3px solid var(--danger);
}

.metric-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.metric-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-main);
}

/* Summary Bar with Status Chips */
.summary-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

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

.stat-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}

.stat-chip:hover {
  border-color: var(--lime);
  transform: translateY(-1px);
}

.stat-chip.active-filter {
  background: var(--lime);
  color: #0B1220;
  border-color: var(--lime);
}

.stat-chip.active-filter .badge {
  background: transparent !important;
  color: #0B1220 !important;
  border: none !important;
}

/* GSC Account Summary Bar (Cek Domain) */
.account-summary-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.account-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.account-summary-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

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

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  color: var(--text-main);
}

.account-chip:hover {
  background: var(--bg-card-hover);
  border-color: var(--lime);
  color: var(--lime);
}

.account-chip.active {
  background: var(--lime);
  border-color: var(--lime);
  color: #0B1220;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--lime-glow);
}

.account-chip .chip-count {
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.account-chip.active .chip-count {
  background: rgba(0, 0, 0, 0.25);
  color: #0B1220;
}

/* Empty State Box */
.empty-state {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 38px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.empty-state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Single-row Filter Toolbar in Daftar Domain */
.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.filter-toolbar .filter-search-box {
  flex: 1 1 240px;
}

.filter-toolbar .filter-select-box {
  flex: 0 1 170px;
}

/* Date Filter Box in Daftar Domain */
.filter-date-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}

.filter-date-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-date-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-date-inputs input[type="date"] {
  padding: 3px 6px;
  font-size: 12px;
  height: 28px;
  max-width: 130px;
  border-radius: 4px;
}

.filter-date-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.btn-date-chip {
  background: var(--btn-secondary-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.2;
}

.btn-date-chip:hover {
  border-color: var(--lime);
  color: var(--text-main);
}

.btn-date-chip.active {
  background: var(--lime);
  color: #0B1220;
  border-color: var(--lime);
  font-weight: 700;
}

.filter-date-empty-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: 4px;
  user-select: none;
}

.filter-date-empty-label:hover {
  color: var(--text-main);
}

.filter-date-empty-label input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--lime);
}

/* Pagination Bar */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Floating Bulk Action Bar */
.bulk-action-bar {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #111A2E;
  color: #F8FAFC;
  border: 1px solid var(--border-light);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  z-index: 200;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  animation: slideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.bulk-action-bar.active {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 15px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 10, 20, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 24px;
  position: relative;
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

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

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-card-subtle);
}

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

/* User Name Input in Header */
.user-name-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px 10px;
  transition: var(--transition);
}

.user-name-wrapper:focus-within {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--lime-glow);
}

.user-name-icon {
  font-size: 13px;
  color: var(--text-muted);
}

.input-user-name {
  background: transparent;
  border: none;
  outline: none;
  font-size: 12px;
  color: var(--text-main);
  width: 110px;
  font-weight: 500;
}

.input-user-name::placeholder {
  color: var(--text-muted);
  font-size: 11.5px;
}

/* Note icon on domain table */
.note-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-left: 5px;
  cursor: help;
  vertical-align: middle;
  padding: 1px 3px;
  border-radius: 3px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-subtle);
  transition: transform 0.15s ease;
}

.note-icon-badge:hover {
  transform: scale(1.15);
  border-color: var(--lime);
}

/* Timeline in History Modal */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.timeline-item {
  padding: 11px 14px;
  background: var(--bg-card-subtle);
  border-left: 3px solid var(--lime);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.timeline-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.timeline-field-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.timeline-change {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.timeline-val-old {
  color: var(--text-muted);
  text-decoration: line-through;
  font-family: var(--font-mono);
  font-size: 12px;
}

.timeline-val-new {
  color: var(--lime);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 12px;
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px dashed var(--border-subtle);
}

.timeline-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Toast Container & Notification */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100005;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 12px 18px;
  background: #111A2E;
  color: #F8FAFC;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  font-weight: 500;
  pointer-events: auto;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  animation: slideLeft 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-success {
  border-left: 4px solid var(--success);
}
.toast-success .toast-icon {
  color: var(--success);
}

.toast-error {
  border-left: 4px solid var(--danger);
}
.toast-error .toast-icon {
  color: var(--danger);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}
.toast-warning .toast-icon {
  color: var(--warning);
}

/* Dropzone for Import */
.dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-card-subtle);
  transition: var(--transition);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--lime);
  background: rgba(163, 230, 53, 0.05);
}

.dropzone-icon {
  font-size: 40px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* Report Card (Import) */
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--success-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 18px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.report-item {
  background: var(--bg-card-subtle);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.report-item .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
}

.report-item .label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Responsiveness */
@media (max-width: 900px) {
  .header-container {
    height: auto;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-tabs {
    order: 3;
    width: 100%;
    justify-content: space-around;
  }
  .main-container {
    padding: 0 16px;
    margin: 16px auto;
  }
}


/* Font seragam: tombol, input, select, dan textarea mengikuti font halaman */
button, input, select, textarea {
  font-family: inherit;
}
button { font-size: inherit; }

/* Petunjuk isi berubah pada form preview (Pengaman Preview) */
.preview-stale-hint {
  font-size: 12px;
  color: var(--warning);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.preview-stale-hint::before {
  content: "⚠";
  font-size: 13px;
}
