/* ==========================================================================
   WASENDER PRO - Stylesheet utama
   ========================================================================== */
:root {
  --bg: #0b1120;
  --bg-2: #111a2e;
  --panel: #131d33;
  --panel-2: #1a2742;
  --border: #24344f;
  --border-soft: #1d2b44;
  --text: #e8eefc;
  --muted: #8ea0c0;
  --muted-2: #6b7d9c;
  --primary: #22c55e;
  --primary-2: #16a34a;
  --primary-soft: rgba(34, 197, 94, .12);
  --accent: #7c5cff;
  --accent-2: #a855f7;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #3b82f6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --sidebar-w: 250px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
img { max-width: 100%; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #2b3d5c; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #3a5175; }

/* ---------------------------- Utilities ---------------------------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.row { display: flex; gap: 14px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { align-items: center; }
.col { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.mt { margin-top: 14px; } .mt-2 { margin-top: 26px; } .mb { margin-bottom: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center-text { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }

/* ---------------------------- Buttons ---------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 17px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .18s; white-space: nowrap; font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #04240f; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.btn-danger { background: rgba(239, 68, 68, .16); color: #fca5a5; border-color: rgba(239, 68, 68, .3); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: #3a5175; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-icon { padding: 7px 9px; }

/* ---------------------------- Forms ---------------------------- */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; letter-spacing: .2px; }
input, select, textarea {
  width: 100%; padding: 10px 13px; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px; font-family: inherit;
  transition: .15s; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
textarea { resize: vertical; min-height: 90px; }
select { cursor: pointer; }
.field { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); font-weight: 500; cursor: pointer; margin-bottom: 9px; }
.check input { width: auto; accent-color: var(--primary); cursor: pointer; }
.hint { font-size: 11.5px; color: var(--muted-2); margin-top: 4px; }

/* ---------------------------- Cards / panels ---------------------------- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 20px;
}
.card.pad-sm { padding: 15px; }
.card h3 { font-size: 15.5px; margin-bottom: 4px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.stat .value.green { color: var(--primary); }
.stat .value.blue { color: var(--info); }
.stat .value.purple { color: var(--accent-2); }
.stat .value.amber { color: var(--warn); }
.stat-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--primary-soft); }

/* ---------------------------- Badges ---------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; }
.badge.green { background: rgba(34, 197, 94, .14); color: #4ade80; }
.badge.red { background: rgba(239, 68, 68, .14); color: #f87171; }
.badge.amber { background: rgba(245, 158, 11, .14); color: #fbbf24; }
.badge.blue { background: rgba(59, 130, 246, .14); color: #60a5fa; }
.badge.gray { background: rgba(142, 160, 192, .14); color: var(--muted); }
.badge.purple { background: rgba(168, 85, 247, .14); color: #c084fc; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--primary); box-shadow: 0 0 8px var(--primary); }
.dot.red { background: var(--danger); }
.dot.gray { background: var(--muted-2); }
.dot.amber { background: var(--warn); }

/* ---------------------------- Tables ---------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; padding: 11px 13px; color: var(--muted); font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .7px; border-bottom: 1px solid var(--border); font-weight: 700;
}
tbody td { padding: 12px 13px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
tbody tr:hover { background: rgba(255, 255, 255, .018); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border-soft); background: var(--panel); }

/* ---------------------------- Progress ---------------------------- */
.progress { height: 8px; background: var(--bg-2); border-radius: 20px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 20px; transition: width .4s; }

/* ---------------------------- Landing ---------------------------- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); background: rgba(11, 17, 32, .82); border-bottom: 1px solid var(--border-soft); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.4px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; font-size: 17px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.hero { padding: 78px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -260px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px; background: radial-gradient(circle, rgba(34, 197, 94, .16), transparent 65%); pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; top: -180px; right: -120px;
  width: 520px; height: 520px; background: radial-gradient(circle, rgba(124, 92, 255, .14), transparent 65%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; position: relative; z-index: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 30px; background: var(--primary-soft); border: 1px solid rgba(34, 197, 94, .3); font-size: 12.5px; font-weight: 600; color: #86efac; margin-bottom: 20px; }
.hero h1 { font-size: 46px; letter-spacing: -1.5px; margin-bottom: 18px; }
.grad { background: linear-gradient(120deg, var(--primary), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: 16.5px; color: var(--muted); margin-bottom: 28px; max-width: 545px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 38px; }

.phone-mock { background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--border); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
.chat-bubble { background: #1f2f4d; border-radius: 12px 12px 12px 3px; padding: 10px 13px; font-size: 13px; margin-bottom: 10px; max-width: 88%; }
.chat-bubble.me { background: rgba(34, 197, 94, .16); border: 1px solid rgba(34, 197, 94, .25); margin-left: auto; border-radius: 12px 12px 3px 12px; }

.section { padding: 66px 0; }
.section-title { font-size: 32px; letter-spacing: -.9px; margin-bottom: 12px; }
.section-sub { color: var(--muted); font-size: 15.5px; max-width: 640px; }
.feature { padding: 24px; }
.feature .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--primary-soft); margin-bottom: 15px; }
.feature h3 { font-size: 16.5px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 13.8px; }

.pricing-card { position: relative; display: flex; flex-direction: column; }
.pricing-card.popular { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 18px 40px rgba(34, 197, 94, .12); }
.pricing-card .price { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin: 10px 0 4px; }
.pricing-card ul { list-style: none; margin: 18px 0; flex: 1; }
.pricing-card li { padding: 6px 0; font-size: 13.5px; color: var(--muted); display: flex; gap: 9px; align-items: flex-start; }
.pricing-card li::before { content: '✓'; color: var(--primary); font-weight: 800; }
.popular-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #04240f; padding: 4px 15px; border-radius: 20px; font-size: 11.5px; font-weight: 800; }

/* ---------------------------- Kalkulator ---------------------------- */
.calc-score-wrap { text-align: center; padding: 22px; }
.score-ring {
  width: 168px; height: 168px; border-radius: 50%; margin: 0 auto 16px;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--primary) 0deg, var(--bg-2) 0deg);
  transition: background .6s;
}
.score-ring::after { content: ''; position: absolute; inset: 13px; border-radius: 50%; background: var(--panel); }
.score-ring .val { position: relative; z-index: 1; font-size: 44px; font-weight: 800; letter-spacing: -2px; }
.score-ring .lbl { position: relative; z-index: 1; font-size: 11px; color: var(--muted); margin-top: -6px; }
.factor-row { margin-bottom: 11px; }
.factor-row .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.factor-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
ul.list { list-style: none; }
ul.list li { padding: 6px 0 6px 24px; position: relative; font-size: 13.5px; color: var(--muted); }
ul.list li::before { content: '→'; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
ul.list.alert li::before { content: '!'; color: var(--warn); }

/* ---------------------------- Auth ---------------------------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 50% -10%, rgba(34, 197, 94, .12), transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 430px; }
.auth-head { text-align: center; margin-bottom: 26px; }

/* ---------------------------- App shell ---------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--bg-2); border-right: 1px solid var(--border-soft); padding: 18px 14px; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; overflow-y: auto; z-index: 40; }
.sidebar .logo { padding: 4px 8px 20px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; margin-bottom: 3px; border: none; background: none; width: 100%; text-align: left; font-family: inherit; transition: .15s; }
.nav-item:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-item .ico { font-size: 16px; width: 20px; text-align: center; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); padding: 16px 12px 7px; font-weight: 700; }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar { height: 64px; border-bottom: 1px solid var(--border-soft); background: rgba(11, 17, 32, .85); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 30; }
.content { padding: 24px; max-width: 1400px; }
.page { display: none; }
.page.active { display: block; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { margin-bottom: 22px; }
.page-head h2 { font-size: 23px; letter-spacing: -.6px; }
.page-head p { color: var(--muted); font-size: 13.8px; margin-top: 3px; }

.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #04240f; }
.quota-bar { font-size: 11px; color: var(--muted); }

/* ---------------------------- Tabs ---------------------------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border-soft); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; white-space: nowrap; font-family: inherit; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------------------------- Modal ---------------------------- */
.modal-bg { position: fixed; inset: 0; background: rgba(3, 7, 18, .72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; }
.modal.lg { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-head h3 { font-size: 17px; }
.close-x { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.close-x:hover { color: var(--text); }

/* ---------------------------- Toast ---------------------------- */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast { background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 16px; min-width: 250px; box-shadow: var(--shadow); font-size: 13.5px; animation: slideIn .25s ease; }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast.info { border-left-color: var(--info); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

/* ---------------------------- QR / misc ---------------------------- */
.qr-box { background: #fff; padding: 14px; border-radius: var(--radius); display: inline-block; }
.qr-box img { display: block; width: 260px; height: 260px; }
.empty { text-align: center; padding: 46px 18px; color: var(--muted); }
.empty .big { font-size: 42px; margin-bottom: 10px; opacity: .6; }
.log-view { background: #060b16; border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; max-height: 260px; overflow-y: auto; color: #93c5fd; }
.log-view div { padding: 2px 0; }
.log-view .t { color: var(--muted-2); margin-right: 7px; }

.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 14px; }
.alert.warn { background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .3); color: #fcd34d; }
.alert.err { background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .3); color: #fca5a5; }
.alert.ok { background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .3); color: #86efac; }
.alert.info { background: rgba(59, 130, 246, .1); border: 1px solid rgba(59, 130, 246, .3); color: #93c5fd; }

.split { display: grid; grid-template-columns: 1.4fr .9fr; gap: 18px; align-items: start; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--primary); }
.slider-val { min-width: 62px; text-align: right; font-weight: 700; font-size: 13.5px; }

.tag-input { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 1000px) {
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
}
@media (max-width: 720px) {
  .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); transition: .25s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .nav-links { display: none; }
  .factor-cols { grid-template-columns: 1fr; }
}
