﻿:root {
    color-scheme: dark;
    --bg: #06101c;
    --bg-soft: #09182a;
    --surface: rgba(10, 21, 38, 0.88);
    --surface-strong: rgba(13, 27, 48, 0.96);
    --surface-muted: rgba(16, 33, 58, 0.72);
    --outline: rgba(102, 156, 255, 0.18);
    --outline-strong: rgba(126, 177, 255, 0.34);
    --text: #f3f7ff;
    --text-muted: #93a8c8;
    --primary: #7cb0ff;
    --primary-strong: #4e8dff;
    --primary-soft: rgba(92, 148, 255, 0.2);
    --success: #7fe7bf;
    --danger: #ff8b9f;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 20px;
    --radius-sm: 16px;
    --font-main: "Segoe UI", "SF Pro Display", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 18%, rgba(81, 124, 255, 0.36), transparent 28%),
        radial-gradient(circle at 85% 24%, rgba(0, 182, 255, 0.16), transparent 24%),
        linear-gradient(180deg, #081321 0%, #040b14 100%);
    color: var(--text);
    font: 500 16px/1.45 var(--font-main);
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

.bg-grid,
.bg-glow {
    pointer-events: none;
    position: fixed;
    inset: 0;
}

.bg-grid {
    background-image:
        linear-gradient(rgba(124, 176, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 176, 255, 0.05) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 100%);
}

.bg-glow--left {
    background: radial-gradient(circle at 10% 10%, rgba(86, 121, 255, 0.26), transparent 34%);
}

.bg-glow--right {
    background: radial-gradient(circle at 92% 22%, rgba(0, 157, 255, 0.18), transparent 28%);
}

.site-shell {
    position: relative;
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0 64px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    margin-bottom: 18px;
    background: rgba(7, 16, 29, 0.82);
    border: 1px solid var(--outline);
    border-radius: 28px;
    backdrop-filter: blur(24px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

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

.brand-mark {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #92c0ff 0%, #4b7cff 100%);
    box-shadow: 0 0 0 6px rgba(106, 162, 255, 0.15), 0 0 28px rgba(76, 141, 255, 0.44);
}

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

.brand-copy strong {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-copy span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

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

.nav-link,
.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    color: var(--text-muted);
    transition: 160ms ease;
}

.nav-link:hover,
.nav-pill:hover {
    color: var(--text);
    border-color: var(--outline);
    background: rgba(124, 176, 255, 0.08);
}

.nav-inline {
    margin: 0;
}

.nav-pill {
    background: linear-gradient(180deg, rgba(77, 131, 255, 0.18), rgba(38, 74, 138, 0.22));
    color: var(--text);
    border-color: rgba(115, 168, 255, 0.2);
    cursor: pointer;
}

.nav-pill--ghost {
    background: rgba(124, 176, 255, 0.08);
}

.banner {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid transparent;
    backdrop-filter: blur(18px);
}

.banner--success {
    background: rgba(55, 104, 82, 0.22);
    border-color: rgba(127, 231, 191, 0.28);
}

.banner--error {
    background: rgba(125, 39, 63, 0.2);
    border-color: rgba(255, 139, 159, 0.28);
}

.page {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-panel,
.panel,
.login-card,
.login-intro,
.feature-card,
.file-card,
.admin-file-card,
.empty-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(11, 22, 40, 0.92), rgba(9, 16, 29, 0.96));
    border: 1px solid var(--outline);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.panel,
.login-card,
.login-intro,
.empty-card {
    padding: 28px;
}

.hero-copy::before,
.hero-panel::before,
.panel::before,
.login-card::before,
.login-intro::before,
.feature-card::before,
.file-card::before,
.admin-file-card::before,
.empty-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(122, 175, 255, 0.1), transparent 46%);
    pointer-events: none;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #9fc3ff;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1,
.login-shell h1 {
    margin: 12px 0 14px;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 0.92;
    letter-spacing: -0.055em;
}

.hero p,
.login-shell p,
.note-card p,
.feature-card p,
.empty-card p,
.file-subtitle,
.file-meta,
.form-hint {
    color: var(--text-muted);
}

.hero-actions,
.inline-actions,
.admin-file-card__actions,
.file-card__actions,
.nav-cluster {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

.metric-tile {
    padding: 18px;
    border-radius: 24px;
    background: rgba(124, 176, 255, 0.08);
    border: 1px solid rgba(124, 176, 255, 0.14);
}

.metric-tile span {
    display: block;
    margin-bottom: 10px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.metric-tile strong {
    font-size: clamp(1.15rem, 2vw, 1.8rem);
    letter-spacing: -0.04em;
}

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

.feature-card {
    padding: 24px;
    border-radius: 28px;
}

.feature-card h2,
.section-head h2,
.panel h2,
.note-card h3,
.file-card h3,
.admin-file-card h3,
.empty-card h3 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.section-head--tight {
    margin-bottom: 18px;
}

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

.file-card,
.admin-file-card,
.empty-card {
    padding: 22px;
    border-radius: 28px;
}

.file-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.file-badge,
.file-visibility {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.file-badge {
    color: #c8deff;
    background: rgba(124, 176, 255, 0.1);
    border: 1px solid rgba(124, 176, 255, 0.14);
}

.file-visibility--public {
    color: #d5ecff;
    background: rgba(82, 141, 255, 0.16);
}

.file-visibility--shared {
    color: #d6f1ff;
    background: rgba(0, 167, 255, 0.14);
}

.file-visibility--private {
    color: #d8dcf2;
    background: rgba(179, 188, 219, 0.12);
}

.file-subtitle {
    margin: 8px 0 14px;
}

.file-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.86rem;
}

.file-meta--stacked {
    flex-direction: column;
    align-items: end;
    justify-content: flex-start;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 180ms ease;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button--primary {
    color: #05101f;
    background: linear-gradient(135deg, #98c4ff 0%, #5b93ff 100%);
    box-shadow: 0 12px 30px rgba(76, 141, 255, 0.34);
}

.button--ghost,
.button--tonal {
    color: var(--text);
    background: rgba(124, 176, 255, 0.08);
    border-color: rgba(124, 176, 255, 0.16);
}

.button--danger {
    color: #ffe7eb;
    background: rgba(255, 139, 159, 0.14);
    border-color: rgba(255, 139, 159, 0.22);
}

.button--small {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 0.9rem;
}

.empty-card,
.empty-card--large {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.8fr);
    gap: 22px;
    min-height: calc(100vh - 180px);
    align-items: center;
}

.security-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.security-stack span {
    padding: 10px 14px;
    border-radius: 999px;
    color: #c5dcff;
    background: rgba(124, 176, 255, 0.09);
    border: 1px solid rgba(124, 176, 255, 0.16);
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.field span,
.radio-grid legend {
    font-size: 0.9rem;
    color: #d8e7ff;
}

.field input,
.select-field {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(124, 176, 255, 0.06);
    border: 1px solid rgba(124, 176, 255, 0.16);
    border-radius: 18px;
    outline: none;
}

.field input:focus,
.select-field:focus {
    border-color: var(--outline-strong);
    box-shadow: 0 0 0 4px rgba(92, 148, 255, 0.16);
}

.form-hint {
    margin: 0;
    font-size: 0.92rem;
}

.form-hint--error {
    color: #ffc2cd;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 20px;
}

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

.note-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(124, 176, 255, 0.06);
    border: 1px solid rgba(124, 176, 255, 0.12);
}

.note-card h3 {
    margin-bottom: 8px;
}

.radio-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
    margin: 0;
    border: 0;
}

.radio-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(124, 176, 255, 0.12);
    background: rgba(124, 176, 255, 0.06);
    cursor: pointer;
}

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

.radio-card span {
    font-weight: 700;
}

.radio-card small {
    color: var(--text-muted);
}

.radio-card:has(input:checked) {
    border-color: rgba(115, 168, 255, 0.36);
    background: linear-gradient(180deg, rgba(83, 128, 255, 0.18), rgba(83, 128, 255, 0.08));
    box-shadow: inset 0 0 0 1px rgba(115, 168, 255, 0.18);
}

.file-picker {
    display: grid;
    gap: 6px;
    padding: 20px;
    border-radius: 24px;
    border: 1px dashed rgba(124, 176, 255, 0.28);
    background: rgba(124, 176, 255, 0.05);
    cursor: pointer;
}

.file-picker input {
    display: none;
}

.file-picker strong {
    font-size: 1rem;
}

.file-picker span {
    color: var(--text-muted);
    word-break: break-word;
}

.admin-file-card__top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-file-card__actions {
    align-items: center;
}

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

.inline-form--danger {
    margin-left: auto;
}

.select-field {
    min-width: 166px;
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
label:has(input:focus-visible) {
    outline: none;
    box-shadow: 0 0 0 4px rgba(92, 148, 255, 0.2);
}

@media (max-width: 1080px) {
    .hero,
    .dashboard-grid,
    .login-shell,
    .feature-strip,
    .file-grid,
    .admin-file-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .login-shell h1 {
        font-size: clamp(2.6rem, 10vw, 4.4rem);
    }

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

@media (max-width: 760px) {
    .site-shell {
        width: min(100vw - 20px, 1180px);
        padding-top: 14px;
        padding-bottom: 32px;
    }

    .topbar {
        position: sticky;
        top: 10px;
        z-index: 40;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 24px;
    }

    .brand {
        width: 100%;
    }

    .nav-cluster {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-link,
    .nav-pill,
    .nav-inline {
        width: 100%;
    }

    .nav-inline .nav-pill {
        width: 100%;
    }

    .hero-copy,
    .hero-panel,
    .panel,
    .login-card,
    .login-intro,
    .file-card,
    .admin-file-card,
    .empty-card {
        padding: 22px;
        border-radius: 28px;
    }

    .hero-panel--stats {
        grid-template-columns: 1fr 1fr;
    }

    .admin-file-card__top,
    .file-meta,
    .file-meta--stacked,
    .admin-file-card__actions,
    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-form--danger {
        margin-left: 0;
    }

    .button,
    .button--small,
    .select-field {
        width: 100%;
    }

    .hero-actions,
    .inline-actions,
    .file-card__actions {
        flex-direction: column;
    }
}
