:root{
  --bg:#0b0d12; --surface:#13161d; --surface-2:#1b1f28; --line:#262b36;
  --text:#eef0f3; --muted:#8b919d; --btn:#eef0f3; --btn-text:#0b0d12;
  --radius:14px; color-scheme:dark;
}
:root[data-theme="light"]{
  --bg:#f2f3f5; --surface:#ffffff; --surface-2:#f2f3f5; --line:#e1e4e8;
  --text:#111317; --muted:#626976; --btn:#111317; --btn-text:#ffffff; color-scheme:light;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body.zbhb{margin:0;min-height:100vh;background:var(--bg);color:var(--text);
  font-family:Tajawal,"Segoe UI",Tahoma,system-ui,sans-serif;font-size:16px;line-height:1.5;
  padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)}
.zbhb a{color:inherit}
.zbhb button{font:inherit;color:inherit;cursor:pointer}
.zbhb :focus-visible{outline:2px solid var(--text);outline-offset:2px;border-radius:6px}

/* header */
.top{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px clamp(14px,4vw,32px);background:var(--bg);border-bottom:1px solid var(--line)}
.top.plain{position:static;border-bottom:0}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:800;font-size:17px;letter-spacing:.2px;direction:ltr}
.mark{width:26px;height:26px;flex:none}
.top-end{display:flex;align-items:center;gap:8px}
.bar-tools{display:flex;align-items:center;gap:6px}
.langs{display:flex;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:3px}
.langs a{min-width:32px;height:28px;display:grid;place-items:center;border-radius:7px;font-size:13px;font-weight:700;text-decoration:none;color:var(--muted)}
.langs a.on{background:var(--surface-2);color:var(--text)}
.icon-btn{width:36px;height:36px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);border-radius:10px}
.icon-btn svg{width:18px;height:18px}
.ghost-btn{height:36px;display:inline-flex;align-items:center;padding:0 12px;background:var(--surface);border:1px solid var(--line);
  border-radius:10px;font-size:14px;font-weight:500;text-decoration:none;white-space:nowrap}
.ghost-btn:hover,.icon-btn:hover{background:var(--surface-2)}
.logout{display:flex;align-items:center;gap:10px;margin:0}
.who{font-size:14px;color:var(--muted);max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* hub */
.hub{max-width:1040px;margin:0 auto;padding:clamp(24px,5vw,48px) clamp(14px,4vw,32px) 64px}
.hub h1{margin:0;font-size:clamp(26px,4vw,34px);font-weight:800;letter-spacing:-.3px}
.hub .sub{margin:4px 0 28px;color:var(--muted)}
.notice{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:24px;padding:12px 16px;
  border:1px dashed var(--muted);border-radius:12px;text-decoration:none;font-size:15px}
.notice b{white-space:nowrap}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}
.tile{position:relative;display:flex;flex-direction:column;gap:6px;min-height:150px;padding:18px;text-decoration:none;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);transition:border-color .15s,transform .15s}
.tile:hover{border-color:var(--muted);transform:translateY(-2px)}
.tile .ic{width:52px;height:52px;display:grid;place-items:center;font-size:28px;background:var(--surface-2);border-radius:12px;margin-bottom:8px}
.tile .nm{font-weight:700;font-size:16.5px;line-height:1.3}
.tile .ds{font-size:13.5px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tile .ext{position:absolute;top:16px;inset-inline-end:16px;width:15px;height:15px;color:var(--muted)}
.empty{padding:40px 20px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:var(--radius)}

/* auth + messages */
.center{min-height:calc(100vh - 140px);display:grid;place-items:center;padding:20px 16px 48px}
.card{width:min(420px,100%);background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:clamp(22px,5vw,32px)}
.card h1{margin:0;font-size:24px;font-weight:800}
.card .lead,.card.msg p{margin:6px 0 20px;color:var(--muted);font-size:15px}
.card .big{font-size:40px;margin-bottom:8px}
.msg{text-align:center}
.form{display:flex;flex-direction:column;gap:14px}
.form label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500}
.form input{height:46px;padding:0 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);font:inherit;font-size:16px}
.form input:focus{outline:none;border-color:var(--text)}
.form small{color:var(--muted);font-size:12.5px;font-weight:400}
.form .trap{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.btn{height:48px;display:inline-flex;align-items:center;justify-content:center;width:100%;margin-top:4px;
  background:var(--btn);color:var(--btn-text);border:0;border-radius:11px;font-weight:700;font-size:16px;text-decoration:none}
.btn:hover{opacity:.9}
.err{margin-bottom:16px;padding:10px 12px;border:1px solid var(--text);border-radius:10px;font-size:14px;font-weight:500}
.alt{margin-top:18px;font-size:14px;color:var(--muted);display:flex;flex-wrap:wrap;gap:4px 6px;align-items:center}
.alt a{color:var(--text);font-weight:700}
.alt .forgot{margin-inline-start:auto;font-weight:500;color:var(--muted)}

@media (max-width:640px){
  .hide-sm{display:none}
  .grid{grid-template-columns:repeat(2,1fr);gap:10px}
  .tile{min-height:132px;padding:14px}
  .tile .ic{width:44px;height:44px;font-size:24px}
  .langs a{min-width:28px}
}
@media (prefers-reduced-motion:reduce){.tile{transition:none}.tile:hover{transform:none}}
