:root {
    color-scheme: dark;
    --bg: #08111d;
    --bg-soft: rgba(10, 18, 34, 0.72);
    --panel: rgba(9, 15, 28, 0.84);
    --panel-strong: rgba(15, 24, 45, 0.96);
    --line: rgba(134, 161, 202, 0.18);
    --text: #edf3ff;
    --muted: #aebbd6;
    --accent: #79e0c1;
    --accent-2: #f7b267;
    --accent-3: #8aa7ff;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(121, 224, 193, 0.18), transparent 32%),
        radial-gradient(circle at top right, rgba(138, 167, 255, 0.16), transparent 26%),
        linear-gradient(180deg, #08111d 0%, #0d1727 48%, #08111d 100%);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(121, 224, 193, 0.08), transparent 26%),
        radial-gradient(circle at 80% 18%, rgba(247, 178, 103, 0.10), transparent 24%),
        linear-gradient(180deg, rgba(9, 16, 29, 0.98), rgba(5, 10, 20, 1));
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at center, black 44%, transparent 100%);
    opacity: 0.45;
}

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

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.skip-link:focus-visible {
    outline: 3px solid rgba(121, 224, 193, 0.92);
    outline-offset: 4px;
    box-shadow: 0 0 0 6px rgba(8, 17, 29, 0.84);
}

.skip-link {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 20;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid rgba(121, 224, 193, 0.26);
    background: rgba(6, 12, 22, 0.98);
    color: var(--text);
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    transform: translateY(-180%);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

.shell {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 40px 0 56px;
    position: relative;
    z-index: 1;
}

.hero,
.section-grid,
.roadmap {
    animation: rise 700ms cubic-bezier(.2, .9, .2, 1) both;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.95fr);
    gap: 24px;
    align-items: stretch;
    margin-top: 18px;
}

.hero-copy,
.hero-panel,
.panel {
    background: linear-gradient(180deg, rgba(20, 31, 52, 0.84), rgba(8, 15, 27, 0.92));
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-copy {
    padding: 44px;
    position: relative;
    overflow: hidden;
}

.hero-copy::after {
    content: "";
    position: absolute;
    inset: auto -10% -30% auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(121, 224, 193, 0.26), transparent 65%);
    filter: blur(6px);
    animation: drift 8s ease-in-out infinite alternate;
}

.eyebrow,
.panel-kicker,
.status-label {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--accent);
}

h1,
h2,
.status-value,
.panel-pill {
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
}

h1 {
    margin: 0;
    font-size: clamp(3rem, 7vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    max-width: 11ch;
}

.lede {
    margin: 20px 0 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #3fd0b6);
    color: #051118;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
    color: var(--text);
}

.btn-compact {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.84rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.tag {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
    font-size: 0.84rem;
}

.comfort-banner {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(121, 224, 193, 0.22);
    background: linear-gradient(135deg, rgba(121, 224, 193, 0.10), rgba(138, 167, 255, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.comfort-banner-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    color: var(--accent);
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
}

.comfort-banner p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.58;
}

.hero-panel {
    padding: 24px;
}

.panel-header,
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.panel-kicker {
    margin-bottom: 0;
    color: var(--accent-2);
}

.panel-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #07111b;
    background: linear-gradient(135deg, #f7d19a, #f7b267);
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

.status-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-value {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.status-note {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.45;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

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

.public-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 220px;
}

.public-card .public-body {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.public-card .button-row {
    margin-top: auto;
}

.panel {
    padding: 26px;
}

.panel-alt {
    background: linear-gradient(180deg, rgba(18, 26, 45, 0.95), rgba(8, 13, 22, 0.94));
}

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

.panel h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
    max-width: 22ch;
}

.checklist,
.roadmap-list {
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.checklist li,
.roadmap-list li,
.mini-item {
    position: relative;
    padding: 16px 16px 16px 44px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    line-height: 1.5;
}

.checklist li::before,
.roadmap-list li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 0 0 5px rgba(121, 224, 193, 0.10);
}

.mini-stack {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.mini-item {
    padding-left: 20px;
}

.mini-item span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.mini-item strong {
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.roadmap {
    margin-top: 24px;
}

.roadmap .panel-head {
    margin-bottom: 6px;
}

.roadmap-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.roadmap-list li {
    min-height: 132px;
    display: flex;
    align-items: flex-end;
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
    font-weight: 700;
}

.footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 4px 0;
    color: var(--muted);
    font-family: "Avenir Next", "Avenir", "Trebuchet MS", sans-serif;
    font-size: 0.92rem;
}

.footer p {
    margin: 0;
}

.public-footer {
    align-items: flex-start;
    margin-top: 18px;
    padding-bottom: 8px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.82rem;
}

.footer-links a {
    color: var(--text);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    padding-bottom: 2px;
}

.footer-links a:hover {
    color: var(--accent);
    border-bottom-color: rgba(121, 224, 193, 0.5);
}

.orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(8px);
    opacity: 0.85;
}

.orb-a {
    top: 7%;
    right: -2%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(121, 224, 193, 0.22), transparent 70%);
    animation: drift 12s ease-in-out infinite alternate;
}

.orb-b {
    left: -4%;
    bottom: 6%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(138, 167, 255, 0.16), transparent 72%);
    animation: drift 14s ease-in-out infinite alternate-reverse;
}

.grid-overlay {
    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: 120px 120px;
    mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
    opacity: 0.3;
}

@keyframes drift {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        transform: translate3d(0, -18px, 0) scale(1.08);
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .hero,
    .section-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .shell {
        width: min(var(--max), calc(100% - 20px));
        padding-top: 20px;
    }

    .hero-copy,
    .hero-panel,
    .panel {
        padding: 20px;
    }

    h1 {
        font-size: clamp(2.4rem, 14vw, 4rem);
    }

    .status-grid,
    .section-grid,
    .roadmap-list {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
        scroll-behavior: auto !important;
    }

    .hero-copy::after,
    .orb-a,
    .orb-b {
        animation: none !important;
    }

    .btn:hover {
        transform: none;
    }
}

/* ============================================================
   Backoffice MVP
   ============================================================ */

body.admin-layout,
body.auth-layout {
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    color: #e5eefc;
    background:
        radial-gradient(circle at top left, rgba(84, 134, 255, 0.20), transparent 26%),
        radial-gradient(circle at top right, rgba(59, 198, 189, 0.18), transparent 28%),
        linear-gradient(180deg, #07111d 0%, #091423 50%, #050b13 100%);
}

body.admin-layout,
body.auth-layout {
    min-height: 100vh;
}

body.admin-layout::before,
body.auth-layout::before {
    opacity: 0.22;
    mask-image: none;
}

.admin-layout .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background: rgba(5, 10, 18, 0.88);
    border-bottom: 1px solid rgba(124, 150, 188, 0.16);
    backdrop-filter: blur(14px);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8aa7ff, #3bc6bd);
    color: #03101b;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text strong {
    font-size: 0.98rem;
    line-height: 1.1;
}

.brand-text small,
.muted {
    color: #91a7c5;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.topnav a,
.topbar-link,
.topnav-menu > summary {
    color: #c8d7f3;
    text-decoration: none;
    font-size: 0.88rem;
}

.topnav a,
.topnav-menu > summary {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(124, 150, 188, 0.10);
    background: rgba(10, 18, 32, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
    transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.topnav a.is-active,
.topnav-menu.is-active > summary,
.topnav-menu[open] > summary {
    background: rgba(19, 35, 58, 0.92);
    border-color: rgba(59, 198, 189, 0.34);
    color: #f0f5ff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 0 0 1px rgba(138, 167, 255, 0.08);
}

.topnav-menu {
    position: relative;
    z-index: 25;
}

.topnav-menu > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.topnav-menu > summary:focus-visible,
.topnav a:focus-visible,
.topbar-link:focus-visible {
    outline: 2px solid rgba(59, 198, 189, 0.72);
    outline-offset: 3px;
}

.topnav-menu > summary::-webkit-details-marker {
    display: none;
}

.topnav-menu > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.72;
    transition: transform 0.14s ease, opacity 0.14s ease;
}

.topnav-menu[open] > summary::after {
    transform: rotate(225deg) translateY(-1px);
    opacity: 1;
}

.topnav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 20;
    display: grid;
    gap: 3px;
    min-width: 210px;
    padding: 7px;
    transform: translateX(-50%);
    border: 1px solid rgba(124, 150, 188, 0.20);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(13, 23, 39, 0.98), rgba(7, 13, 24, 0.98));
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.topnav-dropdown::before {
    content: "";
    position: absolute;
    top: -6px;
    left: calc(50% - 6px);
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
    border-left: 1px solid rgba(124, 150, 188, 0.20);
    border-top: 1px solid rgba(124, 150, 188, 0.20);
    background: rgba(13, 23, 39, 0.98);
}

.topnav-dropdown a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 10px 8px 13px;
    border-radius: 6px;
    border: 1px solid transparent;
    white-space: nowrap;
    background: transparent;
    color: #d7e4f8;
    font-size: 0.84rem;
}

.topnav-dropdown a:hover,
.topnav-dropdown a:focus-visible,
.topnav-dropdown a.is-active,
.topnav-menu > summary:hover,
.topnav a:hover {
    background: rgba(138, 167, 255, 0.10);
    border-color: rgba(138, 167, 255, 0.18);
    color: #f0f5ff;
}

.topnav-dropdown a.is-active::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: #3bc6bd;
}

.topbar-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid rgba(138, 167, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
}

.theme-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: #c8d7f3;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.theme-switch a:hover,
.theme-switch a:focus-visible,
.theme-switch a.is-active {
    background: rgba(138, 167, 255, 0.16);
    color: #f0f5ff;
}

.env-chip,
.version-chip,
.user-chip,
.chip,
.chip-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid rgba(138, 167, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #d5e1f6;
}

.user-chip {
    background: rgba(59, 198, 189, 0.12);
    border-color: rgba(59, 198, 189, 0.22);
}

.version-chip {
    background: rgba(247, 178, 103, 0.12);
    border-color: rgba(247, 178, 103, 0.22);
}

.topbar-link {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-form {
    display: inline-flex;
    margin: 0;
}

.topbar-button {
    appearance: none;
    cursor: pointer;
}

.admin-layout .app-shell,
.admin-layout .auth-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.auth-layout .auth-shell {
    min-height: calc(100vh - 32px);
    display: grid;
    place-items: center;
    width: min(560px, calc(100% - 32px));
    margin: 0 auto;
}

.public-status-layout .auth-shell,
.public-guide-layout .auth-shell {
    display: block;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.public-status-layout .page-intro,
.public-guide-layout .page-intro {
    align-items: flex-start;
}

.flash {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(138, 167, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.flash-success {
    border-color: rgba(72, 210, 147, 0.24);
    background: rgba(72, 210, 147, 0.10);
}

.flash-error,
.inline-alert-error {
    border-color: rgba(255, 114, 114, 0.26);
    background: rgba(255, 114, 114, 0.12);
}

.page-intro,
.card-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.page-intro {
    margin-bottom: 22px;
}

.page-intro h1,
.auth-card h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.page-actions,
.button-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.prompts-test-submit-actions {
    justify-content: center;
    margin-top: 12px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card,
.card,
.auth-card {
    background: rgba(8, 15, 27, 0.82);
    border: 1px solid rgba(138, 167, 255, 0.14);
    border-radius: 22px;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.30);
}

.metric-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.metric-card span {
    color: #94a8c8;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.10em;
}

.metric-card strong {
    font-size: 1.9rem;
    letter-spacing: -0.04em;
}

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

.dashboard-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.prompts-test-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    min-width: 0;
    margin-bottom: 16px;
}

.prompts-test-stack > .card {
    min-width: 0;
}

.prompt-engine-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 12px;
    align-items: start;
}

.prompt-engine-option {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
    min-height: 82px;
    padding: 14px 16px;
    color: #dce7fa;
    background: rgba(4, 10, 22, 0.46);
    border: 1px solid rgba(138, 167, 255, 0.18);
    border-radius: 12px;
    cursor: pointer;
}

.prompt-engine-option:hover {
    background: rgba(59, 198, 189, 0.06);
    border-color: rgba(59, 198, 189, 0.42);
}

.prompt-engine-option input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--accent);
}

.admin-layout .prompt-engine-option input {
    width: 18px;
    min-width: 18px;
    max-width: 18px;
    padding: 0;
    border: 0;
    background: transparent;
}

.prompt-engine-option.is-selected {
    border-color: rgba(59, 198, 189, 0.58);
    box-shadow: 0 0 0 1px rgba(59, 198, 189, 0.22);
}

.prompt-engine-option.is-disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.prompt-engine-option.is-disabled:hover {
    background: rgba(4, 10, 22, 0.46);
    border-color: rgba(138, 167, 255, 0.18);
}

.prompt-engine-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 16rem;
    min-width: 0;
    max-width: 100%;
}

.prompt-engine-name {
    font-size: 0.95rem;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.prompt-engine-detail {
    color: #94a8c8;
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.prompt-engine-status {
    margin-left: auto;
    flex: 0 0 auto;
    align-self: flex-start;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 26px;
    padding: 4px 10px;
    color: #c8d7f3;
    background: rgba(138, 167, 255, 0.12);
    border: 1px solid rgba(138, 167, 255, 0.20);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.card,
.auth-card {
    padding: 18px;
}

.card-head {
    align-items: center;
    margin-bottom: 14px;
}

.card-head h2 {
    margin: 0;
    font-size: 1.14rem;
}

.table-wrap {
    overflow: auto;
    border-radius: 16px;
}

.data-table,
.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table th,
.data-table td,
.detail-table th,
.detail-table td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(138, 167, 255, 0.10);
    vertical-align: top;
    text-align: left;
}

.data-table th,
.detail-table th {
    color: #9bb0cf;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.02);
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tr.job-row-attention td {
    background: rgba(255, 114, 114, 0.05);
}

.data-table tr.job-row-success td {
    background: rgba(72, 210, 147, 0.04);
}

.detail-table th {
    width: 220px;
    white-space: nowrap;
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field > span {
    color: #9bb0cf;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
}

.auth-layout .stack-form {
    gap: 16px;
}

.auth-layout .field {
    gap: 10px;
}

.auth-layout .field > span {
    color: #b8c6df;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.auth-layout input,
.auth-layout select,
.auth-layout textarea {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(138, 167, 255, 0.20);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        rgba(4, 10, 22, 0.82);
    color: #edf3ff;
    border-radius: 14px;
    padding: 13px 14px;
    min-height: 50px;
    font: inherit;
    font-size: 0.98rem;
    line-height: 1.35;
    outline: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 10px 24px rgba(0, 0, 0, 0.20);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.auth-layout input:hover,
.auth-layout select:hover,
.auth-layout textarea:hover {
    border-color: rgba(138, 167, 255, 0.34);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.04)),
        rgba(6, 12, 24, 0.88);
}

.auth-layout input:focus,
.auth-layout select:focus,
.auth-layout textarea:focus {
    border-color: rgba(121, 224, 193, 0.52);
    box-shadow:
        0 0 0 3px rgba(121, 224, 193, 0.12),
        0 16px 30px rgba(0, 0, 0, 0.24);
    transform: translateY(-1px);
}

.auth-layout input::placeholder,
.auth-layout textarea::placeholder {
    color: rgba(174, 187, 214, 0.70);
}

.auth-layout input:-webkit-autofill,
.auth-layout input:-webkit-autofill:hover,
.auth-layout input:-webkit-autofill:focus {
    -webkit-text-fill-color: #edf3ff;
    box-shadow:
        0 0 0 1000px rgba(4, 10, 22, 0.92) inset,
        0 0 0 1px rgba(138, 167, 255, 0.20) inset,
        0 10px 24px rgba(0, 0, 0, 0.20);
    transition: background-color 9999s ease-out 0s;
}

.admin-layout input,
.admin-layout select,
.admin-layout textarea {
    width: 100%;
    border: 1px solid rgba(138, 167, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: #edf4ff;
    border-radius: 14px;
    padding: 11px 12px;
    font: inherit;
    outline: none;
}

.admin-layout textarea {
    resize: vertical;
    min-height: 120px;
}

.admin-layout input:focus,
.admin-layout select:focus,
.admin-layout textarea:focus {
    border-color: rgba(121, 224, 193, 0.45);
    box-shadow: 0 0 0 3px rgba(121, 224, 193, 0.12);
}

.admin-layout .btn,
.auth-layout .btn {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 16px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.admin-layout .btn:hover,
.auth-layout .btn:hover {
    transform: translateY(-1px);
}

.admin-layout .btn-primary,
.auth-layout .btn-primary {
    background: linear-gradient(135deg, #8aa7ff, #3bc6bd);
    color: #03101b;
}

.admin-layout .btn-secondary,
.auth-layout .btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(138, 167, 255, 0.18);
    color: #edf4ff;
}

.auth-card {
    width: 100%;
    max-width: 560px;
}

/* ============================================================
   Theme AblePro
   ============================================================ */

body.theme-ablepro.admin-layout,
body.theme-ablepro.auth-layout {
    color-scheme: light;
    color: #263044;
    background:
        linear-gradient(180deg, #f6f8fc 0%, #eef3f9 100%);
}

body.theme-ablepro.admin-layout::before,
body.theme-ablepro.auth-layout::before {
    opacity: 0;
}

body.theme-ablepro .topbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e5ebf5;
    box-shadow: 0 8px 24px rgba(35, 49, 85, 0.08);
}

body.theme-ablepro .brand-mark {
    border-radius: 8px;
    background: #4680ff;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(70, 128, 255, 0.22);
}

body.theme-ablepro .brand-text strong,
body.theme-ablepro .page-intro h1,
body.theme-ablepro .auth-card h1,
body.theme-ablepro .card-head h2,
body.theme-ablepro .metric-card strong,
body.theme-ablepro .data-table td strong {
    color: #1d2636;
}

body.theme-ablepro .brand-text small,
body.theme-ablepro .muted,
body.theme-ablepro .lede,
body.theme-ablepro .metric-card span,
body.theme-ablepro .field > span {
    color: #6b7890;
}

body.theme-ablepro .eyebrow,
body.theme-ablepro .panel-kicker {
    color: #4680ff;
}

body.theme-ablepro .topnav a,
body.theme-ablepro .topbar-link,
body.theme-ablepro .topnav-menu > summary {
    color: #56657b;
}

body.theme-ablepro .topnav a,
body.theme-ablepro .topnav-menu > summary {
    border-color: #e5ebf5;
    background: #f8fafd;
    box-shadow: none;
}

body.theme-ablepro .topnav a.is-active,
body.theme-ablepro .topnav-menu.is-active > summary,
body.theme-ablepro .topnav-menu[open] > summary,
body.theme-ablepro .topnav-dropdown a:hover,
body.theme-ablepro .topnav-dropdown a:focus-visible,
body.theme-ablepro .topnav-dropdown a.is-active,
body.theme-ablepro .topnav-menu > summary:hover,
body.theme-ablepro .topnav a:hover {
    background: #eef4ff;
    border-color: rgba(70, 128, 255, 0.24);
    color: #245edb;
}

body.theme-ablepro .topnav-dropdown {
    border-color: #e5ebf5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(35, 49, 85, 0.12);
}

body.theme-ablepro .topnav-dropdown::before {
    border-color: #e5ebf5;
    background: #ffffff;
}

body.theme-ablepro .topnav-dropdown a {
    color: #526079;
}

body.theme-ablepro .topnav-dropdown a.is-active::before {
    background: #4680ff;
}

body.theme-ablepro .theme-switch {
    border-color: #dce4f1;
    background: #eef3f9;
}

body.theme-ablepro .theme-switch a {
    color: #697792;
}

body.theme-ablepro .theme-switch a:hover,
body.theme-ablepro .theme-switch a:focus-visible,
body.theme-ablepro .theme-switch a.is-active {
    background: #ffffff;
    color: #245edb;
    box-shadow: 0 6px 16px rgba(35, 49, 85, 0.10);
}

body.theme-ablepro .env-chip,
body.theme-ablepro .version-chip,
body.theme-ablepro .user-chip,
body.theme-ablepro .chip,
body.theme-ablepro .chip-soft {
    border-color: #dfe7f3;
    background: #f8fafd;
    color: #526079;
}

body.theme-ablepro .user-chip {
    border-color: rgba(22, 163, 74, 0.20);
    background: #ecfdf3;
    color: #16703a;
}

body.theme-ablepro .version-chip {
    border-color: rgba(245, 158, 11, 0.22);
    background: #fff7e6;
    color: #9a5b00;
}

body.theme-ablepro .topbar-link {
    border-color: #dfe7f3;
    background: #ffffff;
}

body.theme-ablepro .metric-card,
body.theme-ablepro .card,
body.theme-ablepro .auth-card {
    border-color: #e2e8f2;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(35, 49, 85, 0.08);
}

body.theme-ablepro .table-wrap,
body.theme-ablepro .flash,
body.theme-ablepro .empty-state,
body.theme-ablepro .inline-alert,
body.theme-ablepro .code-block {
    border-radius: 8px;
}

body.theme-ablepro .data-table th,
body.theme-ablepro .detail-table th {
    background: #f6f8fc;
    color: #6c7890;
}

body.theme-ablepro .data-table th,
body.theme-ablepro .data-table td,
body.theme-ablepro .detail-table th,
body.theme-ablepro .detail-table td {
    border-bottom-color: #edf1f7;
}

body.theme-ablepro .data-table tr:hover td {
    background: #f7faff;
}

body.theme-ablepro .data-table tr.job-row-attention td {
    background: #fff5f5;
}

body.theme-ablepro .data-table tr.job-row-success td {
    background: #f0fdf5;
}

body.theme-ablepro.admin-layout input,
body.theme-ablepro.admin-layout select,
body.theme-ablepro.admin-layout textarea {
    border-color: #d8e1ee;
    border-radius: 8px;
    background: #ffffff;
    color: #263044;
}

body.theme-ablepro.admin-layout input:focus,
body.theme-ablepro.admin-layout select:focus,
body.theme-ablepro.admin-layout textarea:focus {
    border-color: rgba(70, 128, 255, 0.58);
    box-shadow: 0 0 0 3px rgba(70, 128, 255, 0.13);
}

body.theme-ablepro.admin-layout .btn,
body.theme-ablepro.auth-layout .btn {
    border-radius: 8px;
}

body.theme-ablepro.admin-layout .btn-primary,
body.theme-ablepro.auth-layout .btn-primary {
    background: #4680ff;
    color: #ffffff;
}

body.theme-ablepro.admin-layout .btn-secondary,
body.theme-ablepro.auth-layout .btn-secondary {
    border-color: #d8e1ee;
    background: #ffffff;
    color: #45546b;
}

body.theme-ablepro .flash,
body.theme-ablepro .inline-alert {
    border-color: #dfe7f3;
    background: #ffffff;
}

body.theme-ablepro .flash-success {
    border-color: rgba(22, 163, 74, 0.18);
    background: #ecfdf3;
    color: #166534;
}

body.theme-ablepro .flash-error,
body.theme-ablepro .inline-alert-error {
    border-color: rgba(220, 38, 38, 0.18);
    background: #fff1f2;
    color: #991b1b;
}

body.theme-ablepro .empty-state {
    border-color: #d8e1ee;
    background: #f8fafd;
    color: #637089;
}

body.theme-ablepro .code-block {
    border-color: #e2e8f2;
    background: #f7f9fd;
    color: #28364d;
}

body.theme-ablepro .status {
    background: #eef3f9;
    color: #56657b;
}

body.theme-ablepro .status-PENDING,
body.theme-ablepro .status-warning {
    background: #fff7e6;
    color: #a15c00;
}

body.theme-ablepro .status-RUNNING,
body.theme-ablepro .status-debug {
    background: #eef4ff;
    color: #245edb;
}

body.theme-ablepro .status-SUCCESS,
body.theme-ablepro .status-info {
    background: #ecfdf3;
    color: #16703a;
}

body.theme-ablepro .status-FAILED,
body.theme-ablepro .status-TIMEOUT,
body.theme-ablepro .status-UNKNOWN_ERROR,
body.theme-ablepro .status-RESPONSE_EMPTY,
body.theme-ablepro .status-RESPONSE_PARTIAL,
body.theme-ablepro .status-LOGIN_REQUIRED,
body.theme-ablepro .status-MANUAL_ACTION_REQUIRED,
body.theme-ablepro .status-CAPTCHA_DETECTED,
body.theme-ablepro .status-QUOTA_REACHED,
body.theme-ablepro .status-SERVICE_UNAVAILABLE,
body.theme-ablepro .status-CONNECTOR_BROKEN,
body.theme-ablepro .status-CANCELLED,
body.theme-ablepro .status-error,
body.theme-ablepro .status-critical {
    background: #fff1f2;
    color: #b42318;
}

.inline-alert {
    margin: 14px 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(138, 167, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.empty-state {
    margin: 12px 0 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px dashed rgba(138, 167, 255, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: #c8d4ec;
    line-height: 1.6;
}

.code-block {
    margin: 0;
    padding: 14px;
    border-radius: 14px;
    background: rgba(2, 7, 15, 0.94);
    color: #dce7fa;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    border: 1px solid rgba(138, 167, 255, 0.10);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.55;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.06);
    color: #e3ecfd;
}

.status-PENDING {
    background: rgba(247, 178, 103, 0.18);
    color: #ffdcae;
}

.status-RUNNING {
    background: rgba(120, 175, 255, 0.18);
    color: #cfe3ff;
}

.status-SUCCESS {
    background: rgba(72, 210, 147, 0.16);
    color: #bff5d9;
}

.status-FAILED,
.status-TIMEOUT,
.status-UNKNOWN_ERROR,
.status-RESPONSE_EMPTY,
.status-RESPONSE_PARTIAL,
.status-LOGIN_REQUIRED,
.status-MANUAL_ACTION_REQUIRED,
.status-CAPTCHA_DETECTED,
.status-QUOTA_REACHED,
.status-SERVICE_UNAVAILABLE,
.status-CONNECTOR_BROKEN,
.status-CANCELLED {
    background: rgba(255, 114, 114, 0.16);
    color: #ffc1c1;
}

.status-debug {
    background: rgba(138, 167, 255, 0.12);
    color: #cfe0ff;
}

.status-info {
    background: rgba(59, 198, 189, 0.12);
    color: #c3f7f2;
}

.status-warning {
    background: rgba(247, 178, 103, 0.16);
    color: #ffe0ba;
}

.status-error,
.status-critical {
    background: rgba(255, 114, 114, 0.18);
    color: #ffc1c1;
}

.muted {
    display: inline-block;
    font-size: 0.86rem;
}

.chip-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip-soft {
    min-height: 26px;
    padding: 0 10px;
    color: #dce7fa;
}

.service-favorite-chip {
    margin-left: 8px;
    min-height: 22px;
    padding: 0 8px;
    color: #93f7b2;
    background: rgba(69, 211, 127, 0.13);
    border-color: rgba(69, 211, 127, 0.25);
}

.connector-cell {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.connector-cell-body {
    min-width: 0;
}

.connector-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    object-fit: contain;
    padding: 4px;
    border: 1px solid rgba(138, 167, 255, 0.18);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.prompts-test-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.prompts-test-group-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.prompts-test-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.prompts-test-row:hover {
    background: rgba(72, 102, 176, 0.08);
}

.prompts-test-row.is-selected {
    background: rgba(72, 102, 176, 0.14);
}

.prompts-test-row.is-selected:hover {
    background: rgba(72, 102, 176, 0.18);
}

.prompts-test-table td:first-child,
.prompts-test-table th:first-child,
.prompts-test-services-table td:first-child,
.prompts-test-services-table th:first-child {
    width: 52px;
    text-align: center;
}

.prompts-test-table td:first-child,
.prompts-test-services-table td:first-child {
    vertical-align: middle;
}

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

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

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

    .admin-layout .topbar {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .topnav {
        justify-content: flex-start;
    }

    .topnav-dropdown {
        left: 0;
        transform: none;
    }

    .topnav-dropdown::before {
        left: 18px;
    }

    .topbar-meta {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .card-grid,
    .field-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-layout .app-shell,
    .admin-layout .auth-shell {
        width: calc(100% - 20px);
        padding-top: 18px;
    }

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

    .page-actions {
        width: 100%;
    }
}

/* ============================================================
   Harvest Cookie Page
   ============================================================ */

.harvest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 18px;
}

.harvest-card {
    padding: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.harvest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.harvest-card--noauth {
    opacity: 0.7;
}

.harvest-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(138, 167, 255, 0.10);
    background: rgba(255, 255, 255, 0.02);
}

.harvest-card-info h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
}

.harvest-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.harvest-url {
    display: inline-block;
    color: var(--accent-3);
    font-size: 0.82rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.harvest-url:hover {
    opacity: 1;
}

.harvest-accounts {
    padding: 12px 20px 16px;
    display: grid;
    gap: 8px;
}

.harvest-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(138, 167, 255, 0.08);
    transition: border-color 0.2s, background 0.2s;
}

.harvest-account-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.harvest-account-row.is-valid {
    border-left: 3px solid rgba(72, 210, 147, 0.5);
}

.harvest-account-row.is-expired {
    border-left: 3px solid rgba(247, 178, 103, 0.5);
}

.harvest-account-row.is-missing {
    border-left: 3px solid rgba(255, 114, 114, 0.4);
}

.harvest-account-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.harvest-account-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.harvest-account-label strong {
    font-size: 0.95rem;
}

.harvest-email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.84rem;
}

.harvest-email svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.harvest-date {
    color: var(--muted);
    font-size: 0.78rem;
}

.harvest-account-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.project-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-path-cell {
    min-width: 260px;
    max-width: 420px;
}

.project-path-cell code,
.project-output-path {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.78rem;
    word-break: break-word;
}

.project-output-path {
    margin-top: 8px;
    padding: 9px 10px;
    max-width: 460px;
}

.projects-page-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    justify-content: stretch;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.projects-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.projects-page-copy {
    flex: 1 1 0%;
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.projects-page-copy h2 {
    margin: 0;
}

.projects-tabbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: min(100%, 64rem);
    margin: 0 auto;
}

.projects-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.8rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(138, 167, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-weight: 900;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.projects-tab:hover {
    background: rgba(121, 224, 193, 0.08);
    border-color: rgba(121, 224, 193, 0.26);
    transform: translateY(-1px);
}

.projects-tab.is-active {
    color: #06111f;
    background: linear-gradient(135deg, var(--accent), #d8fff3);
    border-color: transparent;
    transform: translateY(-1px);
}

.projects-create-panel,
.projects-create-form,
.projects-folder-management,
.projects-folder-exclusions-form,
.projects-folder-exclusion-folder {
    display: grid;
    gap: 1rem;
}

.projects-folder-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(138, 167, 255, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.projects-folder-preview-item {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.projects-folder-preview-item strong {
    color: #9bb0cf;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.projects-folder-preview-item span,
.projects-folder-preview-item code {
    font-weight: 900;
    overflow-wrap: anywhere;
}

.projects-folder-management {
    padding-top: 1rem;
    border-top: 1px solid rgba(138, 167, 255, 0.10);
}

.projects-folder-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.projects-folder-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.2rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(138, 167, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: #9bb0cf;
    font-weight: 800;
}

.projects-folder-stat strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.projects-folder-exclusions-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.projects-folder-exclusions-heading h3,
.projects-folder-exclusions-note {
    margin: 0;
}

.projects-folder-exclusions-table-wrap {
    max-height: 32rem;
}

.projects-folder-exclusions-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.projects-folder-exclusions-table th,
.projects-folder-exclusions-table td {
    padding: 0.8rem 0.75rem;
    border-bottom: 1px solid rgba(138, 167, 255, 0.10);
    vertical-align: middle;
    text-align: left;
}

.projects-folder-exclusions-table th {
    color: #9bb0cf;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.02);
}

.projects-folder-exclusion-folder {
    gap: 0.25rem;
    min-width: 0;
}

.projects-folder-exclusion-folder strong,
.projects-folder-exclusion-folder span,
.projects-folder-exclusion-project-cell,
.projects-folder-exclusion-path-cell code {
    overflow-wrap: anywhere;
}

.projects-folder-exclusion-project-cell,
.projects-folder-exclusion-state-cell {
    white-space: nowrap;
}

.projects-folder-exclusion-check-cell {
    width: 1%;
    white-space: nowrap;
}

.projects-folder-exclusion-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    min-height: 1.25rem;
}

.projects-folder-exclusion-check input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--accent);
}

.projects-table {
    min-width: 1180px;
}

.projects-table td {
    vertical-align: middle;
}

.projects-project-cell {
    min-width: 15rem;
}

.project-card-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-card-color {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--project-accent) 16%, transparent);
    color: #eaf2ff;
    border: 1px solid color-mix(in srgb, var(--project-accent) 36%, transparent);
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.project-card-swatch {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    background: var(--project-accent);
}

.project-table-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.projects-local-path-cell,
.projects-task-total-cell,
.projects-task-status-cell,
.projects-last-run-cell,
.projects-domain-th {
    white-space: nowrap;
}

.projects-local-path {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.projects-status-abbr {
    display: inline-flex;
    min-width: 2.4rem;
    justify-content: center;
    text-decoration: none;
    border-bottom: 0;
}

.projects-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: inherit;
    text-decoration: none;
    font: inherit;
}

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

th[aria-sort="ascending"] .projects-sort-link::after {
    content: " ↑";
    font-size: 0.8em;
    font-weight: 900;
}

th[aria-sort="descending"] .projects-sort-link::after {
    content: " ↓";
    font-size: 0.8em;
    font-weight: 900;
}

th[aria-sort="ascending"] .projects-sort-link,
th[aria-sort="descending"] .projects-sort-link {
    font-weight: 900;
}

.projects-domain-cell {
    white-space: normal;
}

.projects-domain-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.projects-row-reserved {
    opacity: 0.72;
}

.projects-row-excluded {
    opacity: 0.72;
}

.projects-folder-state-excluded {
    opacity: 0.72;
}

.projects-folder-state-reserved,
.projects-folder-state-used {
    opacity: 0.72;
}

.btn-xs {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.78rem;
}

.btn-sm {
    min-height: 36px;
    padding: 0 14px;
    font-size: 0.84rem;
}

.btn-danger {
    background: rgba(255, 114, 114, 0.15);
    border-color: rgba(255, 114, 114, 0.25);
    color: #ffc1c1;
}

.btn-danger:hover {
    background: rgba(255, 114, 114, 0.25);
    border-color: rgba(255, 114, 114, 0.35);
}

@media (max-width: 1080px) {
    .harvest-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .projects-page-heading {
        display: grid;
    }

    .projects-tabbar {
        grid-template-columns: 1fr;
    }

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

    .harvest-account-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .harvest-card-head {
        flex-direction: column;
    }
}
