  :root{
    --sat:var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); --sab:var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
    --navy:#0E1B3B;
    --navy-2:#16264F;
    --navy-soft:#EEF1F8;
    --accent:#FFC531;
    --accent-dark:#E2A800;
    --bg:#F6F7FB;
    --surface:#FFFFFF;
    --text:#101828;
    --text-muted:#66708A;
    --border:#E6E9F2;
    --border-strong:#C9D1E4;
    --ink-soft:#E3E8F4;
    --success:#1C9A5B;
    --danger:#D6473C;
    --radius-lg:20px;
    --radius-md:14px;
    --radius-sm:10px;
    --shadow: 0 6px 20px rgba(14,27,59,0.08);
    --font: 'Cairo', -apple-system, sans-serif;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --bg:#0A0F20; --surface:#121A33; --text:#EEF1F8; --text-muted:#8B93AE;
      --border:#232C4A; --navy-soft:#182247; --border-strong:#34406A; --ink-soft:#1E2A52; color-scheme: dark;
    }
  }
  :root[data-theme="dark"]{
    --bg:#0A0F20; --surface:#121A33; --text:#EEF1F8; --text-muted:#8B93AE;
    --border:#232C4A; --navy-soft:#182247; --border-strong:#34406A; --ink-soft:#1E2A52; color-scheme: dark;
  }
  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    font-family:var(--font);
    background:var(--bg);
    color:var(--text);
    -webkit-font-smoothing:antialiased;
  }
  #frame-outer{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:flex-start;
    background: var(--bg);
    padding:0;
  }
  @media (min-width:640px){
    #frame-outer{
      background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 45%, var(--bg) 45%);
      padding:32px 12px;
    }
    #phone{
      max-width:430px;
      width:100%;
      min-height:844px;
      border-radius:36px;
      box-shadow:0 30px 60px rgba(0,0,0,0.35);
      overflow:hidden;
      border:8px solid var(--navy);
      position:relative;
      background:var(--bg);
    }
  }
  #phone{
    width:100%;
    max-width:100%;
    background:var(--bg);
    min-height:100vh;
    position:relative;
    overflow-x:hidden;
  }
  /* حواف الشاشة (شريط الساعة فوق وشريط الإيماءات جوّه): بالتطبيق المغلّف Capacitor يعبّي --safe-area-inset-*،
     وبالمتصفح env(). الصفحة (#phone) تبدي تحت شريط الساعة، والـ sticky يُقاس من داخلها فما يحتاج إزاحة، وغطاء بلون الشريط يغطي اللي ينسحب وراه */
  #phone{padding-top:var(--sat);}
  #phone::before{content:''; position:fixed; top:0; inset-inline:0; height:var(--sat); background:var(--surface); z-index:45; pointer-events:none;}
  #app{padding-bottom:calc(78px + var(--sab));}
  a{color:inherit;text-decoration:none;}
  button{font-family:var(--font);}
  ::selection{background:var(--accent);color:var(--navy);}

  /* ---- Header ---- */
  .app-header{
    position:sticky; top:0; z-index:30;
    background:var(--surface);
    border-bottom:1px solid var(--border);
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 16px;
  }
  .icon-btn{
    width:44px;height:44px; display:flex; align-items:center; justify-content:center;
    border-radius:12px; border:1px solid var(--border); background:var(--surface); cursor:pointer;
    color:var(--text);
  }
  .icon-btn:active{transform:scale(0.94);}
  .brand{
    display:flex; align-items:center; gap:8px; font-weight:800; font-size:19px; color:var(--navy);
  }
  :root[data-theme="dark"] .brand{color:var(--accent);}
  @media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .brand{color:var(--accent);} }
  .brand .dot{color:var(--accent);}
  .brand-txt{display:flex; flex-direction:column; line-height:1.05;}
  .brand-iq{font-size:11px; font-weight:700; color:var(--text-muted);}
  .brand-mark{
    width:34px;height:34px;border-radius:10px;background:var(--navy);
    display:flex;align-items:center;justify-content:center;color:var(--accent);font-weight:800;font-size:16px;
    flex-shrink:0;
  }
  .header-actions{display:flex; align-items:center; gap:8px;}
  .btn{
    border:none; cursor:pointer; font-family:var(--font); font-weight:700; border-radius:12px;
    padding:11px 18px; font-size:14.5px; transition:transform .12s ease;
  }
  .btn:active{transform:scale(0.97);}
  .btn:focus-visible{outline:2.5px solid var(--accent); outline-offset:2px;}
  /* الوضع النهاري (FEEDBACK 12): أزرار واضحة بظل خفيف وإطار أقوى، والثانوية «ناعمة» بدل شفافة */
  .btn-primary{background:var(--accent); color:var(--navy); box-shadow:0 1px 0 rgba(14,27,59,.12), 0 6px 14px -6px rgba(226,168,0,.55);}
  .btn-primary:hover{background:#FFCD4D;}
  .btn-navy{background:var(--navy); color:#fff; box-shadow:0 6px 14px -8px rgba(14,27,59,.6);}
  .btn-navy:hover{background:var(--navy-2);}
  /* بالداكن الكحلي يختفي على الخلفية: زر أفتح بإطار */
  :root[data-theme="dark"] .btn-navy{background:#2A3C72; color:#fff; box-shadow:inset 0 0 0 1px #3D5296;}
  @media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .btn-navy{background:#2A3C72; color:#fff; box-shadow:inset 0 0 0 1px #3D5296;} }
  .btn-outline{background:var(--surface); border:1.5px solid var(--border-strong); color:var(--text);}
  .btn-outline:hover{border-color:var(--navy); background:var(--navy-soft);}
  :root[data-theme="dark"] .btn-outline:hover{border-color:var(--accent);}
  .btn-ghost{background:var(--navy-soft); color:var(--navy); padding:10px 12px;}
  .btn-ghost:hover{background:var(--ink-soft);}
  :root[data-theme="dark"] .btn-ghost{color:var(--accent);}
  @media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .btn-ghost{color:var(--accent);} }
  .btn-block{width:100%; display:block; text-align:center;}
  .btn-sm{padding:8px 14px; font-size:13px; border-radius:10px;}
  .btn:disabled{opacity:0.45; cursor:not-allowed;}

  /* ---- Hero ---- */
  .hero{
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
    color:#fff; padding:34px 20px 30px; position:relative; overflow:hidden;
  }
  .hero::after{
    content:""; position:absolute; inset-inline-end:-40px; top:-40px; width:170px; height:170px;
    background:radial-gradient(circle, rgba(255,197,49,0.35), transparent 70%);
  }
  .hero h1{font-size:26px; line-height:1.35; margin:0 0 8px; font-weight:800; position:relative;}
  .hero p{margin:0 0 20px; color:#C7CEE8; font-size:14.5px; position:relative;}
  .hero .btn-primary{font-size:15px; padding:14px 20px; box-shadow:0 10px 24px rgba(255,197,49,0.25);}

  .section{padding:26px 16px 6px;}
  .section-title{font-size:18px; font-weight:800; margin:0 0 3px;}
  .section-sub{font-size:13.5px; color:var(--text-muted); margin:0 0 16px;}

  /* ---- Service cards ---- */
  .svc-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
  .svc-card{
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md);
    padding:14px; cursor:pointer; display:flex; flex-direction:column; gap:8px;
  }
  .svc-card:active{transform:scale(0.98);}
  .svc-emoji{
    width:44px;height:44px;border-radius:12px; background:var(--navy-soft);
    display:flex; align-items:center; justify-content:center; font-size:21px;
  }
  .svc-name{font-weight:700; font-size:14.5px;}
  .svc-desc{font-size:12px; color:var(--text-muted); line-height:1.5; min-height:32px;}
  .svc-cta{font-size:12.5px; font-weight:700; color:var(--navy);}
  :root[data-theme="dark"] .svc-cta{color:var(--accent);}

  /* ---- steps / why ---- */
  .steps-row{display:flex; flex-direction:column; gap:12px;}
  .step-item{display:flex; align-items:flex-start; gap:12px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px;}
  .step-num{
    width:30px;height:30px;border-radius:50%; background:var(--accent); color:var(--navy); font-weight:800;
    display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:14px;
  }
  .step-txt strong{display:block; font-size:14px; margin-bottom:2px;}
  .step-txt span{font-size:12.5px; color:var(--text-muted);}

  .why-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
  .why-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; text-align:center;}
  .why-card .ic{font-size:22px; margin-bottom:6px;}
  .why-card .tt{font-size:13px; font-weight:700;}

  /* ---- bottom nav ---- */
  .bottom-nav{
    position:fixed; bottom:0; inset-inline:0; max-width:inherit; z-index:40;
    background:var(--surface); border-top:1px solid var(--border);
    display:flex; justify-content:space-around; padding:8px 4px calc(8px + var(--sab));
  }
  @media (min-width:640px){ .bottom-nav{ position:absolute; } }
  .nav-item{
    display:flex; flex-direction:column; align-items:center; gap:3px; font-size:11px; color:var(--text-muted);
    background:none; border:none; cursor:pointer; padding:4px 10px; font-family:var(--font); font-weight:600;
  }
  .nav-item.active{color:var(--navy);}
  :root[data-theme="dark"] .nav-item.active{color:var(--accent);}

  /* ---- forms ---- */
  .field{margin-bottom:14px;}
  .field label{display:block; font-size:13px; font-weight:700; margin-bottom:6px;}
  .input, textarea.input, select.input{
    width:100%; border:1.5px solid var(--border); border-radius:var(--radius-sm); padding:13px 14px;
    font-family:var(--font); font-size:16px; background:var(--surface); color:var(--text);
  }
  .input:focus, textarea.input:focus{outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent);}
  textarea.input{resize:vertical; min-height:110px;}
  .segmented{display:flex; gap:8px;}
  .seg-btn{
    flex:1; padding:12px; border-radius:var(--radius-sm); border:1.5px solid var(--border); background:var(--surface);
    font-family:var(--font); font-weight:700; cursor:pointer; color:var(--text); font-size:14px;
  }
  .seg-btn.active{border-color:var(--navy); background:var(--navy); color:#fff;}
  :root[data-theme="dark"] .seg-btn.active{background:var(--accent); border-color:var(--accent); color:var(--navy);}

  .auth-wrap{padding:26px 20px;}
  .auth-title{font-size:22px; font-weight:800; margin:6px 0 4px;}
  .auth-sub{font-size:13.5px; color:var(--text-muted); margin:0 0 22px;}
  .switch-link{text-align:center; margin-top:16px; font-size:13.5px; color:var(--text-muted);}
  .switch-link b{color:var(--navy); cursor:pointer;}
  :root[data-theme="dark"] .switch-link b{color:var(--accent);}

  /* ---- wizard ---- */
  .wizard-head{display:flex; align-items:center; gap:10px; padding:14px 16px; border-bottom:1px solid var(--border); background:var(--surface); position:sticky; top:0; z-index:20;}
  .progress-track{flex:1; height:6px; background:var(--navy-soft); border-radius:6px; overflow:hidden;}
  .progress-fill{height:100%; background:var(--accent); border-radius:6px; transition:width .25s ease;}
  .wizard-body{padding:22px 18px 90px;}
  .wizard-q{font-size:19px; font-weight:800; margin:0 0 16px;}
  .chip-row{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px;}
  .chip{
    border:1px solid var(--border); background:var(--surface); border-radius:20px; padding:8px 14px;
    font-size:12.5px; cursor:pointer; color:var(--text-muted); font-family:var(--font);
  }
  .chip:active{background:var(--navy-soft);}
  .cat-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
  .cat-pick{
    border:1.5px solid var(--border); border-radius:var(--radius-md); padding:14px 10px; text-align:center; cursor:pointer;
    background:var(--surface);
  }
  .cat-pick.sel{border-color:var(--navy); background:var(--navy-soft);}
  .cat-pick .svc-emoji{margin:0 auto 8px;}
  .cat-pick .svc-name{font-size:13px;}
  .upload-box{
    border:1.5px dashed var(--border); border-radius:var(--radius-md); padding:26px 14px; text-align:center; cursor:pointer;
    color:var(--text-muted); font-size:13px; background:var(--surface);
  }
  .media-row{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px;}
  .media-thumb{width:64px;height:64px;border-radius:10px; overflow:hidden; position:relative; border:1px solid var(--border);}
  .media-thumb img, .media-thumb video{width:100%;height:100%;object-fit:cover;}
  .media-thumb .rm{position:absolute; top:2px; left:2px; background:rgba(0,0,0,0.55); color:#fff; border:none; border-radius:50%; width:18px; height:18px; font-size:11px; cursor:pointer;}
  .time-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
  .wizard-footer{
    position:fixed; bottom:0; inset-inline:0; max-width:inherit; padding:12px 16px calc(12px + var(--sab));
    background:var(--surface); border-top:1px solid var(--border); display:flex; gap:10px; z-index:25;
  }
  @media (min-width:640px){ .wizard-footer{position:absolute;} }

  .review-block{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:10px;}
  .review-block .lbl{font-size:11.5px; color:var(--text-muted); margin-bottom:4px;}
  .review-block .val{font-size:14px; font-weight:600;}

  .confirm-wrap{padding:60px 26px; text-align:center;}
  .confirm-icon{
    width:80px;height:80px; border-radius:50%; background:#E9F8EF; color:var(--success); display:flex; align-items:center;
    justify-content:center; font-size:40px; margin:0 auto 20px;
  }
  :root[data-theme="dark"] .confirm-icon{background:#123527;}

  /* ---- ai assistant ---- */
  .ai-box{
    margin-top:16px; background:var(--navy-soft); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px;
  }
  .ai-head{display:flex; align-items:center; gap:8px; font-weight:800; font-size:13.5px; margin-bottom:8px; color:var(--navy);}
  :root[data-theme="dark"] .ai-head{color:var(--accent);}
  .ai-bubble{background:var(--surface); border-radius:12px; padding:10px 12px; font-size:13px; line-height:1.6; margin-bottom:8px; border:1px solid var(--border);}
  .ai-tags{display:flex; flex-wrap:wrap; gap:6px; margin-top:6px;}
  .ai-tag{background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:5px 9px; font-size:11.5px; color:var(--text-muted);}

  /* ---- lists / requests ---- */
  .req-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:12px; cursor:pointer;}
  .req-top{display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:8px;}
  .req-cat{font-weight:700; font-size:14px; display:flex; align-items:center; gap:8px;}
  .badge{font-size:11px; font-weight:700; padding:4px 9px; border-radius:20px; white-space:nowrap;}
  .badge-search{background:#FFF3D6; color:#8A6100;}
  .badge-offers{background:#DDEBFF; color:#144C9C;}
  .badge-picked{background:#E7E1FF; color:#5732C7;}
  .badge-progress{background:#DFF4E7; color:#166B3F;}
  .badge-done{background:#E4E7EC; color:#3A4152;}
  .badge-cancel{background:#FBE3E1; color:#9A2E25;}
  .req-desc{font-size:13px; color:var(--text-muted); margin-bottom:8px; line-height:1.5;}
  .req-meta{display:flex; gap:14px; font-size:11.5px; color:var(--text-muted);}
  .empty-state{padding:60px 26px; text-align:center; color:var(--text-muted);}
  .empty-state .ic{font-size:40px; margin-bottom:10px;}

  /* ---- offers ---- */
  .offer-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:16px; margin-bottom:12px;}
  .offer-top{display:flex; gap:12px; align-items:center; margin-bottom:10px;}
  .avatar{
    width:46px;height:46px;border-radius:50%; background:var(--navy); color:#fff; display:flex; align-items:center;
    justify-content:center; font-weight:800; font-size:16px; flex-shrink:0;
  }
  .offer-name{font-weight:800; font-size:14.5px;}
  .offer-sub{font-size:11.5px; color:var(--text-muted);}
  .offer-price-row{display:flex; justify-content:space-between; background:var(--navy-soft); border-radius:10px; padding:10px 12px; margin-bottom:10px;}
  .offer-price-row .p{font-weight:800; color:var(--navy); font-size:15px;}
  :root[data-theme="dark"] .offer-price-row .p{color:var(--accent);}
  .offer-msg{font-size:13px; color:var(--text-muted); margin-bottom:12px; line-height:1.5;}

  /* generic */
  .divider{height:1px; background:var(--border); margin:22px 0;}
  .top-tab{display:flex; border-bottom:1px solid var(--border); background:var(--surface); position:sticky; top:57px; z-index:15;}
  .tab-btn{flex:1; padding:13px; text-align:center; font-weight:700; font-size:13.5px; color:var(--text-muted); background:none; border:none; cursor:pointer; border-bottom:2px solid transparent; font-family:var(--font);}
  .tab-btn.active{color:var(--navy); border-color:var(--navy);}
  :root[data-theme="dark"] .tab-btn.active{color:var(--accent); border-color:var(--accent);}

  .menu-overlay{position:fixed; inset:0; background:rgba(10,15,32,0.5); z-index:50; display:flex;}
  .menu-panel{
    width:82%; max-width:340px; background:var(--surface); height:100%; padding:calc(20px + var(--sat)) 20px calc(20px + var(--sab)); overflow-y:auto;
    display:flex; flex-direction:column; gap:4px;
  }
  .menu-item{padding:14px 6px; font-size:14.5px; font-weight:600; border-bottom:1px solid var(--border); cursor:pointer; display:flex; justify-content:space-between; align-items:center;}
  .toast{
    position:fixed; bottom:calc(96px + var(--sab)); inset-inline:16px; background:var(--navy); color:#fff; padding:13px 16px; border-radius:12px;
    font-size:13px; text-align:center; z-index:80; box-shadow:0 10px 24px rgba(0,0,0,0.25);
  }
  .kv-row{display:flex; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--border); font-size:13.5px;}
  .kv-row span:first-child{color:var(--text-muted);}
  .profile-hero{background:linear-gradient(160deg, var(--navy), var(--navy-2)); padding:30px 20px 46px; color:#fff; text-align:center; position:relative;}
  .profile-avatar{
    width:84px;height:84px;border-radius:50%; background:var(--accent); color:var(--navy); font-size:30px; font-weight:800;
    display:flex; align-items:center; justify-content:center; margin:0 auto 10px; border:4px solid rgba(255,255,255,0.25);
  }
  .stat-row{display:flex; justify-content:space-around; background:var(--surface); border-radius:var(--radius-md); margin:-30px 16px 0; padding:16px 8px; box-shadow:var(--shadow); position:relative;}
  .stat-item{text-align:center;}
  .stat-item b{display:block; font-size:16px;}
  .stat-item span{font-size:11px; color:var(--text-muted);}
  .portfolio-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:6px;}
  .portfolio-ph{aspect-ratio:1; border-radius:10px; background:var(--navy-soft); display:flex; align-items:center; justify-content:center; font-size:18px;}
  .review-item{padding:12px 0; border-bottom:1px solid var(--border);}
  .review-item .rh{display:flex; justify-content:space-between; font-weight:700; font-size:13.5px; margin-bottom:4px;}
  .stars{color:var(--accent-dark); font-size:12.5px;}

  .admin-shell{display:flex; min-height:100%;}
  .admin-side{width:96px; background:var(--navy); color:#fff; padding:14px 0; flex-shrink:0;}
  .admin-side .a-item{padding:12px 8px; text-align:center; font-size:11px; font-weight:600; cursor:pointer; opacity:0.7;}
  .admin-side .a-item.active{opacity:1; background:rgba(255,255,255,0.08); border-inline-start:3px solid var(--accent);}
  .admin-main{flex:1; padding:16px;}
  .admin-table{width:100%; border-collapse:collapse; font-size:12.5px;}
  .admin-table th{text-align:right; color:var(--text-muted); font-weight:700; padding:8px 6px; border-bottom:1px solid var(--border); font-size:11.5px;}
  .admin-table td{padding:9px 6px; border-bottom:1px solid var(--border);}
  .note-box{background:var(--navy-soft); border-radius:12px; padding:12px 14px; font-size:12px; color:var(--text-muted); margin-bottom:14px; line-height:1.6;}

  /* =====================================================
     v2 additions
     ===================================================== */
  :root{ --warn:#B7791F; --info:#2B6CB0; }
  .btn{min-height:44px;}
  .btn-danger{background:var(--danger); color:#fff;}
  .btn-success{background:var(--success); color:#fff;}
  .btn-sm{min-height:36px;}
  .row{display:flex; gap:10px; align-items:center;}
  .row.between{justify-content:space-between;}
  .grow{flex:1;}
  .muted{color:var(--text-muted);}
  .small{font-size:12px;}
  .mt8{margin-top:8px;} .mt12{margin-top:12px;} .mt16{margin-top:16px;} .mt20{margin-top:20px;}
  .card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:12px;}
  .ltr{direction:ltr; text-align:right;}
  .num{font-variant-numeric:tabular-nums;}

  /* demo banner */
  .demo-banner{background:var(--accent); color:var(--navy); font-size:11.5px; font-weight:700; text-align:center; padding:5px 10px;}

  /* header bell */
  .bell-wrap{position:relative;}
  .bell-badge{
    position:absolute; top:-5px; inset-inline-start:-5px; min-width:18px; height:18px; border-radius:9px; padding:0 4px;
    background:var(--danger); color:#fff; font-size:10.5px; font-weight:800; display:flex; align-items:center; justify-content:center;
  }

  /* notifications */
  .notif-item{display:flex; gap:12px; padding:13px 14px; border-bottom:1px solid var(--border); background:var(--surface); cursor:pointer;}
  .notif-item.unread{background:var(--navy-soft);}
  .notif-ic{width:38px;height:38px;border-radius:12px;background:var(--navy-soft);display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;}
  .notif-item.unread .notif-ic{background:var(--surface);}
  .notif-title{font-weight:700; font-size:13.5px;}
  .notif-body{font-size:12.5px; color:var(--text-muted); margin-top:2px; line-height:1.5;}
  .notif-time{font-size:11px; color:var(--text-muted); margin-top:4px;}

  /* timeline */
  .timeline{display:flex; justify-content:space-between; position:relative; margin:6px 0 4px;}
  .tl-step{flex:1; text-align:center; position:relative; font-size:10.5px; color:var(--text-muted); font-weight:600;}
  .tl-dot{width:22px;height:22px;border-radius:50%;background:var(--border);margin:0 auto 5px;display:flex;align-items:center;justify-content:center;font-size:11px;color:#fff;position:relative;z-index:1;}
  .tl-step.done .tl-dot{background:var(--success);}
  .tl-step.cur .tl-dot{background:var(--accent); color:var(--navy);}
  .tl-step.done, .tl-step.cur{color:var(--text);}
  .tl-step::before{content:""; position:absolute; top:10px; height:2px; background:var(--border); inset-inline:-50% 50%; z-index:0;}
  .tl-step:first-child::before{display:none;}
  .tl-step.done::before, .tl-step.cur::before{background:var(--success);}

  /* chat */
  .chat-wrap{display:flex; flex-direction:column; height:calc(100vh - 73px); height:calc(100dvh - 73px); min-height:420px;}
  @media (min-width:640px){ .chat-wrap{height:600px;} }
  .chat-list{flex:1; overflow-y:auto; padding:14px 14px 6px; display:flex; flex-direction:column; gap:8px;}
  .bubble{max-width:78%; padding:9px 13px; border-radius:16px; font-size:14px; line-height:1.55; word-wrap:break-word;}
  .bubble.me{align-self:flex-start; background:var(--navy); color:#fff; border-end-start-radius:4px;}
  .bubble.them{align-self:flex-end; background:var(--surface); border:1px solid var(--border); border-end-end-radius:4px;}
  .bubble .t{font-size:10px; opacity:.6; margin-top:3px;}
  .chat-form{display:flex; gap:8px; padding:10px 12px calc(10px + var(--sab)); border-top:1px solid var(--border); background:var(--surface);}
  .chat-form .input{flex:1;}
  .thread-item{display:flex; gap:12px; align-items:center; padding:13px 16px; border-bottom:1px solid var(--border); background:var(--surface); cursor:pointer;}

  /* payment */
  .pay-method{display:flex; gap:12px; align-items:center; border:1.5px solid var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:10px; background:var(--surface); cursor:pointer;}
  .pay-method.sel{border-color:var(--navy); background:var(--navy-soft);}
  :root[data-theme="dark"] .pay-method.sel{border-color:var(--accent);}
  .pay-logo{width:46px;height:46px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;color:#fff;flex-shrink:0;}
  .pay-radio{width:20px;height:20px;border-radius:50%;border:2px solid var(--border);margin-inline-start:auto;flex-shrink:0;}
  .pay-method.sel .pay-radio{border:6px solid var(--navy);}
  :root[data-theme="dark"] .pay-method.sel .pay-radio{border-color:var(--accent);}
  .sum-row{display:flex; justify-content:space-between; padding:9px 0; font-size:13.5px; border-bottom:1px dashed var(--border);}
  .sum-row.total{font-weight:800; font-size:15px; border-bottom:none;}
  .sandbox-box{background:#FFF8E1; color:#7A5B00; border:1px dashed #E2A800; border-radius:12px; padding:12px; font-size:12px; line-height:1.7; margin-bottom:14px;}
  :root[data-theme="dark"] .sandbox-box{background:#2A2208; color:#F2D27A;}

  /* rating */
  .star-input{display:flex; gap:6px; justify-content:center; direction:ltr; margin:10px 0;}
  .star-input button{background:none;border:none;font-size:34px;color:var(--border);cursor:pointer;padding:0 2px;line-height:1;}
  .star-input button.on{color:var(--accent-dark);}

  /* stat cards / tabs */
  .stat-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px;}
  .stat-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px;}
  .stat-card b{display:block; font-size:19px; margin-bottom:2px;}
  .stat-card span{font-size:11.5px; color:var(--text-muted);}
  .pills{display:flex; gap:8px; overflow-x:auto; padding:2px 16px 12px; scrollbar-width:none;}
  .pills::-webkit-scrollbar{display:none;}
  .pill{white-space:nowrap; border:1.5px solid var(--border); background:var(--surface); border-radius:20px; padding:8px 14px; font-size:13px; font-weight:700; cursor:pointer; color:var(--text-muted); font-family:var(--font);}
  .pill.active{background:var(--navy); border-color:var(--navy); color:#fff;}
  :root[data-theme="dark"] .pill.active{background:var(--accent); border-color:var(--accent); color:var(--navy);}
  .verified{color:var(--info); font-size:13px;}

  /* quick demo login */
  .demo-card{display:flex; align-items:center; gap:12px; border:1.5px dashed var(--border); border-radius:var(--radius-md); padding:12px; margin-bottom:8px; cursor:pointer; background:var(--surface);}
  .demo-card:active{background:var(--navy-soft);}

  /* info pages */
  .prose h3{font-size:15px; margin:18px 0 4px;}
  .prose p{font-size:13.5px; line-height:1.85; color:var(--text-muted); margin:0 0 8px;}

  /* admin wide layout */
  #phone.wide{max-width:1100px;}
  @media (min-width:640px){ #phone.wide{max-width:1100px; min-height:760px;} }
  .admin-side{width:110px;}
  .admin-main{min-width:0; overflow-x:auto;}
  .admin-table td .btn{padding:5px 9px; min-height:30px; font-size:11.5px;}
  .admin-table td, .admin-table th{white-space:nowrap;}
  .admin-table td.wrap{white-space:normal; min-width:160px;}
  .tag{display:inline-block; font-size:10.5px; font-weight:700; padding:2px 8px; border-radius:10px; background:var(--navy-soft);}
  .tag.ok{background:#DFF4E7; color:#166B3F;} .tag.bad{background:#FBE3E1; color:#9A2E25;} .tag.wait{background:#FFF3D6; color:#8A6100;}
  .spark{display:flex; align-items:flex-end; gap:5px; height:70px; margin:8px 0;}
  .spark i{flex:1; background:var(--accent); border-radius:4px 4px 0 0; min-height:3px;}

  /* safe areas / small phones */
  @media (max-width:360px){ .svc-grid,.why-grid,.stat-grid{gap:8px;} .hero h1{font-size:23px;} .tl-step{font-size:9.5px;} }
  button:focus-visible, .input:focus-visible{outline:2px solid var(--accent); outline-offset:2px;}
  @media (prefers-reduced-motion:reduce){ *{transition:none !important;} }

  /* admin on phones: tabs become a scrolling strip above the content */
  @media (max-width:639px){
    .admin-shell{flex-direction:column;}
    .admin-side{width:auto; display:flex; overflow-x:auto; padding:0; scrollbar-width:none;}
    .admin-side::-webkit-scrollbar{display:none;}
    .admin-side .a-item{white-space:nowrap; padding:13px 14px; font-size:12.5px; border-inline-start:none; border-bottom:3px solid transparent;}
    .admin-side .a-item.active{border-inline-start:none; border-bottom-color:var(--accent);}
    .admin-main{padding:14px 16px;}
  }

  /* ---- home v3: sub-bar, horizontal rows, coming soon, promo, fab ---- */
  .sub-bar{display:flex; gap:8px; align-items:center; padding:10px 12px; background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:72px; z-index:25;}
  .city-pick{display:flex; align-items:center; gap:4px; color:var(--navy); font-weight:700; font-size:13px; flex-shrink:0;}
  :root[data-theme="dark"] .city-pick{color:var(--accent);}
  .city-pick select{border:none; background:transparent; font-family:var(--font); font-weight:700; font-size:14px; color:inherit; max-width:84px; padding:8px 0;}
  .search-fake, .search-input{flex:1; min-width:0; height:44px; border:1.5px solid var(--border); border-radius:22px; background:var(--bg); color:var(--text-muted); font-family:var(--font); font-size:14px; padding:0 14px; display:flex; align-items:center; gap:8px; cursor:pointer; text-align:right; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .search-input{cursor:text; color:var(--text); font-size:16px;}
  .support-btn{display:flex; flex-direction:column; align-items:center; gap:1px; background:none; border:none; color:var(--danger); font-family:var(--font); font-size:10.5px; font-weight:700; cursor:pointer; min-width:44px;}
  .bar-title{border-inline-start:4px solid var(--danger); padding-inline-start:8px; line-height:1.2;}
  .h-row{display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x proximity; padding:12px 2px 16px; margin:0 -16px; padding-inline:16px; scrollbar-width:none;}
  .h-row::-webkit-scrollbar{display:none;}
  .h-card{flex:0 0 138px; scroll-snap-align:start; position:relative;}
  .h-card .svc-desc{min-height:0;}
  .svc-card.soon, .search-item.soon{opacity:.7; cursor:default;}
  .soon-badge{position:absolute; top:8px; inset-inline-end:8px; background:var(--danger); color:#fff; font-size:10.5px; font-weight:800; padding:3px 9px; border-radius:12px;}
  .promo{display:flex; align-items:center; justify-content:space-between; gap:10px; background:linear-gradient(120deg, var(--navy-soft), var(--surface)); border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px;}
  .promo-ic{font-size:44px;}
  .fab{position:fixed; bottom:calc(92px + var(--sab)); inset-inline-start:16px; height:48px; padding:0 16px; gap:8px; border-radius:24px; font:700 13px inherit; font-family:inherit; border:none; background:var(--navy); color:var(--accent); box-shadow:0 8px 20px rgba(14,27,59,.35); display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:35;}
  @media (min-width:640px){ .fab{position:absolute;} }
  /* بالداكن الكحلي يذوب بالخلفية (صورة علي من التلفون) ← زر أصفر واضح. ومسافة بآخر الرئيسية حتى الزر ما يغطي آخر خدمة */
  :root[data-theme="dark"] .fab{background:var(--accent); color:var(--navy); box-shadow:0 8px 22px rgba(0,0,0,.55);}
  .fab-space{height:64px;}
  .nav-item{padding:4px 6px;}
  .hot-row{margin-top:12px;}
  .hot-chip{font-size:13px; font-weight:700; color:var(--text); min-height:40px;}

  /* ---- map ---- */
  .map-box{height:240px; border-radius:var(--radius-md); border:1px solid var(--border); margin-top:10px; background:var(--navy-soft); overflow:hidden; position:relative; z-index:0;}
  .map-fail{padding:30px 16px; text-align:center; font-size:13px; color:var(--text-muted);}
  .pin-icon{font-size:28px; line-height:30px; text-align:center; background:none; border:none; filter:drop-shadow(0 2px 3px rgba(0,0,0,.4));}
  .otp-input{font-size:28px; letter-spacing:14px; text-align:center; font-weight:800; padding:14px;}

  /* ---- bottom sheet (service types) ---- */
  .sheet-overlay{position:fixed; inset:0; background:rgba(10,15,32,.55); z-index:60; display:flex; align-items:flex-end;}
  @media (min-width:640px){ .sheet-overlay{position:absolute;} }
  .sheet{width:100%; max-height:82%; overflow-y:auto; background:var(--surface); border-radius:24px 24px 0 0; padding:10px 16px calc(20px + var(--sab)); animation:sheetUp .22s ease-out;}
  @keyframes sheetUp{from{transform:translateY(40px); opacity:.4;} to{transform:none; opacity:1;}}
  .sheet-handle{width:42px; height:4px; border-radius:2px; background:var(--border); margin:2px auto 14px;}
  .sheet-title{font-size:20px; font-weight:800;}
  .sheet-list{display:flex; flex-direction:column; gap:10px; margin-top:16px;}
  .sheet-item{display:flex; align-items:center; justify-content:space-between; width:100%; min-height:52px; padding:0 16px; border:1.5px solid var(--border); border-radius:14px; background:var(--bg); color:var(--text); font-family:var(--font); font-size:15px; font-weight:700; cursor:pointer; text-align:right;}
  .sheet-item i{font-style:normal; color:var(--danger); font-size:20px;}
  .sheet-item:active{background:var(--navy-soft);}
  .sheet-item.other{border-style:dashed; color:var(--text-muted); font-weight:600;}

  /* ---- reviews ---- */
  .rv-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:16px; margin-bottom:12px; box-shadow:0 1px 0 rgba(14,27,59,.03);}
  .rv-head{display:flex; align-items:center; gap:12px;}
  .rv-name{font-size:15px;}
  .rv-score{text-align:left; display:flex; flex-direction:column; align-items:flex-end; gap:1px;}
  .rv-num{font-weight:800; font-size:15px;}
  .rv-verified{display:inline-flex; align-items:center; gap:5px; margin-top:10px; font-size:11.5px; font-weight:700; color:var(--success); background:rgba(28,154,91,.1); padding:4px 10px; border-radius:12px;}
  .rv-verified svg{width:14px; height:14px;}
  .rv-text{font-size:14.5px; line-height:1.85; margin:10px 0 0; color:var(--text);}
  .rv-photos{display:grid; gap:6px; margin-top:12px;}
  .rv-photos.n1{grid-template-columns:1fr;} .rv-photos.n2{grid-template-columns:1fr 1fr;} .rv-photos.n3{grid-template-columns:2fr 1fr; grid-template-rows:1fr 1fr;}
  .rv-photos.n3 .rv-photo:first-child{grid-row:1 / span 2;}
  .rv-photo{padding:0; border:none; border-radius:14px; overflow:hidden; background:var(--navy-soft); cursor:zoom-in; aspect-ratio:4/3; min-height:90px;}
  .rv-photos.n1 .rv-photo{aspect-ratio:16/10;}
  .rv-photo img{width:100%; height:100%; object-fit:cover; display:block;}
  .rv-foot{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-top:12px;}
  .rv-tag{font-size:12px; font-weight:700; color:var(--text-muted); background:var(--navy-soft); padding:6px 12px; border-radius:14px;}
  .rv-tech{font-size:12px; font-weight:700; color:var(--navy); cursor:pointer;}
  :root[data-theme="dark"] .rv-tech{color:var(--accent);}
  .rv-card.compact{margin:0; height:100%;}
  .rv-card.compact .rv-text{display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; font-size:13.5px;}
  .rv-slide{flex:0 0 82%; max-width:320px; scroll-snap-align:start;}
  .rv-summary{display:flex; gap:18px; align-items:center;}
  .rv-big{text-align:center; flex-shrink:0;} .rv-big b{display:block; font-size:42px; line-height:1;}
  .rv-bars{flex:1; display:flex; flex-direction:column; gap:6px;}
  .rv-bar{display:flex; align-items:center; gap:8px; font-size:11.5px; font-weight:700;}
  .rv-bar span:first-child{width:28px;} .rv-bar span:last-child{width:22px; text-align:left;}
  .rv-track{flex:1; height:7px; background:var(--navy-soft); border-radius:4px; overflow:hidden;}
  .rv-track i{display:block; height:100%; background:var(--accent-dark); border-radius:4px;}
  .sort-select{border:1.5px solid var(--border); background:var(--surface); color:var(--text); font-family:var(--font); font-size:13px; font-weight:700; border-radius:10px; padding:8px 10px; min-height:40px;}
  .upload-mini{display:inline-block; border:1.5px dashed var(--border); border-radius:12px; padding:10px 14px; font-size:13px; color:var(--text-muted); cursor:pointer; margin-top:6px;}
  .lightbox{position:fixed; inset:0; background:rgba(0,0,0,.92); z-index:90; display:flex; align-items:center; justify-content:center; padding:calc(16px + var(--sat)) 16px calc(16px + var(--sab));}
  @media (min-width:640px){ .lightbox{position:absolute;} }
  .lightbox img{max-width:100%; max-height:100%; border-radius:12px; object-fit:contain;}
  .lb-close{position:absolute; top:14px; inset-inline-end:14px; background:rgba(255,255,255,.15); color:#fff; border-color:transparent;}

  /* ---- ideas batch: tags, badges, start code ---- */
  .offer-tags{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px;}
  .otag{font-size:11.5px; font-weight:800; padding:4px 10px; border-radius:12px; background:var(--accent); color:var(--navy);}
  .tb{display:inline-block; font-size:11px; font-weight:700; padding:3px 9px; border-radius:11px; background:var(--navy-soft); color:var(--text); margin:0 0 4px 4px;}
  .tb-row .tb{background:rgba(255,255,255,.14); color:#fff;}
  .code-card{background:linear-gradient(135deg,var(--navy),var(--navy-2)); color:#fff; border-radius:var(--radius-lg); padding:16px; text-align:center; margin:12px 0;}
  .code-num{font-size:40px; font-weight:800; letter-spacing:10px; color:var(--accent); margin:4px 0 8px;}
  .pr{display:block; font-size:11.5px; font-weight:600; color:var(--text-muted); margin-top:2px;}
  .day-row{display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none;}
  .day-row::-webkit-scrollbar{display:none;}
  .day-chip{flex:0 0 76px; display:flex; flex-direction:column; align-items:center; gap:2px; padding:10px 6px; border:1.5px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); font-family:var(--font); cursor:pointer;}
  .day-chip b{font-size:14px;} .day-chip span{font-size:11px; color:var(--text-muted);}
  .day-chip.sel, .slot-chip.sel{border-color:var(--navy); background:var(--navy); color:#fff;} .day-chip.sel span{color:#C7CEE8;}
  :root[data-theme="dark"] .day-chip.sel, :root[data-theme="dark"] .slot-chip.sel{background:var(--accent); border-color:var(--accent); color:var(--navy);} :root[data-theme="dark"] .day-chip.sel span{color:var(--navy);}
  .slot-row{display:flex; flex-direction:column; gap:8px;}
  .slot-chip{min-height:48px; border:1.5px solid var(--border); border-radius:14px; background:var(--surface); color:var(--text); font-family:var(--font); font-size:14.5px; font-weight:700; cursor:pointer;}
  .slot-chip:disabled{opacity:.4; cursor:not-allowed;}
  .aud{display:flex; gap:10px; align-items:flex-start; padding:12px; border:1.5px solid var(--border); border-radius:14px; margin-top:8px; cursor:pointer;}
  .aud.sel{border-color:var(--navy); background:var(--navy-soft);} .aud small{color:var(--text-muted);} .aud input{margin-top:4px;}

  /* ---- admin reports (single-series bars, one colour) ---- */
  :root{ --bar:#2A4A9E; --bar-bg:var(--navy-soft); }
  :root[data-theme="dark"]{ --bar:#FFC531; }
  .rp-cols{display:flex; align-items:flex-end; gap:8px; height:130px; padding:0 2px; border-bottom:1px solid var(--border);}
  .rp-col{flex:1; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:4px; min-width:0; position:relative;}
  .rp-col i{display:block; width:70%; max-width:26px; background:var(--bar); border-radius:4px 4px 0 0;}
  .rp-val{font-size:11.5px; font-weight:800; color:var(--text); height:14px;}
  .rp-lbl{position:absolute; bottom:-22px; font-size:10.5px; color:var(--text-muted); white-space:nowrap;}
  .rp-cols{margin-bottom:38px;}
  .rp-hbars{display:flex; flex-direction:column; gap:10px;}
  .rp-hrow{display:flex; align-items:center; gap:10px;}
  .rp-name{flex:0 0 38%; font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .rp-htrack{flex:1; height:10px; background:var(--bar-bg); border-radius:5px; overflow:hidden;}
  .rp-htrack i{display:block; height:100%; background:var(--bar); border-radius:5px 0 0 5px;}
  .rp-num{width:26px; text-align:left; font-size:12.5px;}
  .welcome-card{background:linear-gradient(150deg,var(--navy),var(--navy-2)); color:#fff; border-radius:var(--radius-lg); padding:16px;}
  .wc-steps{margin:0; padding-inline-start:20px; font-size:13px; line-height:1.8;}
  .wc-steps li{margin-bottom:6px;} .wc-steps b{color:var(--accent);}
  .wc-tips{margin-top:10px; background:rgba(255,255,255,.08); border-radius:12px; padding:10px 12px; font-size:12.5px; line-height:1.8;}
  .wc-meter{margin-top:14px;}
  .sheet-item.group{border-color:var(--navy); background:var(--surface);}
  :root[data-theme="dark"] .sheet-item.group{border-color:var(--accent);}
  .sheet .row .icon-btn{margin-inline-end:10px;}
  .chat-note{background:var(--navy-soft); color:var(--text-muted); font-size:12px; text-align:center; padding:8px 12px;}
  .save-tag{display:inline-block; margin-top:4px; font-size:11px; font-weight:800; color:var(--success); background:rgba(28,154,91,.12); padding:2px 9px; border-radius:10px;}
  .chosen{display:flex; align-items:center; gap:12px; background:var(--navy-soft); border:1px solid var(--border); border-radius:var(--radius-md); padding:10px 12px; margin-bottom:18px;}
  .chosen b{font-size:15px;}
  .wa-box{border:1.5px solid var(--border); border-radius:var(--radius-md); padding:12px; margin-bottom:14px; background:var(--surface);}
  .wa-head{font-weight:800; font-size:14px;}
  .wa-card{background:linear-gradient(135deg, rgba(28,154,91,.10), var(--surface)); border:1.5px solid rgba(28,154,91,.45); border-radius:var(--radius-md); padding:14px; margin:0 0 12px;}
  .wa-card.ok{border-color:var(--border); background:var(--surface);}
  .push-card{background:linear-gradient(135deg, var(--accent-soft, rgba(245,183,0,.14)), var(--surface)); border:1.5px solid var(--accent); border-radius:var(--radius-md); padding:14px; margin:0 0 12px; text-align:right;}
  .push-card.ok{border-color:var(--border); background:var(--surface);}
  .promise-card{background:var(--navy-soft); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin:14px 0; font-size:13px; line-height:1.8;}
  .promise-card.late{background:#FFF4E5; border-color:#F5C26B;}
  .how-card{background:var(--navy-soft); border:1px solid var(--border); border-radius:var(--radius-md); padding:14px; margin-bottom:16px; font-size:13px; line-height:1.8;}
  .how-card ol{margin:6px 0 0; padding-inline-start:20px;} .how-card li{margin-bottom:3px;}
  .price-hint{margin-top:10px; background:var(--surface); border:1px dashed var(--accent-dark); border-radius:12px; padding:10px 12px; font-size:13px;}

/* ---- المساعد (محادثة) ---- */
.bot-av{width:34px; height:34px; border-radius:50%; background:var(--navy); color:var(--accent); display:inline-flex; align-items:center; justify-content:center;}
.bot-acts{display:flex; flex-direction:column; gap:6px; margin-top:10px;}
.bot-act{background:var(--navy-soft); color:var(--text); border:1px solid var(--border); border-radius:12px; padding:9px 12px; font:700 13px inherit; font-family:inherit; text-align:start; cursor:pointer;}
.bot-act:active{transform:scale(.98);}
.bot-chips{padding:6px 12px 0; flex-wrap:nowrap; overflow-x:auto; margin:0;}
.bot-chips .chip{white-space:nowrap; flex:0 0 auto;}
.bubble.typing{display:flex; gap:4px; padding:12px 14px;}
.bubble.typing span{width:7px; height:7px; border-radius:50%; background:var(--text-muted); animation:botdot 1s infinite ease-in-out;}
.bubble.typing span:nth-child(2){animation-delay:.15s} .bubble.typing span:nth-child(3){animation-delay:.3s}
@keyframes botdot{0%,80%,100%{opacity:.25; transform:translateY(0)} 40%{opacity:1; transform:translateY(-3px)}}
.bubble.them{max-width:88%;}

/* ---- تنبيه منبثق + أرقام الشريط السفلي ---- */
#alert-card{position:fixed; top:-200px; left:50%; transform:translateX(-50%); width:min(440px, calc(100% - 24px)); z-index:1000; display:flex; gap:10px; align-items:flex-start;
  background:var(--surface); color:var(--text); border:1px solid var(--border); border-inline-start:5px solid var(--accent); border-radius:16px; padding:14px; box-shadow:0 12px 30px rgba(14,27,59,.25); transition:top .35s ease;}
#alert-card.show{top:calc(12px + var(--sat));}
#alert-card .alert-ic{font-size:26px; line-height:1;}
#alert-card b{font-size:14.5px;}
#alert-card .alert-x{background:none; border:none; color:var(--text-muted); font-size:16px; cursor:pointer; padding:2px 4px;}
#alert-card.alert-offer{border-inline-start-color:var(--success);}
.nav-item{position:relative;}
.nav-badge{position:absolute; top:2px; inset-inline-end:calc(50% - 22px); min-width:18px; height:18px; padding:0 5px; border-radius:9px; background:var(--danger); color:#fff; font-size:10.5px; line-height:18px; text-align:center;}
.req-alert{margin-top:10px; padding:8px 12px; border-radius:10px; background:var(--accent); color:#0E1B3B; font-weight:800; font-size:13px;}
/* ---- العروض (الزبون) ---- */
.offers-head{display:flex; gap:12px; align-items:center; background:var(--navy); color:#fff; border-radius:var(--radius-md); padding:14px; margin-top:14px;}
.offers-head .oh-ic{font-size:28px;}
.offers-head .small{color:rgba(255,255,255,.8); margin-top:2px;}
.offer-main{display:flex; gap:10px; align-items:center; justify-content:space-between; margin-bottom:10px;}
.offer-who{display:flex; gap:10px; align-items:center; cursor:pointer; min-width:0; flex:1;}
.offer-price{text-align:center; background:var(--navy-soft); border-radius:12px; padding:8px 12px; flex-shrink:0;}
.offer-price b{display:block; font-size:18px; color:var(--navy);}
:root[data-theme="dark"] .offer-price b{color:var(--accent);}
.offer-chips{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:10px;}
.ochip{font-size:12px; font-weight:700; padding:4px 10px; border-radius:12px; background:var(--navy-soft);}
.offer-bubble{background:var(--navy-soft); border-radius:12px; border-start-start-radius:4px; padding:10px 12px; font-size:13px; line-height:1.6; margin-bottom:12px;}
/* ---- نموذج العرض (الفني) ---- */
.offer-form{border:2px solid var(--accent);}
.of-head{margin-bottom:12px;}
.of-head .small{margin-top:4px;}
.of-label{display:block; font-weight:800; font-size:13.5px; margin:14px 0 6px;}
.of-price{font-size:22px; font-weight:800; text-align:center; direction:ltr;}
.of-preview{margin-top:10px; background:var(--navy-soft); border-radius:12px; padding:10px 12px; font-size:13px;}
.of-preview .kv-row{padding:4px 0;}
.offer-form .chip-row{margin-bottom:8px;}
.offer-form .chip.sel{background:var(--navy); color:#fff; border-color:var(--navy);}

/* تعديل السعر بعد الفحص / شغل إضافي */
.pc-card{background:var(--surface); border:2px solid var(--accent); border-radius:var(--radius-md); padding:14px; margin:14px 0;}
.pc-head{font-weight:800; font-size:15px; margin-bottom:12px;}
.pc-prices{display:flex; align-items:center; justify-content:center; gap:14px; text-align:center; margin-bottom:6px;}
.pc-prices s{font-size:16px; color:var(--text-muted);}
.pc-prices b{display:block; font-size:22px; color:var(--navy);}
.pc-arrow{font-size:22px; color:var(--accent-dark);}
:root[data-theme="dark"] .pc-prices b{color:var(--accent);}
.pc-rule{line-height:1.6;}
.of-visit{display:flex; gap:8px; align-items:flex-start; font-size:13px; line-height:1.6; margin-top:10px; padding:10px; border:1px dashed var(--accent-dark); border-radius:12px; cursor:pointer;}
.of-visit input{margin-top:4px; width:18px; height:18px; flex-shrink:0;}

/* البلاغ والحظر (متطلب أبل 1.2) */
.chat-menu{position:absolute; top:calc(100% + 4px); inset-inline:16px; background:var(--surface); border:1px solid var(--border, rgba(0,0,0,.08)); border-radius:12px; box-shadow:0 6px 20px rgba(0,0,0,.12); padding:4px 0; z-index:5;}
.chat-menu .menu-item{width:100%; background:none; border:0; font:inherit; text-align:start; padding:12px; cursor:pointer; color:var(--text);}
.msg-act{display:flex; justify-content:flex-start; margin:-4px 0 6px;}
.rv-report{background:none; border:0; font:inherit; font-size:12px; color:var(--text-muted); cursor:pointer; padding:4px 6px;}
.rv-report:hover{color:var(--danger);}

/* تعدد التخصصات */
.chip.active{background:var(--navy); color:#fff; border-color:var(--navy);}
:root[data-theme="dark"] .chip.active{background:var(--accent); color:#0E1B3B; border-color:var(--accent);}
.spec-chip{display:inline-flex; align-items:center; gap:6px; cursor:default; color:var(--text);}
.spec-x{background:none; border:0; font:inherit; color:var(--text-muted); cursor:pointer; padding:0 2px; font-size:13px;}
.spec-x:hover{color:var(--danger);}
.thread-item.unread{background:var(--navy-soft);}
.unread-badge{flex-shrink:0; min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:var(--accent); color:#0E1B3B; font-size:12px; display:inline-flex; align-items:center; justify-content:center;}
.req-photos{display:flex; gap:8px; overflow-x:auto; margin-top:10px; padding-bottom:2px;}
.req-photos .rv-photo{flex:0 0 auto; width:84px; height:84px; min-height:0; aspect-ratio:auto;}
.req-photos img{width:100%; height:100%; object-fit:cover; border-radius:10px; display:block;}

/* الأرباح والتسويات */
.bal-card{text-align:center;}
.bal-card .kv-row{text-align:right;}
.bal-num{display:block; font-size:28px; margin:4px 0;}
.range-pick .chip{white-space:nowrap;}
.range-dates label{display:flex; flex-direction:column; gap:4px;}
.range-dates .input{min-width:0;}
.settle-ask{min-width:180px;}
/* الزبائن المميزين + أكواد الخصم */
.tier-badge{display:inline-block; font-size:12px; font-weight:800; padding:3px 10px; border-radius:999px; background:var(--accent-soft, #FFF4D1); color:#7A5600;}
.tier-badge.t2{background:#14204A; color:#FFC531;}
:root[data-theme="dark"] .tier-badge{background:#3A2F0B; color:#FFD86B;}
:root[data-theme="dark"] .tier-badge.t2{background:#FFC531; color:#0E1B3B;}
.disc-row{color:var(--success); font-weight:700;}
.promo-box{display:flex; gap:8px; align-items:center; margin-top:12px;}
.promo-box .input{flex:1; min-width:0; text-transform:uppercase;}
.promo-box.applied{justify-content:space-between; background:var(--surface); border:1.5px dashed var(--success); border-radius:12px; padding:8px 12px; font-size:14px;}
.tier-card{border-color:var(--accent);}
.tier-bar{height:8px; border-radius:99px; background:var(--border); overflow:hidden; margin:8px 0 4px;}
.tier-bar i{display:block; height:100%; background:var(--accent);}
/* استلام الطلبات للفني */
.avail-bar{display:flex; justify-content:space-between; align-items:center; gap:10px; margin:0 16px 12px; padding:10px 14px; border-radius:12px; background:var(--surface); border:1.5px solid var(--success); font-size:14px;}
.avail-bar.off{border-color:var(--accent); background:var(--note, #FFF6DB);}
:root[data-theme="dark"] .avail-bar.off{background:#2A2510;}
/* الصندوق والحسابات */
.fund-grid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px;}
@media (min-width:720px){ .fund-grid{grid-template-columns:repeat(4, minmax(0,1fr));} }
.fund-card{background:var(--surface); border:1.5px solid var(--border); border-radius:14px; padding:12px; display:flex; flex-direction:column; gap:2px; min-width:0;}
.fund-card .fc-ic{font-size:20px;}
.fund-card b{font-size:17px; overflow-wrap:anywhere;}
.fund-card span{font-size:12px; color:var(--text-muted);}
.fund-card.ok{border-color:var(--success);} .fund-card.bad{border-color:var(--danger);} .fund-card.warn{border-color:var(--accent);}
.fund-chip{font-size:12.5px;}
.fund-h{font-size:15px; margin:22px 0 8px;}
.kv-row.neg span:last-child{color:var(--danger);}
.fund-net{font-weight:800; font-size:16px; border-top:2px solid var(--border); border-bottom:none !important; padding-top:10px;}
.exp-row{display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto; gap:8px; align-items:center; font-size:13px; margin-top:8px;}
.exp-bar{height:8px; background:var(--border); border-radius:99px; overflow:hidden;}
.exp-bar i{display:block; height:100%; background:var(--navy);}
:root[data-theme="dark"] .exp-bar i{background:var(--accent);}
/* تتبّع الفني */
.track-card.on{border-color:var(--success);}
.pause-card{border-color:var(--accent);}
.phone-link{font-weight:800;color:var(--text);text-decoration:none;background:var(--bg);border:1px solid var(--border);padding:4px 10px;border-radius:10px;}
.track-map{height:220px; border-radius:12px; overflow:hidden; margin-top:10px; background:var(--border);}
.track-eta{display:flex; align-items:baseline; gap:10px; margin-top:8px;}
.track-eta b{font-size:20px;}
.track-eta span{font-size:13px; color:var(--text-muted);}

/* عمّال ومهن أخرى */
.workers-cta{cursor:pointer;border-color:var(--accent);}
.link-btn{color:var(--text);text-decoration:underline;cursor:pointer;}
.worker-card .offer-chips{margin-top:10px;}

/* ===== المحلات الشريكة ===== */
.chip-static{cursor:default;}
.check-row{display:flex; align-items:center; gap:8px; font-size:13px; margin:4px 0 10px;}
.check-row input{width:18px; height:18px; flex-shrink:0;}
.shop-card{display:flex; gap:12px; align-items:flex-start; cursor:pointer;}
.shop-thumb{width:64px; height:64px; border-radius:12px; object-fit:cover; flex-shrink:0; background:var(--navy-soft);}
.shop-thumb-ic, .prod-ic{display:flex; align-items:center; justify-content:center; font-size:28px;}
.shop-logo{width:56px; height:56px; border-radius:14px; object-fit:cover; flex-shrink:0; background:var(--navy-soft); display:flex; align-items:center; justify-content:center; font-size:26px;}
.shop-title{font-size:17px; margin:0 0 2px; line-height:1.4; overflow-wrap:anywhere;}
.shop-name{font-size:14.5px; display:block; overflow-wrap:anywhere;}
.shop-photos{display:flex; gap:8px; overflow-x:auto; padding-bottom:6px; margin-bottom:10px; scroll-snap-type:x mandatory;}
.shop-photo{padding:0; border:none; border-radius:14px; overflow:hidden; flex:0 0 78%; max-width:320px; aspect-ratio:4/3; background:var(--navy-soft); cursor:zoom-in; scroll-snap-align:start;}
.shop-photo img, .prod-img img{width:100%; height:100%; object-fit:cover; display:block;}
.prod-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px;}
.prod-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:8px; font-size:13px; min-width:0;}
.prod-img{display:block; width:100%; aspect-ratio:1/1; border-radius:10px; overflow:hidden; background:var(--navy-soft); border:none; padding:0; margin-bottom:6px; cursor:zoom-in;}
.prod-img.prod-ic{display:flex; align-items:center; justify-content:center; aspect-ratio:4/3; font-size:34px; cursor:default;}
.prod-name{font-weight:700; line-height:1.4; overflow-wrap:anywhere;}
.prod-hidden{opacity:.55;}
.prod-row{gap:10px; align-items:center; flex-wrap:wrap;}
.prod-thumb{width:52px; height:52px; border-radius:10px; object-fit:cover; flex-shrink:0; background:var(--navy-soft);}
.quote-items{white-space:pre-line; margin:8px 0 4px; overflow-wrap:anywhere;}
.price-box{background:var(--navy-soft); border-radius:12px; padding:10px 12px;}
.link-box{background:var(--navy-soft); border-radius:10px; padding:10px; font-size:12.5px; word-break:break-all; user-select:all; text-align:left;}
.qr-wrap{text-align:center;}
#shop-qr{display:inline-block; background:#fff; padding:10px; border-radius:12px; min-height:60px;}
#shop-qr img, #shop-qr canvas{display:block; max-width:100%;}
/* «أكثر من صلّحلي»: بطاقتين جنب بعض */
.more-grid{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin-top:12px;}
.more-grid.one{grid-template-columns:1fr;}
.more-tile{background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); padding:12px; display:flex; flex-direction:column; gap:4px; min-width:0;}
.more-tile b{font-size:14px; line-height:1.4;}
.more-tile .small{line-height:1.5; overflow-wrap:anywhere;}
.more-ic{width:40px; height:40px; border-radius:12px; background:var(--navy-soft); display:flex; align-items:center; justify-content:center; font-size:22px; margin-bottom:4px;}

/* المحلات 2: سطر الثقة، السلة، التسليم والتقييم، التقارير */
.shop-meta{margin-top:4px; line-height:1.6; overflow-wrap:anywhere;}
.shop-rate{font-weight:700;}
.shop-thumb.sm{width:44px; height:44px; font-size:20px; border-radius:10px;}
.segmented.seg-sm{gap:6px;}
.segmented.seg-sm .seg-btn{padding:10px 4px; font-size:13px; min-width:0;}
.qty-row{display:inline-flex; align-items:center; gap:10px;}
.qty-btn{width:32px; height:32px; border-radius:50%; border:1.5px solid var(--border); background:var(--surface); color:var(--text); font-size:18px; font-weight:700; line-height:1; cursor:pointer; font-family:var(--font);}
.prod-card .qty-row{display:flex; justify-content:center;}
.cart-line{display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--border); font-size:14px;}
.cart-bar{position:sticky; bottom:calc(12px + var(--sab, 0px)); z-index:20; margin-top:16px; display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--navy); color:#fff; border-radius:var(--radius-md); padding:10px 12px; box-shadow:0 6px 20px rgba(0,0,0,.18);}
.q-steps{display:flex; gap:4px; margin:10px 0 2px;}
.q-steps span{flex:1; min-width:0; text-align:center; font-size:11.5px; padding:5px 2px; border-radius:8px; background:var(--navy-soft); color:var(--text-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.q-steps span.on{background:var(--accent); color:var(--navy); font-weight:700;}
.rate-box{background:var(--navy-soft); border-radius:12px; padding:10px 12px; text-align:center;}
.star-row{display:flex; justify-content:center; gap:4px; margin:6px 0;}
.star-btn{font-size:26px; background:none; border:none; cursor:pointer; padding:4px; filter:grayscale(.2);}
.star-btn:hover, .star-btn:focus-visible{transform:scale(1.15);}
.todo-card{display:flex; flex-direction:column; gap:2px; padding:12px 14px; border-radius:var(--radius-md); background:var(--surface); border:1.5px solid var(--accent); cursor:pointer;}
.rep-h{font-size:14px; margin:18px 0 8px;}
.mat-row{display:flex; align-items:center; gap:10px; padding:8px 0; border-top:1px solid var(--border); cursor:pointer;}
:root[data-theme="dark"] .cart-bar{background:#2A3C72;}
/* الدفعة 1: شريط «بدون عمولة» للفني */
.free-bar{display:flex; gap:8px; align-items:flex-start; margin:0 16px 12px; padding:10px 12px; border-radius:var(--radius-md); background:linear-gradient(90deg, rgba(255,197,49,.22), rgba(255,197,49,.08)); border:1px solid rgba(255,197,49,.55); font-size:13.5px; line-height:1.6;}
.photo-pick{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.photo-pick .btn{width:100%; justify-content:center; text-align:center;}
.photo-pick.big .btn{padding:16px 10px; font-size:15px; border-style:dashed;}
/* الدفعة 1 (ب): الطلب بـ3 شاشات */
.wiz-title{display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px;}
.wiz-title b{font-size:16px;}
.wizard-head .grow{min-width:0;}
.how-mini{padding:12px 14px;}
.how-steps{display:flex; flex-wrap:wrap; align-items:center; gap:4px; font-weight:700; font-size:12px; margin-bottom:4px;}
.how-steps span{background:var(--surface); border:1px solid var(--border); border-radius:999px; padding:3px 8px; white-space:nowrap;}
.how-steps i{font-style:normal; color:var(--text-muted);}
.how-mini .price-hint{margin-top:8px;}
.wizard-sub{font-weight:800; font-size:14px; margin:14px 0 8px;}
.sym-row{margin:0 0 10px;}
.cat-line{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:12px; padding:10px 12px; border:1.5px solid var(--border-strong); border-radius:var(--radius-md); background:var(--surface);}
.cat-line b{font-size:14.5px;}
.voice-btn{border-style:dashed;}
.voice-btn.rec{border-color:var(--danger); color:var(--danger); animation:recPulse 1.2s ease-in-out infinite;}
@keyframes recPulse{0%,100%{box-shadow:0 0 0 0 rgba(214,71,60,.35);} 50%{box-shadow:0 0 0 6px rgba(214,71,60,0);}}
@media (prefers-reduced-motion: reduce){ .voice-btn.rec{animation:none;} }
.voice-box{display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px; border-radius:var(--radius-md); background:var(--navy-soft);}
.voice-box audio{width:100%; height:40px;}
.loc-btn{display:flex; align-items:center; justify-content:center; gap:8px; padding:14px; font-size:15px; margin-bottom:10px;}
.sum-card{padding:4px 14px;}
.sum-line{display:flex; gap:10px; align-items:flex-start; padding:12px 0; border-bottom:1px solid var(--border);}
.sum-line:last-child{border-bottom:none;}
.sum-ic{width:34px; height:34px; border-radius:10px; background:var(--navy-soft); display:flex; align-items:center; justify-content:center; flex-shrink:0; font-size:17px;}
.sum-val{font-weight:700; font-size:14px; line-height:1.6; overflow-wrap:anywhere;}
.guest-box{margin-top:12px; border:1.5px solid var(--accent);}
.pin-hint{width:100%; flex-basis:100%; font-size:12.5px; color:var(--accent-dark); font-weight:700; text-align:center; margin-bottom:6px;}
.wizard-footer{flex-wrap:wrap;}
.mat-note{display:flex; gap:6px; font-size:13px; background:var(--navy-soft); border-radius:10px; padding:8px 10px; margin-bottom:8px;}
.addr-save{margin:0 0 16px;}
.map-box.failed{height:auto; min-height:0;}
/* الدفعة 1 (ج): توثيق الفني + بلاغ الأمان */
.docs-card{margin:0 16px 12px; padding:12px 14px; border-radius:var(--radius-md); background:var(--surface); border:1.5px solid var(--accent); cursor:pointer;}
.docs-card.warn{border-color:var(--danger);}
.doc-step{position:relative;}
.doc-step.done{border-color:rgba(28,154,91,.45);}
.doc-num{width:28px; height:28px; border-radius:50%; background:var(--navy-soft); display:flex; align-items:center; justify-content:center; font-weight:800; flex-shrink:0;}
.doc-step.done .doc-num{background:var(--success); color:#fff;}
.doc-row{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px;}
.doc-cell{position:relative;}
.doc-cell .rm{position:absolute; top:-6px; left:-6px; background:rgba(0,0,0,0.6); color:#fff; border:none; border-radius:50%; width:22px; height:22px; font-size:12px; cursor:pointer;}
.doc-thumb{width:96px; height:72px; border-radius:10px; overflow:hidden; border:1px solid var(--border); padding:0; background:var(--navy-soft); cursor:zoom-in; display:block;}
.doc-thumb img{width:100%; height:100%; object-fit:cover; display:block;}
.doc-ph{display:flex; align-items:center; justify-content:center; font-size:24px; cursor:default;}
.pledge{margin:0 0 10px; padding-inline-start:18px; font-size:13.5px; line-height:1.9;}
.safety-btn{color:var(--danger); background:rgba(214,71,60,.08);}
.more-fields{margin:4px 0 12px; border:1px dashed var(--border-strong); border-radius:var(--radius-md); padding:8px 12px;}
.more-fields summary{cursor:pointer; font-weight:700; font-size:13.5px; padding:4px 0;}
.more-fields[open] summary{margin-bottom:8px;}
/* الدفعة 1 (د): الفتح بالتدريج */
.soon-box{padding:12px 14px; border-radius:var(--radius-md); background:var(--navy-soft); border:1.5px dashed var(--border-strong); display:flex; flex-direction:column; gap:4px; align-items:flex-start;}
.input-sm{padding:6px 8px; font-size:13px; min-height:0;}
/* الدفعة 1 (هـ): قائمة المواد */
.mat-table{margin-top:8px; border:1px solid var(--border); border-radius:var(--radius-sm); overflow:hidden;}
.mat-tr{display:flex; gap:8px; align-items:center; padding:7px 10px; border-bottom:1px solid var(--border); font-size:13.5px;}
.mat-tr:last-child{border-bottom:none;}
.mat-tr.total{background:var(--navy-soft); font-weight:700;}
.mat-head, .mat-in{display:grid; grid-template-columns:minmax(0,2fr) minmax(0,.8fr) minmax(0,1.1fr); gap:6px;}
.mat-in{margin-bottom:6px;}
.mat-in .input{padding:9px 8px; font-size:13.5px;}
.mat-sum{font-weight:800; margin:8px 0 4px;}
.mat-stuck{border-color:var(--danger);}
/* ترتيب الواجهة (الدفعة 1): شبكة خدمات مرتبة + سطر ثقة + عناوين بلون الهوية */
.bar-title{border-inline-start-color:var(--accent);}
.hero-trust{display:flex; flex-wrap:wrap; gap:6px 12px; margin-top:14px; font-size:12.5px; color:#DCE2F5; position:relative;}
.hero-trust span{white-space:nowrap;}
.group-row{margin:10px 0 4px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin-inline:-16px; padding-inline:16px;}
.group-row::-webkit-scrollbar{display:none;}
.group-row .chip{flex:0 0 auto;}
.home-grid{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; padding:8px 0 4px;}
.svc-card.tile{padding:12px 6px 10px; align-items:center; text-align:center; gap:6px; position:relative; box-shadow:0 1px 0 rgba(14,27,59,.04);}
.svc-card.tile .svc-emoji{width:46px; height:46px; font-size:23px; border-radius:14px;}
.svc-card.tile .svc-name{font-size:12.5px; line-height:1.4; overflow-wrap:anywhere;}
.svc-card.tile .svc-desc{font-size:10.5px; min-height:0; line-height:1.4;}
.svc-card.tile .soon-badge{top:6px; inset-inline-end:6px; font-size:9.5px; padding:2px 7px;}
.svc-card.tile:hover{border-color:var(--border-strong);}
@media (min-width:520px){ .home-grid{grid-template-columns:repeat(4, minmax(0, 1fr));} }
.hot-row{display:grid; grid-auto-flow:column; grid-template-rows:repeat(2, auto); justify-content:start; gap:8px; overflow-x:auto; scrollbar-width:none; margin-inline:-16px; padding:2px 16px 6px;}
.hot-row::-webkit-scrollbar{display:none;}
.hot-row .hot-chip{white-space:nowrap;}
