:root {
    --bg: #eef3ff;
    --bg-2: #f6f8ff;
    --panel: rgba(247, 250, 255, 0.74);
    --panel-strong: rgba(247, 250, 255, 0.92);
    --ink: #121a3f;
    --muted: #66729b;
    --line: rgba(29, 40, 91, 0.1);
    --accent: #22d6ff;
    --accent-2: #4aaeff;
    --accent-3: #6468e8;
    --success: #34c8ff;
    --danger: #bf4e68;
    --shadow: 0 24px 80px rgba(69, 82, 150, 0.14);
    --radius-xl: 32px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(34, 214, 255, 0.16), transparent 28%),
        radial-gradient(circle at top right, rgba(100, 104, 232, 0.16), transparent 24%),
        linear-gradient(180deg, #f9fbff 0%, #edf1ff 100%);
    min-height: 100vh;
}

.app-authenticated {
    overflow: hidden;
}

.page-shell {
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 32px;
}

button,
input,
select {
    font: inherit;
}

.ambient {
    position: absolute;
    border-radius: 999px;
    filter: blur(24px);
    pointer-events: none;
    opacity: 0.6;
}

.ambient-a {
    width: 340px;
    height: 340px;
    background: rgba(34, 214, 255, 0.24);
    top: 40px;
    right: -120px;
}

.ambient-b {
    width: 280px;
    height: 280px;
    background: rgba(100, 104, 232, 0.18);
    bottom: 120px;
    left: -80px;
}

.hero,
.workspace,
.auth-layout {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
    gap: 28px;
    align-items: stretch;
}

.auth-layout {
    display: grid;
}

.dashboard-shell {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    height: calc(100vh - 64px);
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    overflow: hidden;
}

.dashboard-main {
    display: grid;
    gap: 24px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    padding-right: 6px;
}

.auth-hero {
    min-height: calc(100vh - 64px);
    align-items: center;
}

.hero-copy,
.hero-panel,
.auth-card,
.control-card,
.info-card,
.results-card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-copy,
.hero-panel,
.auth-card {
    border-radius: var(--radius-xl);
    background: linear-gradient(145deg, rgba(251, 253, 255, 0.92), rgba(236, 242, 255, 0.8));
}

.hero-copy {
    padding: 44px;
}

.auth-copy {
    padding-right: 52px;
}

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

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 18px;
}

.brand-lockup-hero {
    margin-bottom: 0;
}

.brand-lockup-copy strong,
.brand-lockup-copy span {
    display: block;
}

.brand-lockup-copy strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.4rem;
    letter-spacing: -0.04em;
}

.brand-lockup-copy span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.98rem;
}

.brand-logo {
    display: block;
    flex: 0 0 auto;
}

.brand-logo-hero-wordmark {
    width: min(320px, 100%);
    height: auto;
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 210px;
    padding: 10px 24px;
    border-radius: 999px;
    border: 1px solid rgba(34, 214, 255, 0.24);
    background: rgba(255, 255, 255, 0.78);
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: linear-gradient(145deg, rgba(251, 253, 255, 0.94), rgba(236, 242, 255, 0.82));
    backdrop-filter: blur(18px);
}

.dashboard-header h1,
.sidebar-panel h3 {
    margin: 12px 0 0;
    font-family: "Space Grotesk", sans-serif;
}

.dashboard-header h1 {
    font-size: clamp(2rem, 3.8vw, 3.5rem);
    letter-spacing: -0.05em;
}

.dashboard-header p {
    margin: 14px 0 0;
    max-width: 48ch;
    color: var(--muted);
    line-height: 1.7;
}

.dashboard-header-copy {
    flex: 1 1 420px;
    min-width: 0;
}

.dashboard-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 28px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background:
        radial-gradient(circle at top right, rgba(34, 214, 255, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(236, 242, 255, 0.92));
}

.dashboard-brand-badge strong,
.dashboard-brand-badge span {
    display: block;
}

.brand-logo-dashboard {
    width: 244px;
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(100, 104, 232, 0.16));
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 700;
}

.hero h1,
.section-heading h2,
.info-card h3 {
    font-family: "Space Grotesk", sans-serif;
    margin: 0;
}

.hero h1 {
    margin-top: 18px;
    max-width: 11ch;
    font-size: clamp(2.7rem, 4.6vw, 5.1rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

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

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

.hero-pills span,
.status-chip,
.ghost-link {
    border-radius: 999px;
}

.hero-pills span {
    padding: 12px 16px;
    background: rgba(22, 33, 29, 0.05);
    border: 1px solid rgba(22, 33, 29, 0.08);
    font-size: 0.92rem;
    font-weight: 600;
}

.hero-panel {
    position: relative;
    padding: 28px;
    display: grid;
    gap: 16px;
    overflow: hidden;
}

.app-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    margin-bottom: 14px;
}

.sidebar {
    position: relative;
    align-self: start;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 18px;
    padding: 24px;
    height: calc(100vh - 64px);
    overflow: hidden;
    border-radius: var(--radius-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background:
        radial-gradient(circle at top left, rgba(100, 104, 232, 0.13), transparent 26%),
        radial-gradient(circle at bottom right, rgba(34, 214, 255, 0.11), transparent 32%),
        linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(232, 238, 255, 0.88));
    backdrop-filter: blur(18px);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(22, 33, 29, 0.08);
}

.sidebar-body {
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 18px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

.brand-logo-sidebar {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 14px 22px rgba(100, 104, 232, 0.18));
}

.sidebar-brand strong,
.sidebar-link strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
}

.sidebar-brand span,
.sidebar-link small,
.sidebar-panel p {
    color: var(--muted);
    line-height: 1.55;
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-link {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid rgba(22, 33, 29, 0.07);
    background: rgba(255, 255, 255, 0.42);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
    transform: translateY(-1px);
    border-color: rgba(34, 214, 255, 0.28);
    background: linear-gradient(135deg, rgba(34, 214, 255, 0.12), rgba(100, 104, 232, 0.1));
}

.sidebar-link-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: var(--accent);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(22, 33, 29, 0.08);
}

.sidebar-panel {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(236, 243, 255, 0.76)),
        radial-gradient(circle at top right, rgba(100, 104, 232, 0.1), transparent 42%);
}

.sidebar-panel h3 {
    font-size: 1.42rem;
    letter-spacing: -0.04em;
}

.sidebar-panel-session {
    display: grid;
    align-content: start;
    gap: 18px;
    background:
        radial-gradient(circle at top right, rgba(100, 104, 232, 0.14), transparent 32%),
        radial-gradient(circle at bottom left, rgba(34, 214, 255, 0.1), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(236, 242, 255, 0.78));
}

.sidebar-panel-copy {
    display: grid;
    gap: 8px;
}

.sidebar-panel-copy p {
    margin: 0;
}

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

.sidebar-metric {
    padding: 14px 12px;
    border-radius: 18px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.sidebar-metric strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.25rem;
    letter-spacing: -0.04em;
}

.sidebar-metric span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.88rem;
}

.sidebar-footnote {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(22, 33, 29, 0.04);
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.sidebar-footnote-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
    box-shadow: 0 0 0 6px rgba(34, 214, 255, 0.12);
}

.sidebar-logout {
    margin: 0;
    position: relative;
    z-index: 1;
}

.sidebar-button {
    width: 100%;
    padding: 16px 18px;
    background: rgba(22, 33, 29, 0.06);
}

.logout-form {
    margin: 0;
}

.ghost-button,
.ghost-link {
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    background: rgba(22, 33, 29, 0.05);
    border: 1px solid rgba(22, 33, 29, 0.08);
    font-weight: 600;
}

.ghost-button {
    cursor: pointer;
}

.auth-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.auth-note-card {
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.52);
}

.auth-note-card strong {
    display: block;
    margin-bottom: 8px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
}

.auth-note-card span,
.auth-copy-text {
    color: var(--muted);
    line-height: 1.65;
}

.auth-card {
    padding: 34px;
    max-width: 460px;
    width: 100%;
    justify-self: end;
    backdrop-filter: blur(20px);
}

.auth-card h2 {
    margin: 10px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    letter-spacing: -0.05em;
}

.auth-card .message {
    margin-bottom: 0;
}

.auth-form {
    margin-top: 24px;
}

.auth-stack {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.auth-form-verify {
    gap: 18px;
}

.otp-card {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.58);
}

.otp-copy strong,
.otp-copy span {
    display: block;
}

.otp-copy strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
}

.otp-copy span {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
}

.auth-button {
    width: 100%;
}

.auth-verify-button {
    width: 100%;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.panel-orbit {
    position: absolute;
    inset: auto -70px -70px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 1px solid rgba(34, 214, 255, 0.24);
    background:
        radial-gradient(circle at center, rgba(34, 214, 255, 0.2) 0, rgba(34, 214, 255, 0) 66%),
        radial-gradient(circle at center, transparent 48%, rgba(100, 104, 232, 0.24) 49%, transparent 50%);
    animation: orbit 16s linear infinite;
}

.dashboard-hero .hero-copy h1 {
    max-width: 12ch;
}

.hero-stat {
    position: relative;
    z-index: 1;
    padding: 18px 18px 20px;
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid rgba(22, 33, 29, 0.08);
}

.hero-stat strong,
.metric strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
}

.hero-stat strong {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.hero-stat span {
    color: var(--muted);
    line-height: 1.55;
}

.workspace {
    margin-top: 28px;
    display: grid;
    gap: 24px;
}

.control-card,
.results-card {
    padding: 32px;
    border-radius: var(--radius-xl);
    background: var(--panel-strong);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin-top: 10px;
    font-size: clamp(1.65rem, 2.7vw, 2.6rem);
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 36ch;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.message {
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message a {
    color: inherit;
}

.message.error {
    background: rgba(179, 71, 53, 0.1);
    color: var(--danger);
    border: 1px solid rgba(179, 71, 53, 0.18);
}

.message.success {
    background: rgba(52, 200, 255, 0.12);
    color: var(--success);
    border: 1px solid rgba(52, 200, 255, 0.22);
}

.toast-stack {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: grid;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: start;
    padding: 16px;
    border-radius: 24px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background:
        radial-gradient(circle at top right, rgba(34, 214, 255, 0.12), transparent 38%),
        linear-gradient(145deg, rgba(251, 253, 255, 0.96), rgba(236, 242, 255, 0.94));
    box-shadow: 0 24px 60px rgba(35, 36, 31, 0.16);
    backdrop-filter: blur(18px);
    overflow: hidden;
    pointer-events: auto;
    animation: toast-in 220ms ease forwards;
}

.toast.is-leaving {
    animation: toast-out 180ms ease forwards;
}

.toast::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-3);
}

.toast--success::after {
    background: linear-gradient(180deg, var(--accent), var(--accent-3));
}

.toast--error::after {
    background: linear-gradient(180deg, #d45b46, #8f2f23);
}

.toast__icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff8ef;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 16px 28px rgba(100, 104, 232, 0.2);
}

.toast--error .toast__icon {
    background: linear-gradient(135deg, #d45b46, #8f2f23);
    box-shadow: 0 16px 28px rgba(143, 47, 35, 0.18);
}

.toast__body {
    min-width: 0;
}

.toast__title {
    display: block;
    margin: 1px 0 4px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.toast__message {
    color: var(--muted);
    line-height: 1.55;
    word-break: break-word;
}

.toast__close {
    width: 32px;
    height: 32px;
    border: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(22, 33, 29, 0.06);
    color: var(--muted);
    cursor: pointer;
}

.toast__close:hover {
    background: rgba(22, 33, 29, 0.1);
    color: var(--ink);
}

.toast__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(34, 214, 255, 0.6), rgba(100, 104, 232, 0.6));
    animation: toast-progress linear forwards;
}

.toast--error .toast__progress {
    background: linear-gradient(90deg, rgba(212, 91, 70, 0.65), rgba(143, 47, 35, 0.65));
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate3d(0, -10px, 0) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        opacity: 0;
        transform: translate3d(0, -8px, 0) scale(0.98);
    }
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.run-form {
    display: grid;
    gap: 24px;
}

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

.mode-card {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(22, 33, 29, 0.08);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.mode-card span {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
}

.mode-card small {
    color: var(--muted);
    font-size: 0.95rem;
}

.mode-card:has(input:checked) {
    border-color: rgba(34, 214, 255, 0.35);
    background: linear-gradient(135deg, rgba(34, 214, 255, 0.12), rgba(100, 104, 232, 0.1));
    transform: translateY(-2px);
}

.mode-pane {
    display: none;
}

.mode-pane.is-active {
    display: block;
    animation: rise 220ms ease;
}

.upload-box {
    position: relative;
    border-radius: 24px;
    padding: 28px;
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1.5px dashed rgba(22, 33, 29, 0.18);
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.88), rgba(236, 243, 255, 0.82)),
        repeating-linear-gradient(45deg, rgba(34, 214, 255, 0.03), rgba(34, 214, 255, 0.03) 10px, transparent 10px, transparent 20px);
    overflow: hidden;
}

.upload-box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-copy strong {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.upload-copy span {
    color: var(--muted);
}

.upload-box.has-file {
    border-color: rgba(34, 214, 255, 0.35);
}

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

.field {
    display: grid;
    gap: 10px;
}

.field-label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.field input {
    width: 100%;
    border: 1px solid rgba(22, 33, 29, 0.12);
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    font: inherit;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input:focus,
.field select:focus {
    outline: none;
    border-color: rgba(100, 104, 232, 0.38);
    box-shadow: 0 0 0 4px rgba(100, 104, 232, 0.12);
    transform: translateY(-1px);
}

.select-shell {
    position: relative;
}

.select-shell[data-select-shell]::before {
    content: attr(data-selected-label);
    position: absolute;
    top: 50%;
    left: 18px;
    right: 52px;
    transform: translateY(-50%);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 1;
}

.select-shell::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 20px;
    width: 11px;
    height: 11px;
    border-right: 2px solid rgba(22, 33, 29, 0.48);
    border-bottom: 2px solid rgba(22, 33, 29, 0.48);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
    transition: transform 180ms ease, border-color 180ms ease;
}

.field select {
    width: 100%;
    min-height: 180px;
    border: 1px solid rgba(22, 33, 29, 0.12);
    border-radius: 24px;
    padding: 24px 56px 24px 20px;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(236, 243, 255, 0.84)),
        radial-gradient(circle at top right, rgba(100, 104, 232, 0.1), transparent 38%);
    color: var(--ink);
    font: inherit;
    font-size: 1.02rem;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.select-shell-compact::after {
    top: 26px;
}

.select-compact {
    width: 100%;
    min-height: 56px;
    height: 56px;
    padding: 0 52px 0 18px;
    border: 1px solid rgba(22, 33, 29, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    -webkit-text-fill-color: var(--ink);
    cursor: pointer;
    box-shadow: none;
    text-overflow: ellipsis;
}

.select-shell[data-select-shell] .select-compact {
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.select-compact:hover {
    border-color: rgba(34, 214, 255, 0.28);
}

.field select:hover {
    border-color: rgba(34, 214, 255, 0.28);
}

.select-shell:has(select:focus)::after {
    border-color: rgba(100, 104, 232, 0.6);
    transform: translateY(-55%) rotate(45deg);
}

.helper,
.run-note {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.run-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.run-button {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    min-width: 220px;
    padding: 18px 22px;
    border: 0;
    border-radius: 20px;
    color: #fff;
    font: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
    box-shadow: 0 18px 36px rgba(100, 104, 232, 0.24);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.run-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(100, 104, 232, 0.28);
}

.button-text {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}

.button-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
}

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

.info-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 253, 250, 0.8);
}

.info-card h3 {
    margin-top: 12px;
    font-size: 1.32rem;
    letter-spacing: -0.04em;
}

.info-card p,
.info-card pre {
    margin: 12px 0 0;
    color: var(--muted);
}

.info-card pre {
    padding: 16px;
    border-radius: 16px;
    background: #111714;
    color: #eef6f2;
    overflow: auto;
}

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

.metric {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(236, 243, 255, 0.86));
    border: 1px solid rgba(22, 33, 29, 0.08);
}

.metric-label {
    display: block;
    color: var(--muted);
    margin-bottom: 12px;
}

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

.table-wrap {
    overflow: auto;
    border-radius: 22px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.75);
}

.table-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--accent-3);
    background: rgba(100, 104, 232, 0.1);
    font-weight: 700;
}

.archive-filter-form {
    display: flex;
    align-items: end;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.52);
}

.archive-filter-form .field {
    min-width: 180px;
    flex: 1 1 180px;
}

.archive-filter-form .field input {
    height: 52px;
    min-height: 52px;
    padding-top: 0;
    padding-bottom: 0;
}

.archive-filter-form .select-compact {
    height: 52px;
    min-height: 52px;
}

.archive-filter-form--activity .field {
    min-width: 200px;
}

.archive-filter-form--activity .field--wide {
    flex: 1.5 1 280px;
}

.archive-filter-button {
    display: inline-flex;
    align-items: center;
    min-width: 110px;
    height: 52px;
    min-height: 52px;
    padding: 0 18px;
    justify-content: center;
}

.archive-filter-form .pagination-link {
    height: 52px;
    min-height: 52px;
    padding: 0 18px;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.pagination-summary,
.pagination-current {
    color: var(--muted);
    font-size: 0.95rem;
}

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

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--ink);
    background: rgba(22, 33, 29, 0.05);
    border: 1px solid rgba(22, 33, 29, 0.08);
    font-weight: 700;
}

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

th,
td {
    padding: 16px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(22, 33, 29, 0.07);
}

th {
    position: sticky;
    top: 0;
    background: rgba(243, 247, 255, 0.95);
    backdrop-filter: blur(10px);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

tbody tr:hover {
    background: rgba(34, 214, 255, 0.05);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.status-chip.ok {
    background: rgba(52, 200, 255, 0.14);
    color: var(--success);
}

.status-chip.warn {
    background: rgba(179, 71, 53, 0.11);
    color: var(--danger);
}

.empty-state {
    display: grid;
    gap: 8px;
    padding: 24px;
    border-radius: 22px;
    border: 1px dashed rgba(22, 33, 29, 0.14);
    background: rgba(255, 255, 255, 0.52);
}

.empty-state strong,
.settings-item strong {
    font-family: "Space Grotesk", sans-serif;
}

.empty-state span {
    color: var(--muted);
    line-height: 1.65;
}

.settings-grid {
    display: grid;
    gap: 24px;
}

.toggle-card {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.68);
    cursor: pointer;
}

.toggle-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.toggle-indicator {
    position: relative;
    width: 54px;
    height: 32px;
    border-radius: 999px;
    background: rgba(22, 33, 29, 0.12);
    transition: background 180ms ease;
}

.toggle-indicator::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(22, 33, 29, 0.16);
    transition: transform 180ms ease;
}

.toggle-card:has(input:checked) .toggle-indicator {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
}

.toggle-card:has(input:checked) .toggle-indicator::after {
    transform: translateX(22px);
}

.toggle-copy strong,
.toggle-copy small {
    display: block;
}

.toggle-copy strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
}

.toggle-copy small {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.94rem;
}

.settings-form .run-button {
    min-width: 260px;
}

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

.settings-item {
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.68);
}

.settings-item strong {
    display: block;
    margin-top: 10px;
    font-size: 1.08rem;
    line-height: 1.5;
    word-break: break-word;
}

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

.user-card {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(22, 33, 29, 0.08);
    background: rgba(255, 255, 255, 0.68);
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: start;
}

.user-card-header strong,
.user-card-meta span {
    font-family: "Space Grotesk", sans-serif;
}

.user-card-header strong {
    display: block;
    font-size: 1.2rem;
    letter-spacing: -0.04em;
}

.user-card-header span:not(.status-chip) {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.55;
}

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

.user-card-meta {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.user-card-button {
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.user-card-button-danger {
    color: var(--danger);
    border-color: rgba(191, 78, 104, 0.2);
    background: rgba(191, 78, 104, 0.08);
}

.user-card-button-danger:hover {
    background: rgba(191, 78, 104, 0.12);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9800;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(18, 26, 63, 0.42);
    backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
    display: none !important;
}

.modal-shell {
    position: relative;
    width: min(560px, 100%);
    padding: 30px;
    border-radius: 30px;
    border: 1px solid rgba(29, 40, 91, 0.12);
    background:
        radial-gradient(circle at top right, rgba(34, 214, 255, 0.14), transparent 36%),
        linear-gradient(145deg, rgba(251, 253, 255, 0.98), rgba(236, 242, 255, 0.96));
    box-shadow: 0 28px 70px rgba(40, 52, 110, 0.24);
}

.modal-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(191, 78, 104, 0.1);
    color: var(--danger);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.modal-shell h3 {
    margin: 18px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.65rem, 3.6vw, 2.1rem);
    letter-spacing: -0.04em;
}

.modal-copy {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

.modal-actions {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: 26px;
}

.modal-button {
    min-width: 160px;
}

.modal-button-danger {
    min-width: 220px;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(22, 33, 29, 0.06);
    color: var(--muted);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(22, 33, 29, 0.1);
    color: var(--ink);
}

@keyframes orbit {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@media (max-width: 1080px) {
    .dashboard-shell,
    .hero,
    .info-grid,
    .metric-grid,
    .input-grid,
    .auth-notes,
    .user-grid,
    .user-card-grid {
        grid-template-columns: 1fr;
    }

    .user-card-actions,
    .modal-actions {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .run-bar,
    .section-heading,
    .app-toolbar,
    .pagination-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .archive-filter-form {
        align-items: stretch;
    }

    .app-authenticated {
        overflow: auto;
    }

    .dashboard-shell,
    .dashboard-main,
    .sidebar {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .auth-card {
        justify-self: stretch;
        max-width: none;
    }
}

@media (max-width: 720px) {
    .page-shell {
        padding: 16px;
    }

    .toast-stack {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .hero-copy,
    .hero-panel,
    .auth-card,
    .sidebar,
    .dashboard-header,
    .control-card,
    .results-card,
    .info-card {
        padding: 22px;
        border-radius: 24px;
    }

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

    .dashboard-brand-badge {
        width: 100%;
        justify-content: flex-start;
    }

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

    .brand-lockup {
        align-items: flex-start;
    }

    .brand-logo-hero-wordmark {
        width: min(260px, 100%);
        height: auto;
    }

    .brand-logo-dashboard {
        width: min(220px, 100%);
        height: auto;
    }

    .brand-logo-sidebar {
        width: 66px;
        height: 66px;
    }

    .mode-switch {
        grid-template-columns: 1fr;
    }

    .run-button {
        width: 100%;
    }
}
