/* CSS Variables for Theme Management */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #e67e22;
    --secondary-dark: #d35400;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-color: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary-color: #e05708;
    --primary-dark: #d35400;
    --secondary-color: #111314;
    --secondary-dark: #17405c;
    --background-color: #1a1a1a;
    --surface-color: #2d2d2d;
    --text-color: #ffffff;
    --text-muted: #bdc3c7;
    --border-color: #404040;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.4);
}

/* Keep background for dark theme */
[data-theme="dark"] body {
    background: #1a1a1a !important;
}
[data-theme="dark"] .form-container {
    background: #334155;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(180deg, #FAFAFA, #82B7EC) !important;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Viewport meta tag support */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Touch improvements for mobile */
input, select, textarea, button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation;
}

/* Checkbox specific fixes */
input[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    appearance: checkbox !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 0.5rem 0 0 !important;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Better touch targets */
button, .control-btn, .add-btn {
    min-height: 44px;
    min-width: 44px;
}

.remove-btn {
    min-height: unset !important;
    min-width: unset !important;
}

/* Date input improvements for mobile */
input[type="date"] {
    min-height: 44px;
    font-size: 16px;
}

/* Date input placeholder styling */
input[type="date"]::-webkit-datetime-edit-text {
    color: var(--text-muted);
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    color: var(--text-muted);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    opacity: 1;
    color: rgba(30, 30, 30, 0.9);
}

/* Header glass effect enhancement */
.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    border-radius: 0;
}

/* Header hidden state */
.header.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

/* Header content styling */
.header-content {
    position: relative;
    z-index: 1;
}

/* Header logo and controls */
.header-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-logo:hover {
    color: var(--primary-color);
    transform: scale(1.05);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.header-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Dark theme back to top button */
[data-theme="dark"] .back-to-top {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .back-to-top:hover {
    background: #3498db;
}

/* Dark theme header glass effect */
[data-theme="dark"] .header {
    background: rgba(26, 26, 26, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: white;
}

[data-theme="dark"] .header::before {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 50%, 
        rgba(255, 255, 255, 0.05) 100%);
}

[data-theme="dark"] .logo {
    color: white;
}

[data-theme="dark"] .control-btn {
    color: white;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: rgba(30, 30, 30, 0.9);
    font-size: 1.5rem;
    font-weight: 700;
}

.header-controls {
    display: flex;
    gap: 1rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: rgba(30, 30, 30, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Main Container */
.container {
    max-width: 80%;
    width: 80%;
    padding: 0 1.5rem;
    margin: 92px auto 0 auto;
}

/* Robot Section */
.robot-section {
    position: fixed;
    top: 45%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
    pointer-events: none;
}

/* Large screens (laptops) - Robot on left side, form on right */
@media (min-width: 1201px) {
    .robot-section {
        left: 60px; /* Move robot more to the right */
        right: auto;
        transform: translateY(-50%);
    }
    
    /* Position form container on the right side */
    .container {
        margin-left: auto;
        margin-right: auto;
        width: 80%;
        max-width: 80%;
    }
    
    .form-container {
        margin-left: auto;
        margin-right: 0;
        max-width: 900px;
    }
}

/* Very large screens - adjust spacing */
@media (min-width: 1600px) {
    .robot-section {
        left: 280px; /* Move robot more to the right for very large screens */
    }
    
    .container {
        margin-left: auto;
        margin-right: auto;
        width: 80%;
        max-width: 54%;
    }
    
    .form-container {
        margin-left: auto;
        margin-right: 0;
        max-width: 1100px;
    }
}

.robot-section * {
    pointer-events: auto;
}


/* هدف رابط النصائح (#tips) — لا يأخذ مساحة */
.tips-anchor {
    height: 0;
    overflow: hidden;
    display: block;
}

/* هيدر صفحة التسجيل: لوجو ← تابات (الرئيسية، النصائح) ← مسافة ← توجل ودروب */
.header-wrapper-register .header-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: flex-start;
}
.header-wrapper-register .header-bar .header-nav.header-nav-desktop {
    margin-inline-end: 0;
}
.header-wrapper-register .header-bar .header-right-desktop {
    margin-inline-start: auto;
}

/* Form Container — بطاقة بيضاء مع ظل ونصف قوس */
.form-container {
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
}
.form-container .btn-next {
    background: #0A66C2;
}
.form-container .btn-next:hover {
    background: #095196;
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.35);
}

/* ========== Step Progress — مطابق للصورة 100% ========== */
.step-progress {
    padding: 2rem 0rem;
    /* border-bottom: 1px solid #e5e7eb; */
    background: #fff;
}

.step-progress-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1a1a1a;
    font-weight: 400;
    transition: var(--transition);
}

/* لم تصل لها = دائرة مفرغة + دائرة مليانة جوا — بدون ظل أو توهج (مختلفة عن النشطة) */
.step-item .step-circle {
    color: #1a1a1a;
}
.step-item:not(.active):not(.completed) .step-circle {
    box-shadow: none;
    filter: none;
}
.step-item .step-circle-pending {
    display: block;
    position: absolute;
    inset: 0;
    width: 20px;
    height: 20px;
    filter: none;
}
/* شكل التوهج (r=12) للخطوة الحالية/المكتملة — شكل النقطة (r=1) للمعلقة */
.step-item .step-circle-svg-glow,
.step-item .step-circle-svg-dot {
    display: none;
}
.step-item .step-num,
.step-item .step-check {
    display: none;
}

/* الخطوة المعلقة = Group 26: حلقة 20px + نقطة 10px #2E2E2E (لسا ما وصلتها) */
.step-item:not(.active):not(.completed) .step-circle-pending {
    display: none;
}
.step-item:not(.active):not(.completed) .step-circle-svg-dot {
    display: none;
}
/* Group 26 - Ellipse 22: حلقة خارجية 20px */
.step-item:not(.active):not(.completed) .step-circle::before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    width: 20px;
    height: 20px;
    left: 0;
    top: 0;
    border: 2px solid #2E2E2E;
    border-radius: 50%;
    background: transparent;
    z-index: 0;
}
/* Group 26 - Ellipse 21: نقطة داخلية 10px */
.step-item:not(.active):not(.completed) .step-circle::after {
    content: "";
    box-sizing: border-box;
    position: absolute;
    width: 10px;
    height: 10px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #2E2E2E;
    border: 1px solid #2E2E2E;
    z-index: 0;
}

/* الخطوة الحالية = Ellipse 21 (24×24 أزرق + blur 2px) أي خطوة حالية بهالشكل */
.step-item.active {
    color: #0A66C2;
    font-weight: 700;
}
.step-item.active .step-circle {
    color: #0A66C2;
    width: 24px;
    height: 24px;
}
/* Ellipse 21 - شكل الخطوة الحالية: 24×24، primary، blur 2px */
.step-item.active .step-circle::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 0;
    top: 0;
    border-radius: 50%;
    background: #0A66C2;
    filter: blur(2px);
    z-index: 0;
}
.step-item.active .step-circle-pending {
    display: none;
}
.step-item.active .step-circle-svg-glow {
    display: block;
}
.step-item.active .step-circle-svg-dot {
    display: none;
}
.step-item.active .step-circle-svg-glow circle,
.step-item.active .step-circle-svg-glow g circle {
    fill: #0A66C2;
}
.step-item.active .step-num,
.step-item.active .step-check {
    display: none;
}

/* خلصتها = توهج كبير (r=12) أخضر + Vector داخلي #27AE60 + علامة صح */
.step-item.completed {
    color: #059669;
    font-weight: 400;
}
.step-item.completed .step-circle {
    color: #059669;
}
/* Vector - شكل الخطوة المكتملة: أخضر من الداخل 8.33% من كل جهة */
.step-item.completed .step-circle::before {
    content: "";
    position: absolute;
    left: 8.33%;
    right: 8.33%;
    top: 8.33%;
    bottom: 8.33%;
    border-radius: 50%;
    background: #27AE60;
    z-index: 0;
}
.step-item.completed .step-circle-pending {
    display: none;
}
.step-item.completed .step-circle-svg-glow {
    display: block;
}
.step-item.completed .step-circle-svg-dot {
    display: none;
}
.step-item.completed .step-num {
    display: none;
}
.step-item.completed .step-check {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
}

.step-circle {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    transition: var(--transition);
}
.step-circle .step-circle-svg {
    position: absolute;
    inset: 0;
    width: 20px;
    height: 20px;
}
.step-item.active .step-circle .step-circle-svg {
    width: 24px;
    height: 24px;
}
.step-circle .step-circle-svg circle,
.step-circle .step-circle-svg g circle {
    fill: currentColor;
}
.step-circle .step-num,
.step-circle .step-check {
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
}
.step-item.completed .step-circle .step-check {
    color: #fff;
}

.step-label {
    font-size: 0.9375rem;
    white-space: nowrap;
}

/* الوصلات — خط رفيع رمادي موحّد بين كل الخطوات (مثل الصورة) */
.step-connector {
    width: 91px;
    height: 2px;
    margin: 0 6px;
    flex-shrink: 0;
    background: #9ca3af;
    transition: var(--transition);
}
.step-item.completed + .step-connector {
    background: #9ca3af;
}

@media (max-width: 768px) {
    .step-progress-inner {
        gap: 0.5rem;
    }
    .step-label {
        font-size: 0.8rem;
        white-space: normal;
        max-width: 70px;
        text-align: center;
    }
    .step-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    .step-connector {
        width: 12px;
    }
}


/* Form Steps (one visible at a time) */
.form-step {
    display: none;
    padding: 0;
    animation: stepFadeIn 0.35s ease;
}

.form-step.active {
    display: block;
}

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

.step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
    flex-wrap: wrap;
}

.step-actions-last {
    flex-wrap: wrap;
}

.step-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-prev {
    background: var(--surface-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-prev:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-next {
    background: var(--primary-color);
    color: white;
}

.btn-next:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35);
}

/* Validation Feedback Box (ما بوق - يخبرك يلي عبيته صح) */
.validation-feedback {
    margin: 0 2rem 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--info-color);
    background: rgba(52, 152, 219, 0.08);
    font-size: 0.9rem;
}

.validation-feedback[hidden] {
    display: none !important;
}

.validation-feedback.show {
    display: block;
}

.validation-feedback-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

.validation-icon {
    font-size: 1.1rem;
}

.validation-feedback-body ul {
    margin: 0;
    padding: 0 0 0 1.25rem;
    list-style: none;
}

[dir="rtl"] .validation-feedback-body ul {
    padding: 0 1.25rem 0 0;
}

.validation-feedback-body ul li {
    position: relative;
    padding: 0.2rem 0;
}

.validation-feedback-body ul li::before {
    content: '';
    position: absolute;
    right: -1.25rem;
    top: 0.5em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

[dir="ltr"] .validation-feedback-body ul li::before {
    right: auto;
    left: -1.25rem;
}

.validation-ok li::before {
    background: var(--success-color);
}

.validation-errors li::before {
    background: var(--error-color);
}

.validation-ok {
    color: var(--success-color);
}

.validation-errors {
    color: var(--error-color);
    margin-top: 0.5rem;
}

/* Field-level validation hint (icon next to label) */
.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.15);
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}

.form-group .field-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.35rem;
    font-size: 0.85rem;
    color: var(--info-color);
    cursor: help;
}

.form-group.has-success .field-hint {
    color: var(--success-color);
}

.form-group.has-error .field-hint {
    color: var(--error-color);
}

/* Form Sections */
.form-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.section-header {
    display: none;
}

.section-icon {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.section-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
    position: relative;
    padding-inline-end: 27.5rem;
}
.form-group.full-width::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 23.5rem;
    height: 9.5rem;
    background: url(/images/02c36787a25d81eec67ade317cf6080448257382%20(2)%201.svg) no-repeat center / contain;
    pointer-events: none;
}
[dir="rtl"] .form-group.full-width::after {
    right: auto;
    left: 0;
}

/* Form Elements */
label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.required {
    color: var(--error-color);
}

input, select, textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--background-color);
    color: var(--text-color);
    transition: var(--transition);
    width: 100%;
}

/* Checkbox styling */
input[type="checkbox"] {
    width: auto !important;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    transform: scale(1.2);
    cursor: pointer;
}

label {
    cursor: pointer;
}

label input[type="checkbox"] {
    margin: 0 0.5rem 0 0;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Profile Image Upload */
.profile-image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--surface-color);
    cursor: pointer;
    transition: var(--transition);
}

.profile-image-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.profile-image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 0 5px rgba(52, 152, 219, 0.2);
}

.profile-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-image-preview i {
    font-size: 3rem;
    color: var(--text-muted);
}

.profile-image-text {
    color: var(--text-color);
    font-weight: 600;
    text-align: center;
}

.profile-image-input {
    display: none;
}

/* Dynamic Sections */
.dynamic-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dynamic-section.visible {
    display: block;
}

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

/* Dynamic Items */
.dynamic-container {
    margin-top: 1rem;
}

.dynamic-item {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.remove-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--error-color);
    color: white;
    border: none;
    width: 25px !important;
    height: 25px !important;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.add-btn {
    background: var(--success-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.add-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

/* Submit Button */
.submit-container {
    padding: 2rem;
    text-align: center;
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    justify-content: center;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Animation */
.loading {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    padding: 1rem 1.5rem;
    max-width: 400px;
    z-index: 1000;
    transform: translateX(100%);
    transition: var(--transition);
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.notification-icon {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

.notification-success { border-left: 4px solid var(--success-color); }
.notification-error { border-left: 4px solid var(--error-color); }
.notification-warning { border-left: 4px solid var(--warning-color); }
.notification-info { border-left: 4px solid var(--info-color); }

.notification-success .notification-icon { color: var(--success-color); }
.notification-error .notification-icon { color: var(--error-color); }
.notification-warning .notification-icon { color: var(--warning-color); }
.notification-info .notification-icon { color: var(--info-color); }

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

/* Field Errors */
.field-error {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.error {
    border-color: var(--error-color) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        width: 80%;
        max-width: 80%;
        padding: 0 1.5rem;
    }
    
    .robot-section {
        right: 10px;
    }
}

@media (max-width: 992px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 1rem;
        margin: 80px auto 0 auto; /* Less space for mobile header */
    }
    
    .robot-section {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        display: flex;
        justify-content: center;
        margin: 20px 0;
        order: -1;
    }

    .header {
        backdrop-filter: blur(15px) saturate(150%);
        -webkit-backdrop-filter: blur(15px) saturate(150%);
    }

    .header-content {
        padding: 0 1rem;
    }

    .header-controls button {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .form-section {
        padding: 1.5rem;
    }

    .section-header {
        display: none;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

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

    .submit-btn {
        width: 100%;
        padding: 1rem;
    }

    .profile-image-preview {
        width: 100px;
        height: 100px;
    }

    .profile-image-preview i {
        font-size: 2.5rem;
    }

    .control-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 0.5rem;
        margin: 70px auto 0 auto;
    }

    .header {
        backdrop-filter: blur(12px) saturate(120%);
        -webkit-backdrop-filter: blur(12px) saturate(120%);
    }

    .header-content {
        padding: 0 0.8rem;
    }

    .header-controls button {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    input[type="date"] {
        min-height: 48px;
        font-size: 16px;
        padding: 0.8rem 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .form-grid {
        gap: 0.8rem;
    }

    .profile-image-upload {
        padding: 1rem;
    }

    .profile-image-preview {
        width: 80px;
        height: 80px;
    }

    .profile-image-preview i {
        font-size: 2rem;
    }

    .header {
        padding: 0.5rem 0;
    }

    .logo {
        font-size: 1.2rem;
    }

    .control-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }


    .dynamic-item {
        padding: 1rem;
    }

    .add-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .remove-btn {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.7rem;
    }

    input, select, textarea {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    input[type="checkbox"] {
        width: 16px !important;
        height: 16px !important;
        transform: scale(1);
    }

    label {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 0.3rem;
        margin: 60px auto 0 auto;
    }

    .header {
        backdrop-filter: blur(10px) saturate(100%);
        -webkit-backdrop-filter: blur(10px) saturate(100%);
    }

    .header-content {
        padding: 0 0.5rem;
    }

    .header-controls button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .back-to-top {
        bottom: 0.8rem;
        right: 0.8rem;
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    input[type="date"] {
        min-height: 46px;
        font-size: 15px;
        padding: 0.7rem 0.8rem;
    }

    .form-section {
        padding: 0.8rem;
    }

    .header-content {
        padding: 0 0.5rem;
    }

    .control-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .form-grid {
        gap: 0.6rem;
    }

    .dynamic-item {
        padding: 0.8rem;
    }

    input, select, textarea {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }

    input[type="checkbox"] {
        width: 15px !important;
        height: 15px !important;
        transform: scale(1);
    }

    .add-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 0;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
        margin: 0.5rem auto;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .section-header {
        display: none;
    }
}

/* Mobile device specific styles */
.mobile-device .form-container {
    margin: 0.5rem;
    border-radius: 8px;
}

.mobile-device .form-section {
    padding: 1rem;
}

.mobile-device .header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-device .control-btn {
    min-height: 44px;
    min-width: 44px;
}

.mobile-device .add-btn {
    min-height: 44px;
    width: 100%;
}

.mobile-device .remove-btn {
    min-height: unset !important;
    min-width: unset !important;
}

.mobile-device .submit-btn {
    min-height: 48px;
    font-size: 1rem;
}

.mobile-device input[type="date"] {
    min-height: 48px;
    font-size: 16px;
    padding: 0.8rem 1rem;
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .mobile-device input,
    .mobile-device select,
    .mobile-device textarea {
        font-size: 16px;
    }
    
    .mobile-device input[type="checkbox"] {
        width: 20px !important;
        height: 20px !important;
        transform: scale(1.1);
    }
}

/* Android specific fixes */
.mobile-device input:focus,
.mobile-device select:focus,
.mobile-device textarea:focus {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Smooth scrolling for mobile */
.mobile-device {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* Better spacing for mobile forms */
.mobile-device .form-grid {
    gap: 1rem;
}

.mobile-device .dynamic-item {
    margin-bottom: 1rem;
}

/* Improve readability on small screens */
@media (max-width: 576px) {
    .mobile-device .section-title {
        line-height: 1.3;
    }
    
    .mobile-device .section-description {
        line-height: 1.4;
    }
    
    .mobile-device label {
        line-height: 1.3;
    }
}

/* RTL Support */
[dir="rtl"] .notification {
    right: auto;
    left: 20px;
    transform: translateX(-100%);
}

[dir="rtl"] .notification.show {
    transform: translateX(0);
}

[dir="rtl"] .remove-btn {
    right: auto;
    left: 1rem;
}
    
