/* Notes: grid, cards, colours, editor, Markdown, history, share; plus clipboard, trash and settings. */

/* Note colour classes set --n-c / --n-cb, used by cards, the editor and mini cards. */
.nc-default { --n-c: var(--surface); --n-cb: var(--border); }
.nc-red { --n-c: var(--n-red); --n-cb: var(--n-red-b); } .nc-orange { --n-c: var(--n-orange); --n-cb: var(--n-orange-b); }
.nc-yellow { --n-c: var(--n-yellow); --n-cb: var(--n-yellow-b); } .nc-green { --n-c: var(--n-green); --n-cb: var(--n-green-b); }
.nc-teal { --n-c: var(--n-teal); --n-cb: var(--n-teal-b); } .nc-blue { --n-c: var(--n-blue); --n-cb: var(--n-blue-b); }
.nc-purple { --n-c: var(--n-purple); --n-cb: var(--n-purple-b); } .nc-pink { --n-c: var(--n-pink); --n-cb: var(--n-pink-b); }
.nc-brown { --n-c: var(--n-brown); --n-cb: var(--n-brown-b); } .nc-gray { --n-c: var(--n-gray); --n-cb: var(--n-gray-b); }

.notes-page { max-width: 1320px; }
.notes-top { display: flex; justify-content: center; padding: 6px 0 12px; }
.notes-search { max-width: 560px; height: 40px; border-radius: 999px; padding: 0 18px; background: var(--surface-2); border-color: transparent; }
.notes-search:focus { background: var(--surface); }
.note-composer { max-width: 600px; margin: 0 auto 14px; display: flex; align-items: center; gap: 2px; padding: 4px 6px 4px 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.composer-open { flex: 1; border: 0; background: transparent; height: 42px; justify-content: flex-start; color: var(--muted); font-weight: 400; font-size: 15px; }
.composer-open:hover { background: transparent; color: var(--text-2); }
.notes-filters { margin-bottom: 8px; }
.notes-filters .tb-sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.swatch-mini { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--border-strong); }

.note-grid { columns: 250px auto; column-gap: 14px; }
.note-grid.list { columns: 1; max-width: 680px; margin: 0 auto; }
.note-card {
  break-inside: avoid; margin: 0 0 14px; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 8px;
  background: var(--n-c); border: 1px solid var(--n-cb); border-radius: var(--r-lg); cursor: pointer; transition: box-shadow .15s, transform .15s; overflow: hidden;
}
.note-card:hover { box-shadow: var(--shadow-2); }
.note-card:focus-visible { box-shadow: var(--focus); }
.note-card.selected { outline: 2px solid var(--accent); outline-offset: -1px; }
.nc-title { font-size: 15px; padding-right: 24px; overflow-wrap: anywhere; }
/* Untitled notes: keep the first line of text clear of the pin button. */
.note-card:not(:has(.nc-title)):not(:has(.nc-cover)) :is(.nc-md > :first-child, .nc-text, .nc-checklist > li:first-child) { padding-right: 26px; }
.nc-cover { width: calc(100% + 28px); margin: -14px -14px 0; max-height: 220px; object-fit: cover; display: block; }
.nc-md { max-height: 340px; overflow: hidden; font-size: 13.5px; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
.nc-md > :first-child { margin-top: 0; }
.nc-text { font-size: 13.5px; white-space: pre-wrap; max-height: 260px; overflow: hidden; }
.nc-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; }
.nc-checklist li { display: flex; gap: 8px; align-items: flex-start; }
.nc-checklist input { margin-top: 3px; }
.nc-done-count { display: flex; align-items: center; gap: 4px; }
.nc-locked { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0; color: var(--text-2); }
.nc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.nc-chips:empty { display: none; }
.nc-chips .chip { background: color-mix(in srgb, var(--text) 7%, transparent); }
.nc-foot { display: flex; align-items: center; gap: 0; margin: 0 -6px; opacity: 0; transition: opacity .12s; }
.note-card:hover .nc-foot, .note-card:focus-within .nc-foot, .note-card.selected .nc-foot, .note-grid.selecting .nc-foot { opacity: 1; }
.nc-pin { position: absolute; top: 8px; right: 8px; opacity: 0; }
.note-card:hover .nc-pin, .nc-pin.on { opacity: 1; }
.nc-pin.on { color: var(--text); }
.nc-select { flex: none; width: 20px; height: 20px; padding: 0; margin: 0 6px 0 5px; border-radius: 50%; background: transparent; color: transparent; border: 2px solid var(--border-strong); }
.nc-select:hover { border-color: var(--text-2); color: var(--text-2); background: transparent; }
.note-card.selected .nc-select { background: var(--accent); border-color: var(--accent); color: #fff; }
.nc-select .icon { width: 12px; height: 12px; stroke-width: 3; }

/* --- Markdown rendering -------------------------------------------------------------------- */
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md .table-wrap { margin: 0 0 .7em; }
.md h1, .md h2, .md h3 { margin: 1em 0 .4em; line-height: 1.3; }
.md h1 { font-size: 1.45em; } .md h2 { font-size: 1.25em; } .md h3 { font-size: 1.1em; }
.md ul, .md ol { padding-left: 1.4em; }
.md li { margin: .15em 0; }
.md li.task-item { list-style: none; margin-left: -1.3em; }
.md li.task-item > input { margin: 0 .5em 0 0; vertical-align: -2px; }
.md li.task-item.done { color: var(--muted); text-decoration: line-through; }
.md blockquote { border-left: 3px solid var(--border-strong); padding: 2px 0 2px 12px; color: var(--text-2); }
.md code { font-family: var(--mono); font-size: .9em; background: color-mix(in srgb, var(--text) 8%, transparent); padding: 1px 5px; border-radius: 4px; }
.md pre { background: color-mix(in srgb, var(--text) 6%, transparent); padding: 10px 12px; border-radius: var(--r); overflow-x: auto; }
.md pre code { background: transparent; padding: 0; }
.md mark { background: color-mix(in srgb, #ffd43b 55%, transparent); color: inherit; border-radius: 3px; padding: 0 2px; }
.md img { max-width: 100%; height: auto; border-radius: var(--r); display: block; margin: .4em 0; }
.md hr { border: 0; border-top: 1px solid var(--border-strong); margin: 1.2em 0; }
.md a { text-decoration: underline; text-underline-offset: 2px; }
.md .table-wrap { overflow-x: auto; }
.md table { border-collapse: collapse; font-size: .95em; }
.md th, .md td { border: 1px solid var(--border-strong); padding: 5px 10px; text-align: left; }
.md th { background: color-mix(in srgb, var(--text) 5%, transparent); }

/* --- Note editor --------------------------------------------------------------------------- */
dialog.note-editor { width: min(820px, calc(100vw - 24px)); height: min(86vh, 900px); display: flex; flex-direction: column; background: var(--n-c, var(--surface)); border: 1px solid var(--n-cb, var(--border)); }
dialog.note-editor:not([open]) { display: none; }
dialog.note-editor[data-color="red"] { --n-c: var(--n-red); --n-cb: var(--n-red-b); } dialog.note-editor[data-color="orange"] { --n-c: var(--n-orange); --n-cb: var(--n-orange-b); }
dialog.note-editor[data-color="yellow"] { --n-c: var(--n-yellow); --n-cb: var(--n-yellow-b); } dialog.note-editor[data-color="green"] { --n-c: var(--n-green); --n-cb: var(--n-green-b); }
dialog.note-editor[data-color="teal"] { --n-c: var(--n-teal); --n-cb: var(--n-teal-b); } dialog.note-editor[data-color="blue"] { --n-c: var(--n-blue); --n-cb: var(--n-blue-b); }
dialog.note-editor[data-color="purple"] { --n-c: var(--n-purple); --n-cb: var(--n-purple-b); } dialog.note-editor[data-color="pink"] { --n-c: var(--n-pink); --n-cb: var(--n-pink-b); }
dialog.note-editor[data-color="brown"] { --n-c: var(--n-brown); --n-cb: var(--n-brown-b); } dialog.note-editor[data-color="gray"] { --n-c: var(--n-gray); --n-cb: var(--n-gray-b); }
.ne-head { display: flex; align-items: center; gap: 4px; padding: 14px 14px 4px 22px; }
.ne-title { font: 600 20px/1.3 var(--font-display); height: 36px; }
.ne-head .on { color: var(--text); }
.ne-bar { display: flex; align-items: center; gap: 8px; padding: 4px 16px 6px; border-bottom: 1px solid color-mix(in srgb, var(--n-cb, var(--border)) 70%, transparent); flex-wrap: wrap; }
.ne-modes button { height: 28px; font-size: 12.5px; }
.ne-toolbar { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.tb-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 4px; opacity: .6; }
.ne-scroll { flex: 1; overflow: auto; padding: 12px 22px; }
.ne-body { min-height: 100%; border-radius: var(--r); }
.ne-body.drop-into { outline: 2px dashed var(--accent); outline-offset: 4px; }
.ne-visual { min-height: 240px; outline: none; font-size: 15px; }
.ne-visual.empty::before { content: attr(data-placeholder); color: var(--muted); position: absolute; pointer-events: none; }
.ne-source { border: 0; background: transparent; font: 14px/1.6 var(--mono); padding: 0; min-height: 240px; resize: none; }
.ne-source:focus { box-shadow: none; }
.ne-preview { font-size: 15px; }
.ne-checklist .cl-text { font-size: 15px; }
.cl-done-toggle { margin-top: 10px; color: var(--text-2); }
.done-list { opacity: .8; }
.ne-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 22px 0; }
.ne-chips:empty { display: none; }
.ne-foot { display: flex; align-items: center; gap: 2px; padding: 8px 14px 12px 16px; flex-wrap: wrap; }
.ne-status { margin: 0 8px; }
.ai-btn { color: var(--c-violet); }
.ai-panel { margin-top: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--c-violet) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c-violet) 30%, transparent); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 10px; }
.ai-panel > .row:first-child .icon { color: var(--c-violet); }
.ai-result { max-height: 320px; overflow: auto; }
.ai-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hist { display: grid; grid-template-columns: 240px 1fr; min-height: 380px; max-height: 70vh; border-top: 1px solid var(--border); }
.hist-list { list-style: none; margin: 0; padding: 8px; overflow: auto; border-right: 1px solid var(--border); }
.hist-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; height: auto; padding: 8px 10px; border: 0; background: transparent; font-weight: 400; text-align: left; white-space: normal; gap: 2px; }
.hist-item.active, .hist-item:hover { background: var(--surface-2); }
.hist-view { padding: 16px 20px; overflow: auto; }

/* --- Clipboard ----------------------------------------------------------------------------- */
.clip-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.clip { display: flex; gap: 12px; padding: 12px 12px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); align-items: flex-start; }
.clip.pinned { border-color: var(--accent); }
.clip-icon { width: 30px; height: 30px; border-radius: var(--r); background: var(--surface-2); display: grid; place-items: center; color: var(--text-2); flex: none; }
.clip-content { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; max-height: 180px; overflow: hidden; }
.clip-content.code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 8px; border-radius: var(--r); }
.clip-actions { display: flex; opacity: .5; }
.clip:hover .clip-actions { opacity: 1; }

/* --- Trash ----------------------------------------------------------------------------------- */
.trash-note { margin: 4px 0 12px; }
.trash-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.trash-list li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.trash-list li:last-child { border-bottom: 0; }

/* --- Settings -------------------------------------------------------------------------------- */
.settings { max-width: 820px; }
.settings-section { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.settings-head h2 { font-size: 15px; margin-bottom: 4px; }
.settings-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.setting-row { display: flex; align-items: center; gap: 14px; }
.setting-row.column { flex-direction: column; align-items: stretch; gap: 4px; }
.setting-row.column textarea { margin-top: 4px; }
.setting-row > select { width: auto; max-width: 60%; flex: none; }
.setting-label { font-weight: 500; }
.label-admin { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.label-admin li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.label-admin .swatch { width: 18px; height: 18px; }
.device-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.device-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.pair-box { padding: 14px; border-radius: var(--r-lg); background: var(--accent-soft); }
.pair-code { font-size: 28px; font-weight: 700; letter-spacing: .12em; margin-top: 4px; }
@media (max-width: 760px) { .settings-section { grid-template-columns: 1fr; gap: 10px; } .hist { grid-template-columns: 1fr; } .hist-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 180px; } }
.tz-now { display: flex; align-items: center; gap: 8px; }
.tz-now .icon { color: var(--muted); }
.tz-clock { font-weight: 600; font-variant-numeric: tabular-nums; }
.tz-warn { border-radius: var(--r); }
.tz-pin { align-self: flex-start; }
#tz-select { max-width: 340px; }

/* Settings → Security (authenticator app) */
.mfa-box { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface-2); }
.mfa-setup { flex-direction: row; align-items: flex-start; gap: 22px; flex-wrap: wrap; }
.mfa-qr { width: 184px; height: 184px; flex: none; padding: 6px; border-radius: var(--r); background: #fff; }
.mfa-qr svg { display: block; width: 100%; height: 100%; }
.mfa-steps { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 12px; }
.mfa-steps ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--text-2); }
.mfa-key { display: flex; align-items: center; gap: 8px; }
.mfa-key > .small { flex: none; }
.mfa-key code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; padding: 4px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--border); letter-spacing: .04em; }
.mfa-code-input { width: 150px; flex: none; font-size: 17px; letter-spacing: .2em; text-align: center; font-variant-numeric: tabular-nums; }
.mfa-codes { list-style: none; display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 40px; margin: 4px 0; padding: 14px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); font-size: 15px; letter-spacing: .04em; }
.mfa-confirm input[type="password"] { min-width: 200px; }

/* Settings → Profile */
.profile-input { width: 240px; flex: none; }
@media (max-width: 860px) { .profile-input { width: 100%; flex: 1; } }
.lang-chips { gap: 8px; margin-top: 6px; }

/* Memory layers (Memory page tabs) */
.memory-tabs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.memory-tab-row { gap: 6px; }
.memory-tabs .chip-btn .count { margin-left: 4px; font-size: 12px; opacity: .75; }
.memory-tidy { gap: 10px; align-items: center; }
.memory-filter { margin-top: 10px; max-width: 320px; }
.memory-cards { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.memory-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.memory-card-head { gap: 8px; align-items: center; }
.memory-text { margin: 0; white-space: pre-wrap; color: var(--text-2); }
.memory-meta { gap: 6px; align-items: center; }
.chip.link { text-decoration: none; color: var(--accent-text); background: var(--accent-soft); }
.memory-tabs .chip-btn.selected { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; font-weight: 500; }

/* Settings → Gemini (key, models, voice, usage), as in the Knowledge Hub */
.settings-body-inner { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.key-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.key-form input { flex: 1; min-width: 220px; }
.key-form p { flex-basis: 100%; margin: 0; }
.ok-text { color: var(--ok, var(--accent-text)); }
.ai-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ai-role { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.ai-role b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-role-name { font-size: 12px; font-weight: 600; color: var(--accent-text); text-transform: uppercase; letter-spacing: .04em; }
.ai-model-bar { align-items: center; gap: 10px; }
.model-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; }
.model-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.model-table th, .model-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.model-table tr:last-child td { border-bottom: 0; }
.model-table th { font-weight: 500; color: var(--text-2); white-space: nowrap; }
.model-table .num { text-align: right; white-space: nowrap; }
.model-table .act { text-align: right; white-space: nowrap; width: 1%; }
.model-table code { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.model-table tr.dim td { opacity: .6; }
.model-table tr.pinned td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.th-sort { background: none; border: 0; padding: 0; height: auto; font: inherit; color: inherit; gap: 2px; }
.icon-btn.star .icon { color: var(--muted); }
.icon-btn.star.on .icon { color: var(--c-amber, #f9ab00); }
.icon-btn.star.on { opacity: 1; }
.model-table td.price { white-space: nowrap; }
.model-table td.price input { width: 84px; height: 30px; padding: 0 8px; font-size: 12.5px; margin-left: 4px; }
.voice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.voice-card { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--border); border-radius: 16px; }
.voice-card.is-default { border-color: transparent; background: var(--accent-soft); }
.voice-initial { position: relative; width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 0; background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 16px; justify-content: center; flex-shrink: 0; }
.voice-card.is-default .voice-initial { background: var(--accent); color: var(--accent-fg); }
.voice-initial .vi-play { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-fg); opacity: 0; transition: opacity .15s var(--ease); }
.voice-initial:hover .vi-play, .voice-card.playing .vi-play { opacity: 1; }
.voice-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.voice-text b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.usage-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.usage-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 16px; background: var(--surface-2); }
.usage-card b { font-size: 20px; font-weight: 500; }
.usage-bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.usage-bars span { flex: 1; min-width: 3px; background: var(--accent); border-radius: 3px 3px 0 0; opacity: .8; }
.usage-h { font-size: 13px; font-weight: 600; margin: 6px 0 0; color: var(--text-2); }
@media (max-width: 760px) { .ai-roles { grid-template-columns: 1fr; } }
.usage-bars span.zero { background: var(--border); opacity: 1; }
.tz-pin { height: auto; min-height: 30px; white-space: normal; text-align: left; max-width: 100%; padding-top: 4px; padding-bottom: 4px; }

/* ---------- Settings in tabs (2026-10): tab list down the left, the chosen tab's sections across the rest ---------- */
.page.settings-tabbed { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; align-items: start; max-width: 1400px; margin: 0 auto; padding-top: 4px; }
.settings-tabs { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 2px; }
.settings-tab {
  display: flex; align-items: center; gap: 14px; width: 100%; height: auto; min-height: 56px; padding: 8px 16px; border: 0; border-radius: 28px;
  background: transparent; color: var(--text-2); justify-content: flex-start; text-align: left; white-space: normal;
}
.settings-tab .icon { width: 20px; height: 20px; flex: none; color: var(--text-2); }
.settings-tab:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.settings-tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent-text); }
.settings-tab[aria-selected="true"] .icon { color: var(--accent-text); }
.settings-tab-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.settings-tab-label { font-size: 14px; font-weight: 500; }
.settings-tab-hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.settings-tab[aria-selected="true"] .settings-tab-label { font-weight: 600; }
.settings-tab[aria-selected="true"] .settings-tab-hint { color: var(--accent-text); opacity: .8; }
.settings-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-panel-title { font-size: 22px; font-weight: 400; margin: 6px 0 2px; }
/* Each section is a card, like the Knowledge Hub's; heading on the left, controls across the rest. */
.settings-panel .settings-section {
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 32px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
}
.settings-panel .settings-head h2 { font-size: 16px; font-weight: 500; }
.settings-panel .setting-row > select { max-width: 420px; }

/* AI → Models: one labelled drop-down per job */
.ai-jobs { display: flex; flex-direction: column; gap: 8px; }
.ai-job { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 380px); align-items: center; gap: 16px; padding: 12px 16px; border-radius: 16px; background: var(--surface-2); }
.ai-job-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-job-name { font-size: 14px; font-weight: 600; color: var(--accent-text); }
.ai-job select { width: 100%; }
.ai-all-models > summary { cursor: pointer; font-size: 13px; color: var(--text-2); padding: 4px 0; }
.ai-all-models[open] > summary { margin-bottom: 8px; }

/* Devices & apps → Android app */
.app-download { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.app-download-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 320px; }
.app-download-name { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.app-download-name .icon { color: var(--accent-text); }
.app-download-text p { margin: 0; }
.app-download-qr { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.app-download-qr .mfa-qr { width: 148px; height: 148px; }

@media (max-width: 1100px) {
  .page.settings-tabbed { grid-template-columns: 1fr; gap: 12px; }
  .settings-tabs { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .settings-tab { width: auto; min-height: 40px; padding: 6px 14px; flex: none; }
  .settings-tab-hint { display: none; }
  .settings-panel .settings-section { grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 760px) {
  .settings-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
  .settings-panel .settings-section { grid-template-columns: 1fr; gap: 10px; padding: 16px; }
  .ai-job { grid-template-columns: 1fr; gap: 8px; }
}
