/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
    --primary-color: #0f172a;
    --accent-color: #0284c7;
    --accent-hover: #0369a1;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border-color: #cbd5e1;
    --error-color: #dc2626;
    --success-color: #16a34a;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --transition: all 0.25s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: -60px auto 3rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

.hidden { display: none !important; }
.hidden-field { display: none; }

/* ==========================================================================
   2. HERO BANNER
   ========================================================================== */
.hero-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
    text-align: center;
    padding: 5rem 1.5rem 8rem 1.5rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo-placeholder {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: #38bdf8;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.hero-banner h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-banner p {
    font-size: 1.05rem;
    color: #cbd5e1;
    font-weight: 300;
}

/* ==========================================================================
   3. CARD LAYOUT & FORM ELEMENTS
   ========================================================================== */
.form-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.form-section {
    border: none;
    margin-bottom: 2.5rem;
}

.form-section legend {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid #f1f5f9;
    width: 100%;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section legend i {
    color: var(--accent-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.required {
    color: var(--error-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: #fff;
    outline: none;
    transition: var(--transition);
    color: var(--text-main);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

input.field-error, select.field-error, textarea.field-error {
    border-color: var(--error-color) !important;
    background-color: #fef2f2;
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

/* ==========================================================================
   4. DROP FILING & DECLARATIONS
   ========================================================================== */
.file-drop-zone {
    border: 2px dashed var(--border-color);
    padding: 1.5rem;
    text-align: center;
    border-radius: var(--radius-sm);
    position: relative;
    cursor: pointer;
    background-color: #fafafa;
    transition: var(--transition);
}

.file-drop-zone:hover {
    border-color: var(--accent-color);
    background-color: #f0f9ff;
}

.file-drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.file-spec {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

#file-preview-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    width: fit-content;
}

#remove-file-btn {
    background: none;
    border: none;
    color: var(--error-color);
    font-size: 1.2rem;
    cursor: pointer;
}

/* Custom Checkbox */
.declaration-container {
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input { display: none; }

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
    position: relative;
    margin-top: 2px;
    transition: var(--transition);
}

.checkbox-label input:checked + .checkbox-custom {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: white;
    font-size: 0.7rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ==========================================================================
   5. NOTIFICATIONS & BUTTONS
   ========================================================================== */
.notification {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease;
}

.notification.success { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.notification.error { background-color: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.notification i { font-size: 1.5rem; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 2px solid #f1f5f9;
    padding-top: 1.5rem;
}

.btn {
    font-family: inherit;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-primary { background-color: var(--accent-color); color: #fff; }
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-secondary { background-color: #e2e8f0; color: var(--text-main); }
.btn-secondary:hover { background-color: #cbd5e1; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   6. FOOTER & ANIMATIONS
   ========================================================================== */
.main-footer {
    background-color: var(--primary-color);
    color: #94a3b8;
    text-align: center;
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}

.footer-content p { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-socials { display: flex; justify-content: center; gap: 1.25rem; margin-top: 1rem; }
.footer-socials a { color: #64748b; font-size: 1.2rem; transition: var(--transition); }
.footer-socials a:hover { color: var(--accent-color); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ==========================================================================
   7. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 0; }
    .form-card { padding: 1.5rem; }
    .hero-banner h1 { font-size: 1.75rem; }
    .form-actions { flex-direction: column-reverse; }
    .btn { width: 100%; justify-content: center; }
}