/* Modern List Styles */
.modern-page-container {
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.modern-page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.modern-page-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-page-title-icon {
    font-size: 1.25rem;
}

.modern-page-subtitle {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin: 0.25rem 0 0 0;
    display: none; /* Ẩn subtitle để gọn hơn */
}

.modern-toolbar {
    background: white;
    border-radius: 8px;
    padding: 0.875rem;
    margin-bottom: 0.875rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 0.625rem;
    align-items: center;
    flex-wrap: wrap;
}

.modern-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.modern-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

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

.modern-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.25rem;
}

.modern-filter-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.modern-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.modern-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.modern-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.modern-btn-secondary:hover {
    background: #667eea;
    color: white;
}

.modern-btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.modern-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 63, 94, 0.4);
}

.modern-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.modern-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.modern-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.modern-card-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modern-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-card-actions {
    display: flex;
    gap: 0.5rem;
}

.modern-table-container {
    overflow-x: auto;
}

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

.modern-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
}

.modern-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.modern-table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.001);
}

.modern-table td {
    padding: 1rem 1.25rem;
    color: #334155;
    font-size: 0.9375rem;
}

.modern-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.modern-badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.modern-badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.modern-badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.modern-badge-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.modern-badge-purple {
    background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
    color: #6b21a8;
}

.modern-action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.modern-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s ease;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.modern-icon-btn svg {
    width: 16px;
    height: 16px;
    display: block;
}

.modern-icon-btn-view {
    background: #e8f5e9;
    color: #2e7d32;
}

.modern-icon-btn-view:hover {
    background: #c8e6c9;
    color: #1b5e20;
    transform: scale(1.08);
}

.modern-icon-btn-edit {
    background: #f1f3f5;
    color: #495057;
}

.modern-icon-btn-edit:hover {
    background: #e2e6ea;
    color: #212529;
    transform: scale(1.08);
}

.modern-icon-btn-delete {
    background: #fff5f5;
    color: #e03131;
}

.modern-icon-btn-delete:hover {
    background: #ffe3e3;
    color: #c92a2a;
    transform: scale(1.08);
}

.modern-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.modern-pagination-info {
    color: #64748b;
    font-size: 0.875rem;
}

.modern-pagination-buttons {
    display: flex;
    gap: 0.5rem;
}

.modern-pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.modern-pagination-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.modern-pagination-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.modern-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.modern-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.modern-empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.modern-empty-text {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.modern-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.modern-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.modern-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.modern-stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modern-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modern-stat-icon-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.modern-stat-icon-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.modern-stat-icon-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.modern-stat-icon-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.modern-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.modern-stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.modern-loading {
    text-align: center;
    padding: 3rem;
}

.modern-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f1f5f9;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.modern-loading-text {
    color: #64748b;
    font-size: 0.9375rem;
}

/* Admin page container overrides - gọn hơn khi dùng trong app layout */
.content-area .modern-page-container {
    padding: 0;
    max-width: 100%;
}

.content-area .modern-page-header {
    margin-bottom: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-page-container {
        padding: 1rem;
    }

    .modern-page-header {
        padding: 1.5rem;
    }

    .modern-page-title {
        font-size: 1.5rem;
    }

    .modern-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-search-box {
        width: 100%;
    }

    .modern-filter-group {
        flex-direction: column;
        width: 100%;
    }

    .modern-btn {
        width: 100%;
        justify-content: center;
    }

    .modern-table-container {
        overflow-x: scroll;
    }

    .modern-pagination {
        flex-direction: column;
        gap: 1rem;
    }

    .modern-stats-grid {
        grid-template-columns: 1fr;
    }
}

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

.modern-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Custom Scrollbar */
.modern-table-container::-webkit-scrollbar {
    height: 8px;
}

.modern-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modern-table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modern-table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
