@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ==========================================================================
   CSS Custom Properties & Design Tokens
   Theme: Putih & Hijau Clean (Clean White & Emerald Green)
   ========================================================================== */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Default Theme: Clean White + Emerald Green */
  --bg: #f8fafc;
  --bg-subtle: #f1f5f9;
  --card: #ffffff;
  --card-hover: #fcfdfd;
  --card-active: #f0fdf4;
  --border: #e2e8f0;
  --border-hover: rgba(16, 185, 129, 0.4);
  --border-focus: #10b981;

  --text: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --primary: #10b981;
  --primary-hover: #059669;
  --primary-dark: #047857;
  --primary-light: #ecfdf5;
  --primary-glow: rgba(16, 185, 129, 0.22);

  --accent-cyan: #0284c7;
  --accent-cyan-light: #f0f9ff;
  --accent-emerald: #10b981;
  --accent-emerald-light: #ecfdf5;
  --accent-amber: #d97706;
  --accent-amber-light: #fffbeb;
  --accent-rose: #e11d48;
  --accent-rose-light: #fff1f2;
  --accent-purple: #7c3aed;
  --accent-purple-light: #f5f3ff;

  --sidebar-bg: #ffffff;
  --sidebar-border: #e2e8f0;
  --sidebar-text: #64748b;
  --sidebar-active-bg: #ecfdf5;
  --sidebar-active-text: #047857;
  
  --topbar-bg: rgba(255, 255, 255, 0.94);
  --modal-bg: #ffffff;
  --modal-overlay: rgba(15, 23, 42, 0.45);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(16, 185, 129, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(16, 185, 129, 0.05);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg: #0b101b;
  --bg-subtle: #111827;
  --card: #162032;
  --card-hover: #1c293f;
  --card-active: #22324c;
  --border: rgba(148, 163, 184, 0.12);
  --border-hover: rgba(16, 185, 129, 0.4);
  --border-focus: #10b981;

  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --primary: #10b981;
  --primary-hover: #059669;
  --primary-dark: #047857;
  --primary-light: rgba(16, 185, 129, 0.15);
  --primary-glow: rgba(16, 185, 129, 0.3);

  --accent-cyan: #38bdf8;
  --accent-cyan-light: rgba(56, 189, 248, 0.15);
  --accent-emerald: #10b981;
  --accent-emerald-light: rgba(16, 185, 129, 0.15);
  --accent-amber: #fbbf24;
  --accent-amber-light: rgba(251, 191, 36, 0.15);
  --accent-rose: #fb7185;
  --accent-rose-light: rgba(251, 113, 133, 0.15);
  --accent-purple: #c084fc;
  --accent-purple-light: rgba(192, 132, 252, 0.15);

  --sidebar-bg: #0f172a;
  --sidebar-border: rgba(148, 163, 184, 0.1);
  --sidebar-text: #94a3b8;
  --sidebar-active-bg: rgba(16, 185, 129, 0.15);
  --sidebar-active-text: #34d399;

  --topbar-bg: rgba(15, 23, 42, 0.88);
  --modal-bg: #162032;
  --modal-overlay: rgba(5, 8, 15, 0.75);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.modal-open {
  overflow: hidden;
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

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

/* ==========================================================================
   App Shell & Responsive Sidebar Toggle
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

/* Desktop Sidebar Collapse */
.app-shell.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

.app-shell.sidebar-collapsed .main {
  margin-left: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.brand-mark:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

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

.brand-title {
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* Profile Mini (Sidebar) */
.profile-mini {
  margin: 16px 14px 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

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

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
  border-radius: 8px;
}

.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 24px;
  border-radius: 16px;
}

.profile-mini-info {
  min-width: 0;
  flex: 1;
}

.profile-mini-info b {
  color: var(--text);
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-mini-info small {
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-mini-info small::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

/* Sidebar Nav */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  flex: 1;
}

.nav-caption {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  padding: 14px 10px 6px;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9.5px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.18s ease;
  position: relative;
}

.nav-link i {
  width: 18px;
  font-size: 14px;
  text-align: center;
  color: var(--text-dim);
  transition: color 0.18s ease;
}

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

.nav-link:hover i {
  color: var(--primary);
}

.nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.nav-link.active i {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

/* --- Collapsible Nav Submenus --- */
.nav-group {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}

.nav-group-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9.5px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

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

.nav-group-trigger .group-icon {
  width: 18px;
  font-size: 14px;
  text-align: center;
  color: var(--text-dim);
  transition: color 0.18s ease;
}

.nav-group-trigger:hover .group-icon {
  color: var(--primary);
}

.nav-group-trigger .group-chevron {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-dim);
  transition: transform 0.22s ease;
}

.nav-group.open .nav-group-trigger .group-chevron {
  transform: rotate(90deg);
}

.nav-group.open .nav-group-trigger {
  color: var(--text);
}

.nav-group.active-parent .nav-group-trigger {
  color: var(--primary-dark);
  font-weight: 700;
}

.nav-group.active-parent .nav-group-trigger .group-icon {
  color: var(--primary);
}

.nav-group.active-parent .nav-group-trigger .group-chevron {
  color: var(--primary);
}

.nav-group-body {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 20px;
  margin-top: 3px;
  margin-bottom: 4px;
  position: relative;
}

.nav-group-body::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--sidebar-border);
  border-radius: 2px;
}

.nav-group.active-parent .nav-group-body::before {
  background: rgba(16, 185, 129, 0.35);
}

.nav-group.open .nav-group-body {
  display: flex;
}

.nav-sub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.18s ease;
  position: relative;
}

.nav-sub-link-nested {
  margin-left: 18px;
  padding-left: 14px;
  font-size: 12px;
}

.nav-sub-link i {
  width: 16px;
  font-size: 12px;
  text-align: center;
  color: var(--text-dim);
  transition: color 0.18s ease;
}

.nav-sub-link:hover {
  color: var(--primary-dark);
  background: var(--bg-subtle);
}

.nav-sub-link:hover i {
  color: var(--primary);
}

.nav-sub-link.active {
  background: var(--sidebar-active-bg);
  color: var(--primary-dark);
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.nav-sub-link.active i {
  color: var(--primary);
}

.nav-sub-link.active::after {
  content: '';
  position: absolute;
  left: -20px;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

[data-theme="dark"] .nav-group.active-parent .nav-group-trigger {
  color: #34d399;
}

[data-theme="dark"] .nav-sub-link:hover {
  color: #34d399;
}

[data-theme="dark"] .nav-sub-link.active {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
}

/* Sidebar Footer */
.sidebar-foot {
  margin-top: auto;
  padding: 16px 16px 18px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

.secure-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 500;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   Main Content Area & Topbar
   ========================================================================== */
.main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar {
  height: 66px;
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}

/* Always-Visible Hamburger Menu Button (Baris 3) */
#sidebarToggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

#sidebarToggle:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.3);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.crumb i {
  font-size: 10px;
}

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

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

.search-shortcut {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.search-shortcut:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--card);
}

.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--text-dim);
}

.top-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 11px;
  border-radius: 20px;
}

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

.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}

.theme-toggle-btn:hover {
  color: var(--primary);
  border-color: var(--border-hover);
  background: var(--primary-light);
}

/* Profile Menu (Topbar) */
.profile-menu {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  transition: all 0.18s ease;
}

.profile-trigger:hover {
  background: var(--card);
  border-color: var(--border-hover);
}

.profile-trigger i {
  font-size: 10px;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}

.profile-menu.open .profile-trigger i {
  transform: rotate(180deg);
}

.dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 200px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  animation: dropIn 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown.open {
  display: block;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown a, .dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  text-align: left;
}

.dropdown a:hover, .dropdown button:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

[data-theme="dark"] .dropdown a:hover, [data-theme="dark"] .dropdown button:hover {
  color: #34d399;
}

.dropdown a i, .dropdown button i {
  width: 16px;
  text-align: center;
  font-size: 13px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dropdown button.logout-btn:hover {
  background: var(--accent-rose-light);
  color: var(--accent-rose);
}

/* ==========================================================================
   Page Content & Components
   ========================================================================== */
.content {
  padding: 28px 32px 48px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

.page-heading {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--primary);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.page-heading h1 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  margin: 0 0 4px;
}

.page-heading p {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0;
}

/* Alerts & Flash Messages */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert i {
  font-size: 16px;
  flex-shrink: 0;
}

.alert.success {
  background: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--primary-dark);
}

[data-theme="dark"] .alert.success {
  color: #34d399;
}

.alert.error {
  background: var(--accent-rose-light);
  border-color: rgba(225, 29, 72, 0.25);
  color: var(--accent-rose);
}

/* ==========================================================================
   Dashboard Stats & Cards (Solid 3D Shadowed, No Wobble)
   ========================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.02),
    0 6px 16px -2px rgba(15, 23, 42, 0.06),
    0 12px 24px -4px rgba(15, 23, 42, 0.04),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -2px 0 rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .stat-card {
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.35),
    0 10px 24px -4px rgba(0, 0, 0, 0.55),
    0 18px 36px -6px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.03),
    0 12px 24px -4px rgba(15, 23, 42, 0.08),
    0 22px 38px -6px rgba(16, 185, 129, 0.1),
    inset 0 1.5px 0 rgba(255, 255, 255, 1),
    inset 0 -2px 0 rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .stat-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.4),
    0 16px 36px -4px rgba(0, 0, 0, 0.7),
    0 24px 48px -6px rgba(16, 185, 129, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(16, 185, 129, 0.35);
}

.stat-card:hover::before {
  background: linear-gradient(90deg, var(--primary), #34d399);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  position: relative;
}

.stat-icon i {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-card:hover .stat-icon {
  transform: translateY(-2px);
}

.digital-clock {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.stat-icon.purple {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.2);
  box-shadow: 
    0 6px 16px rgba(124, 58, 237, 0.18),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 3px rgba(124, 58, 237, 0.1);
}

.stat-icon.blue {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.2);
  box-shadow: 
    0 6px 16px rgba(2, 132, 199, 0.18),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 3px rgba(2, 132, 199, 0.1);
}

.stat-icon.green {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: var(--primary-dark);
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow: 
    0 6px 16px rgba(16, 185, 129, 0.2),
    inset 0 1.5px 1px rgba(255, 255, 255, 0.9),
    inset 0 -2px 3px rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .stat-icon.purple { 
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(124, 58, 237, 0.12) 100%);
  color: #c084fc; 
  border-color: rgba(124, 58, 237, 0.35);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2), inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .stat-icon.blue { 
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25) 0%, rgba(2, 132, 199, 0.12) 100%);
  color: #38bdf8; 
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.2), inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .stat-icon.green { 
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(16, 185, 129, 0.12) 100%);
  color: #34d399; 
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2), inset 0 -2px 4px rgba(0, 0, 0, 0.4);
}

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-info span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.stat-info strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .stat-info strong {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.stat-info small {
  display: block;
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

.stat-arrow {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--text-dim);
  font-size: 11px;
  opacity: 0.5;
  transition: all 0.2s ease;
}

.stat-card:hover .stat-arrow {
  opacity: 1;
  color: var(--primary);
  transform: translate(2px, -2px);
}

/* Dashboard Grid & Stable Panels (No Wobble on Tables/Settings) */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 4px 12px -2px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .panel {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 8px 20px -4px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dashboard-grid .panel {
  box-shadow: 
    0 2px 5px rgba(0, 0, 0, 0.03),
    0 8px 20px -3px rgba(15, 23, 42, 0.05),
    0 16px 32px -6px rgba(15, 23, 42, 0.04),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .dashboard-grid .panel {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.35),
    0 10px 24px -4px rgba(0, 0, 0, 0.55),
    0 20px 40px -6px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1.5px 0 rgba(0, 0, 0, 0.35);
}

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

.panel-head h2 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin: 0 0 3px;
}

.panel-head p {
  color: var(--text-muted);
  font-size: 12.5px;
  margin: 0;
}

.period-chip, .secure-label, .activity-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* 3D Chart & Core Rings */
.chart-wrap {
  width: 230px;
  height: 230px;
  position: relative;
  max-width: 100%;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.06));
}

[data-theme="dark"] .chart-wrap canvas {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
}

.chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.04),
    inset 0 2px 5px rgba(0, 0, 0, 0.05),
    inset 0 -1.5px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .chart-center {
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.4),
    inset 0 3px 6px rgba(0, 0, 0, 0.5),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.chart-center strong {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chart-center span {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.chart-floating-tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  z-index: 50;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: translate(-50%, -125%);
}

.chart-floating-tooltip.pos-bottom {
  transform: translate(-50%, 25%);
}

.chart-floating-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.96) transparent transparent transparent;
}

.chart-floating-tooltip.pos-bottom::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent rgba(15, 23, 42, 0.96) transparent;
}

/* 3D Legend Pill Badges */
.legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 
    0 2px 5px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .legend-item {
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.legend-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.06);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: relative;
}

.legend-dot.gray { 
  background: #94a3b8; 
  box-shadow: 0 0 6px rgba(148, 163, 184, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.6);
}
.legend-dot.orange { 
  background: #f59e0b; 
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}
.legend-dot.green { 
  background: #10b981; 
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}
.legend-dot.red { 
  background: #ef4444; 
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.legend-item b {
  color: var(--text);
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Quick Actions */
.quick-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.quick-action:hover {
  background: var(--card-active);
  border-color: var(--border-hover);
  transform: translateX(3px);
}

.quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}

.quick-icon.purple { background: #f5f3ff; color: #7c3aed; }
.quick-icon.blue { background: #f0f9ff; color: #0284c7; }
.quick-icon.orange { background: #fffbeb; color: #d97706; }

[data-theme="dark"] .quick-icon.purple { background: rgba(124, 58, 237, 0.15); color: #a78bfa; }
[data-theme="dark"] .quick-icon.blue { background: rgba(2, 132, 199, 0.15); color: #38bdf8; }
[data-theme="dark"] .quick-icon.orange { background: rgba(217, 119, 6, 0.15); color: #fbbf24; }

.quick-action-content {
  flex: 1;
  min-width: 0;
}

.quick-action-content b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.quick-action-content small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.quick-action i.fa-chevron-right {
  color: var(--text-dim);
  font-size: 11px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-action:hover i.fa-chevron-right {
  color: var(--primary);
  transform: translateX(3px);
}

/* ==========================================================================
   Toolbar, Search & Buttons
   ========================================================================== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 40px;
  transition: all 0.2s ease;
}

.search-form:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-form i.fa-magnifying-glass {
  color: var(--text-dim);
  font-size: 13px;
}

.search-form input {
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  flex: 1;
  font-size: 13px;
}

.search-form input::placeholder {
  color: var(--text-dim);
}

.filter-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-form select, .filter-form input[type="date"] {
  height: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all 0.18s ease;
}

.filter-form select:focus, .filter-form input[type="date"]:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 3px 12px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 5px 16px var(--primary-glow);
}

.btn-ghost {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

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

.btn-danger {
  background: var(--accent-rose);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.08);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

/* Icon Buttons */
.icon-button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  font-size: 13px;
}

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

.icon-button.mini {
  width: 28px;
  height: 28px;
  font-size: 11.5px;
}

.icon-button.danger:hover {
  color: var(--accent-rose);
  background: var(--accent-rose-light);
  border-color: rgba(225, 29, 72, 0.25);
}

.icon-button.primary:hover {
  color: var(--primary-dark);
  background: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   Tables & Data Grid
   ========================================================================== */
.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-panel > .panel-head {
  padding: 18px 22px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

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

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

th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: middle;
  transition: background 0.15s ease;
}

tbody tr:hover td {
  background: var(--card-hover);
}

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

td b {
  color: var(--text);
  font-weight: 600;
}

.id-cell {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
}

.domain-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-weight: 600;
}

.domain-cell i {
  color: var(--primary);
  font-size: 12px;
}

.secret-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.secret-text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
}

.secret-text.masked {
  color: var(--text-dim);
  letter-spacing: 2px;
  font-size: 11px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.badge-no-response {
  background: var(--accent-amber-light);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
.badge-no-response .badge-dot { background: #d97706; }

.badge-replied {
  background: var(--accent-cyan-light);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.25);
}
.badge-replied .badge-dot { background: #0284c7; }

.badge-fixed {
  background: var(--primary-light);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-fixed .badge-dot { background: #10b981; }

[data-theme="dark"] .badge-no-response { color: #fbbf24; }
[data-theme="dark"] .badge-replied { color: #38bdf8; }
[data-theme="dark"] .badge-fixed { color: #34d399; }

.reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid rgba(109, 40, 217, 0.2);
  font-weight: 600;
  font-size: 12px;
}

[data-theme="dark"] .reward-pill {
  background: rgba(124, 58, 237, 0.15);
  color: #c084fc;
}

.file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.empty-state {
  text-align: center;
  padding: 50px 20px !important;
  color: var(--text-dim);
}

.empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  font-size: 22px;
  color: var(--text-dim);
}

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

.empty-state p {
  font-size: 13px;
  max-width: 320px;
  margin: 0 auto 16px;
}

/* ==========================================================================
   Modals & Forms
   ========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  padding: 20px;
  overflow-y: auto;
}

.modal.open {
  display: grid;
  place-items: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--modal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: min(540px, 100%);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalScale 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.modal-wide {
  width: min(700px, 100%);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 3px 0 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

input, textarea, select {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9.5px 13px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all 0.18s ease;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--card);
}

textarea {
  resize: vertical;
  min-height: 75px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.password-input-wrap {
  position: relative;
  display: flex;
}

.password-input-wrap input {
  flex: 1;
  padding-right: 40px;
}

.password-toggle-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 38px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  transition: color 0.18s ease;
}

.password-toggle-btn:hover {
  color: var(--primary);
}

.input-helper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}

.form-help {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}

.generate-pwd-btn, .today-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.generate-pwd-btn:hover, .today-btn:hover {
  background: var(--primary-light);
}

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

/* Detail View Modal Grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item.full {
  grid-column: span 2;
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.note-content-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 380px;
}

.study-textarea {
  min-height: 220px;
  resize: vertical;
}

.study-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.study-status.completed {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.study-status.pending {
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-page {
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 12px;
}

.pagination-page:hover, .pagination-page.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--border-hover);
}

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

.icon-button.success {
  color: var(--primary-dark);
}

.icon-button.success:hover {
  background: var(--primary-light);
  border-color: var(--border-hover);
}

/* ==========================================================================
   Settings & Activity Logs
   ========================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}

.settings-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  height: max-content;
  box-shadow: var(--shadow-sm);
}

.settings-avatar-wrap {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.settings-avatar-wrap .avatar-lg {
  margin: 0 auto 10px;
}

.settings-avatar-wrap b {
  font-size: 15px;
  color: var(--text);
  display: block;
}

.settings-avatar-wrap small {
  font-size: 12px;
  color: var(--text-muted);
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.18s ease;
  margin-bottom: 4px;
}

.settings-nav-item:hover, .settings-nav-item.active {
  background: var(--primary-light);
  color: var(--primary-dark);
}

[data-theme="dark"] .settings-nav-item:hover, [data-theme="dark"] .settings-nav-item.active {
  color: #34d399;
}

.section-divider {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-top: 10px;
}

/* Password Strength Indicator */
.strength-meter {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-text {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 360px;
  width: 100%;
}

.toast {
  pointer-events: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 12.5px;
  color: var(--text);
  animation: toastIn 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast.success::before { background: var(--primary); }
.toast.error::before { background: var(--accent-rose); }
.toast.info::before { background: var(--accent-cyan); }
.toast.warning::before { background: var(--accent-amber); }

.toast.success i { color: var(--primary); }
.toast.error i { color: var(--accent-rose); }
.toast.info i { color: var(--accent-cyan); }
.toast.warning i { color: var(--accent-amber); }

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

.toast.removing {
  opacity: 0;
  transform: translateX(25px);
}

.toast-msg {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.toast-close {
  color: var(--text-dim);
  cursor: pointer;
  padding: 2px;
}

.toast-close:hover {
  color: var(--text);
}

/* ==========================================================================
   Login Page (Centered Planet / Cyber Space Theme)
   ========================================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #080d19;
  position: relative;
  overflow: hidden;
}

/* Glowing Planet Element in Background */
.login-bg-planet {
  position: absolute;
  top: -140px;
  right: -100px;
  width: 650px;
  height: 650px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(16, 185, 129, 0.45) 0%, rgba(5, 150, 105, 0.2) 40%, rgba(6, 78, 59, 0.05) 70%, transparent 100%);
  filter: blur(40px);
  pointer-events: none;
  animation: floatPlanet 14s ease-in-out infinite alternate;
}

.login-bg-stars {
  position: absolute;
  bottom: -160px;
  left: -120px;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(2, 132, 199, 0.25) 0%, rgba(16, 185, 129, 0.1) 45%, transparent 75%);
  filter: blur(55px);
  pointer-events: none;
}

@keyframes floatPlanet {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(25px) scale(1.05); }
}

.login-card-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  padding: 24px 16px;
  margin: auto;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(16, 185, 129, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .login-card {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
}

.login-card-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.login-card-brand .brand-mark {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.login-card-brand .brand-title {
  color: var(--text);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.4px;
}

.login-card-brand .brand-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.login-card h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin: 0 0 4px;
  color: var(--text);
}

.login-card p.muted {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 22px;
}

.login-card-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
}

.login-card-footer i {
  color: var(--primary);
}

/* ==========================================================================
   Dashboard Live Terminal Widget (3D Layered & Deep Cyber Palette)
   ========================================================================== */
.dash-terminal {
  flex: 1;
  margin: 0;
  height: 290px;
  max-height: 290px;
  background: #080f1d;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 
    0 10px 25px -4px rgba(0, 0, 0, 0.4),
    0 20px 45px -8px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(16, 185, 129, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.dash-terminal:hover {
  box-shadow: 
    0 12px 30px -4px rgba(0, 0, 0, 0.5),
    0 24px 55px -6px rgba(0, 0, 0, 0.6),
    0 0 32px rgba(16, 185, 129, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -2px 0 rgba(16, 185, 129, 0.3);
}

.terminal-bar {
  background: linear-gradient(180deg, #18263e 0%, #101c30 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  transition: transform 0.2s ease;
}

.terminal-dot:hover {
  transform: scale(1.2);
}

.t-red    { background: #ff5f57; box-shadow: 0 0 8px rgba(255, 95, 87, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.5); }
.t-yellow { background: #febc2e; box-shadow: 0 0 8px rgba(254, 188, 46, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.5); }
.t-green  { background: #28c840; box-shadow: 0 0 8px rgba(40, 200, 64, 0.7), inset 0 1px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 2px rgba(0, 0, 0, 0.5); }

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.terminal-body {
  padding: 12px 16px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.75;
  color: #e2e8f0;
  background: #0b1322;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.3) transparent;
}

.terminal-body::-webkit-scrollbar { width: 4px; }
.terminal-body::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.3); border-radius: 4px; }

.term-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: var(--font-mono);
}

.term-line.visible {
  opacity: 1;
  transform: translateY(0);
}

.term-prompt {
  color: #10b981;
  font-weight: 700;
  user-select: none;
  flex-shrink: 0;
}

.term-cmd {
  color: #38bdf8;
  font-weight: 600;
}

.term-ok {
  color: #34d399;
}

.term-warn {
  color: #fbbf24;
}

.term-info {
  color: #60a5fa;
}

.term-dim {
  color: #64748b;
}

.term-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: #10b981;
  border-radius: 1px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ==========================================================================
   Comprehensive Responsive System (Tablet & Mobile)
   ========================================================================== */
@media (max-width: 992px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Layout Shell & Off-Canvas Mobile Sidebar */
  .app-shell {
    position: relative;
    overflow-x: hidden;
  }

  .main {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 270px;
    max-width: 82vw;
    z-index: 1000;
    transform: translateX(-100%);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
    opacity: 1;
  }

  .app-shell.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }

  /* Topbar */
  .topbar {
    padding: 0 14px;
    height: 58px;
    gap: 10px;
  }

  .crumb {
    font-size: 13px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-actions {
    gap: 8px;
  }

  .profile-trigger {
    padding: 4px 8px;
    gap: 6px;
  }

  .profile-trigger span {
    display: none;
  }

  /* Content */
  .content {
    padding: 16px 12px 36px;
  }

  .page-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 16px;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .page-heading p {
    font-size: 12px;
  }

  .page-heading .btn {
    width: 100%;
    justify-content: center;
  }

  /* Stat Grid */
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 15px 18px;
    gap: 14px;
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .stat-info strong {
    font-size: 22px;
  }

  /* Dashboard Panels */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .panel {
    padding: 18px 14px;
  }

  .dash-terminal {
    height: 250px;
    max-height: 250px;
  }

  .chart-wrap {
    width: 190px;
    height: 190px;
  }

  .chart-center {
    width: 110px;
    height: 110px;
  }

  .chart-center strong {
    font-size: 24px;
  }

  .legend {
    gap: 8px;
    font-size: 11px;
    padding-top: 14px;
  }

  .legend-item {
    padding: 4px 8px;
    font-size: 11px;
  }

  /* Toolbar, Search & Filters */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }

  .search-form {
    max-width: 100%;
    width: 100%;
    height: 42px;
  }

  .toolbar .btn {
    width: 100%;
    height: 42px;
    justify-content: center;
  }

  .filter-form {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-form select {
    flex: 1 1 100%;
    height: 40px;
  }

  .filter-form input[type="date"] {
    flex: 1 1 calc(55% - 4px);
    height: 40px;
    min-width: 120px;
  }

  .filter-form .btn {
    flex: 1 1 auto;
    height: 40px;
    justify-content: center;
  }

  /* Tables & Scroll */
  .table-panel > .panel-head {
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    display: block;
  }

  table {
    min-width: 580px;
  }

  th {
    padding: 10px 12px;
    font-size: 10.5px;
  }

  td {
    padding: 12px;
    font-size: 12.5px;
  }

  /* Forms & Modals */
  .form-grid,
  .form-grid.grid-3 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  input,
  textarea,
  select {
    font-size: 14.5px;
    padding: 10px 12px;
  }

  .modal {
    padding: 10px;
    align-items: flex-end;
  }

  .modal.open {
    display: flex;
  }

  .modal-card,
  .modal-wide {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    max-height: 88vh;
  }

  .modal-head {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .modal-actions {
    flex-direction: column-reverse;
    gap: 8px;
    margin-top: 18px;
  }

  .modal-actions .btn {
    width: 100%;
    height: 42px;
    justify-content: center;
  }

  /* Settings Page */
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .settings-sidebar {
    padding: 16px;
  }

  .settings-avatar-wrap {
    margin-bottom: 12px;
  }
}

/* ==========================================================================
   Login Page Responsive Mobile Overrides
   ========================================================================== */
@media (max-width: 640px) {
  .login-page {
    min-height: 100dvh;
    padding: 20px 16px;
    align-items: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .login-bg-planet {
    width: 300px;
    height: 300px;
    top: -60px;
    right: -60px;
    filter: blur(35px);
  }

  .login-bg-stars {
    width: 250px;
    height: 250px;
    bottom: -60px;
    left: -50px;
    filter: blur(40px);
  }

  .login-card-wrap {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: auto 0;
  }

  .login-card {
    padding: 26px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 25px rgba(16, 185, 129, 0.1);
  }

  .login-card-brand {
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }

  .login-card-brand .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 15px;
    border-radius: 8px;
  }

  .login-card-brand .brand-title {
    font-size: 15px;
  }

  .login-card h1 {
    font-size: 21px;
    margin-bottom: 3px;
  }

  .login-card p.muted {
    font-size: 12.5px;
    margin-bottom: 18px;
  }

  .login-card .stack {
    gap: 14px;
  }

  .login-card input {
    font-size: 15px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
  }

  .login-card .password-toggle-btn {
    width: 42px;
    font-size: 15px;
  }

  .login-card .btn {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
  }

  .login-card-footer {
    margin-top: 20px;
    padding-top: 14px;
    font-size: 11px;
  }
}

/* ========================================================================== 
   Burp HTTP History
   ========================================================================== */
.burp-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.burp-heading h1 { margin:0 0 6px; font-size:24px; letter-spacing:-.5px; }
.burp-heading p, .muted { color:var(--text-muted); font-size:13px; margin:0; }
.burp-row { cursor:pointer; }
.burp-url { max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-family:var(--font-mono); font-size:12px; }
.http-badge { display:inline-flex; align-items:center; border:1px solid var(--border); border-radius:5px; padding:3px 7px; font:700 11px var(--font-mono); white-space:nowrap; }
.method-get { color:#047857; background:var(--primary-light); border-color:rgba(16,185,129,.25); }
.method-post { color:#0369a1; background:var(--accent-cyan-light); border-color:rgba(2,132,199,.25); }
.method-put, .method-patch { color:#7c3aed; background:#f5f3ff; border-color:#ddd6fe; }
.method-delete { color:#be123c; background:var(--accent-rose-light); border-color:rgba(225,29,72,.25); }
.method-head, .method-options { color:#b45309; background:var(--accent-amber-light); border-color:rgba(217,119,6,.25); }
.status-s2 { color:#047857; background:var(--primary-light); border-color:rgba(16,185,129,.25); }
.status-s3 { color:#0369a1; background:var(--accent-cyan-light); border-color:rgba(2,132,199,.25); }
.status-s4 { color:#b45309; background:var(--accent-amber-light); border-color:rgba(217,119,6,.25); }
.status-s5 { color:#be123c; background:var(--accent-rose-light); border-color:rgba(225,29,72,.25); }
.status-none { color:var(--text-dim); background:var(--bg-subtle); }
.burp-modal-card { width:min(960px, 100%); }
.burp-tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:16px; }
.burp-tab { color:var(--text-muted); font:700 12px var(--font-mono); padding:10px 14px; border-bottom:2px solid transparent; }
.burp-tab.active { color:var(--primary-dark); border-color:var(--primary); }
.burp-section { margin:14px 0 20px; }
.burp-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.burp-section h3 { margin:0; font-size:13px; color:var(--text); }
.burp-code { margin:0; padding:14px; max-height:310px; overflow:auto; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-subtle); color:var(--text); font:12px/1.65 var(--font-mono); white-space:pre-wrap; word-break:break-word; }
.burp-code.no-wrap { white-space:pre; word-break:normal; }
.burp-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.burp-detail-item { padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--bg-subtle); }
.burp-detail-item small { display:block; margin-bottom:3px; color:var(--text-dim); font:700 10px var(--font-mono); text-transform:uppercase; }
.burp-detail-item b { font-size:12px; color:var(--text); overflow-wrap:anywhere; }
.burp-actions { display:flex; gap:7px; }
.burp-copy { height:27px; padding:0 9px; font-size:11px; }
.burp-loading { padding:30px; text-align:center; color:var(--text-muted); }
[data-theme="dark"] .method-put, [data-theme="dark"] .method-patch { color:#c4b5fd; background:rgba(124,58,237,.16); border-color:rgba(167,139,250,.3); }
@media (max-width:768px) { .burp-heading { flex-direction:column; } .burp-heading .btn { width:100%; } .burp-detail-grid { grid-template-columns:1fr; } .burp-url { max-width:220px; } }
.burp-heading-actions { display:flex; gap:8px; flex-wrap:wrap; } .burp-heading-actions form { margin:0; }

/* ==========================================================================
   Burp History Modern Filter Panel & Asset Toggles
   ========================================================================== */
.burp-filter-panel {
  padding: 16px 20px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03), 0 8px 18px -4px rgba(0, 0, 0, 0.03);
}

.burp-filter-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.burp-filter-top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.burp-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 42px;
  transition: all 0.2s ease;
}

.burp-search-box:focus-within {
  border-color: var(--border-focus);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.burp-search-box i.fa-magnifying-glass {
  color: var(--text-dim);
  font-size: 14px;
}

.burp-search-box input {
  border: none;
  background: transparent;
  color: var(--text);
  outline: none;
  flex: 1;
  font-size: 13.5px;
}

.burp-search-clear {
  color: var(--text-dim);
  font-size: 14px;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.15s ease;
}

.burp-search-clear:hover {
  color: var(--accent-rose);
}

.burp-quick-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.burp-toggle-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.burp-toggle-badge input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.burp-toggle-badge:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--card-hover);
}

.burp-toggle-badge.active {
  background: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--primary-dark);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

[data-theme="dark"] .burp-toggle-badge.active {
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(52, 211, 153, 0.4);
}

/* Grid Kolom Filter Teratur */
.burp-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: flex-end;
}

.filter-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-col label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.filter-col label i {
  font-size: 11px;
  color: var(--primary);
}

.filter-col select,
.filter-col input[type="text"],
.filter-col input[type="date"] {
  width: 100%;
  height: 40px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all 0.18s ease;
}

.filter-col select:focus,
.filter-col input[type="text"]:focus,
.filter-col input[type="date"]:focus {
  background: var(--card);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-actions {
  min-width: 130px;
}

.filter-btn-row {
  display: flex;
  gap: 6px;
  height: 40px;
}

.btn-filter {
  flex: 1;
  height: 40px;
}

.btn-reset {
  height: 40px;
  padding: 0 12px;
}

/* Active Filter Pills */
.burp-active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.active-label {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.filter-chip a {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s ease;
}

.filter-chip a:hover {
  color: var(--accent-rose);
}

.filter-chip.chip-emerald {
  background: var(--primary-light);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--primary-dark);
}

[data-theme="dark"] .filter-chip.chip-emerald {
  color: #34d399;
}

.filter-chip-reset {
  color: var(--accent-rose);
  font-size: 11.5px;
  font-weight: 600;
  margin-left: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.filter-chip-reset:hover {
  background: var(--accent-rose-light);
}

@media (max-width: 900px) {
  .burp-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-actions {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .burp-filter-grid {
    grid-template-columns: 1fr;
  }
  .filter-actions {
    grid-column: span 1;
  }
}

/* ==========================================================================
   Vulnerable Websites Feature (Katalog & Detail Target Rentan)
   ========================================================================== */
.vuln-header-banner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.vuln-header-info h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.vuln-header-info p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

.vuln-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.vuln-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.vuln-card:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .vuln-card:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 8px 24px -4px rgba(16, 185, 129, 0.25), 0 2px 6px rgba(0, 0, 0, 0.4);
}

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

.vuln-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  font-size: 19px;
  flex-shrink: 0;
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.vuln-target-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--bg-hover, rgba(0, 0, 0, 0.04));
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.vuln-target-badge.has-targets {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .vuln-target-badge.has-targets {
  color: #34d399;
}

.vuln-custom-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
  margin-left: 6px;
}

[data-theme="dark"] .vuln-custom-badge {
  color: #60a5fa;
}

.vuln-card-body {
  flex: 1;
  margin-bottom: 16px;
}

.vuln-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--text-main);
}

.vuln-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vuln-slug {
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  word-break: break-all;
}

[data-theme="dark"] .vuln-slug {
  background: rgba(255, 255, 255, 0.04);
}

.vuln-card-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.vuln-card-footer .btn-block {
  width: 100%;
  justify-content: center;
}

.vuln-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.vuln-card-actions > button,
.vuln-card-actions > form {
  flex: 1;
  margin: 0;
}

.vuln-card-actions form {
  display: flex;
}

.vuln-card-actions .btn {
  width: 100%;
  justify-content: center;
}

.btn-danger-ghost {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent-rose);
}

.btn-danger-ghost:hover {
  background: var(--accent-rose-light);
  border-color: rgba(225, 29, 72, 0.3);
  color: var(--accent-rose);
}

[data-theme="dark"] .btn-danger-ghost {
  background: var(--card);
  border-color: var(--border);
  color: #f87171;
}

[data-theme="dark"] .btn-danger-ghost:hover {
  background: rgba(225, 29, 72, 0.15);
  border-color: rgba(225, 29, 72, 0.4);
  color: #fb7185;
}

/* Execution Preview Monospace Box */
.execution-preview {
  max-width: 380px;
  background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

[data-theme="dark"] .execution-preview {
  background: rgba(0, 0, 0, 0.25);
}

.execution-preview code {
  font-family: inherit;
  color: inherit;
}

@media (max-width: 768px) {
  .vuln-grid {
    grid-template-columns: 1fr;
  }
  .execution-preview {
    max-width: 200px;
  }
}
