/* ========== Modern UI — Shared styles ========== */

/* Page Header */
.page-header-gradient {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.page-header-gradient__inner {
    background: linear-gradient(135deg, #153863 0%, #1e4a7a 50%, #2a5f8f 100%);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header-gradient__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.page-header-gradient__subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0.25rem 0 0;
}

.page-header-gradient__icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.2);
}

/* Navigation Tabs */
.nav-tabs-modern {
    border: none;
    gap: 0.5rem;
    padding: 0;
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.nav-tabs-modern .nav-link {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-tabs-modern .nav-link:hover {
    border-color: #153863;
    color: #153863;
    background: #f0f7ff;
}

.nav-tabs-modern .nav-link.active {
    background: #153863;
    color: #fff;
    border-color: #153863;
}

/* Cards */
.modern-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: visible;
    margin-bottom: 1.5rem;
}

.modern-card .card-body {
    padding: 1.75rem;
}

.modern-card__section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-card__section-title i {
    color: #153863;
    font-size: 1.1rem;
}

/* Divider */
.modern-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 0.5rem 0 1.25rem;
}

/* Form Fields */
.modern-field {
    margin-bottom: 1.25rem;
}

.modern-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.4rem;
}

.modern-field .form-control {
    height: 44px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modern-field .form-control:focus {
    border-color: #153863;
    box-shadow: 0 0 0 3px rgba(21, 56, 99, 0.1);
}

.modern-field textarea.form-control {
    height: auto;
    min-height: 80px;
}

.modern-field select.form-control.show-tick {
    display: none !important;
}

.modern-field .bootstrap-select {
    width: 100% !important;
    position: relative;
    z-index: 10;
}

.modern-field .bootstrap-select.open {
    z-index: 1050;
}

.modern-field .bootstrap-select > .dropdown-toggle {
    height: 44px;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 0.9rem;
    background: #fff !important;
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none !important;
}

.modern-field .bootstrap-select > .dropdown-toggle:focus,
.modern-field .bootstrap-select > .dropdown-toggle:active,
.modern-field .bootstrap-select.open > .dropdown-toggle {
    border-color: #153863 !important;
    box-shadow: 0 0 0 3px rgba(21, 56, 99, 0.1) !important;
    outline: none !important;
}

.modern-field .bootstrap-select .dropdown-menu {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
}

.modern-field .bootstrap-select .dropdown-menu li a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.modern-field .bootstrap-select .dropdown-menu li.selected a,
.modern-field .bootstrap-select .dropdown-menu li a:hover {
    background: #f0f7ff;
    color: #153863;
}

/* Submit / Filter Buttons */
.btn-modern {
    background: linear-gradient(135deg, #153863 0%, #1e4a7a 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 2.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(21, 56, 99, 0.3);
    color: #fff;
}

.btn-modern--success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.btn-modern--success:hover {
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.3);
}

.btn-modern--danger {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.btn-modern--danger:hover {
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
}

.btn-modern--warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.btn-modern--warning:hover {
    box-shadow: 0 4px 16px rgba(217, 119, 6, 0.3);
}

/* Table */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.table-modern tbody tr {
    transition: background 0.15s;
}

.table-modern tbody tr:hover {
    background: #f0f7ff;
}

.table-modern tbody td {
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Badges */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-modern--success {
    background: #ecfdf5;
    color: #059669;
}

.badge-modern--danger {
    background: #fef2f2;
    color: #dc2626;
}

.badge-modern--info {
    background: #eff6ff;
    color: #2563eb;
}

.badge-modern--warning {
    background: #fffbeb;
    color: #d97706;
}

.badge-modern--purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.badge-modern--secondary {
    background: #f1f5f9;
    color: #475569;
}

.badge-modern--primary {
    background: #eff6ff;
    color: #2563eb;
}

/* Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-size: 0.9rem;
    transition: all 0.15s;
    padding: 0;
    margin: 0 2px;
    text-decoration: none;
    flex-shrink: 0; 
}

.btn-action:hover {
    border-color: #153863;
    color: #153863;
    background: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(21, 56, 99, 0.12);
    text-decoration: none;
}

.btn-action--danger:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.12);
}

.btn-action--success:hover {
    border-color: #059669;
    color: #059669;
    background: #ecfdf5;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.12);
}

.btn-action--warning:hover {
    border-color: #d97706;
    color: #d97706;
    background: #fffbeb;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.12);
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
    min-width: max-content;
}
/* Pagination */
.pagination-modern .pagination {
    gap: 0.25rem;
}

.pagination-modern .page-link {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    transition: all 0.15s;
}

.pagination-modern .page-link:hover {
    border-color: #153863;
    color: #153863;
    background: #f0f7ff;
}

.pagination-modern .page-item.active .page-link {
    background: #153863;
    border-color: #153863;
    color: #fff;
}

/* Alert */
.alert-modern {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-modern--success {
    background: #ecfdf5;
    color: #065f46;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.12);
}

.alert-modern--danger {
    background: #fef2f2;
    color: #991b1b;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

/* Empty State */
.modern-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
}

.modern-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.modern-empty p {
    font-size: 1rem;
    margin: 0;
    color: #64748b;
    font-weight: 500;
}

/* Validation errors */
.modern-field .is-invalid {
    border-color: #dc2626 !important;
}

.modern-field .text-danger {
    font-size: 0.78rem;
    margin-top: 0.3rem;
    display: block;
}

/* Per-page selector */
.per-page-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
}

.per-page-selector select {
    width: 70px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header-gradient__inner {
        padding: 1.25rem 1.5rem;
    }
    .page-header-gradient__title {
        font-size: 1.15rem;
    }
    .nav-tabs-modern {
        gap: 0.35rem;
    }
    .nav-tabs-modern .nav-link {
        font-size: 0.8rem;
        padding: 0.45rem 1rem;
    }
}
