/* ===== CSS Variables & Reset ===== */
:root {
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-light: #d1fae5;

    --bg-body: #f0f2f5;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.85);

    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;

    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --sidebar-width: 280px;
    --header-height: 56px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-body: #0f1117;
    --bg-sidebar: #1a1d27;
    --bg-card: #1a1d27;
    --bg-header: rgba(15, 17, 23, 0.9);

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border-color: #2d3140;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);

    --primary-light: #064e3b;
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

/* ===== Header ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 100%;
}

.header-logo img {
    height: 40px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Theme Toggle — pill switch */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 10px 3px 3px;
    background: #d1d5db;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
    line-height: 1;
}

[data-theme="dark"] .theme-toggle {
    background: #374151;
}

.theme-toggle:hover {
    background: #9ca3af;
}

[data-theme="dark"] .theme-toggle:hover {
    background: #4b5563;
}

/* Thumb — the sliding circle */
.theme-toggle-thumb {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle-thumb {
    background: #1f2937;
    box-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* Label text */
.theme-toggle-label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    transition: color 0.2s;
}

[data-theme="dark"] .theme-toggle-label {
    color: #d1d5db;
}

/* Login Button */
.btn-login {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    padding: 8px;
    color: var(--text-primary);
    font-size: 24px;
}

/* ===== Layout ===== */
.layout {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    padding: 0 20px;
    min-height: calc(100vh - var(--header-height));
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    padding: 20px 0;
    padding-right: 20px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* Sidebar Buttons */
.sidebar-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.sidebar-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.sidebar-btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.sidebar-btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Accordion Menu */
.menu-section {
    margin-bottom: 4px;
}

.menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    border-radius: var(--radius-sm);
}

.menu-header:hover {
    background: var(--primary-light);
}

.menu-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.menu-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    flex: 1;
}

.menu-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.menu-section.open .menu-arrow {
    transform: rotate(180deg);
}

.menu-items {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.menu-section.open .menu-items {
    max-height: 500px;
}

.menu-item {
    display: block;
    padding: 7px 8px 7px 38px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.menu-item:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 20px 0;
}

/* Page Title */
.page-title-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title .dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.page-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.btn-download-top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-download-top:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* ===== Hero Slider ===== */
.hero-slider {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    aspect-ratio: 16 / 8;
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.slider-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 12px;
}

.slider-next {
    right: 12px;
}

.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

/* ===== News Section ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.section-header .dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.news-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s;
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.news-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-body {
    padding: 14px;
}

.news-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.news-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
    line-height: 1.5;
}

.news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-card-date {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge-event {
    background: #dcfce7;
    color: #16a34a;
}

[data-theme="dark"] .badge-event {
    background: #14532d;
    color: #4ade80;
}

.badge-hot {
    background: #fee2e2;
    color: #ef4444;
}

[data-theme="dark"] .badge-hot {
    background: #7f1d1d;
    color: #fca5a5;
}

/* Load More */
.load-more {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    transition: all 0.2s;
}

.btn-load-more:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.footer a {
    color: var(--primary);
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
}

/* ===== Mobile Overlay Menu ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
}

.mobile-overlay.active {
    display: block;
}

.mobile-overlay-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--bg-sidebar);
    padding: 20px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-overlay.active .mobile-sidebar {
    transform: translateX(0);
}

.mobile-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    background: var(--bg-body);
    border-radius: var(--radius-sm);
}

/* ===== SVG Icons ===== */
.icon {
    display: inline-flex;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

/* ===== User Menu (Header) ===== */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-greeting {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

/* ===== Modal Overlay ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 100%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalIn 0.25s ease;
}

.modal-wide {
    max-width: 680px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
    background: var(--bg-body);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* ===== Form Styles ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-body);
    color: var(--text-primary);
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ===== Alerts ===== */
.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .alert-error {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .alert-success {
    background: #052e16;
    color: #86efac;
    border-color: #14532d;
}

/* ===== Ranking ===== */
.ranking-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.ranking-tab {
    padding: 8px 18px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    background: var(--bg-body);
}

.ranking-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ranking-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ranking-content {
    max-height: 400px;
    overflow-y: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ranking-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--bg-body);
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
}

.ranking-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.ranking-table tr:hover td {
    background: var(--primary-light);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
}

.rank-1 {
    background: #fbbf24;
    color: #78350f;
}

.rank-2 {
    background: #d1d5db;
    color: #374151;
}

.rank-3 {
    background: #d97706;
    color: #fff;
}

.loading-text {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Profile Card ===== */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.profile-stat {
    background: var(--bg-body);
    padding: 14px;
    border-radius: var(--radius-md);
    text-align: center;
}

.profile-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.profile-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.player-card {
    background: var(--bg-body);
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-name {
    font-weight: 600;
    color: var(--text-primary);
}

.player-info {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .layout {
        padding: 0 12px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .theme-switcher {
        display: none;
    }

    .page-title-area {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .hero-slider {
        aspect-ratio: 16 / 10;
        border-radius: var(--radius-md);
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0 12px;
    }

    .page-title h1 {
        font-size: 18px;
    }

    .btn-login {
        padding: 6px 14px;
        font-size: 13px;
    }
    /* Trên mobile rút gọn nút admin chỉ còn icon ⚙️ để khỏi chiếm chỗ */
    .btn-admin-top { font-size: 0; padding: 6px 10px; }
    .btn-admin-top::before { content: "⚙️"; font-size: 14px; }
    .user-greeting { font-size: 12px; }
}

/* ===== Nap (Deposit) Modal ===== */
.nap-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    background: #f8fafc;
    flex-wrap: wrap;
}

.nap-info-label {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    min-width: 120px;
}

.nap-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    flex: 1;
}

.nap-copy-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
}

.nap-copy-btn:hover {
    background: #10b981;
    color: #fff;
    border-color: #10b981;
}

.nap-step {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    min-width: 0;
}

.nap-step-num {
    width: 26px;
    height: 26px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    display: grid;
    place-items: center;
    margin: 0 auto 6px;
}

.nap-step-txt {
    font-size: 11px;
    color: #374151;
    line-height: 1.4;
}

@media (max-width: 520px) {
    .nap-info-label {
        min-width: 90px;
    }

    #napModal .modal-content {
        padding: 0 !important;
    }

    #napModal [style*="display:flex;gap:20px"] {
        flex-direction: column;
    }

    #napModal [style*="width:150px"] {
        width: 100% !important;
        display: flex;
        align-items: center;
        gap: 12px;
    }
}

/* ===== Auth Modal — Clean White Style ===== */
.auth-modal-redesign {
    padding: 0 !important;
    overflow: hidden;
    border-radius: 16px !important;
    max-width: 480px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18) !important;
}

/* Nút đóng */
.auth-modal-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    color: var(--text-secondary);
    z-index: 10;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.auth-modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

/* Vùng logo — trong suốt hoàn toàn */
.auth-logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 24px 0;
    background: transparent;
}

/* Logo */
.auth-modal-logo-img {
    height: 120px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.20));
    animation: logoEntrance 0.4s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes logoEntrance {
    from {
        transform: scale(0.75) translateY(8px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@media (max-width: 420px) {
    .auth-modal-logo-img {
        height: 80px;
    }
}

/* ---- Tabs ---- */
.auth-tabs-wrap {
    background: var(--bg-card);
    padding: 14px 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.auth-tabs {
    display: flex;
    position: relative;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

[data-theme="dark"] .auth-tabs {
    background: rgba(255, 255, 255, 0.06);
}

.auth-tab {
    flex: 1;
    padding: 9px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.auth-tab.active {
    color: var(--primary);
    font-weight: 700;
}

.auth-tab-slider {
    position: absolute;
    top: 3px;
    height: calc(100% - 6px);
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
    transition: left 0.25s cubic-bezier(.34, 1.56, .64, 1), width 0.25s ease;
    z-index: 0;
    pointer-events: none;
}

/* ---- Form panel ---- */
.auth-panel {
    padding: 18px 24px 22px;
    background: var(--bg-card);
}

/* ---- Alerts ---- */
.auth-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    font-weight: 500;
}

.auth-alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

[data-theme="dark"] .auth-alert-error {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

.auth-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .auth-alert-success {
    background: #052e16;
    color: #86efac;
    border-color: #14532d;
}

/* ---- Field ---- */
.auth-field {
    margin-bottom: 14px;
    flex: 1;
    min-width: 0;
}

.auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-label-hint {
    font-weight: 400;
    color: var(--text-muted);
}

/* 2-column row */
.auth-fields-row {
    display: flex;
    gap: 12px;
}

/* Input with icon */
.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: #adb5bd;
    pointer-events: none;
    flex-shrink: 0;
}

.auth-input {
    width: 100%;
    padding: 10px 12px 10px 36px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-body);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

[data-theme="dark"] .auth-input {
    border-color: var(--border-color);
}

.auth-input-pw {
    padding-right: 40px;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* Toggle password */
.auth-pw-toggle {
    position: absolute;
    right: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    cursor: pointer;
    transition: color 0.15s;
}

.auth-pw-toggle svg {
    width: 16px;
    height: 16px;
}

.auth-pw-toggle.active,
.auth-pw-toggle:hover {
    color: var(--primary);
}

/* OTP generator button — sits inside the phone input row */
.auth-input-otp-with-btn { padding-right: 96px; }

.auth-otp-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 30px;
    padding: 0 12px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s, filter .15s;
    white-space: nowrap;
}
.auth-otp-btn:disabled {
    background: #475569;
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: .7;
}
.auth-otp-btn:not(:disabled):hover { filter: brightness(1.1); }
.auth-otp-btn.is-loading { opacity: .7; cursor: progress; }

.auth-otp-hint {
    margin: 6px 2px 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}
.auth-otp-hint.success { color: #10b981; }
.auth-otp-hint.error   { color: #ef4444; }

/* Quên MK link */
.auth-forgot-link {
    text-align: right;
    margin-top: -6px;
    margin-bottom: 14px;
    font-size: 12px;
}

.auth-forgot-link a {
    color: #6b7280;
    transition: color 0.15s;
}

.auth-forgot-link a:hover {
    color: var(--primary);
}

/* Forgot desc */
.auth-forgot-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--primary-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

/* ---- Submit button (giống ảnh mẫu: không full-width, align right) ---- */
.auth-btn-submit {
    padding: 10px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    float: right;
    margin-top: 6px;
    letter-spacing: 0.01em;
}

.auth-btn-submit::after {
    content: '';
    display: table;
    clear: both;
}

.auth-btn-submit svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.auth-btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.auth-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Variant: quên mật khẩu — vẫn giống nhưng màu xanh */
.auth-btn-warning {
    background: var(--primary);
}

.auth-btn-warning:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

/* Clearfix cho float button */
.auth-panel form::after {
    content: '';
    display: table;
    clear: both;
}

/* Switch link */
.auth-switch-text {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    clear: both;
}

.auth-switch-text a {
    color: var(--primary);
    font-weight: 600;
}

.auth-switch-text a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 420px) {
    .auth-fields-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-panel {
        padding: 14px 14px 18px;
    }

    .auth-tabs-wrap {
        padding: 10px 12px 0;
    }

    .auth-logo-area {
        padding: 16px 16px 0;
    }
}

/* ===== Deposit QR System ===== */
.deposit-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
    padding: 0 20px;
}

.deposit-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.deposit-step-dot span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    transition: all 0.3s;
}

.deposit-step-dot small {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.3s;
}

.deposit-step-dot.active span {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.deposit-step-dot.active small {
    color: #10b981;
}

.deposit-step-dot.completed span {
    background: #10b981;
    color: #fff;
}

.deposit-step-line {
    flex: 1;
    height: 3px;
    background: #e5e7eb;
    margin: 0 8px;
    margin-bottom: 18px;
    border-radius: 2px;
    transition: background 0.3s;
    min-width: 30px;
}

.deposit-step-line.active {
    background: #10b981;
}

.deposit-amount-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.deposit-amount-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.deposit-amount-btn:hover {
    border-color: #10b981;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.deposit-amount-btn.active {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

.deposit-amount-btn.active::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 12px;
    color: #10b981;
    font-weight: 700;
}

.deposit-amount-value {
    font-size: 15px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: 0.02em;
}

.deposit-amount-btn.active .deposit-amount-value {
    color: #065f46;
}

.deposit-amount-unit {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.deposit-amount-btn.active .deposit-amount-unit {
    color: #10b981;
}

@media (max-width: 520px) {
    .deposit-amount-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .deposit-amount-btn {
        padding: 10px 6px;
    }

    .deposit-amount-value {
        font-size: 13px;
    }

    #depositStep2 > div:first-child {
        flex-direction: column;
    }

    #depositStep2 > div:first-child > div:first-child {
        width: 100% !important;
    }

    .deposit-steps-indicator {
        padding: 0;
    }

    .deposit-step-dot small {
        font-size: 9px;
    }

    .deposit-step-line {
        min-width: 20px;
    }
}