/* ============================================================
   BlogOtomatis SEO — Halaman Member (Auth + Dashboard)
   ============================================================ */
:root {
  --bg: #09090b;
  --bg-soft: #0c0c0f;
  --surface: #101014;
  --surface-2: #17171c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --faint: #71717a;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.1);
  --amber: #fbbf24;
  --red: #f87171;
  --radius: 12px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

/* ---------- Auth layout ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  position: relative;
  overflow: hidden;
}
.auth-wrap::before {
  content: "";
  position: absolute;
  inset: -200px -20% auto -20%;
  height: 500px;
  background:
    radial-gradient(600px 320px at 50% 0%, rgba(139, 92, 246, 0.16), transparent 70%),
    radial-gradient(500px 260px at 18% 10%, rgba(99, 102, 241, 0.10), transparent 70%);
  pointer-events: none;
}
.auth-card {
  position: relative;
  width: min(400px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 40px 80px -32px rgba(0, 0, 0, 0.7);
}
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; margin-bottom: 26px; }
.auth-logo img { width: 30px; height: 30px; filter: drop-shadow(0 0 9px rgba(139, 92, 246, 0.55)); }
.auth-card h1 { font-size: 22px; letter-spacing: -0.02em; font-weight: 650; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field input, .field select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14.5px;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.99); }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff; box-shadow: 0 4px 16px -4px rgba(139, 92, 246, 0.45); }
.btn-primary:hover { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.btn-ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.28); }

.g-signin-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}
.g-signin-wrap iframe { border-radius: 8px !important; }

.alert {
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  border: 1px solid;
}
.alert-error { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.3); color: #fca5a5; }
.alert-success { background: var(--emerald-soft); border-color: rgba(52,211,153,.3); color: #6ee7b7; }

.auth-alt { margin-top: 22px; text-align: center; font-size: 13px; color: var(--muted); }
.auth-alt a { color: #c4b5fd; font-weight: 500; }
.auth-alt a:hover { text-decoration: underline; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--faint); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.demo-box {
  margin-top: 22px;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--muted);
}
.demo-box b { color: #d4d4d8; font-weight: 600; }
.demo-box code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  color: #c4b5fd;
}

/* ---------- Dashboard ---------- */
.dash-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.dash-nav {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 16px;
}
.dash-nav .logo { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; }
.dash-nav .logo img { width: 26px; height: 26px; filter: drop-shadow(0 0 9px rgba(139, 92, 246, 0.55)); }
.dash-nav .logo span { color: var(--muted); font-weight: 500; }
.dash-user { display: flex; align-items: center; gap: 12px; }
.dash-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff;
}
.dash-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.dash-plan { font-size: 11px; color: var(--emerald); font-weight: 500; text-transform: capitalize; }

/* ---------- Layout sidebar ---------- */
.dash-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  width: min(1200px, 96%);
  margin: 0 auto;
  gap: 28px;
  align-items: start;
}
.dash-side {
  position: sticky;
  top: 78px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 0 40px;
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
  font-weight: 600;
  padding: 0 12px 8px;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.side-link svg { width: 17px; height: 17px; flex-shrink: 0; }
.side-link:hover { background: rgba(255,255,255,.05); color: var(--text); }
.side-link.active {
  background: var(--accent-soft);
  color: #c4b5fd;
  border: 1px solid rgba(139,92,246,.3);
}
.side-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.side-box-title { font-size: 12px; font-weight: 600; color: #d4d4d8; margin-bottom: 12px; }
.side-box-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.side-box-row b { color: var(--emerald); font-weight: 600; }
.side-upgrade { display: block; margin-top: 12px; font-size: 12px; font-weight: 500; color: #c4b5fd; }
.side-upgrade:hover { text-decoration: underline; }

.dash-main { min-width: 0; padding: 40px 0 80px; }
.dash-hello { margin-bottom: 28px; }
.dash-hello h1 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.03em; font-weight: 650; }
.dash-hello p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-card .num { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; }
.stat-card .lbl { font-size: 12.5px; color: var(--faint); margin-top: 3px; }
.stat-card.hl { border-color: rgba(139,92,246,.4); background: linear-gradient(160deg, rgba(139,92,246,.12), var(--surface) 60%); }

.quota-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 32px;
}
.quota-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.quota-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quota-item .q-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.quota-item .q-head b { color: var(--text); }
.quota-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8b5cf6, #6366f1); }
.quota-bar.warn i { background: linear-gradient(90deg, #fbbf24, #f59e0b); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 { font-size: 15px; font-weight: 600; }
.panel-head a { font-size: 12.5px; color: #c4b5fd; font-weight: 500; }
.art-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.art-table th {
  text-align: left;
  padding: 11px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.art-table td { padding: 13px 20px; border-bottom: 1px solid var(--border); color: #d4d4d8; }
.art-table tr:last-child td { border-bottom: none; }
.status {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 10px;
}
.status.published { color: var(--emerald); background: var(--emerald-soft); border: 1px solid rgba(52,211,153,.3); }
.status.scheduled { color: var(--amber); background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); }
.status.draft { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.empty { padding: 32px 20px; text-align: center; color: var(--faint); font-size: 13.5px; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .quota-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .dash-side {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    padding: 16px 0 0;
    -webkit-overflow-scrolling: touch;
  }
  .side-nav { flex-direction: row; gap: 8px; }
  .side-label { display: none; }
  .side-link { white-space: nowrap; padding: 9px 14px; font-size: 13px; }
  .side-link svg { width: 15px; height: 15px; }
  .side-box { display: none; }
  .dash-main { padding: 28px 0 60px; }
  .dash-hello h1 { font-size: clamp(20px, 5vw, 28px); }
  .dash-hello p { font-size: 13.5px; }
}
@media (max-width: 600px) {
  .dash-name, .dash-plan { display: none; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .num { font-size: 22px; }
  .quota-card { padding: 16px; }
  .panel-head { padding: 14px 16px; }
  .art-table th, .art-table td { padding: 10px 14px; font-size: 12px; }
  .art-table { font-size: 12px; }
  .account-banner { padding: 12px 14px; gap: 10px; border-radius: 12px; }
  .ab-icon { width: 36px; height: 36px; }
  .ab-value { font-size: 13px; }
  .auth-card { padding: 28px 20px; border-radius: 12px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card .num { font-size: 20px; }
  .stat-card .lbl { font-size: 11px; }
  .dash-nav { height: 56px; }
  .dash-nav .logo { font-size: 14px; gap: 7px; }
  .dash-nav .logo img { width: 22px; height: 22px; }
  .account-banner { flex-direction: column; align-items: flex-start; }
}

/* ---- Banner status akun (dashboard & upgrade) ---- */
.account-banner {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(150deg, rgba(52,211,153,.08), var(--surface) 55%);
  border: 1px solid rgba(52,211,153,.25);
  border-radius: 14px; padding: 16px 18px; margin-bottom: 24px;
}
.ab-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  background: var(--emerald-soft); color: var(--emerald);
  display: flex; align-items: center; justify-content: center;
}
.ab-icon svg { width: 20px; height: 20px; }
.ab-info { min-width: 0; }
.ab-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.ab-value { font-size: 15px; color: #e4e4e7; margin-top: 2px; }
.ab-value b { color: var(--emerald); }
.ab-status { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ab-status b { color: #e4e4e7; font-weight: 600; }
.ab-status a { color: #c4b5fd; text-decoration: none; }
.ab-status a:hover { text-decoration: underline; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald); display: inline-block; box-shadow: 0 0 8px rgba(52,211,153,.7); }

/* ---- Badge paket aktif di halaman upgrade ---- */
.plan-flag {
  position: absolute; top: -10px; left: 14px;
  background: var(--emerald); color: #052e22; font-size: 10.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; letter-spacing: .02em;
}
.badge-active {
  display: inline-block; margin-left: 8px; vertical-align: middle;
  background: var(--emerald-soft); color: var(--emerald);
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; letter-spacing: .05em;
}

/* ---- Responsive member tables ---- */
@media (max-width: 600px) {
  .panel { border-radius: 10px; }
  .panel-body { padding: 14px 16px !important; font-size: 13px !important; }
  .empty { padding: 24px 16px; font-size: 12.5px; }
  .art-table thead { display: none; }
  .art-table, .art-table tbody, .art-table tr, .art-table td {
    display: block;
    width: 100%;
  }
  .art-table tr {
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .art-table tr:last-child { border-bottom: none; }
  .art-table td {
    border: none;
    padding: 0;
    font-size: 12.5px;
  }
  .art-table td:first-child {
    width: 100%;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
  }
  .art-table td:nth-child(2) { flex-shrink: 0; }
  .art-table td:nth-child(3) { margin-left: auto; color: var(--faint); font-size: 11px; }
}

/* ---- Responsive auth cards ---- */
@media (max-width: 480px) {
  .auth-wrap { padding: 24px 16px; }
  .auth-card { padding: 24px 18px; }
  .auth-card h1 { font-size: 20px; }
  .demo-box { padding: 12px; }
}

/* ---- Responsive upgrade page ---- */
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .upgrade-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .upgrade-grid { gap: 12px; }
}

/* ---- Responsive site analysis ---- */
@media (max-width: 768px) {
  .analysis-grid { grid-template-columns: 1fr !important; }
}

/* ---- Responsive rank check ---- */
@media (max-width: 600px) {
  .rank-results { flex-direction: column; }
}

/* ---- Responsive automation page ---- */
@media (max-width: 600px) {
  .auto-log { flex-direction: column; gap: 8px; }
  .auto-log-item { padding: 12px; }
}
