:root {
    color-scheme: dark;
    --bg: #090a0d;
    --bg-deep: #050608;
    --panel: rgba(31, 33, 38, 0.86);
    --panel-strong: rgba(39, 42, 48, 0.96);
    --panel-soft: rgba(255, 255, 255, 0.06);
    --text: #f5f4ef;
    --muted: #b9bbc2;
    --muted-strong: #d7d9df;
    --line: rgba(255, 255, 255, 0.13);
    --line-strong: rgba(255, 255, 255, 0.22);
    --accent: #b99cff;
    --accent-strong: #d7c8ff;
    --teal: #62d6ca;
    --gold: #f1cc75;
    --danger: #ff9f9a;
    --danger-bg: rgba(130, 36, 45, 0.28);
    --success: #aaf0c1;
    --success-bg: rgba(39, 116, 82, 0.24);
    --shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg-deep);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(98, 214, 202, 0.16), transparent 30%),
        radial-gradient(circle at 86% 14%, rgba(185, 156, 255, 0.2), transparent 32%),
        linear-gradient(135deg, #08090d 0%, #14121c 44%, #091114 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    user-select: none;
    animation: pageDrift 18s var(--ease) infinite alternate;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 58px 58px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.76), transparent 78%);
}

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

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3.4rem);
    line-height: 1.02;
    font-weight: 850;
}

h2 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    line-height: 1.25;
}

.kicker {
    margin: 0 0 9px;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.auth-page,
.app-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.app-shell {
    width: min(100%, 1180px);
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    gap: 26px;
    padding-bottom: 24px;
}

.dashboard-hero,
.page-hero {
    display: grid;
    gap: 24px;
    padding: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(24px) saturate(130%);
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 420px);
    align-items: center;
}

.hero-copy {
    color: var(--muted-strong);
    max-width: 58rem;
    line-height: 1.85;
}

.hero-profile {
    display: grid;
    gap: 18px;
    align-items: center;
    justify-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hero-profile div {
    text-align: center;
}

.hero-profile span {
    display: block;
    color: var(--muted);
    font-size: 0.96rem;
    font-weight: 700;
}

.hero-profile strong {
    display: block;
    margin-top: 6px;
    font-size: 1.7rem;
    line-height: 1.1;
}

.avatar-xl {
    width: 88px;
    height: 88px;
    font-size: 2rem;
}

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

.metric-card {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-card strong {
    margin-top: 12px;
    display: block;
    font-size: 1.15rem;
    color: var(--text);
}

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

.workspace-card {
    position: relative;
    display: grid;
    gap: 16px;
    min-height: 240px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 28px 92px rgba(0, 0, 0, 0.22);
    transition: transform 220ms var(--ease), border-color 220ms var(--ease), background-color 220ms var(--ease);
    text-decoration: none;
}

.workspace-card:hover {
    transform: translateY(-3px);
    border-color: rgba(98, 214, 202, 0.25);
    background: rgba(98, 214, 202, 0.05);
}

.workspace-card-primary {
    background: linear-gradient(180deg, rgba(98, 214, 202, 0.16), rgba(185, 156, 255, 0.08));
    border-color: rgba(98, 214, 202, 0.16);
}

.workspace-card-muted {
    background: rgba(255, 255, 255, 0.02);
}

.workspace-card .workspace-icon {
    width: 52px;
    height: 52px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.workspace-card h2 {
    margin: 0;
    font-size: 1.48rem;
    line-height: 1.1;
}

.workspace-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.mini-stats {
    margin: 0;
    display: grid;
    gap: 10px;
}

.mini-stats div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
}

.mini-stats dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mini-stats dd {
    margin: 0;
    font-weight: 800;
    color: var(--text);
}

.page-hero-row {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 11px 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 0.92rem;
    text-decoration: none;
}

.hero-counters {
    display: grid;
    gap: 14px;
}

.hero-counters div {
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
}

.hero-counters dt {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-counters dd {
    margin: 8px 0 0;
    font-weight: 800;
}

.admin-layout,
.split-layout {
    display: grid;
    gap: 22px;
}

.admin-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.form-panel,
.admin-create-panel,
.admin-list-panel,
.info-panel {
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 72px rgba(0, 0, 0, 0.18);
}

.panel-title {
    margin-bottom: 22px;
}

.panel-title .kicker {
    margin-bottom: 8px;
}

.panel-title h2 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.12;
}

.admin-list {
    display: grid;
    gap: 16px;
}

.admin-row {
    display: grid;
    gap: 16px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
}

.admin-row.is-disabled {
    opacity: 0.62;
}

.admin-row-main {
    display: flex;
    gap: 14px;
    align-items: center;
}

.admin-row-main strong {
    font-size: 1rem;
}

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

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

.admin-row-meta dt {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.admin-row-meta dd {
    margin: 6px 0 0;
    font-weight: 800;
}

.admin-row-actions {
    display: grid;
    gap: 12px;
}

.admin-row-actions form {
    margin: 0;
}

.delete-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: flex-end;
    gap: 10px;
}

.confirm-line {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 0.84rem;
}

.confirm-line input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    accent-color: var(--danger);
}

.split-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.info-panel-head {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.info-panel-head .avatar {
    width: 78px;
    height: 78px;
    font-size: 1.6rem;
}

.detail-list {
    display: grid;
    gap: 14px;
}

.detail-list dt {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-list dd {
    margin: 5px 0 0;
    font-weight: 800;
}

.field-wide {
    grid-column: 1 / -1;
}

.form-panel-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr;
}

.form-panel-grid > div,
.form-panel-grid > .field-wide {
    display: grid;
    gap: 8px;
}

.form-panel-grid .field-wide {
    grid-column: 1 / -1;
}

.avatar-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 999px;
    transition: box-shadow 180ms var(--ease), transform 180ms var(--ease);
}

.avatar-picker:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 6px rgba(98, 214, 202, 0.1);
}

.avatar-upload-mark {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #111218;
    background: linear-gradient(135deg, #f1cc75, #62d6ca);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 900;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
}

@media (max-width: 960px) {
    .dashboard-hero,
    .page-hero,
    .admin-layout,
    .split-layout {
        grid-template-columns: 1fr;
    }

    .metric-grid,
    .workspace-grid,
    .hero-counters,
    .admin-row-meta,
    .account-stats {
        grid-template-columns: 1fr;
    }

    .app-page,
    .auth-page {
        padding: 16px;
    }

    .workspace-card {
        min-height: auto;
    }
}

.auth-panel {
    position: relative;
    overflow: hidden;
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px) saturate(140%);
}

.auth-panel::before,
.app-nav::before,
.account-popover::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(98, 214, 202, 0.7), rgba(215, 200, 255, 0.72), transparent);
}

.auth-panel h1 {
    margin-bottom: 24px;
    font-size: 1.95rem;
}

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

label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 760;
}

input {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    font: inherit;
    outline: 0;
    user-select: text;
    transition: background-color 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease), transform 200ms var(--ease);
}

input:hover {
    background: rgba(255, 255, 255, 0.095);
    border-color: var(--line-strong);
}

input:focus {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(98, 214, 202, 0.72);
    box-shadow: 0 0 0 4px rgba(98, 214, 202, 0.13), 0 0 30px rgba(185, 156, 255, 0.12);
    transform: translateY(-1px);
}

input::selection {
    color: #101114;
    background: var(--accent-strong);
}

.field-note {
    margin: -2px 0 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    color: var(--text);
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
    transition: background-color 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease);
}

.button:hover {
    transform: translateY(-2px);
}

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

.button:focus-visible,
summary:focus-visible,
a:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(98, 214, 202, 0.18);
}

.button-primary {
    margin-top: 8px;
    color: #111218;
    background: linear-gradient(135deg, #f1cc75, #b99cff 58%, #62d6ca);
    box-shadow: 0 14px 34px rgba(98, 214, 202, 0.16), 0 12px 32px rgba(185, 156, 255, 0.18);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.075);
    border-color: var(--line);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.11);
    border-color: var(--line-strong);
}

.button-danger {
    color: #ffe9e7;
    background: var(--danger-bg);
    border-color: rgba(255, 159, 154, 0.34);
}

.button-danger:hover {
    background: rgba(152, 43, 52, 0.38);
    border-color: rgba(255, 159, 154, 0.5);
}

.alert {
    margin: 0 0 14px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 8px;
    animation: softReveal 300ms var(--ease) both;
}

.alert p {
    margin: 0;
}

.alert p + p {
    margin-top: 6px;
}

.alert-danger {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: rgba(255, 159, 154, 0.3);
}

.alert-success {
    color: var(--success);
    background: var(--success-bg);
    border-color: rgba(170, 240, 193, 0.28);
}

.app-page {
    padding: 18px;
}

.app-nav {
    position: sticky;
    top: 18px;
    z-index: 10;
    width: min(100%, 1180px);
    min-height: 68px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 10px 12px 10px 14px;
    background: rgba(24, 26, 31, 0.82);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(24px) saturate(145%);
    animation: navDrop 520ms var(--ease) both;
}

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

.brand-mark,
.avatar,
.menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    color: #121318;
    background: linear-gradient(135deg, var(--gold), var(--teal));
    border-radius: 8px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(98, 214, 202, 0.18);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 0.98rem;
    line-height: 1.25;
}

.brand small {
    color: var(--muted);
    font-size: 0.78rem;
}

.account-menu {
    position: relative;
    justify-self: end;
}

.account-menu > summary {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
    transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}

.account-menu > summary::-webkit-details-marker,
.menu-drawer > summary::-webkit-details-marker {
    display: none;
}

.account-menu > summary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.avatar {
    width: 38px;
    height: 38px;
    color: #101114;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.56), transparent 45%),
        linear-gradient(135deg, var(--teal), var(--accent) 58%, var(--gold));
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
}

.avatar-small {
    width: 52px;
    height: 52px;
    font-size: 1rem;
}

.avatar-large {
    width: 54px;
    height: 54px;
    font-size: 1.2rem;
}

.account-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 28px));
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 0;
    background:
        linear-gradient(180deg, rgba(49, 52, 60, 0.98), rgba(31, 33, 39, 0.98)),
        var(--panel-strong);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    box-shadow:
        0 30px 86px rgba(0, 0, 0, 0.56),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(24px) saturate(145%);
    transform-origin: 92% 0;
    animation: menuOpen 210ms var(--ease) both;
}

.account-popover::-webkit-scrollbar {
    width: 10px;
}

.account-popover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.account-popover::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(241, 204, 117, 0.66), rgba(98, 214, 202, 0.58));
    border: 2px solid rgba(31, 33, 39, 0.98);
    border-radius: 999px;
}

.account-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 18px 18px;
    background:
        radial-gradient(circle at 18% 0%, rgba(98, 214, 202, 0.16), transparent 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent);
}

.account-head strong,
.account-head span {
    display: block;
}

.account-head strong {
    font-size: 1rem;
}

.account-head span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.9rem;
}

.account-popover .alert {
    margin: 0 14px 12px;
}

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

.account-stat {
    min-height: 72px;
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.038));
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.account-stat span,
.account-stat strong {
    display: block;
}

.account-stat span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 780;
    text-transform: uppercase;
}

.account-stat strong {
    margin-top: 7px;
    color: var(--text);
    font-size: 0.9rem;
    line-height: 1.25;
}

.menu-section {
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.menu-item,
.menu-drawer > summary {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    color: var(--muted-strong);
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 720;
    text-align: left;
    cursor: pointer;
    transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.menu-item:hover,
.menu-drawer > summary:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
}

.menu-icon {
    width: 26px;
    height: 26px;
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 900;
}

.menu-button {
    appearance: none;
}

.menu-drawer {
    border-top: 1px solid var(--line);
}

.menu-drawer > summary {
    justify-content: space-between;
    min-height: 54px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.018);
}

.menu-drawer > summary::after {
    content: "›";
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 160ms var(--ease);
}

.menu-drawer[open] > summary::after {
    transform: rotate(90deg);
}

.compact-form {
    margin: 0 14px 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.compact-form .button {
    width: 100%;
}

.account-list {
    display: grid;
    gap: 10px;
    padding: 0 14px 16px;
}

.account-row {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.account-row.is-disabled {
    opacity: 0.62;
}

.account-row strong,
.account-row span {
    display: block;
}

.account-row strong {
    font-size: 0.95rem;
}

.account-row span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.84rem;
}

.status-badge {
    width: max-content;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    color: var(--accent-strong);
    background: rgba(185, 156, 255, 0.11);
    border: 1px solid rgba(215, 200, 255, 0.22);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.row-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
}

.row-actions form {
    margin: 0;
}

.row-actions .button {
    width: 100%;
    min-height: 40px;
}

.delete-form {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 8px;
}

.confirm-line {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.78rem;
}

.confirm-line input {
    width: 16px;
    min-height: 16px;
    padding: 0;
    accent-color: var(--danger);
}

.empty-stage {
    width: min(100%, 1180px);
    min-height: calc(100vh - 116px);
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 64px 20px 34px;
    animation: stageIn 700ms var(--ease) 80ms both;
}

.stage-copy {
    text-align: center;
    opacity: 0.88;
}

.stage-copy h1 {
    text-shadow: 0 18px 58px rgba(185, 156, 255, 0.22);
}

@keyframes pageDrift {
    from {
        background-position: 0% 0%, 100% 0%, 0 0;
    }

    to {
        background-position: 10% 8%, 92% 14%, 0 0;
    }
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.985);
    }

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

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes menuOpen {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }

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

@keyframes stageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes softReveal {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .auth-page,
    .app-page {
        padding: 14px;
    }

    .auth-panel {
        padding: 24px;
    }

    .app-nav {
        top: 14px;
        grid-template-columns: 1fr auto;
        gap: 12px;
    }

    .account-popover {
        position: fixed;
        top: 88px;
        right: 14px;
        left: 14px;
        width: auto;
        max-height: calc(100vh - 104px);
    }

    .empty-stage {
        min-height: calc(100vh - 148px);
        padding-top: 42px;
    }

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

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