/* Custom Navbar Styling */
.custom-navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 0;
}

.navbar-brand-container {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 1.4rem;
}

.brand-icon {
    font-size: 2rem;
    margin-right: 12px;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.brand-text {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white !important;
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255,255,255,0.2);
    color: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.logout-link {
    background-color: rgba(220, 53, 69, 0.8);
    margin-left: 1rem;
}

.logout-link:hover {
    background-color: rgba(220, 53, 69, 1);
}

.command-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.command-badge, .staging-badge {
    background-color: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.command-badge i, .staging-badge i {
    color: #ffd700;
}

/* Card Styling */
.search-selection-card, .search-header-card, .main-card, 
.zone-view-card, .cleared-view-card, .audit-view-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 12px;
}

.search-header-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Stats Cards */
.stats-card {
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.clickable-card {
    cursor: pointer;
}

.clickable-card:hover .stats-icon {
    transform: scale(1.1);
}

.stats-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

/* Zone Grid */
.zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
}

.zone-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    border-radius: 8px;
    min-height: 80px;
}

.zone-available { 
    background-color: #d4edda; 
    border-color: #c3e6cb; 
}

.zone-assigned { 
    background-color: #fff3cd; 
    border-color: #ffeaa7; 
}

.zone-cleared { 
    background-color: #343a40; 
    border-color: #495057;
    color: white;
}

.zone-bookmarked { 
    background-color: #cce5ff; 
    border-color: #99d6ff; 
}

.zone-bookmarked::after {
    content: "⭐";
    position: absolute;
    top: 3px;
    right: 5px;
    font-size: 14px;
}

.zone-history-badge {
    position: absolute;
    top: 3px;
    left: 3px;
    font-size: 10px;
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    border-radius: 3px;
    padding: 2px 4px;
}

.zone-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Task Cards */
.task-card-compact {
    border-left: 4px solid #007bff;
    margin-bottom: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.task-card-compact:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.team-assignment-compact {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 6px 10px;
    margin: 3px;
    display: inline-block;
    position: relative;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
}

.team-assignment-compact.bg-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb;
    color: #155724;
}

.team-member {
    background-color: #e9ecef;
    border-radius: 12px;
    padding: 4px 8px;
    margin: 2px;
    display: inline-block;
    font-size: 0.75rem;
    border: 1px solid #ced4da;
}

.command-unit {
    background-color: #ffc107;
    color: #000;
    font-weight: bold;
    border-color: #ffc107;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #dc3545;
    font-size: 0.8rem;
    background-color: rgba(220, 53, 69, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.remove-btn {
    margin-left: 8px;
    cursor: pointer;
    color: #28a745;
    font-weight: bold;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    color: #155724;
    transform: scale(1.1);
}

/* Units Display */
.units-display {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.unit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 4px 0;
    background-color: white;
    transition: all 0.2s ease;
}

.unit-item:hover {
    background-color: #f8f9fa;
    border-color: #007bff;
}

/* Search Cards */
.search-card {
    border-left: 4px solid #28a745;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.search-card.active {
    border-left-color: #007bff;
    background-color: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Toast Styling */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1055;
}

.toast {
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Audit Entries */
.audit-entry {
    font-size: 0.85rem;
    color: #6c757d;
    border-left: 3px solid #007bff;
    padding: 8px 12px;
    margin: 6px 0;
    background-color: #f8f9fa;
    border-radius: 0 6px 6px 0;
    transition: all 0.2s ease;
}

.audit-entry:hover {
    background-color: #e9ecef;
    border-left-color: #0056b3;
}

/* Vehicle Icons */
.vehicle-icon {
    color: #17a2b8;
    margin-left: 6px;
    font-size: 0.9rem;
}

/* Form Enhancements */
.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* File Upload */
.file-preview {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border-radius: 6px;
    margin: 5px;
    cursor: pointer;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.file-preview:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.file-item {
    display: inline-block;
    margin: 5px;
    position: relative;
}

.file-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.file-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-brand-container {
        font-size: 1.1rem;
    }
    
    .brand-icon {
        font-size: 1.5rem;
        margin-right: 8px;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .command-info {
        margin-bottom: 1rem;
    }
    
    .zone-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .stats-card .h3 {
        font-size: 1.5rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}