/* ==================== CSS Variables ==================== */
:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --accent: #e94560;
    --accent-hover: #d63851;
    --accent-light: rgba(233, 69, 96, 0.15);
    --text-primary: #eaeaea;
    --text-secondary: #a0a0b0;
    --text-muted: #6c6c80;
    --border-color: #2a2a4a;
    --input-bg: #0d1b36;
    --input-border: #2a2a4a;
    --input-focus: #0f3460;
    --success: #2ecc71;
    --success-bg: rgba(46, 204, 113, 0.15);
    --error: #e74c3c;
    --error-bg: rgba(231, 76, 60, 0.15);
    --warning: #f39c12;
    --warning-bg: rgba(243, 156, 18, 0.15);
    --info: #3498db;
    --info-bg: rgba(52, 152, 219, 0.15);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --transition: all 0.3s ease;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --max-width: 900px;
}

/* ==================== Reset ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== Navigation ==================== */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-brand .brand-icon {
    color: var(--accent);
    font-size: 1.4rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

.nav-links a.active {
    color: var(--accent);
    background-color: var(--accent-light);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.nav-user .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.nav-user .btn-logout {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.nav-user .btn-logout:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-light);
}

/* ==================== Main Content ==================== */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 24px;
    min-height: calc(100vh - 60px);
}

/* ==================== Card ==================== */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title .icon {
    color: var(--accent);
}

/* ==================== Auth Pages ==================== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 60px);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card .card-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

/* ==================== Verification Guide ==================== */
.verify-guide {
    background: rgba(15, 52, 96, 0.5);
    border: 1px solid rgba(233, 69, 96, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}
.guide-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    text-align: center;
}
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.step-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}
.step-content {
    flex: 1;
}
.step-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.step-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.5;
}
.guide-verify-box {
    background: rgba(26, 26, 46, 0.6);
    border-radius: 8px;
    padding: 14px;
    border: 1px dashed rgba(233, 69, 96, 0.3);
}
.guide-verify-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.guide-verify-words {
    min-height: 30px;
}
.verify-code-highlight {
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    user-select: all;
    cursor: pointer;
}
.verify-words-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.verify-word-tag {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid rgba(233, 69, 96, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    user-select: all;
}
.text-warning { color: #f0ad4e; }
.text-error { color: var(--accent); }
.text-info { color: #3498db; }
.text-secondary { color: var(--text-secondary); }
.mt-8 { margin-top: 8px; }

.input-row {
    display: flex;
    gap: 8px;
}
.input-row .form-input {
    flex: 1;
}

.code-timer {
    text-align: center;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.code-expired {
    opacity: 0.4;
    text-decoration: line-through;
}

.random-code-hint {
    text-align: center;
    padding: 8px;
    line-height: 1.8;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}
.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: var(--font-family);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 6px;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--accent);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #1a4a7a;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--accent-light);
}

.btn-success {
    background-color: var(--success);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    background-color: #27ae60;
}

.btn-danger {
    background-color: var(--error);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
    color: #fff;
}
.btn-warning:hover:not(:disabled) {
    background-color: #d68910;
}

.btn-info {
    background-color: #3498db;
    color: #fff;
}
.btn-info:hover:not(:disabled) {
    background-color: #2980b9;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
    border-radius: var(--radius-xs);
}

.btn-block {
    width: 100%;
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ==================== Tables ==================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table td {
    color: var(--text-primary);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.table .user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table .user-cell .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.table .user-cell .user-name {
    font-weight: 500;
}

.table .user-cell .user-uid {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== Status Badges ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 4px;
}

.badge-success {
    background-color: var(--success-bg);
    color: var(--success);
}

.badge-error {
    background-color: var(--error-bg);
    color: var(--error);
}

.badge-warning {
    background-color: var(--warning-bg);
    color: var(--warning);
}

.badge-info {
    background-color: var(--info-bg);
    color: var(--info);
}

.badge-admin {
    background-color: var(--accent-light);
    color: var(--accent);
}

/* ==================== Toggle Switch ==================== */
.toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--input-border);
    border-radius: 26px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background-color: #fff;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==================== Tabs ==================== */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-family: var(--font-family);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================== Toast ==================== */
.toast-container {
    position: fixed;
    top: 72px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    pointer-events: auto;
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 380px;
    min-width: 200px;
    border-left: 4px solid;
}

.toast-success {
    background-color: var(--bg-secondary);
    border-left-color: var(--success);
    color: var(--success);
}

.toast-error {
    background-color: var(--bg-secondary);
    border-left-color: var(--error);
    color: var(--error);
}

.toast-info {
    background-color: var(--bg-secondary);
    border-left-color: var(--info);
    color: var(--info);
}

.toast-warning {
    background-color: var(--bg-secondary);
    border-left-color: var(--warning);
    color: var(--warning);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 0 0 8px;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast.toast-out {
    animation: toastOut 0.3s ease forwards;
}

/* ==================== Loading ==================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 18px;
    height: 18px;
    border-width: 2px;
}

.loading-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination .btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.85rem;
}

.pagination .btn.active {
    background-color: var(--accent);
    color: #fff;
}

.pagination .page-info {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 8px;
}

/* ==================== Stats Cards ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==================== Profile ==================== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    flex-shrink: 0;
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.profile-section {
    margin-top: 32px;
}

.profile-section .card-title {
    font-size: 1.1rem;
}

/* ==================== Search ==================== */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-bar .form-input {
    flex: 1;
}

/* ==================== Code Display ==================== */
.code-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-top: 12px;
}

.code-value {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 2px;
    word-break: break-all;
}

.code-expire {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== Debug Result ==================== */
.debug-result {
    margin-top: 16px;
    padding: 20px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.debug-result h4 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.debug-result .debug-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.debug-result .debug-item .label {
    color: var(--text-muted);
    min-width: 80px;
    flex-shrink: 0;
}

.debug-result .debug-item .value {
    color: var(--text-primary);
    word-break: break-all;
}

.debug-result .debug-item .value.success {
    color: var(--success);
}

.debug-result .debug-item .value.fail {
    color: var(--error);
}

/* ==================== Confirm Dialog ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow);
    animation: scaleIn 0.2s ease;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.modal-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state .empty-text {
    font-size: 0.9rem;
}

/* ==================== Animations ==================== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.4s ease;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
        height: 56px;
    }

    .nav-brand {
        font-size: 1.1rem;
    }

    .nav-links {
        gap: 8px;
    }

    .nav-links a {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .main-content {
        padding: 20px 16px;
    }

    .card {
        padding: 20px;
    }

    .auth-container {
        padding: 16px;
    }

    .auth-card .card-title {
        font-size: 1.3rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-meta {
        justify-content: center;
    }

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

    .tabs {
        gap: 0;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    .search-bar {
        flex-direction: column;
    }

    .code-display {
        flex-direction: column;
        align-items: flex-start;
    }

    .toast-container {
        right: 12px;
        left: 12px;
    }

    .toast {
        max-width: 100%;
    }

    .pagination .btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-user .user-info span:not(.user-avatar) {
        display: none;
    }

    .modal-box {
        padding: 24px;
    }
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==================== Misc ==================== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }
.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; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
