:root {
    --bg: #07111d;
    --bg-deep: #040a12;
    --surface: rgba(11, 23, 40, 0.84);
    --surface-strong: rgba(9, 17, 30, 0.96);
    --text: #f7efe2;
    --muted: #9bb0c5;
    --line: rgba(155, 176, 197, 0.16);
    --accent: #38bdf8;
    --accent-warm: #f59e0b;
    --accent-soft: #34d399;
    --danger: #fb7185;
    --shadow: 0 24px 60px rgba(2, 8, 18, 0.42);
    --radius: 24px;
    --content-width: min(1180px, calc(100vw - 2rem));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 34%),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.14), transparent 28%),
        linear-gradient(145deg, #08111e 0%, #0b1728 46%, #050a12 100%);
    line-height: 1.6;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 90%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: Georgia, "Palatino Linotype", serif;
    letter-spacing: -0.03em;
    line-height: 1.04;
}

p {
    margin: 0;
}

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

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

.ambient {
    position: fixed;
    width: 26rem;
    height: 26rem;
    border-radius: 999px;
    filter: blur(70px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
    animation: float 12s ease-in-out infinite;
}

.ambient-one {
    top: 5rem;
    right: -8rem;
    background: rgba(56, 189, 248, 0.25);
}

.ambient-two {
    bottom: -8rem;
    left: -8rem;
    background: rgba(245, 158, 11, 0.18);
    animation-delay: 1.8s;
}

.site-header {
    position: relative;
    z-index: 2;
    padding-top: 1.25rem;
}

.nav-shell,
.footer-shell,
.page-shell {
    width: var(--content-width);
    margin: 0 auto;
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(9, 18, 31, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.95rem;
}

.brand-mark {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--accent-warm), #fde68a 60%, var(--accent));
    color: #07111d;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.area-admin .brand-mark {
    background: linear-gradient(135deg, #34d399, #67e8f9);
}

.area-billing .brand-mark {
    background: linear-gradient(135deg, #f59e0b, #fb7185);
}

.area-panel .brand-mark {
    background: linear-gradient(135deg, #60a5fa, #34d399);
}

.brand-copy {
    display: inline-flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 700;
    letter-spacing: 0.03em;
}

.brand-motto {
    font-size: 0.88rem;
    color: var(--muted);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.72rem 1rem;
    border-radius: 999px;
    color: var(--muted);
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.nav-link.is-button {
    background: linear-gradient(135deg, var(--accent-warm), #fcd34d);
    color: #07111d;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    padding: 0.72rem 1rem;
    border-radius: 999px;
}

.page-shell {
    position: relative;
    z-index: 1;
    padding: 1.5rem 0 4rem;
}

.section {
    margin-top: 1.5rem;
}

.content-card,
.product-card,
.stat-card,
.panel-service-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.content-card,
.product-card,
.panel-service-card {
    padding: 1.5rem;
}

.hero-grid,
.auth-shell,
.split-grid,
.three-up,
.panel-grid,
.stats-grid,
.product-grid {
    display: grid;
    gap: 1rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    align-items: stretch;
    margin-top: 1rem;
}

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

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

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

.stats-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

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

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

.hero-copy {
    padding: 1.8rem;
}

.eyebrow {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #8ce0ff;
    margin-bottom: 0.75rem;
}

.hero-title {
    max-width: 10ch;
    font-size: clamp(2.9rem, 7vw, 5.2rem);
}

.hero-text,
.muted-copy,
.footer-copy,
.table-subline,
.stat-note,
.empty-inline {
    color: var(--muted);
}

.hero-text {
    margin-top: 1rem;
    max-width: 42rem;
    font-size: 1.05rem;
}

.page-intro {
    padding: 1.65rem;
}

.page-intro h1,
.section-heading h2,
.stack-list h2,
.cta-card h2 {
    margin-bottom: 0.75rem;
}

.button-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.button-row {
    margin-top: 1.25rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.85rem 1.15rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-warm), #fcd34d);
    color: #08111d;
}

.btn-secondary {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.32);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--muted);
}

.small-btn {
    padding: 0.75rem 0.95rem;
}

.section-heading,
.compact-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.text-link {
    color: #8ce0ff;
}

.stack-list {
    display: grid;
    align-content: start;
    gap: 0.85rem;
}

.stack-item {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stack-item span,
.stat-label {
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card {
    padding: 1.25rem;
}

.stat-card strong {
    display: block;
    margin: 0.4rem 0;
    font-size: clamp(1.6rem, 4vw, 2.35rem);
}

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

.product-card::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent 70%);
}

.category-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.price-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.2rem 0 0.9rem;
}

.price-row strong {
    font-size: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.field,
.mini-field {
    display: grid;
    gap: 0.45rem;
}

.field span,
.mini-field span {
    color: var(--muted);
    font-size: 0.88rem;
}

.field.full,
.full,
.full-width-field {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.85rem 0.95rem;
    background: rgba(2, 8, 18, 0.4);
    color: var(--text);
}

textarea {
    resize: vertical;
    min-height: 112px;
}
.inline-form {
    display: grid;
    gap: 0.75rem;
}

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

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

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

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

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

.empty-state,
.empty-inline {
    padding: 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.link-card {
    transition: transform 180ms ease, border-color 180ms ease;
}

.link-card:hover {
    transform: translateY(-2px);
    border-color: rgba(140, 224, 255, 0.22);
}

.panel-service-card,
.cta-card {
    display: grid;
    gap: 0.9rem;
}

.banner {
    margin-top: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
}

.banner strong {
    margin-right: 0.3rem;
}

.banner-warning {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.12);
}

.banner-error {
    border-color: rgba(251, 113, 133, 0.28);
    background: rgba(251, 113, 133, 0.12);
}

.banner-success,
.banner-active,
.status-pill.status-active,
.status-pill.status-paid,
.status-pill.status-linked,
.status-pill.status-admin,
.status-pill.status-wisp {
    border-color: rgba(52, 211, 153, 0.24);
    background: rgba(52, 211, 153, 0.14);
}

.status-pill.status-manual,
.status-pill.status-draft,
.status-pill.status-pending,
.status-pill.status-ready {
    border-color: rgba(56, 189, 248, 0.24);
    background: rgba(56, 189, 248, 0.14);
}

.status-pill.status-warning,
.status-pill.status-overdue,
.status-pill.status-past-due,
.status-pill.status-unpaid,
.status-pill.status-queued {
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(245, 158, 11, 0.14);
}

.status-pill.status-suspended,
.status-pill.status-cancelled,
.status-pill.status-archived,
.status-pill.status-error,
.status-pill.status-customer,
.status-pill.status-danger {
    border-color: rgba(251, 113, 133, 0.24);
    background: rgba(251, 113, 133, 0.14);
}

.site-footer {
    margin-top: 2rem;
    padding: 0 0 2rem;
}

.footer-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
}

.footer-title {
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--muted);
}

[data-reveal],
.stagger {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 650ms ease, transform 650ms ease;
}

[data-reveal].is-visible,
.stagger.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, -18px, 0);
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .auth-shell,
    .split-grid,
    .three-up,
    .stats-grid,
    .product-grid,
    .catalog-grid,
    .panel-grid,
    .admin-inline-form,
    .wide-inline-form {
        grid-template-columns: 1fr;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        width: 100%;
        padding-top: 0.75rem;
        border-top: 1px solid var(--line);
    }

    .nav-links.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-shell {
        flex-wrap: wrap;
        border-radius: 30px;
    }

    .hero-title {
        max-width: none;
    }

    .footer-shell {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .page-shell,
    .nav-shell,
    .footer-shell {
        width: min(100vw - 1.2rem, var(--content-width));
    }

    .content-card,
    .product-card,
    .panel-service-card,
    .stat-card {
        padding: 1.15rem;
    }

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

    .button-row,
    .tag-row {
        flex-direction: column;
        align-items: stretch;
    }
}
