/* =======================================================
FLOTA - DODAJ POJAZD - Profesjonalny formularz
Inspirowany stylem modułu Zamówienia
Kolorystyka INALCA: #00A651 (zielony)
======================================================= */

:root {
    --primary: #00A651;
    --primary-dark: #008541;
    --secondary: #2196F3;
    --success: #4CAF50;
    --warning: #FF9800;
    --text-dark: #212121;
    --text-gray: #757575;
    --text-light: #9e9e9e;
    --bg-light: #F5F7FA;
    --bg-lighter: #FAFBFC;
    --border: #E0E0E0;
    --radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

/* ================================================== */
/* CONTAINER GŁÓWNY                                  */
/* ================================================== */

.fleet-vehicle-form-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-light) 0%, #E8F5E9 100%);
    padding: 2rem;
}

/* ================================================== */
/* HEADER - Zielony gradient INALCA                 */
/* ================================================== */

.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2.5rem 3rem;
    border-radius: 16px;
    color: white;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 32px rgba(0, 166, 81, 0.35);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0.5rem 0 0 0;
}

.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ================================================== */
/* PRZYCISKI NAGŁÓWKA                                */
/* ================================================== */

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.5);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner dla przycisku */
.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 166, 81, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================== */
/* SEKCJE FORMULARZA                                 */
/* ================================================== */

.form-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: rgba(0, 166, 81, 0.1);
    box-shadow: var(--shadow-md);
}

/* Sekcja podświetlona - Dane Serwisowe (tylko edycja) */
.form-section.highlight-section {
    background: linear-gradient(135deg, #FFFDE7 0%, #FFF9C4 100%);
    border: 2px solid #F9A825;
    position: relative;
    overflow: visible;
}

.form-section.highlight-section::before {
    content: "TYLKO EDYCJA";
    position: absolute;
    top: -12px;
    right: 20px;
    background: #F9A825;
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.form-section.highlight-section .section-header {
    border-bottom-color: #F9A825;
}

.form-section.highlight-section .section-header h2 {
    color: #F57F17;
}

.form-section.highlight-section .alert-info {
    background: rgba(249, 168, 37, 0.1);
    border-left: 4px solid #F9A825;
    color: #F57F17;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.text-muted {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 0.25rem;
}

/* ================================================== */
/* NAGŁÓWEK SEKCJI                                   */
/* ================================================== */

.section-header {
    border-bottom: 3px solid var(--primary);
    padding-bottom: 1.25rem;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ================================================== */
/* GRID FORMULARZA - 2 kolumny                      */
/* ================================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* ================================================== */
/* LABEL - etykiety pól                             */
/* ================================================== */

label {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

label.required::after {
    content: "*";
    color: var(--primary);
    margin-left: 0.25rem;
    font-size: 1.1rem;
}

label i {
    color: var(--primary);
    font-size: 1rem;
}

/* ================================================== */
/* FORM CONTROL - inputy, selecty, textarea         */
/* ================================================== */

.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.form-control:disabled {
    background: var(--bg-light);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Placeholder */
::placeholder {
    color: var(--text-light);
    font-style: italic;
}

/* ================================================== */
/* CHECKBOX GROUP                                    */
/* ================================================== */

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-lighter);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkbox-group:hover {
    border-color: var(--primary);
    background: rgba(0, 166, 81, 0.05);
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.checkbox-group input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ================================================== */
/* FORM HINT - podpowiedzi                          */
/* ================================================== */

.form-hint {
    color: var(--text-light);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.form-hint i {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* ================================================== */
/* VALIDATION MESSAGE                                */
/* ================================================== */

.validation-message {
    color: var(--primary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.validation-message::before {
    content: "?";
    font-size: 1rem;
}

/* ================================================== */
/* ALERT - komunikaty błędów                        */
/* ================================================== */

.alert {
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: #FFEBEE;
    border-left: 4px solid var(--primary);
    color: #C62828;
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

/* ================================================== */
/* RESPONSYWNOŚĆ                                     */
/* ================================================== */

@media (max-width: 992px) {
    .fleet-vehicle-form-page {
        padding: 1.5rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
    }
    
    .page-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .fleet-vehicle-form-page {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
}

/* ================================================== */
/* ANIMACJE                                          */
/* ================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.form-section {
    animation: fadeIn 0.5s ease;
}

/* Animacja wejścia dla każdej sekcji z opóźnieniem */
.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }
.form-section:nth-child(4) { animation-delay: 0.4s; }
.form-section:nth-child(5) { animation-delay: 0.5s; }
.form-section:nth-child(6) { animation-delay: 0.6s; }
.form-section:nth-child(7) { animation-delay: 0.7s; }
.form-section:nth-child(8) { animation-delay: 0.8s; }

/* ================================================== */
/* AKCENTY KOLORYSTYCZNE - emoji & icons            */
/* ================================================== */

.section-header h2::before {
    font-style: normal;
    margin-right: 0.5rem;
}
