/* Quanify Mail — the trade-workspace system (workspace-ui.css) applied to a
   mailbox: black rail and head bands, #0b0b0b workspace, #111 cards, 8/6px
   radii, Inter, blue as the only accent and colour meaning state. */
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --shell: #000; --ws: #0b0b0b; --card: #111; --control: #1c1c1c; --hover: #292929; --selected: #383838;
  --border: #232323; --text: #ededed; --muted: #b5b5b5; --subtle: #777; --head: #000;
  --blue: #3d9cff; --positive: #65ba8b; --danger: #e5645f; --wash: rgba(255,255,255,.035);
  --rail-text: #ededed; --rail-muted: #b5b5b5; --rail-subtle: #777; --rail-hover: #151515; --rail-active: #1c1c1c; --rail-border: #232323;
  --head-text: #ededed; --head-muted: #888; --field: #1c1c1c; --field-border: #2a2a2a; --pop: #151515; --pop-border: #2a2a2a;
  --radius: 8px; --radius-sm: 6px; --rail: 232px; --list: 400px; --head-h: 53px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
html.is-light {
  color-scheme: light;
  --ws: #fdfdfc; --card: #fff; --control: #f2f1ed; --hover: #ebe9e3; --selected: #e3e1da;
  --border: rgba(38,37,30,.1); --text: #26251e; --muted: rgba(38,37,30,.72); --subtle: rgba(38,37,30,.55);
  --blue: #0090ff; --wash: rgba(38,37,30,.035);
  --shell: #f6f6f4; --head: #ffffff;
  --rail-text: #26251e; --rail-muted: rgba(38,37,30,.72); --rail-subtle: rgba(38,37,30,.5); --rail-hover: #ecebe7; --rail-active: #e4e2dd; --rail-border: rgba(38,37,30,.1);
  --head-text: #26251e; --head-muted: rgba(38,37,30,.5); --field: #f2f1ed; --field-border: rgba(38,37,30,.12); --pop: #ffffff; --pop-border: rgba(38,37,30,.12);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 13px/1.45 var(--font); color: var(--text); background: var(--ws); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue); text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--blue) 35%, transparent); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--selected); border: 3px solid transparent; background-clip: padding-box; border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── controls ─────────────────────────────────────────────────────────── */
.qm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--control); color: var(--text); cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.qm-btn:hover:not(:disabled) { background: var(--hover); }
.qm-btn:disabled { opacity: .5; cursor: default; }
.qm-btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 500; }
.qm-btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--blue) 88%, #fff); }
.qm-btn--ghost { background: transparent; border-color: transparent; color: var(--muted); }
.qm-btn--ghost:hover:not(:disabled) { color: var(--text); background: var(--control); }
.qm-btn--block { width: 100%; height: 36px; }
.qm-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--subtle); cursor: pointer; transition: background .12s, color .12s; }
.qm-icon-btn:hover { color: var(--text); background: var(--control); }
.qm-icon-btn.is-on { color: var(--blue); }
.qm-icon-btn svg, .qm-btn svg { width: 16px; height: 16px; flex: none; }
.qm-field { display: flex; flex-direction: column; gap: 5px; }
.qm-field label { font-size: 12px; color: var(--muted); }
.qm-input, .qm-select, .qm-textarea { width: 100%; height: 34px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--control); color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s; }
.qm-input::placeholder, .qm-textarea::placeholder { color: var(--subtle); }
.qm-input:focus, .qm-select:focus, .qm-textarea:focus { border-color: var(--blue); }
.qm-textarea { height: auto; min-height: 160px; padding: 10px; resize: vertical; line-height: 1.5; }
.qm-select { appearance: none; padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.qm-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; font-size: 11px; font-weight: 600; background: var(--control); color: var(--muted); font-variant-numeric: tabular-nums; }
.qm-nav-item.is-active .qm-badge { background: color-mix(in srgb, var(--blue) 22%, transparent); color: var(--blue); }

/* ── layout ───────────────────────────────────────────────────────────── */
.qm { display: grid; grid-template-columns: var(--rail) var(--list) 1fr; height: 100vh; height: 100dvh; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--shell); }
.qm-rail { background: var(--shell); border-right: 1px solid var(--rail-border); display: flex; flex-direction: column; min-height: 0; }
.qm-rail__body { flex: 1; min-height: 0; overflow-y: auto; }
.qm-list { background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.qm-reader { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--ws); }
.qm-head { height: var(--head-h); min-height: var(--head-h); display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--head); color: var(--head-text); }
.qm-head--reader { background: transparent; color: var(--text); padding: 0 20px; }
.qm-head__title { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-head__actions { display: flex; align-items: center; gap: 2px; }

/* rail */
/* The workspace's own artwork, painted as masks in the rail's ink so the
   shape comes from the file and the colour from the surface it sits on. */
.qm-lockup, .qm-mark { display: block; background-color: currentColor; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; flex: none; }
.qm-lockup { height: 46px; width: calc(46px * 381.87 / 113.9); color: var(--rail-text); -webkit-mask-image: url("/assets/quanify-wordmark.svg"); mask-image: url("/assets/quanify-wordmark.svg"); }
.qm-lockup--top { height: 22px; width: calc(22px * 381.87 / 113.9); color: var(--text); }
.qm-mark { width: 44px; height: 44px; color: var(--text); -webkit-mask-image: url("/assets/quanify-mark.svg"); mask-image: url("/assets/quanify-mark.svg"); }
.qm-mark--sm { width: 16px; height: 16px; display: inline-block; }
.qm-head--brand { justify-content: center; padding: 0; height: 84px; min-height: 84px; background: var(--shell); border-bottom: 0; }
.qm-rail__compose { padding: 12px 12px 4px; }
.qm-rail__compose .qm-btn--block { height: 32px; }
.qm-rail__section { padding: 8px 8px 0; }
.qm-rail__section + .qm-rail__section { padding-top: 14px; }
.qm-rail__label { padding: 8px 8px 4px; font-size: 11px; color: var(--rail-subtle); letter-spacing: .01em; }
.qm-nav { display: flex; flex-direction: column; gap: 1px; }
.qm-nav-item { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 10px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--rail-muted); cursor: pointer; text-align: left; width: 100%; text-decoration: none; transition: background .12s, color .12s; }
.qm-nav-item svg { width: 15px; height: 15px; color: var(--rail-subtle); flex: none; }
.qm-rail .qm-badge { background: var(--rail-active); color: var(--rail-muted); }
.qm-nav-item:hover { background: var(--rail-hover); color: var(--rail-text); }
.qm-nav-item.is-active { background: var(--rail-active); color: var(--rail-text); }
.qm-rail__links { padding: 6px 8px; border-top: 1px solid var(--rail-border); }
.qm-nav-item.is-active svg { color: var(--blue); }
.qm-nav-item span:first-of-type { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-rail__foot { padding: 10px 12px; border-top: 1px solid var(--rail-border); display: flex; align-items: center; gap: 8px; color: var(--rail-subtle); font-size: 12px; }
.qm-rail__user { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; color: var(--rail-muted); }
.qm-account { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; color: var(--rail-muted); }
.qm-account:hover { background: var(--rail-hover); color: var(--rail-text); }
.qm-rail__foot { position: relative; padding: 10px 8px 12px; }
.qm-menu-pop { position: absolute; left: 8px; right: 8px; bottom: calc(100% - 4px); background: var(--pop); border: 1px solid var(--pop-border); border-radius: var(--radius-sm); padding: 4px; z-index: 20; }
.qm-menu-pop__item { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 10px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--rail-muted); cursor: pointer; text-align: left; }
.qm-menu-pop__item svg { width: 15px; height: 15px; color: var(--rail-subtle); }
.qm-menu-pop__item:hover { background: var(--rail-hover); color: var(--rail-text); }
.qm-menu-pop__item:hover svg { color: var(--rail-text); }
.qm-status { width: 7px; height: 7px; border-radius: 50%; background: var(--subtle); flex: none; }
.qm-status.is-live { background: var(--positive); }

/* list */
.qm-search { flex: 1; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--field); border: 1px solid var(--field-border); color: var(--head-text); }
.qm-search:focus-within { border-color: var(--blue); }
.qm-search svg { width: 14px; height: 14px; color: var(--head-muted); flex: none; }
.qm-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: inherit; }
.qm-search input::placeholder { color: var(--head-muted); }
.qm-head .qm-icon-btn { color: var(--head-muted); }
.qm-head .qm-icon-btn:hover { background: var(--field); color: var(--head-text); }
.qm-theme__sun { display: none; }
html.is-light .qm-theme__sun { display: block; }
html.is-light .qm-theme__moon { display: none; }
.qm-theme--list { display: none; }
.qm-list__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.qm-row { position: relative; display: grid; grid-template-columns: 10px 1fr auto; column-gap: 10px; align-items: start; padding: 10px 14px 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; background: transparent; width: 100%; border-left: 0; border-right: 0; border-top: 0; text-align: left; color: inherit; transition: background .1s; }
.qm-row:hover { background: var(--wash); }
.qm-row.is-selected { background: var(--control); }
.qm-row__dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; background: transparent; }
.qm-row.is-unread .qm-row__dot { background: var(--blue); }
.qm-row__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qm-row__from { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qm-row.is-unread .qm-row__from { color: var(--text); font-weight: 600; }
.qm-row__count { color: var(--subtle); font-weight: 400; font-size: 12px; }
.qm-row__subject { color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qm-row.is-unread .qm-row__subject { font-weight: 500; }
.qm-row__snippet { color: var(--subtle); font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qm-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qm-row__time { font-size: 11.5px; color: var(--subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qm-row__icons { display: flex; gap: 4px; color: var(--subtle); }
.qm-row__icons svg { width: 13px; height: 13px; }
.qm-row__icons .is-starred { color: #ffd60a; }
.qm-row__hover { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: none; gap: 2px; padding: 2px; border-radius: var(--radius-sm); background: var(--control); border: 1px solid var(--border); }
.qm-row__hover .qm-icon-btn { width: 28px; height: 28px; }
@media (hover: hover) { .qm-row:hover .qm-row__hover { display: inline-flex; } .qm-row:hover .qm-row__side { visibility: hidden; } }
.qm-skel { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 14px 14px 14px 24px; border-bottom: 1px solid var(--border); }
.qm-skel span { display: block; height: 10px; border-radius: 5px; background: var(--wash); animation: qm-pulse 1.2s ease-in-out infinite; }
.qm-skel__a { width: 42%; } .qm-skel__b { width: 78%; } .qm-skel__c { width: 60%; opacity: .6; }
@keyframes qm-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.qm-row__mailbox { font-size: 11.5px; color: var(--subtle); font-weight: 400; }
.qm-list__more { display: flex; justify-content: center; padding: 12px; }
.qm-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; min-height: 240px; color: var(--subtle); text-align: center; padding: 24px; }
.qm-empty strong { color: var(--subtle); font-weight: 400; }

/* reader */
.qm-reader__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.qm-msg { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qm-msg__head { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; cursor: pointer; }
.qm-msg.is-collapsed .qm-msg__head { border-bottom: 0; }
.qm-msg.is-out .qm-msg__who { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.qm-msg__from { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.qm-msg__name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-msg__addr { color: var(--subtle); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-msg__to { color: var(--subtle); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-msg__meta { display: flex; align-items: center; gap: 2px; color: var(--subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.qm-msg__meta time { margin-right: 6px; white-space: nowrap; }
.qm-msg__snippet { padding: 0 16px 12px 16px; color: var(--subtle); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qm-msg:not(.is-collapsed) .qm-msg__snippet { display: none; }
.qm-msg__body { border-top: 1px solid var(--border); }
.qm-msg.is-collapsed .qm-msg__body { display: none; }
.qm-msg__text { padding: 18px 20px 22px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; }
.qm-msg__text .q { color: var(--subtle); border-left: 2px solid var(--border); padding-left: 10px; }
.qm-msg__frame { display: block; width: 100%; height: 120px; border: 0; background: var(--card); transition: height .12s ease-out; }
.qm-msg__bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: var(--wash); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.qm-msg__bar button { height: 26px; padding: 0 9px; font-size: 12px; }
.qm-msg__auth { display: inline-flex; gap: 6px; margin-left: auto; color: var(--subtle); }
.qm-msg__auth b { font-weight: 500; color: var(--danger); }
.qm-msg__atts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.qm-att { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--control); color: var(--text); max-width: 280px; }
.qm-att:hover { background: var(--hover); }
.qm-att svg { width: 15px; height: 15px; color: var(--subtle); flex: none; }
.qm-att span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.qm-att small { color: var(--subtle); flex: none; }
.qm-reply { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.qm-reply:has(textarea) { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; align-items: stretch; }
.qm-reply__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qm-reply__row .qm-select { width: auto; height: 30px; }
.qm-reply__to { color: var(--muted); font-size: 12px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qm-reply__foot { display: flex; align-items: center; gap: 8px; }
.qm-reply__foot .qm-reply .qm-textarea { min-height: 120px; }

/* compose modal (Add Trader popup contract) */
.qm-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 40; }
.qm-modal { width: min(680px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.35); overflow: hidden; }
.qm-modal__head { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--border); background: var(--head); color: var(--head-text); }
.qm-modal__head h2 { flex: 1; margin: 0; font-size: 14px; font-weight: 500; }
.qm-modal__head .qm-icon-btn { color: var(--head-muted); }
.qm-modal__head .qm-icon-btn:hover { background: var(--field); color: var(--head-text); }
.qm-modal__body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.qm-modal__row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; }
.qm-modal__row label { color: var(--subtle); font-size: 12px; }
.qm-modal__foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--wash); }
.qm-modal__error { color: var(--danger); font-size: 12px; }

/* team + password */
.qm-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.qm-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.qm-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.qm-table th { text-align: left; font-weight: 500; font-size: 11.5px; color: var(--head-muted); background: var(--head); padding: 0 10px; height: 32px; white-space: nowrap; }
.qm-table td { padding: 8px 10px; border-top: 1px solid var(--border); vertical-align: middle; }
.qm-table tr.is-disabled td { opacity: .5; }
.qm-team__who { display: flex; flex-direction: column; gap: 1px; min-width: 140px; }
.qm-team__who span { color: var(--subtle); font-size: 11.5px; }
.qm-team__actions { white-space: nowrap; text-align: right; }
.qm-select--sm { height: 28px; font-size: 12px; padding-right: 22px; }
.qm-check { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.qm-check input { accent-color: var(--blue); margin: 0; }
.qm-tag { font-size: 11px; color: var(--subtle); padding: 2px 7px; border-radius: 4px; background: var(--control); }
.qm-team__add { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.qm-team__grid { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr 110px; gap: 8px; }
@media (max-width: 700px) { .qm-team__grid { grid-template-columns: 1fr 1fr; } }
.qm-team__boxes { display: flex; flex-wrap: wrap; gap: 4px 0; }

/* toasts */
.qm-toasts { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 60; pointer-events: none; }
.qm-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--pop); color: var(--text); border: 1px solid var(--pop-border); font-size: 12.5px; }
.qm-toast.is-error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.qm-toast button { height: 24px; padding: 0 8px; font-size: 12px; }

/* mobile: single column, reader pushes over the list */
.qm-menu, .qm-back { display: none; }
@media (max-width: 960px) {
  .qm { grid-template-columns: 1fr; }
  .qm-rail { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 30; transform: translateX(-100%); transition: transform .18s ease-out; }
  .qm.is-rail-open .qm-rail { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .qm-list { border-right: 0; }
  .qm-reader { display: none; }
  .qm[data-view="reader"] .qm-list { display: none; }
  .qm[data-view="reader"] .qm-reader { display: flex; }
  .qm-menu, .qm-back, .qm-theme--list { display: inline-flex; }
  .qm-rail { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .qm-reader__scroll { padding: 12px; }
  .qm-msg__head { grid-template-columns: 1fr; gap: 4px; }
  .qm-msg__meta { justify-content: space-between; }
  .qm-msg__meta time { margin: 0; }
  .qm-msg__auth { display: none; }
}

/* ── auth page ────────────────────────────────────────────────────────── */
.qm-auth { overflow: auto; display: flex; flex-direction: column; background: var(--ws); }
.qm-auth__top { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; margin-top: env(safe-area-inset-top, 0px); }
.qm-auth .qm-brand { color: var(--text); }
.qm-auth__main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 64px; }
.qm-auth__card { width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 28px 22px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; }
.qm-auth__card > .qm-mark { margin-bottom: 2px; }
.qm-auth__title { margin: 0 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.qm-auth__error { margin: 0; width: 100%; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); font-size: 12.5px; }
.qm-auth__fine { margin: 6px 0 0; color: var(--subtle); font-size: 12px; line-height: 1.5; }
.qm-auth__form { width: 100%; display: flex; flex-direction: column; gap: 12px; text-align: left; margin-top: 6px; }
.qm-auth__form .qm-input { height: 38px; }
.qm-auth__form .qm-btn--block { height: 38px; margin-top: 2px; }
.qm-auth__pw { position: relative; }
.qm-auth__pw .qm-input { padding-right: 38px; }
.qm-auth__pw .qm-icon-btn { position: absolute; right: 4px; top: 4px; }
.qm-auth__divider { width: 100%; display: flex; align-items: center; gap: 10px; color: var(--subtle); font-size: 11.5px; margin: 4px 0; }
.qm-auth__divider::before, .qm-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.qm-auth .qm-btn--block .qm-mark--sm { margin-right: 2px; }
