/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: radial-gradient(circle at 10% 20%, #f0f4ff 0%, #d9e2f0 100%);
}

.container {
    width: 100%;
    max-width: 820px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 32px;
    padding: 40px 44px;
    box-shadow: 0 30px 80px rgba(0, 20, 50, 0.15), 0 8px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

/* ===== HEADER ===== */
.form-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 18px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.04);
}

.form-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0b1a33;
    letter-spacing: -0.3px;
}

.subtitle {
    color: #5b6f8c;
    font-size: 15px;
    font-weight: 400;
    margin-top: 4px;
}

/* ===== FORM GRID ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}

.full-width {
    grid-column: 1 / -1;
}

/* ===== FORM GROUP ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

label {
    font-weight: 600;
    font-size: 14px;
    color: #1f2a44;
    letter-spacing: -0.2px;
}

.required {
    color: #e34a4a;
    margin-left: 2px;
}

.hint {
    font-size: 12px;
    color: #7a8aa3;
    margin-top: 2px;
}

/* ===== INPUTS ===== */
input[type="text"],
textarea {
    width: 100%;
    padding: 11px 16px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    border: 1.5px solid #dce3ed;
    border-radius: 12px;
    transition: border 0.2s, box-shadow 0.2s;
    color: #0b1a33;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #5b7cfa;
    box-shadow: 0 0 0 4px rgba(91, 124, 250, 0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
    border-radius: 12px;
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #dce3ed;
    border-radius: 12px;
    max-height: 210px;
    overflow-y: auto;
    z-index: 999;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #1f2a44;
    border-bottom: 1px solid #f0f3f8;
    transition: background 0.15s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: #f0f5ff;
}

.autocomplete-item strong {
    display: block;
    font-weight: 600;
}

.autocomplete-item small {
    font-size: 12px;
    color: #7a8aa3;
}

/* ===== FILE UPLOAD ===== */
.file-upload-wrapper {
    position: relative;
}

.file-upload-area {
    border: 2px dashed #dce3ed;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    background: #f8faff;
    transition: border 0.2s, background 0.2s;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: #5b7cfa;
    background: #f0f5ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 6px;
    display: block;
}

.upload-text {
    font-weight: 600;
    color: #1f2a44;
    font-size: 15px;
}

.upload-hint {
    font-size: 13px;
    color: #7a8aa3;
    margin-top: 4px;
}

input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    z-index: -1;
}

.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.file-item {
    background: #f8faff;
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    padding: 8px;
    position: relative;
    transition: box-shadow 0.2s;
}

.file-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.file-preview {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    background: #eef2f9;
}

.file-name {
    font-size: 12px;
    color: #1f2a44;
    margin-top: 6px;
    word-break: break-word;
    line-height: 1.3;
}

.file-size {
    font-size: 11px;
    color: #7a8aa3;
}

.file-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.file-remove:hover {
    background: #e34a4a;
}

/* ===== BUTTON ===== */
.form-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px solid rgba(0, 0, 0, 0.04);
    text-align: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 48px;
    font-family: inherit;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 60px;
    background: #1f2a44;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.15);
}

.btn:hover {
    background: #0b1a33;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(31, 42, 68, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 18px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    animation: slideDown 0.3s ease;
}

.alert.success {
    background: #e6f7e6;
    color: #1a6e1a;
    border: 1px solid #b3e0b3;
}

.alert.error {
    background: #ffe6e6;
    color: #b33a3a;
    border: 1px solid #ffb3b3;
}

/* ===== PROGRESS ===== */
.upload-progress {
    margin: 12px 0 8px;
    background: #e6ecf5;
    border-radius: 60px;
    overflow: hidden;
    height: 6px;
    display: none;
}

.upload-progress.active {
    display: block;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #5b7cfa, #8b6cf7);
    border-radius: 60px;
    transition: width 0.3s ease;
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
    .container {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .full-width {
        grid-column: 1;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px 10px;
    }

    .container {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .file-list {
        grid-template-columns: repeat(2, 1fr);
    }
}