/* Bootstrap Primary Color Override */
:root {
    --bs-primary: #15135F;
    --bs-primary-rgb: 21, 19, 95;
    --bs-link-color: #15135F;
    --bs-link-hover-color: #100e4a;
}

.bg-primary {
    background-color: #15135F !important;
}

.btn-primary {
    background-color: #15135F;
    border-color: #15135F;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: #100e4a;
    border-color: #100e4a;
}

.btn-outline-primary {
    color: #15135F;
    border-color: #15135F;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: #15135F;
    border-color: #15135F;
    color: white;
}

.text-primary {
    color: #15135F !important;
}

.border-primary {
    border-color: #15135F !important;
}

a {
    color: #15135F;
}

a:hover {
    color: #100e4a;
}

/* Navbar Dropdown - Dark Theme */
.navbar-dark .dropdown-menu {
    background-color: #15135F;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.navbar-dark .dropdown-menu .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .dropdown-menu .dropdown-item:hover,
.navbar-dark .dropdown-menu .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.navbar-dark .dropdown-menu .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.navbar-dark .dropdown-menu .dropdown-item i {
    opacity: 0.7;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #15135F 0%, #100e4a 100%);
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

/* Stats Cards */
.stat-card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon-total {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* Status Columns */
.status-column {
    background: #f8f9fa;
    border-radius: 0.5rem;
    min-height: 400px;
}

.status-header {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
}

.status-header.status-open {
    background: #0d6efd;
}

.status-header.status-in_progress {
    background: #ffc107;
    color: #212529;
}

.status-header.status-on_hold {
    background: #6c757d;
}

.status-header.status-completed {
    background: #198754;
}

.status-body {
    padding: 1rem;
    max-height: 600px;
    overflow-y: auto;
}

/* Work Order Cards */
.work-order-card .card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.15s, box-shadow 0.15s;
}

.work-order-card .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Priority Badges */
.badge.priority-low {
    background-color: #198754;
}

.badge.priority-medium {
    background-color: #ffc107;
    color: #212529;
}

.badge.priority-high {
    background-color: #fd7e14;
}

.badge.priority-urgent {
    background-color: #dc3545;
}

/* Status Badges */
.badge.status-open {
    background-color: #0d6efd;
}

.badge.status-in_progress {
    background-color: #ffc107;
    color: #212529;
}

.badge.status-on_hold {
    background-color: #6c757d;
}

.badge.status-completed {
    background-color: #198754;
}

/* Timeline */
.timeline {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.timeline-item {
    position: relative;
    padding-left: 1.5rem;
    padding-bottom: 1rem;
    border-left: 2px solid #dee2e6;
}

.timeline-item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
}

.timeline-date {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

.timeline-text {
    display: block;
    font-size: 0.875rem;
}

/* Comments */
.comment {
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .status-column {
        min-height: auto;
    }

    .status-body {
        max-height: 300px;
    }
}

/* HTMX Loading Indicator */
.htmx-request {
    opacity: 0.7;
    transition: opacity 200ms ease-in;
}

.htmx-request.htmx-request {
    opacity: 0.7;
}
