@charset "UTF-8";

:root {
    color-scheme: light;
    --bg: #f3f5f8;
    --bg-elevated: #f8f9fb;
    --surface: #ffffff;
    --surface-soft: #f5f7fa;
    --surface-strong: #ecf0f5;
    --ink: #162033;
    --ink-soft: #566176;
    --ink-faint: #8993a4;
    --line: #e3e7ee;
    --line-strong: #d5dbe5;
    --navy: #111a2e;
    --navy-soft: #1a2740;
    --accent: #5b5bd6;
    --accent-strong: #4848c7;
    --accent-soft: #efefff;
    --teal: #16a394;
    --teal-soft: #e8f8f5;
    --amber: #e19b32;
    --amber-soft: #fff5e5;
    --danger: #dc4c64;
    --danger-soft: #fff0f3;
    --shadow-sm: 0 1px 2px rgba(17, 26, 46, .04), 0 5px 16px rgba(17, 26, 46, .04);
    --shadow-md: 0 16px 50px rgba(17, 26, 46, .09);
    --shadow-lg: 0 28px 80px rgba(17, 26, 46, .16);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --sidebar-width: 246px;
    --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", sans-serif;
    --font-display: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d1422;
    --bg-elevated: #111a2b;
    --surface: #151f32;
    --surface-soft: #1a263b;
    --surface-strong: #202e46;
    --ink: #f2f5fb;
    --ink-soft: #a8b3c6;
    --ink-faint: #76839a;
    --line: #26344b;
    --line-strong: #33445f;
    --accent: #8585f4;
    --accent-strong: #9a9aff;
    --accent-soft: #24244e;
    --teal: #43c9ba;
    --teal-soft: #123a38;
    --amber: #f0b45c;
    --amber-soft: #3b2e1a;
    --danger: #ff7188;
    --danger-soft: #3d2029;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .15), 0 5px 16px rgba(0, 0, 0, .1);
    --shadow-md: 0 16px 50px rgba(0, 0, 0, .2);
    --shadow-lg: 0 28px 80px rgba(0, 0, 0, .35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

button {
    border: 0;
    cursor: pointer;
}

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

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

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

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.is-hidden {
    display: none !important;
}

::selection {
    color: white;
    background: var(--accent);
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
    outline-offset: 2px;
}

/* Splash */

.splash {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 22px;
    color: #9faacc;
    background: var(--navy);
    transition: opacity .45s ease, visibility .45s ease;
}

.splash.is-finished {
    visibility: hidden;
    opacity: 0;
}

.splash p {
    margin: 0;
    font-size: 12px;
    letter-spacing: .18em;
}

.splash-mark {
    display: flex;
    align-items: end;
    gap: 5px;
    height: 42px;
}

.splash-mark span {
    width: 9px;
    border-radius: 8px;
    background: linear-gradient(180deg, #a8a8ff, #5b5bd6);
    animation: splashBars 1.15s var(--ease) infinite alternate;
}

.splash-mark span:nth-child(1) {
    height: 20px;
}

.splash-mark span:nth-child(2) {
    height: 42px;
    animation-delay: -.7s;
}

.splash-mark span:nth-child(3) {
    height: 29px;
    animation-delay: -.3s;
}

@keyframes splashBars {
    to { height: 12px; opacity: .5; }
}

/* Shared brand */

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

.brand-symbol {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 3px;
    width: 38px;
    height: 38px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
}

.brand-symbol i {
    width: 4px;
    border-radius: 4px;
    background: #c9c9ff;
}

.brand-symbol i:nth-child(1) {
    height: 10px;
    opacity: .65;
}

.brand-symbol i:nth-child(2) {
    height: 21px;
    background: linear-gradient(180deg, #ffffff, #9292ff);
}

.brand-symbol i:nth-child(3) {
    height: 15px;
    opacity: .8;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-copy strong {
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .06em;
}

.brand-copy small {
    margin-top: 6px;
    color: #7c89aa;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    letter-spacing: .22em;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #9da9c7;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .18em;
}

.eyebrow i {
    width: 20px;
    height: 1px;
    background: currentColor;
}

.eyebrow-dark {
    color: var(--accent);
}

.section-kicker {
    color: var(--accent);
    font-size: 9px;
    letter-spacing: .16em;
}

/* Authentication */

.auth-screen {
    display: grid;
    grid-template-columns: minmax(460px, 1.08fr) minmax(420px, .92fr);
    min-height: 100vh;
    background: var(--surface);
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 48px 6vw 34px;
    overflow: hidden;
    color: white;
    background:
        radial-gradient(circle at 85% 15%, rgba(113, 111, 255, .28), transparent 32%),
        radial-gradient(circle at 25% 85%, rgba(37, 201, 184, .16), transparent 27%),
        var(--navy);
}

.auth-visual::before {
    position: absolute;
    inset: 0;
    content: "";
    opacity: .25;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(145deg, transparent 15%, black 52%, transparent 95%);
}

.auth-visual .brand {
    position: relative;
    z-index: 2;
    align-self: flex-start;
}

.auth-message {
    position: relative;
    z-index: 2;
    width: min(570px, 90%);
    margin: auto 0 22px;
}

.auth-message h1 {
    margin: 20px 0 22px;
    font-family: var(--font-display);
    font-size: clamp(42px, 5.1vw, 72px);
    font-weight: 500;
    letter-spacing: -.055em;
    line-height: 1.06;
}

.auth-message h1 em {
    color: #b9b9ff;
    font-style: normal;
}

.auth-message p {
    width: min(450px, 92%);
    margin: 0;
    color: #96a2bd;
    font-size: 15px;
    letter-spacing: .015em;
    line-height: 1.9;
}

.visual-collage {
    position: relative;
    z-index: 1;
    width: min(570px, 95%);
    height: 190px;
    margin: 6px 0 20px;
}

.collage-card {
    position: absolute;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .28);
}

.collage-one {
    left: 0;
    bottom: 0;
    display: flex;
    align-items: end;
    justify-content: space-between;
    width: 215px;
    height: 138px;
    padding: 18px;
    background:
        linear-gradient(180deg, transparent, rgba(5, 11, 25, .46)),
        radial-gradient(circle at 40% 30%, #709d9d, transparent 30%),
        linear-gradient(135deg, #202e48 0%, #486377 48%, #c5b79a 50%, #202e48 72%);
    transform: rotate(-3deg);
}

.collage-one::before,
.collage-one::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    filter: blur(1px);
}

.collage-one::before {
    top: 22px;
    left: 54px;
    width: 76px;
    height: 76px;
    background: rgba(234, 211, 166, .7);
}

.collage-one::after {
    right: -10px;
    bottom: -36px;
    width: 135px;
    height: 120px;
    border-radius: 50% 50% 0 0;
    background: #172636;
}

.collage-one span,
.collage-one b {
    position: relative;
    z-index: 1;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    letter-spacing: .16em;
}

.collage-two {
    left: 194px;
    bottom: 9px;
    width: 176px;
    height: 153px;
    background:
        linear-gradient(155deg, transparent 48%, rgba(255, 255, 255, .14) 49%, transparent 50%),
        radial-gradient(circle at 66% 35%, #ffca8e 0 7%, transparent 8%),
        linear-gradient(145deg, #293254, #66568b 46%, #242943);
    transform: rotate(3deg);
}

.collage-two::before {
    position: absolute;
    right: -20px;
    bottom: -45px;
    width: 165px;
    height: 160px;
    content: "";
    border-radius: 48% 48% 0 0;
    background: linear-gradient(145deg, #20273d, #594d69);
    transform: rotate(-10deg);
}

.collage-three {
    left: 340px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 184px;
    height: 126px;
    padding: 18px;
    background:
        linear-gradient(140deg, rgba(255, 255, 255, .12), transparent 35%),
        linear-gradient(145deg, #174d54, #0f2837);
    transform: rotate(-1deg);
}

.collage-three span {
    color: #9ae1d6;
    font-family: Georgia, serif;
    font-size: 45px;
    line-height: .85;
}

.collage-three small {
    margin-top: 10px;
    color: #9eb7b8;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    letter-spacing: .15em;
}

.collage-note {
    position: absolute;
    right: 0;
    bottom: 111px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 13px;
    color: #c8d1e3;
    background: rgba(20, 30, 50, .88);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    backdrop-filter: blur(14px);
}

.collage-note svg {
    width: 19px;
    color: #78cfc3;
}

.collage-note span {
    font-size: 9px;
    letter-spacing: .1em;
    line-height: 1.35;
}

.auth-footnote {
    position: relative;
    z-index: 2;
    margin: 0;
    color: #5f6c8a;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    letter-spacing: .12em;
}

.auth-panel {
    position: relative;
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 50px;
    background:
        radial-gradient(circle at 100% 0, rgba(91, 91, 214, .055), transparent 34%),
        var(--surface);
}

.auth-form-wrap {
    width: min(390px, 100%);
    animation: riseIn .75s var(--ease) both;
}

.auth-form-wrap h2 {
    margin: 17px 0 8px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 650;
    letter-spacing: -.04em;
}

.auth-form-wrap > p {
    margin: 0 0 34px;
    color: var(--ink-soft);
}

.mobile-brand {
    display: none;
}

.auth-copyright {
    position: absolute;
    bottom: 24px;
    margin: 0;
    color: var(--ink-faint);
    font-size: 11px;
}

.stack-form {
    display: grid;
    gap: 20px;
}

.field {
    position: relative;
    display: grid;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
}

.input-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 51px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    transition: border .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-shell:focus-within {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent);
}

.input-shell svg {
    width: 18px;
    color: var(--ink-faint);
}

.input-shell input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.input-shell input::placeholder,
textarea::placeholder {
    color: var(--ink-faint);
}

.field-action {
    position: absolute;
    right: 14px;
    bottom: 15px;
    padding: 2px 0;
    color: var(--accent);
    background: transparent;
    font-size: 11px;
    font-weight: 650;
}

.form-error {
    min-height: 18px;
    margin: -8px 0 -5px;
    color: var(--danger);
    font-size: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 43px;
    padding: 0 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border .18s ease;
}

.button svg {
    width: 17px;
    height: 17px;
}

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

.button-primary {
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 22%, transparent);
}

.button-primary:hover:not(:disabled) {
    background: var(--accent-strong);
    box-shadow: 0 9px 22px color-mix(in srgb, var(--accent) 30%, transparent);
}

.button-dark {
    color: #ffffff;
    background: var(--navy);
}

.button-soft {
    color: var(--accent);
    border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
    background: var(--accent-soft);
}

.button-ghost {
    color: var(--ink-soft);
    border: 1px solid var(--line);
    background: var(--surface);
}

.button-danger {
    color: #ffffff;
    background: var(--danger);
}

.button-danger-soft {
    color: var(--danger);
    border: 1px solid color-mix(in srgb, var(--danger) 20%, var(--line));
    background: var(--danger-soft);
}

.button-wide {
    width: 100%;
    height: 53px;
    margin-top: 2px;
}

.button-wide > span {
    flex: 1;
    text-align: left;
}

.login-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 24px 0 0 !important;
    color: var(--ink-faint) !important;
    font-size: 11px;
}

.login-hint svg {
    width: 14px;
    height: 14px;
}

@keyframes riseIn {
    from { opacity: 0; transform: translateY(17px); }
}

/* Application shell */

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    padding: 27px 18px 19px;
    color: #d4daea;
    background:
        radial-gradient(circle at 10% 85%, rgba(70, 95, 152, .16), transparent 31%),
        var(--navy);
}

.sidebar::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    content: "";
    background: linear-gradient(transparent, rgba(255, 255, 255, .09), transparent);
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}

.icon-button.sidebar-close {
    display: none;
    color: #c5cde0;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 45px;
}

.nav-label {
    margin: 0 12px 9px;
    color: #596784;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.nav-label-second {
    margin-top: 27px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 45px;
    padding: 0 13px;
    overflow: hidden;
    border-radius: 10px;
    color: #8896b2;
    background: transparent;
    font-size: 13px;
    text-align: left;
    transition: color .2s ease, background .2s ease;
}

.nav-item svg {
    width: 18px;
    height: 18px;
}

.nav-item i {
    position: absolute;
    right: 12px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #a8a8ff;
    opacity: 0;
}

.nav-item:hover {
    color: #e5e9f3;
    background: rgba(255, 255, 255, .045);
}

.nav-item.is-active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(105, 104, 238, .2), rgba(105, 104, 238, .08));
    box-shadow: inset 0 0 0 1px rgba(161, 160, 255, .09);
}

.nav-item.is-active svg {
    color: #aaaaff;
}

.nav-item.is-active i {
    opacity: 1;
}

.sidebar-bottom {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.storage-card {
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .075);
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
}

.storage-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #aeb9cf;
    font-size: 10px;
}

.storage-heading span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.storage-heading svg {
    width: 14px;
    height: 14px;
    color: #747fea;
}

.storage-heading b {
    color: #e3e8f2;
    font-size: 10px;
    font-weight: 600;
}

.storage-track {
    height: 3px;
    margin: 11px 0 8px;
    overflow: hidden;
    border-radius: 3px;
    background: rgba(255, 255, 255, .1);
}

.storage-track span {
    display: block;
    width: 6%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6e6ce6, #7bd4c8);
    transition: width .5s var(--ease);
}

.storage-card small {
    color: #596784;
    font-size: 8px;
}

.nav-logout {
    height: 39px;
}

.account-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 8px 2px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(145deg, #7070ea, #3c4e9c);
    font-size: 13px;
    font-weight: 700;
}

.account-chip > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.account-chip b {
    overflow: hidden;
    color: #dde3f0;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-chip small {
    margin-top: 2px;
    color: #63708b;
    font-size: 8px;
}

.account-chip i {
    width: 6px;
    height: 6px;
    margin-left: auto;
    border: 2px solid var(--navy);
    border-radius: 50%;
    background: #42c9a7;
    box-shadow: 0 0 0 2px rgba(66, 201, 167, .18);
}

.main-content {
    min-width: 0;
    grid-column: 2;
}

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
    padding: 0 clamp(24px, 3.3vw, 52px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(18px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 13px;
}

.topbar-left p {
    margin: 0 0 2px;
    color: var(--ink-faint);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.topbar-left h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -.025em;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 30px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--ink-soft);
    background: var(--surface);
    font-size: 9px;
}

.status-pill i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #32b997;
    box-shadow: 0 0 0 3px rgba(50, 185, 151, .11);
}

.icon-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    color: var(--ink-soft);
    background: transparent;
    transition: background .2s ease, color .2s ease;
}

.icon-button:hover {
    color: var(--ink);
    background: var(--surface-strong);
}

.icon-button svg {
    width: 18px;
    height: 18px;
}

.theme-toggle {
    border: 1px solid var(--line);
    background: var(--surface);
}

.theme-toggle .icon-sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

.mobile-only {
    display: none;
}

.content-wrap {
    width: min(1430px, 100%);
    margin: 0 auto;
    padding: 30px clamp(24px, 3.3vw, 52px) 70px;
}

.view-panel {
    animation: viewIn .45s var(--ease) both;
}

@keyframes viewIn {
    from { opacity: 0; transform: translateY(8px); }
}

/* Hero */

.hero-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    min-height: 286px;
    padding: 38px clamp(30px, 4vw, 58px);
    overflow: hidden;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 30%, rgba(105, 121, 223, .48), transparent 34%),
        radial-gradient(circle at 18% 105%, rgba(38, 170, 158, .28), transparent 37%),
        linear-gradient(115deg, #121b31, #1b2a4b 70%, #252f5a);
    box-shadow: var(--shadow-md);
}

.hero-grid {
    position: absolute;
    inset: 0;
    opacity: .39;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, transparent 15%, black, transparent);
}

.hero-orbit {
    position: absolute;
    border: 1px solid rgba(205, 208, 255, .15);
    border-radius: 50%;
}

.hero-orbit::before {
    position: absolute;
    width: 7px;
    height: 7px;
    content: "";
    border-radius: 50%;
    background: #9c9cff;
    box-shadow: 0 0 15px #9494ff;
}

.hero-orbit-one {
    right: -62px;
    bottom: -188px;
    width: 480px;
    height: 480px;
}

.hero-orbit-one::before {
    top: 30px;
    left: 95px;
}

.hero-orbit-two {
    right: 45px;
    bottom: -300px;
    width: 590px;
    height: 590px;
}

.hero-orbit-two::before {
    top: 55px;
    right: 108px;
    width: 4px;
    height: 4px;
    background: #70d0c2;
    box-shadow: 0 0 10px #70d0c2;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 20px;
    color: #aeb8d3;
    background: rgba(255, 255, 255, .045);
    font-size: 9px;
    letter-spacing: .08em;
}

.hero-badge i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #76d9ca;
    box-shadow: 0 0 8px #76d9ca;
}

.hero-copy h2 {
    margin: 17px 0 13px;
    font-family: var(--font-display);
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 550;
    letter-spacing: -.05em;
    line-height: 1.1;
}

.hero-copy h2 em {
    color: #c0c0ff;
    font-style: normal;
}

.hero-copy p {
    max-width: 520px;
    margin: 0;
    color: #9ca8c2;
    font-size: 12px;
    line-height: 1.85;
}

.hero-metrics {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: clamp(20px, 3vw, 44px);
    padding-bottom: 4px;
}

.hero-metrics div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-metrics strong {
    color: #eef0ff;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -.02em;
}

.hero-metrics span {
    color: #7d89a4;
    font-size: 8px;
    letter-spacing: .05em;
    white-space: nowrap;
}

/* Upload */

.upload-card {
    position: relative;
    z-index: 2;
    margin-top: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

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

.section-heading h2 {
    margin: 4px 0 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -.025em;
}

.section-heading .section-kicker {
    line-height: 1;
}

.format-note {
    color: var(--ink-faint);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    letter-spacing: .04em;
}

.dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    min-height: 148px;
    padding: 30px;
    overflow: hidden;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at 20% 100%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 35%),
        var(--surface-soft);
    text-align: left;
    transition: border .2s ease, background .2s ease, transform .2s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    background:
        radial-gradient(circle at 20% 100%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 38%),
        var(--surface-soft);
}

.dropzone.is-dragging {
    transform: scale(.995);
}

.drop-icon {
    position: relative;
    display: grid;
    width: 55px;
    height: 55px;
    flex: 0 0 55px;
    place-items: center;
    border-radius: 16px;
    color: var(--accent);
    background: var(--accent-soft);
}

.drop-icon svg {
    width: 22px;
    height: 22px;
}

.drop-icon i {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--surface-soft);
    border-radius: 50%;
    background: var(--teal);
}

.dropzone h3 {
    margin: 0 0 7px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.dropzone h3 button {
    padding: 0;
    color: var(--accent);
    background: transparent;
    font-weight: inherit;
}

.dropzone p {
    margin: 0;
    color: var(--ink-faint);
    font-size: 10px;
}

.drop-corner {
    position: absolute;
    right: 16px;
    bottom: 11px;
    color: color-mix(in srgb, var(--ink-faint) 48%, transparent);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 7px;
    line-height: 1.25;
    letter-spacing: .15em;
    text-align: right;
}

.upload-queue {
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.queue-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 3px 9px;
}

.queue-head b {
    font-size: 12px;
}

.queue-head span {
    color: var(--ink-faint);
    font-size: 9px;
}

.queue-item {
    display: grid;
    grid-template-columns: 40px minmax(100px, 1fr) minmax(120px, 260px) 48px;
    align-items: center;
    gap: 13px;
    padding: 10px 3px;
    border-top: 1px solid var(--line);
}

.queue-thumb {
    position: relative;
    display: grid;
    width: 40px;
    height: 40px;
    overflow: hidden;
    place-items: center;
    border-radius: 9px;
    color: var(--ink-faint);
    background: var(--surface-soft);
}

.queue-thumb img,
.queue-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.queue-thumb svg {
    width: 17px;
}

.queue-file {
    min-width: 0;
}

.queue-file b {
    display: block;
    overflow: hidden;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-file small {
    color: var(--ink-faint);
    font-size: 8px;
}

.queue-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-track {
    height: 4px;
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--surface-strong);
}

.queue-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #7e82ec);
    transition: width .18s linear;
}

.queue-percent {
    width: 34px;
    color: var(--ink-faint);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    text-align: right;
}

.queue-state {
    display: flex;
    justify-content: flex-end;
    color: var(--teal);
    font-size: 9px;
}

.queue-state.is-error {
    color: var(--danger);
}

.queue-state svg {
    width: 16px;
    height: 16px;
}

/* Statistics */

.stats-heading {
    margin: 34px 0 14px;
}

.text-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 0;
    color: var(--ink-soft);
    background: transparent;
    font-size: 10px;
}

.text-button:hover {
    color: var(--accent);
}

.text-button svg {
    width: 14px;
    height: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.stat-card {
    position: relative;
    display: flex;
    min-width: 0;
    gap: 14px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
}

.stat-icon svg {
    width: 17px;
    height: 17px;
}

.stat-files .stat-icon {
    color: #6161dc;
    background: #efefff;
}

.stat-storage .stat-icon {
    color: #169c8c;
    background: #e9f8f5;
}

.stat-images .stat-icon {
    color: #d58d27;
    background: #fff5e4;
}

.stat-videos .stat-icon {
    color: #4e72c8;
    background: #edf2ff;
}

[data-theme="dark"] .stat-files .stat-icon {
    background: #272752;
}

[data-theme="dark"] .stat-storage .stat-icon {
    background: #103a36;
}

[data-theme="dark"] .stat-images .stat-icon {
    background: #3b2e18;
}

[data-theme="dark"] .stat-videos .stat-icon {
    background: #1b2c4f;
}

.stat-card > div {
    min-width: 0;
}

.stat-card small {
    display: block;
    color: var(--ink-faint);
    font-size: 9px;
}

.stat-card strong {
    display: block;
    margin: 2px 0 2px;
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 620;
    letter-spacing: -.035em;
    text-overflow: ellipsis;
}

.stat-card p {
    margin: 0;
    color: var(--ink-faint);
    font-size: 8px;
    white-space: nowrap;
}

.stat-card p b {
    color: var(--teal);
}

.stat-index {
    position: absolute;
    right: 14px;
    bottom: 8px;
    color: color-mix(in srgb, var(--ink-faint) 20%, transparent);
    font-family: Georgia, serif;
    font-size: 28px;
    font-style: italic;
}

/* Media cards */

.recent-section {
    margin-top: 34px;
}

.recent-section .section-heading {
    margin-bottom: 14px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.media-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .22s var(--ease), box-shadow .22s ease, border .22s ease;
}

.media-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.media-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.34;
    overflow: hidden;
    cursor: pointer;
    background: #e9edf2;
}

[data-theme="dark"] .media-thumb {
    background: #202c41;
}

.media-thumb > img,
.media-thumb > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .55s var(--ease);
}

.media-card:hover .media-thumb > img,
.media-card:hover .media-thumb > video {
    transform: scale(1.035);
}

.media-thumb::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    background: linear-gradient(180deg, rgba(6, 12, 25, .1), transparent 35%, transparent 65%, rgba(6, 12, 25, .27));
    opacity: .45;
}

.media-type-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 23px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 7px;
    color: #ffffff;
    background: rgba(11, 18, 33, .55);
    backdrop-filter: blur(8px);
    font-size: 8px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.media-type-badge svg {
    width: 12px;
    height: 12px;
}

.media-check {
    position: absolute;
    z-index: 3;
    top: 10px;
    right: 10px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 7px;
    color: transparent;
    background: rgba(8, 14, 26, .3);
    backdrop-filter: blur(7px);
    transition: background .2s ease, color .2s ease;
}

.media-card.is-selected .media-check {
    color: #ffffff;
    border-color: var(--accent);
    background: var(--accent);
}

.media-check svg {
    width: 13px;
    height: 13px;
    stroke-width: 2.5;
}

.media-actions {
    position: absolute;
    z-index: 3;
    right: 9px;
    bottom: 9px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease;
}

.media-card:hover .media-actions,
.media-card:focus-within .media-actions {
    opacity: 1;
    transform: translateY(0);
}

.media-action {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: 8px;
    color: #ffffff;
    background: rgba(9, 16, 30, .62);
    backdrop-filter: blur(9px);
    transition: background .2s ease;
}

.media-action:hover {
    background: var(--accent);
}

.media-action svg {
    width: 14px;
    height: 14px;
}

.media-info {
    padding: 13px 14px 14px;
}

.media-name {
    display: block;
    overflow: hidden;
    padding: 0;
    color: var(--ink);
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-name:hover {
    color: var(--accent);
}

.media-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
    color: var(--ink-faint);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
}

.video-play {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(7, 13, 25, .42);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
    backdrop-filter: blur(8px);
    transform: translate(-50%, -50%);
    transition: transform .25s var(--ease), background .25s ease;
}

.video-play::after {
    width: 0;
    height: 0;
    margin-left: 3px;
    content: "";
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid currentColor;
}

.media-card:hover .video-play {
    background: var(--accent);
    transform: translate(-50%, -50%) scale(1.08);
}

/* Empty state */

.empty-state {
    display: grid;
    min-height: 330px;
    place-content: center;
    justify-items: center;
    padding: 40px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    color: var(--ink-faint);
    text-align: center;
}

.empty-state.compact {
    min-height: 210px;
}

.empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 16px;
    color: var(--accent);
    background: var(--accent-soft);
}

.empty-icon svg {
    width: 22px;
}

.empty-state h3 {
    margin: 15px 0 4px;
    color: var(--ink);
    font-size: 14px;
}

.empty-state p {
    margin: 0;
    font-size: 10px;
}

/* Library */

.library-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    padding: 7px 0 27px;
}

.library-header h2,
.settings-intro h2 {
    margin: 6px 0 7px;
    font-family: var(--font-display);
    font-size: clamp(29px, 3.4vw, 42px);
    font-weight: 620;
    letter-spacing: -.045em;
}

.library-header p,
.settings-intro p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 12px;
}

.library-toolbar {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.filter-tabs {
    display: flex;
    align-items: center;
    gap: 3px;
}

.filter-tabs button {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 13px;
    border-radius: 8px;
    color: var(--ink-soft);
    background: transparent;
    font-size: 10px;
}

.filter-tabs button:hover {
    background: var(--surface-soft);
}

.filter-tabs button.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 650;
}

.filter-tabs span {
    min-width: 17px;
    padding: 1px 4px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    font-size: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 36px;
    min-width: 205px;
    margin-left: auto;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
}

.search-box:focus-within {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.search-box svg {
    width: 15px;
    height: 15px;
    color: var(--ink-faint);
}

.search-box input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 10px;
}

.search-box input::placeholder {
    color: var(--ink-faint);
}

.library-toolbar .button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 10px;
}

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

.library-loading {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 15px;
}

.library-loading span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: dotPulse .8s infinite alternate;
}

.library-loading span:nth-child(2) {
    animation-delay: .15s;
}

.library-loading span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes dotPulse {
    to { opacity: .2; transform: translateY(-3px); }
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 28px;
}

.pagination button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink-soft);
    background: var(--surface);
}

.pagination button:hover:not(:disabled) {
    color: var(--accent);
    border-color: var(--accent);
}

.pagination button:first-child svg {
    transform: rotate(180deg);
}

.pagination svg {
    width: 14px;
}

.pagination span {
    color: var(--ink-faint);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
}

/* Settings */

.settings-intro {
    padding: 7px 0 27px;
}

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

.settings-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.settings-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    color: var(--accent);
    background: var(--accent-soft);
}

.settings-icon svg {
    width: 18px;
    height: 18px;
}

.settings-icon-amber {
    color: var(--amber);
    background: var(--amber-soft);
}

.settings-icon-green {
    color: var(--teal);
    background: var(--teal-soft);
}

.settings-card-head h3 {
    margin: 1px 0 3px;
    font-size: 14px;
}

.settings-card-head p {
    margin: 0;
    color: var(--ink-faint);
    font-size: 9px;
}

.settings-card textarea {
    min-height: 96px;
    padding: 13px 14px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    outline: 0;
    background: var(--surface-soft);
    font: inherit;
    font-size: 12px;
    line-height: 1.6;
}

.settings-card textarea:focus {
    border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent);
}

.settings-card .button {
    align-self: flex-start;
    margin-top: auto;
}

.field small {
    color: var(--ink-faint);
    font-size: 8px;
    font-weight: 400;
}

.field-count {
    position: absolute;
    right: 10px;
    bottom: 7px;
}

.system-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(230px, .75fr) minmax(300px, 1.25fr);
    align-items: start;
    column-gap: 55px;
}

.system-card .settings-card-head {
    grid-row: span 2;
    border-bottom: 0;
    padding-bottom: 0;
}

.system-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 30px;
    margin: 0;
}

.system-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.system-list dt,
.system-list dd {
    margin: 0;
    font-size: 10px;
}

.system-list dt {
    color: var(--ink-faint);
}

.system-list dd {
    color: var(--ink);
    font-weight: 600;
    text-align: right;
}

.status-text {
    color: var(--teal) !important;
}

.system-note {
    grid-column: 2;
    margin: 7px 0 0;
    padding: 11px 13px;
    border-radius: 9px;
    color: var(--ink-faint);
    background: var(--surface-soft);
    font-size: 9px;
}

/* Modals */

.modal {
    border: 0;
    padding: 0;
    color: var(--ink);
    background: transparent;
}

.modal::backdrop {
    background: rgba(8, 13, 24, .64);
    backdrop-filter: blur(5px);
}

.modal[open] {
    animation: modalIn .25s var(--ease) both;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
}

.modal-close {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    color: #ffffff;
    background: rgba(10, 16, 29, .5);
    backdrop-filter: blur(8px);
}

.file-modal {
    width: min(940px, calc(100vw - 32px));
    max-height: min(720px, calc(100vh - 32px));
    overflow: hidden;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.file-modal[open] {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
}

.modal-preview {
    display: grid;
    min-height: 460px;
    max-height: min(720px, calc(100vh - 32px));
    place-items: center;
    overflow: hidden;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, .035) 25%, transparent 25%) 0 0 / 20px 20px,
        linear-gradient(-45deg, rgba(255, 255, 255, .035) 25%, transparent 25%) 0 10px / 20px 20px,
        #101827;
}

.modal-preview img,
.modal-preview video {
    width: 100%;
    max-height: min(720px, calc(100vh - 32px));
    object-fit: contain;
}

.modal-details {
    min-width: 0;
    padding: 32px 27px 26px;
    overflow-y: auto;
}

.modal-details .section-kicker {
    margin-bottom: 9px;
}

.modal-details h3 {
    overflow-wrap: anywhere;
    margin: 0 0 7px;
    font-family: var(--font-display);
    font-size: 20px;
    line-height: 1.3;
    letter-spacing: -.025em;
}

.modal-details > p {
    margin: 0 0 22px;
    color: var(--ink-faint);
    font-size: 9px;
}

.detail-list {
    display: grid;
    gap: 0;
    margin: 0 0 22px;
}

.detail-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.detail-list dt,
.detail-list dd {
    margin: 0;
    font-size: 9px;
}

.detail-list dt {
    color: var(--ink-faint);
}

.detail-list dd {
    overflow: hidden;
    font-family: "SFMono-Regular", Consolas, monospace;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-block {
    display: grid;
    gap: 8px;
    margin-top: 13px;
}

.link-block > span {
    color: var(--ink-soft);
    font-size: 9px;
    font-weight: 600;
}

.link-copy-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 6px 6px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
}

.link-copy-row code {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: var(--ink-soft);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-copy-row button {
    display: grid;
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    place-items: center;
    border-radius: 7px;
    color: var(--ink-soft);
    background: var(--surface);
}

.link-copy-row button:hover {
    color: var(--accent);
}

.link-copy-row svg {
    width: 13px;
    height: 13px;
}

.modal-footer-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.modal-footer-actions .button {
    min-height: 37px;
    flex: 1;
    padding: 0 12px;
    font-size: 10px;
}

.confirm-modal {
    width: min(390px, calc(100vw - 30px));
    padding: 30px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.confirm-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 14px;
    color: var(--danger);
    background: var(--danger-soft);
}

.confirm-icon svg {
    width: 20px;
}

.confirm-modal h3 {
    margin: 0 0 7px;
    font-size: 17px;
}

.confirm-modal p {
    margin: 0;
    color: var(--ink-faint);
    font-size: 10px;
}

.confirm-actions {
    display: flex;
    gap: 9px;
    margin-top: 23px;
}

.confirm-actions .button {
    flex: 1;
}

/* Toasts */

.toast-stack {
    position: fixed;
    z-index: 200;
    right: 22px;
    bottom: 22px;
    display: grid;
    gap: 9px;
    width: min(360px, calc(100vw - 30px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    font-size: 11px;
    pointer-events: auto;
    animation: toastIn .32s var(--ease) both;
}

.toast::before {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    content: "";
    background: var(--teal);
    box-shadow: 0 0 0 4px var(--teal-soft);
}

.toast.is-error::before {
    background: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-soft);
}

.toast.is-leaving {
    animation: toastOut .25s ease both;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(18px); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(18px); }
}

.nav-backdrop {
    display: none;
}

/* Responsive */

@media (max-width: 1180px) {
    .hero-card {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero-metrics {
        padding-top: 18px;
        border-top: 1px solid rgba(255, 255, 255, .1);
    }

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

    .recent-grid .media-card:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 960px) {
    :root {
        --sidebar-width: 226px;
    }

    .auth-screen {
        grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr);
    }

    .auth-visual {
        padding-right: 45px;
        padding-left: 45px;
    }

    .visual-collage {
        transform: scale(.86);
        transform-origin: left bottom;
    }

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

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

    .recent-grid .media-card:nth-child(n+3) {
        display: none;
    }

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

    .system-card .settings-card-head {
        grid-row: auto;
        padding-bottom: 18px;
        border-bottom: 1px solid var(--line);
    }

    .system-note {
        grid-column: 1;
    }
}

@media (max-width: 760px) {
    body.has-modal {
        overflow: hidden;
    }

    .auth-screen {
        display: block;
        background:
            radial-gradient(circle at 85% 3%, rgba(91, 91, 214, .1), transparent 34%),
            var(--surface);
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        display: flex;
        min-height: 100svh;
        flex-direction: column;
        justify-content: center;
        padding: 32px 24px;
    }

    .mobile-brand {
        position: absolute;
        top: 28px;
        left: 24px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-brand .brand-symbol {
        width: 32px;
        height: 32px;
        padding: 7px;
        border-color: var(--line);
        background: var(--accent-soft);
    }

    .mobile-brand .brand-symbol i {
        background: var(--accent);
    }

    .mobile-brand strong {
        font-family: var(--font-display);
        font-size: 17px;
        letter-spacing: .05em;
    }

    .auth-form-wrap h2 {
        font-size: 30px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        width: min(280px, 85vw);
        transform: translateX(-105%);
        transition: transform .3s var(--ease);
    }

    body.nav-open .sidebar {
        transform: translateX(0);
    }

    .icon-button.sidebar-close {
        display: grid;
    }

    .nav-backdrop {
        position: fixed;
        z-index: 45;
        inset: 0;
        display: block;
        visibility: hidden;
        background: rgba(8, 13, 24, .55);
        opacity: 0;
        transition: opacity .25s ease, visibility .25s ease;
        backdrop-filter: blur(3px);
    }

    body.nav-open .nav-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .main-content {
        width: 100%;
    }

    .topbar {
        height: 70px;
        padding: 0 18px;
    }

    .mobile-only {
        display: grid;
    }

    .topbar-left h1 {
        font-size: 18px;
    }

    .status-pill,
    .top-upload span {
        display: none;
    }

    .top-upload {
        width: 38px;
        padding: 0;
    }

    .content-wrap {
        padding: 18px 15px 50px;
    }

    .hero-card {
        min-height: 315px;
        padding: 29px 24px;
        border-radius: 19px;
    }

    .hero-copy h2 {
        font-size: 36px;
    }

    .hero-metrics {
        gap: 22px;
    }

    .hero-metrics strong {
        font-size: 20px;
    }

    .upload-card {
        padding: 18px;
    }

    .format-note {
        display: none;
    }

    .dropzone {
        flex-direction: column;
        gap: 13px;
        min-height: 190px;
        padding: 28px 20px;
        text-align: center;
    }

    .dropzone p {
        line-height: 1.7;
    }

    .queue-item {
        grid-template-columns: 36px minmax(80px, 1fr) 46px;
        gap: 10px;
    }

    .queue-thumb {
        width: 36px;
        height: 36px;
    }

    .queue-progress {
        grid-column: 2 / 3;
    }

    .queue-state {
        grid-column: 3;
        grid-row: 1;
    }

    .stats-grid {
        gap: 9px;
    }

    .stat-card {
        display: block;
        padding: 16px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 12px;
    }

    .stat-card strong {
        font-size: 22px;
    }

    .stat-card p {
        font-size: 7px;
    }

    .stat-index {
        font-size: 24px;
    }

    .media-grid,
    .library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .recent-grid .media-card:nth-child(n+3) {
        display: none;
    }

    .media-info {
        padding: 10px;
    }

    .media-name {
        font-size: 10px;
    }

    .media-actions {
        opacity: 1;
        transform: none;
    }

    .media-actions .media-action:not(:first-child) {
        display: none;
    }

    .section-heading h2 {
        font-size: 18px;
    }

    .library-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        padding-top: 0;
    }

    .library-header .button {
        width: 100%;
    }

    .library-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-tabs {
        width: 100%;
    }

    .filter-tabs button {
        flex: 1;
        justify-content: center;
    }

    .search-box {
        min-width: 0;
        flex: 1;
        margin: 0;
    }

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

    .system-card {
        grid-column: 1;
    }

    .settings-card {
        padding: 20px;
    }

    .system-list {
        grid-template-columns: 1fr;
    }

    .file-modal[open] {
        display: block;
        overflow-y: auto;
    }

    .file-modal {
        max-height: calc(100vh - 20px);
    }

    .modal-preview {
        min-height: 250px;
        max-height: 45vh;
    }

    .modal-preview img,
    .modal-preview video {
        max-height: 45vh;
    }

    .modal-details {
        padding: 24px 20px;
    }

    .toast-stack {
        right: 15px;
        bottom: 15px;
    }
}

@media (max-width: 390px) {
    .media-type-badge {
        padding: 0 6px;
    }

    .media-type-badge svg {
        display: none;
    }

    .media-check {
        width: 20px;
        height: 20px;
    }

    .hero-metrics span {
        font-size: 7px;
    }

    .stats-heading {
        margin-top: 26px;
    }
}

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

