/*
=========================================================
style.css - Main Stylesheet for Survey Form
Graduate Specialty Transfer Survey System
Syrian Ministry of Higher Education and Scientific Research

Developed by: Dr. Eng. Yasser KHADRA
Year: 2026
Version: 8.6 - Enhanced UI Design (Integrated Status + Bottom Nav)
=========================================================
*/

/* ========================================================= */
/* Reset & Base Styles */
/* ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Tahoma', 'Arial', sans-serif;
    background: #F5F7FA;
    color: #2C3E50;
    direction: rtl;
    padding: 24px 20px;
    padding-bottom: 80px;
}

:root {
    --mohe-blue: #003366;
    --mohe-blue-dark: #002244;
    --mohe-blue-light: #E8F0FE;
    --mohe-gold: #C69C2D;
    --mohe-gold-dark: #A67C1E;
    --mohe-gold-light: #F5E6C8;
    --warning-red: #E8826D;
    --warning-red-light: #FFF3E0;
    --success-green: #2D9C7A;
    --success-green-light: #E6F7F2;
    --neutral-white: #FFFFFF;
    --neutral-gray-50: #F8F9FA;
    --neutral-gray-100: #ECF0F1;
    --neutral-gray-200: #D5D8DC;
    --neutral-gray-300: #BDC3C7;
    --neutral-gray-500: #95A5A6;
    --neutral-gray-700: #7F8C8D;
    --neutral-dark: #2C3E50;
    --neutral-black: #1A252F;
    --shadow-sm: 0 2px 8px rgba(0, 51, 102, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 51, 102, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 51, 102, 0.15);
    --shadow-gold: 0 0 0 3px rgba(198, 156, 45, 0.2);
    --shadow-warning: 0 0 0 3px rgba(232, 130, 109, 0.2);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================================= */
/* Page Transitions */
/* ========================================================= */

.page {
    display: none;
}

.page.active {
    display: block;
    animation: pageFadeIn 0.3s ease;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================================= */
/* Official Header */
/* ========================================================= */

.official-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    margin-bottom: 25px;
    background: var(--neutral-white);
    padding: 15px 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border-bottom: 3px solid var(--mohe-gold);
    transition: all 0.3s ease;
}

.official-header:hover {
    box-shadow: var(--shadow-md);
}

h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--mohe-blue);
    margin: 5px 0 3px;
    letter-spacing: -0.3px;
}

/* ========================================================= */
/* Survey Header with Status */
/* ========================================================= */

.survey-header-container {
    background: var(--neutral-white);
    border-radius: 16px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--mohe-gold-light);
    transition: all 0.3s ease;
}

.survey-header-container:hover {
    box-shadow: var(--shadow-md);
}

.survey-title-wrapper {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px dashed var(--mohe-gold-light);
}

.survey-main-title {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--mohe-blue);
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.survey-main-title i {
    color: var(--mohe-gold);
}

.survey-sub-title {
    font-size: clamp(0.85rem, 1.5vw, 1.1rem);
    font-weight: 600;
    color: var(--mohe-gold-dark);
    margin: 0;
}

/* ========================================================= */
/* Survey Status Banner (Hidden - Integrated with top bar) */
/* ========================================================= */

.survey-status-banner {
    display: none;
}

/* ========================================================= */
/* Top Progress Bar - INTEGRATED WITH STATUS */
/* ========================================================= */

.page-progress-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--neutral-white);
    padding: 12px 20px;
    border-radius: 50px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--mohe-gold-light);
    flex-wrap: wrap;
    gap: 10px;
}

/* حالة الاستبيان في الشريط العلوي */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.status-indicator .icon {
    font-size: 1.2rem;
}

.status-indicator .text {
    font-weight: 700;
    font-size: 0.8rem;
}

.status-indicator .text.open {
    color: var(--success-green);
}

.status-indicator .text.closed {
    color: var(--warning-red);
}

.status-indicator .countdown {
    font-size: 0.65rem;
    color: var(--neutral-gray-500);
}

/* دوائر الصفحات */
.page-progress-steps {
    display: flex;
    gap: 6px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--neutral-gray-100);
    color: var(--neutral-gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--neutral-gray-200);
    position: relative;
}

.step .step-number {
    display: inline;
}

.step:hover:not(.active):not(.completed):not(.disabled):not(.locked):not(.ready):not(.error) {
    border-color: var(--mohe-gold);
    color: var(--mohe-gold);
    transform: scale(1.05);
}

/* ======================================== */
/* حالات دوائر الصفحات الست */
/* ======================================== */

/* الحالة 1: الصفحة الحالية - غير مكتملة (برتقالي) */
.step.active {
    background: #F0AD4E;
    color: white;
    box-shadow: 0 0 0 3px rgba(240, 173, 78, 0.3);
    border-color: #F0AD4E;
}

/* الحالة 2: الصفحة الحالية - مكتملة جاهزة (ذهبي) */
.step.ready {
    background: var(--mohe-gold);
    color: white;
    box-shadow: 0 0 0 3px rgba(198, 156, 45, 0.3);
    border-color: var(--mohe-gold);
    animation: pulseGold 1.5s ease-in-out infinite;
}

@keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 0 3px rgba(198, 156, 45, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(198, 156, 45, 0.1); }
}

/* الحالة 3: الصفحة مكتملة وتم تجاوزها (أخضر مع ✓) */
.step.completed {
    background: var(--success-green);
    color: white;
    position: relative;
    border-color: var(--success-green);
}

.step.completed .step-number {
    display: none;
}

.step.completed::after {
    content: "✓";
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
}

/* الحالة 4: الصفحة فيها أخطاء (أحمر) */
.step.error {
    background: var(--warning-red);
    color: white;
    border-color: var(--warning-red);
    box-shadow: 0 0 0 3px rgba(232, 130, 109, 0.4);
    animation: shakeError 0.5s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

/* الحالة 5: الصفحة مقفلة لم تفتح بعد (رمادي غامق مع قفل) */
.step.locked {
    background: #7F8C8D !important;
    color: #BDC3C7 !important;
    border-color: #95A5A6 !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.step.locked .step-number {
    display: none;
}

.step.locked::after {
    content: "🔒" !important;
    font-size: 0.6rem;
}

/* الحالة 6: الصفحة يمكن الوصول إليها (رمادي فاتح) */
.step.available {
    background: var(--neutral-white);
    color: var(--mohe-blue);
    border-color: var(--mohe-gold);
    cursor: pointer;
}

.step.available:hover {
    background: var(--mohe-gold-light);
    border-color: var(--mohe-gold);
    transform: scale(1.05);
}

/* الحالة القديمة disabled - نحتفظ بها للتوافق */
.step.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--neutral-gray-100);
    color: var(--neutral-gray-500);
    border-color: var(--neutral-gray-200);
}

/* أزرار الإجراءات في الشريط العلوي */
.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-progress-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--neutral-gray-200);
    background: var(--neutral-white);
    color: var(--neutral-gray-500);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-family: 'Cairo', 'Tahoma', sans-serif;
    position: relative;
}

.btn-progress-action:hover:not(:disabled) {
    transform: scale(1.1);
    border-color: var(--mohe-gold);
    color: var(--mohe-gold);
    box-shadow: var(--shadow-gold);
}

.btn-progress-action:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
}

.btn-progress-action#globalResetBtn:hover:not(:disabled) {
    border-color: var(--warning-red);
    color: var(--warning-red);
    box-shadow: 0 0 0 3px rgba(232, 130, 109, 0.2);
}

.countdown-prefix {
    font-weight: 700;
    color: #003366;
}

.countdown-value {
    font-weight: 700;
    color: hsl(168, 93%, 17%);
    /*font-family: monospace;*/
}

.countdown-label {
    font-weight: 700;
    color: #2C3E50;
}

/* رقم الصفحة في الشريط العلوي */
.page-progress-text {
    font-size: 0.75rem;
    color: var(--mohe-blue);
    font-weight: 700;
    background: var(--mohe-blue-light);
    padding: 4px 12px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* ========================================================= */
/* Bottom Navigation Bar - ENHANCED */
/* ========================================================= */

.bottom-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--neutral-white);
    border-radius: 60px;
    margin-top: 25px;
    box-shadow: 0 4px 16px rgba(0, 51, 102, 0.10);
    border: 1px solid var(--mohe-gold-light);
    transition: all 0.3s ease;
}

.bottom-nav-bar:hover {
    box-shadow: 0 6px 24px rgba(0, 51, 102, 0.15);
}

/* أزرار التنقل */
.btn-nav {
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    justify-content: center;
    font-family: 'Cairo', 'Tahoma', sans-serif;
}

.btn-nav i {
    font-size: 0.9rem;
}

/* زر السابق */
.btn-nav.btn-prev {
    background: var(--neutral-gray-100);
    color: var(--neutral-gray-700);
}

.btn-nav.btn-prev:hover:not(:disabled) {
    background: var(--neutral-gray-300);
    transform: translateX(-2px);
}

.btn-nav.btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* زر التالي */
.btn-nav.btn-next {
    background: var(--mohe-blue);
    color: white;
}

.btn-nav.btn-next:hover:not(:disabled) {
    background: var(--mohe-blue-dark);
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.btn-nav.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* زر بدء الاستبيان */
.btn-nav.btn-start {
    background: linear-gradient(135deg, var(--mohe-gold), var(--mohe-gold-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(198, 156, 45, 0.3);
    min-width: 140px;
}

.btn-nav.btn-start:hover:not(:disabled) {
    transform: translateX(2px);
    box-shadow: 0 6px 20px rgba(198, 156, 45, 0.4);
    background: linear-gradient(135deg, var(--mohe-gold-dark), var(--mohe-gold));
}

.btn-nav.btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* زر تجهيز التقرير */
.btn-nav.btn-review {
    background: linear-gradient(135deg, var(--success-green), #1e6b52);
    color: white;
    box-shadow: 0 4px 12px rgba(45, 156, 122, 0.3);
    min-width: 160px;
}

.btn-nav.btn-review:hover:not(:disabled) {
    transform: translateX(2px);
    box-shadow: 0 6px 20px rgba(45, 156, 122, 0.4);
    background: linear-gradient(135deg, #1e6b52, #15523e);
}

.btn-nav.btn-review:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* مؤشر الصفحة */
.page-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--mohe-blue-light);
    padding: 6px 18px;
    border-radius: 30px;
}

.page-indicator i {
    color: var(--mohe-gold);
    font-size: 0.8rem;
}

.page-indicator span {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--mohe-blue);
}

/* دوائر التنقل المخفية (للتوافق مع app.js) */
.nav-dots {
    display: none;
}

/* ========================================================= */
/* Form Cards */
/* ========================================================= */

.announce-card {
    background: linear-gradient(135deg, var(--mohe-beige) 0%, var(--neutral-white) 100%);
    border: 1px solid var(--mohe-gold-light);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-right: 5px solid var(--mohe-gold);
}

.announce-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.announce-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--mohe-blue);
    border-right: 4px solid var(--mohe-gold);
    padding-right: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-card {
    background: linear-gradient(135deg, var(--warning-red-light) 0%, var(--neutral-white) 100%);
    border-right: 5px solid var(--warning-red);
}

.warning-card .announce-title {
    color: var(--warning-red) !important;
    border-right-color: var(--warning-red) !important;
}

.info-card {
    background: linear-gradient(135deg, var(--mohe-blue-light) 0%, var(--neutral-white) 100%);
}

.form-card {
    background: var(--neutral-white);
    border: 1px solid var(--neutral-gray-100);
    border-radius: 20px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.form-card:hover {
    box-shadow: var(--shadow-md);
}

/* ========================================================= */
/* Form Sections */
/* ========================================================= */

.form-section {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--neutral-gray-100);
    padding-bottom: 20px;
}

.form-section h3 {
    font-size: 1.1rem;
    color: var(--mohe-blue);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    border-right: 4px solid var(--mohe-gold);
    padding-right: 12px;
}

.form-section h3 i {
    color: var(--mohe-gold);
    font-size: 1.1rem;
}

.form-section h4 {
    font-size: 1rem;
    color: var(--mohe-gold-dark);
    margin: 15px 0 12px 0;
    padding-right: 10px;
    border-right: 3px solid var(--mohe-gold);
}

/* ========================================================= */
/* Form Grid */
/* ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* ========================================================= */
/* Input Fields */
/* ========================================================= */

.input-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-field label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--mohe-blue);
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-field label i {
    color: var(--mohe-gold);
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.input-field.required label::after {
    content: " *";
    color: var(--warning-red);
    font-weight: bold;
}

.input-field input:required,
.input-field select:required,
.input-field textarea:required {
    border-right: 2px solid var(--warning-red);
}

.input-field input,
.input-field select,
.input-field textarea {
    background: var(--neutral-gray-50);
    border: 1px solid var(--neutral-gray-100);
    border-radius: 12px;
    padding: 10px 14px;
    font-family: 'Cairo', 'Tahoma', sans-serif;
    font-size: 0.85rem;
    color: var(--neutral-dark);
    transition: all 0.2s ease;
    outline: none;
}

.input-field input:hover,
.input-field select:hover,
.input-field textarea:hover {
    border-color: var(--mohe-gold);
    background: var(--neutral-white);
}

.input-field input:focus,
.input-field select:focus,
.input-field textarea:focus {
    border-color: var(--mohe-blue);
    box-shadow: var(--shadow-gold);
    background: var(--neutral-white);
}

/* ========================================================= */
/* Incomplete Fields */
/* ========================================================= */

.input-field.incomplete input,
.input-field.incomplete select,
.input-field.incomplete textarea {
    background-color: var(--warning-red-light);
    border-color: var(--warning-red);
    border-right: 2px solid var(--warning-red);
}

.input-field.incomplete label {
    color: var(--warning-red);
}

.input-field.incomplete label i {
    color: var(--warning-red);
}

/* ========================================================= */
/* Readonly Fields */
/* ========================================================= */

.readonly-field {
    background: var(--mohe-blue-light) !important;
    font-weight: 700;
    color: var(--mohe-blue) !important;
    border-color: var(--mohe-blue) !important;
}

/* ========================================================= */
/* Hints */
/* ========================================================= */

.inline-hint {
    font-size: 0.65rem;
    color: var(--neutral-gray-500);
    margin-top: 3px;
    transition: all 0.2s ease;
}

/* ========================================================= */
/* Scroll to Top Button */
/* ========================================================= */

.scroll-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--mohe-blue);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 999;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top:hover {
    background: var(--mohe-gold);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ========================================================= */
/* Toast Messages */
/* ========================================================= */

.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    min-width: 280px;
    max-width: 450px;
    background: var(--neutral-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    direction: rtl;
}

.toast-msg.show {
    transform: translateX(-50%) translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    gap: 12px;
}

.toast-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--neutral-dark);
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--neutral-gray-500);
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-close:hover {
    color: var(--warning-red);
    background: var(--warning-red-light);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--mohe-gold), var(--mohe-gold-dark));
    animation: toastProgress linear forwards;
    transform-origin: left;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

.toast-success {
    border-right: 4px solid var(--success-green);
}

.toast-success .toast-icon {
    color: var(--success-green);
}

.toast-success .toast-progress {
    background: linear-gradient(90deg, var(--success-green), #1e6b52);
}

.toast-error {
    border-right: 4px solid var(--warning-red);
}

.toast-error .toast-icon {
    color: var(--warning-red);
}

.toast-error .toast-progress {
    background: linear-gradient(90deg, var(--warning-red), #c0392b);
}

.toast-warning {
    border-right: 4px solid var(--mohe-gold);
}

.toast-warning .toast-icon {
    color: var(--mohe-gold);
}

.toast-info {
    border-right: 4px solid var(--mohe-blue);
}

.toast-info .toast-icon {
    color: var(--mohe-blue);
}

/* ========================================================= */
/* Footer */
/* ========================================================= */

footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.7rem;
    color: var(--neutral-gray-500);
    border-top: 1px solid var(--neutral-gray-100);
    padding-top: 20px;
}

/* ========================================================= */
/* Warnings & Alerts */
/* ========================================================= */

.section-warning {
    background: #FFF8F0;
    border-right: 3px solid #E8826D;
    padding: 6px 10px;
    margin-bottom: 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-warning i {
    color: #E8826D;
    font-size: 0.8rem;
}

.section-warning strong {
    color: #E8826D;
}

#age {
    background: #E8F0FE !important;
    font-weight: 700;
    color: #003366 !important;
    text-align: center;
}

.info-banner {
    background: #E8F0FE;
    border-right: 4px solid #C69C2D;
    padding: 8px 12px;
    margin-bottom: 15px;
    border-radius: 8px;
}

.info-banner i {
    color: #C69C2D;
    margin-left: 6px;
}

.info-banner ul {
    margin-top: 6px;
    margin-right: 18px;
}

.info-banner li {
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: #2C3E50;
}

#confirmInfo {
    accent-color: #E8826D;
    cursor: pointer;
}

#confirmInfo:hover:not(:disabled) {
    transform: scale(1.05);
}

#confirmInfo:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.input-field input:disabled,
.input-field select:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ========================================================= */
/* Error Styles */
/* ========================================================= */

.input-field.error input,
.input-field.error select,
.input-field.error textarea {
    border-color: #E8826D !important;
    background-color: #FFF5F5 !important;
    box-shadow: 0 0 0 2px rgba(232, 130, 109, 0.2) !important;
}

.input-field.error label {
    color: #E8826D !important;
}

.input-field.error label i {
    color: #E8826D !important;
}

.error-message {
    color: #E8826D;
    font-size: 0.65rem;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-field input:focus:not(.error input),
.input-field select:focus:not(.error select) {
    border-color: var(--mohe-blue);
    box-shadow: var(--shadow-gold);
}

.input-field.error input:focus,
.input-field.error select:focus,
.input-field.error textarea:focus {
    box-shadow: 0 0 0 3px rgba(232, 130, 109, 0.4) !important;
}

/* ========================================================= */
/* Enhanced Checkbox in Page 1 */
/* ========================================================= */

#confirmSection {
    transition: all 0.3s ease;
    position: relative;
}

#confirmSection:hover {
    border-color: var(--mohe-gold);
    background: var(--mohe-beige);
}

#confirmRead {
    transition: all 0.3s ease;
}

#confirmRead:checked {
    accent-color: var(--mohe-gold);
    transform: scale(1.05);
}

#confirmRead:not(:checked) {
    animation: gentlePulse 2s infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(198, 156, 45, 0);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(198, 156, 45, 0.15);
    }
}

#confirmPulse.active {
    animation: pulseRing 1.5s ease-in-out infinite;
}

@keyframes pulseRing {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

#confirmReadHint {
    transition: all 0.3s ease;
}

#confirmReadHint i {
    animation: handWave 2s ease-in-out infinite;
}

@keyframes handWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-5deg); }
}

/* ========================================================= */
/* Page Error Highlighting */
/* ========================================================= */

.page.page-error {
    background-color: rgba(232, 130, 109, 0.08);
    border-radius: 16px;
    padding: 10px;
    margin: -10px;
    transition: background-color 0.3s ease;
}

.page-error-banner {
    background: linear-gradient(135deg, #E8826D, #c0392b);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(232, 130, 109, 0.3);
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-error-banner i {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.page-error-banner ul {
    margin: 5px 20px 0 0;
    font-size: 0.8rem;
    font-weight: normal;
}

.page-error-banner li {
    margin-bottom: 3px;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes gentlePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
    50% { box-shadow: 0 2px 20px rgba(198, 156, 45, 0.25), 0 0 0 2px rgba(198, 156, 45, 0.15); }
}

.clean-confirm.ready-to-confirm {
    animation: gentlePulse 2s ease-in-out 3;
    border-color: #C69C2D;
}

/* ========================================================= */
/* Bottom Progress Bar */
/* ========================================================= */

.progress-bar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--neutral-white);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    padding: 8px 20px;
    z-index: 999;
    border-top: 2px solid var(--mohe-gold);
}

.progress-bar-container.has-error {
    border-top-color: var(--warning-red);
}

.progress-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.7rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-label {
    color: var(--mohe-blue);
    font-weight: 600;
}

.progress-label i {
    color: var(--mohe-gold);
    margin-left: 5px;
}

.progress-percentage {
    font-weight: 800;
    color: var(--mohe-gold);
}

.progress-fields {
    color: var(--neutral-gray-700);
}

.progress-bar-track {
    background: var(--neutral-gray-100);
    border-radius: 10px;
    height: 6px;
    overflow: hidden;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--mohe-gold), var(--mohe-gold-dark));
    width: 0%;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* ========================================================= */
/* حقول الـ Stepper المحسنة (معدل الإجازة والامتحان الوطني) */
/* ========================================================= */

/* الحاوية الرئيسية - توسيط شاقولي كامل */
.stepper-group-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    direction: ltr;
    min-height: 46px;
    box-sizing: border-box;
}

/* جزء العدد (صحيح أو عشري) */
.stepper-part {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

/* تسمية فوق كل جزء */
.stepper-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* صندوق الأزرار والحقل - ارتفاع ثابت */
.stepper-box {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    background: white;
    height: 32px;
    box-sizing: border-box;
}

/* حقل إدخال الجزء الصحيح - أزرق */
.stepper-input-int {
    border: none !important;
    text-align: center;
    width: 50px;
    height: 32px;
    font-size: 1rem;
    font-weight: 700;
    color: #003366;
    background: #e8f0fe;
    padding: 0 4px;
    box-sizing: border-box;
}

/* زر الجزء الصحيح - أزرق */
.stepper-btn-int {
    background: #003366;
    color: white;
    border: none;
    width: 28px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: background 0.2s;
    font-family: 'Cairo', 'Tahoma', sans-serif;
    box-sizing: border-box;
}

.stepper-btn-int:hover {
    background: #002244;
}

.stepper-btn-int:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* حقل إدخال الجزء العشري - ذهبي */
.stepper-input-dec {
    border: none !important;
    text-align: center;
    width: 55px;
    height: 32px;
    font-size: 1rem;
    font-weight: 700;
    color: #B8860B;
    background: #fff8e1;
    padding: 0 4px;
    box-sizing: border-box;
}

/* زر الجزء العشري - ذهبي */
.stepper-btn-dec {
    background: #C69C2D;
    color: white;
    border: none;
    width: 28px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.85rem;
    transition: background 0.2s;
    font-family: 'Cairo', 'Tahoma', sans-serif;
    box-sizing: border-box;
}

.stepper-btn-dec:hover {
    background: #A07D20;
}

.stepper-btn-dec:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* الفاصلة العشرية - توسيط شاقولي */
.stepper-separator-enhanced {
    font-size: 1.6rem;
    font-weight: 900;
    color: #003366;
    margin: 0 2px;
    line-height: 1;
    align-self: center;
}

/* علامة يساوي - توسيط شاقولي */
.stepper-equals {
    font-size: 1.3rem;
    font-weight: 900;
    color: #2D9C7A;
    margin: 0 6px;
    align-self: center;
}


/* الحقول المخفية */
input[type="hidden"]#gradPercent,
input[type="hidden"]#nationalGrade {
    display: none;
}

/* حذف التنسيقات القديمة نهائياً */
.stepper-group,
.stepper-dot,
.stepper-result,
.stepper-btn:not(.stepper-btn-int):not(.stepper-btn-dec),
.stepper-input:not(.stepper-input-int):not(.stepper-input-dec) {
    display: none;
}

/* ========================================================= */
/* Mobile Responsive */
/* ========================================================= */

@media (max-width: 768px) {
    body {
        padding: 12px;
        padding-bottom: 80px;
    }

    .page-progress-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
        border-radius: 20px;
    }

    .page-progress-steps {
        justify-content: center;
    }

    .step {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .page-progress-text {
        font-size: 0.7rem;
    }

    .top-actions {
        gap: 6px;
    }

    .btn-progress-action {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }

    .form-card {
        padding: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .official-header {
        padding: 12px;
        margin-bottom: 20px;
    }

    .survey-header-container {
        padding: 15px;
        margin-bottom: 20px;
    }

    .survey-main-title {
        font-size: clamp(1rem, 2.5vw, 1.3rem);
    }

    h1 {
        font-size: 1rem;
    }

    .announce-card {
        padding: 1rem;
        margin-bottom: 15px;
    }

    .announce-title {
        font-size: 1rem;
    }

    .scroll-top {
        bottom: 70px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .bottom-nav-bar {
        padding: 10px 14px;
        border-radius: 40px;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
    }

    .btn-nav {
        padding: 8px 14px;
        font-size: 0.7rem;
        min-width: 60px;
    }

    .btn-nav i {
        font-size: 0.7rem;
    }

    .btn-nav.btn-start {
        min-width: 100px;
    }

    .btn-nav.btn-review {
        min-width: 120px;
    }

    .page-indicator {
        padding: 4px 12px;
        font-size: 0.7rem;
    }

    .page-indicator i {
        font-size: 0.7rem;
    }

    .page-indicator span {
        font-size: 0.7rem;
    }

    .btn-nav span {
        display: none;
    }

    .btn-nav i {
        margin: 0;
    }

    .progress-bar-container {
        padding: 5px 12px;
    }

    .progress-bar-info {
        font-size: 0.6rem;
    }

    .status-indicator .text {
        font-size: 0.7rem;
    }

    .status-indicator .countdown {
        font-size: 0.55rem;
    }

    .floating-dashboard-btn {
        width: 45px;
        height: 45px;
        bottom: 80px;
        left: 12px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .bottom-nav-bar {
        padding: 6px 10px;
        border-radius: 30px;
        gap: 4px;
    }

    .btn-nav {
        padding: 6px 10px;
        font-size: 0.6rem;
        min-width: 40px;
    }

    .btn-nav.btn-start {
        min-width: 70px;
    }

    .btn-nav.btn-review {
        min-width: 80px;
    }

    .page-indicator {
        padding: 3px 8px;
    }

    .page-indicator span {
        font-size: 0.6rem;
    }

    .step {
        width: 24px;
        height: 24px;
        font-size: 0.55rem;
        border-width: 1.5px;
    }

    .step.completed::after {
        font-size: 0.6rem;
    }

    .btn-progress-action {
        width: 24px;
        height: 24px;
        font-size: 0.55rem;
        border-width: 1.5px;
    }

    .toast-msg {
        width: 90%;
        min-width: auto;
        bottom: 20px;
    }
    
    .toast-content {
        padding: 10px 14px;
    }
    
    .toast-message {
        font-size: 0.8rem;
    }

    .floating-dashboard-btn {
        width: 40px;
        height: 40px;
        bottom: 70px;
        left: 10px;
        font-size: 1rem;
    }
}

/* ========================================================= */
/* زر لوحة التحكم في الشريط العلوي */
/* ========================================================= */

#helpBtn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 0 3px rgba(198, 156, 45, 0.3);
}

.floating-dashboard-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 51, 102, 0.4);
    background: linear-gradient(135deg, var(--mohe-gold), var(--mohe-gold-dark));
}

.floating-dashboard-btn .tooltip {
    position: absolute;
    right: 65px;
    background: var(--neutral-dark);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Cairo', 'Tahoma', sans-serif;
    font-weight: 600;
}

.floating-dashboard-btn:hover .tooltip {
    opacity: 1;
}

.step.locked {
    background: #7F8C8D !important;
    color: #BDC3C7 !important;
    border-color: #95A5A6 !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    animation: none !important;
    box-shadow: none !important;
}

.step.locked .step-number {
    display: none;
}

.step.locked::after {
    content: "🔒";
    font-size: 0.6rem;
}

@keyframes pulseOnce {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ========================================================= */
/* قسم تأكيد صحة المعلومات - تصميم أنيق */
/* ========================================================= */

.clean-confirm {
    background: #ffffff !important;
    border: 2px solid #C69C2D !important;
    border-radius: 14px !important;
    padding: 22px 26px !important;
    margin-top: 20px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
}

.clean-confirm-header {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    margin-bottom: 16px !important;
}

.clean-confirm-icon {
    color: #C69C2D !important;
    font-size: 1.3rem !important;
}

.clean-confirm-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #003366 !important;
}

.clean-confirm-badge {
    margin-right: auto !important;
    background: #fdf3e0 !important;
    color: #8B6914 !important;
    padding: 3px 12px !important;
    border-radius: 14px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    border: 1px solid #f0d78c !important;
}

.clean-checkbox-row {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #f9fafb !important;
    border: 1.5px solid #e2e6eb !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
}

.clean-checkbox-row input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    accent-color: #2D9C7A !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.clean-checkbox-text {
    font-size: 0.88rem !important;
    color: #4a5568 !important;
    line-height: 1.6 !important;
}

.clean-checkbox-text strong {
    color: #003366 !important;
}

.clean-confirm-hint {
    margin-top: 12px !important;
    padding: 8px 14px !important;
    background: #f4f6f9 !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    color: #718096 !important;
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
}

.input-field-edit label { display: block; font-weight: 600; font-size: 0.7rem; color: #003366; margin-bottom: 3px; }
        .input-field-edit input, .input-field-edit textarea {
            width: 100%; padding: 6px 8px; border: 1px solid #d5dce6; border-radius: 6px;
            font-family: 'Cairo', sans-serif; font-size: 0.75rem;
        }      
/* ======================================== */
/* تأثير نبض لـ checkbox الموافقة */
/* ======================================== */

@keyframes pulseConfirm {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(45, 156, 122, 0.6); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(45, 156, 122, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(45, 156, 122, 0); }
}