/*
 * Portal theme - the design system of the EU pilot portal
 * (eu_pilot_portal/portal/adda_portal/templates/dashboard_client.html, "PREMIUM MODERN UI DESIGN SYSTEM").
 * Loaded by every template after its own <style>, so it restyles the existing markup;
 * no page logic depends on it.
 */

/* ============================================ */
/* PREMIUM MODERN UI DESIGN SYSTEM */
/* ============================================ */

/* Base body with subtle gradient background */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    position: relative;
}

/* Subtle animated background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}


/* Enhanced jumbotron header - Full width */
.jumbotron {
    background: white !important;
    height: 100px !important;
    padding: 20px 90px !important;
    margin: 0 !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    border-bottom: 1px solid #e8ecf1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
}

.jumbotron h3 {
    margin: 0;
    padding-left: 0;
    color: #1e293b !important;
    font-weight: 700;
    font-size: 24px;
    position: relative;
    z-index: 2;
    display: block;
}

.jumbotron::before {
    /* Disabled shimmer animation for white background */
    display: none;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Premium Modern Card Styles - Static (no hover animations) */
.card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    border: 1px solid #e8ecf1 !important;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
    position: relative;
    overflow: hidden;
}

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

/* Premium gradient accent bar */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    opacity: 0.3;
}

/* Subtle shine effect on hover */
.card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

/* Removed hover effects - cards are now static */
.card:hover {
    /* No changes on hover */
}

.card:hover::before {
    /* No changes on hover */
}

.card:hover::after {
    /* No changes on hover */
}

/* Premium Card Color Variants with Glow Effects */
.card.bg-info::before {
    background: linear-gradient(180deg, #4F46E5 0%, #6366F1 100%) !important;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.card.bg-secondary::before {
    background: linear-gradient(180deg, #64748B 0%, #94A3B8 100%) !important;
    box-shadow: 0 0 20px rgba(100, 116, 139, 0.3);
}

.card.bg-primary::before {
    background: linear-gradient(180deg, #3B82F6 0%, #60A5FA 100%) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.card.bg-success::before {
    background: linear-gradient(180deg, #10B981 0%, #34D399 100%) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.card.bg-danger::before {
    background: linear-gradient(180deg, #EF4444 0%, #F87171 100%) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.card.bg-warning::before {
    background: linear-gradient(180deg, #F59E0B 0%, #FBBF24 100%) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.card.text-white {
    color: #1e293b !important;
}

.card.text-white h1,
.card.text-white h4,
.card.text-white p {
    color: #1e293b !important;
}

/* Statistics Cards Container */
.cardc {
    /* Animation removed */
}

.cardc .card {
    /* Animation removed */
}

/* Enhanced Statistics Numbers with Counter Animation */
.card h1 {
    font-size: 3rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    letter-spacing: -1px;
    line-height: 1;
    margin: 12px 0 !important;
}

.card h6.card-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px;
    color: #64748B !important;
    margin-bottom: 8px !important;
}

/* Premium Modern Button Styles with Ripple Effect */
.btn {
    border-radius: 10px !important;
    padding: 11px 24px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-transform: none !important;
    letter-spacing: 0.3px;
    white-space: nowrap !important;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    transform: translateY(-2px) scale(1.02);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Premium Button Color Variants with Gradients */
.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4) !important;
}

.btn-secondary {
    background: #64748B !important;
    color: white !important;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569 !important;
}

.btn-success {
    background: #10B981 !important;
    color: white !important;
}

.btn-success:hover:not(:disabled) {
    background: #059669 !important;
}

.btn-danger {
    background: #EF4444 !important;
    color: white !important;
}

.btn-danger:hover:not(:disabled) {
    background: #DC2626 !important;
}

.btn-warning {
    background: #F59E0B !important;
    color: white !important;
}

.btn-warning:hover:not(:disabled) {
    background: #D97706 !important;
}

.btn-info {
    background: #6366F1 !important;
    color: white !important;
}

.btn-info:hover:not(:disabled) {
    background: #4F46E5 !important;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
}

.btn-lg {
    padding: 14px 28px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
}

/* Badge improvements */
.badge {
    border-radius: 8px !important;
    padding: 6px 14px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.01em;
    display: inline-block;
    margin: 3px 4px;
    transition: all 0.2s ease;
}

.badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-pill {
    border-radius: 20px !important;
    padding: 6px 16px !important;
    font-size: 14px !important;
}

.badge-primary { background: #3B82F6 !important; color: white !important; }
.badge-success { background: #10B981 !important; color: white !important; }
.badge-warning { background: #F59E0B !important; color: white !important; }
.badge-danger { background: #EF4444 !important; color: white !important; }
.badge-secondary { background: #64748B !important; color: white !important; }
.badge-info { background: #6366F1 !important; color: white !important; }

/* Modal improvements */
.modal-content {
    border-radius: 12px !important;
    border: 1px solid #e8ecf1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.modal-header {
    border-bottom: 2px solid #f1f5f9 !important;
    padding: 20px 24px !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 2px solid #f1f5f9 !important;
    padding: 16px 24px !important;
}

.bulkModalMain,
.modalMainC {
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Input improvements */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
textarea {
    border: 1px solid #e8ecf1 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    transition: all 0.2s ease !important;
    background: white;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

/* Premium Table Design with Hover Effects */
.claimlistc {
    background: white !important;
    border-radius: 16px !important;
    border: 1px solid #e8ecf1 !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    overflow: hidden;
    margin-top: 10px !important;
    animation: fadeInUp 0.6s ease;
}

table {
    border-radius: 0 !important;
    overflow: hidden;
    background: white;
    box-shadow: none !important;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    opacity: 0.3;
}

th {
    background: transparent !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px;
    padding: 16px 14px !important;
    border-bottom: none !important;
}

tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

tbody tr::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #f1f5f9;
}

tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.03) 0%, rgba(255, 255, 255, 0) 100%) !important;
    transform: scale(1.005);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 1;
}

tbody tr:hover::after {
    background: linear-gradient(90deg, #667eea 0%, transparent 100%);
    height: 2px;
}

td {
    color: #475569 !important;
    padding: 14px !important;
    font-size: 14px;
    vertical-align: middle;
}

tr:hover {
    background: #f8fafc !important;
}

/* Improved headings */
h1, h2, h3, h4, h5, h6 {
    color: #1e293b;
    font-weight: 600;
}

h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}


/* Removed white background override to allow gradient to show */

/* Container improvements */
.claimlistc {
    background: white !important;
    border-radius: 12px !important;
    border: 1px solid #e8ecf1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}

/* Warning popup modern styling */
.warning-popup {
    border-radius: 12px !important;
    border: 1px solid #e8ecf1 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
}

.warning-popup-inner button {
    background-color: #3B82F6 !important;
    border-radius: 6px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.warning-popup-inner button:hover {
    background-color: #2563EB !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25) !important;
}

/* Bulk upload section improvements */
.bulk-upload-section {
    border-radius: 12px !important;
    border: 2px dashed #cbd5e1 !important;
    background: white !important;
    transition: all 0.2s ease;
}

.bulk-upload-section.drag-over {
    border-color: #3B82F6 !important;
    background: #eff6ff !important;
}

.thumbnail-item {
    border-radius: 8px !important;
    border: 1px solid #e8ecf1 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.2s ease !important;
}

.thumbnail-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px);
}

.thumbnail-remove {
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

/* View all button improvements */
.view-all-btn {
    background-color: #3B82F6 !important;
    border-radius: 6px !important;
    padding: 6px 16px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
}

.view-all-btn:hover {
    background-color: #2563EB !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25) !important;
    transform: translateY(-1px);
}

/* Improve text readability */
p {
    color: #475569;
}

/* Loading screen */
#loading, #loading1 {
    background-color: #f5f7fa !important;
}

/* Close button improvements */
.close {
    transition: all 0.2s ease;
}

.close:hover {
    transform: scale(1.1);
}

/* Form group improvements */
.form-group-inline input {
    border: 1px solid #e8ecf1 !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
}

.form-group-inline input:focus {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Optional upload box improvements */
.optional-upload-box {
    border-radius: 8px !important;
    border: 2px dashed #cbd5e1 !important;
    transition: all 0.2s ease !important;
}

.optional-upload-box:hover {
    border-color: #3B82F6 !important;
    background: #f8fafc !important;
}

/* Success message improvements */
.upload-success {
    border-radius: 8px !important;
    background: #dcfce7 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

/* Premium Filter Section with Glassmorphism */
.tabletopc {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    border-radius: 16px !important;
    padding: 24px !important;
    margin: 20px auto 0 !important;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeInDown 0.5s ease;
    gap: 20px !important;
    align-items: center !important;
}

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

/* Premium filter dropdown with enhanced styling */
.custom-select,
#filter_by_status {
    min-width: 14rem !important;
    width: 14rem !important;
    padding: 12px 40px 12px 18px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    text-overflow: clip !important;
    height: auto !important;
    line-height: 1.5 !important;
    background: white !important;
    border: 2px solid #e8ecf1 !important;
    border-radius: 10px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.custom-select:hover,
#filter_by_status:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}

.custom-select:focus,
#filter_by_status:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
    transform: translateY(-1px);
}

.custom-select option,
#filter_by_status option {
    padding: 10px !important;
    white-space: normal !important;
    background: white;
    font-weight: 500;
}

.fcsel {
    flex-shrink: 0;
    min-width: 14rem;
}

.fclbl {
    font-weight: 600 !important;
    color: #334155 !important;
    letter-spacing: 0.3px;
    font-size: 14px !important;
}

/* Country Dropdown Styling */
#country_list_dropdown {
    position: relative;
    z-index: 10000 !important;
}

#country_list_dropdown .bootstrap-select {
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    z-index: 10000 !important;
}

#country_list_dropdown .bootstrap-select.open {
    z-index: 999999 !important;
}

#country_list_dropdown .bootstrap-select.open .dropdown-menu {
    z-index: 999999 !important;
}

#country_list_dropdown .bootstrap-select .btn {
    border: 2px solid #e8ecf1 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    background: white !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.3s ease !important;
    position: relative;
    z-index: 9999;
}

#country_list_dropdown .bootstrap-select .btn:hover,
#country_list_dropdown .bootstrap-select .btn:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

#country_list_dropdown .bootstrap-select .dropdown-menu {
    z-index: 999999 !important;
    border: 2px solid #e8ecf1 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    margin-top: 4px !important;
    position: absolute !important;
    max-height: none !important;
    overflow-y: visible !important;
    background-color: white !important;
    min-height: 0 !important;
    height: auto !important;
}

#country_list_dropdown .bootstrap-select .dropdown-menu .inner {
    max-height: none !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: visible !important;
}

#country_list_dropdown .bs-searchbox {
    padding: 8px !important;
    margin: 0 !important;
}

#country_list_dropdown .bootstrap-select.open .dropdown-menu {
    display: block !important;
    visibility: visible !important;
}

#country_list_dropdown .bootstrap-select .dropdown-menu li {
    display: block !important;
    visibility: visible !important;
}

#country_list_dropdown .bootstrap-select .dropdown-menu li a {
    padding: 10px 16px !important;
    color: #334155 !important;
    transition: all 0.2s ease !important;
    display: block !important;
    visibility: visible !important;
}

#country_list_dropdown .bootstrap-select .dropdown-menu li a:hover {
    background-color: #f1f5f9 !important;
    color: #3b82f6 !important;
}

#country_list_dropdown .bootstrap-select .dropdown-menu li.selected a {
    background-color: #3b82f6 !important;
    color: white !important;
}

/* Ensure table doesn't overlap dropdowns */
.claimlistc {
    position: relative;
    z-index: auto;
}

/* Ensure dropdown container has proper stacking */
#country_list_dropdown {
    position: relative;
    z-index: 10000 !important;
}

/* Ensure the tabletopc container allows dropdown overflow */
.tabletopc {
    position: relative;
    z-index: 10000;
    overflow: visible !important;
}

/* Premium Pagination */
.pagination {
    gap: 8px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    border: 2px solid #e8ecf1 !important;
    background: white !important;
    color: #64748B !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pagination a:hover {
    border-color: #667eea !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.05) 100%) !important;
    color: #667eea !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2) !important;
}

.pagination .active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    padding: 8px 14px !important;
}

.pagination .active .page-link:hover {
    transform: translateY(-2px);
}

/* the selected page (simplePagination renders it as <li class="active"><span class="current">) */
.pagination li.active span.current,
.pagination li.active .current {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #fff !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35) !important;
    cursor: default;
}
/* keep the page buttons on one centred row */
.paginationph .pagination { width: auto !important; display: inline-block; }
.paginationph .pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 0; margin: 0; }
.paginationph .pagination li { float: none !important; margin: 0 !important; }
/* Prev / Next when there is no page that way */
.pagination li.disabled span.current { opacity: .45; cursor: not-allowed; }

/* ============================================ */
/* DHOFAR PORTAL ADAPTATIONS                    */
/* ============================================ */

/* One white header like the EU portal: the logo bar (.logo_part) sits on top of the
   title bar (.jumbotron) instead of being a grey strip above it; logos on the right. */
.topc { position: relative; }
.topc .logo_part {
    position: absolute !important;
    top: 0; left: 0; right: 0;
    height: 100px;
    padding: 0 20px !important;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    z-index: 3;
    pointer-events: none;
}
.topc .logo_part img, .topc .logo_part a { pointer-events: auto; }
.topc .logo_part .logo {
    float: none !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
    max-height: 64px;
    width: auto;
}
.topc .logo_part #camcomlogo { max-width: 60px; }
.topc .jumbotron { padding-right: 200px !important; }

/* Stat cards: dhofar uses h4/h5 titles and a plain number (EU: small uppercase label, dark number) */
.card h4.card-title, .card h5.card-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px;
    color: #64748B !important;
    margin-bottom: 8px !important;
}
.cardc .card h1 {
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    color: #1e293b !important;
    font-size: 2rem !important;
    text-shadow: none !important;
}

/* Part rows on the review pages keep their damage colour (bg-*) and white text:
   the EU white card look applies to panels and stat cards, not to these rows. */
.card.part-card {
    padding: 0 !important;
    border-radius: 10px !important;
    animation: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 8px !important;
}
.card.part-card::before, .card.part-card::after { display: none !important; }
.card.part-card.bg-danger    { background: linear-gradient(135deg, #EF4444 0%, #F87171 100%) !important; color: #fff !important; }
.card.part-card.bg-warning   { background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%) !important; color: #fff !important; }
.card.part-card.bg-secondary { background: linear-gradient(135deg, #475569 0%, #64748B 100%) !important; color: #fff !important; }
.card.part-card.bg-success   { background: linear-gradient(135deg, #10B981 0%, #34D399 100%) !important; color: #fff !important; }
.card.part-card.bg-info      { background: linear-gradient(135deg, #06B6D4 0%, #22D3EE 100%) !important; color: #fff !important; }
.card.part-card.bg-primary, .parts-card.bg-primary { background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important; color: #fff !important; }
.card.part-card[class*="bg-"] .card-subtitle, .card.part-card[class*="bg-"] h5, .card.part-card[class*="bg-"] h6 { color: inherit !important; }
.card.part-card.card-selected { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35) !important; }

/* Login / password pages: white rounded panel instead of the grey box */
.mainC {
    background: #fff !important;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    padding-bottom: 12px;
}

/* Form pages (add / edit user, partner, client): EU panel and title */
fieldset {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e8ecf1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}
fieldset legend {
    padding: 12px 24px !important;
    font-size: 20px !important;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    letter-spacing: 0.3px;
    width: auto;
}

/* Inputs: EU borders and focus ring (sizes stay as each page sets them) */
.form-control, .custom-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    color: #1e293b;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.form-control:hover:not(:focus), .custom-select:hover:not(:focus) { border-color: #cbd5e1; background-color: #fff; }
.form-control:focus, .custom-select:focus {
    background-color: #fff;
    border-color: #3B82F6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Part rows: part name left, score right, vertically centred */
.card.part-card .card-body.parts-card {
    padding: 10px 16px !important;
    align-items: center;
    min-height: 44px;
}
.card.part-card .card-body.parts-card h5,
.card.part-card .card-body.parts-card h6 {
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: 1.3;
}
.card.part-card:not([class*="bg-"]) .card-body.parts-card h5,
.card.part-card:not([class*="bg-"]) .card-body.parts-card h6 { color: #1e293b !important; }

/* Stat cards (card-rm) everywhere: EU white card with the coloured edge, height from content.
   Covers pages that colour them with their own theme (e.g. the case review page). */
.cardc .card.card-rm,
.cardc .card.card-rm[class*="bg-"] {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%) !important;
    color: #1e293b !important;
    height: auto !important;
    min-height: 105px;
}
.cardc .card.card-rm p, .cardc .card.card-rm .card-text,
.cardc .card.card-rm h4, .cardc .card.card-rm h5, .cardc .card.card-rm h6 { color: #475569 !important; }
.cardc .card.card-rm .card-body { box-shadow: none !important; background: transparent !important; padding: 0 !important; }
/* keep the score pushed to the right of the part name */
.card.part-card .card-body.parts-card h5 { margin-left: auto !important; padding-left: 12px; }

/* Header stays above content that slides under it (home page hero image uses a negative margin) */
.topc { z-index: 5; background: #fff; }

/* White headings on the dark banner of the client pages */
.banner h1, .banner h2, .banner h3 { color: #fff !important; }

/* Logo bars outside .topc (e.g. summary page): white like the EU header */
.logo_part { background: #fff !important; border-bottom: 1px solid #e8ecf1; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.topc .logo_part { border-bottom: none; box-shadow: none; }

/* Login boxes wrap their fields in a plain <fieldset>: no inner panel there */
.mainC fieldset {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
.mainC .form-group label { font-weight: 600; color: #334155; margin-bottom: 6px; }
.mainC .form-control { height: auto; padding: 10px 14px; background-color: #fff; }

/* Review page headers: buttons size to their text (the pages give them fixed % widths) */
.tabletopc3 .btn { width: auto !important; min-width: 96px; white-space: nowrap; padding: 10px 18px !important; line-height: 1.25; }

/* Review page header (.tabletopc3, 13 pages): one aligned row that wraps on small screens.
   The pages float each button with its own margins and give the middle block a fixed 70%. */
.tabletopc3 {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    width: auto !important;
    padding: 16px 24px;
    margin: 0;
}
.tabletopc3 > .btn, .tabletopc3 > button { float: none !important; margin: 0 !important; }
.tabletopc3 > .tabletopc2 { flex: 1 1 160px; width: auto !important; margin: 0 !important; min-width: 0; }
.tabletopc3 > .tabletopc2 > div[style*="width: 30%"] { display: none; }
.tabletopc3 > br { display: none; }

/* Case cards on the review pages: share the width, wrap instead of overflowing */
.mainMC .cardc {
    flex-wrap: wrap !important;
    gap: 16px;
    width: auto !important;
    margin: 8px 24px 0 !important;
}
.mainMC .cardc > .card.card-rm {
    flex: 1 1 220px;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}
@media (max-width: 700px) {
    .tabletopc3 { padding: 12px; gap: 8px; }
    .tabletopc3 .btn { min-width: 0 !important; padding: 8px 12px !important; font-size: 13px; }
    .tabletopc3 > .tabletopc2 { flex-basis: 100%; order: 10; }
    .mainMC .cardc { margin: 8px 12px 0 !important; }
    .mainMC .cardc > .card.card-rm { flex-basis: 100%; }
}

/* Date range picker (jquery.daterangepicker) opens its calendar on <body> with z-index 1,
   which put it behind the raised filter panels - above everything, like the EU portal */
.date-picker-wrapper { z-index: 100000 !important; }
.date-picker-wrapper .gap { background-color: transparent !important; }

/* Part rows without .parts-card (plain undamaged rows) sized like the others */
.card.part-card > .card-body {
    padding: 10px 16px !important;
    min-height: 44px;
    display: flex;
    align-items: center;
}
.card.part-card > .card-body h5, .card.part-card > .card-body h6 { margin: 0 !important; font-size: 14px !important; font-weight: 600 !important; }

/* Review action buttons (Replace / Repair / No Damage, Previous / Next, Close Review / Save,
   Add Sub-Assembly Parts): the pages give them a fixed 98px width, which cut the labels */
.part-action-btn, .part-action-btn2, .part-action-btn3 {
    width: auto !important;
    min-width: 98px;
    white-space: nowrap;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

/* Part list columns (.leftcol: flex column, max-height + scroll). Cards get overflow:hidden from
   the theme, which lets flex rows shrink to a thin line when there are many parts - keep each
   row at its own height so the column scrolls instead. */
.leftcol > *, .leftcol > .card.part-card { flex-shrink: 0 !important; }

/* Part intensity box on the review pages: the pages fix it at 34px, which with the theme's
   border and padding left no room for values like 7.0 or 10 */
#inpIntensity {
    width: 64px !important;
    min-width: 64px;
    height: auto !important;
    padding: 6px 8px !important;
    text-align: center;
    font-size: 15px;
}

/* Decorative layers (accent bar, card shine, button ripple, table rules) must never take the
   mouse: without this they sit over card / table / button content and break text selection,
   clicks and DevTools' inspect picker. */
.card::before, .card::after, .btn::before, thead::after, tbody tr::after { pointer-events: none !important; }
