﻿@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap' );
body, html {
    height: 100%;
}


body {
    font-family: "Cairo", sans-serif;
    /* background-image: url('../images/high_res_background.png');*/
   /*background-image: url('../images/background.png');*/
    background-color: #e2ecf6; /* يمكنك تجربة #34495e أيضا */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.title-container {
    background-color: #1d6ff8;
    color: #fff;
    padding: 0.5rem 0;
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
    border-bottom-right-radius: 15px;
    border-bottom-left-radius: 15px;
    text-align: center;
    box-sizing: border-box;
}

/* الشعار */
.ministry-logo {
    width: 60px;
    height: auto;
}

/* نصوص الهيدر */
.header-container h1 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.header-container h2 {
    font-size: 1rem;
    margin: 0;
}

/* التعامل مع الشاشات الصغيرة */
@media (max-width: 768px) {
    .header-container .container {
        flex-direction: column !important; /* يجعل الشعار فوق النصوص */
        text-align: center !important;
    }

    .ministry-logo {
        width: 60px;
        margin-bottom: 0.5rem;
    }

    .header-container h1 {
        font-size: 1.1rem;
    }

    .header-container h2 {
        font-size: 0.9rem;
    }
}

/* للجوال الصغير جدًا */
@media (max-width: 480px) {
    .ministry-logo {
        width: 50px;
    }

    .header-container h1 {
        font-size: 1rem;
    }

    .header-container h2 {
        font-size: 0.85rem;
    }
}

/* مركز الصفحة بشكل عام */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem; /* padding عام */
}

/* الكارد */
.login-card {
    width: 100%; /* يأخذ كامل العرض المتاح داخل الـ container */
    max-width: 800px; /* أقصى عرض للكارد */
    margin: 1rem auto 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgb(14 108 200);
    transition: transform 0.3s ease;
}

/* عنوان الكارد */
.login-title {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(90deg, #0c86e0, #58a7fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.update-progress-overlay {
    position: fixed; /* تثبيت في الشاشة */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* طبقة شفافة */
    display: flex;
    justify-content: center;
    align-items: start; /* نخليها في الأعلى */
    padding-top: 80px; /* مسافة من الأعلى */
    z-index: 99999 !important; /* فوق كل العناصر */
}

.update-progress-content {
    background-color: white;
    padding: 20px 40px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 100000 !important;
}



.title-box {
    text-align: center;
    margin-bottom: 20px;
}

    .title-box .login-title {
        font-size: 20px;
        font-weight: bold;
        color: #0d6efd;
    }

.title-line {
    width: 60px;
    height: 4px;
    background: #0d6efd;
    margin: 8px auto 0;
    border-radius: 2px;
}

   /* .login-title:hover {
        transform: translateY(-3px);
        text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    }

    .login-title i {
        color: #ff7e5f;
        transition: color 0.3s ease;
    }

    .login-title:hover i {
        color: #feb47b;
    }*/

/* تحسين الأزرار والحقول لتكون ريسبونسف */
.login-card .form-control {
    width: 100%;
    box-sizing: border-box;
}

/* روابط الإجراءات */
.action-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem; /* المسافة بين الأزرار */
    flex-wrap: wrap; /* السماح بالالتفاف على الشاشات الصغيرة */
}

    .action-links a.btn {
        flex: 0 1 auto; /* لا تأخذ كامل العرض، عرض تلقائي حسب المحتوى */
        min-width: 140px; /* أقل عرض للأزرار */
        text-align: center;
    }

/* Media Queries للشاشات الصغيرة */
@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem;
    }

    .login-title {
        font-size: 1.3rem;
        gap: 0.3rem;
    }

    .action-links {
        flex-direction: column; /* التفاف عمودي */
        gap: 1rem;
    }

        .action-links a.btn {
            width: 100%; /* الأزرار تصبح كاملة العرض */
        }
}

.cscolor {
    font-size: 19px;
    color: #0b6dee;
}

.header-container {
    background: linear-gradient(90deg, #004aad 0%, #0078d7 100%);
    color: #fff;
    padding: 1.5rem 0;
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    border-bottom-right-radius: 15px;
    border-bottom-left-radius: 15px;
    text-align: center;
    box-sizing: border-box;
}
.btn-success {
    background-color: #56b2ff;
    border: none;
}

    .btn-success:hover {
        background-color: #56b2ff;
    }


.modal-content {
    border-radius: 15px;
}

.form-control:focus {
    border-color: #0078d7;
    box-shadow: 0 0 0 0.2rem rgba(0,120,215,0.15);
}

/* ===== OTP Modal Styles ===== */
.otp-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.emblem-img {
    width: 70px;
    margin-bottom: 15px;
    animation: fadeInDown 0.6s ease-out;
}

.lock-icon {
    font-size: 45px;
    color: #0078d7;
    margin-bottom: 15px;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.otp-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.otp-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0px);
    }
}

.otp-inputs-container {
    direction: ltr;
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease-out 0.4s both;
    flex-direction: row; /* ترتيب من اليسار إلى اليمين */
}


.otp-input-field {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .otp-input-field:focus {
        border-color: #0078d7;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 120, 215, 0.1);
    }

    .otp-input-field:hover {
        border-color: #b0b0b0;
    }

.error-alert {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: none;
    animation: slideInDown 0.4s ease-out;
}

    .error-alert.show {
        display: block;
    }

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timer-section {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.timer-text {
    color: #0078d7;
    font-weight: 600;
    font-size: 16px;
}

.resend-link {
    background: none;
    border: none;
    color: #0078d7;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    padding: 0;
    font-size: 14px;
    transition: color 0.3s ease;
}

    .resend-link:hover:not(:disabled) {
        color: #005a9c;
        text-decoration: underline;
    }

    .resend-link:disabled {
        color: #ccc;
        cursor: not-allowed;
    }

.otp-modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.btn-otp-cancel {
    flex: 1;
    border: 2px solid #e0e0e0;
    color: #666;
    background: white;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Cairo", sans-serif;
}

    .btn-otp-cancel:hover {
        background-color: #f5f5f5;
        border-color: #b0b0b0;
    }

.btn-otp-verify {
    flex: 1;
    background-color: #0078d7;
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Cairo", sans-serif;
}

    .btn-otp-verify:hover:not(:disabled) {
        background-color: #005a9c;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 120, 215, 0.3);
    }

    .btn-otp-verify:disabled {
        background-color: #ccc;
        cursor: not-allowed;
    }

.success-content {
    text-align: center;
    display: none;
}

    .success-content.show {
        display: block;
        animation: fadeIn 0.5s ease-out;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.success-icon {
    font-size: 60px;
    color: #28a745;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-title {
    font-size: 22px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.success-text {
    color: #666;
    margin-bottom: 20px;
}

.btn-continue {
    width: 100%;
    background-color: #28a745;
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Cairo", sans-serif;
}

    .btn-continue:hover {
        background-color: #218838;
    }

.otp-form-content {
    display: block;
}

    .otp-form-content.hidden {
        display: none;
    }

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}
/* ريسبونسف */

.footer {
    width: 100%;
    position: relative; /* يمكنك تغييره إلى fixed إذا أردت أن يكون دائمًا ظاهرًا */
    bottom: 0;
    left: 0;
    font-size: 0.9rem;
    background: linear-gradient(90deg, #004aad, #0078d7);
    color: #fff;
}


.return-btn {
    width: 300px;
    background-color: #0c4eac;
    color: white !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

    .return-btn:hover {
        background-color: #198754;
    }
    .return-btn:active   {
        background-color: #198754 !important ;
    }
    .return-btn:focus-visible  {
        background-color: #198754;
    }
    .return-btn i {
        font-size: 18px;
    }



.id-help-img {
    width: 35px;
    height: 22px;
    margin-left: 5px;
    cursor: zoom-in;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: 4px;
}

    .id-help-img:hover {
        transform: scale(8);
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
        position: relative;
        z-index: 9999;
    }


   /* stepper wizard*/

/* ===================================================================
   Modern & FLEXIBLE Stepper (Flexbox-based for dynamic alignment)
   Designed by Manus - v2
   =================================================================== */



:root {
    --stepper-primary-color: #0056b3;
    --stepper-secondary-color: #007bff;
    --stepper-done-color: #28a745;
    --stepper-inactive-color: #e9ecef;
    --stepper-line-bg: #e9ecef;
    --stepper-text-color: #fff;
    --stepper-label-color: #495057;
    --stepper-font: 'Cairo', sans-serif;
}

/* -- Stepper Container (The Core of the new logic) -- */
.stepper-wrapper {
    font-family: var(--stepper-font);
    display: flex;
    align-items: flex-start; /* محاذاة العناصر من الأعلى */
    justify-content: center; /* توسيط المحتوى */
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
}

/* -- Step Item (Icon + Label) -- */
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0; /* منع الأيقونات من التقلص */
}

/* -- The connecting line (Now a flex item) -- */
.stepper-line {
    flex-grow: 1; /* <<-- أهم خاصية: الخط سيأخذ كل المساحة المتاحة */
    height: 6px;
    background-color: var(--stepper-line-bg);
    border-radius: 6px;
    margin: 22px 0 0; /* محاذاة الخط عمودياً مع منتصف الأيقونة */
    position: relative; /* للسماح بوجود الخط الممتلئ فوقه */
}

    /* -- The filled part of the line -- */
    .stepper-line .line-fill {
        position: absolute;
        height: 100%;
        width: 0;
        background: linear-gradient(to right, var(--stepper-secondary-color), var(--stepper-done-color));
        border-radius: 6px;
        transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    }

/* -- Step Icon -- */
.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--stepper-inactive-color);
    border: 4px solid var(--stepper-inactive-color);
    color: var(--stepper-label-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 900;
    transition: all 0.4s ease;
    flex-shrink: 0; /* منع الأيقونة من التقلص */
}

/* -- Step Label -- */
.step-label {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--stepper-label-color);
    transition: color 0.4s ease;
}

/* ===================================================================
   STEP STATES (Active, Done) - No changes here
   =================================================================== */

.step.active .step-icon {
    background-color: var(--stepper-text-color);
    border-color: var(--stepper-primary-color);
    color: var(--stepper-primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 86, 179, 0.3);
}

.step.active .step-label {
    color: var(--stepper-primary-color);
}

.step.done .step-icon {
    background-color: var(--stepper-done-color);
    border-color: var(--stepper-done-color);
    color: var(--stepper-text-color);
    transform: scale(1);
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}

.step.done .step-label {
    color: var(--stepper-done-color);
}

.step.done .step-icon .checkmark {
    font-size: 2rem;
    animation: pop-in 0.3s ease-out forwards;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}
