.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    transition: var(--transition);
}

.tab.active {
    color: var(--primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
    margin-bottom: 2rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}
.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
}

/* Khi có file, upload area vẫn hiển thị nhưng nội dung upload bị ẩn */
.upload-area.has-files {
    padding: 1rem;
    min-height: auto;
    justify-content: flex-start;
}

.upload-area.has-files .upload-content {
    display: none;
}

.files-selected {
    width: 100%;
}


.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(255, 109, 40, 0.05);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.upload-hint {
    color: var(--text-light);
    font-size: 0.9rem;
}

.file-input {
    display: none;
}

.file-selected {
    display: flex;
    align-items: center;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.file-info {
    flex: 1;
    margin-left: 1rem;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-size {
    color: var(--text-light);
    font-size: 0.85rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-block {
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background-color: var(--card-bg);
    color: var(--text);
    resize: vertical;
    min-height: 50px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 109, 40, 0.2);
}

.form-control::placeholder {
    color: var(--text-lighter);
    opacity: 1;
}

.files-selected {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 2px dashed var(--border, #ccc);
    padding: 1rem;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.03);
    margin-top: 1rem;
}

.file-item {
    background-color: var(--card-bg, #fff);
    border: 1px solid var(--border, #ddd);
    color: var(--text, #333);
    padding: 1rem;
    border-radius: var(--radius-sm, 6px);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    transition: var(--transition, all 0.2s ease);
}

.file-item textarea {
    margin-top: 0.5rem;
    width: 100%;
    resize: vertical;
    font-size: 0.9rem;
}

.file-item .remove-file {
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    color: var(--danger, #dc3545);
}

.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid var(--border);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    position: relative;
}

.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pricing-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.pricing-period {
    color: var(--text-light);
    font-size: 0.9rem;
}

.pricing-features {
    margin-bottom: 1.5rem;
}

.pricing-feature {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.pricing-feature i {
    color: var(--success);
    margin-right: 0.5rem;
}

.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    font-weight: 600;
    color: var(--text);
}

[data-theme="dark"] .table th {
    background-color: rgba(255, 255, 255, 0.05);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-approved {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-rejected {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.file-preview {
    display: flex;
    align-items: center;
}

.file-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary);
}

.file-details {
    flex: 1;
}

.file-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-meta {
    color: var(--text-light);
    font-size: 0.85rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Thêm style cho hiển thị số lượt bán */
.sales-count {
    display: inline-flex;
    align-items: center;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.sales-count i {
    margin-right: 0.25rem;
    font-size: 0.8rem;
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 240px 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
    }

    .header {
        grid-column: 1 / 2;
        padding: 1rem;
    }

    .sidebar {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        height: auto;
        position: static;
        display: none;
    }

    .sidebar.active {
        display: flex;
    }

    .main-content {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        padding: 1.5rem;
    }

    .pricing-table {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .table th {
        white-space: nowrap;
    }

    .table thead th:nth-child(4),
    .table tbody td:nth-child(4) {
        display: none;
    }

    .table-container {
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }

}

@media (max-width: 768px) {
    .tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .pricing-table {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pricing-card {
        padding: 1.25rem;
    }

    .pricing-price {
        font-size: 1.75rem;
    }

    .popular-badge {
        right: 10px;
        font-size: 0.7rem;
        padding: 0.2rem 0.8rem;
    }

    .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    #payment-qr {
        max-width: 150px;
    }

    .file-item {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .file-item .remove-file {
        position: static;
        align-self: flex-end;
    }

    .file-item textarea {
        margin-top: 0.5rem;
        min-height: 80px;
    }

    .tab:active,
    .btn:active,
    .mobile-menu-btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .tab,
    .btn {
        min-height: 44px;
    }

    .tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

/* Đã xóa phần CSS liên quan đến toast notifications */

.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.qr-modal.active {
    display: flex;
}

.qr-modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    max-height: 90%;
}

.qr-modal-content img {
    max-width: 100%;
    max-height: 80vh;
}

.qr-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

#payment-qr {
    cursor: pointer;
    transition: transform 0.2s;
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .card-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-icon {
        font-size: 2.5rem;
    }

    .upload-text {
        font-size: 1rem;
    }

    .upload-hint {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {

    html,
    body {
        width: 100%;
        overflow-x: hidden;
    }

    .app-container {
        min-width: 100%;
        max-width: 100vw;
    }

    .main-content {
        width: 100%;
        padding: 1rem;
        box-sizing: border-box;
        overflow: hidden;
    }

    .card {
        width: 100%;
        box-sizing: border-box;
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid var(--border);
        border-radius: 8px;
    }

    .table {
        min-width: 100%;
        width: auto;
    }

    .upload-area,
    .btn,
    .form-control {
        width: 100%;
        box-sizing: border-box;
    }

    .table thead th:nth-child(5),
    .table tbody td:nth-child(5),
    .table thead th:nth-child(4),
    .table tbody td:nth-child(4) {
        display: none;
    }

    .pricing-table {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tab,
    .btn,
    .card-title {
        white-space: normal;
        word-wrap: break-word;
    }

    .file-title {
        white-space: normal !important;
        word-break: break-word;
    }
}

@media (max-width: 480px) {

    .table thead th:nth-child(3),
    .table tbody td:nth-child(3) {
        display: none;
    }

    .card-title {
        font-size: 1rem;
    }

    .upload-text {
        font-size: 0.85rem;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        flex: 1 0 auto;
        text-align: center;
    }
}

/* Tạo khoảng cách giữa số và "lượt bán" */
.sales-number {
    font-weight: 600;
    margin-right: 0.25rem;
    /* Thêm khoảng cách bên phải số */
}

/* Đảm bảo text "lượt bán" không bị dính vào số */
.sales-count span:not(.sales-number) {
    margin-left: 0.25rem;
}

/* Gmail Modal Styles */
.modal-overlay-gmail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay-gmail.active-gmail {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-gmail {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    border-radius: var(--radius-sm);
    padding: 30px;
    box-shadow: var(--shadow-md);
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease, background var(--transition);
}

.modal-overlay-gmail.active-gmail .modal-gmail {
    transform: scale(1);
}

.close-btn-gmail {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-light);
    transition: color var(--transition);
}

.close-btn-gmail:hover {
    color: var(--text);
}

.modal-icon-gmail {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 40px;
}

.modal-gmail h2 {
    color: var(--text);
    margin-bottom: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 22px;
}

.modal-gmail p {
    color: var(--text-light);
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.5;
}

.form-group-gmail {
    margin-bottom: 20px;
}

.form-group-gmail label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 14px;
}

.form-group-gmail input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    transition: border-color var(--transition), background var(--transition);
    background: var(--bg);
    color: var(--text);
    box-sizing: border-box;
}

.form-group-gmail input:focus {
    outline: none;
    border-color: var(--primary);
}

.submit-btn-gmail {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background var(--transition), opacity var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-btn-gmail:hover {
    background: var(--primary-dark);
}

.submit-btn-gmail.loading-gmail {
    pointer-events: none;
    opacity: 0.7;
}

.submit-btn-gmail .spinner-gmail {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin-gmail 1s linear infinite;
    margin-right: 8px;
}

.submit-btn-gmail.loading-gmail .spinner-gmail {
    display: inline-block;
}

.submit-btn-gmail.loading-gmail span:last-child {
    display: none;
}

.success-message-gmail {
    display: none;
    text-align: center;
    color: var(--success);
    margin-top: 15px;
    padding: 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.success-message-gmail.show-gmail {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.error-message-gmail {
    display: none;
    text-align: center;
    color: var(--error);
    margin-top: 15px;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.error-message-gmail.show-gmail {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

@keyframes spin-gmail {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

#qr-loading-spinner {
    display: none;
    width: 100%;
}

#qr-loading-spinner p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

/* Payment Guide Modal Styles */
.payment-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.guide-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3A98B9 0%, #4AB1D1 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(58, 152, 185, 0.2);
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.step-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.guide-note,
.guide-contact {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.guide-note {
    background: rgba(255, 193, 7, 0.1);
}

.guide-contact {
    background: rgba(58, 152, 185, 0.1);
}

.note-icon,
.contact-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.note-icon {
    background: rgba(255, 193, 7, 0.2);
    color: #f57c00;
}

.contact-icon {
    background: rgba(58, 152, 185, 0.2);
    color: #3A98B9;
}

.note-content,
.contact-content {
    flex: 1;
}

.note-content strong,
.contact-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.note-content p,
.contact-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.btn-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.btn-link:hover {
    opacity: 0.8;
}

/* Dark mode support */
[data-theme="dark"] .guide-note {
    background: rgba(255, 193, 7, 0.15);
}

[data-theme="dark"] .guide-contact {
    background: rgba(58, 152, 185, 0.15);
}

@media (max-width: 500px) {
    .modal-gmail {
        padding: 20px;
    }
}