/* ==========================================================================
   GLOBAL PREMIUM UI DESIGN OVERHAUL
   Transforms flat components into a vibrant, soft, modern application.
   ========================================================================== */

/* 1. Global Page Headers */
.page-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    border-radius: 20px !important;
    padding: 2rem 2.5rem !important;
    margin-bottom: 2.5rem !important;
    box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.4), 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    color: white !important;
    position: relative;
    overflow: hidden;
    border: none !important;
}

/* Glassmorphic overlay for depth */
.page-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
}

.page-header .page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.page-header h1 {
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 2.2rem !important;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header p {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1.05rem !important;
    margin-bottom: 0 !important;
    font-weight: 400;
}

/* 2. Global Data Cards (Soft UI) */
.data-card, .card {
    background: #ffffff !important;
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.03), 0 4px 10px -2px rgba(0, 0, 0, 0.02) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
    margin-bottom: 2rem !important;
    overflow: hidden;
}

.data-card:hover, .card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.05), 0 8px 15px -3px rgba(0, 0, 0, 0.03) !important;
}

.data-card-body, .card-body {
    padding: 1.75rem !important;
}

/* 3. Global Data Tables */
.table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
}

.table thead th {
    background-color: #f8fafc !important;
    color: #64748b !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.8rem !important;
    letter-spacing: 0.05em;
    padding: 1.25rem 1rem !important;
    border-top: none !important;
    border-bottom: 2px solid #f1f5f9 !important;
}

.table thead th:first-child { border-top-left-radius: 12px; }
.table thead th:last-child { border-top-right-radius: 12px; }

.table tbody td {
    padding: 1.25rem 1rem !important;
    vertical-align: middle !important;
    color: #334155 !important;
    border-bottom: 1px dashed #e2e8f0 !important;
    font-weight: 500;
    transition: background-color 0.2s;
}

.table tbody tr:last-child td {
    border-bottom: none !important;
}

.table tbody tr {
    transition: all 0.2s ease !important;
}

.table tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* 4. Buttons */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
}

.btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35) !important;
}

.btn-outline-danger {
    color: #ef4444 !important;
    border-color: #fca5a5 !important;
    border-radius: 10px !important;
    transition: all 0.2s !important;
}

.btn-outline-danger:hover {
    background-color: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #dc2626 !important;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.15) !important;
}

/* 5. Modals */
.modal-backdrop {
    background-color: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(5px);
}

.modal-content {
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1.5rem 2rem !important;
}

.modal-header .modal-title {
    font-weight: 700 !important;
    color: #0f172a !important;
}

.modal-body {
    padding: 2rem !important;
}

.modal-footer {
    border-top: 1px solid #f1f5f9 !important;
    padding: 1.5rem 2rem !important;
    background: #f8fafc !important;
}

/* 6. Form Inputs */
.form-control, .form-select {
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 0.7rem 1rem !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    background-color: #fff !important;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.form-label {
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.9rem !important;
}

/* 7. Badges */
.badge {
    padding: 0.5em 0.8em !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
}

.badge.bg-success { background-color: #d1fae5 !important; color: #065f46 !important; }
.badge.bg-warning { background-color: #fef3c7 !important; color: #92400e !important; }
.badge.bg-danger { background-color: #fee2e2 !important; color: #991b1b !important; }
.badge.bg-info { background-color: #dbeafe !important; color: #1e40af !important; }
.badge.bg-secondary { background-color: #f1f5f9 !important; color: #475569 !important; }
