:root {
    --navy-900: #0b1533;
    --navy-800: #0f1d45;
    --navy-700: #16265a;
    --gold: #e2960f;
    --gold-light: #f5a623;
    --gold-dark: #c47f08;
    --gold-soft: #fbe6c2;

    --bg: #eef1f8;
    --bg-soft: #f6f8fc;
    --surface: #ffffff;
    --text: #14213d;
    --heading: #0b1533;
    --muted: #6b7791;
    --line: rgba(15, 29, 69, 0.09);
    --line-soft: rgba(15, 29, 69, 0.05);
    --card: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --info: #0284c7;

    --radius: 20px;
    --radius-sm: 14px;
    --shadow-sm: 0 4px 14px rgba(15, 29, 69, 0.06);
    --shadow: 0 14px 38px rgba(15, 29, 69, 0.09);
    --shadow-lg: 0 26px 60px rgba(15, 29, 69, 0.14);
    --shadow-gold: 0 12px 28px rgba(226, 150, 15, 0.32);
    --font: "Tajawal", "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    background:
        radial-gradient(900px 480px at 88% -8%, rgba(245, 166, 35, 0.10), transparent 60%),
        radial-gradient(760px 420px at -6% 8%, rgba(15, 29, 69, 0.05), transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.75;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { width: min(1160px, 92%); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15.5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
    font-family: var(--font);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold {
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: #3a2600;
    box-shadow: var(--shadow-gold);
}
.btn-gold:hover { filter: brightness(1.04); box-shadow: 0 16px 34px rgba(226, 150, 15, 0.45); }
.btn-ghost {
    background: var(--surface);
    border-color: var(--line);
    color: var(--heading);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-dark); }
.btn-block { width: 100%; }
.btn-danger {
    background: #fff;
    color: var(--danger);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: var(--shadow-sm);
}
.btn-danger:hover { background: #fef2f2; }

/* ---------- Icons ---------- */
.ico {
    width: 20px; height: 20px; flex-shrink: 0;
    display: inline-block; vertical-align: -4px;
    stroke: currentColor;
}
.ico-sm { width: 16px; height: 16px; vertical-align: -3px; }
.btn .ico { width: 18px; height: 18px; vertical-align: middle; }

/* ---------- Public header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 20px; color: var(--heading); }
.brand img { height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 600; transition: color .2s; }
.nav-links a:hover { color: var(--heading); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 60px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gold-soft); color: var(--gold-dark);
    border: 1px solid rgba(226, 150, 15, 0.3);
    padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 14px;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.15; margin: 22px 0 16px; font-weight: 800; color: var(--heading); }
.hero h1 .accent { color: var(--gold-dark); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-visual {
    position: relative; border-radius: 28px; overflow: hidden;
    background: linear-gradient(160deg, #ffffff, #eef2fb);
    border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 30px;
}
.hero-visual img { width: 100%; height: auto; display: block; filter: drop-shadow(0 16px 30px rgba(15,29,69,.15)); }

.stats { display: flex; gap: 30px; margin-top: 40px; flex-wrap: wrap; }
.stat h3 { font-size: 30px; color: var(--gold-dark); margin: 0; font-weight: 800; }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: clamp(26px, 3.5vw, 38px); margin: 0 0 12px; font-weight: 800; color: var(--heading); }
.section-title p { color: var(--muted); max-width: 620px; margin-inline: auto; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(226, 150, 15, 0.4); box-shadow: var(--shadow); }
.card .icon {
    width: 54px; height: 54px; border-radius: 14px;
    display: grid; place-items: center; font-size: 26px;
    background: var(--gold-soft); color: var(--gold-dark); margin-bottom: 18px;
}
.card h3 { margin: 0 0 8px; font-size: 20px; color: var(--heading); }
.card p { color: var(--muted); margin: 0; }

.step { text-align: center; position: relative; }
.step .num {
    width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
    display: grid; place-items: center; font-size: 26px; font-weight: 800;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark)); color: #3a2600;
    box-shadow: var(--shadow-gold);
}
.step h3 { color: var(--heading); }

.gov-list { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.gov-chip {
    background: var(--surface); border: 1px solid var(--line);
    padding: 10px 20px; border-radius: 999px; font-weight: 600; color: var(--text);
    box-shadow: var(--shadow-sm);
}

.cta {
    background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
    border-radius: 28px;
    padding: 55px; text-align: center; box-shadow: var(--shadow-lg);
    position: relative; overflow: hidden;
}
.cta::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(600px 300px at 80% -20%, rgba(245,166,35,.25), transparent 60%);
}
.cta h2 { font-size: 32px; margin: 0 0 14px; color: #fff; position: relative; }
.cta p { color: #c4cde6; margin: 0 0 28px; position: relative; }
.cta .btn { position: relative; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; color: var(--muted); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }

/* ---------- Auth ---------- */
.auth-wrap {
    min-height: 100vh; display: grid; place-items: center; padding: 40px 0;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(245, 166, 35, 0.16), transparent 60%),
        linear-gradient(160deg, var(--navy-900), var(--navy-800));
}
.auth-card {
    width: min(460px, 92%); background: var(--surface); border: 1px solid var(--line);
    border-radius: 24px; padding: 40px; box-shadow: var(--shadow-lg);
}
.auth-card .brand { justify-content: center; margin-bottom: 10px; }
.auth-card h1 { text-align: center; font-size: 26px; margin: 6px 0 4px; color: var(--heading); }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 26px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 14px; color: var(--heading); }
.form-control {
    width: 100%; padding: 13px 16px; border-radius: 12px;
    background: #fbfcfe; border: 1px solid var(--line);
    color: var(--text); font-family: var(--font); font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(226, 150, 15, 0.16); background: #fff; }
select.form-control option { background: #fff; color: var(--text); }
.form-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 6px; }
.alert { padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-weight: 600; }
.alert-success { background: #ecfdf3; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alt { text-align: center; margin-top: 20px; color: var(--muted); }
.auth-alt a { color: var(--gold-dark); font-weight: 700; }

/* ---------- App / Portal ---------- */
.app-shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
    background: linear-gradient(185deg, var(--navy-900), var(--navy-800));
    padding: 26px 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { margin-bottom: 28px; color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side-nav a {
    display: flex; align-items: center; gap: 12px; padding: 13px 16px;
    border-radius: 14px; color: #c3cde6; font-weight: 600; transition: all .18s ease;
    font-size: 15px;
}
.side-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-nav a.active {
    background: linear-gradient(90deg, rgba(245, 166, 35, 0.25), rgba(245, 166, 35, 0.04));
    color: var(--gold-soft);
    box-shadow: inset 3px 0 0 var(--gold-soft);
}
.side-nav a .ico { width: 21px; height: 21px; vertical-align: middle; opacity: .9; }
.side-nav a.active .ico { opacity: 1; }

.sidebar-user {
    margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex; align-items: center; gap: 12px; color: #c3cde6;
}
.sidebar-user .avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
    color: #3a2600; display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.sidebar-user .u-name { font-weight: 700; color: #fff; font-size: 14px; }
.sidebar-user .u-phone { font-size: 12px; color: #8b99bd; }

.app-main { padding: 30px 36px 70px; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.app-topbar h1 { font-size: 26px; margin: 0; color: var(--heading); font-weight: 800; }
.app-topbar .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }

.panel {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 24px 26px; margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}
.panel h3 { color: var(--heading); }
a.panel { display: block; transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; }
a.panel:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(226, 150, 15, 0.35); }

/* stat cards row */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 20px 22px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); }
.stat-card .sc-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--gold-soft); color: var(--gold-dark); margin-bottom: 10px;
}
.stat-card .sc-icon .ico { width: 24px; height: 24px; vertical-align: middle; }
.stat-card .sc-val { font-size: 30px; font-weight: 800; color: var(--heading); line-height: 1.2; }
.stat-card .sc-label { color: var(--muted); font-size: 13.5px; font-weight: 600; }

.req-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.req-meta { color: var(--muted); font-size: 14px; }
.req-route { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.req-route .ico { color: var(--gold-dark); }
.req-route .route-arrow { color: var(--muted); }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.pending { background: #fff5e6; color: #b6740a; }
.pill.accepted, .pill.on_the_way, .pill.arrived { background: #e6f4fd; color: #0369a1; }
.pill.completed { background: #ecfdf3; color: #15803d; }
.pill.cancelled { background: #fef2f2; color: #b91c1c; }

.map-box { height: 400px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.estimate-box {
    display: flex; gap: 30px; flex-wrap: wrap; background: linear-gradient(135deg, #fffaf0, #fff6e6);
    border: 1px solid rgba(226, 150, 15, 0.28); border-radius: var(--radius-sm); padding: 20px 26px; margin: 18px 0;
}
.estimate-box .val { font-size: 26px; font-weight: 800; color: var(--gold-dark); }
.estimate-box .lbl { color: var(--muted); font-size: 13px; }

.section-label {
    display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--heading);
    font-size: 17px; margin: 0 0 16px;
}
.section-label .s-ico {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: var(--gold-soft); color: var(--gold-dark); flex-shrink: 0;
}
.section-label .s-ico .ico { width: 20px; height: 20px; vertical-align: middle; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.info-grid .lbl { color: var(--muted); font-size: 13px; margin-bottom: 3px; }
.info-grid .v { color: var(--heading); font-weight: 600; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-inline-start: 28px; padding-bottom: 22px; border-inline-start: 2px solid var(--line); }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before {
    content: ''; position: absolute; inset-inline-start: -8px; top: 2px;
    width: 14px; height: 14px; border-radius: 50%; background: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-soft);
}
.timeline .t-status { font-weight: 700; color: var(--heading); }
.timeline .t-time { color: var(--muted); font-size: 13px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.photo-grid img { width: 100%; height: 110px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); transition: transform .2s; }
.photo-grid img:hover { transform: scale(1.03); }

.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty .big { margin: 0 auto 14px; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-dark); }
.empty .big .ico { width: 42px; height: 42px; }
.empty h3 { color: var(--heading); }

.mechanic-card { display: flex; align-items: center; gap: 16px; }
.mechanic-card .m-avatar {
    width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
    color: var(--gold-soft); display: grid; place-items: center; font-weight: 800; font-size: 22px;
}

/* Pagination (Laravel default) */
.app-main nav[role="navigation"] { margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .app-main { padding: 20px 16px 90px; }
    .mobile-nav { display: flex !important; }
}

.mobile-nav {
    display: none; position: fixed; bottom: 0; inset-inline: 0; z-index: 60;
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(15, 29, 69, 0.08);
    justify-content: space-around; padding: 8px;
}
.mobile-nav a {
    color: var(--muted); text-align: center; font-size: 11.5px; font-weight: 600;
    padding: 6px 12px; border-radius: 12px;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.mobile-nav a .ico { width: 22px; height: 22px; }
.mobile-nav a.active { color: var(--gold-dark); background: var(--gold-soft); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(15, 29, 69, 0.16); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 29, 69, 0.28); }
