:root {
    --bg: #060a08;
    --surface: rgba(14, 22, 18, 0.72);
    --surface-hover: rgba(22, 36, 29, 0.88);
    --border: rgba(34, 197, 94, 0.16);
    --border-strong: rgba(34, 197, 94, 0.32);
    --green: #22c55e;
    --green-soft: rgba(34, 197, 94, 0.12);
    --green-glow: rgba(34, 197, 94, 0.35);
    --text-main: #f3f4f6;
    --text-muted: #94a3b8;
    --dim: #64748b;
    --danger: #f87171;
    --warn: #fbbf24;
    --r-1: 12px;
    --r-2: 16px;
    --r-3: 20px;
    --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
    --t: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.14) 0%, transparent 62%),
        radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.05) 0%, transparent 45%);
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.92em; color: #cfe9d8; }
h1, h2 { line-height: 1.2; margin: 0; }

.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(6, 10, 8, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text-main); }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 16px; line-height: 1.1; }
.brand-text small { font-weight: 500; font-size: 11px; color: var(--dim); letter-spacing: 0.02em; }

.nav-links { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text-main); text-decoration: none; }

.nav-cta, .nav-ghost {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: var(--t);
}
.nav-cta { background: var(--green); color: #04140a !important; border-color: transparent; font-weight: 600; }
.nav-cta:hover { box-shadow: 0 0 24px var(--green-glow); }
.nav-ghost { color: var(--text-main) !important; }
.nav-ghost:hover { background: var(--surface-hover); }

.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; padding: 48px 0 72px; }

.hero { padding: 24px 0 40px; max-width: 760px; }
.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--green-soft);
    color: #a7f3c0;
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.hero h1 { margin: 18px 0 16px; font-size: clamp(34px, 6vw, 60px); letter-spacing: -0.02em; }
.accent { color: var(--green); }
.lead { color: var(--text-muted); font-size: 17px; max-width: 620px; margin: 0 0 22px; }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.price-tag { font-size: 26px; font-weight: 700; }
.price-tag span { font-size: 15px; font-weight: 500; color: var(--dim); }

.slots { margin-top: 26px; max-width: 420px; }
.slots-bar { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.slots-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #16a34a, var(--green)); transition: width 600ms var(--t); }
.slots-text { margin-top: 8px; color: var(--text-muted); font-size: 13px; }
.slots-text b { color: var(--text-main); }
.slots-inline { margin-top: 12px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin: 12px 0 44px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-3);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.card h2 { font-size: 22px; }
.card p { margin: 0; color: var(--text-muted); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--green-soft);
    border: 1px solid var(--border);
    color: #a7f3c0;
    font-size: 12px;
    white-space: nowrap;
}
.pill-muted { background: rgba(255, 255, 255, 0.04); color: var(--text-muted); }

.list { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 14px; }
.list li { margin: 4px 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--t);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); border-color: transparent; color: #04140a; }
.btn-primary:hover { box-shadow: 0 0 26px var(--green-glow); }
.btn-ghost:hover { background: var(--surface-hover); }
.btn-danger { color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.12); }
.btn-wide { width: 100%; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dim);
    font-weight: 600;
    margin-bottom: 12px;
}

.steps { padding-top: 8px; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); }
.step-list span {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--green-soft);
    border: 1px solid var(--border);
    color: var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 8px; }

.notice {
    border: 1px solid var(--border);
    background: var(--green-soft);
    border-radius: var(--r-2);
    padding: 14px 16px;
    margin-bottom: 20px;
    color: #c9f3d6;
    font-size: 14px;
}

.picker {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--r-3);
    padding: 28px;
    margin-bottom: 32px;
}

.bubbles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.bubble {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font: inherit;
    cursor: pointer;
    transition: var(--t);
}
.bubble.is-active { background: var(--green-soft); border-color: var(--border-strong); color: #c9f3d6; }

.big-input {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.big-input input {
    flex: 0 1 auto;
    min-width: 60px;
    max-width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
    font-family: var(--mono);
    font-size: clamp(30px, 7vw, 64px);
    font-weight: 700;
    letter-spacing: -0.02em;
    padding: 0;
}
.big-input input::placeholder { color: rgba(148, 163, 184, 0.5); }
.big-suffix {
    font-family: var(--mono);
    font-size: clamp(30px, 7vw, 64px);
    font-weight: 700;
    color: var(--dim);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.check-line { min-height: 24px; margin-bottom: 18px; }
.status { font-size: 14px; color: var(--text-muted); }
.status[data-state="ok"] { color: var(--green); }
.status[data-state="bad"] { color: var(--warn); }
.status[data-state="loading"] { color: var(--dim); }

.target { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-grow { flex: 1 1 260px; }
.field-label { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; }
.field input, .field select {
    height: 44px;
    padding: 0 14px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    font: inherit;
    min-width: 0;
}
.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.field select option { background: #0b120e; }

.hint { color: var(--dim); font-size: 13px; margin: 10px 0 0; }
.picker-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 22px; }
.fine { color: var(--dim); font-size: 13px; }

.err { color: var(--danger); font-size: 14px; margin: 10px 0 0; }
.muted { color: var(--dim); }

.rules { border-top: 1px solid var(--border); padding-top: 24px; }

.auth { max-width: 440px; margin: 24px auto; }
.auth h1 { font-size: 32px; margin-bottom: 10px; }
.form { display: grid; gap: 16px; margin: 24px 0 18px; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: 8px; text-align: center; }
.link-btn { background: none; border: 0; color: var(--green); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }

.empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--border); border-radius: var(--r-3); color: var(--text-muted); }

.domain-list { display: grid; gap: 16px; }
.domain-card { border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-2); padding: 20px; }
.domain-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.domain-head h2 { font-size: 20px; word-break: break-all; }
.domain-meta { display: grid; gap: 6px; color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.meta-label { color: var(--dim); display: inline-block; min-width: 96px; }
.target-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.domain-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.history summary { cursor: pointer; color: var(--text-muted); font-size: 14px; }
.history-list { margin-top: 8px; }

.status-active { color: var(--green); }
.status-grace, .status-provisioning { color: var(--warn); }
.status-blocked, .status-canceled, .status-refunded { color: var(--danger); }
.status-paid { color: var(--green); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 28px; }
.stat { border: 1px solid var(--border); border-radius: var(--r-2); padding: 14px 16px; color: var(--dim); font-size: 13px; background: var(--surface); }
.stat span { display: block; font-size: 26px; font-weight: 700; color: var(--text-main); }

.table-block { margin-bottom: 32px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-2); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: middle; }
.table th { color: var(--dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form input {
    height: 32px;
    width: 110px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    padding: 0 8px;
    font: inherit;
    font-size: 12px;
}
.audit { list-style: none; padding: 0; font-size: 13px; }
.audit li { padding: 4px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }

.pay-state { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-2); background: var(--surface); margin: 18px 0; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(34, 197, 94, 0.25); border-top-color: var(--green); animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot {
    border-top: 1px solid var(--border);
    padding: 22px 24px 34px;
    color: var(--dim);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.foot-note { color: var(--dim); }

@media (max-width: 720px) {
    .wrap { width: calc(100% - 28px); padding: 28px 0 56px; }
    .nav { padding: 12px 14px; }
    .nav-links { gap: 12px; }
    .nav-links a:not(.nav-cta):not(.nav-ghost) { display: none; }
    .picker { padding: 20px; }
    .big-input input, .big-suffix { font-size: 40px; }
    .foot { flex-direction: column; }
}
