:root {
    --bg: #0f1420;
    --surface: #1a2130;
    --surface-2: #222c3e;
    --border: #2e3a50;
    --text: #e7ecf3;
    --muted: #93a1b8;
    --primary: #3b82f6;
    --primary-2: #2563eb;
    --accent: #10b981;
    --danger: #ef4444;
    --warn: #f59e0b;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
    font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    min-height: 100vh; display: flex; flex-direction: column;
    line-height: 1.6;
}

/* ---------- Topbar ---------- */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px; background: rgba(20,26,38,.85); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: baseline; gap: 10px; cursor: pointer; }
.logo { font-size: 26px; font-weight: 800; color: var(--primary);
    background: linear-gradient(90deg,#60a5fa,#34d399); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brand-sub { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 8px; align-items: center; }
.nav a, .nav button {
    color: var(--text); text-decoration: none; padding: 8px 16px; border-radius: 10px;
    background: transparent; border: 1px solid transparent; cursor: pointer; font-size: 15px;
    font-family: inherit;
}
.nav a:hover { background: var(--surface-2); }

/* ---------- Layout ---------- */
main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px; }
.footer { text-align: center; color: var(--muted); padding: 20px; border-top: 1px solid var(--border); font-size: 13px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center;
    background: var(--primary); color: #fff; border: none; padding: 11px 22px; border-radius: 10px;
    font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .15s; }
.btn:hover { background: var(--primary-2); transform: translateY(-1px); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.accent { background: var(--accent); }
.btn.danger { background: var(--danger); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 60px 20px 40px; }
.hero h1 { font-size: 44px; margin: 0 0 16px; line-height: 1.25; }
.hero h1 span { background: linear-gradient(90deg,#60a5fa,#34d399); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { margin: 48px 0; }
.section h2 { font-size: 28px; text-align: center; margin-bottom: 8px; }
.section .lead { text-align: center; color: var(--muted); margin-bottom: 32px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 20px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px 22px; text-align: center; position: relative; transition: .2s; }
.price-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--accent); }
.price-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #04231a; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 20px; }
.price-card .pname { font-size: 20px; font-weight: 700; }
.price-card .pusers { color: var(--muted); margin: 6px 0 16px; }
.price-card .pamount { font-size: 40px; font-weight: 800; color: var(--primary); }
.price-card .pamount small { font-size: 15px; color: var(--muted); font-weight: 400; }
.price-card .pperuser { color: var(--muted); font-size: 13px; margin-top: 6px; }
.slider-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); }

/* ---------- Options ---------- */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.option-box { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius);
    padding: 28px; text-align: center; cursor: pointer; transition: .2s; }
.option-box:hover { border-color: var(--primary); transform: translateY(-3px); }
.option-box .oicon { font-size: 40px; }
.option-box h3 { margin: 10px 0 6px; font-size: 22px; }
.option-box p { color: var(--muted); margin: 0; }

/* ---------- Forms ---------- */
.form-wrap { max-width: 460px; margin: 20px auto; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px; }
.form-wrap h2 { margin: 0 0 6px; }
.form-wrap .lead { color: var(--muted); margin-bottom: 22px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--muted); }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 14px; background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font-size: 15px; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field .hint { font-size: 12px; margin-top: 5px; }
.hint.ok { color: var(--accent); } .hint.err { color: var(--danger); }
.steps { display: flex; gap: 8px; margin-bottom: 22px; justify-content: center; }
.step-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 700; }
.step-dot.active { background: var(--primary); color: #fff; }
.step-dot.done { background: var(--accent); color: #04231a; }

/* ---------- Dashboard ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; height: fit-content; }
.sidebar .who { padding: 10px; border-radius: 10px; background: var(--surface-2); margin-bottom: 14px; }
.sidebar .who b { display: block; }
.sidebar .who span { font-size: 12px; color: var(--muted); }
.side-link { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text); text-decoration: none; cursor: pointer; }
.side-link:hover, .side-link.active { background: var(--surface-2); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; min-height: 400px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.panel-head h2 { margin: 0; font-size: 22px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; white-space: nowrap; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; position: sticky; top: 0; }
tr:hover td { background: rgba(255,255,255,.02); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill.gray { background: #37415133; color: #94a3b8; }
.pill.blue { background: #3b82f633; color: #93c5fd; }
.pill.amber { background: #f59e0b33; color: #fcd34d; }
.pill.green { background: #10b98133; color: #6ee7b7; }
.code { font-family: ui-monospace, monospace; color: var(--primary); font-weight: 700; }

/* progress bar */
.prog { width: 90px; height: 8px; background: var(--surface-2); border-radius: 6px; overflow: hidden; display: inline-block; vertical-align: middle; }
.prog > i { display: block; height: 100%; background: linear-gradient(90deg,#3b82f6,#10b981); }

/* ---------- Grid list ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 16px; }
.proj-tile { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; cursor: pointer; transition: .15s; }
.proj-tile:hover { border-color: var(--primary); transform: translateY(-2px); }
.proj-tile .pt-name { font-size: 20px; font-weight: 800; color: var(--primary); }
.proj-tile .pt-meta { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 100; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; width: min(560px,92vw); max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 18px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-start; margin-top: 20px; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120px);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 12px 22px;
    border-radius: 12px; box-shadow: var(--shadow); z-index: 200; transition: transform .3s; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: var(--accent); }
.toast.err { border-color: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .eicon { font-size: 44px; }

@media (max-width: 760px) {
    .dash { grid-template-columns: 1fr; }
    .options { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
}
