  *{box-sizing:border-box}
  html,body{height:100%}
  body{margin:0;font-family:"Cairo",system-ui,sans-serif;color:var(--white);
       background:linear-gradient(160deg,var(--bg-grad-1),var(--bg-grad-2));
       -webkit-tap-highlight-color:transparent}
  button{font:inherit;color:inherit;cursor:pointer}
  [hidden]{display:none!important}

  /* ---------- Wordmark ---------- */
  .wordmark{font-family:"Readex Pro","Cairo",sans-serif;direction:ltr;line-height:1.15;white-space:nowrap}
  .wordmark b{font-weight:600;color:var(--white)}
  .wordmark span{font-weight:300;color:var(--soft-text)}

  /* ---------- Language screen ---------- */
  #lang{min-height:100%;display:flex;align-items:center;justify-content:center;padding:16px}
  .card{background:var(--frame);border-radius:16px;padding:32px 24px 28px;max-width:380px;width:100%;
        text-align:center;border-top:4px solid var(--yellow);box-shadow:0 8px 24px rgba(0,0,0,.25)}
  .card .logo{width:72px;height:72px;display:block;margin:0 auto 10px}
  .card .wordmark{font-size:21px;margin-bottom:26px}
  .card p{margin:0 0 14px;color:var(--soft-text);font-size:15px}
  .lang-btn{display:block;width:100%;border:none;border-radius:12px;padding:14px;margin-top:12px;
            background:var(--blue);color:var(--white);font-size:18px;font-weight:700}
  .lang-btn.en{font-family:"Cairo",sans-serif}
  .lang-btn:active{filter:brightness(.92)}

  /* ---------- App frame ---------- */
  #app{height:100%;display:flex;flex-direction:column}
  .topbar{flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:10px 16px;
          padding-top:max(10px,env(safe-area-inset-top));
          background:var(--frame);border-bottom:3px solid var(--yellow);box-shadow:0 2px 10px rgba(0,0,0,.25);z-index:2}
  .brand{flex:1 1 auto;display:flex;align-items:center;gap:12px;min-width:0;text-decoration:none;color:inherit}
  .topbar .logo{width:32px;height:32px;flex:0 0 auto}
  .topbar .wordmark{font-size:16px;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis}
  [dir=rtl] .topbar .wordmark{text-align:right}
  .switch{border:1px solid var(--frame-2);background:transparent;border-radius:8px;padding:4px 12px;
          font-size:14px;font-weight:600;color:var(--soft-text)}
  .body{flex:1 1 auto;display:flex;min-height:0}

  /* Side panel / menu */
  .panel{flex:0 0 280px;padding:18px 14px;overflow-y:auto;
         background:linear-gradient(180deg,var(--bg-grad-1),var(--bg-grad-2))}
  .section{font-size:13px;font-weight:700;color:var(--yellow);margin:4px 6px 10px;letter-spacing:.02em}
  .tile{display:flex;align-items:center;gap:12px;width:100%;text-align:start;border:none;
        background:var(--frame-2);border-radius:12px;padding:14px;margin-bottom:10px;
        border-inline-start:4px solid transparent;box-shadow:0 2px 6px rgba(0,0,0,.18)}
  .tile svg{width:24px;height:24px;flex:0 0 auto;stroke:var(--blue);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .tile .t{flex:1 1 auto;font-size:16px;font-weight:600}
  .tile.active{border-inline-start-color:var(--yellow);background:var(--frame)}
  .tile:disabled{cursor:default;opacity:.55;box-shadow:none}
  .tile .soon{font-size:12px;line-height:1.7;white-space:nowrap;font-weight:600;color:var(--frame);background:var(--soft-text);border-radius:6px;padding:1px 8px}

  /* Workspace */
  .work{flex:1 1 auto;display:flex;flex-direction:column;background:var(--workspace);min-width:0}
  .subbar{display:none;align-items:center;gap:8px;padding:8px 12px;background:var(--frame);color:var(--white)}
  .back{border:none;background:transparent;display:flex;align-items:center;gap:4px;font-size:15px;font-weight:600;color:var(--blue);padding:4px}
  .back svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
  #app.open .subbar{display:flex}
  .subbar .title{font-weight:700;font-size:16px;margin-inline-start:4px}
  .frame{flex:1 1 auto;border:0;width:100%;background:var(--workspace)}
  .welcome{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;
           color:var(--frame);text-align:center;padding:24px}
  .welcome img{width:64px;height:64px;margin-bottom:12px}
  .welcome h2{margin:0 0 4px;font-size:20px}
  .welcome p{margin:0;color:var(--frame-2)}

  /* Phone: menu and workspace take turns */
  @media (max-width:760px){
    .panel{flex:1 1 auto}
    .work{display:none}
    #app.open .panel{display:none}
    #app.open .work{display:flex}
    .welcome{display:none}
  }

  /* Staff sign-in tile (public landing) */
  a.tile{text-decoration:none;color:inherit}
  .staff-in{margin-top:22px;background:transparent;border:1.5px solid var(--yellow);border-inline-start-width:4px;box-shadow:none}
  .staff-in svg{stroke:var(--yellow)}
  .staff-in .t small{display:block;font-size:12.5px;font-weight:400;color:var(--soft-text)}
  /* "Staff" label in the staff portal top bar */
  .badge{font-size:12px;font-weight:700;color:var(--frame);background:var(--yellow);border-radius:6px;padding:1px 8px;line-height:1.7;flex:0 0 auto}
