/* DIN Next LT Arabic — brand font family (loaded from landing page too) */
@font-face { font-family: 'DINNextLTArabic'; src: url('../../fonts/ArbFONTS-DINNextLTArabic-UltraLight-1.ttf') format('truetype'); font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'DINNextLTArabic'; src: url('../../fonts/ArbFONTS-DINNEXTLTARABIC-LIGHT-1.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'DINNextLTArabic'; src: url('../../fonts/ArbFONTS-DINNextLTArabic-Regular-2.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DINNextLTArabic'; src: url('../../fonts/ArbFONTS-DINNextLTArabic-Medium-2.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'DINNextLTArabic'; src: url('../../fonts/ArbFONTS-DINNextLTArabic-Bold-2.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'DINNextLTArabic'; src: url('../../fonts/ArbFONTS-DINNextLTArabic-Heavy-1.ttf') format('truetype'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'DINNextLTArabic'; src: url('../../fonts/ArbFONTS-DINNextLTArabic-Black-2.ttf') format('truetype'); font-weight: 900; font-style: normal; font-display: swap; }

:root {
    --brand-1: #4361ee;
    --brand-2: #3a0ca3;
    --ink: #1e2433;
    --muted: #64748b;
    --soft: #f6f8fb;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'DINNextLTArabic', "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1100px 460px at 85% -10%, rgba(67, 97, 238, .10), transparent 60%),
        radial-gradient(900px 420px at 8% 15%, rgba(58, 12, 163, .08), transparent 55%),
        linear-gradient(180deg, #fafbff 0%, #ffffff 100%);
    min-height: 100vh;
}

/* Wizard card */
.card {
    border: 1px solid #eceef4;
    border-radius: 20px;
    box-shadow: 0 24px 50px rgba(30, 36, 51, 0.10);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    color: #fff;
    border-bottom: none;
    padding: 1.5rem 1.5rem 1.25rem;
}

.card-header h3 { font-weight: 900; margin: 0; }
.card-header .text-muted { color: rgba(255, 255, 255, .82) !important; }
.card-header .progress { background: rgba(255, 255, 255, .28); height: 16px; border-radius: 999px; box-shadow: inset 0 1px 2px rgba(0,0,0,.18); }
.card-header .progress-bar {
    background: linear-gradient(90deg, #fff, #f2edff);
    border-radius: 999px;
    color: var(--brand-2);
    font-weight: 900;
    font-size: .82rem;
    line-height: 16px;
    letter-spacing: .2px;
    text-shadow: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-inline-start: .6rem;
    min-width: 4.2rem;
    transition: width .4s ease;
}
.card-header .progress-bar::after {
    content: "";
    flex: 1 1 auto;
    border-bottom: 2px dotted rgba(58, 12, 163, .28);
    margin-inline-end: .5rem;
}

/* Step instructions callout */
.step-instructions {
    background: var(--soft);
    border-right: 4px solid var(--brand-1);
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}
.step-instructions h5 { font-weight: 800; }
.step-instructions p { color: var(--muted); margin: 0; font-size: .9rem; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    border: none;
    font-weight: 800;
    border-radius: 12px;
    padding: .6rem 1.5rem;
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.30);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(67,97,238,.40); filter: brightness(1.05); color: #fff; }
.btn-secondary {
    background: var(--soft);
    color: var(--ink);
    border: 1px solid #e6eaf2;
    font-weight: 700;
    border-radius: 12px;
    padding: .6rem 1.4rem;
    transition: all .2s ease;
}
.btn-secondary:hover { background: #fff; border-color: var(--brand-1); color: var(--brand-1); }

/* Form controls */
.form-control, .form-select {
    border-color: #e3e8f1;
    border-radius: 12px;
    padding: .6rem .9rem;
    font-family: inherit;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-1);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.18);
}
.form-label { font-weight: 700; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--brand-1); border-color: var(--brand-1); }

/* Class list items */
.class-item {
    background: var(--soft);
    border: 1px solid #e9edf5;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color .2s ease, transform .2s ease;
}
.class-item:hover { border-color: rgba(67, 97, 238, .35); transform: translateX(-3px); }
.class-item .btn-danger { border-radius: 10px; }

/* Timetable */
.timetable-grid { overflow-x: auto; }
.timetable-table th, .timetable-table td { text-align: center; vertical-align: middle; }
.timetable-table thead th { background: var(--brand-2); color: #fff; }
.timetable-table tbody td { background: #fff; }
.timetable-table .form-select { font-size: .85rem; padding: .35rem .5rem; border-radius: 8px; }

/* File upload */
.file-upload-area {
    border: 2px dashed #cdd6e8;
    border-radius: 14px;
    padding: 22px 16px;
    text-align: center;
    cursor: pointer;
    transition: all .3s ease;
    background: var(--soft);
}
.file-upload-area:hover { border-color: var(--brand-1); background: #f8f9ff; }
.file-upload-area .fa-upload { color: var(--brand-1); }

/* Alerts match brand */
.alert { border-radius: 12px; }
.alert-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }

/* Fix for mixed Arabic/numbers in RTL (class names like 1م1) */
.rtl-input {
    unicode-bidi: plaintext;
    direction: rtl;
    text-align: right;
}

/* Helpers */
.text-muted { color: var(--muted) !important; }

@media (max-width: 767.98px) {
    .card { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .btn-primary, .btn-secondary, .class-item { animation: none; transition: none; }
}
