:root {
    --purple-900: #2e1065;
    --purple-800: #4c1d95;
    --purple-700: #6d28d9;
    --purple-600: #7c3aed;
    --purple-100: #ede9fe;
    --purple-50: #f5f3ff;
    --white: #ffffff;
    --ink: #171321;
    --muted: #625b71;
    --line: #e5e1ef;
    --surface: #fbfaff;
    --green: #0f766e;
    --green-soft: #ccfbf1;
    --gold: #a16207;
    --gold-soft: #fef3c7;
    --red: #b42318;
    --red-soft: #fee4e2;
    --shadow: 0 18px 50px rgba(46, 16, 101, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
    padding: 18px clamp(18px, 5vw, 70px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 800;
    color: var(--purple-900);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: var(--white);
    background: linear-gradient(135deg, var(--purple-800), var(--purple-600));
    box-shadow: 0 12px 24px rgba(109, 40, 217, 0.22);
    flex: 0 0 auto;
}

.site-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a,
.dashboard-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 650;
}

.site-nav a:hover,
.site-nav a.active,
.dashboard-nav a:hover,
.dashboard-nav a.active {
    color: var(--purple-800);
    background: var(--purple-50);
}

.nav-toggle,
.sidebar-toggle {
    display: none;
}

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
}

.btn-primary,
button {
    color: var(--white);
    background: var(--purple-700);
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.2);
}

.btn-primary:hover,
button:hover {
    background: var(--purple-800);
}

.btn-secondary {
    color: var(--purple-800);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn-ghost {
    color: var(--purple-800);
    background: var(--purple-50);
    box-shadow: none;
}

.login-pill {
    white-space: nowrap;
}

.hero,
.section,
.page-hero {
    padding: clamp(52px, 8vw, 98px) clamp(18px, 5vw, 70px);
}

.hero {
    min-height: calc(100vh - 78px);
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(340px, 0.98fr);
    align-items: center;
    gap: clamp(34px, 6vw, 72px);
    background:
        linear-gradient(120deg, rgba(245, 243, 255, 0.95), rgba(255, 255, 255, 0.98) 48%, rgba(237, 233, 254, 0.85)),
        repeating-linear-gradient(90deg, rgba(109, 40, 217, 0.05) 0 1px, transparent 1px 72px);
}

.hero h1,
.page-hero h1 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: 0;
    color: var(--purple-900);
}

.hero p,
.page-hero p,
.section-lead {
    max-width: 680px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.72;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
    max-width: 650px;
}

.metric {
    padding: 18px;
    border: 1px solid rgba(109, 40, 217, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
}

.metric strong {
    display: block;
    color: var(--purple-800);
    font-size: 28px;
}

.metric span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.product-visual {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.visual-topbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background: var(--purple-900);
    color: var(--white);
}

.visual-body {
    padding: 22px;
}

.visual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.visual-card {
    min-height: 116px;
    padding: 16px;
    border-radius: 8px;
    background: var(--purple-50);
    border: 1px solid var(--line);
}

.visual-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--purple-900);
}

.visual-progress {
    height: 10px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
}

.visual-progress span {
    display: block;
    height: 100%;
    width: var(--value, 50%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--purple-700), var(--green));
}

.visual-table {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.visual-row {
    display: grid;
    grid-template-columns: 1fr 90px 80px;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.visual-row:last-child {
    border-bottom: 0;
}

.section {
    background: var(--white);
}

.section.alt {
    background: var(--purple-50);
}

.section-header {
    max-width: 760px;
    margin-bottom: 32px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--purple-700);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h2 {
    margin: 0 0 12px;
    color: var(--purple-900);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: 0;
}

h3 {
    margin: 0 0 10px;
    color: var(--purple-900);
    font-size: 20px;
    line-height: 1.25;
}

.feature-grid,
.pricing-grid,
.review-grid,
.stat-grid,
.form-grid,
.dashboard-grid {
    display: grid;
    gap: 18px;
}

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

.pricing-grid {
    grid-template-columns: repeat(5, minmax(190px, 1fr));
}

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

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

.dashboard-grid {
    grid-template-columns: 1.35fr 0.65fr;
}

.card,
.price-card,
.review-card,
.stat-card,
.form-card,
.table-card,
.settings-panel {
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 10px 30px rgba(46, 16, 101, 0.06);
}

.card,
.review-card,
.stat-card,
.form-card,
.settings-panel {
    padding: 22px;
}

.price-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
}

.price-card.featured {
    border-color: rgba(109, 40, 217, 0.45);
    box-shadow: 0 16px 38px rgba(109, 40, 217, 0.16);
}

.price {
    color: var(--purple-900);
    font-size: 36px;
    font-weight: 850;
}

.credits {
    color: var(--green);
    font-weight: 800;
}

.price-card p,
.card p,
.review-card p,
.settings-panel p {
    color: var(--muted);
    line-height: 1.65;
}

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

.list-clean li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
}

.list-clean li::before {
    content: "";
    width: 9px;
    height: 9px;
    margin-top: 9px;
    border-radius: 999px;
    background: var(--purple-700);
    flex: 0 0 auto;
}

.page-hero {
    background: linear-gradient(135deg, var(--purple-50), var(--white));
    border-bottom: 1px solid var(--line);
}

.contact-layout,
.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 26px;
    align-items: start;
}

form {
    margin: 0;
}

.field,
.form-grid {
    margin-bottom: 16px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 750;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

textarea {
    min-height: 126px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--purple-600);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.helper-text {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.table-card {
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

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

th {
    color: var(--muted);
    background: var(--purple-50);
    font-size: 12px;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge-success {
    color: var(--green);
    background: var(--green-soft);
}

.badge-warning {
    color: var(--gold);
    background: var(--gold-soft);
}

.badge-danger {
    color: var(--red);
    background: var(--red-soft);
}

.badge-neutral {
    color: var(--muted);
    background: #f2f4f7;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 34px clamp(18px, 5vw, 70px);
    color: rgba(255, 255, 255, 0.8);
    background: var(--purple-900);
}

.site-footer strong {
    color: var(--white);
}

.site-footer p {
    max-width: 560px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    color: var(--white);
}

.flash-stack {
    position: fixed;
    top: 88px;
    right: 22px;
    z-index: 50;
    display: grid;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
}

.flash {
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: var(--white);
    border-left: 5px solid var(--purple-700);
}

.flash-success {
    border-color: var(--green);
}

.flash-error {
    border-color: var(--red);
}

.dashboard-body {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: #f8f7fc;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 22px;
    color: var(--white);
    background: var(--purple-900);
}

.dashboard-brand {
    color: var(--white);
}

.dashboard-nav {
    display: grid;
    gap: 8px;
}

.dashboard-nav a {
    color: rgba(255, 255, 255, 0.76);
    background: transparent;
}

.dashboard-nav a:hover,
.dashboard-nav a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
}

.logout-link {
    margin-top: auto;
    padding: 12px;
    border-radius: 8px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    font-weight: 750;
}

.dashboard-shell {
    min-width: 0;
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px clamp(18px, 4vw, 36px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.dashboard-topbar h1 {
    margin: 0;
    color: var(--purple-900);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: 0;
}

.topbar-user {
    display: grid;
    justify-items: end;
    color: var(--purple-900);
    font-weight: 800;
}

.topbar-user small {
    color: var(--muted);
    font-weight: 600;
}

.dashboard-main {
    display: grid;
    gap: 22px;
    padding: clamp(18px, 4vw, 36px);
}

.stat-card strong {
    display: block;
    color: var(--purple-900);
    font-size: 34px;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.compact-form {
    display: flex;
    align-items: end;
    gap: 10px;
}

.compact-form select,
.compact-form input {
    min-width: 132px;
}

.capacity-note {
    padding: 16px;
    border-radius: 8px;
    color: var(--purple-900);
    background: var(--purple-50);
    border: 1px solid rgba(109, 40, 217, 0.16);
    font-weight: 750;
}

.muted {
    color: var(--muted);
}

.text-right {
    text-align: right;
}

.rating {
    color: var(--gold);
    font-weight: 900;
}

.empty-state {
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 1180px) {
    .pricing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 920px) {
    .site-header {
        grid-template-columns: 1fr auto auto;
    }

    .nav-toggle,
    .sidebar-toggle {
        display: inline-flex;
        min-height: 40px;
        padding: 9px 12px;
        color: var(--purple-800);
        background: var(--purple-50);
        box-shadow: none;
    }

    .site-nav {
        position: absolute;
        top: 78px;
        left: 18px;
        right: 18px;
        display: none;
        grid-template-columns: 1fr;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: grid;
    }

    .hero,
    .contact-layout,
    .login-layout,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .dashboard-body {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 30;
        width: min(300px, 86vw);
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    .dashboard-sidebar.open {
        transform: translateX(0);
    }
}

@media (max-width: 680px) {
    .site-header {
        padding: 14px 16px;
        gap: 10px;
    }

    .brand span:last-child {
        display: none;
    }

    .hero,
    .section,
    .page-hero {
        padding: 42px 16px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .hero-metrics,
    .pricing-grid,
    .feature-grid,
    .review-grid,
    .stat-grid,
    .form-grid,
    .visual-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-topbar {
        align-items: flex-start;
    }

    .topbar-user {
        display: none;
    }

    .compact-form {
        display: grid;
    }

    .site-footer {
        display: grid;
    }
}
