* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-color: #333;
    --primary-hover: #000;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #666;
    --border-color: #ddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Dark Mode Styles */

body {
    font-family: 'Momo Trust Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f5f5f5;
    font-weight: 500;
    position: relative;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1001;
}

/* Dark Mode Override cho Header */
.darkmode--activated .header {
    background: rgba(26, 26, 26, 0.95) !important;
    color: #e0e0e0 !important;
}

.darkmode--activated .header * {
    color: #e0e0e0 !important;
}

.darkmode--activated .logo-text {
    color: #e0e0e0 !important;
}

.darkmode--activated .user-nav-menu {
    background: #2a2a2a !important;
    border-color: #444 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}

.darkmode--activated .user-nav-menu-link {
    color: #e0e0e0 !important;
}

.darkmode--activated .user-nav-menu-link:hover {
    background: #333 !important;
    color: #fff !important;
}

.darkmode--activated .user-nav-menu-name {
    color: #fff !important;
}

.darkmode--activated .user-nav-menu-label,
.darkmode--activated .user-nav-menu-value {
    color: #e0e0e0 !important;
}

/* Dark Mode cho Promo Banner */
.darkmode--activated .promo-banner {
    background: #2a2a2a !important;
}

.darkmode--activated .promo-name {
    color: #e0e0e0 !important;
}

/* Dark Mode cho Form Column */
.darkmode--activated .form-column {
    background: #2a2a2a !important;
}

.darkmode--activated .form-card {
    background: #2a2a2a !important;
}

/* Dark Mode cho Input, Textarea, Select - màu đen nhạt */
.darkmode--activated input[type="text"],
.darkmode--activated input[type="email"],
.darkmode--activated input[type="password"],
.darkmode--activated input[type="number"],
.darkmode--activated textarea,
.darkmode--activated select {
    background: #333 !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

.darkmode--activated input[type="text"]:focus,
.darkmode--activated input[type="email"]:focus,
.darkmode--activated input[type="password"]:focus,
.darkmode--activated input[type="number"]:focus,
.darkmode--activated textarea:focus,
.darkmode--activated select:focus {
    background: #333 !important;
    border-color: #4a9eff !important;
    color: #e0e0e0 !important;
}

.darkmode--activated .custom-select-trigger {
    background: #333 !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

.darkmode--activated .custom-select-options {
    background: #2a2a2a !important;
    border-color: #555 !important;
}

.darkmode--activated .custom-select-option {
    color: #e0e0e0 !important;
}

.darkmode--activated .custom-select-option:hover {
    background: #333 !important;
    color: #fff !important;
}

/* Dark Mode cho Footer - giữ nguyên màu đen */
.darkmode--activated .footer {
    filter: none !important;
    background: #1a1a1a !important;
}

.darkmode--activated .footer * {
    filter: none !important;
}

/* Dark Mode cho các trang khác */
.darkmode--activated .stats-container,
.darkmode--activated .history-page-container,
.darkmode--activated .config-page-container,
.darkmode--activated .api-container,
.darkmode--activated .support-page-container,
.darkmode--activated .article-container {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.darkmode--activated .stats-table,
.darkmode--activated .history-table,
.darkmode--activated table {
    color: #e0e0e0 !important;
}

.darkmode--activated .stats-table tr,
.darkmode--activated .history-table tr {
    border-bottom-color: #444 !important;
}

.darkmode--activated .stats-table td,
.darkmode--activated .history-table td,
.darkmode--activated .stats-table th,
.darkmode--activated .history-table th {
    color: #e0e0e0 !important;
}

.darkmode--activated .config-page-title,
.darkmode--activated .api-title,
.darkmode--activated .support-page-title,
.darkmode--activated .article-title,
.darkmode--activated h1,
.darkmode--activated h2,
.darkmode--activated h3 {
    color: #fff !important;
}

.darkmode--activated .config-tabs {
    border-bottom-color: #444 !important;
}

.darkmode--activated .config-tab {
    color: #e0e0e0 !important;
}

.darkmode--activated .config-tab.active {
    color: #4a9eff !important;
    border-bottom-color: #4a9eff !important;
}

.darkmode--activated .form-group label {
    color: #e0e0e0 !important;
}

.darkmode--activated .btn {
    border-color: #555 !important;
}

.darkmode--activated .btn-primary {
    background: #4a9eff !important;
    border-color: #4a9eff !important;
}

.darkmode--activated .btn-secondary {
    background: #555 !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

.darkmode--activated .card,
.darkmode--activated .api-key-item,
.darkmode--activated .article-card {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.darkmode--activated .article-content {
    color: #e0e0e0 !important;
}

.darkmode--activated .article-content p,
.darkmode--activated .article-content li {
    color: #e0e0e0 !important;
}

.darkmode--activated .article-content h1,
.darkmode--activated .article-content h2,
.darkmode--activated .article-content h3,
.darkmode--activated .article-content h4 {
    color: #fff !important;
}

.darkmode--activated .article-meta {
    color: #aaa !important;
}

.darkmode--activated code,
.darkmode--activated pre {
    background: #1a1a1a !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Dark Mode cho các trang static */
.darkmode--activated .page-content {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
}

.darkmode--activated .page-content h1,
.darkmode--activated .page-content h2,
.darkmode--activated .page-content h3,
.darkmode--activated .page-content h4 {
    color: #fff !important;
}

.darkmode--activated .page-content p,
.darkmode--activated .page-content li {
    color: #e0e0e0 !important;
}

.darkmode--activated .forgot-password-wrapper,
.darkmode--activated .reset-password-wrapper {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
}

.darkmode--activated .forgot-password-wrapper h2,
.darkmode--activated .reset-password-wrapper h2 {
    color: #fff !important;
}

.darkmode--activated .forgot-password-wrapper label,
.darkmode--activated .reset-password-wrapper label {
    color: #e0e0e0 !important;
}

.header .container {
    max-width: 100%;
    padding: 0 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    position: relative;
    gap: 15px;
    width: 100%;
}

.logo {
    flex: 0 0 auto;
}

.nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin: 0;
    min-width: 0;
    gap: 15px;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.dark-mode-toggle-btn:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.dark-mode-icon {
    font-size: 20px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.dark-mode-toggle-btn:active .dark-mode-icon {
    transform: rotate(360deg);
}

.nav .user-nav-info {
    margin-left: auto;
    margin-right: 0;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1003;
    position: relative;
    align-self: center;
    flex-shrink: 0;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    display: none;
    height: auto;
    width: auto;
}

.logo-text {
    display: none;
}

@media (max-width: 768px) {
    .logo-img {
        display: block;
        width: 150px;
        height: 100px;
        object-fit: contain;
        margin: 0 auto;
    }
    
    .logo-text {
        display: none;
    }
    
    .logo {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .logo a {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav a:hover,
.nav a.active {
    background: var(--primary-color);
    color: #fff;
}

.user-nav-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-left: auto;
    margin-right: 0;
}

.user-balance {
    color: var(--text-color);
    font-size: 14px;
}

.user-balance strong {
    color: #1a5490;
    font-weight: 600;
}

.user-name {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

.btn-logout {
    padding: 0;
    background: transparent;
    color: #dc3545;
    border: none;
    text-decoration: underline;
    font-size: 13px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-logout:hover {
    color: #c82333;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    color: #333;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text {
    text-align: left;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.hero-card-item {
    width: 180px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.hero-card-item:hover {
    transform: translateY(-10px) scale(1.05);
}

.hero-card-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #4a9eff;
    color: #fff;
    border: 1px solid #4a9eff;
}

.btn-primary:hover {
    background: #2d7dd2;
    border-color: #2d7dd2;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

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

.btn-outline-primary {
    background: #fff;
    color: #1a5490;
    border: 1px solid #1a5490;
}

.btn-outline-primary:hover {
    background: #1a5490;
    color: #fff;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Main */
.main {
    min-height: calc(100vh - 200px);
    padding: 40px 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.main-wrapper {
    margin-top: 0;
    width: calc(100% - 200px);
    margin-left: 200px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Banner khuyến mãi */
.promo-banner {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    overflow: hidden;
    position: relative;
    width: calc(100% - 200px);
    margin-left: 200px;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 70px;
    display: block;
    margin-bottom: 0;
    box-sizing: border-box;
}

.promo-banner-content {
    display: inline-flex;
    flex-direction: row;
    gap: 0;
    animation: scrollPromo 40s linear infinite;
    will-change: transform;
    white-space: nowrap;
}

.promo-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    background: transparent;
    flex-shrink: 0;
    margin-right: 20px;
}

.promo-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.promo-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.promo-discount {
    font-size: 16px;
    font-weight: 700;
    color: #e74c3c;
    white-space: nowrap;
}

@keyframes scrollPromo {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.promo-banner-content:hover {
    animation-play-state: paused;
}

.main-layout-with-sidebar {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.main-content-wrapper {
    padding: 0 30px 0 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.main-content-wrapper .container {
    max-width: 100%;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.main-layout {
    display: grid;
    grid-template-columns: 70% 30%;
    grid-template-rows: auto auto;
    gap: 30px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.price-column {
    grid-row: 1 / 3; /* Span 2 rows */
}

.trans-column {
    grid-row: 2; /* Row 2 */
    grid-column: 1; /* Column 1 (bên trái) */
}

/* Sidebar */
.sidebar {
    background: #fff;
    border-radius: 0;
    padding: 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    bottom: 0;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Dark Mode Override cho Sidebar */
.darkmode--activated .sidebar {
    background: #1a1a1a !important;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5) !important;
}

.darkmode--activated .sidebar-logo {
    background: #1a1a1a !important;
    border-bottom-color: #444 !important;
}

.darkmode--activated .sidebar-item {
    color: #e0e0e0 !important;
    border-bottom-color: #333 !important;
}

.darkmode--activated .sidebar-item:hover {
    background: #2a2a2a !important;
    color: #fff !important;
}

.darkmode--activated .sidebar-item.active {
    background: #2a2a2a !important;
    color: #4a9eff !important;
}

.sidebar-logo {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 1003;
    padding: 10px;
    box-sizing: border-box;
}

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

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 80px;
    min-height: 0;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    font-weight: 400;
    font-family: 'Momo Trust Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar overlay cho mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-item:hover {
    background: #f9f9f9;
    color: #333;
}

.sidebar-item.active {
    background: #e8f4fd;
    color: #2d7dd2;
    font-weight: 700;
    border-left: 5px solid #2d7dd2;
    padding-left: 15px;
    box-shadow: inset 0 0 10px rgba(45, 125, 210, 0.1);
}

.sidebar-icon {
    font-size: 12px;
    color: #666;
    width: 16px;
    text-align: center;
    display: inline-block;
}

.sidebar-item-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-item.active .sidebar-icon {
    color: #333;
}

.sidebar-item-dropdown {
    cursor: pointer;
    position: relative;
}

.dropdown-arrow {
    margin-left: auto;
    width: 24px;
    height: 24px;
    transition: transform 0.3s;
    flex-shrink: 0;
    align-self: center;
    display: inline-block;
    object-fit: contain;
}

.sidebar-item-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #f8f9fa;
}

.sidebar-submenu.active {
    max-height: 300px;
}

.sidebar-submenu-item {
    display: block;
    padding: 12px 20px 12px 50px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s;
    font-family: 'Momo Trust Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

.sidebar-submenu-item.active {
    background: #e8f4fd;
    color: #2d7dd2;
    font-weight: 700;
    border-left: 5px solid #2d7dd2;
    padding-left: 45px;
    box-shadow: inset 0 0 10px rgba(45, 125, 210, 0.1);
}

.sidebar-submenu-item:hover {
    background: #e9ecef;
    color: #333;
}

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

.sidebar-social {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.sidebar-social-title {
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
    font-family: 'Momo Trust Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-social-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Momo Trust Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sidebar-social-item:hover {
    background: #f9f9f9;
    color: #333;
}

.sidebar-social-item img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.form-column {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    max-height: 450px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* Cho phép dropdown hiển thị ra ngoài form-column (chỉ cho index.php) */
.index-page .form-column {
    overflow: visible !important;
}

.index-page .form-column .custom-select-wrapper {
    overflow: visible;
    position: relative;
}

.index-page .custom-select-options {
    position: fixed !important;
    z-index: 10001 !important;
    max-height: 400px !important;
}

.index-page .main-content-wrapper,
.index-page .container,
.index-page .main-content-wrapper .container {
    overflow: visible !important;
}

.form-column > * {
    position: relative;
    z-index: 1;
}

.price-column {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.trans-column {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    margin-top: 0;
}

.card-form-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
}

.form-tabs .tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.form-tabs .tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.form-tabs .tab-btn:hover {
    color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

/* Custom Select */
.custom-select {
    position: relative;
}

.custom-select-wrapper {
    position: relative;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    min-height: 48px;
    font-weight: 700;
}

.custom-select-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-select-arrow {
    transition: transform 0.3s;
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.custom-select-wrapper.open .custom-select-options.amount-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 8px;
}

.custom-select-options.amount-options-grid .custom-select-option {
    padding: 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    margin: 2px;
    border-radius: 4px;
    font-weight: 700;
}

.custom-select-options.amount-options-grid .custom-select-option:hover {
    background: rgba(26, 84, 144, 0.1);
    border-color: #1a5490;
}

.custom-select-wrapper.open .custom-select-options {
    display: block;
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-select-option:hover {
    background: var(--secondary-color);
}

.option-logo {
    width: 40px;
    height: 30px;
    object-fit: contain;
}

.table-card-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table-card-logo {
    width: 50px;
    height: 35px;
    object-fit: contain;
    flex-shrink: 0;
}

.price-table-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.price-table {
    margin-top: 0;
    background: #fff;
    color: #000;
}

.price-table thead {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #333;
}

.price-table th,
.price-table td {
    padding: 15px;
    text-align: left;
    border: 1px solid #ddd;
}

.price-table tbody tr {
    background: #fff;
    color: #000;
}

.price-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.price-table tbody tr:hover {
    background: #f0f0f0;
}

.price-table td:first-child {
    font-weight: 600;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Cards */
.card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.balance-card {
    background: linear-gradient(135deg, #fff 0%, #f5f5f5 100%);
    color: #333;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.balance-icon {
    font-size: 48px;
}

.balance-info h3 {
    margin-bottom: 10px;
    opacity: 0.9;
}

.balance-amount {
    font-size: 36px;
    font-weight: bold;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    transition: border-color 0.3s;
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)), url('../image/gradient-b.webp') no-repeat center center;
    background-size: cover;
    color: #333;
}

.password-group {
    position: relative;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.form-group input::placeholder {
    color: #999;
    opacity: 1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.info-box {
    background: var(--secondary-color);
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

/* Auth */
.auth-box {
    max-width: 450px;
    margin: 50px auto;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.auth-box .logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-box .logo h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.auth-box .logo p {
    color: var(--text-muted);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.alert-success {
    background: #efe;
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead {
    background: #fff;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #333;
}

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

.table tbody tr:hover {
    background: var(--secondary-color);
}

.table-responsive {
    overflow-x: auto;
}

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

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

.badge-danger {
    background: #f8d7da;
    color: var(--danger-color);
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.action-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.action-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.action-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Section */
.section {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

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

.mt-4 {
    margin-top: 30px;
}

/* Telco Cards */
.telco-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.telco-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.telco-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.telco-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.telco-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.telco-card-info {
    padding: 20px;
    text-align: center;
}

.telco-card-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.telco-discount {
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
}

.telco-example {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.tab-btn:hover,
.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

/* Footer */
.footer {
    background: #ffffff;
    padding: 50px 0 30px;
    margin-top: 60px;
    border-top: 1px solid #e5e5e5;
    margin-left: 200px;
    width: calc(100% - 200px);
    box-sizing: border-box;
    clear: both;
}

.footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e5e5e5;
    width: 100%;
}

.footer-column {
    min-width: 0;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #2d7dd2;
}

.footer-links strong {
    color: #333;
    font-weight: 600;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-company-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.footer-company-logo {
    flex-shrink: 0;
}

.footer-company-details {
    flex: 1;
}

.footer-certificates {
    flex-shrink: 0;
    text-align: center;
}

.certificate-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.certificate-badge {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-wrapper {
        margin-left: 0;
        width: 100%;
        max-width: none;
    }
    
    .main-content-wrapper {
        max-width: none;
    }
    
    .main-layout {
        max-width: none;
    }
    
    .form-column,
    .price-column,
    .trans-column {
        max-width: none;
    }
    
    .container {
        max-width: none;
    }
    
    .main-layout-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 200px;
        padding-top: 0;
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
        display: flex;
        flex-direction: column;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-nav {
        padding-top: 80px;
        flex: 1 !important;
        overflow-y: auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .sidebar-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 14px 20px;
        gap: 10px;
        justify-content: space-between;
    }
    
    .sidebar-item-dropdown {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .sidebar-item span:first-child {
        flex: 1;
    }
    
    .dropdown-arrow {
        margin-left: auto;
        flex-shrink: 0;
        align-self: center;
    }
    
    .sidebar-icon {
        font-size: 20px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .sidebar-item span:not(.sidebar-icon):not(.dropdown-arrow) {
        font-size: 14px;
        font-family: 'Momo Trust Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    
    /* Social section - chỉ hiển thị logo nằm ngang trên mobile */
    .sidebar-social {
        padding: 10px 20px !important;
        flex-shrink: 0 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: #fff !important;
        border-top: 1px solid #e0e0e0 !important;
    }
    
    .sidebar-social-title {
        font-size: 10px !important;
        margin-bottom: 8px !important;
    }
    
    .sidebar-social-links {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }
    
    .sidebar-social-item {
        padding: 6px 8px !important;
        gap: 0 !important;
        min-width: auto !important;
        justify-content: center !important;
    }
    
    .sidebar-social-item span {
        display: none !important;
    }
    
    .sidebar-social-item img {
        width: 28px !important;
        height: 28px !important;
        margin: 0 !important;
    }
    
    .promo-banner {
        padding: 10px 0;
        width: 100%;
        margin-left: 0;
    }
    
    .footer {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
    }
    
    .footer-company-info {
        flex-direction: column;
        text-align: center;
    }
    
    .certificate-badges {
        justify-content: center;
    }
    
    @media (max-width: 480px) {
        .footer-content {
            grid-template-columns: 1fr !important;
        }
    }
    
    .promo-item {
        padding: 8px 15px;
    }
    
    .promo-logo {
        width: 30px;
        height: 30px;
    }
    
    .promo-discount {
        font-size: 14px;
    }
    
    .main-content-wrapper {
        padding: 0 20px;
    }
    
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-column,
    .price-column,
    .trans-column {
        padding: 20px;
    }
    
    .form-column {
        order: 1; /* Hiển thị trước trên mobile */
        max-height: none; /* Bỏ giới hạn chiều cao trên mobile */
        overflow-y: visible; /* Hiển thị đầy đủ nội dung */
    }
    
    .price-column {
        order: 2; /* Hiển thị sau form-column trên mobile */
        grid-row: auto; /* Reset grid-row trên mobile */
    }
    
    .trans-column {
        display: none; /* Ẩn cột lịch sử trên mobile */
    }
    
    .header-content {
        flex-direction: row;
        gap: 10px;
        padding: 10px 0;
        justify-content: flex-start;
        align-items: center;
    }
    
    .logo a {
        font-size: 18px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex: 0 0 auto;
        order: -1;
        align-self: center;
        margin-right: 10px;
    }
    
    .logo {
        flex: 1 1 auto;
        order: 0;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .logo a {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .nav {
        flex: 0 0 auto;
        order: 3;
        display: flex;
    }
    
    .nav a {
        font-size: 14px;
        padding: 6px 10px;
        white-space: nowrap;
    }

    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 10px;
    }
    
.table-card-logo {
    width: 40px;
    height: 28px;
}

@media (max-width: 768px) {
    .user-nav-info {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }
    
    .user-balance,
    .user-name {
        font-size: 12px;
    }
    
    .btn-logout {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* Lịch sử nạp thẻ */
.recent-card-history {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Lịch sử giao dịch section */
.history-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 100%;
}

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

.history-table {
    width: 100%;
    font-size: 13px;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.table.history-table thead {
    background: #2d7dd2 !important;
    color: #fff !important;
}

.table.history-table thead th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
    background: #2d7dd2 !important;
    color: #fff !important;
    border-bottom: none !important;
}

.history-table tbody {
    background: #fff;
}

.history-table tbody td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 10px;
    line-height: 1.3;
}

.history-table tbody tr:hover {
    background: rgba(249, 249, 249, 0.8);
}

.history-table tbody td img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 5px;
    display: inline-block;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-success {
    background: #e8f5e9;
    color: #4CAF50;
    border: 1px solid #4CAF50;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.status-failed {
    background: #ffebee;
    color: #f44336;
    border: 1px solid #f44336;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.2);
}

.status-pending {
    background: #ffc107;
    color: #333;
}

@media (max-width: 768px) {
    .history-table {
        font-size: 11px;
    }
    
    .history-table thead th,
    .history-table tbody td {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .history-table thead th:nth-child(3),
    .history-table thead th:nth-child(4),
    .history-table tbody td:nth-child(3),
    .history-table tbody td:nth-child(4) {
        display: none;
    }
}
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content:not(.auth-modal-content) {
    overflow-y: auto;
}

.auth-modal-content {
    max-width: 1100px;
    width: 95%;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: transparent;
    box-shadow: none;
    position: relative;
}

/* Mobile Auth Modal */
.mobile-auth-modal .auth-modal-content {
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
}

.mobile-auth-modal .auth-modal-body {
    padding: 30px 20px;
    overflow-y: auto;
}

.mobile-auth-modal .auth-title {
    font-size: 22px;
    margin-bottom: 25px;
    text-align: center;
}

/* Ẩn modal PC trên mobile */
@media (max-width: 768px) {
    #authModal,
    #authModal.show {
        display: none !important;
    }
}

/* Ẩn modal mobile trên PC */
@media (min-width: 769px) {
    .mobile-auth-modal,
    .mobile-auth-modal.show {
        display: none !important;
    }
    
    /* Đảm bảo modal PC hiển thị được */
    #authModal.show {
        display: flex !important;
    }
}

.auth-modal-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
}

.auth-table {
    display: flex;
    min-height: 600px;
    background: #f0f7ff;
    border: 1px solid #cce5ff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.auth-column {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    border-right: 1px solid #cce5ff;
}

.auth-column:last-child {
    border-right: none;
}

.auth-column::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.auth-column:last-child {
    border-right: none;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 30px;
}

.auth-note {
    background: #e8f5e9;
    border-left: 3px solid var(--primary-color);
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-color);
}

.auth-note strong {
    color: var(--primary-color);
}

.forgot-password {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

.checkbox-group {
    margin: 15px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    margin-top: 3px;
    cursor: pointer;
}

.checkbox-label span {
    flex: 1;
}

.link-primary {
    color: #333;
    text-decoration: none;
}

.link-primary:hover {
    text-decoration: underline;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #cce5ff;
}

.auth-divider span {
    background: #f0f7ff;
    padding: 0 15px;
    position: relative;
    color: var(--text-muted);
    font-size: 14px;
}

#loginSocialSection {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: 600;
    width: 100%;
    max-width: 100%;
}

.btn-google {
    background: #fff;
    color: #4285F4;
    border: 1px solid #dadce0;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    color: #4285F4;
}

.btn-apple {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.btn-apple:hover {
    background: #333;
    border-color: #333;
    color: #fff;
}

.btn-apple svg path {
    fill: #fff;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-modal-header {
    padding: 15px 20px;
    border-bottom: none;
    justify-content: flex-end;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 24px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #333;
    color: #000;
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

/* Bỏ gradient ở input trong modal đăng nhập */
.modal input,
.modal select,
.modal textarea {
    background: #fff !important;
}

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

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

/* Mobile: Ẩn modal, chuyển sang trang */
@media (max-width: 768px) {
    .modal {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .auth-table {
        flex-direction: column;
        min-height: auto;
    }
    
    .auth-column {
        border-right: none;
        border-bottom: 1px solid #cce5ff;
        padding: 30px;
        max-height: none;
    }
    
    .auth-column:last-child {
        border-bottom: none;
    }
    
    .auth-modal-content {
        max-width: 500px;
        max-height: 90vh;
    }
    
    .auth-modal-body {
        padding: 15px;
    }
    
    /* Tab navigation cho mobile */
    .auth-tabs-mobile {
        display: flex;
        border-bottom: 2px solid #e0e0e0;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .auth-tab-btn {
        flex: 1;
        padding: 15px 20px;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        font-size: 16px;
        font-weight: 600;
        color: #666;
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .auth-tab-btn.active {
        color: #2d7dd2;
        border-bottom-color: #2d7dd2;
        background: #f0f7ff;
    }
    
    .auth-tab-btn:hover {
        background: #f5f5f5;
    }
    
    /* Trên mobile: ẩn 2 cột, hiển thị tab content */
    .auth-table {
        flex-direction: column;
    }
    
    .auth-column {
        display: none;
        border-right: none;
        border-bottom: 1px solid #cce5ff;
        padding: 30px 20px;
    }
    
    .auth-column.active {
        display: block;
    }
    
    .auth-column:last-child {
        border-bottom: none;
    }
}

/* Loading dots animation */
.loading-dots {
    display: inline-block;
    margin-left: 4px;
}

.loading-dots span {
    display: inline-block;
    animation: loadingDots 1.4s infinite ease-in-out;
    opacity: 0;
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDots {
    0%, 80%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: #2d7dd2;
    color: #fff;
    border-color: #2d7dd2;
}

.pagination button.active {
    background: #2d7dd2;
    color: #fff;
    border-color: #2d7dd2;
    font-weight: 600;
}

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

/* User Auth Dropdown */
.user-auth-dropdown {
    position: relative;
    display: inline-block;
}

.user-auth-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.user-auth-icon-btn:hover {
    opacity: 0.7;
}

.user-auth-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.user-icon-wrapper {
    position: relative;
    display: inline-block;
}

.user-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.user-auth-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: block;
}

.user-auth-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.auth-menu-item {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

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

.auth-menu-item:hover {
    background: #f5f5f5;
    color: #2d7dd2;
}

/* User Nav Dropdown (when logged in) */
.user-nav-dropdown {
    position: relative;
    display: inline-block;
}

.user-nav-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.3s;
    position: relative;
}

.user-nav-icon-btn:hover {
    opacity: 0.7;
}

.user-nav-text {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.user-nav-arrow {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: none;
    position: absolute;
    bottom: -2px;
    top: 25px;
    right: -10px;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.user-nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: block;
}

.user-nav-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-nav-menu-header {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.user-nav-menu-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    display: block;
}

.user-nav-menu-item {
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-nav-menu-label {
    font-size: 14px;
    color: #666;
}

.user-nav-menu-value {
    font-size: 14px;
    color: #2d7dd2;
}

.user-nav-menu-link {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.user-nav-menu-link:last-child {
    border-bottom: none;
}

.user-nav-menu-link:hover {
    background: #f5f5f5;
    color: #2d7dd2;
}

.user-nav-menu-logout {
    color: #dc3545;
}

.user-nav-menu-logout:hover {
    background: #ffebee;
    color: #dc3545;
}

@media (max-width: 768px) {
    .user-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Ẩn text trên mobile */
    .user-auth-text,
    .user-nav-text {
        display: none;
    }
    
    .user-auth-icon-btn,
    .user-nav-icon-btn {
        padding: 5px;
        position: relative;
    }
    
    /* Hiển thị arrow icon trên mobile */
    .user-nav-arrow {
        display: block;
    }
    
    /* Điều chỉnh vị trí dropdown menu trên mobile */
    .user-auth-menu,
    .user-nav-menu {
        right: -10px;
        min-width: 180px;
    }
}

/* Custom Captcha Styles */
.custom-captcha {
    margin: 15px 0;
}

.captcha-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.captcha-button {
    width: 100%;
    padding: 0;
    background: transparent;
    border: 2px solid #333;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-button.completed {
    border-color: #28a745;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.captcha-button.error {
    border-color: #dc3545;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.captcha-button:active {
    transform: scale(0.98);
}

.captcha-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.captcha-button.completed {
    border-color: #28a745;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.captcha-text {
    position: relative;
    z-index: 3;
    display: block;
    pointer-events: none;
    font-weight: 600;
    white-space: nowrap;
    width: 100%;
    text-align: center;
    background: linear-gradient(90deg, #333 0%, #333 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background 0.1s linear;
}

.captcha-progress {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: transparent;
    overflow: visible !important;
    border-radius: 6px;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    z-index: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none;
}

.captcha-progress-bar {
    height: 100% !important;
    width: 0%;
    background: #4a9eff !important;
    transition: width 0.05s linear;
    position: relative !important;
    z-index: 2 !important;
    min-width: 0;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    border-radius: 6px;
    box-shadow: inset 0 0 10px rgba(74, 158, 255, 0.5);
    border-right: 2px solid rgba(74, 158, 255, 0.5);
    pointer-events: none;
}

.captcha-plane-container {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    transform: translateY(-50%) !important;
    width: 160px !important;
    height: 160px !important;
    z-index: 3 !important;
    display: none;
    pointer-events: none;
    will-change: left;
}

.captcha-plane-container svg {
    width: 100% !important;
    height: 100% !important;
}

.captcha-progress-bar::after {
    display: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.captcha-button.active {
    border-color: #333;
}

