:root {
    --bg: #070b1a;
    --bg2: #0b1228;
    --panel: #101936;
    --panel2: #141f42;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f7f9ff;
    --muted: #9aa6c5;
    --brand: #7c3cff;
    --brand2: #00d4ff;
    --success: #20d48f;
    --danger: #ff4d6d;
    --warn: #ffd166;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(124, 60, 255, 0.35), transparent 38%),
        radial-gradient(circle at 70% 15%, rgba(0, 212, 255, 0.19), transparent 35%),
        linear-gradient(135deg, #060817, #0c132a 46%, #111a38);
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    padding: 13px 14px;
    outline: none;
    transition: 0.2s;
}

select option {
    background: #111a38;
    color: #fff;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(0, 212, 255, 0.75);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.12);
}

label {
    display: grid;
    gap: 8px;
    font-size: 13px;
    color: #dce5ff;
}
/* Better feature section */
.feature-catalog {
    margin-top: 80px;
}

.feature-catalog-title {
    margin-bottom: 28px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.catalog-grid div {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.18s ease;
}

.catalog-grid div:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 212, 255, 0.35);
    background: rgba(255, 255, 255, 0.085);
}

.catalog-grid strong {
    display: block;
    color: #fff;
    font-size: 16px;
    margin-bottom: 8px;
}

.catalog-grid span {
    color: #9aa6c5;
    font-size: 13px;
}

.capability-box {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    margin-top: 28px;
    padding: 28px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background:
        radial-gradient(circle at top left, rgba(124, 60, 255, 0.20), transparent 34%),
        radial-gradient(circle at bottom right, rgba(0, 212, 255, 0.15), transparent 32%),
        rgba(255, 255, 255, 0.055);
}

.capability-box h3 {
    margin: 18px 0 12px;
    color: #fff;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.capability-box p {
    color: #9aa6c5;
    line-height: 1.75;
}

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

.capability-list span {
    padding: 13px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.065);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #dfe7ff;
    font-size: 14px;
    font-weight: 800;
}

.feature-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    margin-top: 80px;
    padding: 34px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background:
        linear-gradient(135deg, rgba(124, 60, 255, 0.22), rgba(0, 212, 255, 0.13)),
        rgba(255, 255, 255, 0.06);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.feature-cta h2 {
    margin: 18px 0 10px;
    color: #fff;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.feature-cta p {
    margin: 0;
    max-width: 650px;
    color: #d4dcf4;
    line-height: 1.7;
}

.feature-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

@media (max-width: 1000px) {
    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .capability-box {
        grid-template-columns: 1fr;
    }

    .feature-cta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .catalog-grid,
    .capability-list {
        grid-template-columns: 1fr;
    }

    .capability-box,
    .feature-cta {
        padding: 22px;
        border-radius: 22px;
    }

    .feature-catalog,
    .feature-cta {
        margin-top: 54px;
    }

    .feature-cta-actions,
    .feature-cta-actions .btn {
        width: 100%;
    }
}
pre {
    white-space: pre-wrap;
    word-break: break-word;
    margin: 10px 0 0;
    color: #e8efff;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

/* Public layout */

.public-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 70px;
}

.public-nav {
    position: sticky;
    top: 14px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    margin-bottom: 38px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(6, 8, 23, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand > span:last-child {
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    font-weight: 900;
    box-shadow: 0 12px 40px rgba(124, 60, 255, 0.4);
}

.brand strong {
    display: block;
    font-size: 16px;
    line-height: 1.15;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.15;
}

.public-nav .brand {
    color: #fff;
    text-decoration: none;
    flex: 1 1 auto;
}

.public-nav .brand strong,
.public-nav .brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex: 0 0 auto;
}

.public-menu a:not(.btn) {
    padding: 9px 2px;
    font-weight: 800;
    color: #dfe7ff;
}

.public-menu a:not(.btn):hover {
    color: #fff;
}

.mobile-menu-btn {
    appearance: none;
    display: none;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: 0.18s ease;
}

.mobile-menu-btn:hover,
.mobile-menu-btn.is-open {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-menu-btn span {
    display: block;
    width: 21px;
    height: 2px;
    border-radius: 99px;
    background: #fff;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.mobile-menu-btn.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@keyframes menuDrop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */

.btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: 0.18s;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.23);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    color: #fff;
}

.btn-glow {
    border-color: transparent;
    background: linear-gradient(135deg, #00d4ff, #27e7ac);
    color: #031427;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(14px);
}

.btn-ghost {
    background: transparent;
}

.btn-danger {
    background: rgba(255, 77, 109, 0.16);
    border-color: rgba(255, 77, 109, 0.35);
    color: #ffb8c5;
}

.btn-warning {
    background: rgba(255, 209, 102, 0.13);
    border-color: rgba(255, 209, 102, 0.32);
    color: #ffe7a6;
}

.btn-muted {
    background: rgba(255, 255, 255, 0.075);
    color: #c6d0ed;
}

.btn-small {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.full {
    width: 100%;
}

/* Landing hero */

.landing-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: center;
    gap: 44px;
    min-height: 650px;
    padding: 28px 0 46px;
}

.landing-hero::before {
    content: "";
    position: absolute;
    inset: 6% auto auto 44%;
    z-index: -1;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.26), transparent 68%);
    filter: blur(6px);
}

.pill,
.balance-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 9px 14px;
    color: #dce5ff;
    font-size: 13px;
}

.hero-copy h1,
.landing-hero .hero-copy h1 {
    margin: 18px 0;
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.92;
    letter-spacing: -0.06em;
    background: linear-gradient(135deg, #fff 8%, #b8eeff 54%, #b799ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-copy p,
.landing-hero .hero-copy p {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.78;
}

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

/* Hero proof cards */

.hero-proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.hero-proof div {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.065);
    border-radius: 18px;
    padding: 14px;
}

.hero-proof strong {
    display: block;
    font-size: 22px;
}

.hero-proof small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

/* Dashboard preview */

.dashboard-preview {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.13);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.055));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
    border-radius: 30px;
    padding: 24px;
    backdrop-filter: blur(22px);
}

.dashboard-preview::before {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(124, 60, 255, 0.38), transparent 65%);
}

.preview-top {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.preview-top span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
}

.preview-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.18);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
}

.preview-row small {
    color: var(--muted);
}

.preview-row b {
    text-align: right;
    word-break: break-word;
}

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

.preview-actions span {
    border-radius: 14px;
    text-align: center;
    font-weight: 900;
    font-size: 12px;
    padding: 11px;
    background: linear-gradient(135deg, rgba(124, 60, 255, 0.22), rgba(0, 212, 255, 0.15));
    border: 1px solid var(--line);
}

/* Landing sections */

.landing-section,
.pricing-section,
.process-section {
    margin-top: 76px;
    scroll-margin-top: 30px;
}

.section-title {
    max-width: 760px;
    margin: 0 auto 26px;
    text-align: center;
}

.section-title h2 {
    margin: 18px 0 10px;
    font-size: clamp(32px, 4vw, 54px);
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #fff, #a7dfff 55%, #b799ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

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

.feature-card,
.process-grid div {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05));
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.feature-card strong,
.process-grid strong {
    display: block;
    font-size: 18px;
}

.feature-card p,
.process-grid p {
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.65;
}

/* Pricing */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.public-pricing {
    margin-top: 34px;
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
    padding: 24px;
}

.featured-plan {
    border-color: rgba(0, 212, 255, 0.36);
    box-shadow: 0 26px 80px rgba(0, 212, 255, 0.12);
}

.popular-ribbon {
    align-self: flex-start;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 900;
}

.price-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.price-head h3 {
    margin: 0;
    font-size: 22px;
}

.price-head strong {
    font-size: 30px;
}

.price-head span {
    font-size: 14px;
    color: var(--muted);
}

.price-card p {
    color: var(--muted);
    line-height: 1.6;
}

.price-card ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.price-card li {
    position: relative;
    padding-left: 25px;
    color: #dfe7ff;
}

.price-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand2), var(--brand));
}

/* Process */

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.process-grid span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    font-weight: 900;
    margin-bottom: 16px;
}

.landing-footer {
    margin-top: 72px;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
}

.landing-footer strong {
    color: #fff;
}

/* Auth pages */

.auth-card {
    display: grid;
    grid-template-columns: 1fr 420px;
    max-width: 940px;
    margin: 50px auto 30px;
    padding: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.auth-aside {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: radial-gradient(circle at top left, rgba(124, 60, 255, 0.22), transparent 42%), rgba(255, 255, 255, 0.02);
}

.auth-aside h1 {
    margin: 0 0 14px;
    font-size: 42px;
    line-height: 1.05;
}

.auth-aside p {
    color: var(--muted);
    line-height: 1.75;
}

.auth-mini-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.auth-mini-list span {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 11px;
    background: rgba(255, 255, 255, 0.06);
    color: #dfe7ff;
    font-size: 13px;
}

.form-panel {
    background: rgba(7, 11, 26, 0.58);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 26px;
    display: grid;
    gap: 16px;
}

.auth-form h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.form-panel a {
    color: #9deaff;
    font-weight: 850;
}

.form-panel small,
.grid-form small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.5;
}

.auth-form input[name="code"] {
    font-size: 28px;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 800;
}

.center {
    text-align: center;
}

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

/* App dashboard */

.app-shell {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px;
    border-right: 1px solid var(--line);
    background: rgba(6, 8, 23, 0.86);
    backdrop-filter: blur(24px);
    display: flex;
    flex-direction: column;
}

.side-nav {
    margin-top: 30px;
    display: grid;
    gap: 8px;
}

.side-nav a {
    border-radius: 16px;
    padding: 13px 14px;
    color: #b8c4e5;
    font-weight: 750;
    border: 1px solid transparent;
    transition: 0.16s;
}

.side-nav a:hover,
.side-nav a.active {
    background: linear-gradient(135deg, rgba(124, 60, 255, 0.24), rgba(0, 212, 255, 0.14));
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.side-card {
    margin-top: auto;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.065);
    border-radius: 20px;
    padding: 16px;
    display: grid;
    gap: 5px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(32, 212, 143, 0.12);
}

.main {
    padding: 24px 28px 70px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 18px;
}

.topbar h1 {
    margin: 2px 0 0;
    font-size: 32px;
    letter-spacing: -0.025em;
}

.eyebrow {
    margin: 0;
    color: var(--brand2);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Cards, tables, forms */

.flash-stack {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.flash {
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
}

.flash.success {
    border-color: rgba(32, 212, 143, 0.32);
    color: #bfffe6;
}

.flash.error {
    border-color: rgba(255, 77, 109, 0.35);
    color: #ffd0d8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

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

.stat strong {
    display: block;
    font-size: 34px;
    margin-top: 6px;
}

.stat small,
.detail-grid small,
.credential-box small {
    color: var(--muted);
}

.card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.055));
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    backdrop-filter: blur(18px);
    padding: 22px;
    margin-bottom: 22px;
}

.card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card h2 {
    margin: 0;
    font-size: 21px;
}

.card p {
    color: var(--muted);
    line-height: 1.6;
}

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

.grid-form.compact {
    margin-bottom: 18px;
}

.span-2 {
    grid-column: span 2;
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check input {
    width: auto;
}

.mini-form {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
}

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

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

th {
    color: #98a7cc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.045);
}

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

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

.badge {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    text-transform: capitalize;
    font-weight: 900;
    font-size: 11px;
    border: 1px solid var(--line);
}

.badge.good,
.badge.sent {
    color: #bfffe6;
    background: rgba(32, 212, 143, 0.13);
    border-color: rgba(32, 212, 143, 0.3);
}

.badge.info {
    color: #bfefff;
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.3);
}

.badge.warn {
    color: #ffedb8;
    background: rgba(255, 209, 102, 0.12);
    border-color: rgba(255, 209, 102, 0.3);
}

.badge.danger,
.badge.failed {
    color: #ffc4cf;
    background: rgba(255, 77, 109, 0.13);
    border-color: rgba(255, 77, 109, 0.32);
}

.badge.muted,
.badge.skipped {
    color: #c6d0ed;
    background: rgba(255, 255, 255, 0.07);
}

.detail-grid,
.credential-box {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

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

.detail-grid strong,
.credential-box strong {
    display: block;
    font-size: 15px;
    margin-top: 6px;
    word-break: break-word;
}

.alert {
    border-radius: 18px;
    padding: 16px;
    margin-top: 16px;
    border: 1px solid var(--line);
}

.alert.danger {
    background: rgba(255, 77, 109, 0.12);
    border-color: rgba(255, 77, 109, 0.32);
    color: #ffd4dc;
}

.split-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inline-form input,
.inline-form select {
    width: auto;
    min-width: 110px;
    padding: 8px 10px;
    border-radius: 12px;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.method-card {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.055);
    border-radius: 18px;
    padding: 18px;
}

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

.message {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 16px;
}

.message.admin-msg {
    border-color: rgba(0, 212, 255, 0.32);
    background: rgba(0, 212, 255, 0.08);
}

.message strong {
    display: block;
    margin-bottom: 8px;
}

.message small {
    color: var(--muted);
    font-weight: 500;
}

.message p {
    margin: 0;
    color: #e7edff;
}

.reply-box {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.empty {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    color: var(--muted);
    margin: 0;
}

/* Email templates */

.template-stack {
    display: grid;
    gap: 14px;
}

.template-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 18px;
    overflow: hidden;
}

.template-card summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    color: #fff;
}

.template-card summary span {
    color: var(--muted);
    font-size: 13px;
}

.template-card form {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
}

/* Responsive */

@media (max-width: 1100px) {
    .landing-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .feature-grid,
    .pricing-grid,
    .method-grid,
    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: auto;
        height: auto;
    }

    .main {
        padding: 18px;
    }

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

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

@media (min-width: 721px) {
    .public-menu {
        display: flex !important;
    }

    .mobile-menu-btn {
        display: none !important;
    }
}

@media (max-width: 720px) {
    .public-shell {
        width: 100%;
        padding: 12px 14px 54px;
    }

    .public-nav {
        position: sticky;
        top: 8px;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        padding: 12px;
        margin-bottom: 28px;
        border-radius: 20px;
    }

    .public-nav .brand {
        max-width: calc(100% - 58px);
    }

    .public-nav .brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 14px;
    }

    .public-nav .brand strong {
        font-size: 15px;
    }

    .public-nav .brand small {
        font-size: 11px;
    }

    .mobile-menu-btn {
        display: inline-flex;
        margin-left: auto;
    }

    .public-menu {
        display: none;
        width: 100%;
        flex: 1 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding-top: 12px;
        margin-top: 2px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        animation: menuDrop 0.18s ease;
    }

    .public-menu.is-open {
        display: flex;
    }

    .public-menu a,
    .public-menu a:not(.btn) {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        padding: 12px 14px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
        text-align: center;
    }

    .public-menu .btn {
        width: 100%;
    }

    .landing-hero .hero-copy h1,
    .hero-copy h1 {
        font-size: clamp(34px, 10vw, 42px);
    }

    .hero-proof,
    .feature-grid,
    .pricing-grid,
    .process-grid,
    .preview-actions,
    .auth-mini-list,
    .method-grid,
    .auth-card,
    .grid-form,
    .stats,
    .detail-grid,
    .credential-box {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

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

    .preview-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .preview-row b {
        text-align: left;
    }

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

    .auth-aside,
    .form-panel {
        padding: 18px;
    }

    .sidebar {
        padding: 16px 14px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .sidebar .brand {
        width: 100%;
    }

    .sidebar .brand strong,
    .sidebar .brand small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .side-nav {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 18px;
    }

    .side-nav a {
        padding: 12px 10px;
        font-size: 13px;
        text-align: center;
    }

    .side-card {
        margin-top: 16px;
    }

    .main {
        padding: 16px 14px 54px;
    }

    .topbar {
        width: 100%;
        gap: 14px;
        margin-bottom: 18px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.045);
    }

    .topbar h1 {
        font-size: clamp(24px, 8vw, 30px);
        line-height: 1.08;
    }

    .top-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .balance-pill,
    .top-actions .btn {
        width: 100%;
    }

    .card,
    .price-card {
        padding: 16px;
    }

    .btn {
        width: 100%;
    }

    .inline-form .btn {
        width: auto;
    }
}

@media (max-width: 420px) {
    .public-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .public-nav {
        padding: 10px;
        border-radius: 18px;
    }

    .public-nav .brand {
        gap: 9px;
        max-width: calc(100% - 54px);
    }

    .public-nav .brand-mark {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 13px;
        font-size: 13px;
    }

    .public-nav .brand strong {
        font-size: 14px;
    }

    .public-nav .brand small {
        font-size: 10px;
    }

    .mobile-menu-btn {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .side-nav {
        grid-template-columns: 1fr;
    }
}

/* Shared header navigation for public, dashboard, and admin pages */
.app-shell {
    display: block;
    min-height: 100vh;
}

.app-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 14px auto 26px;
}

.app-menu {
    gap: 10px;
    flex-wrap: wrap;
}

.app-menu a:not(.btn) {
    padding: 10px 12px;
    border-radius: 13px;
}

.app-menu a.active,
.app-menu a:not(.btn):hover {
    color: #fff;
    background: linear-gradient(135deg, rgba(124, 60, 255, 0.24), rgba(0, 212, 255, 0.14));
    border-color: rgba(255, 255, 255, 0.1);
}

.app-shell .main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 70px;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.07);
    border-radius: 999px;
    padding: 9px 14px;
    color: #dce5ff;
    font-size: 13px;
    font-weight: 850;
}

@media (min-width: 721px) {
    .app-menu .balance-pill {
        display: none;
    }
}

@media (max-width: 720px) {
    .app-nav {
        width: calc(100% - 28px);
        margin: 12px auto 18px;
    }

    .app-shell .main {
        width: 100%;
        padding: 0 14px 54px;
    }

    .public-menu {
        display: flex !important;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        pointer-events: none;
        transform: translateY(-4px);
        padding-top: 0 !important;
        margin-top: 0 !important;
        border-top: 0 !important;
        animation: none !important;
        transition:
            max-height 0.24s ease,
            opacity 0.16s ease,
            transform 0.16s ease,
            padding-top 0.16s ease,
            margin-top 0.16s ease;
    }

    .public-menu.is-open {
        max-height: 780px;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        padding-top: 12px !important;
        margin-top: 2px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .app-menu.is-open {
        max-height: 920px;
    }

    .desktop-only {
        display: none !important;
    }

    .user-chip {
        width: 100%;
        justify-content: center;
    }

    .public-menu .balance-pill {
        width: 100%;
        justify-content: center;
        min-height: 46px;
        border-radius: 14px;
    }

    .public-nav {
        will-change: auto;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .btn:hover,
    .catalog-grid div:hover {
        transform: none;
    }
}

@media (max-width: 420px) {
    .app-nav {
        width: calc(100% - 20px);
        margin-top: 10px;
    }

    .app-shell .main {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.app-menu a:not(.btn) {
    border: 1px solid transparent;
}
