:root {
    --bg: #070914;
    --panel: rgba(14, 11, 9, 0.88);
    --panel-strong: #14100c;
    --text: #f4f7fb;
    --muted: #c4b5a8;
    --line: rgba(255, 154, 60, 0.18);
    --primary: #ff9a3c;
    --primary-2: #e85d04;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(232, 93, 4, 0.14), transparent 32rem),
        radial-gradient(circle at 80% 5%, rgba(255, 154, 60, 0.1), transparent 28rem),
        linear-gradient(135deg, #050403, #0c0a10 45%, #070914);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0;
}

.brand {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand span {
    color: var(--primary);
}

.brand.center {
    display: block;
    margin-bottom: 24px;
    text-align: center;
}

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

nav form {
    margin: 0;
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.hero,
.page-wrap,
footer {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    padding: 74px 0 54px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #ffc078;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 20px;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 0.96;
}

.hero h1 {
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 0.96;
}

.page-wrap .panel > h1.page-title,
.page-wrap .panel > h1:not(.page-title),
.auth-card > h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    line-height: 1.2;
}

.panel-account .account-id {
    margin: 0 0 8px;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
    word-break: break-word;
}

.panel-account .account-secondary {
    margin: 0;
}

.order-card h2,
.admin-order h2 {
    font-size: 1.35rem;
    line-height: 1.2;
}

.hero-text {
    max-width: 660px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #ffb347, var(--primary-2));
    color: #1a0a02;
    box-shadow: 0 8px 24px rgba(232, 93, 4, 0.28);
}

.btn-ghost {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.14);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.34);
}

.full {
    width: 100%;
}

.hero-card,
.panel,
.plan-card,
.order-card,
.admin-order,
.auth-card,
.empty-state {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.hero-card {
    position: relative;
    overflow: hidden;
    padding: 34px;
}

.pulse {
    width: 86px;
    height: 86px;
    margin-bottom: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary), rgba(232, 93, 4, 0.05) 70%);
    box-shadow: 0 0 80px rgba(255, 154, 60, 0.5);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 28px;
}

.stat-grid div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

.stat-grid strong,
.stat-grid span {
    display: block;
}

.stat-grid strong {
    color: var(--primary);
    font-size: 1.4rem;
}

.stat-grid span,
.muted {
    color: var(--muted);
}

.features,
.plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.features article {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
}

.features span {
    color: var(--primary);
    font-weight: 900;
}

.plans-section {
    padding: 74px 0;
}

.section-title {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto 22px;
}

.plan-card {
    padding: 28px;
}

.plan-label {
    color: var(--primary);
    font-weight: 900;
}

.plan-card h3,
.big-price {
    font-size: 2rem;
}

.page-wrap {
    padding: 36px 0 72px;
}

.page-wrap.wide {
    width: min(1320px, calc(100% - 32px));
}

.panel {
    margin-bottom: 18px;
    padding: 28px;
}

.panel.narrow {
    width: min(520px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}

.bank-box {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
}

dl {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 10px;
}

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

dd {
    margin: 0;
    font-weight: 800;
}

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

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.muted.center {
    text-align: center;
    margin: 0;
}

.field-hint {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
    font: inherit;
    padding: 14px 16px;
    outline: none;
}

input:focus,
textarea:focus {
    border-color: rgba(255, 154, 60, 0.55);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.15);
}

textarea {
    resize: vertical;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(440px, 100%);
    padding: 32px;
}

.auth-card--wide {
    width: min(520px, 100%);
}

.auth-section h2 {
    margin: 0 0 8px;
    font-size: 1.25rem;
}

.auth-divider {
    margin: 28px 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.account-actions {
    margin-top: 16px;
}

.alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
}

.alert.success {
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

.alert.error {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.alert.info {
    background: rgba(56, 189, 248, 0.12);
    color: #bae6fd;
}

.alert.info a {
    color: #7dd3fc;
    font-weight: 600;
}

.auth-footer {
    margin-top: 20px;
}

.orders,
.admin-list {
    display: grid;
    gap: 18px;
}

.order-card,
.admin-order,
.empty-state {
    padding: 24px;
}

.order-head,
.order-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-order-actions {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.admin-approve-form {
    display: grid;
    gap: 12px;
    margin: 0;
}

.admin-approve-form label {
    width: 100%;
}

.admin-order-btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.admin-order-btn-row form {
    margin: 0;
}

.admin-order-btn-row .btn {
    border-radius: 12px;
    min-height: 42px;
    padding: 0 22px;
    font-size: 0.92rem;
    white-space: nowrap;
}

.admin-order-btn-row .btn-primary {
    min-width: 132px;
}

.admin-order-btn-row .btn-danger {
    min-width: 108px;
}

.order-meta {
    justify-content: flex-start;
    margin: 12px 0 18px;
    color: var(--muted);
}

.order-meta span {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.status {
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}

.status.pending {
    background: rgba(245, 158, 11, 0.16);
    color: #fde68a;
}

.status.approved {
    background: rgba(34, 197, 94, 0.16);
    color: #bbf7d0;
}

.status.rejected {
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}

.bank-instruction,
.license-box {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
}

code {
    display: inline-block;
    max-width: 100%;
    color: #ffb347;
    word-break: break-word;
}

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    padding: 24px 0 36px;
    color: var(--muted);
}

@media (max-width: 820px) {
    .site-header,
    nav,
    .hero,
    .checkout-grid,
    .features,
    .plans {
        grid-template-columns: 1fr;
    }

    .site-header,
    nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero {
        padding-top: 36px;
    }

    dl {
        grid-template-columns: 1fr;
    }
}

/* --- Last Z pages (home, login, admin) — layout/background extras --- */
.page-lastz {
    background: #070914;
}

.page-lastz .btn-ghost {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.35);
}

.page-lastz .btn-ghost:hover {
    border-color: rgba(255, 154, 60, 0.45);
    background: rgba(232, 93, 4, 0.12);
}

.page-lastz .panel,
.page-lastz .order-card,
.page-lastz .admin-order,
.page-lastz .empty-state,
.page-lastz .auth-card {
    border-color: rgba(255, 154, 60, 0.25);
    background: var(--panel);
}

.page-lastz .bank-box,
.page-lastz .bank-instruction,
.page-lastz .license-box {
    border-color: rgba(255, 154, 60, 0.2);
    background: rgba(8, 6, 5, 0.55);
}

.page-lastz .stat-grid strong {
    color: var(--primary);
}

.site-header--app nav .nav-active {
    color: #fbbf24;
    font-weight: 600;
}

.page-lastz .site-header--app {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1320px) / 2));
    padding-right: max(16px, calc((100% - 1320px) / 2));
    border-bottom: 1px solid rgba(255, 154, 60, 0.12);
    background: linear-gradient(180deg, rgba(14, 11, 9, 0.98), rgba(7, 9, 20, 0.85));
}

.page-lastz.auth-page {
    background:
        linear-gradient(180deg, rgba(5, 4, 3, 0.9) 0%, rgba(7, 9, 20, 0.94) 100%),
        radial-gradient(ellipse at 75% 15%, rgba(232, 93, 4, 0.18), transparent 55%),
        #050403 url("/images/hero-lastz.webp") center 40% / cover no-repeat;
}

.page-lastz .auth-card {
    box-shadow: 0 28px 100px rgba(0, 0, 0, 0.55);
}

.page-lastz .auth-back {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.page-lastz .auth-back:hover {
    color: var(--primary);
}

.page-lastz .alert.success {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.page-lastz .alert.error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

/* --- Homepage: Option A cinematic (Last Z key art) --- */
.page-home {
    background: #070914;
}

.page-home .site-header--home {
    position: absolute;
    z-index: 20;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1160px, calc(100% - 32px));
    padding-top: 20px;
    background: linear-gradient(180deg, rgba(5, 4, 3, 0.72), transparent);
}

.page-home .site-header--home .btn-ghost {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
}

.page-home .hero-cinematic {
    position: relative;
    display: block;
    width: 100%;
    max-width: none;
    min-height: 85vh;
    margin: 0;
    padding: 0;
    background: #050403 url("/images/hero-lastz.webp") center 32% / cover no-repeat;
}

.page-home .hero-cinematic::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        102deg,
        rgba(5, 4, 3, 0.94) 0%,
        rgba(5, 4, 3, 0.72) 32%,
        rgba(5, 4, 3, 0.2) 58%,
        rgba(20, 12, 8, 0.45) 100%
    );
    pointer-events: none;
}

.page-home .hero-cinematic::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 140px;
    background: linear-gradient(180deg, transparent, #070914);
    pointer-events: none;
}

.page-home .hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: min(1160px, calc(100% - 32px));
    min-height: 85vh;
    margin: 0 auto;
    padding: 120px 0 56px;
}

.page-home .hero-copy {
    max-width: 560px;
}

.page-home .hero-copy h1 {
    text-shadow: 0 4px 32px rgba(0, 0, 0, 0.65);
}

.page-home .hero-text {
    color: #e8ddd4;
}

.page-home .hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.page-home .hero-stats li {
    padding: 12px 18px;
    border: 1px solid rgba(255, 154, 60, 0.35);
    border-radius: 16px;
    background: rgba(8, 6, 5, 0.72);
    backdrop-filter: blur(10px);
}

.page-home .hero-stats strong {
    display: block;
    color: var(--primary);
    font-size: 1.25rem;
}

.page-home .hero-stats span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.82rem;
}

.page-home .home-content {
    position: relative;
    z-index: 2;
    margin-top: -24px;
    background: #070914;
}

.page-home .features {
    padding-top: 8px;
}

.page-home .features article {
    background: rgba(14, 11, 9, 0.75);
    border-color: rgba(255, 154, 60, 0.2);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.page-home .features article:hover {
    border-color: rgba(255, 154, 60, 0.45);
    transform: translateY(-2px);
}

.page-home .features span,
.page-home .plan-label {
    color: #ffb347;
}

.page-home .plan-card {
    background: rgba(14, 11, 9, 0.9);
    border-color: rgba(255, 154, 60, 0.25);
}

.page-home .plan-card:hover {
    border-color: rgba(255, 154, 60, 0.5);
}

.page-home .site-footer--home {
    background: #070914;
    border-top: 1px solid rgba(255, 154, 60, 0.12);
}

/* Landing: screenshots + video */
.showcase-section {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 24px;
}

.showcase-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.showcase-intro {
    max-width: 520px;
    margin: 8px 0 0;
}

/* Swiper carousel (MIT, https://swiperjs.com) — portrait screenshots, caption beside image */
.screenshot-swiper {
    --screenshot-slide-height: min(560px, 72vh);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 154, 60, 0.28);
    border-radius: 20px;
    background: rgba(8, 6, 5, 0.85);
}

.screenshot-swiper .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.screenshot-swiper .swiper-slide {
    height: var(--screenshot-slide-height);
}

.screenshot-slide {
    display: grid;
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    height: 100%;
    align-items: stretch;
}

.screenshot-slide-media {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    border-right: 1px solid rgba(255, 154, 60, 0.18);
    background: radial-gradient(ellipse at 50% 40%, rgba(232, 93, 4, 0.08), transparent 70%), #0a0806;
}

.screenshot-slide-media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
    max-height: calc(var(--screenshot-slide-height) - 32px);
    object-fit: contain;
    object-position: center center;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.screenshot-slide-caption {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 36px 28px 28px;
    background: rgba(14, 11, 9, 0.95);
}

.screenshot-slide-caption h3 {
    margin: 0 0 12px;
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    line-height: 1.25;
    color: #ffc078;
}

.screenshot-slide-caption p {
    margin: 0;
    max-width: 42ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.screenshot-swiper .swiper-button-prev,
.screenshot-swiper .swiper-button-next {
    color: #ffb347;
    top: 50%;
    transform: translateY(-50%);
}

.screenshot-swiper .swiper-button-prev::after,
.screenshot-swiper .swiper-button-next::after {
    font-size: 1.35rem;
    font-weight: 900;
}

.screenshot-swiper .swiper-pagination-bullet {
    background: rgba(255, 154, 60, 0.35);
    opacity: 1;
}

.screenshot-swiper .swiper-pagination-bullet-active {
    background: #ff9a3c;
}

.showcase-video {
    margin-top: 32px;
    padding: 24px;
    border: 1px solid rgba(255, 154, 60, 0.22);
    border-radius: 20px;
    background: rgba(14, 11, 9, 0.75);
}

.showcase-video h3 {
    margin: 0 0 16px;
    font-size: 1.15rem;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.showcase-video--placeholder {
    text-align: left;
}

.showcase-video--placeholder code {
    font-size: 0.82rem;
}

/* Docs page */
.docs-page .docs-toc ol {
    margin: 0;
    padding-left: 20px;
}

.docs-page .docs-toc a {
    color: var(--primary);
    font-weight: 700;
}

.docs-page .docs-toc a:hover {
    color: #ffb347;
}

.docs-section h2 {
    margin-bottom: 14px;
    font-size: 1.25rem;
}

.docs-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.65;
}

.docs-list li + li {
    margin-top: 8px;
}

.docs-faq dt {
    margin-top: 16px;
    font-weight: 800;
    color: #ffc078;
}

.docs-faq dt:first-child {
    margin-top: 0;
}

.docs-faq dd {
    margin: 6px 0 0;
    color: var(--muted);
}

.docs-section .btn {
    margin-top: 12px;
    margin-right: 8px;
}

@media (max-width: 820px) {
    .showcase-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .screenshot-swiper {
        --screenshot-slide-height: auto;
    }

    .screenshot-swiper .swiper-slide {
        height: auto;
    }

    .screenshot-slide {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .screenshot-slide-media {
        min-height: 280px;
        max-height: 52vh;
        padding: 12px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 154, 60, 0.18);
    }

    .screenshot-slide-media img {
        width: 100%;
        max-height: 50vh;
        height: auto;
    }

    .screenshot-slide-caption {
        padding: 18px 20px 24px;
    }

    .screenshot-slide-caption p {
        max-width: none;
    }
}

@media (max-width: 820px) {
    .page-home .hero-cinematic {
        min-height: 78vh;
        background-position: 62% 28%;
    }

    .page-home .hero-inner {
        min-height: 78vh;
        padding-top: 100px;
    }

    .page-home .hero-copy h1 {
        font-size: clamp(2rem, 9vw, 2.75rem);
    }

    .page-home .site-header--home {
        position: relative;
        transform: none;
        left: auto;
        width: min(1160px, calc(100% - 32px));
        margin: 0 auto;
        background: #070914;
    }

    .page-home .hero-cinematic::after {
        height: 80px;
    }
}
