/* ========================================
   ACV Safety Report - Global Styles
   ======================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-bar {
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 50%, #2196f3 100%);
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    box-shadow: 0 2px 12px rgba(21, 101, 192, 0.3);
}

.logo-container {
    background: #fff;
    padding: 8px 24px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.logo-container:hover {
    transform: translateY(0);
}

.header-logo {
    height: 44px;
    width: auto;
    display: block;
}

/* --- Main Content --- */
.site-main {
    display: flex;
    justify-content: center;
    padding: 32px 16px 48px;
}

/* --- Form Card --- */
.form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 40px 48px;
    width: 100%;
    max-width: 640px;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    text-align: center;
    color: #1565c0;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* --- Form Groups --- */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.required {
    color: #e53935;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde1e6;
    border-radius: 8px;
    font-size: 0.938rem;
    font-family: inherit;
    color: #333;
    background: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
}

.form-input:hover {
    border-color: #b0bec5;
}

.form-input:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
    background: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* --- Select Wrapper --- */
.select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

/* --- Upload Section --- */
.upload-section {
    margin-top: 28px;
    padding-top: 24px;
}

.upload-divider {
    text-align: center;
    position: relative;
    margin-bottom: 20px;
}

.upload-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #d0d5db, transparent);
}

.upload-divider span {
    position: relative;
    background: #fff;
    padding: 0 16px;
    font-size: 0.85rem;
    color: #777;
    font-weight: 500;
}

.upload-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.813rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    border: 1.5px solid;
}

.btn-upload-file {
    color: #1565c0;
    border-color: #1565c0;
    background: rgba(21, 101, 192, 0.04);
}

.btn-upload-file:hover {
    background: #1565c0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
    transform: translateY(-1px);
}

.btn-upload-camera {
    color: #1565c0;
    border-color: #1565c0;
    background: rgba(21, 101, 192, 0.04);
}

.btn-upload-camera:hover {
    background: #1565c0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
    transform: translateY(-1px);
}

.file-input-hidden {
    display: none;
}

.upload-note {
    text-align: center;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 8px;
    transition: color 0.2s ease;
}

/* --- Submit Button --- */
.submit-section {
    text-align: center;
    margin-top: 32px;
}

.btn-submit {
    display: inline-block;
    padding: 12px 48px;
    background: linear-gradient(135deg, #1565c0, #1e88e5);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.938rem;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.25);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
    transform: translateY(-2px);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.3);
}

/* --- Validation --- */
.text-danger {
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* --- Alert --- */
.alert {
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 0.875rem;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablets */
@media (max-width: 768px) {
    .form-card {
        padding: 32px 28px;
        border-radius: 12px;
        margin: 0 8px;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .header-logo {
        height: 38px;
    }

    .logo-container {
        padding: 6px 18px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .site-main {
        padding: 16px 8px 32px;
    }

    .form-card {
        padding: 24px 18px;
        border-radius: 10px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .form-title {
        font-size: 1.15rem;
        margin-bottom: 24px;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 1rem; /* Prevent iOS zoom */
    }

    .header-bar {
        min-height: 50px;
    }

    .header-logo {
        height: 32px;
    }

    .logo-container {
        padding: 5px 14px;
        border-radius: 0 0 8px 8px;
    }

    .upload-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn-upload {
        justify-content: center;
        padding: 12px 20px;
    }

    .btn-submit {
        width: 100%;
        padding: 14px;
    }

    .form-group {
        margin-bottom: 16px;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .form-card {
        max-width: 680px;
    }
}