/* Custom CSS for Rental Repairs Application */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Dashboard */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s;
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dashboard-card.success {
    border-left-color: var(--success-color);
}

.dashboard-card.warning {
    border-left-color: var(--warning-color);
}

.dashboard-card.danger {
    border-left-color: var(--danger-color);
}

.dashboard-metric {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary-color);
}

.dashboard-card.warning .dashboard-metric {
    color: #f59e0b;
}

.dashboard-card.danger .dashboard-metric {
    color: #ef4444;
}

.dashboard-card.success .dashboard-metric {
    color: #10b981;
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Status badges */
.status-badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-draft {
    background-color: #6b7280;
    color: white;
}

.status-submitted {
    background-color: #3b82f6;
    color: white;
}

.status-scheduled {
    background-color: #10b981;
    color: white;
}

.status-done {
    background-color: #059669;
    color: white;
}

.status-failed {
    background-color: #ef4444;
    color: white;
}

.status-declined {
    background-color: #f59e0b;
    color: white;
}

.status-closed {
    background-color: #64748b;
    color: white;
}

/* Button groups */
.btn-group .btn {
    margin-right: 0;
}

.btn-group .btn:not(:last-child) {
    border-right: none;
}

/* Assignment form enhancements */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Emergency request highlighting */
.emergency-highlight {
    border-left: 4px solid #ef4444;
    background-color: #fef2f2;
}

/* Worker assignment specific styles */
.worker-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.worker-card:hover {
    border-color: #3b82f6;
    background-color: #f8faff;
}

.worker-card.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 0 0 1px #3b82f6;
}

/* Assignment status indicators */
.assignment-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.assignment-status.assigned {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.assignment-status.pending {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.assignment-status.overdue {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* Tables */
.table th {
    border-top: none;
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Utilities */
.text-muted {
    color: #6c757d !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-metric {
        font-size: 1.5rem;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin-bottom: 0.25rem;
    }
}