/* Reset và Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #222;
    line-height: 1.6;
    margin: 0;
    transition: margin-left 0.22s cubic-bezier(.4,2,.6,1);
}

body.sidebar-collapsed { margin-left: 54px !important; }

.container {
    margin: 0 auto !important;
    margin-top: 20px !important;
    max-width: 1200px;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.22s ease;
}

body.has-sidebar .container {
    margin-left: 260px !important;
}

body.sidebar-collapsed .container,
body:not(.has-sidebar) .container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin: 0 auto !important;
    max-width: 1200px;
    width: 100%;
    padding: 0 1rem;
}

body.sidebar-collapsed .container {
    margin: 0 auto !important;
    max-width: 1200px;
    width: 100% !important;
    padding: 0 1rem !important;
    transition: all 0.2s ease-in-out;
}

.admin-section, .stats-grid, .admin-filter, .recharge-table, .admin-table, .bank-admin-container, .bank-list-card, .bank-form-card {
    margin-left: auto;
    margin-right: auto;
}

.stats-grid {
    justify-content: center;
}

@media (max-width: 900px) {
    .sidebar { left: 0; border-radius: 0; }
    .container { margin-left: 0 !important; }
}

/* Success Notification */
.success-notification {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    animation: slideInDown 0.5s ease;
}

.success-notification button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.success-notification button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.logo i {
    font-size: 2rem;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #e74c3c;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #e74c3c;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

.welcome-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.welcome-section p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.intro-benefits {
    list-style: none;
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.intro-benefits li {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: transform 0.3s ease;
}

.intro-benefits li:hover {
    box-shadow: 0 8px 32px #764ba244, 0 0 24px #667eea22;
    transform: translateY(-4px) scale(1.04);
}

.intro-actions {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    border: none;
    cursor: pointer;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ee5a24, #ff6b6b);
}

.cta-btn i {
    font-size: 1.2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Cards */
.analysis-card,
.result-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s, transform 0.3s;
}

.analysis-card:hover,
.result-card:hover {
    transform: translateY(-5px);
}

.analysis-card[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.analysis-card[style*="display: block"] {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h2,
.card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-description {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* Forms */
.analysis-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

/* Input Groups */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    padding-right: 3rem;
}

.generate-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.generate-btn:hover {
    background: #5a6fd8;
    transform: translateY(-50%) scale(1.05);
}

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.analyze-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.analyze-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.result-section {
    margin-top: 2rem;
    animation: slideDown 0.5s ease;
}

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

.result-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-weight: 600;
    color: #555;
}

.result-item .value {
    font-weight: 500;
    color: #333;
}

.result-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.result-badge.tài {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.result-badge.xỉu {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.result-badge.hòa {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.close-result {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-result:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Statistics */
.stats-section {
    margin-top: 3rem;
}

.stats-title {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.stats-grid {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.stat-card {
    flex: 1 1 0;
    min-width: 180px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 2px 12px #667eea10;
    padding: 1.3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    transition: box-shadow 0.18s, transform 0.18s;
    border: 1.5px solid #e1e5f9;
}

.stat-card:hover {
    box-shadow: 0 6px 24px #667eea22;
    transform: translateY(-2px) scale(1.03);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0.7rem;
}

.stat-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #232b3e;
    margin-bottom: 0.2rem;
}

.stat-content p {
    color: #667eea;
    font-weight: 500;
    font-size: 1rem;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: #333;
    font-size: 2rem;
    font-weight: 700;
}

.login-header p {
    color: #666;
    font-size: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.security-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    text-align: center;
    color: #667eea;
    font-size: 0.9rem;
}

.error-message,
.success-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: white;
    text-decoration: none;
}

/* Brand Gradient */
.brand-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .welcome-section h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .history-table {
        overflow-x: auto;
    }
    
    .history-table table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    .analysis-card,
    .profile-card {
        padding: 1rem;
    }
    .welcome-section h1 {
        font-size: 2rem;
    }
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    .intro-benefits {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    .intro-actions {
        margin-top: 1.5rem;
    }
    .cta-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Additional Styles for Enhanced UI */
.profile-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.profile-info h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.role-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.role-badge.user {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.08rem;
}
.detail-row span {
    min-width: 170px;
    font-weight: 500;
    color: #232b3e;
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-row:last-child { border-bottom: none; }
@media (max-width: 600px) {
    .profile-details { gap: 0.2rem; }
    .detail-row { flex-direction: column; align-items: flex-start; gap: 2px; padding: 0.5rem 0; }
    .detail-row span { min-width: unset; }
}

.text-green { color: #28a745; font-weight: 700; }
.text-blue { color: #007bff; font-weight: 700; }

/* Recharge and Admin Styles */
.recharge-form-card, .recharge-history-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.recharge-form h2 { margin-bottom: 1.5rem; }
.recharge-form .form-group { margin-bottom: 1.2rem; }
.recharge-form input, .recharge-form select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.recharge-form input:focus, .recharge-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.recharge-table {
    width: 100%;
    border-collapse: collapse;
}

.recharge-table th, .recharge-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.recharge-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.approved { background: #28a745; color: #fff; }
.status-badge.pending { background: #ffc107; color: #fff; }
.status-badge.rejected { background: #dc3545; color: #fff; }

/* Admin Table */
.admin-table {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.btn-approve, .btn-reject {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-approve { background: #28a745; color: #fff; }
.btn-approve:hover { background: #218838; transform: scale(1.08); }
.btn-reject { background: #dc3545; color: #fff; }
.btn-reject:hover { background: #c82333; transform: scale(1.08); }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .profile-details, .recharge-form-card, .recharge-history-card, .admin-table, .profile-card {
        padding: 1rem;
    }
    
    .profile-header { flex-direction: column; gap: 0.5rem; }
    .avatar { width: 60px; height: 60px; font-size: 2.5rem; }
}

/* Navbar Styles */
.main-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    min-height: 60px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.navbar-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.navbar-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.navbar-user {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-balance {
    font-weight: 600;
    color: #764ba2;
    background: #fff;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.user-btn {
    font-weight: 500;
    color: #764ba2;
    background: #fff;
    border-radius: 8px;
    padding: 0.4rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 900px) {
    .main-navbar {
        flex-wrap: wrap;
        padding: 0 0.5rem;
    }
    .navbar-center {
        order: 2;
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }
    .navbar-user {
        order: 3;
        width: 100%;
        justify-content: flex-end;
        margin-bottom: 0.5rem;
    }
}

.navbar-menu {
    display: flex;
    gap: 1.2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.navbar-logo a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}
.navbar-logo a:hover {
    transform: scale(1.05);
    color: #ffd700;
}
.navbar-logo i {
    font-size: 2.1rem;
    color: #ffd700;
}

.navbar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 500;
    text-decoration: none;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    font-size: 1rem;
    position: relative;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.navbar-menu li a.active, .navbar-menu li a.active-md5 {
    background: #fff;
    color: #764ba2;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.10);
}
.navbar-menu li a:hover {
    background: rgba(255,255,255,0.18);
    color: #ffd700;
    transform: translateY(-2px) scale(1.05);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.user-balance {
    background: #fff;
    color: #667eea;
    font-weight: 600;
    border-radius: 18px;
    padding: 0.4rem 1.1rem 0.4rem 0.9rem;
    box-shadow: 0 2px 12px rgba(102,126,234,0.10);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.08rem;
    transition: box-shadow 0.2s;
}
.user-balance i {
    color: #ffd700;
    font-size: 1.2rem;
}
.user-balance:hover {
    box-shadow: 0 4px 18px rgba(102,126,234,0.18);
}
.user-dropdown {
    position: relative;
}
.user-btn {
    background: #fff;
    color: #232b3e;
    border: none;
    border-radius: 18px;
    padding: 0.45rem 1.2rem 0.45rem 0.9rem;
    font-size: 1.08rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 2px 12px rgba(102,126,234,0.10);
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s;
}
.user-btn i.fa-user-circle {
    color: #667eea;
    font-size: 1.3rem;
}
.user-btn:hover {
    background: #f4f7ff;
    box-shadow: 0 4px 18px rgba(102,126,234,0.18);
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background: #fff;
    min-width: 180px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102,126,234,0.13);
    z-index: 100;
    padding: 0.7rem 0.2rem;
    animation: fadeIn 0.2s;
}
.user-dropdown.open .dropdown-content,
.user-btn:focus + .dropdown-content {
    display: block;
}
.dropdown-content a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: #232b3e;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}
.dropdown-content a:hover {
    background: #f0f4ff;
    color: #667eea;
}
.dropdown-content hr {
    margin: 0.4rem 0;
    border: none;
    border-top: 1px solid #eee;
}
@media (max-width: 600px) {
    .navbar-user { flex-direction: column; gap: 0.5rem; align-items: flex-end; }
    .user-balance, .user-btn { font-size: 0.98rem; padding: 0.4rem 0.8rem; }
    .dropdown-content { min-width: 140px; }
}

/* Main content shift for sidebar */
.container { margin-left: 260px; }
@media (max-width: 900px) {
    .sidebar { width: 60px; }
    .sidebar-logo span, .sidebar-title, .sidebar-balance, .sidebar-user .user-info { display: none; }
    .container { margin-left: 70px; }
}

/* Card ngân hàng, MoMo, hướng dẫn */
.bank-card, .momo-card {
    display: inline-block; background: #fff; border-radius: 16px; box-shadow: 0 2px 12px rgba(102,126,234,0.10);
    padding: 24px 32px; margin: 12px; min-width: 220px; text-align: center; cursor: pointer; transition: box-shadow 0.2s, transform 0.2s;
    border: 2px solid transparent;
}
.bank-card:hover, .momo-card:hover { box-shadow: 0 4px 24px rgba(102,126,234,0.18); border: 2px solid #667eea; transform: translateY(-4px) scale(1.03); }
.bank-card img, .momo-card img { height: 48px; margin-bottom: 10px; }
.bank-card .bank-name, .momo-card .bank-name { font-weight: 600; font-size: 1.1rem; color: #232b3e; }

/* Box hướng dẫn nạp tiền */
.recharge-note-box {
    background: #f8fafc; border-left: 5px solid #667eea; border-radius: 10px; padding: 18px 24px; margin-bottom: 28px; box-shadow: 0 2px 8px rgba(102,126,234,0.06);
}
.recharge-note-box ul { margin: 0 0 0 18px; padding: 0; }
.recharge-note-box li { margin-bottom: 6px; }

/* Popup modal nhập số tiền */
.modal-overlay { position: fixed; top:0; left:0; right:0; bottom:0; background: rgba(0,0,0,0.25); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.modal-box { background: #fff; border-radius: 16px; box-shadow: 0 4px 32px rgba(102,126,234,0.18); padding: 32px 28px; min-width: 340px; max-width: 95vw; text-align: center; }
.modal-box h3 { margin-bottom: 18px; font-size: 1.2rem; font-weight: 600; }
.modal-box input[type=number] { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #e1e5e9; font-size: 1.1rem; margin-bottom: 18px; }
.modal-box .modal-actions { display: flex; gap: 12px; justify-content: flex-end; }
.modal-box button { padding: 8px 18px; border-radius: 8px; border: none; font-size: 1rem; font-weight: 500; cursor: pointer; }
.modal-box .btn-cancel { background: #e1e5e9; color: #232b3e; }
.modal-box .btn-confirm { background: #667eea; color: #fff; }
.modal-box .btn-confirm:disabled { background: #b3b7ee; }

/* Responsive */
@media (max-width: 700px) {
    .container { margin-left: 0 !important; }
    .sidebar { display: none; }
}

/* QR Payment Modern Styles */
.qr-bill-container { margin-left: 0 !important; }
.qr-bill-info, .qr-bill-qr { background: #fff; border-radius: 18px; box-shadow: 0 4px 32px rgba(102,126,234,0.13); }
body.qr-page .container { margin-left: 0 !important; }
body.qr-page .sidebar { display: none !important; }

.copy { color: #67eaff; margin-left: 8px; transition: color 0.2s; }
.copy:hover { color: #28a745; }
@media (max-width: 900px) {
  .qr-bill-container { flex-direction: column; align-items: center; gap: 18px; }
  .qr-bill-info, .qr-bill-qr { max-width: 98vw; min-width: unset; }
}

.qr-bill-info .status { color: #ffc107; font-size: 0.98rem; margin-top: 10px; }
.qr-bill-info .bill-code { color: #dc3545; font-weight: 700; font-size: 1.15rem; }
.qr-bill-info .amount { color: #28a745; font-weight: 700; font-size: 1.15rem; }
.qr-bill-info .bank { font-size: 1.1rem; font-weight: 600; color: #ffd700; }

/* Bảng user admin đẹp */
.admin-user-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(102,126,234,0.10);
    overflow: hidden;
}
.admin-user-table th, .admin-user-table td {
    padding: 14px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
}
.admin-user-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #232b3e;
}
.admin-user-table tr:last-child td {
    border-bottom: none;
}
.admin-user-table tr:hover {
    background: #f3f6fd;
    transition: background 0.2s;
}
.badge-role {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: #667eea;
}
.badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
}
.badge-active { background: #28a745; color: #fff; }
.badge-banned { background: #ffc107; color: #232b3e; }
.btn-lock, .btn-unlock {
    padding: 6px 16px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    background: #e1e5e9;
    color: #232b3e;
    transition: background 0.2s;
}
.btn-lock:hover { background: #dc3545; color: #fff; }
.btn-unlock:hover { background: #28a745; color: #fff; }
@media (max-width: 900px) {
    .admin-user-table th, .admin-user-table td { font-size: 0.95rem; padding: 10px 6px; }
}

/* Thêm preload font Google */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

@media (max-width: 900px) {
    .container { margin-left: 0 !important; }
}
@media (max-width: 700px) {
    .container { margin-left: 0 !important; }
}
@media (max-width: 600px) {
    .container { margin-left: 0 !important; }
}

.analysis-tabs {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2rem;
    padding-left: 0.5rem;
}
.tab-btn {
    background: #fff;
    color: #232b3e;
    border: none;
    border-radius: 999px !important;
    padding: 1rem 2.5rem;
    font-size: 1.12rem;
    font-weight: 700;
    box-shadow: 0 2px 16px rgba(102,126,234,0.10);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s, transform 0.18s;
    outline: none;
    position: relative;
    border: 2px solid transparent;
    overflow: hidden;
    z-index: 1;
}
.tab-btn.active, .tab-btn:focus {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(102,126,234,0.18);
    border-color: #764ba2;
    transform: scale(1.04);
    z-index: 2;
}
.tab-btn.active i, .tab-btn:focus i {
    color: #ffd700;
    filter: drop-shadow(0 2px 6px #fff6);
    transition: color 0.2s, filter 0.2s;
}
.tab-btn i {
    font-size: 1.15em;
    color: #232b3e;
    transition: color 0.2s, filter 0.2s;
}
.tab-btn:hover:not(.active) {
    background: linear-gradient(90deg, #f4f7ff 60%, #e1e5f9 100%);
    color: #667eea;
    box-shadow: 0 4px 18px rgba(102,126,234,0.13);
    border-color: #b3b7ee;
    transform: translateY(-2px) scale(1.03);
}
.tab-btn:active::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, #667eea33 10%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: tab-ripple 0.5s linear;
    z-index: 0;
}
@keyframes tab-ripple {
    from { opacity: 0.5; }
    to { opacity: 0; }
}

/* --- ADMIN PANEL MODERN SAAS STYLE --- */
.admin-section {
  margin-bottom: 2.8rem;
  padding: 0;
  animation: fadeInUp 0.7s cubic-bezier(.23,1.01,.32,1) both;
}
.admin-title {
  margin-bottom: 1.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #232b3e;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  letter-spacing: 0.5px;
  padding-bottom: 0.2rem;
}
.admin-card, .bank-list-card, .bank-form-card {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 2px 18px #667eea13;
  border: 1.5px solid #e1e5f9;
  padding: 2.2rem 1.7rem;
  margin-bottom: 1.7rem;
  transition: box-shadow 0.22s, transform 0.18s;
  animation: fadeInUp 0.7s cubic-bezier(.23,1.01,.32,1) both;
}
.admin-card:hover, .bank-list-card:hover, .bank-form-card:hover {
  box-shadow: 0 8px 32px #667eea22;
  transform: translateY(-3px) scale(1.015);
}
.admin-table, .admin-user-table, .bank-table {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 16px #667eea10;
  background: #fff;
  border: 1.5px solid #e1e5f9;
  animation: fadeInUp 0.7s cubic-bezier(.23,1.01,.32,1) both;
}
.admin-table th, .admin-user-table th, .bank-table th {
  background: #f3f6fd;
  color: #667eea;
  font-weight: 700;
  border: none;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid #e1e5f9;
}
.admin-table tr, .admin-user-table tr, .bank-table tr {
  transition: background 0.18s;
}
.admin-table tr:hover, .admin-user-table tr:hover, .bank-table tr:hover {
  background: #f4f7ff;
}
.admin-btn, .btn-lock, .btn-unlock, .btn-action, .btn-approve, .btn-reject {
  background: #f3f6fd;
  color: #667eea;
  border: 1.5px solid #e1e5f9;
  border-radius: 999px;
  padding: 0.45rem 1.2rem;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, border 0.18s;
  box-shadow: 0 1px 4px #667eea0a;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  outline: none;
}
.admin-btn:hover, .btn-lock:hover, .btn-unlock:hover, .btn-action:hover, .btn-approve:hover, .btn-reject:hover {
  background: #667eea;
  color: #fff;
  border: 1.5px solid #667eea;
  box-shadow: 0 2px 8px #667eea22;
}
.admin-btn i, .btn-lock i, .btn-unlock i, .btn-action i, .btn-approve i, .btn-reject i {
  font-size: 1rem;
  color: inherit;
  transition: color 0.18s;
}
.admin-form, .bank-form-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 2px 16px #667eea10;
  border: 1.5px solid #e1e5f9;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.7s cubic-bezier(.23,1.01,.32,1) both;
}
.admin-form label, .bank-form-card label {
  font-weight: 600;
  color: #667eea;
  margin-bottom: 0.2rem;
}
.admin-form input, .admin-form select, .bank-form-card input, .bank-form-card select {
  border-radius: 999px;
  border: 1.5px solid #e1e5f9;
  padding: 0.8rem 1.1rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: border 0.18s, box-shadow 0.18s;
  background: #f8fafc;
}
.admin-form input:focus, .admin-form select:focus, .bank-form-card input:focus, .bank-form-card select:focus {
  border: 1.5px solid #667eea;
  box-shadow: 0 0 0 2px #667eea22;
}
.success-message, .alert-success {
  animation: fadeInUp 0.6s cubic-bezier(.23,1.01,.32,1) both;
  background: #e6f7ee;
  color: #28a745;
  border: 1px solid #b3e6d1;
}
.error-message, .alert-danger {
  animation: fadeInUp 0.6s cubic-bezier(.23,1.01,.32,1) both;
  background: #fff0f0;
  color: #dc3545;
  border: 1px solid #f5b3b3;
}
@media (max-width: 900px) {
  .container { padding: 1rem 0.2rem; }
  .admin-section, .admin-card, .admin-form, .bank-list-card, .bank-form-card { padding: 0.7rem 0.2rem; border-radius: 12px; }
  .stats-grid { flex-direction: column; gap: 0.7rem; }
}

/* --- UPGRADE INTRO SECTION --- */
.intro-section {
  text-align: center;
  margin: 0 auto 2.5rem auto;
  max-width: 900px;
  padding: 2.5rem 1.2rem 2.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.intro-section h1 {
  margin-bottom: 1.1rem;
}
.intro-lead {
  margin-bottom: 2.1rem;
  font-size: 1.15rem;
  color: #232b3e;
  font-weight: 500;
}
.intro-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  max-width: 820px;
  padding: 0;
}
.intro-benefits li {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 12px #667eea0a;
  padding: 1.5rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1.13rem;
  font-weight: 600;
  color: #232b3e;
  transition: box-shadow 0.18s, transform 0.18s;
  position: relative;
  text-align: left;
}
.intro-benefits li i {
  font-size: 2rem;
  color: #667eea;
  margin-right: 0.7rem;
}
.intro-benefits li:hover {
  box-shadow: 0 8px 32px #764ba244, 0 0 24px #667eea22;
  transform: translateY(-4px) scale(1.04);
}
@media (max-width: 900px) {
  .intro-section { padding: 1.2rem 0.3rem; border-radius: 16px; }
  .intro-benefits { grid-template-columns: 1fr; gap: 0.8rem; }
  .intro-benefits li { font-size: 1rem; padding: 1rem 0.5rem; border-radius: 12px; }
}

/* --- ABOUT/INTRO PREMIUM UPGRADE --- */
@keyframes aboutPulse {
  0% { box-shadow: 0 0 0 0 #667eea33; }
  70% { box-shadow: 0 0 0 12px #667eea00; }
  100% { box-shadow: 0 0 0 0 #667eea00; }
}
@keyframes aboutGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.about-card, .intro-main-card {
  background: #fff;
  border-radius: 32px;
  box-shadow: 0 8px 40px 0 #764ba222, 0 2px 24px #667eea13;
  border: 1.5px solid #e1e5f9;
  max-width: 1100px;
  margin: 3.5rem auto 0 auto;
  padding: 3.2rem 1.5rem 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.8s cubic-bezier(.23,1.01,.32,1) both;
  transition: box-shadow 0.22s, transform 0.18s;
}
.about-card:hover, .intro-main-card:hover {
  box-shadow: 0 16px 64px #764ba244, 0 4px 32px #667eea22;
  transform: translateY(-4px) scale(1.015);
}
.about-title {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 1.3rem;
  letter-spacing: 1.2px;
}
.about-title .about-icon {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 50%;
  width: 3.2rem;
  height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  animation: aboutPulse 1.5s infinite;
  box-shadow: 0 2px 12px #667eea33;
}
.about-title .brand-gradient, .about-title .about-gradient {
  background: linear-gradient(270deg, #667eea, #764ba2, #ffd700, #667eea);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: aboutGradient 3s linear infinite alternate;
}
.about-desc {
  font-size: 1.18rem;
  color: #232b3e;
  margin-bottom: 2.5rem;
  text-align: center;
  font-weight: 500;
  max-width: 600px;
}
.about-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  width: 100%;
  margin-bottom: 2.5rem;
}
.about-benefit {
  background: linear-gradient(120deg, #f3f6fd 80%, #e1e5f9 100%);
  border-radius: 22px;
  padding: 1.5rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  font-size: 1.13rem;
  font-weight: 600;
  color: #232b3e;
  box-shadow: 0 2px 12px #667eea0a;
  border: 1.5px solid #e1e5f9;
  transition: box-shadow 0.18s, transform 0.18s, background 0.18s;
  position: relative;
}
.about-benefit i {
  font-size: 2.1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px #b3b7ee55);
  transition: filter 0.2s, transform 0.2s;
}
.about-benefit:hover {
  background: linear-gradient(120deg, #e1e5f9 60%, #f3f6fd 100%);
  box-shadow: 0 8px 32px #764ba244, 0 0 24px #667eea22;
  transform: translateY(-6px) scale(1.04);
  z-index: 2;
}
.about-benefit:hover i {
  filter: drop-shadow(0 4px 16px #764ba299);
  transform: scale(1.15) rotate(-6deg);
}
.about-guide-card {
  background: #f8fafc;
  border-radius: 18px;
  border: 1.5px solid #e1e5f9;
  padding: 1.5rem 1.3rem 1.2rem 1.3rem;
  width: 100%;
  margin-bottom: 2.3rem;
  box-shadow: 0 1px 8px #667eea0a;
}
.about-guide-title {
  font-size: 1.13rem;
  font-weight: 700;
  color: #232b3e;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.about-guide-title i {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.2rem;
}
.about-guide-list {
  margin: 0 0 0 1.2rem;
  padding: 0;
  color: #232b3e;
  font-size: 1.05rem;
  font-weight: 500;
}
.about-guide-list li {
  margin-bottom: 0.5rem;
  list-style: decimal;
  position: relative;
  padding-left: 0.5rem;
}
.about-guide-list li::marker {
  color: #667eea;
  font-weight: 700;
  font-size: 1.1em;
}
.about-cta-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}
.about-cta-btn {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 1.15rem;
  font-weight: 800;
  padding: 1.2rem 2.8rem;
  box-shadow: 0 4px 24px #667eea22;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.about-cta-btn:hover {
  background: linear-gradient(90deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 8px 32px #764ba244, 0 4px 24px #667eea33;
  transform: translateY(-3px) scale(1.05);
}
.about-cta-btn:active::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, #667eea33 10%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: tab-ripple 0.5s linear;
  z-index: 0;
}
@media (max-width: 900px) {
  .about-card, .intro-main-card { padding: 1.2rem 0.3rem; border-radius: 16px; }
  .about-title { font-size: 1.2rem; }
  .about-benefits { grid-template-columns: 1fr; gap: 0.8rem; }
  .about-benefit { font-size: 1rem; padding: 1rem 0.5rem; border-radius: 12px; }
  .about-guide-card { padding: 0.8rem 0.5rem; border-radius: 12px; }
  .about-cta-btn { font-size: 1rem; padding: 0.8rem 1.2rem; }
}

/* Đảm bảo mọi trang không sidebar đều căn giữa */
body:not(.has-sidebar) .container, body.qr-page .container {
    margin-left: 0 !important;
} 
body:not(.has-sidebar) .container {
    margin: 0 auto !important;
}
.stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Lịch sử phân tích đẹp hơn */
.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(255,255,255,0.95);
    border-radius: 18px;
    box-shadow: 0 4px 32px rgba(102,126,234,0.13);
    overflow: hidden;
    margin: 2rem 0;
    font-size: 1.08rem;
    transition: box-shadow 0.3s;
}
.history-table th, .history-table td {
    padding: 1rem 0.7rem;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}
.history-table th {
    background: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.08rem;
    border: none;
    position: relative;
    z-index: 1;
}
.history-table th:nth-child(1) {
    background: #6c7ae0;
    border-top-left-radius: 16px;
}
.history-table th:nth-child(2) {
    background: #8f5fd7;
}
.history-table th:nth-child(3) {
    background: #7e8ce0;
}
.history-table th:nth-child(4) {
    background: #a084e8;
}
.history-table th:nth-child(5) {
    background: #8f5fd7;
}
.history-table th:nth-child(6) {
    background: #6c7ae0;
    border-top-right-radius: 16px;
}

/* Badge loại Sunwin/MD5 */
.type-badge.sunwin {
    background: #e0f7fa;
    color: #009688;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.3em 1em;
    font-size: 1rem;
}
.type-badge.md5 {
    background: #ede7f6;
    color: #7c4dff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.3em 1em;
    font-size: 1rem;
}
.type-badge i {
    margin-right: 0.3em;
}

/* Badge kết quả */
.result-badge {
    background: #fff;
    color: #7c4dff;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.35em 1.2em;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(102,126,234,0.08);
    text-shadow: none;
    letter-spacing: 1px;
    border: none;
}
.result-badge.thang, .result-badge.win { color: #009688; }
.result-badge.thua, .result-badge.lose { color: #dc3545; }
.result-badge.hoa, .result-badge.draw { color: #a084e8; }

/* Badge MD5 string */
.md5-badge {
    background: #ede7f6;
    color: #7c4dff;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    font-weight: 500;
    font-family: monospace;
    font-size: 0.98rem;
    display: inline-block;
}

/* Bảng bo góc lớn, bóng nhẹ, nền trắng mờ */
.recharge-history-card.history-card {
    background: rgba(245, 245, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 6px 32px rgba(102,126,234,0.10);
    border: 1.5px solid #ede7f6;
    padding: 0;
    margin-bottom: 2rem;
    overflow: hidden;
}

/* Responsive giữ màu header */
@media (max-width: 700px) {
    .history-table th, .history-table td { padding: 0.6rem 0.2rem; font-size: 0.95rem; }
    .history-table { font-size: 0.97rem; }
    .history-table th { font-size: 0.97rem; }
}

/* Card lịch sử hiện đại */
.history-card-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}
.history-analysis-card {
    background: rgba(255,255,255,0.97);
    border-radius: 22px;
    box-shadow: 0 6px 32px rgba(102,126,234,0.10);
    border: 1.5px solid #ede7f6;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
    animation: fadeIn 0.5s;
}
.history-analysis-card:hover {
    box-shadow: 0 12px 40px rgba(102,126,234,0.18);
    transform: translateY(-2px) scale(1.01);
}
.history-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.1rem;
}
.history-card-id {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8f5fd7;
    background: #ede7f6;
    border-radius: 8px;
    padding: 0.2em 0.8em;
    letter-spacing: 1px;
}
.history-card-type {
    font-size: 1rem;
}
.history-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem 2.5rem;
}
.history-card-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.2rem;
}
.history-card-label {
    color: #764ba2;
    font-weight: 600;
    min-width: 110px;
    display: flex;
    align-items: center;
    gap: 0.3em;
    font-size: 1.01rem;
}
.history-card-value {
    font-size: 1.01rem;
    font-weight: 500;
    color: #232b3e;
    word-break: break-all;
}
.history-empty {
    text-align: center;
    color: #aaa;
    font-size: 1.1rem;
    padding: 2.5rem 0;
}
@media (max-width: 900px) {
    .history-analysis-card { padding: 1.1rem 0.7rem; }
    .history-card-body { grid-template-columns: 1fr; gap: 0.5rem 0; }
}

/* Tổng kết lịch sử - summary row */
.history-summary-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 2.2rem 0 1.2rem 0;
    justify-content: flex-start;
}
.history-summary-card {
    background: #f3f6fd;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(102,126,234,0.07);
    padding: 1rem 1.5rem 0.8rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 140px;
    font-size: 1.05rem;
    font-weight: 500;
    position: relative;
    border: 1.5px solid #ede7f6;
    transition: box-shadow 0.2s;
}
.history-summary-card:hover {
    box-shadow: 0 6px 24px rgba(102,126,234,0.13);
}
.summary-icon {
    font-size: 1.25rem;
    color: #8f5fd7;
    margin-right: 0.3em;
    display: flex;
    align-items: center;
}
.summary-label {
    color: #764ba2;
    font-weight: 600;
    margin-right: 0.3em;
}
.summary-value {
    font-size: 1.13rem;
    font-weight: 700;
    margin-left: auto;
}
@media (max-width: 900px) {
    .history-summary-row { gap: 0.7rem; }
    .history-summary-card { padding: 0.7rem 1rem; font-size: 0.98rem; min-width: 110px; }
    .summary-icon { font-size: 1.1rem; }
    .summary-value { font-size: 1.01rem; }
}

/* Hamburger menu styles */
.navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1201;
    margin-left: 10px;
}
.navbar-toggle .bar {
    width: 26px;
    height: 3px;
    background: #667eea;
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
}
.navbar-toggle.open .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.navbar-toggle.open .bar:nth-child(2) {
    opacity: 0;
}
.navbar-toggle.open .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    .main-navbar {
        flex-wrap: wrap;
        padding: 0.7rem 1rem;
    }
    .navbar-logo {
        flex: 1 1 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .navbar-toggle {
        display: flex;
    }
    .navbar-menu {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 24px rgba(102,126,234,0.10);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0.5rem;
        display: none;
        z-index: 1200;
    }
    .navbar-menu.open {
        display: flex;
    }
    .navbar-menu li {
        width: 100%;
        margin: 0.2rem 0;
    }
    .navbar-menu li a {
        width: 100%;
        padding: 0.8rem 1.2rem;
        font-size: 1.1rem;
        border-radius: 8px;
        color: #232b3e;
        display: flex;
        align-items: center;
    }
    .navbar-user {
        margin-top: 0.5rem;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (max-width: 900px) {
    .navbar-user {
        display: none;
    }
    .navbar-menu.open ~ .navbar-user {
        display: flex !important;
        margin-top: 0.7rem;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(102,126,234,0.10);
        padding: 0.5rem 1rem;
        align-items: flex-end;
    }
}

/* --- Cải thiện menu mobile đẹp hơn --- */
@media (max-width: 900px) {
    .main-navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
        padding: 0.7rem 1rem;
        background: #fff;
        border-radius: 0 0 18px 18px;
        box-shadow: 0 4px 24px rgba(102,126,234,0.10);
    }
    .navbar-logo {
        flex: 1;
        display: flex;
        align-items: center;
        font-size: 1.2rem;
        font-weight: 700;
        color: #667eea;
    }
    .navbar-toggle {
        display: flex;
        margin-left: auto;
        z-index: 1201;
    }
    .navbar-menu {
        position: absolute;
        top: 56px;
        left: 8px;
        right: 8px;
        background: #fff;
        box-shadow: 0 8px 32px rgba(102,126,234,0.18);
        border-radius: 16px;
        flex-direction: column;
        align-items: stretch;
        padding: 0.7rem 0.5rem;
        display: none;
        z-index: 1200;
        animation: slideDown 0.25s;
    }
    .navbar-menu.open {
        display: flex;
    }
    .navbar-menu li {
        width: 100%;
        margin: 0.2rem 0;
    }
    .navbar-menu li a {
        width: 100%;
        padding: 1rem 1.2rem;
        font-size: 1.15rem;
        border-radius: 10px;
        color: #232b3e;
        display: flex;
        align-items: center;
        font-weight: 600;
        transition: background 0.2s, color 0.2s;
    }
    .navbar-menu li a.active, .navbar-menu li a:hover {
        background: #667eea;
        color: #fff;
    }
    .navbar-user {
        display: none;
    }
    .navbar-menu.open ~ .navbar-user {
        display: flex !important;
        margin-top: 0.7rem;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(102,126,234,0.10);
        padding: 0.5rem 1rem;
        align-items: flex-end;
    }
}

/* Offcanvas menu style giống MikoTech */
.offcanvas-menu {
    position: fixed;
    top: 0; right: -80vw;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 24px rgba(102,126,234,0.18);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.2rem 1.2rem 1.2rem;
    transition: right 0.3s cubic-bezier(.4,2,.6,1);
}
.offcanvas-menu.open {
    right: 0;
}
.offcanvas-menu .close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #667eea;
    align-self: flex-end;
    margin-bottom: 1.5rem;
    cursor: pointer;
}
.offcanvas-menu .navbar-menu {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.offcanvas-menu .navbar-menu li a {
    font-size: 1.15rem;
    color: #232b3e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.offcanvas-menu .navbar-menu li a:hover,
.offcanvas-menu .navbar-menu li a.active {
    background: #667eea;
    color: #fff;
}
.offcanvas-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.18);
    z-index: 2000;
    display: none;
}
.offcanvas-backdrop.show {
    display: block;
}
@media (min-width: 901px) {
    .offcanvas-menu, .offcanvas-backdrop, .navbar-toggle { display: none !important; }
    .main-navbar .navbar-menu { display: flex !important; position: static !important; flex-direction: row !important; }
}

@media (max-width: 900px) {
  .navbar-menu.desktop-menu {
    display: none !important;
  }
}
@media (min-width: 901px) {
  .navbar-menu.desktop-menu {
    display: flex !important;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
  }
  .navbar-toggle, .offcanvas-menu, .offcanvas-backdrop {
    display: none !important;
  }
}

@media (min-width: 901px) {
  .main-navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    min-height: 64px;
    padding-left: 0;
    padding-right: 0;
  }
  .navbar-logo {
    flex: 0 0 auto;
    margin-right: 2rem;
    z-index: 2;
  }
  .navbar-menu.desktop-menu {
    display: flex !important;
    gap: 0.7rem;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
  .navbar-toggle, .offcanvas-menu, .offcanvas-backdrop {
    display: none !important;
  }
}
@media (max-width: 900px) {
  .navbar-menu.desktop-menu {
    display: none !important;
  }
}

.navbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navbar-logo, .navbar-center, .navbar-user {
  /* border: 1px solid red; */
}

/* Sidebar modern admin - sửa lỗi và làm sạch */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 230px; min-width: 230px; max-width: 230px;
  background: linear-gradient(135deg, #5b247a 0%, #1e3c72 100%);
  box-shadow: 2px 0 8px #232b3e18;
  border-radius: 0;
  z-index: 1002;
  display: flex; flex-direction: column; align-items: stretch;
  transition: width 0.18s cubic-bezier(.4,2,.6,1);
}
.sidebar.collapsed { width: 54px; min-width: 54px; max-width: 54px; }
.sidebar-logo {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px 0 8px 0; min-height: 48px;
}
.sidebar-logo img {
  height: 28px; width: 28px; object-fit: contain; border-radius: 6px; box-shadow: 0 1px 4px #232b3e11;
}
.sidebar-title {
  font-weight: 800; font-size: 1rem; color: #fff; letter-spacing: 0.02em;
  text-shadow: 0 1px 4px #232b3e22; text-align: center;
  transition: opacity 0.14s, margin 0.14s;
}
.sidebar.collapsed .sidebar-title { opacity: 0; margin: 0; width: 0; overflow: hidden; }
.sidebar-menu {
  display: flex; flex-direction: column; gap: 4px; flex: 1; margin-top: 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  color: #fff; text-decoration: none;
  padding: 14px 12px; border-radius: 0 20px 20px 0;
  font-size: 1.08rem; font-weight: 700; letter-spacing: 0.01em;
  box-shadow: none; position: relative;
  transition: background 0.14s, color 0.14s, box-shadow 0.14s, border 0.14s, transform 0.14s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-link i {
  font-size: 1.1em; color: #ffd600; min-width: 22px; text-align: center;
  transition: color 0.14s, text-shadow 0.14s, transform 0.14s;
}
.sidebar-link span {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-block; max-width: 170px;
}
.sidebar-link:hover, .sidebar-link.active {
  background: rgba(255,255,255,0.10);
  color: #fff;
  box-shadow: 0 2px 8px #5b247a33;
  border-left: 4px solid #ffd600;
  transform: scale(1.03);
}
.sidebar-link.active i, .sidebar-link:hover i {
  color: #ffd600; text-shadow: 0 2px 8px #ffd60044; transform: scale(1.08);
}
.sidebar.collapsed .sidebar-link {
  justify-content: center; padding: 14px 0; font-size: 1.1em;
}
.sidebar.collapsed .sidebar-link span { display: none !important; }
.sidebar-toggle {
  background: none; border: none; color: #fff; font-size: 1.2rem;
  padding: 0; margin: 0; cursor: pointer; outline: none;
  align-self: flex-end; margin: 10px 8px 10px 0;
  border-radius: 6px; transition: background 0.14s;
}
.sidebar-toggle:hover { background: rgba(255,255,255,0.10); }
.container {
  margin-left: 230px !important; margin-top: 20px !important;
  transition: margin-left 0.14s cubic-bezier(.4,2,.6,1);
}
body.sidebar-collapsed .container { margin-left: 54px !important; }
@media (max-width: 900px) {
  .sidebar { left: 0; border-radius: 0; }
  .container { margin-left: 0 !important; }
}
.admin-topbar { display: none !important; }
