/* ============================================
   تسجيل المشاوير اليومية - ستايل عام
   ============================================ */

:root {
    --ink: #12263A;
    --ink-2: #1E3E5C;
    --sand: #E0A030;
    --sand-soft: #FBF1DC;
    --paper: #F6F4F0;
    --line: #E1DCD2;
    --ok: #2E7D5B;
    --danger: #B4402F;
    --muted: #74808C;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--paper);
    color: var(--ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display-font {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ---------- الهيدر ---------- */
.topbar {
    background: var(--ink);
    color: #fff;
    padding: 18px 0;
    position: relative;
    overflow: hidden;
}

.topbar::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: repeating-linear-gradient(90deg,
        var(--sand) 0 22px, transparent 22px 34px);
}

.topbar .brand {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar .brand .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--sand);
    box-shadow: 0 0 0 4px rgba(224,160,48,.22);
}

/* ---------- الكروت ---------- */
.card-plain {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(18,38,58,.04), 0 8px 24px rgba(18,38,58,.05);
}

.card-plain .card-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.card-plain .card-body-p {
    padding: 22px;
}

/* ---------- شريط خط السير (العنصر المميز) ---------- */
.route-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--sand-soft);
    border: 1px dashed #E2C68A;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.route-strip .pt {
    width: 11px; height: 11px;
    border-radius: 50%;
    border: 3px solid var(--ink);
    background: #fff;
    flex: 0 0 auto;
}

.route-strip .pt.end { background: var(--ink); }

.route-strip .rail {
    flex: 1;
    height: 0;
    border-top: 2px dotted #C9A45C;
}

.route-strip .label {
    font-size: .82rem;
    color: var(--ink-2);
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- الفورم ---------- */
.form-label {
    font-weight: 700;
    font-size: .9rem;
    color: var(--ink-2);
    margin-bottom: 6px;
}

.form-control, .form-select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px;
    font-size: .95rem;
    background: #FCFBF9;
}

.form-control:focus, .form-select:focus {
    border-color: var(--sand);
    box-shadow: 0 0 0 4px rgba(224,160,48,.16);
    background: #fff;
}

.btn-main {
    background: var(--ink);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 26px;
    font-weight: 700;
    transition: .18s;
}

.btn-main:hover { background: var(--ink-2); color: #fff; }

.btn-sand {
    background: var(--sand);
    color: #2A1B05;
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-weight: 700;
}

.btn-sand:hover { background: #C98D22; color: #2A1B05; }

.btn-main, .btn-sand { cursor: pointer; }

.btn-sand.btn-sm { padding: 6px 14px; font-size: .82rem; }

/* ---------- التنبيهات ---------- */
.alert-ok {
    background: #EAF5EF;
    border: 1px solid #BEDECB;
    color: #1E5A40;
    border-radius: 10px;
    padding: 14px 18px;
}

.alert-err {
    background: #FBEDEA;
    border: 1px solid #EFC7BE;
    color: #8C2D1E;
    border-radius: 10px;
    padding: 14px 18px;
}

/* ---------- الجدول ---------- */
.table-clean {
    margin: 0;
    font-size: .9rem;
}

.table-clean thead th {
    background: #F2EFE9;
    color: var(--ink-2);
    font-weight: 700;
    font-size: .82rem;
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    white-space: nowrap;
}

.table-clean tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid #F0EDE7;
    vertical-align: middle;
}

.table-clean tbody tr:hover { background: #FCFAF6; }

.route-cell {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    white-space: nowrap;
}

.route-cell .arrow { color: var(--sand); font-weight: 800; }

.badge-new {
    background: var(--sand-soft);
    color: #8A6414;
    border: 1px solid #E7D3A4;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 700;
}

.badge-done {
    background: #EAF5EF;
    color: var(--ok);
    border: 1px solid #BEDECB;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 700;
}

/* ---------- كروت الإحصائيات ---------- */
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    height: 100%;
}

.stat .num {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
}

.stat .cap {
    font-size: .82rem;
    color: var(--muted);
    font-weight: 600;
    margin-top: 6px;
}

.stat.accent { border-top: 3px solid var(--sand); }

/* ---------- شاشة الدخول ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background:
        radial-gradient(1200px 400px at 50% -10%, rgba(224,160,48,.14), transparent),
        var(--paper);
}

.login-box {
    width: 100%;
    max-width: 400px;
}

footer.site-foot {
    text-align: center;
    color: var(--muted);
    font-size: .82rem;
    padding: 28px 0 40px;
}

/* ---------- الطباعة ---------- */
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .card-plain { border: none; box-shadow: none; }
}

@media (max-width: 576px) {
    .route-strip .label { font-size: .75rem; }
    .stat .num { font-size: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}

/* ============================================
   الصفحة الرئيسية (Landing)
   ============================================ */

body.landing { background: #fff; }

.hero {
    background:
        radial-gradient(900px 380px at 82% -8%, rgba(224,160,48,.20), transparent 62%),
        linear-gradient(180deg, var(--ink) 0%, #0D1D2E 100%);
    color: #fff;
    padding-bottom: 78px;
    position: relative;
    overflow: hidden;
}

/* شريط منقّط زى علامات الطريق */
.hero::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 4px;
    background: repeating-linear-gradient(90deg,
        var(--sand) 0 26px, transparent 26px 42px);
}

.hero-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 12px;
}

.brand-mark {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #fff;
}

.brand-mark .dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--sand);
    box-shadow: 0 0 0 4px rgba(224,160,48,.22);
}

.btn-nav {
    padding: 8px 18px !important;
    font-size: .88rem;
    text-decoration: none;
    display: inline-block;
}

.hero-body {
    padding-top: 46px;
    max-width: 680px;
}

.eyebrow {
    display: inline-block;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--sand);
    border: 1px solid rgba(224,160,48,.42);
    border-radius: 30px;
    padding: 5px 15px;
    margin-bottom: 22px;
}

.hero-title {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: clamp(2.1rem, 6vw, 3.5rem);
    line-height: 1.25;
    margin: 0 0 18px;
}

.hero-sub {
    font-size: 1.03rem;
    line-height: 1.95;
    color: rgba(255,255,255,.76);
    max-width: 560px;
    margin-bottom: 30px;
}

.btn-lg-cta {
    display: inline-block;
    text-decoration: none;
    padding: 15px 40px !important;
    font-size: 1.05rem;
    border-radius: 12px;
}

.hero-cta { margin-bottom: 54px; }

/* ---------- تذكرة خط السير ---------- */
.ticket {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    padding: 18px 22px;
    backdrop-filter: blur(2px);
    flex-wrap: wrap;
}

.ticket-side { min-width: 82px; }

.ticket-cap {
    display: block;
    font-size: .72rem;
    color: rgba(255,255,255,.5);
    font-weight: 600;
    margin-bottom: 3px;
}

.ticket-val {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
}

.ticket-rail {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 90px;
}

.ticket-rail .pt {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid var(--sand);
    flex: 0 0 auto;
}

.ticket-rail .pt.end { background: var(--sand); }

.ticket-rail .rail {
    flex: 1;
    height: 0;
    border-top: 2px dotted rgba(224,160,48,.62);
}

/* خط القص فى التذكرة */
.ticket-stub {
    padding-inline-start: 20px;
    border-inline-start: 1px dashed rgba(255,255,255,.26);
    min-width: 92px;
}

/* ---------- قسم الخطوات ---------- */
.section { padding: 66px 0 54px; }

.sec-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}

.step {
    height: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 24px;
}

.step-no {
    font-family: 'Tajawal', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--sand-soft);
    border: 1px solid #E7D3A4;
    color: #8A6414;
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.step-h {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.08rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.step-p {
    font-size: .92rem;
    color: var(--muted);
    line-height: 1.85;
    margin: 0;
}

a.btn-main { text-decoration: none; }

@media (max-width: 576px) {
    .hero-body { padding-top: 28px; }
    .hero { padding-bottom: 54px; }
    .ticket { gap: 12px; padding: 15px 16px; }
    .ticket-stub {
        padding-inline-start: 0;
        border-inline-start: none;
        border-top: 1px dashed rgba(255,255,255,.26);
        padding-top: 12px;
        width: 100%;
    }
    .btn-lg-cta { width: 100%; text-align: center; }
    .section { padding: 46px 0 36px; }
}

/* ============================================
   اختيار النوع والفئة (أزرار بدل السلكت)
   ============================================ */

.pick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pick { margin: 0; }

.pick input {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.pick span {
    display: inline-block;
    padding: 9px 20px;
    border: 1px solid var(--line);
    background: #FCFBF9;
    border-radius: 30px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: .15s;
    user-select: none;
}

.pick span:hover { border-color: #CFC7B7; }

.pick input:checked + span {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.pick input:focus-visible + span {
    outline: 2px solid var(--sand);
    outline-offset: 2px;
}

/* ---------- بادجات الفئة فى لوحة الإدارة ---------- */
.cat {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: .76rem;
    font-weight: 700;
    white-space: nowrap;
    background: #F1EEE8;
    border: 1px solid var(--line);
    color: var(--ink-2);
}

.cat-emp { background: #E9EFF6; border-color: #C6D6E8; color: #1F4670; }
.cat-uni { background: #EDEBF7; border-color: #CFC9EA; color: #443A80; }
.cat-std { background: #EAF5EF; border-color: #BEDECB; color: #1E5A40; }
.cat-kid { background: #FBEEE7; border-color: #EFD3C1; color: #8A4B22; }

.gender-tag {
    font-size: .75rem;
    color: var(--muted);
    font-weight: 600;
}

/* ---------- شريط توزيع الفئات ---------- */
.breakdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 18px;
}

.bd-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
}

.bd-item b {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.05rem;
    color: var(--ink);
}

.bd-sep {
    width: 1px;
    height: 22px;
    background: var(--line);
}

@media (max-width: 576px) {
    .bd-sep { display: none; }
}

/* ============================================
   لوحة خطوط السير
   ============================================ */

.route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    padding: 18px 22px 22px;
}

.route-card {
    display: block;
    text-decoration: none;
    background: #FCFBF9;
    border: 1px solid var(--line);
    border-inline-start: 3px solid var(--sand);
    border-radius: 12px;
    padding: 14px 16px;
    transition: .15s;
}

.route-card:hover {
    border-color: #CFC7B7;
    border-inline-start-color: var(--ink);
    background: #fff;
    transform: translateY(-1px);
}

.route-card.active {
    background: var(--ink);
    border-color: var(--ink);
    border-inline-start-color: var(--sand);
}

.route-name {
    font-family: 'Tajawal', sans-serif;
    font-weight: 800;
    font-size: .98rem;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.5;
}

.route-card.active .route-name { color: #fff; }

.route-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
}

.route-count {
    background: var(--sand-soft);
    border: 1px solid #E7D3A4;
    color: #8A6414;
    border-radius: 20px;
    padding: 3px 11px;
    font-weight: 700;
    white-space: nowrap;
}

.route-time {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.route-card.active .route-time { color: rgba(255,255,255,.66); }
