:root {
  --bg: #f4f4f5;
  --paper: #ffffff;
  --ink: #122033;
  --muted: #5c6570;
  --line: #e6e8eb;
  --side: #0b1b33;
  --gold: #0b1b33;
  --gold-2: #16324f;
  --ok: #0f766e;
  --err: #b42318;
  --chat: #ececec;
  --log-head: #0b1b33;
  --on-gold: #fff;
}
html.theme-dark {
  color-scheme: dark;
  --bg: #121212;
  --paper: #1a1a1a;
  --ink: #f4f4f5;
  --muted: #9aa4b2;
  --line: #2a2a2a;
  --side: #0b1b33;
  --chat: #2a2a2a;
  --log-head: #16324f;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }
html { height: 100dvh; }
body {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overscroll-behavior: none;
}
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--err); min-height: 1.2em; font-size: 13px; }
.brand { font-weight: 700; letter-spacing: -.04em; font-size: 28px; }
.brand span { color: #16324f; }
.brand-wrap { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
.brand-logo { height: 44px; width: auto; display: block; background: #fff; border-radius: 8px; padding: 4px 6px; }
.auth-logo { height: 72px; margin: 0 auto 12px; padding: 8px 14px; border-radius: 12px; }
.pref-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.chip {
  border: 1px solid var(--line); background: var(--paper); color: inherit;
  border-radius: 999px; padding: 8px 12px; font: inherit; cursor: pointer;
}
.chip.on { background: var(--gold); border-color: var(--gold); font-weight: 700; color: var(--on-gold); }
.auth-card .chip { background: #f4f4f5; color: #122033; border-color: #e6e8eb; }
.auth-card .chip.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.log-table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; }
.log-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 720px; }
.log-table th {
  background: var(--log-head); color: #fff; text-align: left;
  padding: 8px 10px; font-weight: 600; white-space: nowrap;
}
.log-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.log-table tbody tr:nth-child(even) { background: var(--paper); }
.log-table .mono { font-family: ui-monospace, monospace; font-size: 11px; }
.co { margin: 6px 0 0; font-size: 13px; color: #5c6570; }
.side-co { margin: 0 10px 14px; font-size: 11px; line-height: 1.35; color: #8ea0b8; }

.hub-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  margin: 0;
  padding: 8px 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  background: var(--gold);
  color: var(--on-gold);
}
.hub-banner a { color: inherit; text-decoration: underline; font-weight: 700; }
.hub-banner span { font-weight: 600; opacity: .85; }

.auth {
  width: 100%;
  min-height: 100%;
  min-height: 100dvh;
  overflow: auto;
  display: grid;
  place-items: center;
  padding-top: 44px;
  background: radial-gradient(900px 480px at 18% 0%, #16324f 0%, #0b1b33 50%, #071224 100%);
  color: #fff;
}
.auth-card {
  width: min(400px, calc(100% - 32px));
  background: #fff;
  border: 1px solid #e6e8eb;
  padding: 28px;
  border-radius: 16px;
  color: #122033;
}
.auth-card .brand { color: #0b1b33; }
.auth-card form, .inline, .note-edit { display: grid; gap: 10px; }
.auth-card input, .pad input, .pad select, .pad textarea, .composer input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}
.auth-card input { background: #f4f4f5; color: #122033; border-color: #e6e8eb; }
.auth-card .muted, .auth-card .co { color: #5c6570; }
.auth-card .btn.ghost { color: #122033; border-color: #e6e8eb; }

.btn {
  background: var(--gold);
  color: var(--on-gold);
  border: 0;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
.btn:hover { background: var(--gold-2); }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: inherit; }
.icon { border: 0; background: transparent; cursor: pointer; font-size: 18px; }

.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
  overflow: hidden;
  padding-top: 36px;
}
.main { min-width: 0; height: 100%; overflow: hidden; position: relative; }
.tab { display: none; overflow: auto; background: var(--bg); height: 100%; }
.tab.on { display: block; }
#tab-chat.tab.on {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.people {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--paper);
}
.people-label {
  flex-shrink: 0;
  padding: 14px 12px 10px 16px;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.people-new { padding: 4px 8px; font-size: 12px; white-space: nowrap; }
.people-sub {
  margin: 0;
  padding: 10px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pick-checks { display: grid; gap: 6px; max-height: 40vh; overflow: auto; margin: 10px 0; }
.pick-checks .check { font-size: 14px; }
.people-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.side {
  background: var(--side);
  color: #e8eef8;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
}
.side-brand { font-size: 18px; padding: 0; }
.side nav { display: grid; gap: 4px; }
.side nav button {
  text-align: left;
  background: transparent;
  color: #b8c5d6;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
.side nav button.on, .side nav button:hover { background: #16324f; color: #fff; }
.side-user { margin-top: auto; padding: 12px; display: flex; gap: 10px; align-items: center; }
.side-user-meta { display: grid; gap: 4px; min-width: 0; }
.side-user .btn { color: #fff; }
.avatar {
  border-radius: 50%;
  object-fit: cover;
  background: #16324f;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 1;
}
img.avatar { display: block; background: #0b1b33; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.md { width: 40px; height: 40px; font-size: 14px; }
.avatar.xl { width: 88px; height: 88px; font-size: 28px; }
.avatar.ph { background: #16324f; }
.profile-photo { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 12px 0 28px; }
.profile-photo form { display: grid; gap: 10px; min-width: 200px; }
.pad { padding: 22px 24px 40px; }
.narrow { max-width: 560px; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline input, .inline select { width: auto; min-width: 140px; }
.pin-gate { max-width: 380px; display: grid; gap: 10px; margin: 18px 0 8px; }
.pin-gate input[inputmode="numeric"],
#pinBox input, #setPinBox input, #loginPin, #loginPinNew, #loginPinNew2 {
  letter-spacing: .35em; font-size: 20px; text-align: center; font-weight: 600;
}

.person {
  display: flex; width: 100%; text-align: left; gap: 10px; align-items: center;
  padding: 10px 12px; border: 0; background: transparent; cursor: pointer; font: inherit;
  min-width: 0;
}
.person .avatar.sm { width: 48px; height: 48px; font-size: 16px; }
.person-txt { min-width: 0; flex: 1; display: grid; gap: 2px; text-align: left; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.person-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); font-weight: 400; }
.person-meta { display: grid; justify-items: end; gap: 4px; flex-shrink: 0; }
.person-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.person-unread {
  min-width: 18px; height: 18px; border-radius: 9px; background: #25d366; color: #fff;
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 5px; line-height: 1;
}
.person-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.person-av { position: relative; flex-shrink: 0; }
.person-av .dot { position: absolute; right: 0; bottom: 2px; border: 2px solid var(--paper); }
.call-mini {
  border: 0; background: var(--gold); color: var(--on-gold); font-weight: 700;
  padding: 0 12px; cursor: pointer; font-size: 12px;
  flex-shrink: 0; min-width: 56px;
}
.call-mini:disabled, .call-mini.off { opacity: .45; }
.loc-mini {
  border: 0; background: #128c7e; color: #fff; font-weight: 700;
  padding: 0 10px; cursor: pointer; font-size: 16px;
  flex-shrink: 0; min-width: 44px;
}
.btn.loc-get { background: #128c7e; color: #fff; border-color: #128c7e; }
.call-ov { position: fixed; inset: 0; background: rgba(11,27,51,.72); z-index: 5000; display: grid; place-items: center; }
.call-card { background: var(--paper); padding: 28px 32px; border-radius: 16px; text-align: center; min-width: 280px; }
.call-card h2 { margin: 8px 0 0; }
.person.on { background: #f0f0f0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #bbb; }
.dot.on { background: #12b886; }
.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.chat-head {
  flex-shrink: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.chat-head-txt { min-width: 0; flex: 1; }
.chat-head-txt strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-back { display: none; font-size: 28px; line-height: 1; width: 36px; height: 36px; flex-shrink: 0; }
.topbar { display: none; }
.nav-scrim { display: none; }
.msgs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bubble {
  max-width: 72%;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  position: relative;
}
.bubble.mine { align-self: flex-end; background: var(--chat); }
.bubble.editing { outline: 2px solid var(--gold); }
.bubble.deleted { opacity: .78; }
.bubble .cap.del { font-style: italic; color: var(--muted); }
.bubble .edited { font-style: italic; }
.msg-more {
  position: absolute; top: 2px; right: 4px;
  width: 22px; height: 22px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1;
  border-radius: 4px;
}
.bubble.mine .msg-more { right: 4px; }
.msg-more:hover { background: rgba(0,0,0,.08); }
.msg-menu {
  position: fixed; z-index: 230;
  min-width: 140px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.18);
  padding: 6px; display: grid; gap: 2px;
}
.msg-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 10px 12px; font: inherit; cursor: pointer; border-radius: 8px;
}
.msg-menu button:hover { background: #f3f3f3; }
.msg-menu [data-act="delete"] { color: #b42318; }
.edit-bar {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line);
  background: #f3f3f3; border-left: 4px solid var(--gold);
}
.edit-bar.hidden { display: none; }
.edit-bar-txt { min-width: 0; }
.edit-bar-txt strong { display: block; font-size: 12px; }
.edit-bar-txt span { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble.mine { align-self: flex-end; background: var(--chat); }
.bubble small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.bubble .meta { display: flex; justify-content: flex-end; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.ticks { color: #53bdeb; letter-spacing: -2px; }
.bubble.media { padding: 6px 6px 8px; max-width: 280px; }
.media-card { overflow: hidden; border-radius: 10px; background: #111; }
.img-preview { display: block; width: 100%; padding: 0; border: 0; background: #111; cursor: zoom-in; }
.img-preview img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.media-foot { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; font-size: 11px; background: rgba(0,0,0,.45); color: #eee; }
.media-foot a { color: var(--gold-2); }
.bubble .cap { padding: 6px 8px 0; }
.file-card { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; background: #f3efe6; border: 1px solid var(--line); }
button.file-card { width: 100%; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.linkish { border: 0; background: none; color: #1d4ed8; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
.file-ico { font-size: 22px; }
.img-view { position: fixed; inset: 0; z-index: 220; background: rgba(10,8,6,.92); display: grid; place-items: center; padding: 24px; }
.img-view img { max-width: min(96vw, 1100px); max-height: 90vh; object-fit: contain; border-radius: 8px; }
.img-view-x { position: absolute; top: 16px; right: 18px; background: transparent; border: 0; color: #fff; font-size: 28px; cursor: pointer; }
.composer {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  flex-shrink: 0;
}
.composer input[id="chatInput"] { flex: 1; }
.plus { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--on-gold); font-size: 22px; font-weight: 700; line-height: 1; }
.attach-sheet {
  position: absolute; left: 10px; bottom: 58px; z-index: 40;
  background: #1f2c33; color: #e9edef; border-radius: 16px;
  padding: 16px 14px 12px; display: grid; grid-template-columns: repeat(4, 76px); gap: 14px 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.attach-item {
  display: grid; justify-items: center; gap: 6px; background: none; border: 0; color: #e9edef;
  font: inherit; font-size: 11px; cursor: pointer; line-height: 1.2; text-align: center;
}
.attach-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; color: #fff; }
.c-doc { background: #7f66ff; }
.c-media { background: #007bfc; }
.c-cam { background: #d3396d; }
.c-audio { background: #f26522; }
.c-contact { background: #00a5f4; }
.c-poll { background: #ffb300; }
.c-loc { background: #1faa61; }
.c-live { background: #0d9f5f; }
.pick-ov { position: fixed; inset: 0; z-index: 210; background: rgba(10,8,6,.45); display: grid; place-items: center; padding: 20px; }
.pick-card { background: var(--paper); border-radius: 14px; padding: 16px; width: min(420px, 100%); max-height: 80vh; overflow: auto; }
.loc-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #eef6f0; }
.loc-card .loc-pin { padding: 18px 12px 8px; font-size: 28px; }
.loc-card p { margin: 0 12px 12px; }
.loc-card.live { background: #e7f8ee; }
.poll-opt { display: block; width: 100%; text-align: left; margin: 6px 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; }
.poll-opt.on { border-color: var(--gold); background: #f0f0f0; }
.contact-card { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f4f4f5; }
.chat-audio { width: 100%; margin-top: 6px; }
.chat-video { width: 100%; max-height: 280px; border-radius: 10px; background: #111; }

.cards { display: grid; gap: 10px; margin-top: 16px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.st {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px; color: #fff;
}
.st.open { background: #d97706; }
.st.doing { background: #2563eb; }
.st.done { background: #0f766e; }
.card.status-open { border-left: 6px solid #d97706; background: #fff8ee; }
.card.status-doing { border-left: 6px solid #2563eb; background: #eef4ff; }
.card.status-done { border-left: 6px solid #0f766e; background: #eefaf6; }
.tid { font-family: ui-monospace, monospace; font-weight: 800; color: #7c5c12; }
.task-body { white-space: pre-wrap; margin: 8px 0; }
.late { color: #b42318; font-weight: 700; }
.task-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.task-form { display: grid; gap: 10px; margin: 12px 0 8px; max-width: 720px; }
.task-form textarea { width: 100%; min-height: 110px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.due-lab { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.totp-box { margin-top: 14px; display: grid; gap: 10px; }
.totp-box img { width: 180px; height: 180px; background: #fff; border-radius: 12px; }
.totp-row { display: flex; align-items: center; gap: 18px; margin: 12px 0; }
.totp-code {
  font-size: 42px; font-weight: 800; letter-spacing: .18em; font-family: ui-monospace, monospace;
  background: transparent; border: 0; padding: 0; cursor: pointer; color: inherit;
}
.totp-ring { width: 42px; height: 42px; }
.amz-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.amz-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.amz-card .totp-code { font-size: 28px; letter-spacing: .14em; padding: 6px 0; width: 100%; text-align: left; }
.totp-code.copied { color: #0f766e; }
.amz-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.amz-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.amz-actions .btn { padding: 6px 10px; font-size: 12px; }
.amz-store { font-size: 15px; line-height: 1.3; padding-top: 4px; }
.amz-share { margin-top: 10px; font-size: 13px; }
.amz-share-by { margin: 8px 0 0; }
.amz-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--gold);
  color: var(--on-gold);
  padding: 2px 6px;
  border-radius: 6px;
  vertical-align: middle;
}
.copy-txt { background: transparent; border: 0; padding: 0; font: inherit; cursor: pointer; text-align: left; word-break: break-all; }
.acops-rate {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.acops-rate ol { margin: 8px 0 0; padding-left: 22px; }
.acops-ss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.acops-ss-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
}
.acops-ss-field input { font-weight: 400; }
.acops-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.acops-thumbs a {
  width: 88px;
  text-align: center;
  font-size: 11px;
  color: inherit;
  text-decoration: none;
}
.acops-thumbs img {
  width: 88px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
  margin-bottom: 4px;
}
.acops-exempt {
  margin: 16px 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.acops-exempt .pick-checks { margin-top: 8px; display: grid; gap: 6px; }
.sms-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.sms-phone {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 8px 0;
}
.sms-phone .copy-txt { font: inherit; font-weight: 700; }
.hyo-country-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.hyo-country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.hyo-country-card {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg, #fff);
  cursor: pointer;
}
.hyo-country-card:hover { border-color: #3b82f6; }
.hyo-flag { font-size: 22px; }
.hyo-crumb {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--muted, #64748b);
}
.hyo-op-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.hyo-op-title { margin: 0; flex: 1; font-size: 1.25rem; }
.hyo-op-search {
  min-width: 180px;
  flex: 1;
  max-width: 280px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg, #fff);
}
.hyo-op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.hyo-op-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.hyo-op-top { display: flex; justify-content: space-between; align-items: center; }
.hyo-op-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.hyo-op-price { color: #0f766e; font-size: 1.05rem; }
.hyo-op-card h3 { margin: 4px 0 0; font-size: 1.05rem; }
.hyo-avail { font-size: 13px; margin: 0; }
.hyo-buy { width: 100%; margin-top: 8px; }
.ezy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.ezy-card {
  display: grid;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.ezy-result {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  max-height: 360px;
  font-size: 13px;
}
.loc-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 8px 0 12px; }
.loc-admin { margin: 12px 0 28px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.loc-staff { grid-template-columns: 160px 1fr; align-items: start; }
.loc-staff-locs { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.ezy-emp {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.ezy-svcs { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 8px 0 0 22px; }
.note-item { display: block; width: 100%; text-align: left; padding: 10px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; margin: 6px 0; cursor: pointer; font: inherit; }
.notes-layout { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
.note-edit textarea { min-height: 280px; resize: vertical; }
.note-edit-head { display: grid; gap: 8px; }
.note-share-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.file-table { margin-top: 14px; display: grid; gap: 8px; }
.file-row, .user-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.user-row { grid-template-columns: auto 1fr 1fr auto auto auto auto; align-items: center; }
.sounds { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.sounds button {
  padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); cursor: pointer; font: inherit;
}
.sounds button.on { background: var(--gold); border-color: var(--gold); font-weight: 700; color: var(--on-gold); }
.row { display: flex; gap: 8px; }
html.theme-dark .auth-card input { background: #071224; color: #f5f7fb; }
html.theme-dark .person.on { background: #2a2a2a; }
html.theme-dark .person-unread { background: #22c55e; }
html.theme-dark .bubble.mine { background: var(--chat); }
html.theme-dark .poll-opt, html.theme-dark .note-item, html.theme-dark .file-card { background: var(--paper); color: var(--ink); }
html.theme-dark .sounds button { background: var(--paper); color: var(--ink); }
html.theme-dark .pad input,
html.theme-dark .pad select,
html.theme-dark .pad textarea,
html.theme-dark .composer input,
html.theme-dark .task-form textarea {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
html.theme-dark .pad input::placeholder,
html.theme-dark .pad textarea::placeholder,
html.theme-dark .task-form textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
html.theme-dark .card.status-open { background: #2a2218; }
html.theme-dark .card.status-doing { background: #182233; }
html.theme-dark .card.status-done { background: #15241f; }
html.theme-dark .card h3,
html.theme-dark .card .task-body { color: var(--ink); }
html.theme-dark .card .muted { color: var(--muted); }
html.theme-dark .card .btn.ghost { color: var(--ink); border-color: var(--line); }
html.theme-dark .tid { color: #7eb6ff; }
html.theme-dark .late { color: #f87171; }
html.theme-dark .loc-card, html.theme-dark .loc-card.live { background: #15241f; color: var(--ink); }
html.theme-dark .contact-card { background: var(--paper); color: var(--ink); }

@media (max-width: 860px) {
  .notes-layout, .user-row { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  html, body, .app { height: var(--vvh, 100dvh); }
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .main { min-height: 0; height: auto; }
  .topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    padding-top: max(6px, env(safe-area-inset-top));
    background: var(--side);
    color: #e8eef8;
    flex-shrink: 0;
    min-height: 48px;
  }
  .topbar .icon { color: #fff; font-size: 22px; width: 40px; height: 40px; }
  .topbar strong { font-size: 16px; letter-spacing: -.02em; }
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 245;
    background: rgba(10, 8, 6, .45);
  }
  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, 88vw);
    z-index: 250;
    transform: translateX(-110%);
    transition: transform .2s ease;
    height: 100dvh;
    max-height: var(--vvh, 100dvh);
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    overflow: auto;
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .side.open { transform: none; }
  .side-co { display: none; }
  .side nav { display: grid; overflow: visible; }
  .side-user { margin-top: auto; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-layout:not(.show-thread) .chat-main { display: none; }
  .chat-layout.show-thread .people { display: none; }
  .chat-back { display: inline-flex; align-items: center; justify-content: center; }
  .pad { padding: 14px 14px 28px; }
  .composer {
    padding: 8px 10px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .attach-sheet {
    left: 8px;
    right: 8px;
    width: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 4px;
    padding: 12px 8px 10px;
  }
  .attach-item { font-size: 10px; }
  .attach-ico { width: 44px; height: 44px; font-size: 20px; }
  .bubble { max-width: 88%; }
  .bubble.media { max-width: 86%; }
  .totp-code { font-size: 28px; letter-spacing: .1em; }
  .amz-card .totp-code { font-size: 22px; }
  .amz-codes { grid-template-columns: 1fr; }
  .inline { flex-direction: column; align-items: stretch; }
  .inline input, .inline select { width: 100%; min-width: 0; }
  .file-row, .user-row { grid-template-columns: 1fr; }
  .notes-layout { grid-template-columns: 1fr; }
  .call-card { min-width: 0; width: min(calc(100% - 24px), 360px); padding: 20px; }
  .auth { padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom); }
  .auth-card { width: min(400px, 100%); padding: 22px 18px; }
  .pad input, .pad select, .pad textarea, .composer input, .auth-card input,
  .task-form textarea, select, textarea, input {
    font-size: 16px;
  }
  .chat-head { padding: 8px 10px; }
  .msgs { padding: 10px; -webkit-overflow-scrolling: touch; }
  .people-scroll { -webkit-overflow-scrolling: touch; }
  .btn, .side nav button, .person { min-height: 44px; }
  .pick-ov { padding: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .img-view { padding: 12px; }
}

.app-lock {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  background: radial-gradient(900px 480px at 18% 0%, #16324f 0%, #0b1b33 50%, #071224 100%);
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
}
.app-lock.hidden { display: none !important; }
.app-lock-card {
  width: min(380px, 100%);
  background: #fff;
  border: 1px solid #e6e8eb;
  padding: 28px;
  border-radius: 16px;
  color: #122033;
  display: grid;
  gap: 12px;
  text-align: center;
}
.app-lock-card .brand { color: #0b1b33; }
.app-lock-card form { display: grid; gap: 10px; }
.app-lock-card input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e6e8eb;
  background: #f4f4f5;
  color: #122033;
  font: inherit;
  font-size: 22px;
  letter-spacing: .28em;
  text-align: center;
}
