﻿:root {
    color-scheme: light;
    --bg-top: #f8fbff;
    --bg-bottom: #e8f2ff;
    --surface: rgba(255, 255, 255, 0.68);
    --surface-strong: rgba(255, 255, 255, 0.84);
    --surface-soft: rgba(235, 244, 255, 0.66);
    --surface-muted: rgba(225, 237, 255, 0.58);
    --surface-solid: #f5f9ff;
    --ink: #0d1b35;
    --muted: #5f7091;
    --muted-strong: #415470;
    --line: rgba(112, 149, 206, 0.22);
    --line-strong: rgba(56, 111, 197, 0.36);
    --accent: #2f7cff;
    --accent-strong: #1459e0;
    --accent-soft: rgba(47, 124, 255, 0.12);
    --accent-cool: #72d8ff;
    --success: #16c47f;
    --error: #ff6b7d;
    --glass-filter: blur(20px) saturate(145%);
    --glass-filter-soft: blur(14px) saturate(135%);
    --shadow-shell:
        0 18px 48px rgba(62, 102, 172, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.72);
    --shadow-card:
        0 10px 26px rgba(88, 125, 191, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.78);
    --shadow-float:
        0 14px 28px rgba(23, 89, 224, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 20px;
    --radius-sm: 16px;
    --spring: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    color: var(--ink);
    font-family: "SF Pro Display", "SF Pro Text", "Manrope", "Segoe UI Variable", sans-serif;
    background:
        radial-gradient(circle at 12% 14%, rgba(114, 216, 255, 0.16), transparent 22%),
        linear-gradient(180deg, var(--bg-top) 0%, #eef4ff 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    z-index: -1;
    filter: blur(12px);
    animation: orb-float 18s ease-in-out infinite;
}

body::before {
    top: -12vw;
    right: -6vw;
    width: min(38vw, 560px);
    height: min(38vw, 560px);
    background: radial-gradient(circle, rgba(111, 196, 255, 0.2), rgba(111, 196, 255, 0));
}

body::after {
    bottom: -18vw;
    left: -10vw;
    width: min(42vw, 620px);
    height: min(42vw, 620px);
    background: radial-gradient(circle, rgba(47, 124, 255, 0.1), rgba(47, 124, 255, 0));
    animation-delay: -8s;
}

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

img {
    display: block;
    max-width: 100%;
}

form {
    margin: 0;
}

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

small {
    line-height: 1.55;
}

::selection {
    background: rgba(47, 124, 255, 0.18);
    color: var(--ink);
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    min-height: 56px;
    border: 1px solid rgba(112, 149, 206, 0.24);
    border-radius: 18px;
    padding: 15px 18px;
    color: var(--ink);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 246, 255, 0.7));
    box-shadow:
        0 12px 28px rgba(109, 146, 206, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    outline: none;
    backdrop-filter: var(--glass-filter-soft);
    -webkit-backdrop-filter: var(--glass-filter-soft);
    transition:
        border-color 0.32s var(--spring),
        box-shadow 0.32s var(--spring),
        transform 0.32s var(--spring),
        background 0.32s ease;
}

input:not([type="checkbox"]):not([type="radio"])::placeholder,
textarea::placeholder {
    color: rgba(95, 112, 145, 0.72);
}

input:not([type="checkbox"]):not([type="radio"]):focus,
select:focus,
textarea:focus {
    border-color: rgba(20, 89, 224, 0.42);  
}

select {
    min-height: 56px;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(95, 112, 145, 0.92) 50%),
        linear-gradient(135deg, rgba(95, 112, 145, 0.92) 50%, transparent 50%);
    background-position:
        calc(100% - 24px) calc(50% - 3px),
        calc(100% - 18px) calc(50% - 3px);
    background-size: 6px 6px;
    background-repeat: no-repeat;
}

textarea {
    resize: vertical;
    min-height: 124px;
    max-width: 100%;
}

.panel {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-shell);
    overflow: hidden;
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
}

.panel::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
    pointer-events: none;
}

.panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 48%, rgba(114, 216, 255, 0.04) 100%);
}

.panel > * {
    position: relative;
    z-index: 1;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 10px;
    min-height: 52px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: -0.02em;
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 0.3s var(--spring),
        box-shadow 0.3s var(--spring),
        border-color 0.3s ease,
        opacity 0.2s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.22) 32%, transparent 62%);
    transform: translateX(-135%);
    transition: transform 0.7s var(--spring);
    pointer-events: none;
}

.button:active {
    transform: translateY(0) scale(0.98);
}

.button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 6px rgba(47, 124, 255, 0.16);
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-primary {
    color: #fff;
    background: linear-gradient(180deg, var(--accent), var(--accent-strong));
    box-shadow: var(--shadow-float);
}

.button-secondary,
.button-ghost {
    color: var(--ink);
    border-color: rgba(112, 149, 206, 0.22);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-card);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.54);
}

.button-roblox {
    color: #0f3f84;
    background: rgba(241, 248, 255, 0.9);
}

.button-primary.button-roblox {
    color: #fff;
    background: linear-gradient(135deg, #101417, #1e2936 72%, #35485d);
    box-shadow: 0 16px 34px rgba(16, 20, 23, 0.24);
}

.button-block {
    width: 100%;
}

.button.is-loading {
    color: transparent !important;
    pointer-events: none;
}

.button.is-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    animation: button-spin 0.75s linear infinite;
}

.button-primary.is-loading::after {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
}

.button-secondary.is-loading::after,
.button-ghost.is-loading::after {
    border: 2px solid rgba(13, 27, 53, 0.16);
    border-top-color: var(--ink);
}

.notification-center {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 70;
    display: grid;
    gap: 12px;
    width: min(380px, calc(100vw - 24px));
    pointer-events: none;
}

.toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.68);
    background: linear-gradient(180deg, rgba(17, 31, 61, 0.88), rgba(8, 17, 34, 0.78));
    color: #fff;
    box-shadow: 0 24px 48px rgba(8, 20, 48, 0.22);
    backdrop-filter: var(--glass-filter);
    -webkit-backdrop-filter: var(--glass-filter);
    pointer-events: auto;
    animation: toast-in 0.55s var(--spring) both;
}

.toast::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 45%);
    pointer-events: none;
}

.toast-success {
    border-color: rgba(22, 196, 127, 0.42);
}

.toast-error {
    border-color: rgba(255, 107, 125, 0.44);
}

.toast-copy {
    display: grid;
    gap: 4px;
}

.toast-copy span {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.55;
}

.toast-close {
    padding: 0;
    min-height: auto;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    box-shadow: none;
    cursor: pointer;
}

.toast-close:hover {
    color: #fff;
}

.toast.is-leaving {
    animation: toast-out 0.46s ease forwards;
}
.label,
.eyebrow {
    margin: 0;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 700;
}

.lead,
.editor-meta,
.field-note,
.crew-copy span,
.info-list span,
.snapshot-meta,
.flight-note,
.flight-status-copy span,
.feature-card p,
.stat-card p,
.role-summary p {
    margin: 10;
    color: var(--muted);
    line-height: 1.15;
}

.lead {
    max-width: 62ch;
}

.hero-copy h1,
.spotlight-copy h1,
.page-intro h1,
.profile-card h1 {
    margin: 0;
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 0.92;
    letter-spacing: -0.065em;
}

.section-heading h2,
.auth-card h2,
.editor-head h2,
.flight-route {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    letter-spacing: -0.04em;
}

.compact-heading h3,
.role-summary h3,
.feature-card h2 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -0.03em;
}

.hero-copy,
.spotlight-copy,
.auth-header,
.profile-copy,
.flight-status-copy {
    display: grid;
    gap: 10px;
}

.welcome-layout,
.dashboard-grid,
.settings-grid,
.operations-layout {
    display: grid;
    gap: 22px;
}

.welcome-layout {
    min-height: 100vh;
    max-width: none;
    margin: 0 auto;
    padding: 20px 22px 26px;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.72fr);
    align-items: stretch;
}

.welcome-layout-minimal {
    width: 100%;
    max-width: 620px;
    padding: 24px;
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
    align-content: center;
}

.welcome-layout-minimal .hero-panel {
    display: none;
}

.welcome-layout > * {
    min-width: 0;
}

.hero-panel,
.auth-card,
.topbar,
.spotlight,
.section-card,
.page-intro,
.editor-card,
.profile-card,
.settings-card,
.flight-card {
    display: grid;
    gap: 22px;
    padding: 30px;
}

.hero-panel {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, rgba(15, 79, 199, 0.96), rgba(24, 101, 239, 0.92));
    box-shadow: 0 20px 54px rgba(13, 54, 140, 0.18);
}

.hero-panel::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
}

.hero-panel::after {
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 35%, rgba(255, 255, 255, 0.08) 72%, transparent 100%);
}

.auth-card,
.section-card,
.page-intro,
.profile-card,
.settings-card,
.flight-card,
.editor-card {
    align-content: start;
    background: rgba(255, 255, 255, 0.8);
}

.auth-card {
    align-self: center;
}

.auth-card-minimal {
    width: min(100%, 620px);
    justify-self: center;
    gap: 24px;
    padding: 34px;
}

.auth-card-minimal .auth-header {
    justify-items: center;
    text-align: center;
}

.auth-card-minimal .lead {
    max-width: 40ch;
}

.page-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.badge-row,
.summary-band,
.topbar-actions,
.section-heading,
.editor-head,
.flight-head,
.flight-actions,
.profile-visual,
.crew-row,
.info-list div,
.role-summary-header,
.flight-snapshot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.section-heading > div,
.editor-head > div,
.role-summary-header > div,
.flight-head > div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.summary-band,
.metric-grid,
.stat-grid,
.feature-grid,
.dashboard-grid,
.flight-role-grid,
.meta-grid,
.attendance-grid,
.permission-grid,
.field-grid,
.editor-grid,
.permission-cloud,
.crew-list,
.role-ladder,
.flight-snapshot-list,
.info-list,
.flight-board {
    display: grid;
    gap: 16px;
}

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

.summary-band,
.dashboard-grid,
.settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.operations-layout {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    align-items: start;
}

.editor-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    align-items: start;
}

.permission-grid,
.field-grid,
.meta-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.feature-card,
.metric-card,
.stat-card,
.role-summary,
.flight-snapshot,
.attendance-card,
.permission-toggle,
.crew-row,
.credential-card,
.info-list div,
.meta-grid div,
.flight-card-side,
.flight-note {
    position: relative;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(112, 149, 206, 0.2);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.feature-card::before,
.metric-card::before,
.stat-card::before,
.flight-snapshot::before {
    content: "";
    position: absolute;
    top: -36px;
    right: -28px;
    width: 108px;
    height: 108px;
    border-radius: 32px;
    background: radial-gradient(circle, rgba(114, 216, 255, 0.16), rgba(114, 216, 255, 0));
    pointer-events: none;
}

.feature-card,
.metric-card,
.stat-card,
.credential-card,
.flight-summary-chip,
.flight-status-copy,
.crew-copy,
.profile-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feature-card {
    gap: 10px;
}

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

.feature-index,
.brand-mark,
.avatar,
.status-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-index,
.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 20px 40px rgba(20, 89, 224, 0.24);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong) 70%, var(--accent-cool));
}

.status-chip,
.soft-chip,
.flight-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(112, 149, 206, 0.22);
    background: rgba(255, 255, 255, 0.64);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.badge-row-compact {
    justify-content: center;
    flex-wrap: wrap;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #8dffbe, var(--success));
    box-shadow: 0 0 0 8px rgba(22, 196, 127, 0.12);
    animation: status-pulse 2.4s ease infinite;
}

.summary-band {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: var(--glass-filter-soft);
    -webkit-backdrop-filter: var(--glass-filter-soft);
}
.hero-panel .feature-card {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.18);
}

.hero-panel .feature-card h2 {
    color: var(--ink);
}

.hero-panel .status-chip,
.hero-panel .soft-chip,
.hero-panel .flight-summary-chip,
.spotlight .soft-chip {
    color: rgba(255, 255, 255, 0.96);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

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

.hero-panel .summary-band > div {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.hero-panel .summary-band span {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
}

.hero-panel .summary-band strong {
    font-size: clamp(1.08rem, 1.65vw, 1.46rem);
    line-height: 1.18;
    color: #fff;
    overflow-wrap: anywhere;
}

.summary-band strong,
.metric-card strong,
.stat-card strong {
    font-size: clamp(1.4rem, 2vw, 2rem);
    letter-spacing: -0.05em;
}

.flight-summary-chip strong {
    font-size: 1.24rem;
    letter-spacing: -0.04em;
}

.app-shell {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.app-shell > * {
    position: relative;
    z-index: 1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    align-self: start;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0 0 28px 28px;
    background: rgba(247, 251, 255, 0.82);
    box-shadow: 0 10px 24px rgba(79, 114, 170, 0.08);
}

.brand-lockup,
.nav-pills,
.identity-pill,
.action-row,
.route-line,
.flight-number-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-lockup strong {
    display: block;
    font-size: 1rem;
    letter-spacing: -0.03em;
}

.brand-lockup span:last-child {
    color: var(--muted);
}

.nav-pills {
    min-width: 0;
    justify-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 18px rgba(96, 133, 192, 0.06);
    backdrop-filter: var(--glass-filter-soft);
    -webkit-backdrop-filter: var(--glass-filter-soft);
}

.nav-link {
    padding: 12px 15px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.nav-link.is-active,
.nav-link[aria-current="page"] {
    color: var(--accent-strong);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 243, 255, 0.9));
    box-shadow:
        0 12px 24px rgba(97, 133, 192, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.topbar-actions {
    margin-top: 0;
    justify-content: flex-end;
}

.identity-pill {
    width: auto;
    min-width: 240px;
    padding: 10px 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        0 8px 18px rgba(107, 144, 204, 0.06);
    backdrop-filter: var(--glass-filter-soft);
    -webkit-backdrop-filter: var(--glass-filter-soft);
}

.identity-pill strong {
    display: block;
}

.identity-pill span:last-child {
    color: var(--muted);
}

.topbar .button-secondary {
    width: auto;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    overflow: hidden;
    color: var(--accent-strong);
    font-weight: 800;
    background: linear-gradient(145deg, rgba(235, 245, 255, 0.96), rgba(194, 219, 255, 0.8));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 16px 30px rgba(96, 136, 197, 0.14);
}

.avatar-small {
    width: 42px;
    height: 42px;
}

.avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    font-size: 2rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-stack {
    width: 100%;
    margin: 0;
    padding: 18px 18px 30px;
    display: grid;
    gap: 18px;
    align-content: start;
}

.page-stack > * {
    min-width: 0;
}

.spotlight {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 360px);
    gap: 20px;
    align-items: start;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, rgba(16, 76, 189, 0.96), rgba(28, 108, 245, 0.9));
}

.spotlight-copy .eyebrow,
.spotlight-copy .lead {
    color: rgba(255, 255, 255, 0.78);
}

.metric-card {
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink);
}

.metric-card .label,
.metric-card small {
    color: var(--muted);
}

.metric-card strong {
    color: var(--ink);
    line-height: 1.04;
    overflow-wrap: anywhere;
}

.role-summary,
.editor-card,
.attendance-card {
    position: relative;
    overflow: hidden;
}

.role-summary::after,
.editor-card::after,
.attendance-card::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 18px;
    width: calc(100% - 36px);
    height: 4px;
    border-radius: 0 0 999px 999px;
    background: var(--role-accent, var(--accent));
}

.role-count,
.crew-login {
    color: var(--muted);
    font-size: 0.92rem;
}

.crew-link-form {
    width: min(100%, 320px);
}

.crew-row {
    flex-wrap: wrap;
    align-items: flex-start;
}

.crew-copy {
    flex: 1 1 220px;
    min-width: 0;
}

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

.tag,
.permission-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(112, 149, 206, 0.2);
    background: rgba(255, 255, 255, 0.86);
    color: var(--accent-strong);
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.route-arrow {
    color: var(--accent);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.7rem;
}

.empty-state {
    display: grid;
    gap: 8px;
    padding: 22px;
    border-radius: 22px;
    border: 1px dashed rgba(56, 111, 197, 0.26);
    background: rgba(255, 255, 255, 0.72);
}
.field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.95rem;
}

.field span,
.field strong {
    font-weight: 700;
}

.stack-form {
    display: grid;
    gap: 18px;
    align-content: start;
}

.auth-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-divider::before {
    content: "";
    position: absolute;
    inset: 50% 0 auto;
    border-top: 1px solid rgba(112, 149, 206, 0.2);
}

.auth-divider span {
    position: relative;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
}

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

.credential-card > div {
    display: grid;
    gap: 6px;
}

.intro-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.form-panel {
    position: sticky;
    top: 104px;
    align-self: start;
}

.flight-card-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(300px, 0.9fr);
    gap: 20px;
    align-items: start;
}

.flight-card-main,
.flight-card-side {
    display: grid;
    gap: 18px;
    align-content: start;
}

.flight-card-side {
    padding: 18px;
}

.flight-head {
    align-items: flex-start;
}

.flight-number {
    padding: 8px 12px;
    border-radius: 14px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, rgba(10, 45, 115, 0.96), rgba(20, 89, 224, 0.94));
    box-shadow: 0 16px 30px rgba(20, 89, 224, 0.22);
}

.flight-route span {
    color: var(--accent);
}

.meta-grid div {
    display: grid;
    gap: 6px;
}

.meta-grid strong {
    overflow-wrap: anywhere;
}

.flight-role-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.attendance-card span {
    color: var(--muted);
}

.inline-form {
    margin: 0;
}

.attendance-form {
    padding-top: 18px;
    border-top: 1px solid rgba(112, 149, 206, 0.18);
}

.compact-field input:not([type="checkbox"]):not([type="radio"]) {
    min-height: 48px;
}

.permission-cloud {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.snapshot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

.permission-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: flex-start;
    gap: 14px;
}

.permission-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 3px;
    accent-color: var(--accent-strong);
    box-shadow: none;
}

.permission-toggle span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.permission-toggle strong,
.permission-toggle small {
    overflow-wrap: anywhere;
}

.permission-toggle small {
    line-height: 1.45;
}

.profile-visual {
    justify-content: flex-start;
}

.info-list div {
    background: rgba(255, 255, 255, 0.82);
}

.create-card {
    border-style: dashed;
}

.welcome-layout > *,
.topbar,
.page-stack > * {
    animation: surface-enter 0.78s var(--spring) both;
}

.welcome-layout > :nth-child(2),
.page-stack > :nth-child(2) {
    animation-delay: 0.08s;
}

.page-stack > :nth-child(3) {
    animation-delay: 0.14s;
}

@media (hover: hover) {
    .feature-card,
    .metric-card,
    .stat-card,
    .role-summary,
    .flight-snapshot,
    .attendance-card,
    .permission-toggle,
    .crew-row,
    .info-list div,
    .meta-grid div,
    .button,
    .nav-link {
        will-change: transform;
    }

    .feature-card:hover,
    .metric-card:hover,
    .stat-card:hover,
    .role-summary:hover,
    .flight-snapshot:hover,
    .attendance-card:hover,
    .permission-toggle:hover,
    .crew-row:hover,
    .info-list div:hover,
    .meta-grid div:hover {
        transform: translateY(-4px);
        border-color: rgba(47, 124, 255, 0.26);
        box-shadow:
            0 22px 38px rgba(92, 129, 190, 0.16),
            inset 0 1px 0 rgba(255, 255, 255, 0.88);
    }

    .nav-link:hover {
        color: var(--ink);
        background: rgba(255, 255, 255, 0.5);
    }
}

@keyframes surface-enter {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0) scale(0.985);
        filter: blur(12px);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate3d(20px, -10px, 0) scale(0.96);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
    to {
        opacity: 0;
        transform: translate3d(18px, -8px, 0) scale(0.96);
    }
}

@keyframes button-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes orb-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(0, 26px, 0) scale(1.05);
    }
}

@keyframes status-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 8px rgba(22, 196, 127, 0.12);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(22, 196, 127, 0);
    }
}
@media (max-width: 1220px) {
    .topbar {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px 18px;
    }

    .brand-lockup {
        align-self: start;
    }

    .nav-pills {
        flex-wrap: nowrap;
        justify-self: stretch;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
    }

    .nav-pills::-webkit-scrollbar {
        display: none;
    }

    .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .identity-pill {
        min-width: 0;
    }

    .page-stack {
        padding: 14px 16px 24px;
    }

    .spotlight,
    .dashboard-grid,
    .settings-grid,
    .operations-layout,
    .flight-card-layout,
    .page-intro {
        grid-template-columns: 1fr;
    }

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

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

    .form-panel {
        position: static;
    }
}

@media (max-width: 900px) {
    .welcome-layout {
        padding: 18px;
        grid-template-columns: 1fr;
    }

    .welcome-layout-minimal {
        max-width: 100%;
        padding: 18px;
    }

    .feature-grid,
    .summary-band,
    .permission-grid,
    .field-grid,
    .credential-card,
    .meta-grid,
    .metric-grid,
    .editor-grid {
        grid-template-columns: 1fr;
    }

    .page-stack {
        padding: 12px 14px 22px;
    }

    .hero-panel,
    .auth-card,
    .spotlight,
    .section-card,
    .page-intro,
    .editor-card,
    .profile-card,
    .settings-card,
    .flight-card {
        padding: 22px;
    }

    .hero-copy h1,
    .spotlight-copy h1,
    .page-intro h1,
    .profile-card h1 {
        font-size: clamp(2.1rem, 8vw, 3.3rem);
    }

    .badge-row,
    .summary-band,
    .topbar-actions,
    .section-heading,
    .editor-head,
    .flight-head,
    .flight-actions,
    .profile-visual,
    .crew-row,
    .info-list div {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        grid-template-columns: 1fr;
    }

    .identity-pill,
    .topbar .button-secondary,
    .topbar-actions form {
        width: 100%;
    }

    .permission-toggle {
        padding: 15px;
    }

    .flight-card-side {
        padding: 16px;
    }

    .crew-link-form {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .notification-center {
        top: 12px;
        right: 12px;
        width: min(340px, calc(100vw - 24px));
    }

    .page-stack {
        padding: 10px 12px 20px;
        gap: 14px;
    }

    .topbar {
        padding: 12px;
    }

    .stat-grid,
    .summary-band,
    .feature-grid,
    .flight-role-grid,
    .attendance-grid,
    .permission-cloud,
    .permission-grid,
    .field-grid,
    .meta-grid {
        grid-template-columns: 1fr;
    }

    .nav-link {
        white-space: nowrap;
        padding: 10px 14px;
    }

    .hero-panel,
    .auth-card,
    .spotlight,
    .section-card,
    .page-intro,
    .editor-card,
    .profile-card,
    .settings-card,
    .flight-card,
    .stat-card,
    .feature-card,
    .role-summary,
    .flight-snapshot,
    .attendance-card,
    .permission-toggle,
    .crew-row,
    .credential-card,
    .info-list div,
    .flight-card-side,
    .meta-grid div {
        padding: 16px;
        border-radius: 20px;
    }

    .permission-toggle {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 12px;
    }

    .button {
        width: 100%;
    }

    .auth-note-card {
        grid-template-columns: 1fr;
    }
}

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

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