/* ===================================================
   Global Style - Dark + Gradient Modern
   Konsisten antara landing page & panel
   =================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --bg-soft: #12121a;
  --bg-card: #16161f;
  --border: #232331;
  --text: #f5f5f7;
  --text-muted: #8a8a96;
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --accent: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, rgba(139,92,246,.15), rgba(6,182,212,.15));
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* === Background gradient blobs === */
body::before {
  content: '';
  position: fixed;
  top: -200px; left: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139,92,246,.25), transparent 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  bottom: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,.2), transparent 70%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
}

/* === Layout === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.app-shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: 260px;
  background: rgba(18,18,26,.85);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  font-size: 20px;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 8px 12px 24px;
}

.sidebar-section { font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: 1px; padding: 16px 12px 8px; }

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .15s;
}
.sidebar-link:hover { background: rgba(255,255,255,.04); color: var(--text); }
.sidebar-link.active {
  background: var(--gradient-soft);
  color: var(--text);
  border: 1px solid rgba(139,92,246,.3);
}

.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.sidebar-user { padding: 8px 12px; font-size: 13px; color: var(--text-muted); }
.sidebar-user b { color: var(--text); display: block; }

.main {
  flex: 1;
  padding: 32px 40px;
  overflow-x: hidden;
}

/* === Topbar / page header === */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.page-title { font-size: 26px; font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* === Cards === */
.card {
  background: rgba(22,22,31,.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(10px);
}
.card + .card { margin-top: 16px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: rgba(22,22,31,.7); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.stat-card .label { color: var(--text-muted); font-size: 13px; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 4px; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn:hover { background: var(--bg-soft); border-color: rgba(255,255,255,.15); }
.btn-primary { background: var(--gradient); border: none; color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-danger { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.3); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* === Forms === */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.form-textarea { min-height: 100px; resize: vertical; font-family: ui-monospace, monospace; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* === Tables === */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { background: rgba(255,255,255,.02); font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }

/* === Badges === */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.badge-primary { background: rgba(139,92,246,.15); color: #c4b5fd; }
.badge-success { background: rgba(16,185,129,.15); color: #6ee7b7; }
.badge-warning { background: rgba(245,158,11,.15); color: #fcd34d; }
.badge-muted { background: rgba(255,255,255,.06); color: var(--text-muted); }

/* === Alerts === */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #6ee7b7; }
.alert-danger { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }

/* === Auth pages === */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; z-index: 1; }
.auth-card { width: 100%; max-width: 420px; background: rgba(22,22,31,.85); backdrop-filter: blur(20px); border: 1px solid var(--border); border-radius: 20px; padding: 40px 32px; }
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-brand .logo { font-size: 24px; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-brand .sub { color: var(--text-muted); font-size: 14px; margin-top: 6px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* === Targets list (URL editor) === */
.target-row { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.target-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.target-row-num { font-weight: 700; color: var(--primary); font-size: 13px; }

/* === Mobile === */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: -260px; transition: left .25s; z-index: 50; }
  .sidebar.open { left: 0; }
  .main { padding: 20px; padding-top: 70px; }
  .mobile-menu-btn { display: flex; }
}
.mobile-menu-btn {
  display: none;
  position: fixed; top: 16px; left: 16px; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  color: var(--text); cursor: pointer;
}

/* === Landing page specific === */
.lp-nav { position: sticky; top: 0; z-index: 20; background: rgba(10,10,15,.7); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); }
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.lp-logo { font-size: 22px; font-weight: 700; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.lp-hero { padding: 80px 0 60px; text-align: center; }
.lp-hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.lp-hero h1 .grad { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.lp-hero p { font-size: 18px; color: var(--text-muted); max-width: 640px; margin: 0 auto 32px; }
.lp-hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-features { padding: 60px 0; }
.lp-section-title { text-align: center; margin-bottom: 48px; }
.lp-section-title h2 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.lp-section-title p { color: var(--text-muted); }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 20px; }
.lp-feature { background: rgba(22,22,31,.6); border: 1px solid var(--border); border-radius: 16px; padding: 28px; transition: all .2s; }
.lp-feature:hover { border-color: rgba(139,92,246,.4); transform: translateY(-3px); }
.lp-feature-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--gradient-soft); display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; }
.lp-feature h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.lp-feature p { color: var(--text-muted); font-size: 14px; }
.lp-footer { padding: 40px 0; text-align: center; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 60px; }
