:root {
    --font: Tahoma, Arial, "Segoe UI", sans-serif;
    --bg: #080d18;
    --bg-soft: #0d1422;
    --surface: #101927;
    --surface-2: #141f30;
    --surface-3: #182537;
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.24);
    --text: #eef4ff;
    --muted: #92a1b6;
    --muted-2: #6f8098;
    --primary: #7657ff;
    --primary-2: #9078ff;
    --primary-soft: rgba(118, 87, 255, 0.15);
    --green: #27d58a;
    --green-soft: rgba(39, 213, 138, 0.14);
    --red: #ff6b6b;
    --red-soft: rgba(255, 107, 107, 0.14);
    --blue: #5c9cff;
    --blue-soft: rgba(92, 156, 255, 0.14);
    --orange: #f5b84b;
    --orange-soft: rgba(245, 184, 75, 0.14);
    --shadow: 0 20px 55px rgba(0, 0, 0, 0.22);
    --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.14);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --sidebar-width: 268px;
    --topbar-height: 86px;
    color-scheme: dark;
}

html[data-theme="light"] {
    --bg: #f4f7fb;
    --bg-soft: #edf2f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #eef3f9;
    --border: rgba(15, 23, 42, 0.09);
    --border-strong: rgba(15, 23, 42, 0.16);
    --text: #162033;
    --muted: #66758a;
    --muted-2: #8693a5;
    --primary-soft: rgba(118, 87, 255, 0.10);
    --green-soft: rgba(39, 213, 138, 0.10);
    --red-soft: rgba(255, 107, 107, 0.10);
    --blue-soft: rgba(92, 156, 255, 0.10);
    --orange-soft: rgba(245, 184, 75, 0.12);
    --shadow: 0 20px 50px rgba(51, 65, 85, 0.10);
    --shadow-soft: 0 12px 28px rgba(51, 65, 85, 0.08);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    color: inherit;
}

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

svg {
    display: block;
}

.icon {
    flex: 0 0 auto;
    fill: currentColor;
}

::selection {
    background: var(--primary);
    color: #fff;
}

/* Authentication */
.auth-page {
    overflow-x: hidden;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(430px, 0.85fr);
}

.auth-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 44px clamp(40px, 6vw, 90px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
    background:
        radial-gradient(circle at 25% 20%, rgba(118, 87, 255, 0.20), transparent 34%),
        radial-gradient(circle at 78% 70%, rgba(39, 213, 138, 0.13), transparent 30%),
        linear-gradient(145deg, #080d1a 0%, #10152e 52%, #0a1220 100%);
}

html[data-theme="light"] .auth-visual {
    background:
        radial-gradient(circle at 25% 20%, rgba(118, 87, 255, 0.18), transparent 34%),
        radial-gradient(circle at 78% 70%, rgba(39, 213, 138, 0.15), transparent 30%),
        linear-gradient(145deg, #151a35 0%, #22204d 52%, #101a2d 100%);
    color: #fff;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.2;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 90%);
}

.auth-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.22;
    z-index: -1;
}

.auth-glow-one {
    top: 12%;
    left: 10%;
    background: var(--primary);
}

.auth-glow-two {
    right: 5%;
    bottom: 8%;
    background: var(--green);
}

.brand-lockup,
.mobile-brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-weight: 800;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #4932c9);
    box-shadow: 0 12px 28px rgba(118, 87, 255, 0.3);
}

.brand-lockup strong,
.mobile-brand strong,
.sidebar-brand strong {
    display: block;
    font-size: 17px;
}

.brand-lockup small,
.mobile-brand small,
.sidebar-brand small {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.mobile-brand small,
.sidebar-brand small {
    color: var(--muted);
}

.visual-card {
    width: min(620px, 90%);
    margin: 15px auto;
    padding: 24px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
    transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
}

.visual-card-head,
.visual-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.visual-card-head {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
}

.status-dot {
    padding: 7px 11px;
    border-radius: 999px;
    color: #7ff0bb;
    background: rgba(39, 213, 138, 0.12);
    border: 1px solid rgba(39, 213, 138, 0.18);
}

.mini-chart {
    height: 180px;
    margin: 26px 0 20px;
    padding: 18px 18px 0;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    border-radius: 18px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 100% 33.33%;
}

.mini-chart span {
    flex: 1;
    min-width: 14px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #9e8aff, #6545f4);
    box-shadow: 0 0 24px rgba(118, 87, 255, 0.28);
}

.mini-chart span:nth-child(2n) {
    background: linear-gradient(180deg, #5ce6ad, #1cae70);
    box-shadow: 0 0 24px rgba(39, 213, 138, 0.20);
}

.visual-stats div {
    flex: 1;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
}

.visual-stats small,
.visual-stats strong {
    display: block;
}

.visual-stats small {
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 7px;
}

.visual-stats strong {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
}

.visual-copy {
    max-width: 670px;
}

.eyebrow {
    display: inline-block;
    color: var(--primary-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.auth-visual .eyebrow {
    color: #9f8cff;
}

.visual-copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.35;
    color: #fff;
}

.visual-copy p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.9;
    font-size: 15px;
}

.auth-panel {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 48px clamp(28px, 5vw, 74px);
    background: var(--surface);
}

.auth-theme-toggle {
    position: absolute;
    top: 28px;
    left: 28px;
}

.auth-form-wrap {
    width: min(100%, 430px);
}

.mobile-brand {
    display: none;
    margin-bottom: 32px;
}

.auth-heading {
    margin-bottom: 28px;
}

.auth-heading h2 {
    margin: 8px 0 10px;
    font-size: 34px;
}

.auth-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.auth-form,
.settings-form {
    display: grid;
    gap: 18px;
}

.field-group {
    display: grid;
    gap: 9px;
}

.field-group > span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.input-shell {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--muted);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.input-shell:focus-within {
    border-color: rgba(118, 87, 255, 0.75);
    box-shadow: 0 0 0 4px rgba(118, 87, 255, 0.10);
    transform: translateY(-1px);
}

.input-shell input {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.input-shell input::placeholder {
    color: var(--muted-2);
}

.input-disabled {
    opacity: 0.68;
}

.password-toggle {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--text);
    background: var(--surface-3);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.check-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fake-check {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: transparent;
    background: var(--surface-2);
    transition: all 0.2s ease;
}

.check-row input:checked + .fake-check {
    color: #fff;
    border-color: var(--primary);
    background: var(--primary);
}

.btn {
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
}

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #5d3ee0);
    box-shadow: 0 12px 26px rgba(118, 87, 255, 0.24);
}

.btn-secondary {
    color: var(--text);
    border: 1px solid var(--border-strong);
    background: var(--surface-3);
}

.btn-block {
    width: 100%;
    min-height: 54px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 14px;
    margin-bottom: 18px;
    border-radius: 13px;
    line-height: 1.6;
    font-size: 13px;
}

.alert-danger {
    color: #ffb4b4;
    border: 1px solid rgba(255, 107, 107, 0.22);
    background: var(--red-soft);
}

html[data-theme="light"] .alert-danger {
    color: #ad3030;
}

.alert-success {
    color: #8ff0c2;
    border: 1px solid rgba(39, 213, 138, 0.22);
    background: var(--green-soft);
}

html[data-theme="light"] .alert-success {
    color: #13774a;
}

.auth-footer {
    margin: 28px 0 0;
    text-align: center;
    color: var(--muted-2);
    font-size: 11px;
}

/* Main app */
.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    width: var(--sidebar-width);
    padding: 20px 14px 16px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    background: var(--surface);
    box-shadow: -12px 0 34px rgba(0, 0, 0, 0.08);
}

.sidebar-brand {
    min-height: 66px;
    padding: 0 8px 18px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 19px;
}

.brand-text {
    min-width: 0;
}

.sidebar-close {
    display: none;
    margin-right: auto;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 24px;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px 2px;
    scrollbar-width: thin;
}

.nav-section-title {
    display: block;
    padding: 0 12px 9px;
    color: var(--muted-2);
    font-size: 10px;
    font-weight: 700;
}

.nav-item {
    width: 100%;
    min-height: 46px;
    margin-bottom: 5px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--muted);
    background: transparent;
    text-align: right;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-item:hover {
    color: var(--text);
    background: var(--surface-2);
    transform: translateX(-2px);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(118, 87, 255, 0.95), rgba(93, 62, 224, 0.92));
    box-shadow: 0 10px 22px rgba(118, 87, 255, 0.18);
}

.nav-icon {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: currentColor;
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.12);
}

.nav-item small {
    margin-right: auto;
    padding: 4px 7px;
    border-radius: 999px;
    color: var(--muted-2);
    background: var(--surface-3);
    font-size: 9px;
}

.nav-item-disabled {
    opacity: 0.76;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 7px 2px;
    border-top: 1px solid var(--border);
}

.sidebar-user {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user div,
.topbar-profile > span:last-child {
    min-width: 0;
}

.sidebar-user strong,
.sidebar-user small,
.topbar-profile strong,
.topbar-profile small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong,
.topbar-profile strong {
    font-size: 12px;
}

.sidebar-user small,
.topbar-profile small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #4e74d7, var(--primary));
    box-shadow: 0 8px 20px rgba(78, 116, 215, 0.18);
}

.avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 13px;
}

.avatar-large {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    font-size: 28px;
}

.icon-button,
.theme-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: var(--surface-2);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-button:hover,
.theme-toggle:hover {
    color: var(--text);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    background: var(--surface-3);
}

.logout-button {
    color: var(--red);
}

.theme-toggle {
    position: relative;
}

.theme-icon-sun,
.theme-icon-moon {
    position: absolute;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

html[data-theme="dark"] .theme-icon-sun,
html[data-theme="light"] .theme-icon-moon {
    opacity: 1;
    transform: scale(1) rotate(0);
}

html[data-theme="dark"] .theme-icon-moon,
html[data-theme="light"] .theme-icon-sun {
    opacity: 0;
    transform: scale(0.6) rotate(45deg);
}

.main-area {
    min-height: 100vh;
    margin-right: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    min-height: var(--topbar-height);
    padding: 16px clamp(20px, 3vw, 38px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: blur(18px);
}

@supports not (background: color-mix(in srgb, black 50%, white)) {
    .topbar {
        background: var(--bg);
    }
}

.topbar-start,
.topbar-actions,
.topbar-profile {
    display: flex;
    align-items: center;
}

.topbar-start,
.topbar-actions {
    gap: 12px;
}

.topbar h1 {
    margin: 3px 0 0;
    font-size: 20px;
}

.topbar-kicker {
    color: var(--muted);
    font-size: 10px;
}

.topbar-profile {
    gap: 9px;
    padding: 4px 5px 4px 10px;
    border: 1px solid transparent;
    border-radius: 14px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.topbar-profile:hover {
    border-color: var(--border);
    background: var(--surface-2);
}

.mobile-menu-button {
    display: none;
}

.page-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px clamp(18px, 3vw, 38px) 36px;
}

.page-alert {
    margin-bottom: 20px;
}

.welcome-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border: 1px solid rgba(118, 87, 255, 0.18);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 8% 12%, rgba(118, 87, 255, 0.20), transparent 36%),
        linear-gradient(135deg, var(--surface), var(--surface-2));
    box-shadow: var(--shadow-soft);
}

.welcome-card::after {
    content: "";
    position: absolute;
    left: -70px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(39, 213, 138, 0.07);
    filter: blur(12px);
}

.welcome-card h2 {
    margin: 8px 0 9px;
    font-size: clamp(22px, 3vw, 30px);
}

.welcome-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 13px;
}

.welcome-balance {
    position: relative;
    z-index: 1;
    min-width: 280px;
    padding: 19px 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
}

html[data-theme="light"] .welcome-balance {
    background: rgba(255, 255, 255, 0.72);
}

.welcome-balance small,
.welcome-balance strong,
.welcome-balance span {
    display: block;
}

.welcome-balance small {
    color: var(--muted);
    font-size: 11px;
}

.welcome-balance strong {
    margin: 8px 0;
    color: var(--green);
    font-size: 29px;
}

.balance-hint {
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--green);
    background: var(--green-soft);
    font-size: 10px;
}

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

.stat-card {
    min-height: 148px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

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

.stat-card span {
    color: var(--muted);
    font-size: 11px;
}

.stat-card strong {
    margin: 10px 0 8px;
    font-size: clamp(18px, 2vw, 24px);
    white-space: nowrap;
}

.stat-card small {
    color: var(--muted-2);
    line-height: 1.55;
    font-size: 9px;
}

.stat-blue .stat-icon { color: var(--blue); background: var(--blue-soft); }
.stat-red .stat-icon { color: var(--red); background: var(--red-soft); }
.stat-green .stat-icon { color: var(--green); background: var(--green-soft); }
.stat-purple .stat-icon { color: var(--primary-2); background: var(--primary-soft); }
.stat-blue strong { color: var(--blue); }
.stat-red strong { color: var(--red); }
.stat-green strong { color: var(--green); }
.stat-purple strong { color: var(--primary-2); }

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

.mini-stat {
    min-height: 82px;
    padding: 15px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
}

.mini-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.mini-stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.mini-stat-icon.green { color: var(--green); background: var(--green-soft); }
.mini-stat-icon.red { color: var(--red); background: var(--red-soft); }
.mini-stat-icon.purple { color: var(--primary-2); background: var(--primary-soft); }

.mini-stat small,
.mini-stat strong {
    display: block;
}

.mini-stat small {
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 10px;
}

.mini-stat strong {
    font-size: 17px;
}

.coming-next {
    border-style: dashed;
    background: linear-gradient(135deg, var(--surface), var(--primary-soft));
}

.dashboard-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 20px;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.panel-header {
    min-height: 78px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--border);
}

.panel-header h3 {
    margin: 5px 0 0;
    font-size: 17px;
}

.panel-badge,
.text-link {
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--primary-2);
    background: var(--primary-soft);
    font-size: 10px;
}

.text-link:hover {
    filter: brightness(1.08);
}

.empty-state {
    min-height: 300px;
    padding: 34px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

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

.empty-icon {
    width: 66px;
    height: 66px;
    margin-bottom: 16px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: var(--primary-2);
    background: var(--primary-soft);
}

.empty-state h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.empty-state p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 12px;
}

.transaction-list,
.partners-list {
    padding: 8px 18px;
}

.transaction-item,
.partner-row {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.transaction-item:last-child,
.partner-row:last-child {
    border-bottom: 0;
}

.transaction-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.transaction-icon.positive { color: var(--green); background: var(--green-soft); }
.transaction-icon.negative { color: var(--red); background: var(--red-soft); }

.transaction-main,
.partner-row > div {
    min-width: 0;
    flex: 1;
}

.transaction-main strong,
.transaction-main small,
.partner-row strong,
.partner-row small {
    display: block;
}

.transaction-main strong,
.partner-row strong {
    font-size: 12px;
}

.transaction-main small,
.partner-row small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.transaction-amount {
    white-space: nowrap;
}

.positive-text { color: var(--green); }
.negative-text { color: var(--red); }

.partner-row > strong:last-child {
    color: var(--blue);
    white-space: nowrap;
}

.next-release-note {
    margin: 8px 18px 18px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 1px dashed rgba(118, 87, 255, 0.28);
    border-radius: 13px;
    color: var(--primary-2);
    background: var(--primary-soft);
}

.next-release-note p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
    font-size: 11px;
}

.next-release-note strong {
    color: var(--primary-2);
}

.app-footer {
    margin-top: auto;
    min-height: 58px;
    padding: 14px clamp(18px, 3vw, 38px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted-2);
    font-size: 10px;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: none;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(3px);
}

.toast {
    position: fixed;
    left: 26px;
    bottom: 26px;
    z-index: 100;
    max-width: min(360px, calc(100vw - 36px));
    padding: 13px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 13px;
    color: var(--text);
    background: var(--surface-3);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    font-size: 12px;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Profile */
.narrow-content {
    max-width: 1220px;
}

.profile-hero {
    min-height: 150px;
    padding: 24px 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    background:
        radial-gradient(circle at 12% 10%, rgba(118, 87, 255, 0.16), transparent 34%),
        var(--surface);
}

.profile-hero h2 {
    margin: 7px 0 7px;
    font-size: 25px;
}

.profile-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.profile-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-panel {
    overflow: hidden;
}

.form-panel .settings-form {
    padding: 22px;
}

.field-help {
    color: var(--muted-2);
    line-height: 1.6;
    font-size: 10px;
}

/* Responsive */
@media (max-width: 1180px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr) minmax(410px, 0.9fr);
    }

    .visual-card {
        width: 100%;
    }

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

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

@media (max-width: 900px) {
    .auth-shell {
        display: block;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100svh;
        padding: 36px 24px;
    }

    .mobile-brand {
        display: flex;
    }

    .sidebar {
        right: auto;
        left: 100%;
        width: min(310px, 88vw);
        border-right: 1px solid var(--border);
        border-left: 0;
        transition: transform 0.25s ease;
    }

    .sidebar.is-open {
        transform: translateX(-100%);
    }

    .sidebar-close,
    .mobile-menu-button {
        display: grid;
    }

    .sidebar-overlay.is-visible {
        display: block;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .main-area {
        margin-right: 0;
    }

    .topbar-profile > span:last-child {
        display: none;
    }

    .topbar-profile {
        padding: 0;
    }

    .welcome-card {
        align-items: stretch;
        flex-direction: column;
    }

    .welcome-balance {
        min-width: 0;
    }
}

@media (max-width: 680px) {
    :root {
        --radius-xl: 19px;
        --radius-lg: 16px;
    }

    .auth-panel {
        align-items: start;
        padding: 28px 18px;
    }

    .auth-theme-toggle {
        top: 22px;
        left: 18px;
    }

    .mobile-brand {
        padding-left: 55px;
    }

    .auth-heading h2 {
        font-size: 28px;
    }

    .topbar {
        min-height: 76px;
        padding: 13px 15px;
    }

    .topbar h1 {
        font-size: 17px;
    }

    .page-content {
        padding: 18px 13px 28px;
    }

    .welcome-card {
        min-height: 0;
        padding: 22px 18px;
    }

    .welcome-card h2 {
        font-size: 21px;
    }

    .welcome-balance strong {
        font-size: 25px;
    }

    .stats-grid,
    .orders-overview,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        min-height: 126px;
    }

    .orders-overview {
        gap: 10px;
    }

    .dashboard-grid {
        gap: 14px;
    }

    .panel-header {
        min-height: 70px;
        padding: 15px;
    }

    .transaction-list,
    .partners-list {
        padding: 6px 13px;
    }

    .transaction-item {
        align-items: flex-start;
        padding: 13px 0;
        flex-wrap: wrap;
    }

    .transaction-amount {
        width: 100%;
        padding-right: 50px;
    }

    .app-footer {
        padding: 14px 15px;
    }

    .profile-hero {
        padding: 20px;
        align-items: flex-start;
    }

    .form-panel .settings-form {
        padding: 17px;
    }

    .toast {
        right: 18px;
        left: 18px;
        bottom: 18px;
    }
}

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