/* Estilos para Placas Mercosul - TruckCheck Dashboard */

/* Container da placa */
.plate-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Preview da placa */
.plate-preview {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 2px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #1e40af;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 120px;
}

.plate-preview.large {
    font-size: 24px;
    padding: 12px 20px;
    min-width: 140px;
}

.plate-preview.small {
    font-size: 14px;
    padding: 4px 8px;
    min-width: 80px;
    letter-spacing: 1px;
}

/* Badge Mercosul */
.plate-mercosul-badge {
    display: inline-block;
    background: #22c55e;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plate-old-badge {
    display: inline-block;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Input de placa */
.plate-input-container {
    position: relative;
    display: flex;
    flex-direction: column;
}

.plate-input {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 16px;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    transition: all 0.2s;
}

.plate-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.plate-input-container.plate-valid .plate-input {
    border-color: #22c55e !important;
    background-color: #f0fdf4;
}

.plate-input-container.plate-invalid .plate-input {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.plate-validation-message {
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.plate-validation-message.valid {
    color: #16a34a;
    background-color: #f0fdf4;
}

.plate-validation-message.invalid {
    color: #dc2626;
    background-color: #fef2f2;
}

/* Card de veículo */
.vehicle-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.vehicle-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.vehicle-plate-section {
    flex: 1;
}

.trailer-plate {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    font-family: 'Courier New', monospace;
}

.vehicle-status {
    margin-left: 16px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estados do veículo */
.status-badge.bg-green-100 {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.bg-blue-100 {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge.bg-yellow-100 {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.bg-gray-100 {
    background-color: #f3f4f6;
    color: #374151;
}

/* Informações do veículo */
.vehicle-info {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    margin-bottom: 16px;
}

.vehicle-details h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.vehicle-year,
.vehicle-km {
    font-size: 14px;
    color: #6b7280;
    margin: 2px 0;
}

.vehicle-capacity {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.capacity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.capacity-label {
    color: #6b7280;
}

.capacity-value {
    font-weight: 600;
    color: #1f2937;
}

/* Driver info */
.vehicle-driver {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.driver-info,
.route-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.driver-info:last-child,
.route-info:last-child {
    margin-bottom: 0;
}

.driver-label,
.route-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.driver-name,
.route-destination {
    font-size: 12px;
    color: #1f2937;
    font-weight: 600;
}

/* Maintenance info */
.maintenance-info {
    background: #fef3c7;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #f59e0b;
}

.maintenance-type {
    font-weight: 600;
    color: #92400e;
    font-size: 14px;
    margin-bottom: 4px;
}

.maintenance-description {
    font-size: 12px;
    color: #78350f;
    margin-bottom: 4px;
}

.maintenance-completion {
    font-size: 11px;
    color: #a16207;
}

/* Document status */
.vehicle-documents {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.document-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.document-status.valid {
    background-color: #dcfce7;
    color: #166534;
}

.document-status.warning {
    background-color: #fef3c7;
    color: #92400e;
}

.document-status.invalid {
    background-color: #fecaca;
    color: #991b1b;
}

/* Actions */
.vehicle-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vehicle-actions .btn-secondary,
.vehicle-actions .btn-primary,
.vehicle-actions .btn-danger {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.vehicle-actions .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.vehicle-actions .btn-secondary:hover {
    background: #e5e7eb;
}

.vehicle-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.vehicle-actions .btn-primary:hover {
    background: #2563eb;
}

.vehicle-actions .btn-danger {
    background: #ef4444;
    color: white;
}

.vehicle-actions .btn-danger:hover {
    background: #dc2626;
}

/* Responsividade */
@media (max-width: 768px) {
    .vehicle-card {
        padding: 16px;
    }
    
    .vehicle-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .vehicle-info {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .vehicle-capacity {
        text-align: left;
    }
    
    .vehicle-actions {
        flex-direction: column;
    }
    
    .vehicle-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .plate-preview {
        font-size: 16px;
        padding: 6px 12px;
        min-width: 100px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .vehicle-card {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .vehicle-details h3 {
        color: #f9fafb;
    }
    
    .capacity-value {
        color: #f9fafb;
    }
    
    .driver-name,
    .route-destination {
        color: #f9fafb;
    }
    
    .vehicle-driver {
        background: #374151;
    }
}