@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6c5ce7;
    --primary-hover: #5a4bd1;
    --primary-light: rgba(108, 92, 231, 0.12);
    --primary-glow: rgba(108, 92, 231, 0.25);
    --accent: #00cec9;
    --accent-light: rgba(0, 206, 201, 0.12);
    --success: #00b894;
    --success-light: rgba(0, 184, 148, 0.12);
    --danger: #ff6b6b;
    --danger-light: rgba(255, 107, 107, 0.12);
    --warning: #fdcb6e;
    --warning-light: rgba(253, 203, 110, 0.12);
    --info: #74b9ff;
    --info-light: rgba(116, 185, 255, 0.12);

    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-card-hover: #fafafa;
    --bg-sidebar: #1a1a2e;
    --bg-sidebar-hover: #25254a;
    --bg-sidebar-active: #6c5ce7;
    --bg-input: #f5f6fa;
    --bg-input-focus: #ffffff;
    --bg-modal: rgba(0, 0, 0, 0.6);
    --bg-table-head: #f8f9fb;
    --bg-table-hover: #f5f6fa;
    --bg-badge: #f0f2f5;

    --text-primary: #1a1a2e;
    --text-secondary: #636e72;
    --text-muted: #b2bec3;
    --text-sidebar: #a0a0c0;
    --text-sidebar-active: #ffffff;
    --text-white: #ffffff;

    --border: #e8ecf1;
    --border-light: #f0f2f5;
    --border-input: #dfe6e9;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    --sidebar-width: 260px;
    --header-height: 60px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #000000;
    --bg-card: #0d0d0d;
    --bg-card-hover: #141414;
    --bg-sidebar: #0a0a0a;
    --bg-sidebar-hover: #1a1a1a;
    --bg-sidebar-active: #6c5ce7;
    --bg-input: #141414;
    --bg-input-focus: #1a1a1a;
    --bg-table-head: #0d0d0d;
    --bg-table-hover: #141414;
    --bg-badge: #1a1a1a;

    --text-primary: #e8e8e8;
    --text-secondary: #888888;
    --text-muted: #555555;
    --text-sidebar: #777777;

    --border: #1a1a1a;
    --border-light: #111111;
    --border-input: #252525;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.page-content {
    animation: fadeIn 0.3s ease;
}

.stat-card {
    animation: fadeInUp 0.4s ease both;
}

.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.15s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.2s;
}

.card {
    animation: fadeInUp 0.35s ease both;
    animation-delay: 0.1s;
}

.auth-card {
    animation: scaleIn 0.4s ease both;
}

.nav-item {
    animation: slideInLeft 0.3s ease both;
}

.nav-item:nth-child(1) {
    animation-delay: 0.03s;
}

.nav-item:nth-child(2) {
    animation-delay: 0.06s;
}

.nav-item:nth-child(3) {
    animation-delay: 0.09s;
}

.nav-item:nth-child(4) {
    animation-delay: 0.12s;
}

.nav-item:nth-child(5) {
    animation-delay: 0.15s;
}

.nav-item:nth-child(6) {
    animation-delay: 0.18s;
}

tbody tr {
    animation: fadeIn 0.25s ease both;
}

tbody tr:nth-child(1) {
    animation-delay: 0.03s;
}

tbody tr:nth-child(2) {
    animation-delay: 0.05s;
}

tbody tr:nth-child(3) {
    animation-delay: 0.07s;
}

tbody tr:nth-child(4) {
    animation-delay: 0.09s;
}

tbody tr:nth-child(5) {
    animation-delay: 0.11s;
}

.period-item {
    animation: fadeInUp 0.35s ease both;
}

.period-item:nth-child(1) {
    animation-delay: 0.05s;
}

.period-item:nth-child(2) {
    animation-delay: 0.1s;
}

.period-item:nth-child(3) {
    animation-delay: 0.15s;
}

.period-item:nth-child(4) {
    animation-delay: 0.2s;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hide {
    opacity: 0;
    visibility: hidden;
}

.loading-screen-logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 20px;
    animation: pulse 1.5s ease infinite;
}

.loading-screen-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
    margin-bottom: 20px;
}

.loading-bar {
    width: 160px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.loading-bar-inner {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, var(--primary), #a29bfe, var(--primary));
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.2s linear infinite, loadingProgress 1.8s ease forwards;
}

@keyframes loadingProgress {
    from {
        width: 10%;
    }

    to {
        width: 100%;
    }
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    padding: 20px;
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.auth-card h1 {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 28px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    margin: 0 auto 20px;
    display: block;
    object-fit: cover;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #00a885;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #ee5a5a;
}

.btn-warning {
    background: var(--warning);
    color: #1a1a2e;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.btn-ghost {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: var(--border);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-header {
    padding: 18px 18px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}

.sidebar-brand {
    font-size: 15px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.sidebar-brand span {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-sidebar);
    margin-top: 1px;
    letter-spacing: 0;
}

.sidebar-nav {
    padding: 10px 10px;
    flex: 1;
}

.nav-section {
    margin-bottom: 6px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.2);
    padding: 10px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-sidebar);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 1px;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: #d0d0d0;
}

.nav-item.active {
    background: var(--bg-sidebar-active);
    color: white;
    font-weight: 600;
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 16px;
    text-align: center;
}

.sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.sidebar-userinfo {
    flex: 1;
    min-width: 0;
}

.sidebar-username {
    font-size: 12px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-userrole {
    font-size: 10px;
    color: var(--text-sidebar);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: var(--bg-input);
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.page-content {
    padding: 20px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 18px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 0 0 0 60px;
    opacity: 0.06;
    background: var(--primary);
}

.stat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px var(--primary-light);
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-icon.purple {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.red {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-icon.blue {
    background: var(--info-light);
    color: var(--info);
}

.stat-icon.orange {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.accent {
    background: var(--accent-light);
    color: var(--accent);
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.period-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.period-item {
    background: var(--bg-card);
    padding: 16px 14px;
    text-align: center;
}

.period-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.period-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.period-revenue {
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
}

@media (max-width: 480px) {
    .period-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .period-value {
        font-size: 18px;
    }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.card-body {
    padding: 18px;
}

.card-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-table-head);
}

th {
    padding: 10px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

tr:hover td {
    background: var(--bg-table-hover);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: #b8860b;
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: var(--bg-input);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 380px;
    animation: toastIn 0.25s ease forwards;
    border-left: 3px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-message {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    padding: 2px;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.chart-container {
    position: relative;
    width: 100%;
    height: 280px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.filter-bar .form-control {
    width: auto;
    min-width: 150px;
    font-size: 12px;
    padding: 8px 12px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 3px;
}

.pagination button {
    padding: 5px 10px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 600;
}

.empty-state p {
    font-size: 13px;
}

.restricted-section {
    position: relative;
    filter: blur(4px);
    pointer-events: none;
    user-select: none;
}

.restricted-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius);
}

.restricted-message {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.two-fa-step {
    display: none;
    opacity: 0;
    transform: translateY(12px);
}

.two-fa-step.active {
    display: block;
    animation: fadeInUp 0.4s ease forwards;
}

#login-step {
    transition: opacity 0.25s ease;
}

#login-step.fade-out {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.verify-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.verify-overlay-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 18px;
    animation: pulse 1.2s ease infinite;
}

.verify-overlay-text {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.verify-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    overflow-x: auto;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.action-group {
    display: flex;
    gap: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.balance-display {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: 6px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
    font-size: 13px;
}

.link:hover {
    color: var(--primary-hover);
}

.key-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .key-value {
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .key-value {
        max-width: 70px;
        font-size: 11px;
    }
}

.copy-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 11px;
    padding: 2px 6px;
    transition: all var(--transition);
    font-weight: 600;
}

.copy-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

.notif-item {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--transition);
}

.notif-item:hover {
    background: var(--bg-table-hover);
}

.notif-item.unread {
    border-left: 3px solid var(--primary);
}

.notif-item h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
}

.notif-item p {
    font-size: 12px;
    color: var(--text-secondary);
}

.notif-item .notif-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}

.theme-toggle-auth {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-8 {
    gap: 8px;
}

.gap-16 {
    gap: 16px;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-md {
    width: 18px;
    height: 18px;
}

@media (max-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .page-content {
        padding: 14px;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control {
        width: 100%;
        min-width: unset;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar {
        padding: 0 14px;
    }

    .modal {
        max-width: 100%;
        margin: 8px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .chart-container {
        height: 200px;
    }

    .action-group {
        flex-wrap: wrap;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    th,
    td {
        padding: 8px 10px;
        font-size: 11px;
    }

    .toast {
        min-width: unset;
        max-width: calc(100vw - 32px);
    }

    .card-body {
        padding: 14px;
    }

    .card-header {
        padding: 12px 14px;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .topbar-right .balance-display {
        font-size: 12px;
        padding: 3px 8px;
    }

    .auth-card {
        padding: 20px;
        max-width: 100%;
    }

    .auth-card h1 {
        font-size: 18px;
    }

    .page-header h2 {
        font-size: 17px;
    }
}