
:root {
    --emergency-red: #dc2626;
    --urgent-orange: #ea580c;
    --warning-yellow: #d97706;
    --success-green: #059669;
    --primary-blue: #1d4ed8;
    --dark-gray: #1f2937;
    --medium-gray: #374151;
    --light-gray: #f9fafb;
    --border-gray: #e5e7eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --emergency-gradient: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Header Styles */
.emergency-header {
    background: var(--emergency-gradient);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.3);
    border-bottom: 3px solid #b91c1c;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.6rem;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.nav-link {
    font-weight: 500;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 25px var(--shadow-color);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 2rem;
}

/* Button Styles */
.btn {
    font-weight: 500;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(29, 78, 216, 0.4);
}

.btn-danger {
    background: var(--emergency-red);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border-left: 4px solid var(--success-green);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--emergency-red);
}

/* Form Styles */
.form-control,
.form-select {
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
    outline: none;
}

/* Select2 Customization */
.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-selection {
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    padding: 0.375rem 0.75rem;
    min-height: 48px;
    background: white;
    transition: all 0.3s ease;
}

.select2-container--bootstrap-5 .select2-selection:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
    outline: none;
}

.select2-container--bootstrap-5
    .select2-selection--single
    .select2-selection__rendered {
    color: var(--dark-gray);
    line-height: 1.5;
    padding-left: 0;
}

.select2-container--bootstrap-5
    .select2-selection--single
    .select2-selection__placeholder {
    color: var(--medium-gray);
}

.select2-container--bootstrap-5
    .select2-selection--single
    .select2-selection__arrow {
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 2px solid var(--border-gray);
    border-radius: 10px;
    box-shadow: 0 8px 25px var(--shadow-color);
    margin-top: 4px;
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.75rem 1rem;
    color: var(--dark-gray);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--primary-blue);
    color: white;
}

.select2-container--bootstrap-5 .select2-results__option--selected {
    background-color: var(--success-green);
    color: white;
}

.select2-container--bootstrap-5 .select2-search__field {
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    padding: 0.5rem;
}

/* Loading state */
.select2-container--bootstrap-5
    .select2-selection--single
    .select2-selection__rendered.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-gray);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Emergency Status Colors */
.bg-warning {
    background: var(--warning-yellow) !important;
}
.bg-danger {
    background: var(--emergency-red) !important;
}
.bg-success {
    background: var(--success-green) !important;
}
.bg-info {
    background: var(--primary-blue) !important;
}

/* Container Spacing */
.container-fluid {
    max-width: 1400px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--dark-gray);
}

.text-muted {
    color: var(--medium-gray) !important;
}

/* Theme Accents */
.emergency-accent {
    position: relative;
}

.emergency-accent::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--emergency-red);
    border-radius: 2px;
}

/* Footer Styles */
footer {
    margin-top: auto;
    background: #1a1a1a !important;
    border-top: 1px solid #333;
    position: relative;
    clear: both;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

footer .container {
    max-width: 1200px;
}

footer h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

footer .text-muted {
    color: #adb5bd !important;
}

footer hr {
    border-color: #333;
    margin: 1.5rem 0;
}

/* Ensure footer is always visible */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    padding-bottom: 2rem;
}
/* Fix pagination icon sizes */
nav[aria-label="Pagination Navigation"] svg {
    width: 12px !important;
    height: 12px !important;
}