:root {
    --primary: #0d6efd;
    --dark: #172033;
    --light: #f6f8fc;
    --border: #e4e8f0;
}

body {
    background: var(--light);
    color: #202636;
    font-family:
        "Cairo", sans-serif;
}

/* =========================================================
   CANDIDATURE ENSEIGNANT
   Arabic RTL Typography
   ========================================================= */

.ce-app {
    font-family: "Cairo", sans-serif;
    direction: rtl;
    text-align: right;
    font-size: 15px;
    line-height: 1.8;
}

/* كل عناصر الواجهة */
.ce-app *,
.ce-app input,
.ce-app select,
.ce-app textarea,
.ce-app button,
.ce-app .form-control,
.ce-app .form-select {
    font-family: "Cairo", sans-serif;
}

/* النصوص */
.ce-app p {
    font-weight: 400;
    line-height: 1.9;
}

.ce-app small {
    font-size: 13px;
}

/* العناوين */
.ce-app h1,
.ce-app h2,
.ce-app h3,
.ce-app h4,
.ce-app h5,
.ce-app h6 {
    font-family: "Cairo", sans-serif;
    font-weight: 700;
    line-height: 1.6;
}

/* العنوان الرئيسي */
.ce-app h1 {
    font-weight: 800;
}

/* Labels */
.ce-app .form-label {
    font-weight: 600;
    margin-bottom: 7px;
}

/* Input */
.ce-app .form-control,
.ce-app .form-select {
    min-height: 46px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 400;
}

/* Placeholder */
.ce-app .form-control::placeholder {
    font-family: "Cairo", sans-serif;
    font-size: 13px;
    opacity: .65;
}

/* Buttons */
.ce-app .btn {
    font-family: "Cairo", sans-serif;
    font-weight: 600;
}

/* Navbar */
.ce-app .navbar,
.ce-app .navbar-brand,
.ce-app .nav-link {
    font-family: "Cairo", sans-serif;
}

/* Cards */
.ce-app .card-title {
    font-weight: 700;
}

.ce-app .card-text {
    font-weight: 400;
}

/* Tables */
.ce-app table {
    font-family: "Cairo", sans-serif;
}

.ce-app th {
    font-weight: 700;
}

.ce-app td {
    font-weight: 400;
}

/* Alerts */
.ce-app .alert {
    font-weight: 500;
}

/* Breadcrumb */
.ce-app .breadcrumb {
    font-family: "Cairo", sans-serif;
}

/* Stepper */
.ce-app .step-title {
    font-weight: 600;
}

.ce-app .step-number {
    font-family: "Cairo", sans-serif;
    font-weight: 700;
}

.app-navbar {
    background:
        linear-gradient(
            135deg,
            #172033,
            #253b63
        );
    box-shadow:
        0 4px 20px rgba(0,0,0,.08);
}

.main-content {
    min-height: calc(100vh - 150px);
    padding: 45px 0;
}

.app-footer {
    background: #172033;
    color: white;
    padding: 25px 0;
}


/* =====================================================
   HERO
===================================================== */

.hero-card {
    max-width: 850px;
    margin: 20px auto;
    background: white;
    border-radius: 25px;
    padding: 55px;
    text-align: center;
    box-shadow:
        0 20px 60px rgba(30,45,70,.12);
}

.hero-icon {
    width: 70px;
    height: 70px;
    margin: auto auto 20px;
    border-radius: 20px;
    background: #eaf2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.hero-card h1 {
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-card h4 {
    color: var(--primary);
    margin-bottom: 25px;
}

.hero-card p {
    color: #687084;
    font-size: 17px;
}

.info-box {
    margin: 30px 0;
    padding: 16px;
    background: #eaf7ff;
    border: 1px solid #b9e2ff;
    border-radius: 12px;
}


/* =====================================================
   PROCESS
===================================================== */

.process-grid {
    display: grid;
    grid-template-columns:
        repeat(3, 1fr);
    gap: 20px;
    margin: 35px 0;
}

.process-grid > div {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

.process-grid i {
    display: block;
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 10px;
}

.process-grid strong,
.process-grid small {
    display: block;
}

.process-grid small {
    color: #7a8292;
    margin-top: 6px;
}


/* =====================================================
   AUTH
===================================================== */

.auth-card {
    max-width: 600px;
    margin: auto;
    background: white;
    border-radius: 24px;
    padding: 45px;
    box-shadow:
        0 20px 60px rgba(30,45,70,.10);
}

.auth-icon {
    width: 65px;
    height: 65px;
    background: #eaf2ff;
    color: var(--primary);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    margin: 0 auto 20px;
    font-size: 28px;
    text-align: center;
}


/* =====================================================
   FORM CARD
===================================================== */

.form-card {
    background: white;
    border-radius: 22px;
    padding: 35px;
    box-shadow:
        0 12px 40px rgba(30,45,70,.08);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 25px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.section-header > i {
    font-size: 35px;
    color: var(--primary);
}

.section-header h3 {
    margin: 0;
    font-weight: 800;
}

.section-header p {
    margin: 5px 0 0;
    color: #7b8393;
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 10px;
    border-color: #dce1ea;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 .2rem rgba(13,110,253,.10);
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}


/* =====================================================
   STEPPER
===================================================== */

.stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow:
        0 8px 30px rgba(30,45,70,.06);
}

.step-item {
    position: relative;
    flex: 1;
    text-align: center;
}

.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #edf0f5;
    color: #778092;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    font-weight: bold;
}

.step-item.active .step-circle {
    background: var(--primary);
    color: white;
}

.step-item.completed .step-circle {
    background: #198754;
    color: white;
}

.step-label {
    margin-top: 8px;
    font-size: 12px;
    color: #70798a;
}

.step-item.active .step-label {
    color: var(--primary);
    font-weight: bold;
}


/* =====================================================
   EXPERIENCE
===================================================== */

.experience-card {
    padding: 25px;
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-bottom: 20px;
    background: #fbfcfe;
}


/* =====================================================
   VOEU
===================================================== */

.voeu-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 15px;
}

.voeu-number,
.voeu-index,
.badge-number {
    min-width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #eaf2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.voeu-content {
    flex: 1;
}

.voeu-content h5 {
    margin-bottom: 8px;
}

.optional {
    font-size: 11px;
    color: #8a93a3;
}


/* =====================================================
   DOCUMENT
===================================================== */

.document-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border);
}


/* =====================================================
   RECAP
===================================================== */

.recap-section {
    padding: 25px 0;
    border-bottom: 1px solid var(--border);
}

.recap-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-weight: bold;
}

.recap-voeu {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8faff;
    border-radius: 12px;
    margin-bottom: 10px;
}

.declaration-box {
    margin-top: 30px;
    padding: 25px;
    background: #fff8e6;
    border: 1px solid #ffe08a;
    border-radius: 16px;
}

.modal-big-icon {
    font-size: 50px;
    color: var(--primary);
}


/* =====================================================
   DASHBOARD
===================================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.reference-mini {
    background: white;
    padding: 15px 25px;
    border-radius: 14px;
    text-align: center;
    box-shadow:
        0 5px 20px rgba(0,0,0,.05);
}

.reference-mini strong {
    display: block;
    color: var(--primary);
}

.status-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.status-label {
    color: #8991a0;
    display: block;
    margin-bottom: 5px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 25px;
}

.dashboard-voeu {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.voeu-main {
    flex: 1;
}

.voeu-main strong,
.voeu-main span,
.voeu-main small {
    display: block;
}

.voeu-main span {
    color: #6d7585;
    margin-top: 5px;
}

.voeu-main small {
    margin-top: 5px;
    color: #8a91a0;
}

.notification {
    padding: 15px;
    border-radius: 12px;
    margin-top: 12px;
}

.notification.success {
    background: #e9f8f0;
    color: #146c43;
}

.notification.danger {
    background: #fcebea;
    color: #b02a37;
}

.notification.neutral {
    background: #edf5ff;
    color: #0a58ca;
}


/* =====================================================
   SUCCESS
===================================================== */

.success-card {
    max-width: 700px;
    margin: 40px auto;
    background: white;
    padding: 55px;
    text-align: center;
    border-radius: 25px;
    box-shadow:
        0 20px 60px rgba(30,45,70,.10);
}

.success-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: auto auto 25px;
    background: #d1e7dd;
    color: #198754;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 45px;
}

.reference-box {
    margin: 30px 0;
    padding: 20px;
    border-radius: 15px;
    background: #f4f7fb;
}

.reference-box span,
.reference-box strong {
    display: block;
}

.reference-box strong {
    color: var(--primary);
    font-size: 25px;
    margin-top: 5px;
}


/* =====================================================
   EMPTY
===================================================== */

.empty-state {
    text-align: center;
    padding: 35px;
    color: #8b93a2;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

    .hero-card,
    .auth-card,
    .form-card {
        padding: 25px;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .stepper {
        overflow-x: auto;
        gap: 20px;
    }

    .step-item {
        min-width: 80px;
    }

    .dashboard-header,
    .status-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .voeu-card,
    .dashboard-voeu {
        align-items: flex-start;
    }

}

.experience-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 18px;
    padding: 24px;
    transition: .2s ease;
}

.experience-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, .06);
}

.experience-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.experience-number {
    font-weight: 700;
    font-size: 1.05rem;
}

#add-experience {
    border-radius: 12px;
    padding: 10px 18px;
}

.employee-information {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fafbfc;
    transition: all .25s ease;
}

.employee-information .form-control,
.employee-information .form-select {
    min-height: 48px;
    border-radius: 12px;
}

.employee-information .alert {
    border-radius: 12px;
}

.success-card .btn {
    min-height: 48px;
    border-radius: 14px;
    font-weight: 600;
}

.success-card .btn-primary {
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.18);
}

.success-card .btn-primary:hover {
    transform: translateY(-2px);
}

.reference-box {
    margin: 25px auto;
    padding: 20px;
    max-width: 450px;
    border-radius: 18px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.reference-box span {
    display: block;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.reference-box strong {
    display: block;
    font-size: 24px;
    letter-spacing: 1px;
}