@font-face {
    font-family: 'ALS Sirius';
    src: url('/fonts/ALS_Sirius.woff2') format('woff2'), url('/fonts/ALS_Sirius.woff') format('woff');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #071018;
    --bg-2: #0b1522;
    --surface: rgba(12, 24, 38, 0.76);
    --surface-strong: rgba(17, 35, 55, 0.92);
    --stroke: rgba(255, 255, 255, 0.12);
    --stroke-strong: rgba(91, 241, 196, 0.32);
    --text: #eef7ff;
    --muted: #9eb4c7;
    --muted-2: #7790a7;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --green: #55e082;
    --violet: #9b5cff;
    --orange: #ff9f43;
    --red: #ff5c7a;
    --radius: 24px;
    --radius-sm: 16px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --font: 'ALS Sirius', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 12% 0%, rgba(42, 123, 255, 0.28), transparent 30rem),
        radial-gradient(circle at 90% 18%, rgba(79, 255, 174, 0.16), transparent 26rem),
        linear-gradient(145deg, #06101a, #091521 42%, #061017);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }

.bg-orbit {
    position: fixed;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    filter: blur(0.2px);
    opacity: 0.45;
    z-index: -1;
}
.bg-orbit-one { width: 36rem; height: 36rem; right: -18rem; top: 8rem; box-shadow: inset 0 0 80px rgba(52, 211, 153, 0.08); }
.bg-orbit-two { width: 26rem; height: 26rem; left: -14rem; bottom: 0; box-shadow: inset 0 0 70px rgba(155, 92, 255, 0.12); }

.app-shell {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 14px 0 52px;
}

.topbar {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--stroke);
    border-radius: 22px;
    background: rgba(6, 16, 26, 0.82);
    backdrop-filter: blur(22px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.26);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--violet), var(--blue) 48%, var(--green));
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.04em;
    box-shadow: 0 12px 30px rgba(60, 120, 255, 0.32);
}
.brand-text { display: grid; line-height: 1.1; }
.brand-text strong { font-size: 14px; }
.brand-text small { color: var(--muted); font-size: 12px; }

.menu-toggle {
    display: inline-grid;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 12px;
    border: 1px solid var(--stroke);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}
.menu-toggle span { display: block; height: 2px; border-radius: 999px; background: var(--text); }

.main-nav {
    position: absolute;
    inset: calc(100% + 8px) 0 auto 0;
    display: none;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
    border: 1px solid var(--stroke);
    border-radius: 20px;
    background: rgba(7, 16, 24, 0.96);
    backdrop-filter: blur(20px);
}
.main-nav.is-open { display: grid; }
.main-nav a, .nav-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--muted);
    text-decoration: none;
    background: transparent;
}
.main-nav a:hover, .main-nav a:focus-visible, .nav-button:hover, .nav-button:focus-visible, .main-nav .is-active {
    color: var(--text);
    border-color: var(--stroke);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}
.nav-cta { background: rgba(85, 224, 130, 0.12) !important; color: #d9ffe6 !important; }

main { padding-top: 34px; }
.page-enter { animation: rise 0.42s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.glass-card, .info-card, .auth-card, .form-section, .summary-panel {
    border: 1px solid var(--stroke);
    background: linear-gradient(145deg, rgba(17, 33, 52, 0.84), rgba(10, 22, 34, 0.68));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9cfbd0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--green));
    box-shadow: 0 0 20px rgba(85, 224, 130, 0.9);
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(34px, 9vw, 72px); line-height: 0.94; letter-spacing: -0.06em; margin-bottom: 18px; }
h2 { font-size: clamp(24px, 5vw, 38px); line-height: 1; letter-spacing: -0.04em; margin-bottom: 14px; }
h3 { font-size: 18px; letter-spacing: -0.02em; margin-bottom: 8px; }
p { color: var(--muted); }
.muted { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }

.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .section-toggle:focus-visible { outline: 3px solid rgba(34, 211, 238, 0.45); outline-offset: 2px; }
.button-primary {
    color: #03131d;
    background: linear-gradient(135deg, #72f8c6, #45d2ff 50%, #a588ff);
    box-shadow: 0 18px 36px rgba(34, 211, 238, 0.22);
}
.button-ghost {
    color: var(--text);
    border-color: var(--stroke);
    background: rgba(255, 255, 255, 0.05);
}
.full { width: 100%; }

.hero-grid {
    min-height: calc(100vh - 132px);
    display: grid;
    align-items: center;
    gap: 22px;
}
.hero-copy { padding: 24px 2px; }
.hero-lead { font-size: clamp(18px, 4vw, 24px); max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-panel { position: relative; overflow: hidden; padding: 22px; }
.pulse-line {
    height: 4px;
    width: 100%;
    border-radius: 999px;
    margin-bottom: 22px;
    background: linear-gradient(90deg, var(--violet), var(--blue), var(--cyan), var(--green));
    box-shadow: 0 0 26px rgba(34, 211, 238, 0.45);
}
.feature-list { display: grid; gap: 12px; }
.feature-list div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 12px;
    padding: 14px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
}
.feature-list span { grid-row: span 2; color: var(--green); font-weight: 800; }
.feature-list small { color: var(--muted); }

.surface-section { padding: 46px 0 16px; }
.section-heading { max-width: 760px; margin-bottom: 20px; }
.cards-grid { display: grid; gap: 14px; }
.info-card { padding: 20px; }
.info-card p { margin-bottom: 0; }

.chatbot-card { margin-top: 18px; padding: 20px; display: grid; gap: 18px; }
.bot-links { display: grid; gap: 10px; }
.bot-links a {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    text-decoration: none;
    background: rgba(255,255,255,0.04);
}
.bot-links a:hover { border-color: var(--stroke-strong); background: rgba(85, 224, 130, 0.08); }
.bot-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: rgba(34, 211, 238, 0.12); font-weight: 800; }

.auth-page { display: grid; align-items: center; gap: 22px; min-height: calc(100vh - 132px); }
.auth-copy p { max-width: 580px; font-size: 18px; }
.auth-card { padding: 20px; }
.field { display: grid; gap: 8px; margin-bottom: 14px; }
.field span { color: #d8e8f4; font-weight: 750; }
input, select, textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 12px 14px;
    color: var(--text);
    background: rgba(3, 13, 22, 0.68);
}
select option { background: #071018; color: var(--text); }
textarea { resize: vertical; }
.field small, .field-error { color: var(--red); min-height: 18px; font-size: 13px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.checkbox-row input { width: 18px; min-height: 18px; margin-top: 2px; }
.form-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 0; font-size: 14px; }
.form-links a { color: #9cfbd0; }
.dev-note { margin-top: 14px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.04); color: var(--muted); font-size: 13px; }
.stepper.mini { display: flex; gap: 10px; margin-bottom: 18px; }
.stepper.mini span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--stroke); color: var(--muted); }
.stepper.mini .is-active { color: #071018; background: linear-gradient(135deg, var(--cyan), var(--green)); font-weight: 800; }

.dashboard-layout { display: grid; gap: 18px; }
.sidebar { padding: 20px; align-self: start; }
.profile-dot { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(135deg, var(--violet), var(--cyan)); font-weight: 900; margin-bottom: 18px; }
.profile-list, .summary-panel dl, .details-list { display: grid; gap: 10px; margin: 0 0 18px; }
.profile-list div, .summary-panel dl div, .details-list div { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.04); }
dt { color: var(--muted); } dd { margin: 0; font-weight: 750; text-align: right; }
.dashboard-main { display: grid; gap: 18px; }
.empty-application, .application-card, .dev-switcher { padding: 20px; }
.card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.status-badge { display: inline-flex; align-items: center; min-height: 34px; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 900; white-space: nowrap; }
.status-draft { color: #d8e8ff; background: rgba(93, 137, 196, 0.22); border: 1px solid rgba(139, 182, 244, 0.24); }
.status-submitted { color: #d7ebff; background: rgba(59, 130, 246, 0.24); border: 1px solid rgba(59, 130, 246, 0.36); }
.status-review { color: #efe2ff; background: rgba(155, 92, 255, 0.24); border: 1px solid rgba(155, 92, 255, 0.36); }
.status-accepted { color: #dbffe8; background: rgba(85, 224, 130, 0.22); border: 1px solid rgba(85, 224, 130, 0.36); }
.status-correction { color: #fff1dc; background: rgba(255, 128, 75, 0.24); border: 1px solid rgba(255, 92, 122, 0.34); }
.status-description { padding: 14px; border-radius: 16px; background: rgba(255,255,255,0.04); }
.facts-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 18px 0; }
.facts-grid div { padding: 14px; border: 1px solid var(--stroke); border-radius: 16px; background: rgba(255,255,255,0.035); }
.facts-grid span { display: block; color: var(--muted); font-size: 13px; }
.facts-grid strong { display: block; margin-top: 4px; }
.message-panel, .cta-panel, .hint-panel, .form-errors { padding: 16px; border-radius: 18px; margin: 14px 0; border: 1px solid var(--stroke); background: rgba(34, 211, 238, 0.08); }
.cta-panel { background: linear-gradient(135deg, rgba(85, 224, 130, 0.12), rgba(59, 130, 246, 0.09)); border-color: var(--stroke-strong); }
.form-errors { color: #ffe4e9; background: rgba(255, 92, 122, 0.12); border-color: rgba(255, 92, 122, 0.28); }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.direction-list { display: grid; gap: 10px; padding-left: 20px; }
.direction-list li { padding: 12px; border-radius: 16px; background: rgba(255,255,255,0.04); }
.direction-list li span { display: block; color: var(--green); font-size: 13px; margin-top: 4px; }
.direction-list.compact { padding-left: 0; list-style: none; }
.dev-grid { display: grid; gap: 12px; }

.application-head { display: grid; gap: 16px; margin-bottom: 18px; }
.progress-card { padding: 16px; display: flex; align-items: center; gap: 14px; }
.progress-ring { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: conic-gradient(var(--green) 0deg, rgba(255,255,255,0.08) 0deg); font-weight: 900; color: #fff; }
.application-grid { display: grid; gap: 18px; align-items: start; }
.application-form { display: grid; gap: 14px; }
.form-section { overflow: hidden; }
.section-toggle { width: 100%; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 0; padding: 16px; color: var(--text); background: transparent; text-align: left; }
.section-toggle span { display: grid; gap: 2px; font-weight: 900; }
.section-toggle small { color: var(--muted); font-size: 13px; text-align: right; }
.section-toggle b { color: var(--muted); }
.form-section.is-complete .section-toggle b { color: var(--green); }
.form-section.has-error { border-color: rgba(255, 92, 122, 0.42); }
.form-section.has-error .section-toggle b { color: var(--orange); }
.section-body { display: none; padding: 0 16px 16px; }
.form-section.is-open .section-body { display: block; animation: fadeIn 0.18s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.field-grid { display: grid; gap: 12px; }
.direction-helper { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.direction-helper p { margin-bottom: 0; }
.catalog-grid { display: grid; gap: 16px; }
.direction-catalog, .selected-directions { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.catalog-card, .selected-card { padding: 14px; border: 1px solid var(--stroke); border-radius: 18px; background: rgba(255,255,255,0.04); }
.catalog-card header, .selected-card header { display: flex; justify-content: space-between; gap: 10px; }
.catalog-card strong, .selected-card strong { display: block; }
.catalog-card small, .selected-card small { color: var(--muted); display: block; margin-top: 4px; }
.catalog-card footer, .selected-card footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 8px; border-radius: 999px; background: rgba(34, 211, 238, 0.09); color: #bcf5ff; font-size: 12px; }
.warning { color: #ffd7a5; font-size: 13px; }
.icon-button { min-width: 38px; min-height: 38px; border: 1px solid var(--stroke); border-radius: 12px; background: rgba(255,255,255,0.05); color: var(--text); }
.summary-panel { padding: 18px; position: sticky; bottom: 12px; z-index: 10; }
.summary-actions { display: grid; gap: 10px; }
.details-page { display: grid; gap: 18px; }
.application-card.wide { max-width: 980px; margin: 0 auto; }
.details-columns { display: grid; gap: 16px; margin-top: 18px; }
.toast {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 50;
    display: none;
    padding: 14px 16px;
    border: 1px solid var(--stroke);
    border-radius: 18px;
    color: var(--text);
    background: rgba(7, 16, 24, 0.94);
    box-shadow: var(--shadow);
}
.toast.is-visible { display: block; animation: rise 0.18s ease both; }
.toast.is-error { border-color: rgba(255, 92, 122, 0.42); }

@media (min-width: 680px) {
    .app-shell { width: min(1180px, calc(100% - 48px)); padding-top: 18px; }
    .menu-toggle { display: none; }
    .main-nav { position: static; display: flex; align-items: center; padding: 0; border: 0; background: transparent; backdrop-filter: none; }
    .main-nav a, .nav-button { justify-content: center; }
    .hero-grid, .auth-page { grid-template-columns: 1.08fr 0.92fr; }
    .cards-grid.three { grid-template-columns: repeat(3, 1fr); }
    .chatbot-card { grid-template-columns: 1fr auto; align-items: center; }
    .bot-links { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
    .facts-grid { grid-template-columns: repeat(2, 1fr); }
    .field-grid { grid-template-columns: repeat(2, 1fr); }
    .dev-grid { grid-template-columns: 1fr 1fr auto; align-items: end; }
    .application-head { grid-template-columns: 1fr auto; align-items: end; }
    .details-columns { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 980px) {
    .dashboard-layout { grid-template-columns: 300px 1fr; }
    .sidebar { position: sticky; top: 94px; }
    .application-grid { grid-template-columns: 1fr 320px; }
    .summary-panel { top: 94px; bottom: auto; }
    .catalog-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 0.86fr); }
    .facts-grid { grid-template-columns: repeat(3, 1fr); }
}

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