/* ===== ROOT ===== */
:root {
    --surface-base: #06060b;
    --surface-0: #0a0a12;
    --surface-1: #10101c;
    --surface-2: #161625;
    --surface-3: #1c1c30;
    --surface-4: #24243a;
    --surface-hover: #2a2a44;
    --accent: #1bd96a;
    --accent-dim: #14b358;
    --accent-glow: rgba(27, 217, 106, 0.15);
    --accent-ghost: rgba(27, 217, 106, 0.06);
    --accent-gradient: linear-gradient(135deg, var(--accent), #0d8c42);
    --success: #00e676;
    --success-glow: rgba(0, 230, 118, 0.12);
    --warning: #ffd600;
    --warning-glow: rgba(255, 214, 0, 0.12);
    --error: #ff1744;
    --error-glow: rgba(255, 23, 68, 0.12);
    --info: #448aff;
    --info-glow: rgba(68, 138, 255, 0.12);
    --text-primary: #e8e8f0;
    --text-secondary: #8888a8;
    --text-tertiary: #55556e;
    --text-disabled: #3a3a50;
    --text-inverse: #06060b;
    --border: rgba(255, 255, 255, 0.06);
    --border-subtle: rgba(255, 255, 255, 0.03);
    --border-accent: rgba(27, 217, 106, 0.25);
    --border-hover: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(27, 217, 106, 0.1);
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body);
    background: var(--surface-base);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--surface-4);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
::selection {
    background: var(--accent);
    color: var(--text-inverse);
}
a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover {
    color: var(--accent-dim);
    text-decoration: underline;
}

#app {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100vh;
    max-width: 100%;
    background: var(--surface-0);
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-1);
    flex-shrink: 0;
    border-radius: 0;
}
.app-header .brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.app-header .brand b {
    color: var(--accent);
    background: var(--accent-glow);
    padding: 0 6px;
    border-radius: var(--radius-sm);
}
.app-header .brand small {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-tertiary);
    background: var(--surface-2);
    padding: 2px 10px;
    border-radius: var(--radius-full);
}
.app-header .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}
.app-header .user-info .username {
    color: var(--text-primary);
    font-weight: 600;
}
.app-header .user-info .role-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--accent-ghost);
    color: var(--accent);
    border: 1px solid var(--border-accent);
}
.app-header .user-info .role-badge.admin {
    background: rgba(68, 138, 255, 0.12);
    color: var(--info);
    border-color: rgba(68, 138, 255, 0.2);
}
.btn-logout {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    font-family: var(--font-body);
}
.btn-logout:hover {
    background: rgba(255, 23, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
    transform: translateY(-1px);
}

.lang-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-lang {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    font-family: var(--font-body);
}
.btn-lang:hover {
    background: var(--surface-2);
    border-color: var(--text-secondary);
}

.api-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    transition: all var(--duration-fast) var(--ease-out);
}
.api-status .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all var(--duration-fast) var(--ease-out);
}
.api-status.online {
    color: var(--success);
    background: var(--success-glow);
    border-color: rgba(0, 230, 118, 0.2);
}
.api-status.online .status-dot {
    background: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
}
.api-status.offline {
    color: var(--error);
    background: var(--error-glow);
    border-color: rgba(255, 23, 68, 0.2);
}
.api-status.offline .status-dot {
    background: var(--error);
    box-shadow: 0 0 8px var(--error-glow);
    animation: pulse-dot 1.5s ease-in-out infinite;
}
.api-status.checking {
    color: var(--warning);
    background: var(--warning-glow);
    border-color: rgba(255, 214, 0, 0.2);
}
.api-status.checking .status-dot {
    background: var(--warning);
    animation: pulse-dot 0.8s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.6);
    }
}

.app-body {
    display: flex;
    flex: 1;
    min-height: 0;
}
.app-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--surface-1);
    border-right: 1px solid var(--border);
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.app-sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    margin: 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    border: none;
    background: transparent;
    width: calc(100% - 16px);
    text-align: left;
    font-family: var(--font-body);
    border-radius: var(--radius-sm);
}
.app-sidebar .nav-item:hover {
    background: var(--accent-ghost);
    color: var(--text-primary);
    transform: translateX(4px);
}
.app-sidebar .nav-item.active {
    color: var(--accent);
    background: var(--accent-ghost);
    box-shadow: inset 0 0 20px var(--accent-glow);
}
.app-sidebar .nav-item .icon {
    font-size: 18px;
    line-height: 1;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.app-sidebar .nav-item .nav-label {
    flex: 1;
}

.app-content {
    flex: 1;
    padding: 32px 36px;
    overflow-y: auto;
    max-height: calc(100vh - 70px);
    background: var(--surface-0);
}

.page {
    display: none;
    animation: fadeIn 0.3s var(--ease-out);
}
.page.active {
    display: block;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.page-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 16px;
}

.card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin-bottom: 20px;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}
.card:hover::before {
    opacity: 1;
}
.card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}
.card-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title .badge {
    font-size: 11px;
    font-weight: 500;
    background: var(--surface-3);
    padding: 2px 12px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    padding: 18px 20px;
    text-align: center;
}
.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    margin-top: 4px;
    color: var(--text-primary);
}
.stat-card .stat-value.warning {
    color: var(--warning);
}
.stat-card .stat-value.info {
    color: var(--info);
}
.quick-action {
    background: var(--surface-2);
    border-color: var(--border-accent);
    text-align: center;
}

.balance-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.balance-display .amount {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 42px;
    color: var(--accent);
    letter-spacing: -0.02em;
    text-shadow: 0 0 30px var(--accent-glow);
}
.balance-display .label {
    font-size: 14px;
    color: var(--text-tertiary);
}
.balance-display .sub {
    font-size: 13px;
    color: var(--text-tertiary);
    background: var(--surface-2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.form-group .hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 6px;
    padding: 6px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}
.form-group .hint code {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    background: var(--surface-3);
    padding: 1px 6px;
    border-radius: 3px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-body);
    transition: all var(--duration-fast) var(--ease-out);
    outline: none;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: var(--surface-3);
}
.form-control:hover:not(:focus) {
    border-color: var(--border-hover);
}
.form-control::placeholder {
    color: var(--text-disabled);
}
.form-control.textarea {
    resize: vertical;
    min-height: 120px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
    tab-size: 4;
}
.form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    background: var(--surface-3);
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}
.btn:hover {
    background: var(--surface-4);
    color: var(--text-primary);
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0px) scale(0.98);
}
.btn-primary {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    font-weight: 700;
    box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-gradient);
    color: var(--text-inverse);
    box-shadow: 0 6px 30px var(--accent-glow);
    transform: translateY(-2px);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.btn-danger {
    background: rgba(255, 23, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(255, 23, 68, 0.2);
}
.btn-danger:hover {
    background: rgba(255, 23, 68, 0.25);
    border-color: var(--error);
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
    background: var(--surface-2);
}
.btn-sm {
    padding: 8px 18px;
    font-size: 12px;
}
.btn-block {
    width: 100%;
    justify-content: center;
}

.auth-container {
    max-width: 420px;
    margin: 40px auto;
    padding: 40px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.4s var(--ease-out);
}
.auth-container .auth-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 28px;
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}
.auth-container .auth-title b {
    color: var(--accent);
    background: var(--accent-glow);
    padding: 0 8px;
    border-radius: var(--radius-sm);
}
.auth-container .auth-sub {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}
.auth-container .auth-toggle {
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 20px;
}
.auth-container .auth-toggle a {
    color: var(--accent);
    cursor: pointer;
    font-weight: 600;
}
.auth-container .auth-toggle a:hover {
    text-decoration: underline;
}
.auth-container .auth-bonus {
    text-align: center;
    font-size: 12px;
    color: var(--text-disabled);
    margin-top: 12px;
    background: var(--surface-2);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    transition: all var(--duration-fast) var(--ease-out);
}
.auth-container .auth-bonus strong {
    color: var(--accent);
}
.auth-container .auth-bonus.highlight {
    border-color: var(--accent);
    background: var(--accent-ghost);
}

.password-toggle {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: color var(--duration-fast) var(--ease-out);
}
.password-toggle:hover {
    color: var(--text-primary);
}
.password-hint {
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-secondary);
}
.password-hint ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.password-hint ul li {
    padding: 2px 0;
    transition: all var(--duration-fast) var(--ease-out);
}
.password-hint ul li.valid {
    color: var(--success);
}
.password-hint ul li.valid::before {
    content: '✅ ';
}
.password-hint ul li.invalid {
    color: var(--error);
}
.password-hint ul li.invalid::before {
    content: '❌ ';
}
.password-hint ul li.warning {
    color: var(--warning);
}
.password-hint ul li.warning::before {
    content: '⚠️ ';
}
.password-hint ul li.done {
    color: var(--text-tertiary);
}
.password-hint ul li.done::before {
    content: '✅ ';
}

.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.table th {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    text-align: left;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}
.table tbody tr:last-child td {
    border-bottom: none;
}
.table tbody tr:hover td {
    background: var(--surface-2);
}
.table .mono {
    font-family: var(--font-mono);
    font-size: 12px;
}
.table .amount-positive {
    color: var(--success);
    font-weight: 600;
}
.table .amount-negative {
    color: var(--error);
    font-weight: 600;
}
.table .type-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: var(--surface-3);
    color: var(--text-secondary);
    display: inline-block;
    white-space: nowrap;
}
.table .type-badge.bonus {
    background: var(--success-glow);
    color: var(--success);
}
.table .type-badge.api {
    background: var(--info-glow);
    color: var(--info);
}
.table .type-badge.admin {
    background: var(--warning-glow);
    color: var(--warning);
}

.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}
.toast {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--surface-1);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    color: var(--text-primary);
    animation: slideUp 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.toast-success {
    border-left: 4px solid var(--success);
}
.toast-error {
    border-left: 4px solid var(--error);
}
.toast-warning {
    border-left: 4px solid var(--warning);
}
.toast-info {
    border-left: 4px solid var(--info);
}
.toast .toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.toast .toast-msg {
    flex: 1;
    line-height: 1.5;
}
.toast .toast-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 18px;
    padding: 0 4px;
    transition: color var(--duration-fast) var(--ease-out);
}
.toast .toast-close:hover {
    color: var(--text-primary);
}

.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.search-bar .form-control {
    flex: 1;
    min-width: 200px;
}
.search-bar .btn {
    flex-shrink: 0;
}

.user-profile-card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 14px;
    transition: all var(--duration-fast) var(--ease-out);
    cursor: pointer;
}
.user-profile-card:hover {
    border-color: var(--border-accent);
    background: var(--surface-3);
    transform: translateX(4px);
}
.user-profile-card .row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.user-profile-card .row .col {
    flex: 1;
    min-width: 130px;
}
.user-profile-card .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    font-weight: 600;
}
.user-profile-card .value {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
    margin-top: 2px;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
}
.admin-tabs .tab {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--duration-fast) var(--ease-out);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-body);
}
.admin-tabs .tab:hover {
    color: var(--text-secondary);
}
.admin-tabs .tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.admin-tab-content {
    display: none;
    animation: fadeIn 0.25s var(--ease-out);
}
.admin-tab-content.active {
    display: block;
}

.hidden {
    display: none !important;
}
.flex {
    display: flex;
}
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gap-8 {
    gap: 8px;
}
.gap-12 {
    gap: 12px;
}
.gap-16 {
    gap: 16px;
}
.items-center {
    align-items: center;
}
.text-accent {
    color: var(--accent);
}
.text-muted {
    color: var(--text-tertiary);
}
.text-sm {
    font-size: 13px;
}
.text-xs {
    font-size: 11px;
}
.text-center {
    text-align: center;
}
.fw-600 {
    font-weight: 600;
}
.fw-700 {
    font-weight: 700;
}
.mt-8 {
    margin-top: 8px;
}
.mt-16 {
    margin-top: 16px;
}
.mb-8 {
    margin-bottom: 8px;
}
.mb-16 {
    margin-bottom: 16px;
}
.mono {
    font-family: var(--font-mono);
}
.w-full {
    width: 100%;
}
.relative {
    position: relative;
}
.overflow-hidden {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .app-content {
        padding: 24px;
    }
}
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    #app {
        min-height: 100vh;
        border-radius: 0;
    }
    .app-header {
        border-radius: 0;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .app-header .brand {
        font-size: 17px;
    }
    .app-header .brand small {
        font-size: 10px;
        padding: 1px 8px;
    }
    .app-header .user-info {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 12px;
        width: 100%;
    }
    .app-body {
        flex-direction: column;
    }
    .app-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px 8px;
        border-right: none;
        border-bottom: 1px solid var(--border);
        gap: 2px;
        overflow-x: auto;
    }
    .app-sidebar .nav-item {
        padding: 8px 14px;
        font-size: 12px;
        width: auto;
        margin: 0;
        border-radius: var(--radius-sm);
    }
    .app-sidebar .nav-item.active {
        border-bottom: 2px solid var(--accent);
    }
    .app-sidebar .nav-item:hover {
        transform: none;
    }
    .app-content {
        padding: 16px;
        max-height: none;
        overflow-y: visible;
    }
    .page-title {
        font-size: 20px;
    }
    .balance-display .amount {
        font-size: 30px;
    }
    .auth-container {
        margin: 20px auto;
        padding: 24px 20px;
    }
    .auth-container .auth-title {
        font-size: 22px;
    }
    .toast-container {
        bottom: 12px;
        right: 12px;
        max-width: calc(100% - 24px);
    }
    .card {
        padding: 16px;
    }
    .table th,
    .table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .user-profile-card .row {
        gap: 12px;
    }
    .user-profile-card .row .col {
        min-width: 100px;
    }
    .admin-tabs .tab {
        padding: 8px 14px;
        font-size: 12px;
    }
    .search-bar {
        flex-direction: column;
    }
    .search-bar .form-control {
        min-width: unset;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .app-content {
        padding: 12px;
    }
    .balance-display .amount {
        font-size: 24px;
    }
    .card {
        padding: 12px;
    }
    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    .btn-sm {
        padding: 6px 12px;
        font-size: 11px;
    }
}