/* Utility Classes */

/* Layout utilities */
.min-height-100vh {
    min-height: 100vh;
}

.z-index-1050 {
    z-index: 1050;
}

/* Display utilities */
.display-inline {
    display: inline;
}

/* Flexbox utilities */
.flex-space-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Text utilities */
.min-height-120 {
    min-height: 120px;
}

/* Chart and canvas utilities */
.chart-max-height {
    max-height: 300px;
}

/* Table column widths */
.table-col-width-auto { width: auto; }
.table-col-width-15 { width: 15%; }
.table-col-width-20 { width: 20%; }
.table-col-width-25 { width: 25%; }
.table-col-width-30 { width: 30%; }
.table-col-width-35 { width: 35%; }
.table-col-width-60 { width: 60%; }

/* Siren Background for all pages except index and login */
body:not(.index-page):not(.login-page) {
    background-image: url('/images/siren-hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Mobile: disable fixed background to prevent shifting */
@media (max-width: 767px) {
    body:not(.index-page):not(.login-page) {
        background-attachment: scroll;
    }
}

/* Semi-transparent black backgrounds for cards to ensure legibility */
.card {
    background-color: rgba(0, 0, 0, 0.85) !important;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.card-body {
    color: #fff;
}

.card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card hr,
.card .border-bottom {
    border-color: rgba(255, 255, 255, 0.15) !important;
    opacity: 1;
}

/* Main navbar - even darker */
.navbar-dark.bg-primary {
    background: linear-gradient(135deg, #0a0a0a 0%, #000000 100%) !important;
    border-bottom: 1px solid #222;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.navbar-dark .navbar-brand {
    color: #f8f9fa !important;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.navbar-dark .navbar-nav .nav-link {
    color: #e9ecef !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.navbar-dark .dropdown-menu {
    background-color: #2c2c2c;
    border: 1px solid #444;
}

.navbar-dark .dropdown-item {
    color: #e9ecef;
}

.navbar-dark .dropdown-item:hover {
    background-color: #3c3c3c;
    color: #fff;
}

/* Sub-navbar for page titles and breadcrumbs */
.sub-navbar {
    background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
    border-bottom: 1px solid #555;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.sub-navbar h1,
.sub-navbar h2 {
    margin: 0;
    color: #f8f9fa;
    font-size: 1.5rem;
    font-weight: 500;
}

.sub-navbar .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.sub-navbar .breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
}

.sub-navbar .breadcrumb-item.active {
    color: #fff;
}

.sub-navbar .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* Dark theme modals and form inputs */
.modal-content.bg-dark .form-control {
    background-color: #2c2c2c;
    border-color: #555;
    color: #fff;
}

.modal-content.bg-dark .form-control:focus {
    background-color: #3a3a3a;
    border-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.modal-content.bg-dark .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-content.bg-dark .form-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Special handling for datetime inputs to maintain native calendar picker */
.modal-content.bg-dark input[type="datetime-local"] {
    color-scheme: dark;
    cursor: pointer;
}

.modal-content.bg-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}