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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 550px; /* Đủ cao cho 10 hàng */
}

.bang-100-improved {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    width: 100%;
    min-height: 500px; /* Đảm bảo chiều cao tối thiểu */
}

.so-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    height: 48px; /* Chiều cao cố định */
    border: 1px solid #e2e8f0;
    min-width: 45px; /* Chiều rộng tối thiểu */
}

.so-item:hover {
    background: #e6e9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.so-item.selected {
    background: #c7d2fe;
    border: 2px solid #667eea;
}

.so-number {
    font-size: 14px;
    font-weight: bold;
    color: #4a5568;
    line-height: 1;
}

.so-money {
    font-size: 10px;
    color: #718096;
    margin-top: 2px;
    text-align: center;
    line-height: 1;
    font-weight: 600;
    text-shadow: 0 0 2px rgba(255,255,255,0.8);
}

/* Màu cho lô */
.so-item.co-lo {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-color: #28a745;
}

.so-item.co-lo .so-number {
    color: #155724;
}

.so-item.co-lo .so-money {
    color: #155724;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 3px;
    padding: 1px 2px;
}

/* Màu cho đề */
.so-item.co-de {
    background: linear-gradient(135deg, #f8e6e8 0%, #f5c6cb 100%);
    border-color: #dc3545;
}

.so-item.co-de .so-number {
    color: #721c24;
}

.so-item.co-de .so-money {
    color: #721c24;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 3px;
    padding: 1px 2px;
}

/* Màu cho cả hai */
.so-item.co-ca-hai {
    background: linear-gradient(135deg, #f3e5f5 0%, #e2d9f3 100%);
    border-color: #6f42c1;
}

.so-item.co-ca-hai .so-number {
    color: #3d1a78;
}

.so-item.co-ca-hai .so-money {
    color: #3d1a78;
    background: rgba(111, 66, 193, 0.1);
    border-radius: 3px;
    padding: 1px 2px;
    font-size: 9px;
}

/* KẾT QUẢ XUẤT COMPACT */
.export-options-compact {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.export-row {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.export-row:last-child {
    margin-bottom: 0;
}

.export-group {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.export-group label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
}

.radio-group-inline {
    display: flex;
    gap: 12px;
}

.radio-group-inline label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: normal;
}

.input-small {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.export-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
}

.export-result-compact {
    margin-top: 10px;
}

.export-result-compact textarea {
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
    min-height: 120px;
}

/* Phần nhập liệu */
.input-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8f9fa;
}

.input-section h4 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.input-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.form-group small {
    color: #666;
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
}

.radio-group {
    display: flex;
    gap: 15px;
    flex-direction: row !important;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9em;
}

/* Bulk input */
.bulk-input textarea {
    resize: vertical;
    min-height: 80px;
}

.bulk-input small {
    color: #666;
    font-size: 0.8em;
    margin-top: 5px;
    display: block;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #4fd1c7, #38b2ac);
    color: white;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Filter options */
.filter-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

/* Filter controls */
.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.9em;
}

.sort-controls {
    display: flex;
    gap: 10px;
}

.sort-controls select {
    padding: 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9em;
}

.filter-controls input[type="text"] {
    padding: 6px 10px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.9em;
    width: 150px;
}

/* Table */
.table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

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

.data-table th {
    background: #f7fafc;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}

.type-badge.lo {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.type-badge.de {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.notification.error {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.notification.warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
}

.notification.info {
    background: linear-gradient(135deg, #4fd1c7, #38b2ac);
}

/* Styles cho quản lý quy tắc */
.rule-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.rule-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.rule-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.rule-info {
    flex: 1;
}

.rule-name {
    font-weight: bold;
    color: #495057;
    font-size: 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-name::before {
    content: "🔧";
    font-size: 14px;
}

.rule-keywords {
    color: #007bff;
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 500;
}

.rule-numbers {
    color: #6c757d;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 5px 8px;
    border-radius: 4px;
    border-left: 3px solid #28a745;
}

.rule-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

.rule-actions button {
    padding: 8px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit-rule {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: white;
}

.btn-edit-rule:hover {
    background: linear-gradient(135deg, #e0a800, #d39e00);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.btn-delete-rule {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.btn-delete-rule:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.add-rule-section {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.add-rule-section h4 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.add-rule-section .form-group {
    margin-bottom: 18px;
}

.add-rule-section label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.add-rule-section input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

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

.add-rule-section small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    line-height: 1.4;
    font-style: italic;
}

.rule-examples {
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
}

.rule-examples h5 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-rules {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rule-example {
    background: white;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    border-left: 4px solid #28a745;
    line-height: 1.4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.rule-example:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rule-example::before {
    content: "💡 ";
    margin-right: 8px;
    font-size: 14px;
}

.rule-management {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.rule-management h5 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.rule-actions-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.rule-actions-group .btn {
    flex: 1;
    min-width: 140px;
    padding: 12px 16px;
    font-size: 13px;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.rule-actions-group .btn:hover {
    transform: translateY(-2px);
}

/* Responsive cho bảng 100 số */
@media (max-width: 768px) {
    .bang-100-improved {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .so-item {
        height: 40px;
        padding: 6px 3px;
        min-width: 35px;
    }
    
    .so-number {
        font-size: 12px;
    }
    
    .so-money {
        font-size: 8px;
    }
}

@media (max-width: 480px) {
    .bang-100-improved {
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
    }
    
    .so-item {
        height: 35px;
        padding: 4px 2px;
        min-width: 30px;
    }
    
    .so-number {
        font-size: 11px;
    }
    
    .so-money {
        font-size: 7px;
    }
}

/* Responsive cho export compact */
@media (max-width: 768px) {
    .export-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .export-group {
        min-width: auto;
        flex-wrap: wrap;
    }
    
    .radio-group-inline {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .export-actions {
        margin-left: 0;
        justify-content: center;
    }
}

/* Header responsive */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .user-info {
        flex: 1;
    }
    
    .user-menu {
        right: 20px;
        left: 20px;
        min-width: auto;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .right-column {
        order: -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section {
        padding: 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-controls input[type="text"] {
        width: 100%;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .rule-item {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .rule-actions {
        justify-content: center;
        margin-left: 0;
    }
    
    .rule-actions-group {
        flex-direction: column;
    }
    
    .rule-actions-group .btn {
        flex: none;
        width: 100%;
        min-width: auto;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
}

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

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

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

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

.section {
    animation: fadeIn 0.5s ease;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error states */
.success-highlight {
    background: rgba(72, 187, 120, 0.1);
    border-color: #48bb78;
    animation: successPulse 0.6s ease;
}

.error-highlight {
    background: rgba(245, 101, 101, 0.1);
    border-color: #f56565;
    animation: errorPulse 0.6s ease;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes errorPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* Advanced typography */
.section h3 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Enhanced focus styles for accessibility */
.tab-button:focus,
.rule-actions button:focus,
.add-rule-section input:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dark mode compatibility preparations */
@media (prefers-color-scheme: dark) {
    .rule-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .add-rule-section {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .rule-examples {
        background: linear-gradient(135deg, #4a5568, #2d3748);
    }
    
    .rule-example {
        background: #1a202c;
        color: #e2e8f0;
    }
} 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============= HEADER STYLES ============= */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.header h1 {
    color: #4a5568;
    font-size: 2.5em;
    margin: 0;
    font-weight: 700;
}

.header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.current-date {
    color: #666;
    font-size: 1.1em;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.user-avatar {
    font-size: 2em;
    color: #667eea;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    color: #4a5568;
    font-size: 1em;
}

.user-role {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* User Menu Dropdown */
.user-menu {
    position: fixed;
    top: 100px;
    right: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 1000;
    min-width: 280px;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

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

.user-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar-large {
    font-size: 3em;
    color: #667eea;
}

.user-info-detailed h4 {
    margin: 0 0 5px 0;
    color: #4a5568;
    font-size: 1.1em;
    font-weight: 600;
}

.user-info-detailed p {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9em;
    font-weight: 500;
}

.user-info-detailed small {
    color: #888;
    font-size: 0.8em;
}

.user-menu-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0;
}

.user-menu-actions {
    padding: 10px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
    color: #4a5568;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-menu-item:hover {
    background: #f8f9fa;
}

.user-menu-item.danger {
    color: #e53e3e;
}

.user-menu-item.danger:hover {
    background: #fed7d7;
}

.user-menu-item i {
    width: 16px;
    font-size: 1em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.modal-header h3 {
    color: #4a5568;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2em;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f3f4;
    color: #495057;
}

.modal-form {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Thống kê tổng quan */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

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

.stat-number {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

/* Layout chính */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    align-items: start;
}

/* Cột trái */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cột phải */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Section chung */
.section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h3 {
    color: #4a5568;
    font-size: 1.3em;
}

.section-header h3 i {
    color: #667eea;
    margin-right: 8px;
}

/* BẢNG 100 SỐ CẢI THIỆN - HIỂN THỊ ĐỦNG ĐÀN */
.bang-100-container-improved {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: visible;
    min-height: