:root{
  /* layout: one phone-width column, role tabs on top, cards below */
  --bg:#edf2f1; --card:#ffffff; --ink:#16231f; --muted:#5d6f69; --line:#d5dfdc;
  --brand:#0e6b4d; --brand-ink:#ffffff; --gold:#e0a31a; --gold-soft:#fbf0d2; --red:#c2412f; --red-soft:#f8e0dc; --green-soft:#d9efe5;
  --font:'Cairo',system-ui,-apple-system,'Segoe UI',Tahoma,sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);font-size:16px;line-height:1.6}
body{min-height:100%}
.wrap{max-width:480px;margin:0 auto;padding:0 16px 40px}
header{padding:14px 0 8px}
header h1{font-size:20px;margin:0}
header p{margin:0;color:var(--muted);font-size:13px}
.tabs{display:flex;gap:6px;background:#dfe8e6;padding:4px;border-radius:12px;margin:8px 0 16px;position:sticky;top:8px;z-index:5}
.tabs button{flex:1;border:0;background:transparent;font:inherit;font-weight:600;padding:8px 4px;border-radius:9px;color:var(--muted);cursor:pointer}
.tabs button.on{background:var(--card);color:var(--brand);box-shadow:0 1px 3px rgba(0,0,0,.12)}
button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px}
h2{font-size:17px;margin:0 0 10px}
h3{font-size:15px;margin:0 0 6px}
label{display:block;font-size:13px;font-weight:600;margin:10px 0 4px;color:var(--muted)}
input,select{width:100%;font:inherit;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}
.row{display:flex;gap:10px}
.row>*{flex:1;min-width:0}
.btn{display:block;width:100%;border:0;background:var(--brand);color:var(--brand-ink);font:inherit;font-weight:700;padding:12px;border-radius:12px;cursor:pointer;margin-top:14px}
.btn.alt{background:#fff;color:var(--brand);border:1px solid var(--brand)}
.btn.red{background:var(--red)}
.btn.sm{display:inline-block;width:auto;padding:6px 14px;margin:0;font-size:14px}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.link{background:none;border:0;color:var(--brand);font:inherit;font-weight:600;cursor:pointer;padding:0 0 8px}
.err{background:var(--red-soft);color:var(--red);padding:8px 12px;border-radius:10px;font-size:14px;margin-top:10px}
.pill{display:inline-block;font-size:12px;font-weight:700;padding:2px 10px;border-radius:99px}
.pill.ok{background:var(--green-soft);color:var(--brand)}
.pill.wait{background:var(--gold-soft);color:#8a6200}
.pill.off{background:var(--red-soft);color:var(--red)}
.trip{display:block;width:100%;text-align:right;font:inherit;color:inherit;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-bottom:10px;cursor:pointer}
.trip:hover{border-color:var(--brand)}
.trip .top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.trip .price{font-weight:700;color:var(--brand);font-variant-numeric:tabular-nums}
.meta{color:var(--muted);font-size:13px}
.legend{display:flex;gap:12px;flex-wrap:wrap;font-size:13px;color:var(--muted);margin:6px 0 10px}
.legend i{display:inline-block;width:14px;height:14px;border-radius:4px;vertical-align:-2px;margin-inline-end:4px}
.bus{background:#f6f9f8;border:2px solid var(--line);border-radius:22px 22px 14px 14px;padding:12px 14px 14px;max-width:300px;margin:0 auto}
.driver{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:12px;border-bottom:1px dashed var(--line);padding-bottom:8px;margin-bottom:10px}
.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;justify-items:center}
.seat{width:40px;height:40px;border-radius:8px 8px 12px 12px;border:2px solid var(--brand);background:#fff;color:var(--brand);font:inherit;font-weight:700;font-size:14px;cursor:pointer;font-variant-numeric:tabular-nums;padding:0}
.seat.taken{background:#cfd8d5;border-color:#cfd8d5;color:#7c8c87;cursor:not-allowed}
.seat.pending{background:var(--gold-soft);border-color:var(--gold);color:#8a6200;cursor:not-allowed}
.seat.sel{background:var(--brand);color:#fff}
.seat.static{cursor:default}
.aisle{width:100%}
.sum{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid var(--line);font-size:15px}
.sum:last-child{border:0}
.bank{background:var(--gold-soft);border-radius:12px;padding:10px 12px;margin:10px 0;font-size:14px}
.bank b{font-variant-numeric:tabular-nums;letter-spacing:.5px}
.preview{margin-top:8px}
.preview img,.thumb{max-width:100%;max-height:160px;border-radius:10px;border:1px solid var(--line);display:block}
.ph{background:#eef2f1;border:1px dashed var(--line);border-radius:10px;padding:18px 8px;text-align:center;color:var(--muted);font-size:13px}
.done{text-align:center;padding:18px 8px}
.done .ref{font-size:28px;font-weight:700;color:var(--brand);letter-spacing:1px;margin:6px 0}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center}
.stat b{display:block;font-size:22px;font-variant-numeric:tabular-nums}
.stat span{font-size:12px;color:var(--muted)}
.item{border-bottom:1px solid var(--line);padding:10px 0}
.item:last-child{border:0}
.actions{display:flex;gap:8px;margin-top:8px}
.logo{width:44px;height:44px;border-radius:50%;object-fit:cover;background:var(--green-soft);color:var(--brand);display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:18px;flex:none;border:1px solid var(--line)}
.logo.big{width:72px;height:72px;font-size:28px}
.head{display:flex;gap:10px;align-items:center}
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.chip{display:inline-flex;align-items:center;gap:6px;background:var(--green-soft);color:var(--brand);border-radius:99px;padding:3px 6px 3px 12px;font-size:14px;font-variant-numeric:tabular-nums}
.chip button{border:0;background:rgba(0,0,0,.12);color:inherit;width:22px;height:22px;border-radius:50%;cursor:pointer;font:inherit;line-height:1;padding:0}
.rcpt{border:2px dashed var(--brand);border-radius:14px;padding:14px;background:#fff;position:relative}
.rcpt .hd{text-align:center;border-bottom:1px dashed var(--line);padding-bottom:10px;margin-bottom:6px}
.rcpt .hd .logo{margin-bottom:4px}
.rcpt .ttl{font-weight:700;font-size:18px;color:var(--brand)}
.stamp{display:block;width:max-content;margin:12px auto 0;border:2px solid var(--brand);color:var(--brand);font-weight:700;padding:2px 14px;border-radius:8px;transform:rotate(-4deg)}
[hidden]{display:none!important}
.note{font-size:12px;color:var(--muted);text-align:center;margin-top:18px}
@media (prefers-reduced-motion:no-preference){.card,.trip{transition:border-color .15s}}
/* ---- إضافات النسخة الحقيقية ---- */
.sum{display:flex;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px dashed var(--line);font-size:15px}
.item{border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:8px 0;background:#fff}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.ok{background:var(--green-soft);color:var(--brand);padding:8px 12px;border-radius:10px;font-size:14px;margin-top:10px}
.pill.wait{background:var(--gold-soft)}
.thumb{max-width:100%;border-radius:10px;border:1px solid var(--line)}
.bank{background:var(--gold-soft);border-radius:10px;padding:10px 12px;margin:10px 0;line-height:1.9}
.stats{display:flex;gap:8px;margin-bottom:12px}
.stat{flex:1;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px;text-align:center}
.stat b{display:block;font-size:20px;color:var(--brand)}
.stat span{font-size:12px;color:var(--muted)}
.hide{display:none!important}
.seat.static{cursor:default}
.nav{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 12px}
.nav button{flex:1;min-width:90px;border:1px solid var(--line);background:#fff;font:inherit;font-weight:600;padding:8px 6px;border-radius:10px;color:var(--muted);cursor:pointer}
.nav button.on{background:var(--brand);color:#fff;border-color:var(--brand)}
@media print{
  header,.nav,.btn,.link,.noprint,.note{display:none!important}
  body{background:#fff}.card{border:0}
  table.ro{width:100%;border-collapse:collapse;font-size:14px}
  table.ro td,table.ro th{border:1px solid #888;padding:4px 6px;text-align:right}
}
table.ro{width:100%;border-collapse:collapse;font-size:14px}
table.ro td,table.ro th{border-bottom:1px solid var(--line);padding:6px 4px;text-align:right}
/* ---- التصميم الجديد ---- */
header{background:var(--brand);color:#fff;margin:0 -16px 0;padding:26px 20px 30px}
header h1{font-size:26px}
header p{color:#d6ede3;font-size:14px}
body.adm header{background:#14211c}
body.adm header p{color:#b9c8c1}
.tabs{margin-top:-18px;box-shadow:0 2px 10px rgba(20,33,28,.12)}
.card,.trip,.item,.stat{box-shadow:0 1px 4px rgba(20,33,28,.08);border-color:transparent}
.trip{border-radius:16px;padding:14px}
.trip .price{font-size:18px}
.stat b{font-size:24px}
.nav{background:#fff;border-radius:12px;padding:4px;gap:4px;border-bottom:0}
.nav button{border:0;background:transparent;border-radius:9px}
.nav button.on{background:var(--brand);color:#fff}
.btn{border-radius:12px;padding:13px}
@media print{header{background:#fff;color:#000}}
header{display:flex;gap:12px;align-items:center}
.applogo{width:52px;height:52px;border-radius:14px;flex:none;background:#fff}
.logo{overflow:hidden;object-fit:cover}

/* ---- واجهة الزبون (حسب التصميم) ---- */
body.cust header{display:none}
.hero{position:relative;text-align:center;color:#fff;padding:22px 16px 6px;overflow:hidden;background:linear-gradient(180deg,#073f2d 0%,#0e6b4d 100%)}
.hero .scene{position:relative;display:block;width:100%;max-width:480px;height:auto;margin:14px auto 0;opacity:.95}
.hero .heropin{position:relative;width:58px;height:auto;display:block;margin:0 auto 2px}
.hero h1{position:relative;font-size:clamp(30px,9vw,44px);line-height:1.2;margin:0}
.hero p{position:relative;margin:4px 0 0;color:#d6ede3;font-size:15px}
body.cust .wrap{margin-top:-4px;position:relative}
body.cust .card{border-radius:20px;padding:16px;box-shadow:0 4px 16px rgba(20,33,28,.12)}
.h2i{display:flex;align-items:center;gap:10px}
.ico{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(145deg,#f0b932,#c58a0e);flex:none}
body.cust .btn:not(.alt):not(.red){background:linear-gradient(180deg,#128560,#0a4d38);border:2px solid #e0a31a;box-shadow:0 3px 8px rgba(10,77,56,.3)}
@media print{.hero{display:none}}


/* =========================================================
   BLASTI visual refresh — customer / agency / super admin
   Presentation layer only; application logic is unchanged.
   ========================================================= */
:root{
 --bg:#f2f6f3;--card:#fff;--ink:#12382b;--muted:#687b72;--line:#e1e9e3;
 --brand:#064a35;--brand-ink:#fff;--gold:#e5b63f;--gold-soft:#fff3cf;
 --red:#bd493c;--red-soft:#ffebe7;--green-soft:#e1f4e9;
}
html,body{font-family:'Cairo',system-ui,sans-serif}
body{background:linear-gradient(180deg,#f4f7f4,#edf3ef);color:#12382b}
button,.btn,input,select{font-family:inherit}
.card{border:1px solid #e4ebe5;border-radius:20px;background:#fff;box-shadow:0 8px 24px rgba(6,55,38,.065);padding:18px;margin-bottom:15px}
h2{font-size:19px;font-weight:800;color:#12382b}
h3{font-weight:800;color:#174b38}
label{color:#5b7166;font-weight:700}
input,select{border:1px solid #dce7df;border-radius:14px;background:#fbfdfb;min-height:48px;padding:11px 14px}
input:focus,select:focus{border-color:#0b7954;outline:3px solid rgba(11,121,84,.12)}
.btn{background:linear-gradient(115deg,#f2cb68,#dda92f);color:#153b2c;border:0;border-radius:14px;min-height:46px;font-weight:800;box-shadow:0 6px 15px rgba(178,132,34,.17)}
.btn.alt{background:#fff;color:#07563c;border:1px solid #0a7650;box-shadow:none}
.btn.red{background:#bd493c;color:#fff}
.btn.sm{min-height:34px;border-radius:10px}
.pill{border-radius:999px;padding:4px 11px}
.tabs,.nav{background:#e8efea;border-radius:15px;padding:5px;gap:6px}
.tabs button,.nav button{border-radius:11px;font-weight:800}
.tabs button.on,.nav button.on{background:#07523b;color:#fff;box-shadow:0 4px 12px rgba(5,67,46,.16)}
.stats{gap:10px}
.stat{border:1px solid rgba(224,182,64,.45);border-radius:17px;background:linear-gradient(145deg,#064832,#032f23);color:#fff;padding:15px;box-shadow:0 7px 18px rgba(4,55,38,.13)}
.stat b{color:#f3ca62;font-size:24px}
.stat span{color:#e1eee7;font-weight:700}
.item,.trip{border:1px solid #e4ebe5;border-radius:16px;background:#fff;padding:14px;margin:10px 0;box-shadow:0 4px 13px rgba(7,54,38,.045)}
.sum{border-bottom:1px solid #edf1ed;padding:10px 2px}
.err,.ok{border-radius:13px;padding:10px 13px}

/* Customer app: branded hero and booking cards */
body.cust{background:#f0f5f1;overflow-x:hidden}
body.cust .hero{
 position:relative;isolation:isolate;overflow:hidden;text-align:center;
 height:330px;padding:25px 18px 85px;border-radius:0 0 30px 30px;
 background:radial-gradient(circle at 82% 20%,rgba(231,185,64,.2),transparent 25%),
 linear-gradient(135deg,#032e22 0%,#07563d 58%,#063a2b 100%);
 box-shadow:0 14px 30px rgba(4,53,37,.18)
}
body.cust .hero:before{content:"";position:absolute;z-index:-1;right:-90px;top:-190px;width:320px;height:320px;border:1px solid rgba(241,199,91,.25);border-radius:50%;box-shadow:0 0 0 25px rgba(241,199,91,.035),0 0 0 55px rgba(241,199,91,.025)}
body.cust .hero:after{content:"";position:absolute;z-index:-1;left:-12%;right:-12%;bottom:0;height:65px;background:linear-gradient(175deg,transparent 42%,rgba(225,174,52,.9) 43%,rgba(225,174,52,.9) 46%,#063d2d 47%);opacity:.8}
body.cust .heropin{width:58px;height:65px;object-fit:contain;margin:2px auto 7px;filter:drop-shadow(0 5px 12px rgba(0,0,0,.2))}
body.cust .hero h1{font-size:39px;line-height:1.15;margin:0 0 7px;color:#fff;font-weight:900}
body.cust .hero p{font-size:15px;margin:0;color:#e4efe8}
body.cust .wrap{position:relative;max-width:620px;margin:-42px auto 0;padding:0 14px 40px}
body.cust #app{display:block}
body.cust .card{padding:19px;border-radius:22px;margin-bottom:15px;background:#fff;border:1px solid #e4ebe5;box-shadow:0 9px 26px rgba(6,55,38,.075)}
body.cust .h2i{display:flex;align-items:center;gap:11px;font-size:20px;font-weight:900;color:#123c2d;margin:0 0 13px}
body.cust .ico{width:44px;height:44px;min-width:44px;display:inline-flex;align-items:center;justify-content:center;border-radius:15px;background:linear-gradient(145deg,#f5d36f,#dba62e);color:#173a2b;box-shadow:0 6px 14px rgba(190,143,34,.18)}
body.cust .trip{border-radius:19px;padding:15px;background:#fff;border:1px solid #e2eae3;box-shadow:0 6px 18px rgba(6,55,38,.06)}
body.cust .trip .price{color:#174a34;font-size:19px;font-weight:900}
body.cust .btn{width:100%;min-height:50px;margin-top:15px;font-size:16px}
body.cust .btn.alt{background:#fff;color:#07563c}
body.cust .meta{color:#718078;line-height:1.8}
body.cust .link{color:#07563c;font-weight:800}

/* Agency and admin desktop-first dashboard surfaces */
body.branch,body.adm{background:#f1f5f2;min-height:100vh}
body.branch .wrap,body.adm .wrap{max-width:1440px;padding:0 22px 40px}
body.branch header,body.adm header{
 display:flex;align-items:center;gap:14px;padding:17px 22px;margin:0 -22px 18px;
 background:linear-gradient(110deg,#032f23,#07543c);color:#fff;
 border-bottom:3px solid #dcae3e;box-shadow:0 7px 20px rgba(4,49,34,.14)
}
body.branch header h1,body.adm header h1{color:#fff;font-size:22px;font-weight:900}
body.branch header p,body.adm header p{color:#dcebe2}
.applogo{width:58px;height:58px;object-fit:contain;background:#fff;border-radius:15px;padding:5px}
body.branch #app,body.adm #app{max-width:100%;margin:0 auto}
body.branch .nav,body.adm .nav{
 display:flex;flex-wrap:wrap;position:sticky;top:0;z-index:10;
 background:#063d2d;padding:8px;border-radius:16px;margin:12px 0 18px;
 box-shadow:0 8px 20px rgba(4,49,34,.14)
}
body.branch .nav button,body.adm .nav button{
 flex:1 1 125px;min-height:43px;border:1px solid rgba(255,255,255,.16);
 color:#e8f0eb;background:transparent;font-weight:800
}
body.branch .nav button.on,body.adm .nav button.on{background:linear-gradient(115deg,#f2cb68,#dda92f);color:#153b2c;border-color:#f3d47d}
body.branch .card,body.adm .card{border-radius:19px;padding:19px;margin-bottom:17px;box-shadow:0 8px 24px rgba(6,55,38,.06)}
body.branch .stats,body.adm .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:16px 0}
body.branch .stat,body.adm .stat{min-height:112px;display:flex;flex-direction:column;justify-content:center}
body.branch .head{display:flex;align-items:center;gap:12px}
body.branch .head img{width:55px;height:55px;object-fit:contain;border-radius:14px;background:#fff;padding:4px}
body.branch .item{padding:15px;border-radius:15px}
body.branch table,body.adm table{border-radius:13px;overflow:hidden}
body.branch .sum{display:flex;justify-content:space-between;gap:15px}
body.adm .stats{grid-template-columns:repeat(4,minmax(0,1fr))}
body.adm .card h2{border-bottom:1px solid #e8eee9;padding-bottom:10px}
body.branch .actions,body.adm .actions{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:760px){
 body.branch .wrap,body.adm .wrap{padding:0 12px 28px}
 body.branch header,body.adm header{margin:0 -12px 14px;padding:14px 15px}
 body.branch .stats,body.adm .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.branch .nav button{flex:1 1 29%;font-size:13px}
 body.branch .card,body.adm .card{padding:15px}
}
@media(max-width:420px){
 body.cust .hero{height:300px;padding-top:21px}
 body.cust .hero h1{font-size:34px}
 body.cust .wrap{padding-inline:10px}
 body.cust .card{padding:15px;border-radius:19px}
 body.branch .stats,body.adm .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* FINAL OVERRIDES — BLASTI mobile customer page */
html body.cust .hero{
 height:286px!important;min-height:286px!important;max-height:286px!important;
 padding:22px 16px 62px!important;margin:0!important;
 border-radius:0 0 28px 28px!important;overflow:hidden!important;
 background:radial-gradient(circle at 82% 18%,rgba(231,185,64,.22),transparent 25%),linear-gradient(135deg,#032e22 0%,#07563d 58%,#063a2b 100%)!important;
}
html body.cust .hero .heropin{width:52px!important;height:58px!important;margin:0 auto 5px!important}
html body.cust .hero h1{font-size:36px!important;line-height:1.15!important;margin:0 0 6px!important}
html body.cust .hero p{font-size:14px!important;margin:0!important}
html body.cust .wrap{max-width:620px!important;margin:-30px auto 0!important;padding:0 12px 30px!important;position:relative!important}
html body.cust #app{display:block!important}
html body.cust #app>.card{padding:17px!important;border-radius:20px!important;margin:0 0 13px!important}
html body.cust #app .h2i{font-size:19px!important;margin-bottom:10px!important}
html body.cust #app input,html body.cust #app select{min-height:46px!important;border-radius:13px!important}
html body.cust #app .btn{min-height:48px!important;border-radius:13px!important}
@media(max-width:420px){
 html body.cust .hero{height:270px!important;min-height:270px!important;max-height:270px!important;padding-top:18px!important}
 html body.cust .hero h1{font-size:33px!important}
 html body.cust .wrap{margin-top:-26px!important;padding-inline:10px!important}
 html body.cust #app>.card{padding:15px!important}
}
