/* ---------- web version: sign-in screens & account box ---------- */
#auth-root:empty { display: none; }
.auth-bg { position: fixed; inset: 0; z-index: 2000; background: var(--side); display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--panel); border-radius: 14px; width: 100%; max-width: 400px; padding: 30px 30px 26px; box-shadow: 0 24px 70px rgba(0,0,0,.4); text-align: center; }
.auth-logo { height: 56px; margin-bottom: 6px; }
.auth-co { font-weight: 700; font-size: 20px; margin-bottom: 18px; }
.auth-app { font-size: 11px; letter-spacing: .14em; color: var(--muted); margin-bottom: 18px; }
.auth-f { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.auth-f label { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 6px; }
.auth-f input { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); color: var(--text); font-size: 15px; }
.auth-f .btn { justify-content: center; padding: 10px; margin-top: 12px; font-size: 15px; }
.auth-f a { font-size: 12.5px; text-align: center; margin-top: 10px; }
.auth-err { color: var(--bad); font-size: 12.5px; min-height: 16px; text-align: center; }
.auth-msg { background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: 9px 11px; font-size: 13px; }
.auth-ok { font-size: 18px; font-weight: 700; text-align: center; }
.acct { margin: 6px 10px 10px; padding: 10px 12px; border-radius: 9px; background: var(--side-2); color: var(--side-text); }
.acct-n { font-weight: 650; color: #fff; }
.acct-r { font-size: 11.5px; color: var(--side-muted); }
.acct-b { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 7px; font-size: 12px; }
.acct-b a { color: #9fc3ec; cursor: pointer; }
.acct-b a:hover { color: #fff; }
/* phones and tablets */
@media (max-width: 820px) {
  body { overflow: auto; }
  #app { flex-direction: column; height: auto; min-height: 100vh; }
  #main { overflow: visible; }
  /* sidebar becomes a slim top bar */
  #sidebar { width: 100% !important; padding: 10px 12px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; overflow: visible; position: sticky; top: 0; z-index: 50; }
  #sidebar .brand, #sidebar .side-search, #sidebar .side-foot, #sidebar .nav-label { display: none !important; }
  #sidebar .nav-item { margin: 0; padding: 6px 10px; }
  .acct { margin: 0 0 0 auto; padding: 6px 10px; display: flex; align-items: center; gap: 10px; }
  .acct-r { display: none; }
  .acct-b { margin: 0; }
  .page { padding: 0 12px 40px; }
  .page-head { gap: 10px; }
  .vessel-hero .hero-img { width: 56px; height: 56px; }
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr !important; }
  .grid.g4 { grid-template-columns: 1fr 1fr !important; }
  .tabs { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; }
  .tabs .tab { white-space: nowrap; }
  .mws, .docs-layout, .tl { grid-template-columns: minmax(0, 1fr) !important; }
  .mws > *, .docs-layout > *, .mmain, #main, .page { min-width: 0; max-width: 100vw; }
  .seg { flex-wrap: wrap; }
  html, body { overflow-x: hidden; }
  .mtree { position: static; max-height: 260px; }
  .card { overflow-x: auto; }
  table.t { min-width: 560px; }
  .toolbar { flex-wrap: wrap; }
  .search-inline { width: 100% !important; }
  .modal { width: 100% !important; max-height: 100vh; border-radius: 0; }
  .overlay { padding: 0 !important; }
  .drawer { width: 100% !important; }
  .doc-kv { grid-template-columns: 1fr; }
  .crew-ov { grid-template-columns: 1fr 1fr 1fr; }
  .pv { height: 100vh; border-radius: 0; } .pv-overlay { padding: 0; }
}
