/* ============================================
   MODERN DESIGN ENHANCEMENTS - PREMIUM THEME
   Version: 2.0
   ============================================ */

/* ========== MODERN COLOR VARIABLES ========== */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --success-color: #11998e;
    --danger-gradient: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --danger-color: #eb3349;
    --info-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --info-color: #4facfe;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.08);
    --border-radius: 10px;
    --transition-speed: 0.3s;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
}

/* ========== GLOBAL IMPROVEMENTS ========== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    color: var(--text-primary) !important;
    background: #f7fafc !important;
    line-height: 1.6 !important;
}

/* ========== MODERN CARDS ========== */
.card {
    border-radius: var(--border-radius) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--card-shadow) !important;
    transition: all var(--transition-speed) ease !important;
    overflow: hidden;
    background: white;
}

.card:hover {
    box-shadow: var(--card-shadow-hover) !important;
    border-color: #cbd5e0 !important;
}

.card-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.25rem 1.5rem !important;
    font-weight: 600;
    color: var(--text-primary) !important;
    font-size: 1rem;
}

.card-body {
    padding: 1.5rem !important;
    background: white;
}

/* ========== CLEAN MODERN BUTTONS ========== */
.btn {
    border-radius: 8px !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 500 !important;
    transition: all var(--transition-speed) ease !important;
    border: none !important;
    letter-spacing: 0.3px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background: #5568d3 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.btn-success {
    background: var(--success-color) !important;
    color: white !important;
}

.btn-success:hover {
    background: #0f8278 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3) !important;
}

.btn-danger {
    background: var(--danger-color) !important;
    color: white !important;
}

.btn-danger:hover {
    background: #d42d40 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(235, 51, 73, 0.3) !important;
}

.btn-info {
    background: var(--info-color) !important;
    color: white !important;
}

.btn-info:hover {
    background: #3a96e7 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3) !important;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.btn-outline-danger {
    border: 2px solid var(--danger-color) !important;
    color: var(--danger-color) !important;
    background: transparent !important;
}

.btn-outline-danger:hover {
    background: var(--danger-color) !important;
    color: white !important;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #718096 !important;
    color: white !important;
}

.btn-secondary:hover {
    background: #5a6c7d !important;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem !important;
    font-size: 0.875rem !important;
}

/* ========== CLEAN MODERN TABLES ========== */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
    border: 1px solid var(--border-color);
}

.table thead th {
    background: #fafbfc !important;
    color: #4a5568 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1rem 1.25rem !important;
}

.table-hover tbody tr {
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.table-hover tbody tr:hover {
    background-color: #f7fafc !important;
    border-left-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
}

.table tbody td {
    padding: 1rem 1.25rem !important;
    vertical-align: middle !important;
    border-color: #f0f0f0 !important;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.table tbody td a {
    color: var(--primary-color);
    font-weight: 500;
}

.table tbody td a:hover {
    color: #5568d3;
    text-decoration: underline !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent !important;
}

/* ========== MODERN BADGES ========== */
.badge {
    border-radius: 6px !important;
    padding: 0.4rem 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    font-size: 0.75rem !important;
}

.badge-success {
    background: #48bb78 !important;
    color: white !important;
}

.badge-warning {
    background: #ed8936 !important;
    color: white !important;
}

.badge-secondary {
    background: #a0aec0 !important;
    color: white !important;
}

.badge-primary {
    background: var(--primary-color) !important;
    color: white !important;
}

.badge-info {
    background: var(--info-color) !important;
    color: white !important;
}

/* ========== MODERN FORMS ========== */
.form-control {
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.75rem 1rem !important;
    transition: all var(--transition-speed) ease !important;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.form-group label {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.875rem;
}

.form-text {
    color: var(--text-secondary) !important;
    font-size: 0.8rem;
}

/* ========== MODERN SHADOWS ========== */
.shadow-sm {
    box-shadow: var(--card-shadow) !important;
}

.shadow {
    box-shadow: var(--card-shadow-hover) !important;
}

/* ========== MODERN STATS CARDS ========== */
.card .position-relative.bg-primary {
    background: var(--primary-gradient) !important;
    border-radius: 10px;
}

/* Large stat numbers */
[style*="font-size: 2rem"] {
    font-weight: 700 !important;
    color: var(--primary-color) !important;
}

/* ========== MODERN ALERTS ========== */
.alert {
    border-radius: var(--border-radius) !important;
    border: 1px solid !important;
    padding: 1rem 1.25rem !important;
    box-shadow: var(--card-shadow);
}

.alert-info {
    background: #ebf8ff !important;
    border-color: #bee3f8 !important;
    color: #2c5282 !important;
}

.alert-success {
    background: #f0fff4 !important;
    border-color: #c6f6d5 !important;
    color: #22543d !important;
}

.alert-danger {
    background: #fff5f5 !important;
    border-color: #fed7d7 !important;
    color: #742a2a !important;
}

.alert-warning {
    background: #fffaf0 !important;
    border-color: #feebc8 !important;
    color: #7c2d12 !important;
}

/* ========== MODERN NAVIGATION ========== */
.navbar {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    background: white !important;
}

.nav-link {
    font-weight: 500 !important;
    transition: all var(--transition-speed) ease !important;
    border-radius: 6px;
    margin: 0 0.25rem;
    color: var(--text-primary) !important;
}

.nav-link:hover, .nav-link.active {
    background: rgba(102, 126, 234, 0.1) !important;
    color: var(--primary-color) !important;
}

/* ========== MODERN MODALS ========== */
.modal-content {
    border-radius: var(--border-radius) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.modal-header {
    background: #fafbfc !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.25rem 1.5rem !important;
}

.modal-header .close {
    color: var(--text-primary) !important;
    opacity: 0.6;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem !important;
}

.modal-footer {
    background: #fafbfc !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 1rem 1.5rem !important;
}

/* ========== MODERN PAGINATION ========== */
.pagination .page-link {
    border-radius: 6px !important;
    margin: 0 0.25rem;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    transition: all var(--transition-speed) ease !important;
    padding: 0.5rem 0.75rem;
}

.pagination .page-link:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.pagination .page-item.disabled .page-link {
    background: #f7fafc !important;
    color: #cbd5e0 !important;
}

/* ========== DATATABLES MODERN STYLING ========== */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 0.25rem !important;
    padding: 0.5rem 0.75rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    border: none !important;
}

.dataTables_wrapper .dataTables_info {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
}

/* ========== MODERN ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.card, .table, .alert {
    animation: fadeIn 0.3s ease;
}

/* ========== MODERN SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* ========== MODERN TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    line-height: 1.3 !important;
}

h1 { font-size: 2rem !important; }
h2 { font-size: 1.75rem !important; }
h3 { font-size: 1.5rem !important; }
h4 { font-size: 1.25rem !important; }
h5 { font-size: 1.1rem !important; }
h6 { font-size: 1rem !important; }

.font-weight-medium {
    font-weight: 500 !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* ========== IMPROVED BUTTON GROUPS ========== */
.btn-group .btn {
    margin: 0 !important;
}

.btn-group .btn:first-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.btn-group .btn:last-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0 !important;
}

/* ========== MODERN LINKS ========== */
a {
    transition: all var(--transition-speed) ease !important;
    color: var(--primary-color) !important;
}

a:hover {
    color: #5568d3 !important;
}

/* ========== MODERN BREADCRUMBS ========== */
.breadcrumb {
    background: transparent !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
}

.breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* ========== IMPROVED SPACING ========== */
.container {
    max-width: 1200px;
}

/* ========== RESPONSIVE ENHANCEMENTS ========== */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem !important;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* ========== EMPTY STATE STYLING ========== */
.card-body:empty::before {
    content: "No data available";
    color: var(--text-secondary);
    font-style: italic;
}

/* ========== LOADING STATES ========== */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========== UTILITY CLASSES ========== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-light {
    background: var(--bg-light) !important;
}

.border-radius-lg {
    border-radius: var(--border-radius) !important;
}
