:root {
    /* === ОСНОВНІ КОЛЬОРИ === */
    --bg-main: #0b1120;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-blue: #2AABEE;
    
    /* === КАРТКИ ТА БОРДЕРИ === */
    --card-bg: #111827;
    --card-border: #1f2937;
    
    /* === ВАЛІДАЦІЯ ТА ПОМИЛКИ === */
    --error-color: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.05);
    
    /* === ПРОЗОРІ КОЛЬОРИ ТА ВІДТІНКИ (RGBa) === */
    --white-1: rgba(255, 255, 255, 0.01);
    --white-3: rgba(255, 255, 255, 0.03);
    --white-5: rgba(255, 255, 255, 0.05);
    --white-10: rgba(255, 255, 255, 0.1);
    --blue-5: rgba(42, 171, 238, 0.05);
    --blue-10: rgba(42, 171, 238, 0.1);
    --blue-15: rgba(42, 171, 238, 0.15);
    --blue-20: rgba(42, 171, 238, 0.2);
    
    /* === ТІНІ === */
    --shadow-20: rgba(0, 0, 0, 0.2);
    --shadow-40: rgba(0, 0, 0, 0.4);
    --shadow-50: rgba(0, 0, 0, 0.5);
}

@font-face { font-family: 'e-Ukraine'; src: url('/static/fonts/e-Ukraine-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'e-Ukraine'; src: url('/static/fonts/e-Ukraine-Bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'e-Ukraine', -apple-system, sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.6; overflow-x: hidden; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }
.section-separator { border: 0; height: 1px; background: var(--card-border); width: 100%; margin: 40px 0; }


/* ========================================== */
/* === 1. ЗАГОЛОВОК === */
/* ========================================== */
.form-container { max-width: 800px; padding-top: 40px; padding-bottom: 60px; margin: 0 auto; }
.add-header { text-align: center; margin-bottom: 40px; }
.add-logo { font-size: 1.8rem; font-weight: 800; color: var(--text-main); text-decoration: none; letter-spacing: 0.5px; }
.add-logo span { color: var(--accent-blue); }
.add-title { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 30px; color: var(--text-main); }
.add-form { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 24px; padding: 40px; box-shadow: 0 15px 40px var(--shadow-20); }

@media (max-width: 768px) { 
    .add-form { padding: 20px; } 
    .add-title { font-size: 1.5rem; } 
}

/* Стилі для повідомлення про успіх */
.success-card { text-align: center; padding: 20px; }
.success-icon { font-size: 4rem; margin-bottom: 20px; }
.success-subtitle { color: var(--text-muted); margin-bottom: 30px; }
.secret-link-box { background: var(--white-3); padding: 25px; border-radius: 16px; border: 1px dashed var(--card-border); }
.secret-link-label { margin-bottom: 10px; font-weight: 600; }
.secret-link-hint { color: var(--text-muted); font-size: 0.85rem; margin-top: 15px; }
.success-home-btn { margin-top: 30px; width: 100%; height: 50px; }

/* ========================================== */
/* === 2. ВИБІР МІСТА ТА НІШІ === */
/* ========================================== */
/* Сітка для колонок (Використовується тут і в контактах) */
.form-row-split { display: flex; gap: 20px; margin-bottom: 25px; }
.form-row-split .form-group { margin-bottom: 0; }
@media (max-width: 768px) { .form-row-split { flex-direction: column; gap: 20px; } }

/* Специфічні стилі для випадаючих списків */
.input-wrapper { position: relative; width: 100%; }
.select-wrapper { cursor: pointer; }
.readonly-pointer { cursor: pointer; }
.dropdown-arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); pointer-events: none; transition: 0.3s ease; display: flex; align-items: center; color: var(--text-muted); }
.select-wrapper:focus-within .dropdown-arrow { transform: translateY(-50%) rotate(180deg); color: var(--accent-blue); }

.custom-dropdown { position: absolute; top: calc(100% + 10px); left: 0; width: 100%; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; max-height: 280px; overflow-y: auto; z-index: 1000; display: none; box-shadow: 0 15px 40px var(--shadow-50); }
.custom-dropdown.active { display: block; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.dropdown-item { padding: 14px 20px; font-size: 1rem; cursor: pointer; transition: 0.2s; border-bottom: 1px solid var(--white-3); color: var(--text-main); }
.dropdown-item:hover { background: var(--blue-10); color: var(--accent-blue); padding-left: 25px; }

/* Кастомний скролбар для списків */
.custom-dropdown::-webkit-scrollbar { width: 8px; }
.custom-dropdown::-webkit-scrollbar-track { background: var(--bg-main); border-radius: 0 12px 12px 0; }
.custom-dropdown::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 10px; border: 2px solid var(--bg-main); }
.custom-dropdown::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* ========================================== */
/* === 3. ОСНОВНА ІНФОРМАЦІЯ === */
/* ========================================== */
.form-group { flex: 1; display: flex; flex-direction: column; gap: 8px; margin-bottom: 25px; }
.form-label { font-size: 0.95rem; font-weight: 600; color: var(--text-muted); margin-left: 5px; }
.required-star { color: var(--error-color); font-weight: 800; margin-left: 2px; }

/* Базові інпути */
.custom-input { width: 100%; background: var(--white-3); border: 1px solid var(--card-border); border-radius: 12px; padding: 16px 20px; color: var(--text-main); font-size: 1.05rem; outline: none; transition: 0.3s ease; }
.custom-input:focus { border-color: var(--accent-blue); background: var(--blue-5); }
.custom-input::placeholder { color: var(--text-muted); opacity: 0.7; }

/* Текстова область */
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Помилки валідації */
.error-border { border-color: var(--error-color) !important; background: var(--error-bg) !important; transition: 0.3s; }

/* ========================================== */
/* === 4. ЗАВАНТАЖЕННЯ ФОТО === */
/* ========================================== */
.photo-upload-group { margin-top: 5px; }
.file-drop-area { position: relative; width: 100%; border: 2px dashed var(--card-border); border-radius: 16px; padding: 40px 20px; text-align: center; background: var(--white-1); transition: 0.3s ease; cursor: pointer; color: var(--text-muted); }
.file-drop-area:hover { border-color: var(--accent-blue); background: var(--blue-5); color: var(--accent-blue); }
.file-input { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; }
.file-drop-content { position: relative; z-index: 1; pointer-events: none; }
.file-icon { margin-bottom: 12px; display: inline-flex; justify-content: center; align-items: center; }
.file-drop-content p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; margin: 0; }
.text-accent-bold { color: var(--accent-blue); font-weight: 600; }
.form-separator { margin: 30px 0; }

/* ========================================== */
/* === 5. КНОПКИ === */
/* ========================================== */
/* Базові кнопки (незалежні від index.css) */
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; text-decoration: none; font-weight: 600; transition: all 0.3s ease; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background-color: var(--blue-10); color: var(--accent-blue); border-color: var(--blue-15); padding: 10px 20px; font-size: 0.9rem; }
.btn-primary:hover { background-color: var(--accent-blue); color: var(--text-main); border-color: var(--accent-blue); transform: translateY(-2px); }

/* Кнопки форми */
.form-actions { display: flex; gap: 15px; width: 100%; }
.btn-cancel, .btn-submit { flex: 1; width: 100%; padding: 14px; font-size: 1.05rem; border-radius: 12px; }
.btn-cancel { background: var(--white-5); color: var(--text-main); transition: 0.3s; }
.btn-cancel:hover { background: var(--white-10); }

@media (max-width: 768px) { 
    .form-actions { flex-direction: column-reverse; gap: 12px; } 
}

/* ========================================== */
/* === 6. ЗАВАНТАЖЕННЯ (OVERLAY) === */
/* ========================================== */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 17, 32, 0.85); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.loading-overlay.active { opacity: 1; visibility: visible; }
.loading-content { text-align: center; background: var(--card-bg); padding: 40px; border-radius: 24px; border: 1px solid var(--accent-blue); box-shadow: 0 15px 40px var(--blue-20); transform: translateY(20px); transition: transform 0.3s ease; max-width: 90%; }
.loading-overlay.active .loading-content { transform: translateY(0); }
.loading-content p { color: var(--text-main); font-size: 1.15rem; font-weight: 600; margin: 0; }

/* Анімація пісочного годинника */
.hourglass-loader { display: inline-block; width: 60px; height: 60px; margin-bottom: 20px; position: relative; }
.hourglass-loader:after { content: " "; display: block; border-radius: 50%; width: 0; height: 0; margin: 6px; box-sizing: border-box; border: 24px solid var(--accent-blue); border-color: var(--accent-blue) transparent var(--accent-blue) transparent; animation: hourglass-anim 1.2s infinite; }

@keyframes hourglass-anim { 
    0% { transform: rotate(0); animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); } 
    50% { transform: rotate(900deg); animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); } 
    100% { transform: rotate(1800deg); } 
}