:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --error-color: #ef4444;
    --success-color: #10b981;
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-shadow: 0 10px 40px -10px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Tajawal', sans-serif; background: var(--bg-gradient); color: var(--text-main); line-height: 1.6; min-height: 100vh; padding: 2rem 1rem; }
.container { max-width: 900px; margin: 0 auto; }
.header-section { text-align: center; margin-bottom: 3rem; animation: fadeInDown 0.8s ease-out; }
.logo { max-width: 180px; height: auto; margin-bottom: 1rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); }
.header-section h1 { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 0.5rem; font-weight: 800; }
.header-section p { color: var(--text-muted); font-size: 1.1rem; }
.form-card { background: var(--glass-bg); border-radius: 24px; padding: 2.5rem; box-shadow: var(--glass-shadow); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.5); animation: fadeInUp 0.8s ease-out; }
.section-title { font-size: 1.4rem; color: var(--text-main); margin-bottom: 1.5rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--primary-color); display: inline-block; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.form-group { display: flex; flex-direction: column; position: relative; }
.form-group.full-width { grid-column: 1 / -1; }
label { font-weight: 600; margin-bottom: 0.5rem; color: var(--text-main); display: flex; align-items: center; gap: 0.5rem; }
label span.required { color: var(--error-color); }
.input-control { width: 100%; padding: 0.8rem 1rem; border: 2px solid var(--border-color); border-radius: 12px; font-family: inherit; font-size: 1rem; transition: var(--transition); background: #fff; color: var(--text-main); }
.input-control:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
textarea.input-control { min-height: 100px; resize: vertical; }
.hint-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.4rem; display: flex; align-items: center; gap: 0.3rem; }
.photo-upload { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; border: 2px dashed var(--border-color); border-radius: 16px; background: var(--secondary-color); transition: var(--transition); cursor: pointer; }
.photo-upload:hover { border-color: var(--primary-color); background: #eff6ff; }
.photo-preview { width: 80px; height: 80px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 3px solid #fff; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: none; }
.photo-preview i { font-size: 2rem; color: var(--text-muted); }
.upload-text { flex: 1; }
.upload-text strong { display: block; color: var(--primary-color); margin-bottom: 0.2rem; }
input[type="file"] { display: none; }
.clinic-container { border: 1px solid var(--border-color); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; background: var(--secondary-color); position: relative; transition: var(--transition); }
.clinic-container:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-color: #cbd5e1; }
.clinic-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.clinic-title { font-weight: 700; color: var(--primary-color); font-size: 1.1rem; }
.btn-remove-clinic { background: none; border: none; color: var(--error-color); cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; gap: 0.3rem; padding: 0.4rem 0.8rem; border-radius: 8px; transition: var(--transition); font-family: inherit; }
.btn-remove-clinic:hover { background: #fef2f2; }
.btn-add-clinic { display: inline-flex; align-items: center; gap: 0.5rem; background: #eff6ff; color: var(--primary-color); border: 2px dashed var(--primary-color); padding: 0.8rem 1.5rem; border-radius: 12px; font-weight: 600; cursor: pointer; transition: var(--transition); width: 100%; justify-content: center; font-family: inherit; font-size: 1rem; }
.btn-add-clinic:hover { background: var(--primary-color); color: #fff; }
.insurance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; max-height: 300px; overflow-y: auto; padding: 1rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--secondary-color); margin-bottom: 1rem; }
.insurance-grid::-webkit-scrollbar { width: 6px; }
.insurance-grid::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.checkbox-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.5rem; border-radius: 8px; transition: var(--transition); cursor: pointer; }
.checkbox-item:hover { background: #e2e8f0; }
.checkbox-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary-color); cursor: pointer; }
.btn-submit { display: block; width: 100%; padding: 1.2rem; background: var(--primary-color); color: #fff; border: none; border-radius: 12px; font-size: 1.2rem; font-weight: 700; cursor: pointer; transition: var(--transition); margin-top: 2rem; box-shadow: 0 4px 15px rgba(37,99,235,0.3); font-family: inherit; }
.btn-submit:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,0.4); }
.other-input-container { display: block; margin-top: 0.5rem; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) { .form-card { padding: 1.5rem; } .form-grid { grid-template-columns: 1fr; } }

/* ===== Custom Searchable Select ===== */
.custom-select {
    position: relative;
    width: 100%;
}
.cs-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    min-height: 48px;
    user-select: none;
}
.cs-display:hover {
    border-color: #cbd5e1;
}
.custom-select.open .cs-display {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.cs-placeholder {
    color: var(--text-muted);
}
.cs-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}
.custom-select.open .cs-arrow {
    transform: rotate(180deg);
}
.cs-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    animation: fadeInDown 0.2s ease-out;
}
.custom-select.open .cs-dropdown {
    display: block;
}
.cs-search {
    width: 100%;
    padding: 0.7rem 1rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    background: #f8fafc;
    color: var(--text-main);
    direction: rtl;
}
.cs-search::placeholder {
    color: var(--text-muted);
}
.cs-options {
    max-height: 220px;
    overflow-y: auto;
}
.cs-options::-webkit-scrollbar { width: 6px; }
.cs-options::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 10px; }
.cs-option {
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.95rem;
}
.cs-option:hover {
    background: #eff6ff;
    color: var(--primary-color);
}
.cs-option:active {
    background: var(--primary-color);
    color: #fff;
}

/* ===== Toast Notifications ===== */
.toast {
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    min-width: 350px;
    max-width: 600px;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 9999;
    animation: slideDown 0.5s ease-out;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}
.toast-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
}
.toast-error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
}
.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}
.toast-content i {
    font-size: 1.4rem;
}
.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.3rem;
    border-radius: 6px;
    transition: var(--transition);
}
.toast-close:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-30px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
