/* Sign-in, account and support pages. Every colour, radius and type size comes from the Orbvane kit tokens
   (packages/kit/tokens/tokens.css, linked before this file), so each app's brand applies as is. The fallbacks after
   each var() are plain greys, only so a page stays legible if the tokens stylesheet fails to load. Compact scale:
   14 px body, 20 px title, 34 px controls; text fields go to 16 px on phones so iOS does not zoom. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper, #f4f4f4);
  color: var(--ink, #1a1a1a);
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: var(--fs-body, 14px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent, #333); }
h1 { font-size: var(--fs-title, 20px); font-weight: 650; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 650; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
p { margin: 0; }
[hidden] { display: none !important; }

.ob-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ob-main { flex: 1; }

/* header */
.ob-top { background: var(--surface, #fff); border-bottom: 1px solid var(--line, #ddd); position: sticky; top: 0; z-index: 10; }
.ob-top-row { display: flex; align-items: center; height: 56px; gap: 16px; }
.ob-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--ink, #1a1a1a); text-decoration: none; }
.ob-logo { display: inline-flex; width: 26px; height: 26px; }
.ob-logo svg { width: 100%; height: 100%; }
.ob-nav { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ob-nav > a:not(.ob-btn) { color: var(--ink-2, #555); text-decoration: none; font-weight: 600; }
.ob-nav > a:not(.ob-btn):hover { color: var(--ink, #1a1a1a); }
.ob-theme { width: 34px; height: 34px; border-radius: var(--radius-pill, 999px); border: 1px solid var(--line, #ddd); background: transparent;
  color: var(--ink-2, #555); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ob-theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ob-theme .ob-moon, .ob-theme[data-mode="dark"] .ob-sun { display: block; }
.ob-theme .ob-sun, .ob-theme[data-mode="dark"] .ob-moon { display: none; }

/* account menu */
.ob-pf { position: relative; }
.ob-pf > summary { list-style: none; cursor: pointer; }
.ob-pf > summary::-webkit-details-marker { display: none; }
.ob-av { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; object-fit: cover; }
.ob-initial { background: var(--accent-soft, #e6e6e6); color: var(--accent, #333); font-weight: 700; border: 1px solid var(--accent-line, #ccc); }
.ob-pf-pop { position: absolute; right: 0; top: 42px; min-width: 240px; background: var(--surface, #fff); border: 1px solid var(--line, #ddd);
  border-radius: var(--radius, 12px); box-shadow: var(--shadow, none); padding: 8px; display: flex; flex-direction: column; z-index: 20; }
.ob-pf-pop a, .ob-pf-confirm > summary { padding: 8px 10px; border-radius: var(--radius-sm, 8px); color: var(--ink, #1a1a1a); text-decoration: none; cursor: pointer; }
.ob-pf-pop a:hover, .ob-pf-confirm > summary:hover { background: var(--surface-2, #eee); }
.ob-pf-name { padding: 6px 10px 0; font-weight: 650; }
.ob-pf-email { padding: 0 10px 8px; color: var(--ink-3, #777); font-size: var(--fs-label, 12px); border-bottom: 1px solid var(--line-soft, #eee); margin-bottom: 4px; overflow-wrap: anywhere; }
.ob-pf-confirm > summary { list-style: none; }
.ob-pf-confirm > summary::-webkit-details-marker { display: none; }
.ob-pf-pop a.ob-pf-out { color: var(--over, #a00); font-weight: 650; }
.ob-c-open, details[open] > summary .ob-c-closed { display: none; }
details[open] > summary .ob-c-open { display: inline; }

/* page */
.ob-page { padding: 32px 16px 48px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.ob-narrow { max-width: 420px; }
.ob-mid { max-width: 680px; }
.ob-wide { max-width: 900px; }
.ob-lead { color: var(--ink-2, #555); }
.ob-sub { color: var(--ink-3, #777); font-size: 13px; }
.ob-hint { color: var(--ink-3, #777); font-size: var(--fs-label, 12px); }
.ob-card { background: var(--surface, #fff); border: 1px solid var(--line, #ddd); border-radius: var(--radius, 12px); padding: 16px;
  box-shadow: var(--shadow, none); display: flex; flex-direction: column; gap: 10px; }
.ob-stack { display: flex; flex-direction: column; gap: 10px; }
.ob-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ob-end { justify-content: flex-end; }
.ob-links { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.ob-links a { text-decoration: none; }
.ob-links a:hover { text-decoration: underline; }
.ob-links .ob-muted-link { color: var(--ink-3, #777); }
.ob-or { display: flex; align-items: center; gap: 10px; color: var(--ink-3, #777); font-size: var(--fs-label, 12px); }
.ob-or::before, .ob-or::after { content: ""; flex: 1; height: 1px; background: var(--line, #ddd); }
.ob-notice { background: var(--ok-soft, #e8f3e8); color: var(--ok, #2a6a2a); border-radius: var(--radius-sm, 8px); padding: 8px 12px; }
.ob-err { background: var(--over-soft, #f8e6e6); color: var(--over, #a00); border-radius: var(--radius-sm, 8px); padding: 8px 12px; }
.ob-mono, .ob-key, .ob-codes { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.ob-nowrap { white-space: nowrap; }

/* fields */
input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; min-height: 34px; padding: 6px 10px; font: inherit; color: var(--ink, #1a1a1a);
  background: var(--surface, #fff); border: 1px solid var(--line, #ccc); border-radius: var(--radius-sm, 8px);
}
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .ob-btn:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent, #333); outline-offset: 1px;
}
input[readonly] { background: var(--surface-2, #eee); color: var(--ink-2, #555); }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
label.ob-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.ob-check input { width: 16px; height: 16px; accent-color: var(--accent, #333); }
.ob-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* buttons */
.ob-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm, 8px); font: inherit; font-weight: 650; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; background: none; color: var(--ink, #1a1a1a); }
.ob-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ob-btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.ob-btn-primary { background: var(--accent, #333); color: var(--accent-ink, #fff); }
.ob-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.ob-btn-ghost { border-color: var(--line, #ccc); background: var(--surface, #fff); }
.ob-btn-ghost:hover:not(:disabled) { background: var(--surface-2, #eee); }
.ob-btn-danger { background: var(--over, #a00); color: #fff; }
.ob-btn-danger-ghost { border-color: var(--over, #a00); color: var(--over, #a00); background: transparent; }
.ob-btn-google { border-color: var(--line, #ccc); background: var(--surface, #fff); width: 100%; height: 40px; }
.ob-btn-google:hover { background: var(--surface-2, #eee); }
.ob-btn svg, .ob-method-name svg { width: 18px; height: 18px; flex: none; }
.ob-nav .ob-btn-primary { color: var(--accent-ink, #fff); }

/* account page */
.ob-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--accent, #333); }
.ob-method { border-top: 1px solid var(--line-soft, #eee); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ob-method-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ob-method-name { display: flex; flex-direction: column; gap: 2px; }
.ob-method-name b { display: flex; align-items: center; gap: 8px; }
.ob-method-name span { color: var(--ink-3, #777); font-size: 13px; }
.ob-method-name .ob-ico { color: var(--ink-2, #555); }
.ob-confirm { background: var(--surface-2, #f1f1f1); border-radius: var(--radius-sm, 8px); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ob-state { display: inline-block; margin-top: 6px; font-size: var(--fs-label, 12px); font-weight: 700; padding: 2px 10px;
  border-radius: var(--radius-pill, 999px); background: var(--surface-2, #eee); color: var(--ink-2, #555); }
.ob-state.ob-on { background: var(--ok-soft, #e8f3e8); color: var(--ok, #2a6a2a); }
.ob-qr { width: 200px; max-width: 100%; background: #fff; border-radius: var(--radius-sm, 8px); padding: 4px; }
.ob-qr svg { width: 100%; height: auto; display: block; }
.ob-key { word-break: break-all; color: var(--ink, #1a1a1a); }
.ob-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; font-size: 14px; }
.ob-danger-box { border-color: var(--over, #a00); }
.ob-red, .ob-red .ob-ico { color: var(--over, #a00); }
.ob-so-confirm { display: flex; }
.ob-so-confirm > summary { list-style: none; }
.ob-so-confirm > summary::-webkit-details-marker { display: none; }
.ob-so-confirm[open] { gap: 8px; }
.ob-so-confirm:not([open]) > a { display: none; }
.ob-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--ink-3, #777); }
.ob-rules li::before { content: "○"; display: inline-block; width: 18px; }
.ob-rules li.ob-ok { color: var(--ok, #2a6a2a); }
.ob-rules li.ob-ok::before { content: "✓"; }

/* support */
.ob-search { display: flex; gap: 8px; flex-wrap: wrap; }
.ob-search input { flex: 2 1 200px; width: auto; }
.ob-search select { flex: 1 1 140px; width: auto; }
.ob-table-card { padding: 0; overflow-x: auto; }
.ob-table-card > .ob-sub { padding: 16px; }
.ob-table { width: 100%; border-collapse: collapse; }
.ob-table th, .ob-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line-soft, #eee); vertical-align: top; }
.ob-table th { font-size: var(--fs-label, 12px); color: var(--ink-3, #777); font-weight: 650; }
.ob-table th a, .ob-table td a { text-decoration: none; color: inherit; }
.ob-table td a:hover { color: var(--accent, #333); }
.ob-table tr:last-child td { border-bottom: 0; }
.ob-clip { font-size: var(--fs-label, 12px); color: var(--ink-3, #777); }
.ob-new-ticket > summary { list-style: none; display: inline-flex; margin-bottom: 10px; }
.ob-new-ticket > summary::-webkit-details-marker { display: none; }
.ob-thread { display: flex; flex-direction: column; gap: 10px; }
.ob-from-support { border-color: var(--accent-line, #ccc); background: var(--accent-soft, #f0f0f0); }
.ob-who { font-size: 13px; color: var(--ink-2, #555); }
.ob-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.ob-file { font-size: 13px; }
.ob-files { display: flex; flex-direction: column; gap: 6px; }
.ob-files label { display: inline-flex; flex-direction: row; font-weight: 650; }
.ob-files label.ob-full { opacity: 0.5; pointer-events: none; }
.ob-file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ob-file-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ob-done { display: flex; flex-direction: column; gap: 10px; }
.ob-big { font-size: 16px; font-weight: 650; }

/* footer: on phones the links come first, the copyright last */
.ob-foot { border-top: 1px solid var(--line, #ddd); color: var(--ink-3, #777); font-size: 13px; }
.ob-foot-row { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap; }
.ob-foot nav { display: flex; gap: 16px; flex-wrap: wrap; }
.ob-foot a { color: var(--ink-2, #555); text-decoration: none; }
.ob-foot a:hover { color: var(--ink, #1a1a1a); }

@media (max-width: 600px) {
  .ob-hide-sm { display: none; }
  .ob-row2 { grid-template-columns: 1fr; }
  .ob-page { padding-top: 20px; }
  input:not([type=checkbox]):not([type=file]), select, textarea { font-size: 16px; }
  .ob-foot-row { flex-direction: column; align-items: flex-start; }
}
