:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-2: #eef4ff;
    --text: #172033;
    --muted: #000000;
    --border: #d9e2ef;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #0f766e;
    --warning: #b45309;
    --danger: #dc2626;
    --shadow: 0 20px 55px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34rem),
        radial-gradient(circle at 85% 10%, rgba(20, 184, 166, 0.10), transparent 28rem),
        var(--bg);
    line-height: 1.6;
}

body.theme-dark {
    --bg: #050505;
    --surface: #0b0b0f;
    --surface-2: #111827;
    --text: #f8fafc;
    --muted: #ffffff;
    --border: #263244;
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}

body.theme-dark .site-header {
    background: rgba(5, 5, 5, 0.86);
    border-bottom-color: var(--border);
}

body.theme-dark .hero-card,
body.theme-dark .module-card,
body.theme-dark .feature-card,
body.theme-dark .stat-card,
body.theme-dark .panel,
body.theme-dark .auth-card,
body.theme-dark .install-card {
    background: rgba(11, 11, 15, 0.94);
    border-color: var(--border);
}

body.theme-dark .section-muted {
    background: rgba(11, 11, 15, 0.45);
    border-color: var(--border);
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(246, 248, 251, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(217, 226, 239, 0.8);
}

.nav {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand strong {
    display: block;
    font-size: 1rem;
    line-height: 1.1;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.brand-logo-large {
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 22px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.92rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 900;
}

.theme-toggle-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 1.15rem;
    line-height: 1;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.theme-toggle:hover {
    color: #fff;
    background: var(--primary);
}

body.theme-dark .button-secondary,
body.theme-dark .admin-tabs a {
    background: var(--surface);
    border-color: var(--border);
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
    background: #0f172a;
    border-color: var(--border);
    color: var(--text);
}

body.theme-dark .captcha-label {
    color: var(--text);
}

body.theme-dark .alert {
    border-color: var(--border);
}

body.theme-dark details summary {
    color: var(--primary);
}

.page {
    min-height: calc(100vh - 76px);
}

.hero,
.section {
    padding: 72px 0;
}

.hero-grid,
.split-section,
.request-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 32px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}

h1,
h2,
h3 {
    line-height: 1.12;
    margin: 0;
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(2.3rem, 6vw, 4.7rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
    font-size: 1.25rem;
}

.hero-copy,
.lead {
    color: var(--muted);
    font-size: 1.12rem;
    max-width: 68ch;
}

.hero-actions,
.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.20);
}

.button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.button-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
    box-shadow: none;
}

.button-secondary:hover {
    background: var(--surface-2);
    color: var(--primary-dark);
}

.button-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.86rem;
}

.hero-card,
.panel,
.module-card,
.feature-card,
.stat-card,
.auth-card,
.install-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 226, 239, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 28px;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.metric-row div {
    padding: 16px;
    border-radius: 18px;
    background: var(--surface-2);
}

.metric-row strong {
    display: block;
    font-size: 1.45rem;
}

.metric-row span {
    color: var(--muted);
    font-size: 0.82rem;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.check-list li {
    position: relative;
    padding-left: 30px;
    color: var(--muted);
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--success);
    font-weight: 900;
}

.section-muted {
    background: rgba(255, 255, 255, 0.48);
    border-top: 1px solid rgba(217, 226, 239, 0.8);
    border-bottom: 1px solid rgba(217, 226, 239, 0.8);
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-heading p {
    color: var(--muted);
    font-size: 1.05rem;
}

.card-grid,
.feature-grid,
.stats-grid {
    display: grid;
    gap: 18px;
}

.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-grid,
.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-card,
.feature-card,
.stat-card,
.panel {
    padding: 24px;
}

.module-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 100%;
}

.module-card p,
.feature-card p {
    color: var(--muted);
    margin: 0;
}

.module-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.badge,
.price,
.pill-row span,
.status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 800;
}

.badge {
    color: var(--primary);
    background: var(--surface-2);
}

.price {
    color: var(--success);
    background: #ecfdf5;
}

.pill-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-row span {
    color: #334155;
    background: #f1f5f9;
}

.text-link {
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card .number {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #14b8a6);
    margin-bottom: 18px;
}

.split-section .panel {
    background: #fff;
}

.dashboard-header {
    padding: 54px 0 28px;
}

.dashboard-header h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 10px 0 12px;
}

.dashboard-header p {
    color: var(--muted);
    max-width: 760px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.admin-tabs a {
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--muted);
    font-weight: 800;
}

.admin-tabs a.active,
.admin-tabs a:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
}

.form {
    display: grid;
    gap: 14px;
}

.grid-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form label,
.inline-form {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 800;
    font-size: 0.9rem;
}

.form .full,
.wide-panel {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    color: var(--text);
    background: #fff;
    outline: none;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: #334155;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

td small {
    color: var(--muted);
}

.status {
    border: 0;
    padding: 5px 9px;
}

.status-new {
    color: var(--primary);
    background: #eff6ff;
}

.status-contacted,
.status-in_progress {
    color: var(--warning);
    background: #fffbeb;
}

.status-won,
.status-active {
    color: var(--success);
    background: #ecfdf5;
}

.status-lost,
.status-paused {
    color: var(--danger);
    background: #fef2f2;
}

.status-beta {
    color: #7c3aed;
    background: #f5f3ff;
}

.status-coming_soon {
    color: #0f766e;
    background: #f0fdfa;
}

.alert {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
}

.alert-success {
    color: var(--success);
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.alert-error {
    color: var(--danger);
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.alert-warning {
    color: var(--warning);
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.auth-section,
.install-page {
    min-height: calc(100vh - 76px);
    display: grid;
    place-items: center;
    padding: 48px 16px;
}

.auth-card,
.install-card {
    width: min(460px, 100%);
    padding: 30px;
}

.install-body {
    display: block;
}

.install-page {
    min-height: 100vh;
}

.install-card {
    width: min(520px, 100%);
    text-align: center;
}

.install-card .brand-mark {
    margin-bottom: 16px;
}

.install-card h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-note {
    color: var(--muted);
    margin: 16px 0 0;
}

.bot-field {
    display: none;
}

.captcha-label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-weight: 800;
    font-size: 0.9rem;
}

.captcha-label span {
    color: var(--muted);
    font-weight: 700;
}

.install-theme {
    margin-top: 14px;
    display: flex;
    justify-content: center;
}

.empty {
    color: var(--muted);
    margin: 0;
}

.inline-form {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
}

.inline-form select {
    min-width: 150px;
}

.compact-form {
    min-width: 320px;
    margin-top: 10px;
}

details {
    display: inline-block;
}

summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 900;
}

.site-footer {
    padding: 42px 0;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
}

.site-footer strong {
    display: block;
    color: var(--text);
    margin-bottom: 6px;
}

.site-footer p {
    margin: 0;
}

.detail-hero {
    padding: 36px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

@media (max-width: 980px) {
    .nav {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
    }

    .hero-grid,
    .split-section,
    .request-grid,
    .two-columns,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .card-grid,
    .feature-grid,
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .hero,
    .section {
        padding: 48px 0;
    }

    .card-grid,
    .feature-grid,
    .stats-grid,
    .metric-row,
    .grid-form {
        grid-template-columns: 1fr;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }

    .button {
        width: 100%;
    }

    .hero-actions .button,
    .form-actions .button {
        width: auto;
    }

    .inline-form {
        grid-template-columns: 1fr;
    }

    .compact-form {
        min-width: 0;
    }
}