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

:root {
  --primary: #6C3CE7;
  --primary-dark: #5A2DD1;
  --primary-light: #8B6CF0;
  --primary-glow: rgba(108,60,231,0.12);
  --primary-bg: rgba(108,60,231,0.06);
  --secondary: #00CEC9;
  --accent: #FD79A8;
  --danger: #E74C3C;
  --danger-light: #FFF0EE;
  --warning: #F39C12;
  --warning-light: #FFF8E8;
  --success: #2ECC71;
  --success-light: #EAFFF3;
  --dark: #1A1A2E;
  --dark-medium: #2D2D44;
  --text: #333340;
  --text-light: #7C7C8D;
  --text-muted: #A0A0B0;
  --border: #E8E8F0;
  --border-light: #F0F0F6;
  --bg: #F5F5FA;
  --bg-card: #FFFFFF;
  --sidebar-w: 250px;
  --topbar-h: 60px;
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --transition: all 0.25s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
  --primary: #8B6CF0;
  --primary-dark: #7C5CE7;
  --primary-light: #A78BFA;
  --primary-glow: rgba(139,108,240,0.15);
  --primary-bg: rgba(139,108,240,0.08);
  --secondary: #00CEC9;
  --accent: #FD79A8;
  --danger: #FF6B6B;
  --danger-light: #2D1F1F;
  --warning: #FECA57;
  --warning-light: #2D2A1A;
  --success: #2ECC71;
  --success-light: #1A2D1F;
  --dark: #E8E8F0;
  --dark-medium: #C0C0D0;
  --text: #D0D0DD;
  --text-light: #9090A5;
  --text-muted: #606075;
  --border: #2A2A3E;
  --border-light: #222236;
  --bg: #0F0F1A;
  --bg-card: #16162A;
  --sidebar-bg: #12121F;
  --shadow-xs: 0 1px 3px rgba(0,0,0,0.2);
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
}

[data-theme="dark"] .sidebar {
  background: var(--sidebar-bg);
  border-right-color: var(--border);
}

[data-theme="dark"] .topbar {
  background: var(--bg-card);
  border-bottom-color: var(--border);
}

[data-theme="dark"] .navbar,
[data-theme="dark"] .topbar { backdrop-filter: none; }

[data-theme="dark"] .login-page {
  background: linear-gradient(135deg, #0F0F1A, #1A1A30);
}

[data-theme="dark"] .login-card {
  background: var(--bg-card);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

[data-theme="dark"] .ph-stat-card.ph-stat-alert {
  background: linear-gradient(135deg, #1A2D1F 0%, #162A20 50%, rgba(139,108,240,0.05) 100%);
  border-color: rgba(46,204,113,0.15);
}

[data-theme="dark"] .ph-brand-icon {
  background: linear-gradient(135deg, #2A2A3E, #1A1A2E);
}

[data-theme="dark"] .ph-card-preview {
  background: linear-gradient(135deg, #1A1A2E, #12121F);
}

[data-theme="dark"] .stat-card.alert {
  background: linear-gradient(135deg, #1A2D1F, #162A20);
  border-color: rgba(46,204,113,0.15);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .search-field,
[data-theme="dark"] .select-field {
  background: #0F0F1A;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .search-field:focus {
  background: var(--bg-card);
  border-color: var(--primary);
}

[data-theme="dark"] .ph-card-btn.safe-btn {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .links-table th {
  background: #0F0F1A;
}

[data-theme="dark"] .tab-filters {
  background: #0F0F1A;
}

[data-theme="dark"] .tab-filter.active {
  background: var(--bg-card);
}

[data-theme="dark"] .saldo-badge { color: var(--text); }
[data-theme="dark"] .user-email { color: var(--text); }
[data-theme="dark"] .btn-deposit { background: #E74C3C; }

[data-theme="dark"] .check-hero {
  background: var(--bg-card);
  border-color: var(--border);
}

[data-theme="dark"] .check-input-wrap input {
  background: #0F0F1A;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .check-input-wrap input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

[data-theme="dark"] .info-box {
  background: #0F0F1A;
  border-color: var(--border);
}

/* Dark mode: info rows harus terbaca jelas */
[data-theme="dark"] .info-row {
  border-bottom-color: #2A2A3E;
}

[data-theme="dark"] .info-label {
  color: #8B8BA8;
}

[data-theme="dark"] .info-value {
  color: #E8E8F0;
}

[data-theme="dark"] .info-value code {
  background: #1E1E35;
  color: #A78BFA;
}

[data-theme="dark"] .info-row:hover {
  background: rgba(139,108,240,0.08);
}

[data-theme="dark"] .seo-result-card {
  background: #16162A;
  border-color: #2A2A3E;
}

[data-theme="dark"] .seo-result-card h3 {
  color: #E8E8F0;
}

/* Dark mode: rt-input-card & rt-label */
[data-theme="dark"] .rt-input-card {
  background: #16162A;
  border-color: #2A2A3E;
}

[data-theme="dark"] .rt-label {
  color: #9090A5;
}

/* Dark mode: redirect chain */
[data-theme="dark"] .redirect-step .redirect-info {
  color: #E8E8F0;
}

[data-theme="dark"] .redirect-url {
  color: #A78BFA;
}

[data-theme="dark"] ::-webkit-scrollbar-track { background: #0F0F1A; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2A2A3E; }

/* Language Selector */
.lang-selector {
  position: relative;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}

.lang-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  width: 220px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  padding: 6px;
}

.lang-dropdown.show { display: block; animation: modalIn 0.2s ease; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text);
  transition: var(--transition);
  text-align: left;
  font-family: inherit;
}

.lang-option:hover { background: var(--primary-bg); color: var(--primary); }
.lang-option.active { background: var(--primary-glow); color: var(--primary); font-weight: 700; }

.lang-flag { font-size: 1.1rem; flex-shrink: 0; }
.lang-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

[data-theme="dark"] .lang-dropdown { background: #16162A; border-color: #2A2A3E; }
[data-theme="dark"] .lang-toggle { background: #0F0F1A; border-color: #2A2A3E; color: var(--text); }

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-light);
  flex-shrink: 0;
}

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

/* Session timer badge */
.session-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: var(--transition);
  flex-shrink: 0;
}

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

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(108,60,231,0.25);
}

.sidebar-brand .brand-text {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sidebar-brand .brand-text span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.sidebar-section {
  margin-bottom: 24px;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-new {
  background: var(--success);
  color: white;
  font-size: 0.55rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-light);
  transition: var(--transition);
  margin-bottom: 2px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-link:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.sidebar-link.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link.active svg { opacity: 1; }

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* ===== TOP BAR ===== */
/* Top Progress Bar */
.top-progress {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 60;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.top-progress.active { opacity: 1; }

.top-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 0 3px 3px 0;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(108,60,231,0.4);
}

/* Shimmer animation saat loading */
.top-progress.loading .top-progress-bar {
  width: 100% !important;
  animation: topProgressShimmer 1.5s ease-in-out infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary));
}

@keyframes topProgressShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.saldo-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.saldo-badge .saldo-amount {
  color: var(--warning);
  font-family: var(--font-mono);
}

.saldo-badge .coin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  box-shadow: 0 0 6px rgba(255,165,0,0.4);
}

.btn {
  padding: 8px 20px;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.82rem;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: -0.01em;
}

.btn-deposit {
  background: var(--danger);
  color: white;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.btn-deposit:hover { background: #C0392B; }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(108,60,231,0.25);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(108,60,231,0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-light);
}

.btn-ghost:hover { background: var(--bg); }

.btn-sm { padding: 6px 14px; font-size: 0.78rem; }
.btn-lg { padding: 10px 24px; font-size: 0.88rem; }

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

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.user-info:hover { background: var(--bg); }

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.78rem;
}

.user-email {
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 500;
}

/* ===== PAGE CONTENT ===== */
.page-content {
  flex: 1;
  padding: 24px;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Force semua child di page-content tidak meluap */
.page-content *  {
  max-width: 100%;
  box-sizing: border-box;
}

.page-section {
  max-width: 100%;
  overflow-x: hidden;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a { color: var(--text-light); transition: var(--transition); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .active { color: var(--primary); font-weight: 600; }
.breadcrumb svg { width: 12px; height: 12px; }

/* Page Title */
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  padding-bottom: 14px;
  position: relative;
}

/* Gradient line di bawah semua page title */
.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #E74C3C 0%,
    #E67E22 15%,
    #F1C40F 30%,
    #E67E22 50%,
    #E74C3C 70%,
    #C0392B 85%,
    #922B21 100%
  );
  opacity: 0.85;
  box-shadow: 0 1px 6px rgba(231,76,60,0.25);
}

/* Jika page-title di dalam page-title-nav, jangan double line */
.page-title-nav .page-title::after {
  display: none;
}

/* Page Title with Navigation Arrows */
.page-title-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  position: relative;
}

/* Gradient separator line di bawah title */
.page-title-nav::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    #E74C3C 0%,
    #E67E22 15%,
    #F1C40F 30%,
    #E67E22 50%,
    #E74C3C 70%,
    #C0392B 85%,
    #922B21 100%
  );
  opacity: 0.85;
  box-shadow: 0 1px 6px rgba(231,76,60,0.25);
}

.page-title-nav .page-title {
  margin-bottom: 0;
  flex: 1;
}

.nav-arrow {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-light);
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-arrow:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.nav-arrow:active {
  transform: scale(0.95);
}

/* ===== STAT CARDS ===== */
.stat-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow); }

.stat-card.alert {
  background: linear-gradient(135deg, #E8FFE8 0%, #F0FFF4 50%, rgba(108,60,231,0.03) 100%);
  border-color: rgba(46,204,113,0.15);
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card .stat-icon.warning-icon {
  background: var(--warning-light);
  color: var(--warning);
}

.stat-card .stat-icon.primary-icon {
  background: var(--primary-glow);
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.stat-card .stat-label.danger { color: var(--danger); font-weight: 700; }

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-card .stat-value small {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Circle Progress */
.circle-progress {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--progress, 75%), var(--border-light) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.circle-progress-inner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== TAB BAR ===== */
.tab-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.tab-filters {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius-sm);
}

.tab-filter {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  background: transparent;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-filter.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.tab-filter:hover:not(.active) { color: var(--text); }

.tab-filter .count {
  font-size: 0.7rem;
  background: var(--primary-glow);
  color: var(--primary);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.tab-filter.active .count {
  background: var(--primary);
  color: white;
}

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

.select-field {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237C7C8D' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  min-width: 140px;
}

.select-field:focus { outline: none; border-color: var(--primary); }

.search-field {
  padding: 8px 14px 8px 34px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg-card);
  transition: var(--transition);
  width: 180px;
}

.search-field::placeholder { color: var(--text-muted); }
.search-field:focus { outline: none; border-color: var(--primary); width: 220px; }

.search-wrap {
  position: relative;
}

.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* ===== LINKS TABLE ===== */
.links-table-wrap {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

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

.links-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.links-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.88rem;
  vertical-align: middle;
}

.links-table tr:last-child td { border-bottom: none; }
.links-table tr:hover td { background: rgba(108,60,231,0.015); }

/* Link Cell */
.link-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-favicon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.link-favicon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.link-url {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
}

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

/* Status Cell */
.status-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.freq-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: var(--primary);
  color: white;
}

.freq-badge.slow { background: var(--text-muted); }

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-light);
}

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

.status-indicator .dot.checking { background: var(--warning); animation: blink 1.5s infinite; }
.status-indicator .dot.active { background: var(--success); }
.status-indicator .dot.blocked { background: var(--danger); }
.status-indicator .dot.inactive { background: var(--text-muted); }

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

/* Actions Cell */
.actions-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}

/* Toggle Switch */
.toggle {
  position: relative;
  width: 38px;
  height: 20px;
  cursor: pointer;
}

.toggle input { display: none; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 20px;
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  top: 2px;
  left: 2px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

.action-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.action-btn:hover { background: var(--bg); color: var(--primary); }
.action-btn.delete:hover { background: var(--danger-light); color: var(--danger); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state svg { margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.88rem; color: var(--text-muted); }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,46,0.5);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
  animation: modalIn 0.25s ease;
  position: relative;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--transition);
}

.modal-close:hover { background: var(--border); color: var(--text); }

.modal h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.modal .modal-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.88rem;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(108,60,231,0.08);
}

.form-group input::placeholder { color: var(--text-muted); }

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn { flex: 1; padding: 10px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 300;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
}

.toast.show { transform: translateX(0); }
.toast.success { background: var(--success); color: white; }
.toast.error { background: var(--danger); color: white; }
.toast.warning { background: var(--warning); color: white; }

/* ===== REALTIME CHECK PAGE ===== */
.check-hero {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  text-align: left;
}

.check-hero h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--dark);
}

.check-hero p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.check-input-wrap {
  display: flex;
  gap: 10px;
  max-width: 100%;
  margin: 0;
}

.check-input-wrap input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  transition: var(--transition);
}

.check-input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(108,60,231,0.08);
}

.check-input-wrap .btn { padding: 12px 28px; white-space: nowrap; }

/* Results Section */
.results-section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.results-section.active { display: block; }

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

.result-header {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.result-domain-info h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.result-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

.result-badge.clean { background: var(--success-light); color: var(--success); border: 1px solid rgba(46,204,113,0.15); }
.result-badge.blocked { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(231,76,60,0.15); }
.result-badge.partial { background: var(--warning-light); color: var(--warning); border: 1px solid rgba(243,156,18,0.15); }

.result-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.result-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.result-stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.result-stat .label { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.result-stat.open .num { color: var(--success); }
.result-stat.blocked .num { color: var(--danger); }
.result-stat.timeout .num { color: var(--warning); }

/* ISP Grid */
.isp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.isp-row {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.isp-row:hover { border-color: var(--border); box-shadow: var(--shadow-xs); }

.isp-row .isp-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.isp-row .isp-dns {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.isp-row .isp-detail {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

.isp-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.isp-badge.open { background: var(--success-light); color: var(--success); }
.isp-badge.blocked { background: var(--danger-light); color: var(--danger); }
.isp-badge.timeout { background: var(--warning-light); color: var(--warning); }

.isp-type-badge {
  font-size: 0.6rem;
  background: rgba(253,121,168,0.1);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  margin-left: 6px;
}

/* ===== LOADING ===== */
.loading-overlay {
  display: none;
  text-align: center;
  padding: 40px;
}

.loading-overlay.active { display: block; animation: fadeIn 0.3s ease; }

.spinner-dual {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  position: relative;
}

.spinner-dual .ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-dual .ring:nth-child(2) {
  inset: 6px;
  border-top-color: var(--secondary);
  animation-duration: 1.1s;
  animation-direction: reverse;
}

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

.loading-text { font-size: 0.88rem; color: var(--text-light); font-weight: 500; }
.loading-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

/* Loading bar */
.progress-bar {
  max-width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin: 12px auto 0;
}

.progress-bar .bar {
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 3px;
  animation: progressSlide 1.2s ease-in-out infinite;
}

@keyframes progressSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ===== LOGIN PAGE ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #F0F0FF, #E8E4FF);
  padding: 2rem;
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.login-card .brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 15px rgba(108,60,231,0.3);
}

.login-card h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.login-card .login-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.login-card .form-group { text-align: left; }

.login-card .btn { width: 100%; padding: 12px; margin-top: 8px; font-size: 0.92rem; }

/* Login error & lockout */
.login-error {
  background: var(--danger-light);
  border: 1px solid rgba(231,76,60,0.2);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
  text-align: center;
  animation: shakeError 0.4s ease;
}

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

.login-lockout {
  background: var(--warning-light);
  border: 1px solid rgba(243,156,18,0.2);
  color: #B45309;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  margin-bottom: 12px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-lockout svg { flex-shrink: 0; color: var(--warning); }
.login-lockout strong { color: var(--danger); font-size: 1rem; }

[data-theme="dark"] .login-error { background: #2D1F1F; border-color: rgba(231,76,60,0.3); }
[data-theme="dark"] .login-lockout { background: #2D2A1A; border-color: rgba(243,156,18,0.3); color: #FECA57; }

.login-footer {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-footer a { color: var(--primary); font-weight: 700; cursor: pointer; }
.login-footer a:hover { text-decoration: underline; }

/* ===== HISTORY PAGE ===== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

.history-item:hover { box-shadow: var(--shadow-xs); }

.history-domain { font-weight: 700; font-size: 0.88rem; color: var(--dark); }
.history-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); z-index: 150; }
  .stat-cards { grid-template-columns: 1fr; }
  .tab-bar { flex-direction: column; align-items: stretch; }
  .tab-actions { flex-wrap: wrap; }
  .result-stats { grid-template-columns: 1fr; }
  .isp-grid { grid-template-columns: 1fr; }
  .check-input-wrap { flex-direction: column; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .mobile-toggle { display: flex !important; }
}

.mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 140;
}

.mobile-overlay.active { display: block; }

/* Info box */
.info-box {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-top: 16px;
}

.info-box h4 { font-size: 0.82rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.info-box p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.7; }

/* ===== DEPOSIT MODAL ===== */
.deposit-packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.deposit-pkg {
  position: relative;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg);
}

.deposit-pkg:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.deposit-pkg input { display: none; }
.deposit-pkg input:checked ~ .pkg-coin,
.deposit-pkg input:checked ~ .pkg-price { color: var(--primary); }

.deposit-pkg:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 3px rgba(108,60,231,0.1);
}

.deposit-pkg.popular { border-color: var(--primary-light); }

.pkg-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 0.55rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.pkg-coin {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.2;
}

.pkg-coin small { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }

.pkg-price {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Deposit Summary */
.deposit-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.deposit-price-tag {
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Payment Section */
.payment-section {
  margin-bottom: 16px;
}

.payment-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}

.payment-option:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.payment-option.selected {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 2px rgba(108,60,231,0.1);
}

.payment-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font);
}

.payment-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}

/* Payment Detail Card */
.payment-detail-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 12px;
}

.payment-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
}

.payment-detail-row {
  margin-bottom: 14px;
}

.payment-detail-row:last-child { margin-bottom: 0; }

.payment-detail-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.payment-detail-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
}

.payment-detail-value code {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark);
  letter-spacing: 0.5px;
}

.payment-detail-value.copyable {
  cursor: pointer;
  transition: var(--transition);
}

.payment-detail-value.copyable:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.payment-detail-value.copyable:active {
  transform: scale(0.98);
}

.payment-detail-value svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Payment Notice */
.payment-notice {
  display: flex;
  gap: 10px;
  background: var(--warning-light);
  border: 1px solid rgba(243,156,18,0.15);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 12px;
}

.payment-notice svg { flex-shrink: 0; color: var(--warning); margin-top: 2px; }

.payment-notice strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 2px;
}

.payment-notice p {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* Responsive deposit */
@media (max-width: 600px) {
  .deposit-packages { grid-template-columns: repeat(2, 1fr); }
  .payment-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== WHOIS / DNS / SEO RESULT TABLE ===== */
/* Tidak pakai <table> lagi - pakai div rows agar tidak terpotong */
.whois-table {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.whois-table thead { display: none; }
.whois-table tbody { display: flex; flex-direction: column; gap: 0; }

.whois-table tr {
  display: flex;
  flex-direction: row;
  border-bottom: 1px solid var(--border-light);
  padding: 14px 0;
}

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

/* Untuk DNS table yang pakai thead */
.whois-table.dns-table thead { display: contents; }
.whois-table.dns-table thead tr {
  background: var(--bg);
  border-radius: var(--radius-xs);
  margin-bottom: 4px;
}

.whois-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  flex: 1;
}

.whois-table td {
  font-size: 0.85rem;
  vertical-align: top;
  padding: 0 4px;
}

.whois-table .wl {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  width: 160px;
  min-width: 160px;
  flex-shrink: 0;
  padding-right: 16px;
}

.whois-table .wv {
  color: var(--text);
  flex: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.whois-table .wv code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
}

/* Mobile: stack vertically */
@media (max-width: 600px) {
  .whois-table tr {
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
  }
  .whois-table .wl {
    width: 100%;
    min-width: 0;
    font-size: 0.7rem;
    margin-bottom: 2px;
  }
}

/* ===== INFO ROWS (label di atas, value di bawah - anti terpotong) ===== */
.info-rows {
  display: flex;
  flex-direction: column;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
}

.info-row:last-child { border-bottom: none; }

.info-row:hover { background: var(--primary-bg); border-radius: var(--radius-xs); }

.info-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #6C6C88;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.95rem;
  color: #1A1A2E;
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}

.info-value code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  word-break: break-all;
}

.info-value a {
  color: var(--primary);
}

.info-value a:hover { text-decoration: underline; }

.seo-result-card {
  background: var(--bg-card);
  overflow: hidden;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 12px;
  max-width: 100%;
  box-sizing: border-box;
}

.seo-result-card h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark);
}

/* ===== REDIRECT CHAIN ===== */
.redirect-chain {
  display: flex;
  flex-direction: column;
}

.redirect-step {
  display: flex;
  gap: 16px;
  padding-bottom: 4px;
}

.redirect-hop {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
}

.redirect-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.redirect-line {
  width: 2px;
  flex: 1;
  min-height: 24px;
  background: var(--border);
  margin: 4px 0;
}

.redirect-info {
  padding-bottom: 16px;
  flex: 1;
  min-width: 0;
}

.redirect-status {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-bottom: 2px;
}

.redirect-url {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--primary);
  word-break: break-all;
  transition: var(--transition);
}

.redirect-url:hover { text-decoration: underline; }

.redirect-step.final .redirect-info {
  padding-bottom: 0;
}

/* ===== PHISHING BRAND TABLE ===== */
.brand-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--dark);
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary-glow), var(--bg));
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.brand-keyword {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 400;
  margin-top: 1px;
}

.phishing-links-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
}

.phishing-link-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--danger);
  background: var(--danger-light);
  padding: 3px 8px;
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phishing-link-item.safe {
  color: var(--success);
  background: var(--success-light);
}

.phishing-link-item a {
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phishing-link-item a:hover { text-decoration: underline; }

.scan-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.scan-progress .scan-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  min-width: 80px;
}

.scan-progress .scan-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 4px;
  transition: width 0.3s ease;
}

.brand-scan-btn {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}

.brand-scan-btn:hover { background: var(--primary-glow); border-color: var(--primary); }
.brand-scan-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.brand-scan-btn.scanning { color: var(--warning); border-color: var(--warning); }

/* ===== SEO SINGLE INPUT ===== */
.seo-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.seo-single-input {
  flex: 1;
  padding: 14px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-mono);
  color: var(--text);
  background: var(--bg-card);
  transition: all 0.25s ease;
}

.seo-single-input::placeholder { color: var(--text-muted); font-family: var(--font); }

.seo-single-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

[data-theme="dark"] .seo-single-input {
  background: #0F0F1A;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .seo-single-input:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

.seo-check-btn {
  width: auto !important;
  margin-top: 0 !important;
  padding: 14px 28px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 500px) {
  .seo-input-row { flex-direction: column; }
  .seo-check-btn { width: 100% !important; }
}

/* ===== DA/PA TABLE ===== */
.dapa-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow-x: auto;
}

.dapa-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.dapa-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
}

.dapa-table th.center,
.dapa-table td.center { text-align: center; }

.dapa-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
  vertical-align: middle;
}

.dapa-table tr:last-child td { border-bottom: none; }
.dapa-table tr:hover td { background: var(--primary-bg); }

.dapa-domain {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--primary);
  font-size: 0.82rem;
}

.dapa-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dapa-bar-track {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.dapa-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.dapa-bar-fill.da { background: linear-gradient(90deg, #6C3CE7, #8B6CF0); }
.dapa-bar-fill.pa { background: linear-gradient(90deg, #00CEC9, #00E6E0); }

.dapa-score {
  font-weight: 800;
  font-size: 0.95rem;
  min-width: 28px;
  text-align: right;
}

.dapa-score.high { color: var(--success); }
.dapa-score.medium { color: var(--warning); }
.dapa-score.low { color: var(--danger); }

.dapa-backlinks {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.dapa-spam {
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
}

.dapa-spam.low { background: var(--success-light); color: var(--success); }
.dapa-spam.medium { background: var(--warning-light); color: var(--warning); }
.dapa-spam.high { background: var(--danger-light); color: var(--danger); }

.dapa-rank {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dapa-source {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--primary-bg);
  border: 1px solid var(--primary-glow);
  font-size: 0.75rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== REALTIME CHECK (multi-domain) ===== */
.rt-input-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.rt-label {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 12px;
  font-weight: 500;
}

.rt-textarea {
  width: 100%;
  min-height: 280px;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg-card);
  resize: vertical;
  transition: all 0.25s ease;
}

.rt-textarea::placeholder { color: var(--text-muted); }
.rt-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

[data-theme="dark"] .rt-textarea {
  background: #0F0F1A;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .rt-textarea:focus {
  border-color: var(--primary);
  background: var(--bg-card);
}

.rt-check-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(108,60,231,0.3);
}

.rt-check-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(108,60,231,0.4);
  transform: translateY(-1px);
}

.rt-check-btn:active { transform: translateY(0); }

.rt-check-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rt-coin {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  box-shadow: 0 1px 4px rgba(255,165,0,0.4);
  vertical-align: middle;
}

/* Results per domain */
.rt-result-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}

.rt-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  gap: 12px;
}

.rt-result-header:hover { background: var(--primary-bg); }

.rt-result-domain {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rt-result-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.rt-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.rt-badge.open { background: var(--success-light); color: var(--success); }
.rt-badge.blocked { background: var(--danger-light); color: var(--danger); }
.rt-badge.partial { background: var(--warning-light); color: var(--warning); }
.rt-badge.checking { background: var(--bg); color: var(--text-muted); }

.rt-badge-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.rt-expand-icon {
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.rt-result-item.expanded .rt-expand-icon { transform: rotate(180deg); }

.rt-result-body {
  display: none;
  padding: 0 16px 14px;
  border-top: 1px solid var(--border-light);
}

.rt-result-item.expanded .rt-result-body { display: block; padding-top: 14px; }

.rt-isp-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

.rt-isp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  background: var(--bg);
  border: 1px solid var(--border-light);
}

.rt-isp-row .name { font-weight: 600; color: var(--text); }
.rt-isp-row .dns { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); }

/* ===== SETTINGS PAGE ===== */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}

.settings-card-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0;
}

.settings-card-header svg { color: var(--primary); flex-shrink: 0; }

.settings-card-body {
  padding: 20px;
}

/* Profile header */
.settings-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.settings-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.settings-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.settings-email {
  font-size: 0.85rem;
  color: var(--text-light);
  font-family: var(--font-mono);
}

.settings-joined {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Settings form */
.settings-form {
  max-width: 480px;
}

.settings-form .form-group { margin-bottom: 16px; }

.settings-form .btn { margin-top: 4px; }

/* Password input wrap */
.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrap input {
  width: 100%;
  padding-right: 42px;
}

.toggle-pw {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  transition: color 0.2s;
}

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

/* Settings rows */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.settings-row:last-child { border-bottom: none; }

.settings-row-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.settings-row-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Theme selector buttons */
.settings-theme-btns {
  display: flex;
  gap: 8px;
}

.theme-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  transition: var(--transition);
  font-family: inherit;
}

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

.theme-btn.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary);
}

/* Dark mode settings */
[data-theme="dark"] .settings-card-header { background: #0F0F1A; }
[data-theme="dark"] .settings-card-header h3 { color: var(--text); }
[data-theme="dark"] .settings-name { color: var(--text); }
[data-theme="dark"] .settings-row-title { color: var(--text); }

/* Responsive settings */
@media (max-width: 600px) {
  .settings-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .settings-profile-header { flex-direction: column; text-align: center; }
}

/* ===== NOTIFIKASI ===== */
.notif-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.notif-item:hover { box-shadow: var(--shadow-xs); }

.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-body { flex: 1; min-width: 0; }

.notif-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2px;
}

.notif-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

[data-theme="dark"] .notif-title { color: var(--text); }

/* ===== PHISHING DASHBOARD 2-PANEL ===== */
.ph-stats {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.ph-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 18px 22px;
}

.ph-stat-card.ph-stat-alert {
  background: linear-gradient(135deg, #E8FFE8 0%, #F0FFF4 50%, rgba(108,60,231,0.03) 100%);
  border-color: rgba(46,204,113,0.15);
}

.ph-stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.ph-stat-label.danger { color: var(--danger); font-weight: 700; }

.ph-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 2px;
}

.ph-stat-value small { font-size: 0.82rem; color: var(--text-light); font-weight: 600; }

.ph-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ph-google-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #34A853, #FBBC05, #EA4335);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  opacity: 0.25;
}

/* 2-Panel Layout */
.ph-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  min-height: 500px;
}

/* Left Brand Panel */
.ph-brand-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ph-brand-header {
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  align-items: center;
}

.ph-brand-list {
  flex: 1;
  overflow-y: auto;
  max-height: 600px;
}

.ph-brand-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--border-light);
}

.ph-brand-item:hover { background: var(--primary-bg); }

.ph-brand-item.active {
  background: var(--primary-glow);
  border-left-color: var(--primary);
}

.ph-brand-item.has-phishing { border-left-color: var(--danger); }

.ph-brand-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--dark), var(--dark-medium));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.ph-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-brand-icon .initials {
  color: white;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.ph-brand-name {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-brand-badge {
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  background: var(--danger);
  color: white;
  flex-shrink: 0;
}

.ph-brand-badge.safe { background: var(--success); }
.ph-brand-badge.done { background: var(--text-muted); opacity: 0.6; }
.ph-brand-badge.pending { background: var(--text-muted); opacity: 0.4; }
.ph-brand-badge.scanning { background: var(--warning); animation: blink 1s infinite; }

/* Brand info layout */
.ph-brand-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.ph-brand-sub {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 1px;
  line-height: 1.2;
}

.ph-brand-edit {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.ph-brand-edit:hover { background: var(--bg); color: var(--primary); }

/* Right Results Panel */
.ph-results-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ph-result-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  padding: 0 8px;
  overflow-x: auto;
}

.ph-tab {
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

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

.ph-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.ph-tab-icon { font-size: 0.85rem; }

.ph-tab-count {
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--text-muted);
}

.ph-tab.active .ph-tab-count { background: var(--primary-glow); color: var(--primary); }
.ph-count-danger { background: var(--danger) !important; color: white !important; }

/* Results Grid */
.ph-results-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-content: start;
  max-height: 560px;
}

.ph-result-card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}

.ph-result-card:hover { box-shadow: var(--shadow); border-color: var(--border); }

.ph-card-preview {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #f0f0f5, #e8e8f0);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-card-preview iframe {
  width: 200%;
  height: 200%;
  border: none;
  transform: scale(0.5);
  transform-origin: top left;
  pointer-events: none;
}

.ph-card-preview .ph-preview-placeholder {
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 10px;
}

.ph-card-preview .ph-preview-placeholder svg { margin-bottom: 6px; opacity: 0.3; }

.ph-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-card-body {
  padding: 12px 14px;
}

.ph-card-link {
  font-size: 0.78rem;
  color: var(--primary);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-card-link span { color: var(--text-muted); }

.ph-card-title {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ph-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.ph-card-btn {
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ph-card-btn.safe-btn {
  background: var(--bg-card);
  color: var(--text);
}

.ph-card-btn.safe-btn:hover { background: var(--success-light); color: var(--success); border-color: var(--success); }

.ph-card-btn.danger-btn {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.ph-card-btn.danger-btn:hover { background: #C0392B; }

.ph-card-btn.marked-safe {
  background: var(--success-light);
  color: var(--success);
  border-color: rgba(46,204,113,0.2);
}

.ph-card-btn.marked-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(231,76,60,0.2);
}

.ph-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.ph-empty svg { margin-bottom: 10px; opacity: 0.3; }
.ph-empty h4 { font-size: 0.95rem; color: var(--text-light); margin-bottom: 4px; }
.ph-empty p { font-size: 0.82rem; }

@media (max-width: 900px) {
  .ph-layout { grid-template-columns: 1fr; }
  .ph-brand-list { max-height: 250px; }
  .ph-stats { grid-template-columns: 1fr; }
  .ph-results-grid { grid-template-columns: 1fr; }
}
