/* =====================================================================
   OCTA Portal UI v9 — styles for the markup that public/js/*.js builds.
   Loaded after octa-theme.css. Colours come only from var(--...) tokens,
   except the brand gradient and the surfaces that are dark in both themes
   (password card, media viewer), as in the v9 design.
   ===================================================================== */

/* ---------- extra tokens used by this file ---------- */
:root, :root[data-theme="dark"] {
  --card-border: var(--line-strong);
  --overlay: rgba(5, 4, 9, .66);
  --pop-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
/* Light theme: borders give way to shadows; a few text tokens are darkened to reach 4.5:1 contrast */
:root[data-theme="light"] {
  --card-border: transparent;
  --overlay: rgba(22, 20, 28, .38);
  --pop-shadow: 0 18px 50px rgba(22, 20, 28, .16);
  --muted: #5B586F; --faint: #66637A; --ok-fg: #0A7550; --t-pink-fg: #B8106A; --t-orange-fg: #A33C0C;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --card-border: transparent; --overlay: rgba(22, 20, 28, .38); --pop-shadow: 0 18px 50px rgba(22, 20, 28, .16);
    --muted: #5B586F; --faint: #66637A; --ok-fg: #0A7550; --t-pink-fg: #B8106A; --t-orange-fg: #A33C0C;
  }
}

/* ---------- base ---------- */
.o-app [hidden] { display: none !important; }
:where(.o-app) button { background: none; border: 0; padding: 0; margin: 0; text-align: inherit; }
:where(.o-app) h1, :where(.o-app) h2, :where(.o-app) h3, :where(.o-app) p { margin: 0; }
:where(.o-app) img { max-width: 100%; }
.o-app ::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
.mono { font-family: var(--mono); }
.ui-icon, .o-app svg.media-icon { width: 18px; height: 18px; flex: none; }
.o-app button:disabled { opacity: .5; cursor: default; }

/* ---------- shell ---------- */
.o-shell { max-width: 1840px; display: flex; flex-direction: column; min-height: 100vh; }
.o-bar { position: relative; z-index: 30; }
.o-bar-logo { display: flex; align-items: center; min-height: 44px; }
.o-bar-logo img { height: 35px; transform: translateY(6.7%); } /* placed to match the reference screenshot: left letters a hair above the middle, the whole logo a hair below */
@media (max-width: 820px) { .o-bar-logo img { height: 34px; } }
.o-bar-spacer { display: none; }
.o-tabs a { position: relative; min-height: 44px; }
.o-tabs a .lbl-short { display: none; }
.o-tabs a.busy::after { content: ""; position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 3px; background: var(--accent); animation: o-pulse 1.2s ease-in-out infinite; }
@keyframes o-pulse { 50% { opacity: .35; } }
.content { flex: 1; margin-top: 30px; outline: 0; min-width: 0; }
body.has-player .content { padding-bottom: 96px; }

/* search with the command list under it */
.o-search { position: relative; }
.o-search > .o-icon { width: 18px; height: 18px; }
.command-results {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 8px); z-index: 60;
  max-height: min(70vh, 520px); overflow: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 5px; box-shadow: var(--pop-shadow);
}
.command-caption { padding: 8px 10px 6px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--faint); }
.command-option { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 3px; color: var(--text); font-size: 14px; }
.command-option:hover, .command-option.is-active { background: var(--raised); }
.command-option-icon { width: 30px; height: 30px; border-radius: 3px; display: grid; place-items: center; background: var(--raised); color: var(--muted); }
.command-option.is-active .command-option-icon { background: var(--surface); color: var(--text); }
.command-option-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.command-option-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.command-option-group { font-size: 12px; color: var(--faint); }
.command-no-results { padding: 14px 12px; color: var(--muted); font-size: 14px; }
.command-hint { padding: 10px 10px 6px; border-top: 1px solid var(--line); margin-top: 6px; font-size: 12px; color: var(--faint); }
.mobile-command-launch { display: none !important; }

/* avatar + account menu */
.o-user { position: relative; flex: none; }
.o-user-btn { display: block; border-radius: var(--radius-md); }
.o-user-btn .o-avatar { pointer-events: none; }
.o-user-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 5px; box-shadow: var(--pop-shadow);
}
.o-user-who { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.o-user-who b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o-user-who small { color: var(--faint); font-size: 13px; }
.o-user-link { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 3px; font-size: 14.5px; font-weight: 500; color: var(--text); }
.o-user-link:hover, .o-user-link:focus-visible { background: var(--raised); }
.o-user-link.danger { color: var(--danger); }
.avatar { display: grid; place-items: center; overflow: hidden; font-weight: 700; color: #fff; background: var(--brand-avatar); text-transform: uppercase; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }


/* ---------- page headings and text ---------- */
.page-head { margin-bottom: 26px; }
.page-head .o-eyebrow, .files-heading .o-eyebrow { margin-bottom: 10px; }
#view h2, .section-title { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin: 34px 0 14px; }
#view > .page-head + h2 { margin-top: 8px; }
#view h3 { font-size: 17px; font-weight: 600; }
.lead { color: var(--muted); font-size: 15px; margin-top: 6px; }
.note { font-size: 13.5px; color: var(--muted); }
.note:empty { display: none; }
.note.ok { color: var(--ok-fg); }
.note.err { color: var(--danger); }
.tiny { font-size: 12.5px; color: var(--faint); }

/* ---------- cards ---------- */
.card, .panel, .share-edit, .modal-card, .home-storage, .meter-wrap:not(:empty), .files-panel, .vpreview, .table {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-xl); box-shadow: var(--card-shadow);
}
.panel { padding: 20px 24px; }
.panel + .panel { margin-top: 14px; }
.panel form, .share-edit { display: flex; flex-direction: column; gap: 14px; }
.panel.wide { max-width: none; }
#view > .panel, .vault-account-column > .panel { max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { padding: 20px; }

/* ---------- buttons made by the JS ---------- */
.o-app button.primary, .o-app button.ghost, .o-app .lb-btn, .o-app .root-manage, .o-app .root-delete {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: var(--radius-md); font-weight: 600; font-size: 14.5px; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.o-app button.primary { background: var(--primary-bg); color: var(--primary-fg); }
.o-app button.primary:hover:not(:disabled) { opacity: .9; }
.o-app button.ghost, .o-app .root-manage, .o-app .root-delete { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.o-app button.ghost:hover:not(:disabled), .o-app .root-manage:hover, .o-app .root-delete:hover { background: var(--raised); }
.o-app button.danger, .o-app .root-delete { color: var(--danger); }
.o-app button.small, .o-app .root-manage, .o-app .root-delete { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: var(--radius-sm); }
.o-app button.iconbtn, .o-app .root-delete { width: 38px; padding: 0; }
.o-app button.link { display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; border-radius: 3px; font-size: 13.5px; font-weight: 500; color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.o-app button.link:hover { background: var(--raised); text-decoration-color: currentColor; }
.o-app button.link.danger { color: var(--danger); }
.o-app button .ui-icon { width: 17px; height: 17px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
:where(#view, .modal, .o-app .share-edit) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea) {
  height: 46px; min-width: 0; padding: 0 14px; border-radius: var(--radius-md); font: inherit; font-size: 14.5px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); outline: 0;
}
:where(#view, .modal) textarea { height: auto; padding: 12px 14px; }
:where(#view, .modal) :where(input, select, textarea):focus { border-color: var(--accent); }
:where(#view, .modal) input::placeholder { color: var(--faint); }
:where(#view, .modal) select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 14px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
}
.o-app input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; flex: none; cursor: pointer;
  border-radius: 3px; border: 1.6px solid color-mix(in srgb, var(--faint) 70%, transparent); background: transparent;
  display: inline-grid; place-items: center;
}
.o-app input[type="checkbox"]:checked, .o-app input[type="checkbox"]:indeterminate { background: var(--accent); border-color: var(--accent); }
.o-app input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.o-app input[type="checkbox"]:indeterminate::after { content: ""; width: 10px; height: 2.5px; border-radius: 3px; background: #fff; }
.o-app input[type="range"] { accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer; min-height: 32px; }
.checks { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > input { flex: 1; }
.addrow { display: flex; gap: 8px; }
.addrow > input { flex: 1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 6px 0 14px; border-radius: 99px; font-size: 13.5px; background: var(--raised); color: var(--text); }
.chip button { width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-size: 16px; color: var(--muted); }
.chip button:hover { background: var(--surface); color: var(--text); }
.kv, .props { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt, .props dt { color: var(--faint); }
.kv dd, .props dd { margin: 0; overflow-wrap: anywhere; }
.badge { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; color: var(--muted); background: var(--raised); }
.dot { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--faint); }
.dot.on::before { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.dot.off::before { background: var(--danger); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 14.5px; }
.empty-files { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-files .ui-icon { width: 34px; height: 34px; color: var(--faint); }
.empty-files h3 { font-size: 17px; color: var(--text); }

/* ---------- tables (Users, Storage, vault) in the o-table look ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.table th { font-size: 12px; letter-spacing: .07em; color: var(--faint); font-weight: 500; text-align: left; padding: 14px 14px 12px; text-transform: uppercase; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--raised) 50%, transparent); }
.table td.act { text-align: right; white-space: nowrap; }
.table td.act > * + * { margin-left: 6px; }
.table td select { height: 38px; }
.files > .table + .table, .files > p + .table { margin-top: 12px; }

/* ---------- storage meter (window.OctaMeter): cloud icon · gradient amount + % badge · glowing gradient bar · free / total ---------- */
.meter-wrap:not(:empty), .home-storage { padding: 22px 24px; background: radial-gradient(130% 160% at 0% 0%, color-mix(in srgb, var(--c2) 9%, transparent), transparent 55%), var(--surface); }
.meter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; }
.meter-icon { width: 54px; height: 54px; border-radius: var(--radius-md); display: grid; place-items: center; color: #fff; background: var(--brand); box-shadow: 0 8px 24px -10px color-mix(in srgb, var(--c3) 70%, transparent); }
.meter-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.meter-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.meter-top { white-space: nowrap; color: var(--muted); font-size: 15px; }
.meter-top b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-right: 8px; background-image: var(--grad-title); -webkit-background-clip: text; background-clip: text; color: transparent; }
.meter-pct { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; color: var(--t-violet-fg); background: var(--t-violet-bg); white-space: nowrap; }
.meter-bar { height: 12px; border-radius: 99px; background: var(--meter-empty); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); }
.meter-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--c1), var(--c2) 40%, var(--c3) 80%, var(--c4)); box-shadow: 0 0 14px color-mix(in srgb, var(--c2) 45%, transparent); transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.meter.warn .meter-bar i { background: linear-gradient(90deg, #ff9a3d, #ff6b3d); box-shadow: 0 0 14px color-mix(in srgb, #ff7a3d 45%, transparent); }
.meter.warn .meter-pct { color: var(--t-orange-fg); background: var(--t-orange-bg); }
.meter.full .meter-bar i { background: var(--danger); box-shadow: none; }
.meter.full .meter-pct { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.meter.nolimit .meter-bar { display: none; }
.meter-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.meter-foot span:last-child { color: var(--faint); }
#storagePanel .meter { gap: 18px; }

/* ---------- Home ---------- */
.home-storage { margin-bottom: 22px; }
.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.quick-card { display: flex; align-items: center; gap: 14px; padding: 18px; color: var(--text); transition: box-shadow .15s ease; }
.quick-card:hover { box-shadow: inset 0 0 0 2px var(--line-strong), var(--card-shadow); }
.quick-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.quick-text b { font-size: 16px; font-weight: 600; }
.quick-text small { color: var(--faint); font-size: 13px; }
.quick-text small b { font-size: inherit; font-weight: 600; color: var(--text); }
.o-tile .o-icon { width: 20px; height: 20px; }
.tile-primary { background: var(--primary-bg); color: var(--primary-fg); }
.app-card { display: flex; flex-direction: column; gap: 10px; }
.app-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.app-card .o-tile { width: 42px; height: 42px; border-radius: 4px; }
.app-card p { color: var(--muted); font-size: 14px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.tag.live { color: var(--ok-fg); background: var(--ok-soft); }
.tag.soon { color: var(--t-violet-fg); background: var(--t-violet-bg); }
.tag.plan { color: var(--muted); background: var(--raised); }

/* ---------- Account ---------- */
.vault-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; align-items: start; }
.vault-account-column > h2:first-child { margin-top: 0 !important; }
.pic-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.avatar-big { width: 88px; height: 88px; border-radius: 7px; font-size: 32px; }
.pic-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Password creator (dark feature card in both themes) ---------- */
.pw-card { max-width: 780px; }
.pw-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pw-card-head > b { font-size: 17px; font-weight: 600; }
.o-seg button { cursor: pointer; }
.tabs.o-seg button { padding: 0 14px; font-weight: 500; }
.o-seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.o-feature .o-seg button[aria-selected="true"] { background: #F2F0F7; color: #16141C; }
.o-feature .o-seg button:hover:not([aria-selected="true"]) { color: #F2F0F7; }
.pw-body > .panel { background: transparent; border: 0; box-shadow: none; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pw-body form { gap: 14px; }
.o-feature .field, .o-feature .check, .o-feature .step-label { color: #A6A3B8; }
.o-feature .check { color: #F2F0F7; }
.o-feature :where(input:not([type="checkbox"]):not([type="range"]), select) { background: var(--feature-inset); color: #F2F0F7; border-color: #2B2935; }
.o-feature :where(input:not([type="checkbox"]):not([type="range"]), select):focus { border-color: var(--accent); }
.o-feature input::placeholder { color: #8D8AA0; }
.o-feature select { background-image: linear-gradient(45deg, transparent 50%, #A6A3B8 50%), linear-gradient(135deg, #A6A3B8 50%, transparent 50%); }
.o-feature input[type="checkbox"] { border-color: #8D8AA0; }
.o-feature button.ghost { background: #1E1C27; color: #F2F0F7; box-shadow: inset 0 0 0 1px #2B2935; }
.o-feature button.ghost:hover:not(:disabled) { background: #2B2935; }
.o-feature button.primary { background: #F2F0F7; color: #16141C; }
.o-feature .note { color: #A6A3B8; }
.o-feature .note.ok { color: #6EF0C2; }
.o-feature .note.err { color: #FF8A8A; }
.o-feature :focus-visible { outline-color: var(--c-ink); }
.o-feature .settings { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 4px; background: var(--feature-inset); border: 1px solid #2B2935; }
.o-feature .settings hr { border: 0; border-top: 1px solid #2B2935; margin: 0; width: 100%; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; align-items: center; gap: 8px; }
.step-label { flex: 1; font-size: 13.5px; }
.step-val { min-width: 36px; text-align: center; font-family: var(--mono); font-size: 15px; color: #F2F0F7; }
.pw-result { display: flex; flex-direction: column; gap: 12px; }
.o-pw { display: block; min-height: 56px; }
.pw-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pw-strength { flex: 1; min-width: 140px; font-size: 13px; color: #A6A3B8; }
.result { padding-top: 4px; }
.o-btn-brand:hover { opacity: .92; }

/* ---------- Cloud (Files) page: title + buttons, then the explorer at full width ---------- */
.files-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.files-heading-text { min-width: 0; }
.files-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; padding-bottom: 4px; }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.o-app .tool-actions button.small { height: 46px; padding: 0 18px; font-size: 14.5px; border-radius: var(--radius-md); }
.o-app .tool-actions button.iconbtn { width: 46px; padding: 0; }
.tool-actions .chevron { width: 14px; height: 14px; margin-left: -2px; opacity: .7; }
.files { position: relative; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.files-panel { padding: 10px 14px 14px; min-width: 0; }
.files.at-root .files-panel { background: transparent; border: 0; box-shadow: none; padding: 0; }
.files.at-root .files-bar { display: none; }
.files.at-trash .files-top { display: none; } /* Trash has no search/sort row */
.files-panel > * + * { margin-top: 10px; }
.files-bar { display: flex; flex-direction: column; gap: 10px; padding: 6px 6px 2px; } /* search row first, folder path under it */
.files-top { position: relative; min-height: 46px; display: flex; }
.files-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; }
.tool-filter-group { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; min-width: 0; }
.tool-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; max-width: none; height: 42px; padding: 0 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--faint); }
.tool-search:focus-within { border-color: var(--accent); }
#view .tool-search input { flex: 1; height: 40px; padding: 0; border: 0; background: transparent; }
.tool-sort { display: flex; align-items: center; gap: 6px; }
#view .tool-sort .fsort { height: 42px; width: 140px; }
.sort-direction.reverse svg { transform: scaleY(-1); }
.o-app .seg { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--radius-sm); background: var(--raised); }
.o-app .seg button.ghost { height: 34px; width: 34px; padding: 0; border-radius: 3px; background: transparent; color: var(--faint); box-shadow: none; }
.o-app .seg button.ghost:hover { color: var(--text); background: transparent; }
.o-app .seg button.ghost[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
:root:not([data-theme="light"]) .o-app .seg button.ghost[aria-pressed="true"] { background: var(--line-strong); }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .o-app .seg button.ghost[aria-pressed="true"] { background: var(--surface); } }
/* folder path in a framed capsule (OCTA Vault style): square Back button + home · parents · current folder pill */
.files-path { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs {
  display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; height: 40px; padding: 3px;
  border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 600; overflow-x: auto; scrollbar-width: none;
}
.crumbs::-webkit-scrollbar { display: none; }
.crumbs a { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 10px; border-radius: 3px; color: var(--muted); white-space: nowrap; flex: none; }
.crumbs a:hover { color: var(--text); background: var(--raised); }
.crumbs .ui-icon { width: 15px; height: 15px; }
.crumb-sep { color: var(--faint); display: inline-flex; flex: none; }
.crumb-sep .ui-icon { width: 14px; height: 14px; }
.crumb-current { display: inline-flex; align-items: center; height: 100%; padding: 0 12px; border-radius: 3px; background: var(--t-violet-bg); color: var(--t-violet-fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs .droptarget { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); }
.backbtn span { display: none; }
.o-app button.backbtn { width: 40px; height: 40px; padding: 0; flex: none; border-radius: 3px; }

/* selection bar: covers the toolbar row while items are picked */
.selbar { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 8px; border-radius: var(--radius-md); background: var(--row-sel); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.selcount { font-weight: 600; font-size: 14px; white-space: nowrap; }
.selbar .grow { flex: 1; }

/* transfers */
.uploads { display: grid; gap: 8px; }
.uploads:empty { display: none; }
.up-item { padding: 12px 14px; border-radius: var(--radius-md); background: var(--raised); }
.up-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; }
.up-top > span:last-child { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.up-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.up-pct { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.up-bar { height: 6px; margin-top: 9px; border-radius: 99px; background: var(--meter-empty); overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand); transition: width .15s; }
.up-item.done .up-pct { color: var(--ok-fg); }
.up-item.fail .up-pct { color: var(--danger); }

/* list heading */
.file-section-head { display: flex; align-items: baseline; gap: 10px; padding: 4px 6px 2px; }
.file-section-head > div { display: flex; align-items: baseline; gap: 10px; }
#view .file-section-head h2 { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.file-section-sub { font-size: 12.5px; color: var(--faint); }
.files.at-root .file-section-head { padding: 0 2px 12px; }
#view .files.at-root .file-section-head h2 { font-size: 19px; letter-spacing: -.01em; text-transform: none; color: var(--text); }

/* file rows in the o-table look */
.frows { display: flex; flex-direction: column; }
.frow { display: grid; grid-template-columns: 34px minmax(0, 1fr) 110px 150px 40px; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); cursor: pointer; transition: background-color .12s ease; }
.frow.fhead { border-top: 0; padding: 8px 12px 10px; cursor: default; }
.frow:not(.fhead):hover { background: color-mix(in srgb, var(--raised) 55%, transparent); border-radius: 4px; }
.frow.sel { background: var(--row-sel) !important; border-radius: 4px; border-top-color: transparent; }
.frow.sel + .frow, .frow:not(.fhead):hover + .frow { border-top-color: transparent; }
.fh { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 500; cursor: pointer; padding: 4px 0; }
.fh:hover, .fh.on { color: var(--text); }
.sort-caret { width: 13px; height: 13px; }
.sort-caret.up { transform: rotate(180deg); }
.fname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ftxt { display: flex; flex-direction: column; min-width: 0; }
.fnm { font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow.sel .fnm { font-weight: 600; }
.fmeta { display: none; font-size: 12.5px; color: var(--faint); }
.fsize { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
.fdate { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.frow.fhead .fsize, .frow.fhead .fdate { font-family: var(--font); }
.more { width: 36px; height: 36px; border-radius: 3px; display: grid; place-items: center; color: var(--faint); cursor: pointer; justify-self: end; }
.more:hover, .more:focus-visible { background: var(--raised); color: var(--text); }
.dragging { opacity: .45; }
.frow.droptarget, .tile.droptarget, .root-card.droptarget { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 4px; background: var(--accent-soft); }

/* type colours (KIND_CLASS): images violet, video pink, audio orange, pdf/docs cyan, other gray */
.ico { width: 40px; height: 40px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; background: var(--t-gray-bg); color: var(--t-gray-fg); }
.ico .ui-icon { width: 19px; height: 19px; }
.ico.dir, .ico.k-img { background: var(--t-violet-bg); color: var(--t-violet-fg); }
.ico.k-vid { background: var(--t-pink-bg); color: var(--t-pink-fg); }
.ico.k-aud { background: var(--t-orange-bg); color: var(--t-orange-fg); }
.ico.k-pdf, .ico.k-doc { background: var(--t-cyan-bg); color: var(--t-cyan-fg); }
.ico.k-vault { background: var(--primary-bg); color: var(--primary-fg); }

/* trash */
.trash-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 6px 8px; }
.frow.trashrow { grid-template-columns: 4px minmax(0, 1fr) 110px 130px auto; cursor: default; }
.trash-act { display: inline-flex; gap: 4px; justify-self: end; }

/* grid view */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; padding: 6px 4px 4px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line-strong); cursor: pointer; min-width: 0; transition: box-shadow .12s ease; }
.tile:hover { box-shadow: inset 0 0 0 1px var(--faint); }
.tile.sel { box-shadow: inset 0 0 0 2px var(--accent); background: var(--row-sel); }
.thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 4px; background: var(--raised); display: grid; place-items: center; overflow: hidden; }
.thumb .ico { width: 58px; height: 58px; border-radius: 4px; }
.thumb .ico .ui-icon { width: 26px; height: 26px; }
.thumb.has img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playmark { position: absolute; inset: auto auto 10px 10px; width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center; background: #fff; color: #16141C; }
.playmark .ui-icon { width: 15px; height: 15px; fill: currentColor; }
.tlabel { display: flex; flex-direction: column; gap: 2px; padding: 0 4px 2px; min-width: 0; }
.tlabel b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlabel small { color: var(--faint); font-size: 12.5px; }
.o-app .tile .fchk { position: absolute; top: 18px; left: 18px; z-index: 2; background: var(--surface); }
.o-app .tile .fchk:checked { background: var(--accent); }
.tile .more { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--surface); }

/* spaces / shared folders at the top level, in the o-folder look */
.root-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.root-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; min-width: 0; cursor: pointer; background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius-xl); box-shadow: var(--card-shadow); transition: box-shadow .15s ease; }
.root-card:hover { box-shadow: inset 0 0 0 2px var(--line-strong), var(--card-shadow); }
.root-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.root-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.root-folder-icon { width: 46px; height: 46px; border-radius: 4px; display: grid; place-items: center; background: var(--t-violet-bg); color: var(--t-violet-fg); }
.root-card.is-shared .root-folder-icon { background: var(--t-orange-bg); color: var(--t-orange-fg); }
.root-folder-icon .ui-icon { width: 20px; height: 20px; }
.root-card-arrow { color: var(--faint); }
.root-eyebrow { display: none; }
#view .root-card h3 { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.root-desc { color: var(--faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.root-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 14px; min-height: 38px; }
.root-open { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; }
.root-open::after { content: " \2192"; }
.root-actions { display: flex; gap: 6px; }
.root-manage .ui-icon, .root-delete .ui-icon { width: 16px; height: 16px; }

/* drop zone */
.dropveil { position: absolute; inset: -6px; z-index: 20; display: grid; place-items: center; border-radius: var(--radius-xl); border: 2px dashed var(--accent); background: color-mix(in srgb, var(--bg) 78%, transparent); font-size: 18px; font-weight: 600; pointer-events: none; }
.vault-drop-hint { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 14px; border-radius: var(--radius-lg); border: 1px dashed var(--line-strong); color: var(--faint); font-size: 13.5px; }
.vault-drop-hint .ui-icon { width: 18px; height: 18px; }
.vault-drop-hint small { font-size: 12.5px; }
.files.at-root .vault-drop-hint, .files.at-trash .vault-drop-hint { display: none; }


/* share editor (opens above the list) */
.share-edit { padding: 20px 24px; }
.share-edit h3 { font-size: 17px; }

/* ---------- dialogs, menu, picker ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: var(--overlay); backdrop-filter: blur(4px); }
.modal-card { width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--pop-shadow); border-color: var(--line-strong); }
.modal-card h3 { font-size: 19px; font-weight: 600; }
.modal-card > p { color: var(--muted); font-size: 14.5px; }
.modal-card .row-btns { justify-content: flex-end; flex-direction: row-reverse; margin-top: 4px; }
.destpick { display: flex; flex-direction: column; gap: 10px; }
.pick-where { font-weight: 600; font-size: 15px; }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow: auto; padding: 4px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line-strong); }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 10px; border-radius: 3px; font-size: 14.5px; color: var(--text); cursor: pointer; }
.pick-row:hover, .pick-row:focus-visible { background: var(--raised); }
.pick-row .ico { width: 32px; height: 32px; border-radius: 3px; }
.pick-row .ico .ui-icon { width: 16px; height: 16px; }
.pick-list .note { padding: 12px 10px; }
.ctx { position: fixed; z-index: 120; min-width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 5px; box-shadow: var(--pop-shadow); }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 5px 6px; }
.ctx-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border-radius: 3px; font-size: 14px; color: var(--text); cursor: pointer; }
.ctx-item .ui-icon { width: 17px; height: 17px; color: var(--faint); }
.ctx-item:hover, .ctx-item:focus-visible { background: var(--raised); outline: 0; }
.ctx-item.danger, .ctx-item.danger .ui-icon { color: var(--danger); }

/* ---------- media viewer and text viewer (dark in both themes) ---------- */
.lb { position: fixed; inset: 0; z-index: 150; background: rgba(8, 7, 12, .94); color: #F2F0F7; }
.lb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.lb-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-count { font-family: var(--mono); font-size: 13px; color: #A6A3B8; }
.o-app .lb-btn { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 3px; background: rgba(255, 255, 255, .1); color: #F2F0F7; }
.o-app .lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-stage { position: absolute; inset: 64px 0 0; display: grid; place-items: center; padding: 12px 16px 24px; overflow: auto; }
.lb-media { max-width: 100%; max-height: 100%; border-radius: 3px; cursor: zoom-in; }
video.lb-media { cursor: default; }
.lb-media.full { max-width: none; max-height: none; cursor: zoom-out; }
.lb-nav { position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px; border-radius: 99px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); color: #F2F0F7; cursor: pointer; }
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-nav svg { width: 22px; height: 22px; }
.lb-msg { color: #A6A3B8; }
.lb-textstage { place-items: start center; }
.lb-text { width: min(960px, 100%); margin: 0; padding: 18px 20px; border-radius: 4px; background: #0E0D13; border: 1px solid #2B2935; color: #EEECF5; font-family: var(--mono); font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.lb :focus-visible { outline-color: var(--c-ink); }

/* ---------- music player: one slim floating line (track · controls + progress · volume) ---------- */
.player {
  position: fixed; z-index: 90; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(840px, calc(100% - 32px));
  display: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) auto; align-items: center; gap: 18px; padding: 8px 12px 8px 8px;
  border-radius: 5px; border: 1px solid var(--line-strong); box-shadow: var(--pop-shadow);
  background: color-mix(in srgb, var(--surface) 84%, transparent); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
}
.player.on { display: grid; }
.pl-track { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pl-cover { width: 42px; height: 42px; flex: none; border-radius: 3px; display: grid; place-items: center; background-color: var(--t-violet-bg); color: var(--t-violet-fg); background-size: cover; background-position: center; }
.pl-cover svg { width: 18px; height: 18px; }
.pl-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pl-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pl-ctl { display: flex; align-items: center; gap: 2px; flex: none; }
.pl-btn { width: 34px; height: 34px; border-radius: 99px; display: grid; place-items: center; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s; }
.pl-btn:hover { color: var(--text); background: var(--raised); }
.pl-btn svg { width: 17px; height: 17px; }
.pl-play { width: 38px; height: 38px; margin: 0 2px; }
.pl-play svg { width: 15px; height: 15px; }
.pl-row { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.pl-time { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none; min-width: 32px; text-align: center; }
.pl-side { display: flex; align-items: center; gap: 2px; }
.pl-volume { display: flex; align-items: center; gap: 4px; }
.pl-volume-range { width: 84px; }
/* thin tracks filled with the logo gradient up to --range-pct (set by media.js) */
.pl-seek, .pl-volume-range { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; height: 18px; margin: 0; background: transparent; cursor: pointer; accent-color: initial; }
.pl-volume-range { flex: none; }
.pl-seek::-webkit-slider-runnable-track, .pl-volume-range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 99px;
  background: linear-gradient(90deg, var(--c2), var(--c3)) 0 0 / var(--range-pct, 0%) 100% no-repeat, var(--meter-empty);
}
.pl-seek::-webkit-slider-thumb, .pl-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; border: 0;
  background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c3) 40%, transparent), 0 1px 4px rgba(0, 0, 0, .3);
  transform: scale(0); transition: transform .15s ease;
}
.player:hover .pl-seek::-webkit-slider-thumb, .player:hover .pl-volume-range::-webkit-slider-thumb,
.pl-seek:focus-visible::-webkit-slider-thumb, .pl-volume-range:focus-visible::-webkit-slider-thumb { transform: scale(1); }
.pl-seek::-moz-range-track, .pl-volume-range::-moz-range-track { height: 4px; border-radius: 99px; background: var(--meter-empty); }
.pl-seek::-moz-range-progress, .pl-volume-range::-moz-range-progress { height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--c2), var(--c3)); }
.pl-seek::-moz-range-thumb, .pl-volume-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c3) 40%, transparent); }
@media (pointer: coarse) { .pl-seek::-webkit-slider-thumb, .pl-volume-range::-webkit-slider-thumb { transform: scale(1); } }

/* ---------- OCTA Vault viewer (vault.js) ---------- */
.vault-title { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.vault-title h1 { font-size: 40px; letter-spacing: -.03em; line-height: 1.05; font-weight: 700; overflow-wrap: anywhere; }
.vault-icon { width: 56px; height: 56px; border-radius: 4px; }
#view > .files-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; flex-direction: row; }
#view > .files-bar .files-tools { width: auto; flex: 1; justify-content: flex-end; }
#view > .files-bar .files-tools input { flex: 1; max-width: 340px; }
.fname.dir, a.fname { color: var(--text); font-weight: 500; }
a.fname:hover { text-decoration: underline; }
.vpreview { margin-top: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.vp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vp-media { max-width: 100%; max-height: 62vh; border-radius: 4px; align-self: center; }
.vp-audio { width: 100%; }
.vp-text { margin: 0; padding: 14px; border-radius: 4px; background: var(--surface-2); font-family: var(--mono); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; overflow: auto; }

/* ---------- medium widths ---------- */
@media (max-width: 1280px) {
  .o-bar { gap: 12px; }
  .o-tabs { margin-left: 6px; }
  .o-tabs a { padding: 10px 12px; }
  .o-search { min-width: 200px; }
}
@media (max-width: 1100px) {
  .vault-account-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) and (min-width: 821px) {
  .o-tabs a .lbl { display: none; }
  .o-tabs a .lbl-short { display: inline; }
}

/* ---------- phone ---------- */
@media (max-width: 820px) {
  .o-shell { padding: 12px 12px 28px; }
  .o-bar { padding: 10px; border-radius: 5px; }
  .o-bar-spacer { display: block; }
  .o-tabs { gap: 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .o-tabs::-webkit-scrollbar { display: none; }
  .o-tabs a { flex: none; padding: 0 14px; min-height: 44px; }
  .o-tabs a .lbl { display: none; }
  .o-tabs a .lbl-short { display: inline; }
  .o-search { height: 48px; }
  .o-search .o-kbd { display: none; }
  .o-user-menu { right: 0; }
  .content { margin-top: 22px; }
  .o-h1 { font-size: 40px; }
  .page-head { margin-bottom: 20px; }
  #view h2, .section-title { margin-top: 28px; }
  .o-app button.small { min-height: 44px; }
  .o-app button.iconbtn { width: 44px; }

  .files-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .files-heading-text { width: 100%; }
  .tool-actions { width: 100%; }
  .o-app .tool-actions button.small { flex: 1 1 auto; }
  .o-app .tool-actions button.iconbtn { flex: 0 0 46px; }
  .files { gap: 18px; }
  .files-panel { padding: 8px 8px 10px; border-radius: 5px; }
  .tool-filter-group { gap: 8px; }
  .tool-search { flex: 1 1 100%; max-width: none; height: 46px; }
  .tool-sort { margin-left: 0; }
  #view .tool-sort .fsort { height: 44px; width: 120px; }
  .o-app .seg { margin-left: auto; }
  .o-app .seg button.ghost { width: 38px; height: 38px; }
  .files-top { min-height: 0; flex-direction: column; }
  .files-top:has(.selbar:not([hidden])) .files-tools { display: none; }
  .selbar { position: static; flex-wrap: wrap; padding: 8px; gap: 8px; width: 100%; }
  /* touch targets: at least 44 px */
  .o-app button.link { min-height: 44px; padding: 0 10px; }
  .o-app .seg button.ghost { width: 44px; height: 44px; }
  .o-seg button { min-height: 44px; }
  /* path capsule: 44 px tap targets inside, Back button the same height as the capsule */
  .crumbs { height: 52px; }
  .crumbs a, .crumb-current { min-height: 44px; }
  .o-app button.backbtn { width: 52px; height: 52px; }
  .fh { min-height: 44px; }
  .o-app .root-manage, .o-app .lb-btn, .o-btn-sm, .o-app .step button.small { min-height: 44px; height: 44px; }
  .o-app .root-delete, .o-app .step button.small { width: 44px; height: 44px; }
  .selbar .grow { display: none; }
  .selcount { flex: 1 1 calc(100% - 60px); }
  .selbar > button:not(.iconbtn) { flex: 1 1 calc(50% - 4px); }
  .crumbs { font-size: 14.5px; }

  .frow { grid-template-columns: 30px minmax(0, 1fr) 44px; gap: 10px; padding: 9px 8px; min-height: 60px; }
  .frow .fsize, .frow .fdate { display: none; }
  .frow.fhead { min-height: 0; }
  .fmeta { display: block; }
  .more { width: 44px; height: 44px; }
  .frow.trashrow { grid-template-columns: 0 minmax(0, 1fr); row-gap: 6px; }
  .trash-act { grid-column: 2; justify-self: start; }
  .o-app input[type="checkbox"] { width: 22px; height: 22px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .root-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .root-card { padding: 16px; min-width: 0; }
  .root-card-bottom { flex-wrap: wrap; }
  .root-actions { width: 100%; min-width: 0; }
  .o-app .root-manage { flex: 1; min-width: 0; padding: 0 10px; }
  .root-manage .ui-icon { display: none; }
  .root-manage span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vault-drop-hint { display: none; }

  .meter { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .meter-icon { display: none; }
  .meter-wrap:not(:empty), .home-storage { padding: 18px 20px; }
  .panel, .share-edit { padding: 18px; }
  .kv, .props { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd, .props dd { margin-bottom: 10px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .table { display: block; overflow-x: auto; }
  .table td.act { white-space: normal; }
  .o-feature { padding: 18px; }
  .ctx { border-radius: 5px; }
  .ctx-item { min-height: 48px; }

  /* phone: track + controls + mute/close on one line, progress under it */
  .player { bottom: 10px; width: calc(100% - 20px); grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "track ctl side" "row row row"; gap: 2px 6px; padding: 8px 8px 6px; border-radius: 5px; }
  .pl-track { grid-area: track; }
  .pl-main { display: contents; }
  .pl-ctl { grid-area: ctl; }
  .pl-row { grid-area: row; padding: 0 6px; }
  .pl-side { grid-area: side; }
  .pl-volume { display: none; } /* the phone's own volume buttons do this */
  .pl-btn { width: 44px; height: 44px; }
  .pl-play { width: 44px; height: 44px; }
  .pl-cover { width: 40px; height: 40px; }
  .pl-seek { height: 24px; }
  .lb-nav { width: 44px; height: 44px; }
}
@media (max-width: 400px) {
  .o-h1 { font-size: 34px; }
  .o-bar-logo img { height: 31px; }
  .root-card { padding: 14px; }
  .root-card-top { margin-bottom: 12px; }
}
@media (max-width: 340px) {
  .root-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .o-app *, .o-app *::before, .o-app *::after { transition: none !important; animation: none !important; }
}

/* =====================================================================
   Gradient accents (OCTA Vault style) instead of the white "primary" pills:
   main buttons, the active tab and segment get a dark fill with a gradient
   frame and gradient text; page titles use the logo gradient.
   ===================================================================== */
:root, :root[data-theme="dark"] {
  --grad-line: linear-gradient(90deg, var(--c2) 0%, var(--c3) 60%, var(--c4) 100%);
  --grad-ink: linear-gradient(90deg, color-mix(in srgb, var(--c2) 65%, #fff) 0%, color-mix(in srgb, var(--c3) 65%, #fff) 55%, color-mix(in srgb, var(--c4) 65%, #fff) 100%);
  --grad-icon: color-mix(in srgb, var(--c3) 70%, #fff);
  --grad-title: linear-gradient(90deg, var(--c1) 0%, var(--c2) 32%, var(--c3) 68%, var(--c4) 100%);
  --btn-fill: var(--surface);
  --btn-fill-hover: var(--raised);
}
:root[data-theme="light"] {
  --grad-line: linear-gradient(90deg, color-mix(in srgb, var(--c2) 85%, #000) 0%, color-mix(in srgb, var(--c3) 80%, #000) 60%, color-mix(in srgb, var(--c4) 75%, #000) 100%);
  --grad-ink: linear-gradient(90deg, color-mix(in srgb, var(--c2) 80%, #000) 0%, color-mix(in srgb, var(--c3) 75%, #000) 55%, color-mix(in srgb, var(--c4) 75%, #000) 100%);
  --grad-icon: color-mix(in srgb, var(--c3) 75%, #000);
  --grad-title: linear-gradient(90deg, color-mix(in srgb, var(--c1) 88%, #000) 0%, color-mix(in srgb, var(--c2) 85%, #000) 32%, color-mix(in srgb, var(--c3) 80%, #000) 68%, color-mix(in srgb, var(--c4) 75%, #000) 100%);
  --btn-fill-hover: color-mix(in srgb, var(--c3) 4%, #fff);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --grad-line: linear-gradient(90deg, color-mix(in srgb, var(--c2) 85%, #000) 0%, color-mix(in srgb, var(--c3) 80%, #000) 60%, color-mix(in srgb, var(--c4) 75%, #000) 100%);
    --grad-ink: linear-gradient(90deg, color-mix(in srgb, var(--c2) 80%, #000) 0%, color-mix(in srgb, var(--c3) 75%, #000) 55%, color-mix(in srgb, var(--c4) 75%, #000) 100%);
    --grad-icon: color-mix(in srgb, var(--c3) 75%, #000);
    --grad-title: linear-gradient(90deg, color-mix(in srgb, var(--c1) 88%, #000) 0%, color-mix(in srgb, var(--c2) 85%, #000) 32%, color-mix(in srgb, var(--c3) 80%, #000) 68%, color-mix(in srgb, var(--c4) 75%, #000) 100%);
    --btn-fill-hover: color-mix(in srgb, var(--c3) 4%, #fff);
  }
}
/* the password card is dark in both themes, so it always uses the dark gradients */
.o-feature {
  --grad-line: linear-gradient(90deg, var(--c2) 0%, var(--c3) 60%, var(--c4) 100%);
  --grad-ink: linear-gradient(90deg, color-mix(in srgb, var(--c2) 65%, #fff) 0%, color-mix(in srgb, var(--c3) 65%, #fff) 55%, color-mix(in srgb, var(--c4) 65%, #fff) 100%);
  --grad-icon: color-mix(in srgb, var(--c3) 70%, #fff);
  --btn-fill: #1E1C27; --btn-fill-hover: #2B2935;
}

/* gradient frame + gradient text (layers: text, fill, frame) */
.o-app button.primary,
.o-app .o-tabs a[aria-current="page"],
.o-app .o-seg button[aria-pressed="true"], .o-app .o-seg button[aria-selected="true"],
.o-app .o-feature .o-seg button[aria-pressed="true"], .o-app .o-feature .o-seg button[aria-selected="true"],
.o-app .seg button.ghost[aria-pressed="true"] {
  color: transparent;
  border: 1.5px solid transparent;
  box-shadow: none;
  background-color: transparent;
  background-image: var(--grad-ink), linear-gradient(var(--btn-fill), var(--btn-fill)), var(--grad-line);
  -webkit-background-clip: text, padding-box, border-box;
  background-clip: text, padding-box, border-box;
  background-origin: border-box;
}
.o-app button.primary:hover:not(:disabled),
.o-app .o-tabs a[aria-current="page"]:hover {
  opacity: 1;
  background-image: var(--grad-ink), linear-gradient(var(--btn-fill-hover), var(--btn-fill-hover)), var(--grad-line);
  box-shadow: 0 0 18px color-mix(in srgb, var(--c3) 18%, transparent);
}
.o-app button.primary svg, .o-app .o-seg button[aria-pressed="true"] svg, .o-app .seg button.ghost[aria-pressed="true"] svg { stroke: var(--grad-icon); }
.o-app .o-tabs a[aria-current="page"] { font-weight: 600; }
.o-app .o-seg button, .o-app .seg button.ghost { border: 1.5px solid transparent; }

/* music player play button and the "available" app tile: logo gradient fill */
.pl-play, .pl-play:hover { background: var(--brand); color: #16141C; }
.tile-primary, .ico.k-vault { background: var(--brand); color: #16141C; }

/* page titles in the logo gradient */
.o-h1, .vault-title h1 {
  display: inline-block; max-width: 100%;
  background-image: var(--grad-title);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  padding-bottom: .08em; /* keeps descenders (g, y) inside the painted area */
}

/* Admin: Users | Storage switch under the page title (same look as the other segmented controls) */
.admin-tabs { display: inline-flex; gap: 2px; padding: 4px; margin: -8px 0 22px; border-radius: var(--radius-sm); background: var(--raised); }
.admin-tabs a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 3px; border: 1.5px solid transparent; font-size: 14px; font-weight: 600; color: var(--muted); }
.admin-tabs a:hover { color: var(--text); }
.o-app .admin-tabs a[aria-current="page"] {
  color: transparent;
  background-image: var(--grad-ink), linear-gradient(var(--btn-fill), var(--btn-fill)), var(--grad-line);
  -webkit-background-clip: text, padding-box, border-box; background-clip: text, padding-box, border-box; background-origin: border-box;
}
#view > .admin-tabs + h2 { margin-top: 6px; }
@media (max-width: 820px) { .admin-tabs a { min-height: 44px; } }

/* ---------- phone top bar: logo · search · theme · avatar, then the sections as icons ---------- */
.o-search-btn { display: none; }
.o-app .o-tabs a[aria-current="page"] svg { stroke: var(--grad-icon); }
@media (max-width: 820px) {
  .o-search-btn {
    display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: var(--radius-md);
    background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted);
  }
  :root[data-theme="light"] .o-search-btn { border-color: transparent; }
  .o-search-btn:hover, .o-search-btn[aria-expanded="true"] { color: var(--text); }
  /* the search field only shows after tapping the magnifier */
  .o-search { display: none; }
  body.command-mobile-open .o-search { display: flex; }
  /* sections as icons spread over the row; the names stay for screen readers */
  .o-tabs { justify-content: space-between; overflow: visible; gap: 2px; }
  .o-tabs a { flex: 1 1 0; justify-content: center; min-width: 44px; padding: 0; }
  .o-app .o-tabs a svg { display: block; width: 21px; height: 21px; }
  .o-tabs a .lbl, .o-tabs a .lbl-short { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .o-tabs a.busy::after { top: 6px; right: calc(50% - 18px); }
  /* active icon tab: gradient frame + gradient icon, no gradient text layer (it would paint the hidden label) */
  /* also for :hover - phones keep the hover state after a tap, and the desktop hover rule adds the text layer back */
  .o-app .o-tabs a[aria-current="page"], .o-app .o-tabs a[aria-current="page"]:hover {
    color: var(--text); box-shadow: none;
    background-image: linear-gradient(var(--btn-fill), var(--btn-fill)), var(--grad-line);
    -webkit-background-clip: padding-box, border-box; background-clip: padding-box, border-box;
  }
}
@media (prefers-color-scheme: light) { :root:not([data-theme]) .o-search-btn { border-color: transparent; } }

/* ---------- slightly rounded corners (about 75% less rounding than the v9 package); round things (player buttons, pills, bars) stay round ---------- */
:root { --radius-xl: 7px; --radius-lg: 5px; --radius-md: 4px; --radius-sm: 4px; }
.o-tile, .o-app .o-ext, .o-pw, .o-seg, .o-feature, .o-bar { border-radius: var(--radius-sm); }
.o-tile { border-radius: 5px; }
.o-feature { border-radius: var(--radius-xl); }
.o-bar { border-radius: var(--radius-lg); }
.o-seg button, .o-kbd, .o-app input[type="checkbox"] { border-radius: 3px; }
.o-avatar, .o-user-btn { border-radius: var(--radius-md); }

/* ---------- Twitch Tracker ---------- */
.app-card.is-link { color: var(--text); transition: box-shadow .15s ease; }
.app-card.is-link:hover { box-shadow: inset 0 0 0 2px var(--line-strong), var(--card-shadow); }
.tt-search { padding: 18px 20px; position: relative; display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.tt-search-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tt-field { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--faint); }
.tt-field:focus-within { border-color: var(--accent); }
#view .tt-field input { flex: 1; height: 44px; padding: 0; border: 0; background: transparent; }
#view .tt-field input:focus, #view .tt-field input:focus-visible { outline: none; box-shadow: none; border: 0; }
.tt-field:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.tt-results { position: absolute; left: 20px; right: 20px; top: 76px; z-index: 40; max-height: 360px; overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--pop-shadow); }
.tt-result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text); cursor: pointer; text-align: left; }
.tt-result:hover, .tt-result:focus-visible { background: var(--raised); }
.tt-result-text { display: flex; flex-direction: column; min-width: 0; }
.tt-result-text b { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-result-text small { color: var(--faint); font-size: 12.5px; }
.tt-empty { padding: 14px 12px; color: var(--muted); font-size: 14px; }
.tt-avatar { width: 40px; height: 40px; flex: none; border-radius: var(--radius-md); overflow: hidden; display: grid; place-items: center; font-weight: 700; text-transform: uppercase; color: #fff; background: var(--brand-avatar); }
.tt-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-avatar.sm { width: 26px; height: 26px; font-size: 12px; border-radius: 3px; }
.tt-avatar.lg { width: 72px; height: 72px; font-size: 28px; border-radius: var(--radius-lg); }
#view .tt-saved-head h3 { font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.tt-saved { display: flex; gap: 8px; flex-wrap: wrap; }
.tt-chip { display: inline-flex; align-items: center; border-radius: var(--radius-sm); background: var(--raised); border: 1px solid transparent; }
.tt-chip.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.tt-chip-open { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 7px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.tt-chip-x { width: 32px; height: 40px; display: grid; place-items: center; color: var(--faint); cursor: pointer; }
.tt-chip-x:hover { color: var(--danger); }
.tt-chip-x .o-icon { width: 14px; height: 14px; }
.tt-hint { display: flex; align-items: center; gap: 14px; color: var(--muted); padding: 22px; }
.tt-hint .o-icon { width: 26px; height: 26px; color: var(--faint); flex: none; }
.tt-profile { display: flex; flex-direction: column; gap: 18px; }
.tt-head { display: flex; align-items: center; gap: 18px; padding: 20px; flex-wrap: wrap; }
.tt-who { flex: 0 1 auto; min-width: 160px; display: flex; flex-direction: column; gap: 8px; }
#view .tt-who h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.tt-who p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt-badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; color: var(--muted); background: var(--raised); }
.tt-badge.twitch { color: var(--t-violet-fg); background: var(--t-violet-bg); }
.tt-badge.kick { color: var(--ok-fg); background: var(--ok-soft); }
.tt-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text); padding: 4px 6px; border-radius: 3px; }
.tt-link:hover { background: var(--raised); }
.tt-link .o-icon { width: 14px; height: 14px; }
.tt-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.tt-star .o-icon { width: 16px; height: 16px; }
.tt-star[aria-pressed="true"] { color: var(--t-orange-fg); }
.tt-star[aria-pressed="true"] .o-icon { fill: currentColor; }
.tt-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tt-stats > .note { grid-column: 1 / -1; }
.tt-stat { display: flex; align-items: center; gap: 14px; padding: 18px; min-width: 0; }
.tt-stat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.tt-stat b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-stat small { color: var(--faint); font-size: 13px; }
.tt-stat-icon { width: 44px; height: 44px; flex: none; border-radius: var(--radius-md); display: grid; place-items: center; color: var(--t-violet-fg); background: var(--t-violet-bg); }
.tt-ranking { padding: 8px 10px 10px; }
.tt-ranking-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 12px 10px 8px; }
#view .tt-ranking-head h3 { font-size: 17px; }
.tt-list { display: flex; flex-direction: column; }
.tt-list > .note, .tt-list > .empty { padding: 14px 10px; }
.tt-row { display: grid; grid-template-columns: 30px 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px; border-top: 1px solid var(--line); color: var(--text); border-radius: 0; }
.tt-row:first-child { border-top: 0; }
.tt-row:hover { background: color-mix(in srgb, var(--raised) 55%, transparent); border-radius: var(--radius-sm); }
.tt-rank { font-family: var(--mono); font-size: 13px; color: var(--faint); text-align: center; }
.tt-row-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tt-row-top { display: flex; justify-content: space-between; gap: 12px; }
.tt-row-top b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-time { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.tt-bar { height: 6px; border-radius: 99px; background: var(--meter-empty); overflow: hidden; }
.tt-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--c2), var(--c3) 70%, var(--c4)); }
.tt-row small { color: var(--faint); font-size: 12.5px; }
@media (max-width: 820px) {
  .tt-search { padding: 14px; }
  .tt-results { left: 14px; right: 14px; top: 70px; }
  .tt-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tt-stat { padding: 14px 16px; }
  .tt-head { padding: 16px; }
  .tt-head-actions { width: 100%; justify-content: space-between; }
  .tt-chip-open { min-height: 44px; }
  .tt-chip-x { width: 44px; height: 44px; }
  .tt-row { grid-template-columns: 22px 36px minmax(0, 1fr); gap: 10px; padding: 10px 6px; }
  .tt-row .tt-avatar { width: 36px; height: 36px; }
  .tt-link { min-height: 44px; }
}

/* Twitch Tracker: account facts beside the name */
.tt-facts { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; border-left: 1px solid var(--line); }
.tt-facts[hidden] { display: none; }
.tt-facts .note { margin: 0; }
.tt-facts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 12px 18px; }
.tt-fact { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tt-fact small { font-size: 12px; color: var(--muted); }
.tt-fact b { font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--text); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.tt-fact.live b { color: var(--t-pink-fg); display: flex; align-items: center; gap: 7px; }
.tt-fact.live b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--t-pink-fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--t-pink-fg) 25%, transparent); flex: none; }
.tt-fact.off b { color: var(--muted); }
@media (max-width: 1100px) { .tt-facts { order: 3; flex-basis: 100%; border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; } }
.tt-retry { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tt-retry .note { margin: 0; }

/* Twitch Tracker: reorder saved chips by dragging */
.tt-saved .tt-chip { touch-action: pan-y; -webkit-touch-callout: none; transition: box-shadow .15s ease, transform .15s ease; }
.tt-saved .tt-chip img { -webkit-user-drag: none; user-select: none; }
.tt-saved.sorting, .tt-saved.sorting * { user-select: none; cursor: grabbing; }
.tt-chip.dragging { position: relative; z-index: 2; transform: scale(1.04); border-color: var(--accent); box-shadow: 0 8px 22px rgba(0, 0, 0, .35); background: var(--surface-2); }
.tt-saved.sorting .tt-chip:not(.dragging) { opacity: .75; }

/* Top bar: the page buttons sit in one light frame, like the search field */
.o-app .o-tabs { box-sizing: border-box; height: 46px; align-items: center; align-self: center; flex-wrap: nowrap; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
:root[data-theme="light"] .o-app .o-tabs { border-color: transparent; }
.o-app .o-tabs a { min-height: 38px; padding: 0 14px; }
@media (max-width: 1280px) { .o-app .o-tabs a { padding: 0 11px; } }
@media (max-width: 820px) {
  .o-app .o-tabs { align-self: stretch; height: auto; padding: 3px; }
  .o-app .o-tabs a { min-height: 44px; padding: 0; }
}

/* Storage meter: the tile is a square as tall as the text and bar beside it (sized in files.js),
   with the card's own padding as the space on every side: left = top = bottom = gap to the bar */
.meter-wrap:not(:empty), .home-storage { padding-left: 22px; }
.meter { gap: 22px; align-items: center; }
.meter > .meter-main { align-self: center; } /* natural height: the tile copies it, so it must not stretch to the tile */
#storagePanel { padding-left: 20px; }
#storagePanel .meter { gap: 20px; }
.meter-icon { width: 58px; height: 58px; flex: none; overflow: hidden; align-self: center; }
.meter-icon svg { width: 40%; height: 40%; }
.meter-icon.has-avatar { background: var(--raised); }
.meter-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Top bar on wide screens: always one row; when tight the search folds into the magnifier and opens as a drop-down */
@media (min-width: 821px) {
  .o-app .o-bar { flex-wrap: nowrap; }
  .o-app .o-bar > * { flex-shrink: 0; }
  .o-app .o-bar > .o-search { flex-shrink: 1; min-width: 0; }
  body.o-bar-compact .o-bar-spacer { display: block; flex: 1; }
  body.o-bar-compact .o-search-btn {
    display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: var(--radius-md);
    background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--muted);
  }
  :root[data-theme="light"] body.o-bar-compact .o-search-btn { border-color: transparent; }
  body.o-bar-compact .o-search-btn:hover, body.o-bar-compact .o-search-btn[aria-expanded="true"] { color: var(--text); }
  body.o-bar-compact .o-search { display: none; }
  body.o-bar-compact.command-mobile-open .o-search {
    display: flex; position: absolute; top: calc(100% + 8px); right: 10px; width: min(460px, calc(100% - 20px)); max-width: none;
    z-index: 40; box-shadow: var(--pop-shadow);
  }
}

/* Top bar: a soft brand rainbow fills the whole bar background and flows slowly from left to right, without a seam.
   The layer is two identical colour cycles wide and slides by exactly one cycle, so the loop is invisible.
   It sits at z-index -1 inside the bar (above the bar's own background, behind everything on it) and is clipped to the bar,
   so menus that hang below the bar are not cut. Only a transform is animated. */
.bar-sweep { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; opacity: .075; }
.bar-sweep i {
  position: absolute; top: 0; bottom: 0; left: 0; width: 200%;
  /* one smooth, mirrored cycle per half: red > pink > violet > blue > violet > pink > red, blended in OKLab (no muddy or hard seams) */
  background: linear-gradient(90deg, var(--c1) 0%, var(--c2) 8.33%, var(--c3) 16.67%, var(--c4) 25%, var(--c3) 33.33%, var(--c2) 41.67%,
    var(--c1) 50%, var(--c2) 58.33%, var(--c3) 66.67%, var(--c4) 75%, var(--c3) 83.33%, var(--c2) 91.67%, var(--c1) 100%);
  background: linear-gradient(90deg in oklab, var(--c1) 0%, var(--c2) 8.33%, var(--c3) 16.67%, var(--c4) 25%, var(--c3) 33.33%, var(--c2) 41.67%,
    var(--c1) 50%, var(--c2) 58.33%, var(--c3) 66.67%, var(--c4) 75%, var(--c3) 83.33%, var(--c2) 91.67%, var(--c1) 100%);
  transform: translateX(-50%); will-change: transform;
  animation: bar-sweep 8s linear infinite;
}
/* very fine static grain over the colours: it breaks up the visible steps a faint gradient would otherwise show */
.bar-sweep::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: overlay; opacity: .9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes bar-sweep { to { transform: translateX(0); } }
:root[data-theme="light"] .bar-sweep { opacity: .18; } /* light colours tint a white bar far less, so it needs more */
@media (prefers-color-scheme: light) { :root:not([data-theme]) .bar-sweep { opacity: .18; } :root:not([data-theme]) .meter-glow { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .bar-sweep i { animation: none; } }

/* Storage meter tile: the login page's square glow instead of a round shadow under it */
.meter { isolation: isolate; } /* the glow (z-index -1) stays above the card's background */
.meter-tile { position: relative; display: grid; align-self: center; flex: none; }
.meter-tile .meter-icon { box-shadow: none; }
.meter-glow {
  position: absolute; inset: -3px; z-index: -1; pointer-events: none;
  border-radius: calc(var(--radius-md) + 3px); overflow: hidden; filter: blur(14px); opacity: .5;
  transform: translateZ(0);
}
.meter-glow i {
  position: absolute; left: 50%; top: 50%; width: 170%; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--c1) 0%, var(--c2) 12.5%, var(--c3) 25%, var(--c4) 37.5%, var(--c3) 50%, var(--c4) 62.5%, var(--c3) 75%, var(--c2) 87.5%, var(--c1) 100%);
  transform: translate(-50%, -50%) rotate(0deg); will-change: transform;
  animation: meter-glow-spin 12s linear infinite;
}
@keyframes meter-glow-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .meter-glow i { animation: none; } }
:root[data-theme="light"] .meter-glow { opacity: .35; }
@media (max-width: 820px) { .meter-tile { display: none; } }

/* Cloud: space cards (My files, shared folders) — wider, gradient icon tile beside the title, status chip, soft brand glow */
.root-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.root-card {
  position: relative; gap: 0; padding: 22px; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c2) 8%, transparent), transparent 55%), var(--surface);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.root-card.is-shared { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, #ff8a3d 8%, transparent), transparent 55%), var(--surface); }
.root-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--card-border)); box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--c3) 55%, transparent), var(--card-shadow); }
.root-card-head { display: flex; align-items: center; gap: 16px; min-width: 0; }
.root-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.root-folder-icon {
  width: 56px; height: 56px; flex: none; border-radius: var(--radius-md); color: #fff;
  background: var(--brand); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--c3) 80%, transparent);
}
.root-card.is-shared .root-folder-icon { color: #fff; background: linear-gradient(135deg, #ff9a3d, #f0328f); box-shadow: 0 10px 24px -12px color-mix(in srgb, #ff7a3d 80%, transparent); }
.root-folder-icon .ui-icon { width: 24px; height: 24px; }
#view .root-card h3 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; }
.root-desc { font-size: 13.5px; color: var(--muted); }
.root-card-arrow {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%;
  color: var(--muted); background: var(--raised); transition: transform .18s ease, color .18s ease, background .18s ease;
}
.root-card-arrow .ui-icon { width: 18px; height: 18px; }
.root-card:hover .root-card-arrow { transform: translateX(3px); color: #fff; background: var(--brand); }
.root-card-bottom { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); min-height: 38px; }
.root-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--t-violet-fg); background: var(--t-violet-bg); }
.root-card.is-shared .root-chip { color: var(--t-orange-fg); background: var(--t-orange-bg); }
.root-chip .ui-icon { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .root-card, .root-card-arrow { transition: none; } .root-card:hover { transform: none; } .root-card:hover .root-card-arrow { transform: none; } }
@media (max-width: 820px) {
  .root-grid { grid-template-columns: minmax(0, 1fr); }
  .root-card { padding: 18px; }
  .root-folder-icon { width: 48px; height: 48px; }
  .root-card-bottom { margin-top: 16px; padding-top: 14px; }
}

/* ---------- Password creator: follows the light / dark theme, brand accents ---------- */
.o-app .pw-card {
  max-width: 980px; padding: 26px; display: flex; flex-direction: column; gap: 22px; color: var(--text);
  background: radial-gradient(110% 120% at 0% 0%, color-mix(in srgb, var(--c2) 8%, transparent), transparent 55%), var(--surface);
}
.pw-card-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pw-icon {
  width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: var(--radius-md); color: #fff;
  background: var(--brand); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--c3) 80%, transparent);
}
.pw-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pw-title { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 3px; }
.pw-card-head .pw-title > b { font-size: 18px; font-weight: 650; }
.pw-sub { margin: 0; font-size: 13.5px; color: var(--muted); }
.pw-card .tabs.o-seg { background: var(--surface-2); }
.pw-card .tabs.o-seg button { color: var(--muted); }
.pw-card .tabs.o-seg button:hover:not([aria-selected="true"]) { color: var(--text); }
.pw-card .field { color: var(--muted); }
.pw-card .check { color: var(--text); }
.pw-card .step-label { color: var(--muted); }
.pw-card .step-val { color: var(--text); }
.pw-card .note { color: var(--muted); }
.pw-card .settings { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); }
.pw-card .settings hr { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }
/* result: big monospace text in an inset box with a thin brand frame */
.pw-card .o-pw {
  min-height: 64px; padding: 16px 18px; font-size: 21px; letter-spacing: .02em; border-radius: var(--radius-md); color: var(--text);
  border: 1px solid transparent;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
              linear-gradient(90deg, color-mix(in srgb, var(--c2) 55%, var(--line-strong)), color-mix(in srgb, var(--c4) 55%, var(--line-strong))) border-box;
}
/* break between words / at hyphens first; only split inside a word when it cannot fit at all */
.pw-card .o-pw { word-break: normal; overflow-wrap: anywhere; }
.pw-card .o-pw .d { color: #5fd3ff; }
.pw-card .o-pw .s { color: #ff7ab8; }
:root[data-theme="light"] .pw-card .o-pw .d { color: #0a74a8; }
:root[data-theme="light"] .pw-card .o-pw .s { color: #c2187a; }
/* strength: red, orange, violet, then the full brand gradient */
.pw-card .o-strength { gap: 6px; }
.pw-card .o-strength i { height: 6px; background: var(--meter-empty); transition: background .2s ease; }
.pw-card .o-strength[data-level="1"] i.on { background: #ff4b4b; }
.pw-card .o-strength[data-level="2"] i.on { background: #ff9a3d; }
.pw-card .o-strength[data-level="3"] i.on { background: var(--c3); }
.pw-card .o-strength[data-level="4"] i.on { background: linear-gradient(90deg, var(--c2), var(--c3)); }
.pw-card .o-strength[data-level="4"] i.on:nth-child(2) { background: linear-gradient(90deg, var(--c3), color-mix(in srgb, var(--c3) 50%, var(--c4))); }
.pw-card .o-strength[data-level="4"] i.on:nth-child(3) { background: linear-gradient(90deg, color-mix(in srgb, var(--c3) 50%, var(--c4)), var(--c4)); }
.pw-card .o-strength[data-level="4"] i.on:nth-child(4) { background: linear-gradient(90deg, var(--c4), var(--c4)); }
.pw-card .pw-strength { color: var(--muted); font-weight: 600; }
.pw-card .o-btn-brand { min-width: 96px; }
/* sliders: name and value pill on one line, a gradient-filled track below */
.pw-slider { gap: 10px; }
.pw-slider-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pw-val { min-width: 40px; padding: 3px 10px; border-radius: 99px; text-align: center; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--t-violet-fg); background: var(--t-violet-bg); }
.pw-range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; accent-color: initial; }
.pw-range::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--c2), var(--c3)) 0 0 / var(--range-pct, 50%) 100% no-repeat, var(--meter-empty); }
.pw-range::-moz-range-track { height: 6px; border-radius: 99px; background: var(--meter-empty); }
.pw-range::-moz-range-progress { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--c2), var(--c3)); }
.pw-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c3) 35%, transparent), 0 2px 6px rgba(0, 0, 0, .35); }
.pw-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c3) 35%, transparent), 0 2px 6px rgba(0, 0, 0, .35); }
.pw-range:focus-visible { outline: none; }
.pw-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px color-mix(in srgb, var(--c2) 55%, transparent); }
@media (max-width: 820px) {
  .o-app .pw-card { padding: 18px; gap: 18px; }
  .pw-card-head .tabs.o-seg { width: 100%; }
  .pw-card-head .tabs.o-seg button { flex: 1; min-width: 0; padding: 0 6px; white-space: nowrap; font-size: 13px; }
  .pw-card .o-pw { font-size: 18px; }
}

/* Site password settings: character sets and Length / Version share one row while it fits, then wrap */
.pw-card .pw-settings { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.pw-card .pw-settings .checks { gap: 8px 18px; }
.pw-steps { display: flex; align-items: center; gap: 10px 24px; flex-wrap: wrap; margin-left: auto; }
.pw-steps .step { gap: 8px; }
.pw-steps .step-label { flex: none; margin-right: 4px; }
@media (max-width: 820px) {
  .pw-card .pw-settings { flex-direction: column; align-items: stretch; }
  .pw-steps { margin-left: 0; flex-direction: column; align-items: stretch; gap: 10px; }
  .pw-steps .step-label { flex: 1; }
}

/* ---------- Home shortcuts and app cards: the Cloud space card look (glow, gradient tile, round arrow, hover lift) ---------- */
.quick-card, .app-card {
  position: relative; overflow: hidden; color: var(--text);
  --card-tint: var(--c2); --tile-grad: var(--brand); --tile-glow: var(--c3);
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--card-tint) 8%, transparent), transparent 55%), var(--surface);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.quick-card.t-orange { --card-tint: #ff8a3d; --tile-grad: linear-gradient(135deg, #ff9a3d, #f0328f); --tile-glow: #ff7a3d; }
.quick-card.t-cyan { --card-tint: #00c2ff; --tile-grad: linear-gradient(135deg, #00c2ff, #7e5bff); --tile-glow: #3d8bff; }
a.quick-card:hover, .app-card.is-link:hover {
  transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--card-border));
  box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--tile-glow) 60%, transparent), var(--card-shadow);
}
.quick-card .o-tile, .app-card .o-tile.tile-primary {
  color: #fff; background: var(--tile-grad); border-radius: var(--radius-md);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--tile-glow) 80%, transparent);
}
.quick-card .o-tile { width: 52px; height: 52px; }
.quick-card .o-tile svg, .app-card .o-tile svg { width: 23px; height: 23px; }
.quick-card { padding: 18px 20px; gap: 16px; }
.quick-text { flex: 1; }
.quick-text b { font-size: 16.5px; font-weight: 650; }
.quick-text small { color: var(--muted); }
/* round arrow, turns into the brand gradient on hover */
.card-go {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%;
  color: var(--muted); background: var(--raised); transition: transform .18s ease, color .18s ease, background .18s ease;
}
.card-go svg { width: 17px; height: 17px; }
a.quick-card:hover .card-go, .app-card.is-link:hover .card-go { transform: translateX(3px); color: #fff; background: var(--tile-grad); }
/* app card: bigger, header row + status chip under a thin line */
.app-card { padding: 22px; gap: 0; }
.app-card-head { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.app-card .o-tile { width: 56px; height: 56px; }
.app-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
#view .app-card h3 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; margin: 0; }
.app-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.app-card-bottom { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.app-card .tag { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .quick-card, .app-card, .card-go { transition: none; } a.quick-card:hover, .app-card.is-link:hover { transform: none; } a.quick-card:hover .card-go, .app-card.is-link:hover .card-go { transform: none; } }
@media (max-width: 820px) {
  .app-card { padding: 18px; }
  .quick-card { padding: 16px; }
  .quick-card .o-tile { width: 46px; height: 46px; }
}
/* app cards: same width as the Cloud space cards, so the text has room */
#view .grid:has(> .app-card) { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
@media (max-width: 820px) { #view .grid:has(> .app-card) { grid-template-columns: minmax(0, 1fr); } }

/* gradient tiles: the small symbol inside is dark (like the old Twitch tile), not white */
.quick-card .o-tile, .app-card .o-tile.tile-primary, .root-folder-icon, .root-card.is-shared .root-folder-icon, .pw-icon, .meter-icon:not(.has-avatar) { color: rgba(16, 13, 24, .82); }
.quick-card .o-tile svg, .app-card .o-tile svg, .root-folder-icon svg, .pw-icon svg, .meter-icon svg { stroke-width: 2; }

/* The same soft brand glow in the top-left corner on every content box: Cloud, Admin, Account, dialogs */
.o-app #view .panel, .o-app #view .files-panel, .o-app #view .table, .o-app .share-edit, .o-app .modal-card {
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c2) 7%, transparent), transparent 55%), var(--surface);
}
/* boxes inside boxes stay plain, so the glow is never doubled */
.o-app #view .panel .table, .o-app #view .panel .panel, .o-app #view .pw-body > .panel { background: transparent; }
.o-app #view .files.at-root .files-panel { background: transparent; }

/* Password creator: Length / Version − and + look like the ticked checkboxes (same size and pink), with a larger invisible tap area */
.o-app .pw-card .pw-steps .step button {
  position: relative; width: 20px; height: 20px; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 3px;
  display: inline-grid; place-items: center; font-size: 15px; font-weight: 700; line-height: 1;
  color: #fff; background: var(--accent); box-shadow: none;
  -webkit-background-clip: border-box; background-clip: border-box; background-image: none;
}
.o-app .pw-card .pw-steps .step button:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 85%, #fff); color: #fff; }
.o-app .pw-card .pw-steps .step button:disabled { opacity: .35; }
.o-app .pw-card .pw-steps .step button::before { content: ""; position: absolute; inset: -12px; }
.pw-card .pw-steps .step { gap: 12px; }
.pw-card .pw-steps .step-val { min-width: 26px; }
@media (max-width: 820px) {
  .o-app .pw-card .pw-steps .step button { width: 24px; height: 24px; }
  .o-app .pw-card .pw-steps .step button::before { inset: -10px; }
}

/* Top bar controls: see-through "glass" instead of solid dark boxes, so the bar's rainbow shows through (a little darker than the bar) */
:root:not([data-theme="light"]) .o-app .o-bar :is(.o-tabs, .o-search, .o-search-btn, .o-theme-toggle) {
  background: rgba(8, 6, 12, .32); border-color: rgba(255, 255, 255, .08);
}
:root:not([data-theme="light"]) .o-app .o-tabs { --btn-fill: #1f1522; --btn-fill-hover: #2a1a2e; } /* must be solid: the gradient frame is a layer behind the fill */
:root:not([data-theme="light"]) .o-app .o-tabs a:not([aria-current="page"]):hover { background: rgba(255, 255, 255, .06); }
:root:not([data-theme="light"]) .o-app .o-bar .o-kbd { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .08); }
:root[data-theme="light"] .o-app .o-bar :is(.o-tabs, .o-search, .o-search-btn, .o-theme-toggle) { background: rgba(255, 255, 255, .55); }
/* the search that drops down under the bar sits over the page, so it stays solid */
:root body.o-app.o-bar-compact.command-mobile-open .o-bar .o-search, :root body.o-app .o-bar .o-search:focus-within { background: var(--surface-2); }
@media (max-width: 820px) { :root body.o-app.command-mobile-open .o-bar .o-search { background: var(--surface-2); } }

/* ---------- Glass look: lighter page (as on the login screen) with soft blurred brand colours behind frosted, see-through cards ---------- */
body.o-app::before {
  content: ""; position: fixed; inset: -10%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 42% at 12% 8%, var(--patch1), transparent 70%),
    radial-gradient(34% 40% at 88% 18%, var(--patch2), transparent 70%),
    radial-gradient(40% 45% at 70% 92%, var(--patch3), transparent 70%),
    radial-gradient(30% 35% at 18% 85%, var(--patch4), transparent 70%);
  filter: blur(30px);
}
:root:not([data-theme="light"]) body.o-app { background: var(--bg-page); }
:root[data-theme="light"] body.o-app::before { opacity: .55; }
.o-app .o-bar,
.o-app .card, .o-app .panel, .o-app .files-panel, .o-app .table, .o-app .home-storage, .o-app .meter-wrap:not(:empty),
.o-app .root-card, .o-app .quick-card, .o-app .app-card, .o-app .pw-card,
.o-app .tt-search, .o-app .tt-head, .o-app .tt-ranking, .o-app .tt-stat {
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
}
:root:not([data-theme="light"]) .o-app :is(.o-bar, .card, .panel, .files-panel, .table, .home-storage, .meter-wrap:not(:empty), .root-card, .quick-card, .app-card, .pw-card, .tt-search, .tt-head, .tt-ranking, .tt-stat) {
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), rgba(24, 22, 32, .55) !important;
  border-color: rgba(255, 255, 255, .09);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
:root[data-theme="light"] .o-app :is(.o-bar, .card, .panel, .files-panel, .table, .home-storage, .meter-wrap:not(:empty), .root-card, .quick-card, .app-card, .pw-card, .tt-search, .tt-head, .tt-ranking, .tt-stat) {
  background: linear-gradient(160deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .55)) !important;
  border-color: rgba(255, 255, 255, .8);
  box-shadow: 0 10px 30px -20px rgba(60, 30, 90, .35), inset 0 1px 0 rgba(255, 255, 255, .9);
}
/* boxes inside boxes stay clear, so the glass is never doubled */
.o-app #view :is(.panel .table, .panel .panel, .pw-body > .panel, .files.at-root .files-panel) {
  background: transparent !important; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root:not([data-theme="light"]) .o-app .o-bar :is(.o-tabs, .o-search, .o-search-btn, .o-theme-toggle) { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .09); }
/* hover on clickable cards keeps its pink edge and glow over the glass */
:root .o-app :is(a.quick-card, .app-card.is-link, .root-card):hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 14px 34px -18px color-mix(in srgb, var(--c3) 60%, transparent), inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ---------- Glass for every field and control inside pages (same as the top bar buttons), frosted glass for pop-up menus ---------- */
:root:not([data-theme="light"]) :is(#view, .modal, .o-app .share-edit) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea),
:root:not([data-theme="light"]) .o-app :is(.tool-search, .crumbs, .seg, .o-seg, .tabs.o-seg, .admin-tabs, .tt-field, .tt-chip, .pick-list, .up-item, .vp-text, .chip, .pw-card .settings) {
  background-color: rgba(8, 6, 12, .32); border-color: rgba(255, 255, 255, .08);
}
:root:not([data-theme="light"]) .o-app :is(.tool-search, .tt-field) input { background-color: transparent; }
:root:not([data-theme="light"]) .o-app :is(button.ghost, .root-manage, .root-delete) { background-color: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); }
:root:not([data-theme="light"]) .o-app :is(button.ghost, .root-manage, .root-delete):hover:not(:disabled) { background-color: rgba(255, 255, 255, .08); }
:root:not([data-theme="light"]) .o-app :is(.card-go, .crumbs a:hover, .tt-link:hover) { background-color: rgba(255, 255, 255, .06); }
:root[data-theme="light"] :is(#view, .modal, .o-app .share-edit) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea),
:root[data-theme="light"] .o-app :is(.tool-search, .crumbs, .seg, .o-seg, .tabs.o-seg, .admin-tabs, .tt-field, .tt-chip, .pick-list, .up-item, .vp-text, .chip, .pw-card .settings) {
  background-color: rgba(255, 255, 255, .55); border-color: rgba(120, 100, 150, .16);
}
:root[data-theme="light"] .o-app :is(.tool-search, .tt-field) input { background-color: transparent; }
:root[data-theme="light"] .o-app :is(button.ghost, .root-manage, .root-delete) { background-color: rgba(255, 255, 255, .6); }
/* pop-up menus and dialogs: frosted, so the page behind blurs away and the text stays easy to read */
.o-app :is(.command-results, .o-user-menu, .ctx, .tt-results, .modal-card) { -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
:root:not([data-theme="light"]) .o-app :is(.command-results, .o-user-menu, .ctx, .tt-results, .modal-card) { background: rgba(24, 22, 32, .8); border-color: rgba(255, 255, 255, .1); }
:root[data-theme="light"] .o-app :is(.command-results, .o-user-menu, .ctx, .tt-results, .modal-card) { background: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .9); }
:root:not([data-theme="light"]) .o-app :is(.command-option:hover, .command-option.is-active, .o-user-link:hover, .ctx-item:hover, .ctx-item:focus-visible, .tt-result:hover, .pick-row:hover) { background: rgba(255, 255, 255, .07); }
:root:not([data-theme="light"]) .o-app .player { background: rgba(24, 22, 32, .78); border-color: rgba(255, 255, 255, .1); }
:root[data-theme="light"] .o-app .player { background: rgba(255, 255, 255, .82); border-color: rgba(255, 255, 255, .9); }
/* a field inside a search frame stays clear: only the frame carries the glass (otherwise the middle is darker than the edges) */
.o-app :is(.tool-search, .tt-field) :is(input, select) { background-color: transparent !important; border-color: transparent !important; box-shadow: none !important; }
/* rows of controls share one height: Cloud toolbar 42 px, Twitch search row 46 px */
@media (min-width: 821px) { .o-app #view .sort-direction { width: 42px; height: 42px; } }
.o-app .tt-search-row .o-seg { box-sizing: border-box; height: 46px; align-items: stretch; }
.o-app .tt-search-row .o-seg button { height: auto; }

/* ---------- Drop-down lists (select): the open list matches the portal instead of the grey system list ---------- */
/* browsers that cannot style the list: at least theme-coloured options */
@supports not (appearance: base-select) {
  :root:not([data-theme="light"]) .o-app select option { background-color: #1b1924; color: #eeecf5; }
  :root[data-theme="light"] .o-app select option { background-color: #ffffff; color: #16141c; }
}
/* current Chrome / Edge: fully styled list (frosted panel, pink highlight) */
@supports (appearance: base-select) {
  .o-app select, .o-app select::picker(select) { appearance: base-select; }
  .o-app select { display: flex; align-items: center; }
  .o-app select::picker-icon { display: none; } /* the field already draws its own arrow */
  .o-app select::picker(select) {
    margin-top: 6px; padding: 5px; border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(24, 22, 32, .9); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
    box-shadow: var(--pop-shadow); color: var(--text);
  }
  :root[data-theme="light"] .o-app select::picker(select) { background: rgba(255, 255, 255, .9); border-color: rgba(120, 100, 150, .18); }
  .o-app select option { display: flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 3px; font-size: 14px; background-color: transparent; color: var(--text); cursor: pointer; }
  .o-app select option::checkmark { display: none; }
  .o-app select option:hover, .o-app select option:focus-visible { background-color: color-mix(in srgb, var(--accent) 14%, transparent); outline: none; }
  .o-app select option:checked { color: var(--t-pink-fg, #f39bd0); font-weight: 600; }
}

/* ---------- FiveM Admin (fivem.js): status bar, players (table on computer, cards on phone), action log ---------- */
#view > .fm-bar { max-width: none; }
.fm-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 16px; }
.fm-bar-main { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; min-width: 0; }
.fm-bar-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.fm-status { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border-radius: 99px; font-size: 14px; font-weight: 600; white-space: nowrap; background: var(--raised); color: var(--muted); }
.fm-status.is-on { background: var(--ok-soft); color: var(--ok-fg); }
.fm-status.is-off { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.fm-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.fm-status.is-on .fm-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.fm-detail { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.fm-detail-text { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.fm-refresh { display: inline-flex; align-items: center; gap: 8px; }
.fm-refresh .o-icon { width: 16px; height: 16px; }
.fm-tabs button { padding: 0 16px; font-weight: 600; font-size: 13.5px; }
/* life state: down = orange, dead = red and gently pulsing, so it is clear at a glance who needs help */
.tag.fm-down { color: var(--t-orange-fg); background: var(--t-orange-bg); }
.tag.fm-dead { color: var(--danger); background: color-mix(in srgb, var(--danger) 16%, transparent); animation: fm-pulse 1.6s ease-in-out infinite; }
@keyframes fm-pulse { 50% { background: color-mix(in srgb, var(--danger) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .tag.fm-dead { animation: none; } }
.fm-search { margin-bottom: 14px; max-width: 520px; }
.fm-search .o-icon { width: 18px; height: 18px; flex: none; }
.fm-table .fm-id { width: 64px; font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.fm-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fm-name b { font-weight: 600; overflow-wrap: anywhere; }
.fm-name small { font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.fm-ping { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-state { white-space: nowrap; }
.fm-car { display: inline-flex; vertical-align: middle; margin-left: 8px; color: var(--faint); }
.fm-car .o-icon { width: 17px; height: 17px; }
.fm-table tr.fm-row-dead td { background: color-mix(in srgb, var(--danger) 6%, transparent); }
.fm-table tr.fm-row-lastStand td { background: color-mix(in srgb, var(--t-orange-fg) 6%, transparent); }
.fm-log .fm-time { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-info { display: block; font-size: 12.5px; color: var(--faint); }
.fm-cards { display: none; }
.fm-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.fm-card + .fm-card { margin-top: 10px; }
.fm-card-top { display: flex; align-items: center; gap: 12px; }
.fm-card-top .fm-name { flex: 1; }
.fm-card-top .fm-id { min-width: 36px; height: 36px; padding: 0 6px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--raised); font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.fm-card-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); padding-left: 48px; }
.fm-card.fm-row-dead { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.fm-card.fm-row-lastStand { border-color: color-mix(in srgb, var(--t-orange-fg) 45%, transparent); }
@media (max-width: 820px) {
  .fm-bar { padding: 14px 16px; }
  .fm-bar-tools { width: 100%; justify-content: space-between; margin-left: 0; }
  .fm-refresh { min-height: 44px; }
  .fm-refresh-lbl { display: none; }
  .fm-refresh { min-width: 44px; justify-content: center; }
  .fm-search { max-width: none; }
  .fm-list > .fm-table:not(.fm-log) { display: none; }
  .fm-cards { display: block; }
}

/* ---------- FiveM Admin, stage 2: live map (Leaflet), players beside it, marker colours by life state ---------- */
.fm-summary { display: flex; align-items: center; gap: 6px; }
.fm-summary:empty { display: none; }
.fm-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; height: calc(100dvh - 345px); min-height: 480px; }
#view .fm-map-wrap { position: relative; padding: 0; max-width: none; overflow: hidden; margin: 0; min-height: 0; }
.fm-map { position: absolute; inset: 0; isolation: isolate; background: #153e6a; font-family: var(--font); }
.fm-map.fm-stale .leaflet-marker-pane { opacity: .45; }
.fm-map .leaflet-control-attribution { background: rgba(8, 6, 12, .55); color: rgba(255, 255, 255, .75); font-size: 10.5px; padding: 1px 6px; border-radius: 3px 0 0 0; }
.fm-map .leaflet-bar { border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-md); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7); overflow: hidden; }
.fm-map .leaflet-bar a { background: rgba(14, 12, 20, .78); color: #eeecf5; border-bottom-color: rgba(255, 255, 255, .12); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.fm-map .leaflet-bar a:hover, .fm-map .leaflet-bar a:focus { background: rgba(40, 34, 52, .9); color: #fff; }
.fm-map .leaflet-bar a.leaflet-disabled { background: rgba(14, 12, 20, .55); color: rgba(255, 255, 255, .35); }
/* marker: round on foot, square in a vehicle; the small wedge shows where the player is facing */
.fm-pin-wrap { background: none; border: 0; transition: transform 1.2s linear; }
.fm-no-glide .fm-pin-wrap { transition: none; }
.fm-pin-wrap.fm-dim { opacity: .28; }
.fm-pin { position: relative; width: 30px; height: 30px; display: grid; place-items: center; cursor: pointer; }
.fm-pin-id { position: relative; z-index: 1; min-width: 24px; height: 24px; padding: 0 4px; box-sizing: border-box; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2) 45%, var(--c3)); color: #fff; font: 700 11.5px/1 var(--font); border: 2px solid #fff; box-shadow: 0 2px 7px rgba(0, 0, 0, .65); }
.fm-pin.is-car .fm-pin-id { border-radius: 6px; }
.fm-pin.is-down .fm-pin-id { background: #ff7a1a; }
.fm-pin.is-dead .fm-pin-id { background: #e5252a; }
.fm-pin.is-dead::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(229, 37, 42, .55); animation: fm-pin-pulse 1.5s ease-out infinite; }
@keyframes fm-pin-pulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.9); opacity: 0; } }
.fm-pin-arrow { position: absolute; inset: -6px; pointer-events: none; }
.fm-pin-arrow[hidden] { display: none; }
.fm-pin-arrow::before { content: ""; position: absolute; left: 50%; top: 0; margin-left: -5px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.fm-pin-car { position: absolute; z-index: 2; right: -6px; bottom: -5px; width: 15px; height: 15px; display: grid; place-items: center; border-radius: 4px; background: #16141c; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
.fm-pin-car .o-icon { width: 11px; height: 11px; }
.fm-picked .fm-pin-id { outline: 3px solid #00c2ff; outline-offset: 1px; }
.leaflet-tooltip.fm-tooltip { background: rgba(24, 22, 32, .94); color: #eeecf5; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-md); padding: 7px 10px; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .8); font-family: var(--font); white-space: nowrap; max-width: 280px; }
.leaflet-tooltip-top.fm-tooltip::before { border-top-color: rgba(24, 22, 32, .94); }
.fm-tip { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.fm-tip b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; max-width: 258px; }
.fm-tip small { font-size: 12px; color: #a6a3b8; overflow: hidden; text-overflow: ellipsis; max-width: 258px; }
/* overlays on the map stay dark in both themes, because the map itself does not change with the theme */
.fm-map-note { position: absolute; z-index: 500; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 120px); padding: 7px 12px; border-radius: var(--radius-md); background: rgba(120, 20, 24, .92); color: #fff; font-size: 13px; text-align: center; }
.fm-map-note[hidden], .fm-map-card[hidden] { display: none; }
.fm-map-card, .leaflet-tooltip.fm-tooltip { --text: #eeecf5; --muted: #a6a3b8; --faint: #8d8aa0; --raised: rgba(255, 255, 255, .08); --danger: #ff8a8a; --ok-fg: #6ef0c2; --ok-soft: rgba(46, 230, 166, .14); --t-orange-fg: #ffb48a; --t-orange-bg: rgba(255, 122, 61, .15); }
.fm-map-card { position: absolute; z-index: 500; left: 12px; bottom: 26px; width: min(360px, calc(100% - 24px)); box-sizing: border-box; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; border-radius: var(--radius-lg); background: rgba(20, 18, 28, .9); border: 1px solid rgba(255, 255, 255, .12); color: var(--text); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%); box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .8); }
.fm-card-kv { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 4px 10px; margin: 0; font-size: 13px; }
.fm-card-kv dt { color: var(--faint); }
.fm-card-kv dd { margin: 0; overflow-wrap: anywhere; }
#view button.fm-card-x { width: 30px; height: 30px; min-height: 0; padding: 0; flex: none; display: grid; place-items: center; background: transparent; border: 0; box-shadow: none; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; }
#view button.fm-card-x:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.fm-card-x .o-icon { width: 16px; height: 16px; }
/* the list beside the map */
#view .fm-side { display: flex; flex-direction: column; gap: 10px; padding: 12px; margin: 0; max-width: none; min-height: 0; }
.fm-side .fm-search { margin: 0; max-width: none; min-width: 0; flex: none; }
.fm-side-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 0 4px; }
.fm-side-list .note { padding: 8px 6px; }
#view button.fm-side-row { flex: none; width: 100%; height: auto; min-height: 52px; padding: 7px 8px; display: flex; align-items: center; gap: 10px; text-align: left; background: transparent; border: 1px solid transparent; box-shadow: none; border-radius: var(--radius-md); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
#view button.fm-side-row:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
#view button.fm-side-row.is-picked { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fm-side-row .fm-id { min-width: 30px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.fm-side-row .fm-name { flex: 1; min-width: 0; }
.fm-side-row .fm-name b, .fm-side-row .fm-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-side-row .tag { flex: none; }
#view button.fm-to-map { display: inline-flex; align-items: center; gap: 6px; }
.fm-to-map .o-icon { width: 15px; height: 15px; }
#view .fm-card button.fm-to-map { align-self: flex-start; margin-left: 48px; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .fm-pin-wrap { transition: none; } .fm-pin.is-dead::before { animation: none; opacity: .6; } }
@media (max-width: 1100px) { .fm-map-layout { grid-template-columns: minmax(0, 1fr) 270px; } }
@media (max-width: 820px) {
  .fm-map-layout { display: block; height: auto; min-height: 0; }
  #view .fm-map-wrap { height: calc(100dvh - 150px); min-height: 380px; }
  #view .fm-side { display: none; }
  .fm-map .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 24px; }
  .fm-pin-id { min-width: 28px; height: 28px; font-size: 12.5px; }
  #view button.fm-card-x { width: 44px; height: 44px; }
  .fm-map-card { bottom: 22px; }
}

/* FiveM Admin: status and state labels are small rounded rectangles (portal radius), not pills */
.fm-status { height: 32px; padding: 0 12px; border-radius: var(--radius-lg); }
.fm-bar .tag, .fm-body .tag { display: inline-flex; align-items: center; min-height: 24px; box-sizing: border-box; padding: 2px 8px; border-radius: var(--radius-sm); }
.fm-status .fm-dot { border-radius: 2px; }

/* FiveM Admin: server logo beside the status */
.fm-logo { display: block; flex: none; width: auto; height: 46px; margin: -4px 2px -4px 0; }
@media (max-width: 820px) { .fm-logo { height: 40px; } }

/* FiveM Admin: everything on the status bar shares one height, radius and text size (44 px on phone for tapping) */
#view .fm-bar { --fm-h: 40px; }
#view .fm-bar .fm-status, #view .fm-bar .tag, #view .fm-bar .fm-tabs, #view .fm-bar .fm-refresh { box-sizing: border-box; height: var(--fm-h); min-height: 0; border-radius: var(--radius-md); font-size: 13.5px; }
#view .fm-bar .fm-status, #view .fm-bar .tag { display: inline-flex; align-items: center; padding: 0 12px; font-weight: 600; }
#view .fm-bar .fm-tabs { align-items: stretch; padding: 3px; }
#view .fm-bar .fm-tabs button { height: auto; min-height: 0; padding: 0 14px; font-size: 13.5px; font-weight: 600; }
#view .fm-bar .fm-refresh { padding: 0 14px; font-weight: 600; }
@media (max-width: 820px) {
  #view .fm-bar { --fm-h: 44px; }
  #view .fm-bar .fm-tabs { padding: 0; }
  #view .fm-bar .fm-refresh { width: 44px; padding: 0; justify-content: center; }
}

/* ---------- FiveM Admin, stage 3: player profile drawer, inventory, action forms, right-click menu on the map ---------- */
.fm-card-btns { display: flex; gap: 8px; padding-left: 48px; }
#view .fm-card .fm-card-btns button.fm-to-map { margin-left: 0; }
.fm-ctx { min-width: 240px; }
.fm-ctx-title { padding: 6px 12px 8px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); user-select: all; }
.fm-ctx .ctx-item { background: transparent; border: 0; box-shadow: none; text-align: left; font: inherit; font-size: 14px; }
.fm-ctx .ctx-item .o-icon { width: 17px; height: 17px; flex: none; color: var(--faint); }
.fm-ctx .ctx-item:disabled { opacity: .5; cursor: default; }
/* the drawer */
.modal.fm-drawer-wrap { display: flex; justify-content: flex-end; align-items: stretch; padding: 0; z-index: 90; }
.fm-drawer { box-sizing: border-box; width: min(560px, 100%); height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; overflow-y: auto; background: rgba(24, 22, 32, .92); border-left: 1px solid rgba(255, 255, 255, .1); box-shadow: -18px 0 40px -18px rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); color: var(--text); }
:root[data-theme="light"] .fm-drawer { background: rgba(255, 255, 255, .92); border-left-color: rgba(120, 100, 150, .18); box-shadow: -18px 0 40px -22px rgba(60, 30, 90, .4); }
.fm-drawer.is-busy button { pointer-events: none; opacity: .6; }
.fm-drawer .tag { display: inline-flex; align-items: center; min-height: 24px; box-sizing: border-box; padding: 2px 8px; border-radius: var(--radius-sm); }
.fm-drawer-top { display: flex; align-items: flex-start; gap: 10px; }
.fm-drawer-head { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fm-drawer-head .fm-id { min-width: 40px; height: 40px; padding: 0 8px; box-sizing: border-box; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--raised); font-family: var(--mono); font-size: 14px; color: var(--muted); }
.fm-drawer-head .fm-name { flex: 1 1 200px; }
.fm-drawer-head .fm-name b { font-size: 18px; }
.fm-drawer-tags { display: flex; gap: 6px; flex-wrap: wrap; }
button.fm-drawer-x { flex: none; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; background: transparent; border: 0; border-radius: var(--radius-md); color: var(--muted); cursor: pointer; }
button.fm-drawer-x:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.fm-drawer-x .o-icon { width: 18px; height: 18px; }
.fm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fm-stats:empty { display: none; }
.fm-stat { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--text) 5%, transparent); font-size: 12.5px; color: var(--muted); min-width: 0; }
.fm-stat b { color: var(--text); font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fm-stat-top { display: flex; justify-content: space-between; gap: 6px; }
.fm-stat-top b { font-size: 12.5px; }
.fm-bar-track { height: 6px; border-radius: 2px; background: color-mix(in srgb, var(--text) 12%, transparent); overflow: hidden; margin-top: auto; }
.fm-bar-fill { display: block; height: 100%; }
.fm-bar-fill.is-health { background: #2ee6a6; }
.fm-bar-fill.is-armour { background: #00c2ff; }
.fm-drawer-tabs .o-seg { display: flex; box-sizing: border-box; height: 40px; align-items: stretch; padding: 3px; border-radius: var(--radius-md); }
.fm-drawer-tabs .o-seg button { flex: 1; height: auto; font-size: 13.5px; font-weight: 600; }
:root:not([data-theme="light"]) .fm-drawer-tabs .o-seg { background-color: rgba(8, 6, 12, .32); }
:root[data-theme="light"] .fm-drawer-tabs .o-seg { background-color: rgba(120, 100, 150, .1); }
.fm-action-note { min-height: 0; padding: 8px 12px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--text) 6%, transparent); }
.fm-action-note:empty { display: none; }
.fm-drawer-body { display: flex; flex-direction: column; gap: 14px; }
.fm-drawer-body .empty { padding: 28px 12px; }
.fm-drawer h4 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--muted); text-transform: uppercase; }
.fm-group, .fm-form { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--text) 4%, transparent); }
.fm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-actions button { flex: 1 1 120px; }
.fm-row { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.fm-row .fm-field { flex: 1 1 130px; min-width: 0; }
.fm-field select, .fm-field input { width: 100%; box-sizing: border-box; }
.fm-row button.fm-go { flex: 0 0 auto; }
.fm-drawer button.primary, .fm-drawer button.ghost { height: 42px; min-height: 42px; padding: 0 14px; font-size: 13.5px; font-weight: 600; border-radius: var(--radius-md); }
.fm-drawer select, .fm-drawer input { height: 42px; border-radius: var(--radius-md); }
.fm-item-results { display: flex; flex-direction: column; gap: 2px; max-height: 190px; overflow-y: auto; }
.fm-item-results:empty { display: none; }
button.fm-item-pick { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; width: 100%; min-height: 38px; padding: 6px 10px; text-align: left; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
button.fm-item-pick:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.fm-item-pick b { font-weight: 600; }
.fm-item-pick small { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.fm-inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
button.fm-slot { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 84px; padding: 22px 10px 8px; text-align: left; background: color-mix(in srgb, var(--text) 5%, transparent); border: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-radius: var(--radius-md); color: var(--text); font: inherit; cursor: pointer; }
button.fm-slot:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
button.fm-slot[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.fm-slot b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; }
.fm-slot-no { position: absolute; left: 8px; top: 6px; font-family: var(--mono); font-size: 11px; color: var(--faint); }
.fm-slot-amount { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-slot-holder:empty { display: none; }
.fm-slot-detail { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--text) 4%, transparent); }
.fm-kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 13.5px; }
.fm-kv dt { color: var(--faint); overflow-wrap: anywhere; }
.fm-kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .fm-drawer { width: 100%; padding: 14px; border-left: 0; }
  button.fm-drawer-x { width: 44px; height: 44px; }
  .fm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-drawer-tabs .o-seg { height: 44px; padding: 0; }
  .fm-drawer button.primary, .fm-drawer button.ghost, .fm-drawer select, .fm-drawer input { height: 44px; min-height: 44px; }
  .fm-actions button { flex: 1 1 calc(50% - 4px); }
  .fm-row button.fm-go { flex: 1 1 100%; }
  button.fm-item-pick { min-height: 44px; }
  .fm-ctx .ctx-item { min-height: 44px; }
}
.fm-drawer > * { flex: none; }
.fm-action-note { position: sticky; top: -18px; z-index: 3; background: #2a2636; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .7); }
:root[data-theme="light"] .fm-action-note { background: #f4f2f8; box-shadow: 0 6px 14px -10px rgba(60, 30, 90, .5); }
@media (max-width: 820px) { .fm-action-note { top: -14px; } }

/* FiveM Admin profile: vehicles and houses */
.fm-asset { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--text) 4%, transparent); }
.fm-asset-top { display: flex; align-items: center; gap: 12px; }
.fm-asset-top .fm-name { flex: 1; min-width: 0; }
.fm-asset-top .fm-name b { font-weight: 600; overflow-wrap: anywhere; }
.fm-asset-top .fm-name small { font-size: 12.5px; color: var(--faint); overflow-wrap: anywhere; }
.fm-asset-top .tag { flex: none; }
.fm-plate { flex: none; min-width: 74px; padding: 5px 8px; box-sizing: border-box; text-align: center; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--text) 9%, transparent); font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.fm-asset-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-drawer-tabs .o-seg button { padding: 0 6px; min-width: 0; }
@media (max-width: 820px) { .fm-drawer-tabs .o-seg button { font-size: 12.5px; padding: 0 2px; } .fm-asset-top { flex-wrap: wrap; } }
.fm-asset-actions { display: flex; justify-content: flex-end; }

/* FiveM Admin profile: storage sections under the inventory; weapons stand out */
.fm-section-title { margin: 6px 0 -4px; font-size: 15px; font-weight: 600; color: var(--text); }
button.fm-slot.is-weapon { border-color: color-mix(in srgb, var(--t-orange-fg) 55%, transparent); background: color-mix(in srgb, var(--t-orange-fg) 10%, transparent); }
.fm-group .fm-inv { margin-top: -2px; }
.note.err { color: var(--danger); }

/* FiveM Admin: screenshot tab in the player profile */
.fm-shot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.fm-shot-img { display: block; width: 100%; height: auto; border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius-md); }
:root[data-theme="light"] .fm-shot-img { border-color: rgba(120, 100, 150, .25); }
@media (max-width: 820px) { .fm-drawer-tabs .o-seg button { flex: 1 1 auto; } } /* six tabs for Full: each as wide as its name needs */
.fm-shot-full { position: fixed; inset: 0; z-index: 10; display: flex; overflow: auto; background: #08060c; cursor: zoom-out; }
.fm-shot-full img { display: block; flex: none; margin: auto; }
.fm-shot-close { position: fixed; top: 12px; right: 12px; z-index: 1; width: 44px; height: 44px; background: rgba(8, 6, 12, .75); color: #fff; }

/* OCTA logo in the top bar: the moving gradient of the login screen logo (same colours and speed; login.css stays its own copy).
   The shadow sits on the link, outside the mask, because a mask would cut it off. */
:root:not([data-theme="light"]) .o-bar-logo { filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .9)) drop-shadow(0 5px 16px rgba(0, 0, 0, .95)); }
:root[data-theme="light"] .o-bar-logo { filter: drop-shadow(0 1px 2px rgba(60, 30, 90, .5)) drop-shadow(0 4px 12px rgba(60, 30, 90, .6)); }
.o-logo-anim { position: relative; display: block; flex: none; isolation: isolate; overflow: hidden; height: 35px; aspect-ratio: 920 / 328; transform: translateY(6.7%);
  -webkit-mask: url(../img/octa-logo-large.png) center / 100% 100% no-repeat; mask: url(../img/octa-logo-large.png) center / 100% 100% no-repeat; }
.o-bar-logo .o-logo-anim img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; transform: none; }
.o-logo-flow { position: absolute; inset: 0; mix-blend-mode: color; animation: o-logo-flow 10.8s linear infinite;
  background: linear-gradient(90deg,#f4060b 0.00%,#f4060b 3.70%,#f70743 7.41%,#f80571 11.11%,#f9039f 14.81%,#f702d0 18.52%,#eb02f9 22.22%,#be01f9 25.93%,#9802f6 29.63%,#8402f8 33.33%,#4b28f9 37.04%,#2f42f9 40.74%,#0f6bf9 44.44%,#0092f0 48.15%,#0092f0 51.85%,#0f6bf9 55.56%,#2f42f9 59.26%,#4b28f9 62.96%,#8402f8 66.67%,#9802f6 70.37%,#be01f9 74.07%,#eb02f9 77.78%,#f702d0 81.48%,#f9039f 85.19%,#f80571 88.89%,#f70743 92.59%,#f4060b 96.30%,#f4060b 100.00%) 0 0 / 200% 100% repeat-x; }
@keyframes o-logo-flow { to { background-position-x: 200%; } }
@media (prefers-reduced-motion: reduce) { .o-logo-flow { animation: none; } }
@media (max-width: 820px) { .o-logo-anim { height: 34px; } }
@media (max-width: 400px) { .o-logo-anim { height: 31px; } }

/* FiveM Admin: bar above the map, figures as tiles of one height, tinted like the top bar (Home, Apps, search) */
#view .fm-bar { --fm-h: 46px; padding: 12px 16px; gap: 12px 16px; }
#view .fm-bar .fm-bar-main { flex-wrap: nowrap; gap: 14px; }
#view .fm-bar .fm-logo { height: 46px; margin: 0; }
.fm-metrics { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.fm-metric { display: flex; flex-direction: column; justify-content: center; gap: 1px; box-sizing: border-box; height: var(--fm-h); min-width: 72px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-md); }
:root:not([data-theme="light"]) .fm-metric { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .09); }
:root[data-theme="light"] .fm-metric { background: rgba(255, 255, 255, .55); border-color: transparent; }
.fm-metric-label { font-size: 10.5px; line-height: 1.2; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.fm-metric-value { font-size: 14px; font-weight: 700; line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.fm-metric.is-zero .fm-metric-value { color: var(--muted); }
.fm-metric.is-dead .fm-metric-value { color: var(--danger); }
.fm-metric.is-down .fm-metric-value { color: var(--t-orange-fg); }
:root .fm-metric.is-dead { border-color: color-mix(in srgb, var(--danger) 55%, transparent); }
:root .fm-metric.is-down { border-color: color-mix(in srgb, var(--t-orange-fg) 45%, transparent); }
#view .fm-bar .fm-metric .fm-status { height: auto; padding: 0; gap: 7px; background: none; font-size: 14px; font-weight: 700; line-height: 1.25; border-radius: 0; }
.fm-detail { flex-basis: 100%; }
.fm-detail:empty { display: none; }
@media (max-width: 820px) {
  #view .fm-bar .fm-bar-main { flex-wrap: wrap; width: 100%; }
  #view .fm-bar .fm-logo { height: 40px; }
  .fm-metrics { flex: 1 1 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fm-metric { min-width: 0; padding: 0 10px; order: 1; }
  .fm-metric:nth-child(1), .fm-metric:nth-child(2), .fm-metric:nth-child(5) { order: 0; }
}

/* FiveM Admin: players beside the map as separate bars, tinted like the top bar */
.fm-side-list { gap: 6px; }
#view button.fm-side-row { min-height: 54px; padding: 7px 10px; }
:root:not([data-theme="light"]) #view button.fm-side-row { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .09); }
:root[data-theme="light"] #view button.fm-side-row { background: rgba(255, 255, 255, .55); border-color: transparent; }
:root:not([data-theme="light"]) #view button.fm-side-row:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
:root[data-theme="light"] #view button.fm-side-row:hover { background: rgba(255, 255, 255, .8); border-color: rgba(120, 100, 150, .35); }
:root #view button.fm-side-row.is-picked, :root #view button.fm-side-row.is-picked:hover { border-color: color-mix(in srgb, var(--accent) 65%, transparent); background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, .05)); }
:root[data-theme="light"] #view button.fm-side-row.is-picked, :root[data-theme="light"] #view button.fm-side-row.is-picked:hover { background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, .7)); }

/* FiveM Admin: server logo floating in the top left corner of the map (zoom buttons are top right) */
.fm-map-logo { position: absolute; z-index: 500; top: 12px; left: 14px; display: block; width: auto; height: 72px; pointer-events: none; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .7)); }
@media (max-width: 1100px) { .fm-map-note { top: 88px; } }
@media (max-width: 820px) { .fm-map-logo { height: 54px; left: 12px; } .fm-map-note { top: 72px; } }

/* FiveM Admin: Map, Players, Log and Refresh as separate buttons, the same tiles as the figures beside them */
#view .fm-bar .fm-tabs { height: auto; gap: 8px; padding: 0; background: none; border: 0; box-shadow: none; }
#view .fm-bar .fm-tabs button { height: var(--fm-h); min-width: 72px; padding: 0 16px; border-radius: var(--radius-md); font-size: 13.5px; font-weight: 600; }
#view .fm-bar .fm-refresh { height: var(--fm-h); box-shadow: none; }
:root:not([data-theme="light"]) #view .fm-bar .fm-tabs button:not([aria-pressed="true"]), :root:not([data-theme="light"]) #view .fm-bar .fm-refresh { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); color: var(--text); }
:root:not([data-theme="light"]) #view .fm-bar .fm-tabs button:not([aria-pressed="true"]):hover, :root:not([data-theme="light"]) #view .fm-bar .fm-refresh:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
:root[data-theme="light"] #view .fm-bar .fm-tabs button:not([aria-pressed="true"]), :root[data-theme="light"] #view .fm-bar .fm-refresh { background: rgba(255, 255, 255, .55); border: 1px solid transparent; color: var(--text); }
:root[data-theme="light"] #view .fm-bar .fm-tabs button:not([aria-pressed="true"]):hover, :root[data-theme="light"] #view .fm-bar .fm-refresh:hover { background: rgba(255, 255, 255, .8); border-color: rgba(120, 100, 150, .35); }
@media (max-width: 820px) {
  #view .fm-bar .fm-bar-tools { gap: 8px; }
  #view .fm-bar .fm-tabs { flex: 1; min-width: 0; }
  #view .fm-bar .fm-tabs button { flex: 1; min-width: 0; padding: 0 8px; }
  #view .fm-bar .fm-refresh { flex: none; width: 46px; }
}

/* FiveM Admin: search beside the map and the active button, tinted like the top bar too */
:root:not([data-theme="light"]) #view .fm-side .tt-field { background-color: rgba(255, 255, 255, .05); }
:root:not([data-theme="light"]) #view .fm-side .tt-field:not(:focus-within) { border-color: rgba(255, 255, 255, .09); }
:root[data-theme="light"] #view .fm-side .tt-field:not(:focus-within) { border-color: transparent; }
:root:not([data-theme="light"]) #view .fm-bar .fm-tabs { --btn-fill: #1f1522; --btn-fill-hover: #2a1a2e; }

/* FiveM Admin: Players tab, each player a separate glass bar (the glass of the top bar), buttons tinted like the tiles */
.fm-pl { --fm-pl-cols: 52px minmax(190px, 1.5fr) minmax(130px, 1.3fr) minmax(80px, 1fr) 76px 112px 188px; display: flex; flex-direction: column; gap: 8px; }
.fm-pl-head, .fm-pl-row { display: grid; grid-template-columns: var(--fm-pl-cols); align-items: center; column-gap: 14px; padding: 0 14px; }
.fm-pl-head { border: 1px solid transparent; padding-bottom: 2px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fm-pl-row { box-sizing: border-box; min-height: 66px; padding-top: 10px; padding-bottom: 10px; border: 1px solid transparent; border-radius: var(--radius-lg); font-size: 14px; color: var(--text); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5); transition: border-color .15s, box-shadow .15s; }
:root:not([data-theme="light"]) .fm-pl-row { background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), rgba(24, 22, 32, .55); border-color: rgba(255, 255, 255, .09); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); }
:root[data-theme="light"] .fm-pl-row { background: linear-gradient(160deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .55)); border-color: rgba(255, 255, 255, .8); box-shadow: 0 10px 30px -20px rgba(60, 30, 90, .35), inset 0 1px 0 rgba(255, 255, 255, .9); }
:root:not([data-theme="light"]) .fm-pl-row:hover { border-color: rgba(255, 255, 255, .18); }
:root[data-theme="light"] .fm-pl-row:hover { border-color: rgba(120, 100, 150, .35); }
:root .fm-pl-row.fm-row-dead { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
:root .fm-pl-row.fm-row-lastStand { border-color: color-mix(in srgb, var(--t-orange-fg) 45%, transparent); }
.fm-pl-row .fm-id { display: grid; place-items: center; box-sizing: border-box; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--raised); font-family: var(--mono); font-size: 13.5px; color: var(--muted); }
.fm-pl-who, .fm-pl-text { min-width: 0; overflow-wrap: anywhere; }
.fm-pl-text.is-none { color: var(--faint); }
.fm-pl-row .fm-state { display: flex; align-items: center; gap: 8px; }
.fm-pl-btns { display: flex; justify-content: flex-end; gap: 8px; }
#view .fm-pl-btns button.fm-to-map { box-sizing: border-box; height: 40px; min-height: 0; margin: 0; padding: 0 14px; font-weight: 600; font-size: 13.5px; }
#view .fm-card-btns button.fm-to-map { box-sizing: border-box; height: 44px; font-weight: 600; font-size: 13.5px; }
:root:not([data-theme="light"]) #view .fm-list button.fm-to-map { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09); border: 0; color: var(--text); }
:root:not([data-theme="light"]) #view .fm-list button.fm-to-map:hover { background: rgba(255, 255, 255, .1); }
:root[data-theme="light"] #view .fm-list button.fm-to-map { background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 1px rgba(120, 100, 150, .18); border: 0; color: var(--text); }
:root[data-theme="light"] #view .fm-list button.fm-to-map:hover { background: rgba(255, 255, 255, .85); }
:root:not([data-theme="light"]) #view .fm-search { background-color: rgba(255, 255, 255, .05); }
:root:not([data-theme="light"]) #view .fm-search:not(:focus-within) { border-color: rgba(255, 255, 255, .09); }
:root[data-theme="light"] #view .fm-search:not(:focus-within) { border-color: transparent; }
@media (max-width: 1180px) { .fm-pl { --fm-pl-cols: 44px minmax(140px, 1.4fr) minmax(100px, 1fr) minmax(64px, .7fr) 60px 84px 168px; } .fm-pl-head, .fm-pl-row { column-gap: 10px; padding-left: 10px; padding-right: 10px; } #view .fm-pl-btns button.fm-to-map { padding: 0 10px; } }
@media (max-width: 820px) { .fm-pl { display: none; } }

/* FiveM Admin: load tiles turn orange when a number is high */
.fm-metric.is-warn .fm-metric-value { color: var(--t-orange-fg); }
:root .fm-metric.is-warn { border-color: color-mix(in srgb, var(--t-orange-fg) 45%, transparent); }

/* FiveM Admin: help buttons on the map card. The card is dark in both themes, so the colours are fixed here. */
.fm-card-actions { display: flex; gap: 8px; }
#view .fm-map-card .fm-card-actions button { flex: 1; min-width: 0; height: 40px; min-height: 0; padding: 0 8px; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-md); background: rgba(255, 255, 255, .07); box-shadow: none; color: #eeecf5; font-size: 13.5px; font-weight: 600; }
#view .fm-map-card .fm-card-actions button:hover:not(:disabled) { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .22); }
#view .fm-map-card .fm-card-actions button:disabled { opacity: .55; }
.fm-card-note { margin: 0; font-size: 13px; color: var(--muted); }
.fm-card-note[hidden] { display: none; }
.fm-card-note.ok { color: var(--ok-fg); }
.fm-card-note.err { color: var(--danger); }
@media (max-width: 820px) { #view .fm-map-card .fm-card-actions button { height: 44px; } }

/* FiveM Admin: Offline tab, the same bars as the Players tab with its own columns */
.fm-pl.fm-pl-off { --fm-pl-cols: minmax(190px, 1.6fr) minmax(130px, 1.3fr) minmax(90px, 1fr) 96px 92px; }
.fm-off-count { margin: 0 0 10px; }
#view .fm-off-more { display: block; width: 100%; margin-top: 8px; min-height: 44px; font-weight: 600; }
@media (max-width: 820px) {
  .fm-pl.fm-pl-off { display: flex; --fm-pl-cols: minmax(0, 1fr) auto; }
  .fm-pl-off .fm-pl-head { display: none; }
  .fm-pl-off .fm-pl-row { row-gap: 4px; font-size: 13.5px; }
  .fm-pl-off .fm-pl-row > * { grid-column: 1; }
  .fm-pl-off .fm-pl-row > .fm-pl-btns { grid-column: 2; grid-row: 1 / span 4; }
  .fm-pl-off .fm-pl-text.is-none { display: none; }
  #view .fm-pl-off .fm-pl-btns button.fm-to-map { height: 44px; }
}

/* Portal dialogs (octa-dialog.js) in place of the browser's own. They open over everything, the FiveM profile drawer included. */
.octa-dialog { z-index: 200; animation: octa-dialog-in .14s ease-out; }
.octa-dialog-card { width: min(440px, 100%); gap: 12px; animation: octa-dialog-card-in .16s ease-out; }
.octa-dialog-card h3 { overflow-wrap: anywhere; line-height: 1.35; }
.octa-dialog-text { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
.octa-dialog-input { width: 100%; box-sizing: border-box; }
.octa-dialog-btns { margin-top: 6px; }
.octa-dialog-btns button { min-width: 96px; }
@keyframes octa-dialog-in { from { opacity: 0; } }
@keyframes octa-dialog-card-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .octa-dialog, .octa-dialog-card { animation: none; } }
@media (max-width: 820px) { .octa-dialog-btns button { flex: 1; min-height: 44px; } }

/* FiveM Admin: the game's blips on the map, and the button that shows or hides them */
.fm-blip-wrap { background: none; border: 0; }
.fm-blip { display: block; box-sizing: border-box; width: 12px; height: 12px; margin: 1px; border: 2px solid rgba(8, 6, 12, .85); border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
#view button.fm-map-toggle { position: absolute; z-index: 500; top: 82px; right: 11px; box-sizing: border-box; height: 32px; min-height: 0; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-md); background: rgba(14, 12, 20, .78); box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .7); color: rgba(255, 255, 255, .55); font-size: 12.5px; font-weight: 600; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#view button.fm-map-toggle[aria-pressed="true"] { color: #eeecf5; border-color: rgba(255, 255, 255, .28); }
#view button.fm-map-toggle:hover { background: rgba(40, 34, 52, .9); }
@media (max-width: 820px) { #view button.fm-map-toggle { top: 112px; right: 11px; height: 44px; } }
.octa-dialog-card .octa-dialog-btns { justify-content: flex-start; } /* the row runs right to left: buttons on the right, the main one last */

/* FiveM Admin: real blip icons on the map */
.fm-blip-wrap { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
.fm-blip-ico { display: block; width: 22px; height: 22px; isolation: isolate; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.fm-blip-ico img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* FiveM Admin: Anticheat tab */
.fm-ac { display: flex; flex-direction: column; gap: 14px; }
.fm-ac-head { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.fm-ac-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fm-ac-chip { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); }
.fm-ac-chip small { font-size: 12.5px; color: var(--muted); }
.fm-ac-chip b { font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.fm-ac-chip.is-on b { color: #2ee6a6; }
.fm-ac-chip.is-warn { border-color: var(--danger); }
.fm-ac-chip.is-warn b { color: var(--danger); }
[data-theme="light"] .fm-ac-chip.is-on b { color: #0a7d58; }
.fm-ac-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fm-ac-say { margin: 0; font-size: 13.5px; font-weight: 600; }
.fm-ac-say.is-ok { color: #2ee6a6; }
[data-theme="light"] .fm-ac-say.is-ok { color: #0a7d58; }
.fm-ac-say.is-err { color: var(--danger); }
.fm-ac-title, .fm-ac-stats h3 { margin: 6px 0 0; font-size: 15px; font-weight: 700; }
.fm-ac > .fm-search { margin-bottom: 0; }
.fm-ac-stats { display: flex; flex-direction: column; gap: 8px; }
.fm-ac-stat-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 20px; }
.fm-ac-stat { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); }
.fm-ac-stat b { color: var(--text); font-variant-numeric: tabular-nums; }
.fm-ac-name { overflow-wrap: anywhere; }
.fm-ac-table .fm-info { overflow-wrap: anywhere; }
.fm-ac-tools { white-space: nowrap; text-align: right; }
.fm-ac-tools button + button { margin-left: 6px; }
.fm-ac .tag.fm-ac-would { color: var(--t-orange-fg); }
.fm-ac .tag.fm-ac-log { color: var(--muted); }
@media (max-width: 820px) {
  .fm-ac-tools { white-space: normal; }
  .fm-ac-tools button { min-height: 44px; margin: 2px 0 2px 6px; }
  .fm-ac-actions button { flex: 1; min-height: 44px; }
  .fm-ac-table { display: block; overflow-x: auto; }
}
@media (max-width: 820px) { /* five section buttons and Refresh: the sections take a row of their own, so no name is cut off */
  #view .fm-bar .fm-bar-tools { flex-wrap: wrap; }
  #view .fm-bar .fm-tabs { flex: 1 1 100%; }
  #view .fm-bar .fm-tabs button { flex: 1 1 auto; padding: 0 3px; font-size: 13px; }
  #view .fm-bar .fm-refresh { margin-left: auto; }
}

/* ---- FiveM Admin: Reports, Bans, Server, Stats tabs and the profile's Admin tab (fivem-more.js, fivem-profile.js; game resource 0.16.62) ---- */
.fm-more { display: flex; flex-direction: column; gap: 14px; }
.fm-more-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fm-more-top .fm-search { margin: 0; flex: 1 1 260px; }
.fm-subtabs button { padding: 0 14px; font-weight: 600; font-size: 13.5px; }
.fm-faint { color: var(--faint); }
/* list on the left, the chosen one on the right: one grid row, so both share their top and bottom edge */
.fm-split { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 14px; align-items: stretch; min-height: 420px; }
.fm-rep-list { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow-y: auto; padding-right: 2px; }
.fm-rep-view { display: flex; flex-direction: column; gap: 12px; padding: 14px; min-width: 0; margin: 0; }
button.fm-rep-item { display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  border-radius: var(--radius-lg); border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 4%, transparent); }
button.fm-rep-item:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
button.fm-rep-item[aria-pressed="true"] { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fm-rep-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fm-rep-item-top b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.fm-rep-item small { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-rep-item .tag { flex: none; }
.fm-rep-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fm-rep-head .fm-name { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; }
.fm-rep-head .fm-name b { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.fm-rep-head .fm-name small { color: var(--faint); font-size: 12.5px; }
.fm-thread { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; padding: 2px; }
.fm-msg { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--text) 6%, transparent); }
.fm-msg.is-staff { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.fm-msg small { display: block; color: var(--faint); font-size: 11.5px; margin-bottom: 2px; }
.fm-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; }
.fm-rep-reply { display: flex; flex-direction: column; gap: 8px; }
.fm-rep-reply textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 70px; font: inherit; }
.fm-rep-reply .fm-actions button { flex: 0 0 auto; }
.fm-sub { margin: 4px 0 -4px; font-size: 13.5px; font-weight: 600; }
.fm-mini-list { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.fm-mini-list > div { overflow-wrap: anywhere; }
/* Server tab: cells of one grid row stretch to the same height */
.fm-server { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; align-items: stretch; }
.fm-server-col { display: flex; flex-direction: column; gap: 14px; }
.fm-server-col > .fm-group:last-child { flex: 1; }
.fm-res { display: flex; flex-direction: column; gap: 2px; max-height: 520px; overflow-y: auto; }
.fm-res-group .fm-search, .fm-more-top .fm-search { margin: 0; max-width: none; flex: none; }
.fm-more-top .fm-search { flex: 1 1 260px; max-width: 520px; }
.fm-res-group .fm-res { flex: 1 1 0; min-height: 200px; max-height: none; }
.fm-res-row { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 2px 4px; border-bottom: 1px solid var(--line); }
.fm-res-name { flex: 1; min-width: 0; font-size: 13.5px; overflow-wrap: anywhere; }
.fm-res-btns { display: flex; gap: 6px; }
.fm-res-btns button { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.fm-console { margin: 0; height: 320px; overflow: auto; padding: 10px 12px; border-radius: var(--radius-md); font-family: var(--mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
  background: #15121b; color: #e9e6f0; border: 1px solid rgba(255, 255, 255, .08); }
/* Stats tab */
.fm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fm-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--text) 5%, transparent); border: 1px solid var(--line); }
.fm-tile span { color: var(--faint); font-size: 12.5px; }
.fm-tile b { font-size: 20px; font-weight: 700; }
.fm-tile small { color: var(--faint); font-size: 12px; }
.fm-tiles-small { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.fm-tiles-small .fm-tile b { font-size: 17px; }
.fm-chart { display: flex; align-items: flex-end; gap: 2px; height: 160px; }
.fm-chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.fm-chart-col i { display: block; width: 100%; border-radius: 2px 2px 0 0; background: var(--brand); opacity: .85; }
.fm-money-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.fm-money-row span { overflow-wrap: anywhere; }
.fm-plus { color: var(--ok-fg); font-weight: 600; }
.fm-minus { color: var(--danger); font-weight: 600; }
/* profile: the player's history */
.fm-hist-list { display: flex; flex-direction: column; gap: 8px; }
.fm-hist { display: flex; align-items: flex-start; gap: 10px; }
.fm-hist .tag { flex: none; }
.fm-hist-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; overflow-wrap: anywhere; }
.fm-hist-text small { color: var(--faint); font-size: 12px; }
button.fm-hist-x { flex: none; min-height: 28px; padding: 0 10px; font-size: 12px; }
@media (max-width: 820px) {
  .fm-split { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .fm-rep-list { max-height: 40vh; }
  .fm-server { grid-template-columns: minmax(0, 1fr); }
  .fm-res-btns button { min-height: 44px; }
}
/* FiveM bar on a phone: eight sections, so two rows of four equal buttons */
@media (max-width: 820px) {
  #view .fm-bar .fm-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: 1 1 100%; }
  #view .fm-bar .fm-tabs button { min-width: 0; padding: 0 4px; font-size: 13px; }
}

/* ---- FiveM bar, one low bar (Matt's choice D, 7 Nov 2026): state on the left (click: every figure), sections in the middle, load and Refresh on the right ---- */
#view .fm-bar.fm-top { display: block; padding: 10px; position: relative; z-index: 60; overflow: visible; }
.fm-top-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fm-top-statewrap { position: relative; flex: none; }
#view .fm-top .fm-tabs { display: flex; flex: 1 1 auto; justify-content: center; gap: 6px; min-width: 0; }
#view .fm-top .fm-tabs button { flex: none; min-width: 0; padding: 0 14px; }
button.fm-top-state { display: inline-flex; align-items: center; gap: 10px; box-sizing: border-box; height: var(--fm-h); padding: 0 12px 0 14px; border-radius: var(--radius-md); font: inherit; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; white-space: nowrap; }
:root:not([data-theme="light"]) button.fm-top-state { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
:root:not([data-theme="light"]) button.fm-top-state:hover, :root:not([data-theme="light"]) button.fm-top-state[aria-expanded="true"] { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
:root[data-theme="light"] button.fm-top-state { background: rgba(255, 255, 255, .55); border: 1px solid transparent; }
:root[data-theme="light"] button.fm-top-state:hover, :root[data-theme="light"] button.fm-top-state[aria-expanded="true"] { background: rgba(255, 255, 255, .8); border-color: rgba(120, 100, 150, .35); }
.fm-top-state .fm-dot { border-radius: 2px; color: var(--muted); }
.fm-top-state.is-on .fm-dot, .fm-top-state.is-on .fm-top-word { color: var(--ok-fg); }
.fm-top-state.is-on .fm-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.fm-top-state.is-off .fm-dot, .fm-top-state.is-off .fm-top-word { color: var(--danger); }
.fm-top-sep { width: 1px; height: 18px; background: color-mix(in srgb, var(--text) 16%, transparent); }
.fm-top-players { font-weight: 700; font-variant-numeric: tabular-nums; }
#view .fm-top .fm-top-state .tag { height: 24px; padding: 0 8px; font-size: 12.5px; }
.fm-top-state .o-icon { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.fm-top-state[aria-expanded="true"] .o-icon { transform: rotate(180deg); }
/* the window with every figure: the portal's pop-up glass */
.fm-top-pop { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 520px; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--pop-shadow); background: var(--surface);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
:root:not([data-theme="light"]) .fm-top-pop { background: #17151e; border-color: rgba(255, 255, 255, .1); }
:root[data-theme="light"] .fm-top-pop { background: #fbfafd; border-color: rgba(120, 100, 150, .2); }
#view .fm-top-pop .fm-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#view .fm-top-pop .fm-metric { min-width: 0; order: 0; }
.fm-top-load { display: flex; gap: 14px; flex: none; font-size: 13px; color: var(--muted); white-space: nowrap; }
.fm-top-load b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.fm-top-load .is-warn b { color: var(--t-orange-fg); }
#view .fm-top .fm-refresh { flex: none; width: var(--fm-h); padding: 0; justify-content: center; margin: 0; }
.fm-top .fm-refresh-lbl { display: none; }
#view .fm-top .fm-top-select { display: none; height: var(--fm-h); font-weight: 600; }
#view .fm-top .fm-detail:not(:empty) { margin-top: 10px; }
/* narrower screens: the load lives in the window only, then the sections become one list */
@media (max-width: 1240px) { .fm-top-load { display: none; } }
@media (max-width: 1060px) {
  #view .fm-top .fm-tabs { display: none; }
  #view .fm-top .fm-top-select { display: flex; flex: 1 1 auto; min-width: 0; }
}
@media (max-width: 820px) {
  .fm-top-row { flex-wrap: wrap; }
  .fm-top-statewrap { flex: 1 1 0; min-width: 0; }
  button.fm-top-state { width: 100%; }
  .fm-top-state .o-icon { margin-left: auto; }
  #view .fm-top .fm-top-select { order: 3; flex: 1 1 100%; }
  .fm-top-pop { width: calc(100vw - 52px); max-width: 520px; }
}
/* FiveM sections: the same look as the main top bar's menu (one glass frame, plain words inside, the gradient frame on the open one) */
#view .fm-bar.fm-top .fm-tabs { flex: 0 1 auto; margin: 0 auto; box-sizing: border-box; height: var(--fm-h); align-items: center; gap: 2px; padding: 3px; border-radius: var(--radius-md); }
:root:not([data-theme="light"]) #view .fm-bar.fm-top .fm-tabs { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); --btn-fill: #1f1522; --btn-fill-hover: #2a1a2e; }
:root[data-theme="light"] #view .fm-bar.fm-top .fm-tabs { background: rgba(255, 255, 255, .55); border: 1px solid transparent; }
#view .fm-bar.fm-top .fm-tabs button { height: 100%; min-height: 0; min-width: 0; padding: 0 14px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 500; }
#view .fm-bar.fm-top .fm-tabs button[aria-pressed="true"] { font-weight: 600; }
:root:not([data-theme="light"]) #view .fm-bar.fm-top .fm-tabs button:not([aria-pressed="true"]),
:root[data-theme="light"] #view .fm-bar.fm-top .fm-tabs button:not([aria-pressed="true"]) { background: transparent; border: 1.5px solid transparent; color: var(--muted); }
:root:not([data-theme="light"]) #view .fm-bar.fm-top .fm-tabs button:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .06); color: var(--text); }
:root[data-theme="light"] #view .fm-bar.fm-top .fm-tabs button:not([aria-pressed="true"]):hover { background: var(--raised); color: var(--text); }
@media (max-width: 1280px) { #view .fm-bar.fm-top .fm-tabs button { padding: 0 11px; } }

/* profile: Activity tab */
.fm-job-line { display: flex; flex-direction: column; gap: 6px; }
.fm-bar-fill.is-job { background: var(--brand); }
.fm-tile.is-plus b { color: var(--ok-fg); }
.fm-tile.is-minus b { color: var(--danger); }
.fm-drawer-body > .fm-tiles { margin-bottom: 2px; }

/* profile header like the tablet's card: cash, bank and crypto, then health, armour, hunger, thirst and stress */
.fm-stats.fm-stats-v2 { display: flex; flex-direction: column; gap: 8px; }
.fm-stats-money { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fm-stats-money.has-crypto { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.6fr); }
.fm-stats-bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fm-stat-crypto .fm-stat-top b { font-size: 14px; }
.fm-coins { display: flex; flex-direction: column; gap: 2px; }
.fm-coin { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-coin-name { color: var(--accent); font-weight: 600; }
.fm-bar-fill.is-hunger { background: #f0a43a; }
.fm-bar-fill.is-thirst { background: #3aa0f0; }
.fm-bar-fill.is-stress { background: #e0567a; }
@media (max-width: 820px) {
  .fm-stats-money.has-crypto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-stats-money.has-crypto .fm-stat-crypto { grid-column: 1 / -1; }
  .fm-stats-bars { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- FiveM player profile as a page, laid out like the tablet: the card on the left, the sections on the right (one grid row, so both share their top and bottom edge) ---- */
.fm-pp { display: grid; grid-template-columns: minmax(280px, 330px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.fm-pp > .panel { margin: 0; }
.fm-pp-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: 0; }
.fm-pp-card .fm-drawer-head { flex: none; flex-direction: column; align-items: stretch; gap: 10px; }
.fm-pp-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fm-pp-who .fm-id { min-width: 44px; height: 44px; padding: 0 8px; box-sizing: border-box; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--raised); font-family: var(--mono); font-size: 15px; color: var(--muted); }
.fm-pp-who .fm-name { min-width: 0; display: flex; flex-direction: column; }
.fm-pp-who .fm-name b { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.fm-pp-who .fm-name small { color: var(--faint); font-size: 13px; overflow-wrap: anywhere; }
.fm-pp-card .fm-stats-money, .fm-pp-card .fm-stats-money.has-crypto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fm-pp-card .fm-stats-money .fm-stat-crypto { grid-column: 1 / -1; }
.fm-pp-card .fm-stats-bars { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.fm-pp-card .fm-stats-bars .fm-stat { background: none; padding: 0; }
.fm-pp-facts { grid-template-columns: 90px minmax(0, 1fr); padding-top: 12px; border-top: 1px solid var(--line); }
.fm-pp-facts .fm-copy { cursor: pointer; font-family: var(--mono); font-size: 12.5px; }
.fm-pp-facts .fm-copy:hover { color: var(--accent); }
.fm-pp-back { margin-top: auto; width: 100%; justify-content: center; }
.fm-pp-main { display: flex; flex-direction: column; gap: 14px; padding: 16px; min-width: 0; }
.fm-pp-tabs .o-seg { width: 100%; }
.fm-pp .fm-drawer-body[data-tab="actions"], .fm-pp .fm-drawer-body[data-tab="admin"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.fm-pp .fm-drawer-body > .fm-field, .fm-pp .fm-drawer-body > p.empty { grid-column: 1 / -1; }
@media (max-width: 1100px) { .fm-pp .fm-drawer-body[data-tab="actions"], .fm-pp .fm-drawer-body[data-tab="admin"] { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .fm-pp { grid-template-columns: minmax(0, 1fr); }
  .fm-pp-back { margin-top: 0; }
}
/* the profile page keeps the drawer's compact look for its parts */
.fm-pp.is-busy button { pointer-events: none; opacity: .6; }
.fm-pp .tag { display: inline-flex; align-items: center; min-height: 24px; box-sizing: border-box; padding: 2px 8px; border-radius: var(--radius-sm); }
.fm-pp h4 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--muted); text-transform: uppercase; }
.fm-pp button.primary, .fm-pp button.ghost { height: 42px; min-height: 42px; padding: 0 14px; font-size: 13.5px; font-weight: 600; border-radius: var(--radius-md); }
.fm-pp select, .fm-pp input { height: 42px; border-radius: var(--radius-md); }
.fm-pp .fm-group { justify-content: flex-start; }
@media (max-width: 820px) { .fm-pp button.primary, .fm-pp button.ghost, .fm-pp select, .fm-pp input { height: 44px; min-height: 44px; } }
@media (max-width: 820px) { .fm-pp-card .fm-stats-bars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; } }
/* FiveM Admin has no visible page title: the heading stays for screen readers only */
.fm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* items as compact rows, like the tablet showed trunks and stashes: slot, name, amount; weapons and ammo in red */
.fm-inv { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px; }
button.fm-slot { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; min-height: 40px; padding: 4px 12px; }
.fm-slot-no { position: static; flex: none; min-width: 20px; }
.fm-slot b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-slot-amount { flex: none; font-weight: 600; color: var(--text); }
button.fm-slot.is-danger { border-color: rgba(255, 74, 74, .6); background: rgba(255, 74, 74, .08); box-shadow: inset 0 0 0 1px rgba(255, 74, 74, .1); }
button.fm-slot.is-danger:hover { border-color: rgba(255, 74, 74, .85); background: rgba(255, 74, 74, .12); }
button.fm-slot.is-danger[aria-pressed="true"] { border-color: #ff4a4a; background: rgba(255, 74, 74, .16); }
button.fm-slot.is-danger b { color: #ff7a7a; }
:root[data-theme="light"] button.fm-slot.is-danger b { color: #c81e1e; }
/* FiveM bar: Back button, only while a player profile is open; it looks like Refresh beside it */
#view .fm-top .fm-back { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; height: var(--fm-h); padding: 0 14px 0 10px; margin: 0; border-radius: var(--radius-md); font-size: 13.5px; font-weight: 600; box-shadow: none; }
#view .fm-top .fm-back[hidden] { display: none; }
#view .fm-top .fm-back .o-icon { width: 18px; height: 18px; }
:root:not([data-theme="light"]) #view .fm-top .fm-back { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); color: var(--text); }
:root:not([data-theme="light"]) #view .fm-top .fm-back:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
:root[data-theme="light"] #view .fm-top .fm-back { background: rgba(255, 255, 255, .55); border: 1px solid transparent; color: var(--text); }
:root[data-theme="light"] #view .fm-top .fm-back:hover { background: rgba(255, 255, 255, .8); border-color: rgba(120, 100, 150, .35); }
#view .fm-top .fm-back { width: var(--fm-h); padding: 0; gap: 0; } /* icon only, square like Refresh */
#view .fm-top .fm-back .o-icon { width: 20px; height: 20px; }

/* Discord pictures in the ID boxes: the picture fills the box, the server ID sits on it as a small badge */
.fm-id { position: relative; }
.fm-face { display: none; }
.fm-id.has-face { padding: 0; overflow: visible; background: none; }
.fm-id.has-face .fm-face { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.fm-id.has-face .fm-id-no { position: absolute; z-index: 1; right: -5px; bottom: -5px; min-width: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 4px; font-family: var(--mono); font-size: 10.5px; line-height: 16px; text-align: center; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); }
.fm-side-row .fm-id.has-face { width: 30px; height: 30px; flex: none; border-radius: var(--radius-sm); }
.fm-pp-who .fm-id.has-face { width: 52px; height: 52px; border-radius: var(--radius-md); }

/* profile card: a bigger Discord picture, and the Discord account under the FiveM name */
.fm-pp-who .fm-id.has-face { width: 76px; height: 76px; border-radius: var(--radius-lg); }
.fm-pp-who .fm-id.has-face .fm-id-no { font-size: 12px; line-height: 18px; min-width: 20px; right: -6px; bottom: -6px; }
.fm-discord { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.fm-discord-mark { flex: none; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #fff; background: #5865f2; }

/* Reports, Bans, Server, Stats: the same compact parts as the profile page (small headings, 42 px controls) */
.fm-more h4 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--muted); text-transform: uppercase; }
.fm-more button.primary, .fm-more button.ghost { height: 42px; min-height: 42px; padding: 0 14px; font-size: 13.5px; font-weight: 600; border-radius: var(--radius-md); }
.fm-more select, .fm-more input:not([type="checkbox"]):not([type="radio"]) { height: 42px; border-radius: var(--radius-md); }
.fm-more .fm-group { justify-content: flex-start; }
/* resources: small buttons that sit inside their row */
.fm-res-row { min-height: 40px; padding: 4px 4px; }
.fm-more .fm-res-btns button.ghost { height: 30px; min-height: 30px; padding: 0 12px; font-size: 12.5px; }
.fm-res-row .tag { flex: none; }
/* console: time faint, source dimmed, player names marked */
.fm-console .fm-con-line { white-space: pre-wrap; }
.fm-con-time { color: #7d7890; }
.fm-con-src { color: #a59fbd; }
.fm-con-name { color: #ff5fae; font-weight: 600; }
@media (max-width: 820px) { .fm-more button.primary, .fm-more button.ghost, .fm-more select, .fm-more input:not([type="checkbox"]):not([type="radio"]) { height: 44px; min-height: 44px; } .fm-more .fm-res-btns button.ghost { height: 40px; min-height: 40px; } }
/* console in the portal's colours: player names in the OCTA gradient, the time in the portal's faint grey, a hint of the brand on the frame */
.fm-console { background: #131119; border-color: color-mix(in srgb, var(--c2) 18%, transparent); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--c3) 8%, transparent); }
.fm-con-time { color: #6f6a85; }
.fm-con-name { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.fm-console::selection, .fm-console *::selection { background: color-mix(in srgb, var(--c2) 35%, transparent); color: #fff; }
/* the FiveM bar stays under the portal's top bar (z-index 30, its account menu drops over the page) and over the map */
#view .fm-bar.fm-top { z-index: 20; }
/* ---- the player card on the map, in the portal's look: frosted glass like its menus, the OCTA gradient on top, figures as small tiles ---- */
.fm-map-card { --btn-fill: #1d1724; --btn-fill-hover: #2a1a2e; overflow: hidden; gap: 12px; padding: 14px; border-radius: var(--radius-xl); background: rgba(22, 20, 30, .9); border: 1px solid rgba(255, 255, 255, .1); box-shadow: var(--pop-shadow, 0 18px 50px rgba(0, 0, 0, .45)); -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%); }
.fm-map-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--brand); opacity: .9; }
.fm-map-card .fm-card-top { gap: 12px; }
.fm-map-card .fm-card-top .fm-id { width: 44px; height: 44px; min-width: 44px; border-radius: var(--radius-md); font-size: 14px; }
.fm-map-card .fm-name b { font-size: 16px; font-weight: 700; }
.fm-map-card .fm-name small { color: var(--faint); font-size: 12.5px; }
.fm-map-card .tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 600; }
.fm-card-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fm-card-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 7px 10px; border-radius: var(--radius-md); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.fm-card-fact span { font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.fm-card-fact b { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
#view .fm-map-card .fm-card-actions button { height: 40px; min-height: 0; padding: 0 8px; border-radius: var(--radius-md); font-size: 13.5px; font-weight: 600; }
#view .fm-map-card .fm-card-actions button.primary { border: 1.5px solid transparent; background-color: transparent; background-image: var(--grad-ink), linear-gradient(var(--btn-fill), var(--btn-fill)), var(--grad-line); -webkit-background-clip: text, padding-box, border-box; background-clip: text, padding-box, border-box; background-origin: border-box; color: transparent; }
#view .fm-map-card .fm-card-actions button.primary:hover:not(:disabled) { background-image: var(--grad-ink), linear-gradient(var(--btn-fill-hover), var(--btn-fill-hover)), var(--grad-line); box-shadow: 0 0 18px color-mix(in srgb, var(--c3) 18%, transparent); }
#view .fm-map-card .fm-card-actions button.ghost { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: var(--text); }
#view .fm-map-card .fm-card-actions button.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
#view .fm-map-card button.fm-card-x { border-radius: var(--radius-md); }
@media (max-width: 820px) { #view .fm-map-card .fm-card-actions button { height: 44px; } }
.fm-map-card { width: min(390px, calc(100% - 24px)); }
.fm-card-fact b { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }

/* your own character: "You" in the brand colours; Go to and Bring in the profile */
.tag.fm-you { color: #fff; background: var(--brand); }
.fm-me-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fm-me-row button { margin-left: auto; }
#view .fm-map-card .fm-card-actions { flex-wrap: wrap; }
#view .fm-map-card .fm-card-actions button { flex: 1 1 calc(33% - 8px); }
/* the map fills the window down to the page's bottom padding (fivem.js measures --fm-map-top) */
@media (min-width: 821px) { .fm-map-layout { height: calc(100dvh - var(--fm-map-top, 250px)); } }
/* four buttons on the player card: one row */
#view .fm-map-card .fm-card-actions { flex-wrap: nowrap; }
#view .fm-map-card .fm-card-actions button { flex: 1 1 0; padding: 0 6px; }

/* FiveM Admin, Ranks: a list of ranks on the left, the switches of the chosen one on the right */
.fm-rank-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fm-rank-side > button { align-self: flex-start; }
.fm-rank-view { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fm-rank-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.fm-rank-top .fm-field { flex: 1 1 220px; max-width: 340px; }
.fm-rank-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.fm-rank-group { display: flex; flex-direction: column; gap: 2px; }
label.fm-switch { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 13.5px; color: var(--text); cursor: pointer; border-radius: var(--radius-sm, 8px); }
label.fm-switch:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
label.fm-switch.is-locked { cursor: default; opacity: .75; }
label.fm-switch.is-locked:hover { background: none; }
.fm-switch-box { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fm-switch-track { flex: none; position: relative; width: 34px; height: 20px; border-radius: 999px; background: color-mix(in srgb, var(--text) 18%, transparent); transition: background .15s; }
.fm-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .15s; }
.fm-switch-box:checked + .fm-switch-track { background: var(--brand); }
.fm-switch-box:checked + .fm-switch-track::after { transform: translateX(14px); }
.fm-switch-box:focus-visible + .fm-switch-track { outline: 2px solid var(--brand); outline-offset: 2px; }
.fm-server.is-one { grid-template-columns: minmax(0, 1fr); }
.fm-rank-top .fm-actions { flex: 0 0 auto; flex-wrap: nowrap; }
.fm-rank-top .fm-actions button { flex: 0 0 auto; min-width: 116px; }

/* estimated value on vehicle and house cards in the FiveM profile */
.fm-worth { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.fm-worth small { font-size: 12px; color: var(--faint); }
.fm-worth b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Who may come in (Server tab): switches with a title and a line of text */
label.fm-door-switch { align-items: flex-start; padding: 8px 4px; }
label.fm-door-switch .fm-switch-track { margin-top: 1px; }
label.fm-door-switch .fm-name small { font-size: 12.5px; color: var(--faint); }
.fm-door { display: flex; flex-direction: column; gap: 2px; }
.fm-door .fm-row { margin-top: 8px; }

/* map tiles overlap by 1 px (fivem.js), so Leaflet's adding blend for its own seam fix would draw bright lines there: plain drawing instead */
.fm-map img.leaflet-tile { mix-blend-mode: normal; }

/* FiveM Admin map: portal staff under the player list, set apart by a line; the rows are the player list's own (fm-side-row) */
.fm-staff { flex: none; display: flex; flex-direction: column; gap: 2px; margin: 0 -4px; padding: 10px 4px 0; border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent); max-height: 40%; overflow-y: auto; }
.fm-staff .note { padding: 4px 6px; margin: 0; }
.fm-staff-pic { flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm); font-size: 13px; }
#view button.fm-staff-row.is-away { cursor: default; }

/* app cards: the status chip row sits at the bottom of every card, so the chips line up even when one text runs a line longer */
.app-card-head { flex: 1 0 auto; }

/* profile, Crime tab: the organization's colour dot and its member list (clickable rows open that character) */
.fm-org-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 12%, transparent); }
.fm-org-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
#view button.fm-org-member { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 44px; height: auto; padding: 7px 10px; border-radius: var(--radius-md); border: 1px solid transparent; background: color-mix(in srgb, var(--text) 5%, transparent); color: var(--text); text-align: left; font-weight: 400; cursor: pointer; }
#view button.fm-org-member:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 9%, transparent); }
#view button.fm-org-member:disabled { cursor: default; opacity: 1; }
#view button.fm-org-member.is-me { border-color: color-mix(in srgb, var(--text) 14%, transparent); }
.fm-org-member b { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.fm-org-member small { font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.fm-org > h4 { margin: 6px 0 0; }
/* profile tabs on a phone: with the Crime tab there are up to nine, so they wrap into rows instead of running into each other */
@media (max-width: 560px) {
  .fm-pp-tabs .o-seg.fm-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); height: auto; gap: 4px; }
  .fm-pp-tabs .o-seg.fm-tabs button { min-width: 0; padding: 0 4px; }
}
/* each profile tab as wide as its name needs, so a long name such as Inventory is not cut when nine tabs share the row */
.fm-pp-tabs .o-seg.fm-tabs button { flex: 1 1 auto; }

/* FiveM Money tab: sources table (click a row to go deeper), amounts right-aligned, filters next to the period */
.fm-money-filters { display: flex; flex-wrap: wrap; gap: 10px; flex: 1 1 320px; align-items: center; }
.fm-money-filters select { flex: none; min-height: 40px; }
.fm-money-filters .fm-search { flex: 1 1 200px; margin: 0; }
.fm-money-table td.fm-num, .fm-money-table th.fm-num { text-align: right; white-space: nowrap; }
.fm-money-table tr.fm-click { cursor: pointer; }
.fm-money-table tr.fm-click:hover td { background: color-mix(in srgb, var(--text) 5%, transparent); }
.fm-money-table td small.fm-muted, .fm-money-table td.fm-muted { color: var(--faint); font-size: 12.5px; }
.fm-money-chart { height: 120px; }
@media (max-width: 820px) { .fm-money-table th, .fm-money-table td { padding-left: 6px; padding-right: 6px; font-size: 13px; } }
.fm-money-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fm-money-list > .fm-section-title { margin: 4px 0 0; }
/* Money tab: scripts that give or take money, read from their files */
.fm-scan h4 { margin: 8px 0 0; }
.fm-scan-res { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--text) 4%, transparent); }
.fm-scan-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.fm-scan-head b { font-weight: 600; overflow-wrap: anywhere; }
.fm-scan-head small { color: var(--faint); font-size: 12.5px; overflow-wrap: anywhere; }
.fm-scan-places { display: flex; flex-direction: column; gap: 2px; }
.fm-scan-places code { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; white-space: pre-wrap; }

/* Chat log: what the Chat list can and cannot show (octa-admin 0.16.77) */
.fm-chat-note { margin: 0 0 10px; font-size: 13px; color: var(--faint); }

/* Apps: every row of app cards is the same height, also when one card has a longer description (Matt, 17 Nov 2026) */
.grid:has(> .app-card) { grid-auto-rows: 1fr; }

/* Theme picker (top bar): one colour field, Dark / Light, Reset. Since 27 Nov 2026 it replaces the lists of named colours and backgrounds. */
.o-themes { position: relative; flex: none; }
.o-theme-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; width: 272px; display: grid; gap: 10px; padding: 10px;
  border: 1px solid var(--line-strong); border-radius: 5px; box-shadow: var(--pop-shadow);
  -webkit-backdrop-filter: blur(22px) saturate(150%); backdrop-filter: blur(22px) saturate(150%);
}
:root:not([data-theme="light"]) .o-theme-menu { background: rgb(24, 22, 32); border-color: rgba(255, 255, 255, .1); }
:root[data-theme="light"] .o-theme-menu { background: #fff; border-color: rgba(255, 255, 255, .9); }
.o-theme-menu[hidden] { display: none; }
.o-theme-colour { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 64px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: none; cursor: pointer; }
.o-theme-colour::-webkit-color-swatch-wrapper { padding: 0; }
.o-theme-colour::-webkit-color-swatch { border: 0; border-radius: 3px; }
.o-theme-colour::-moz-color-swatch { border: 0; border-radius: 3px; }
.o-theme-row { display: flex; gap: 8px; }
.o-theme-seg { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; border: 1px solid var(--line-strong); border-radius: 4px; }
.o-theme-seg button, .o-theme-reset { height: 38px; padding: 0; text-align: center; border-radius: 3px; color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.o-theme-seg button:hover, .o-theme-reset:hover:not(:disabled) { color: var(--text); background: var(--raised); }
.o-theme-seg button[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.o-theme-reset { height: 46px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 4px; }
.o-theme-reset:disabled { opacity: .4; cursor: default; }
/* Light: soft patches in the chosen colour */
:root[data-theme="light"] body.o-app::before {
  background:
    radial-gradient(38% 42% at 12% 8%, color-mix(in srgb, var(--c2) 22%, transparent), transparent 70%),
    radial-gradient(34% 40% at 88% 18%, color-mix(in srgb, var(--c3) 20%, transparent), transparent 70%),
    radial-gradient(40% 45% at 70% 92%, color-mix(in srgb, var(--c1) 13%, transparent), transparent 70%),
    radial-gradient(30% 35% at 18% 85%, color-mix(in srgb, var(--c4) 14%, transparent), transparent 70%);
}
@media (max-width: 820px) {
  /* on a phone the menu hangs from the whole top bar, edge to edge */
  .o-themes { position: static; }
  .o-theme-menu { left: -1px; right: 0; width: auto; } /* -1px: over the bar's own border */
  .o-theme-seg button { height: 44px; }
  .o-theme-reset { height: 52px; }
}
/* the top-bar logo keeps the OCTA rainbow on the OCTA pink; a picked colour flows through its own shades */
:root[data-accent]:not([data-accent="pink"]) .o-logo-flow {
  background: linear-gradient(90deg, var(--c1) 0%, var(--c2) 12.5%, var(--c3) 25%, var(--c4) 37.5%, var(--c-ink) 50%, var(--c4) 62.5%, var(--c3) 75%, var(--c2) 87.5%, var(--c1) 100%) 0 0 / 200% 100% repeat-x;
}
/* a very light picked colour (data-accent-tone="light", set by octa-theme-boot.js) would vanish on the light background: darker shades there */
:root[data-theme="light"][data-accent-tone="light"] {
  --accent: color-mix(in srgb, var(--c2) 60%, #000);
  --grad-line: linear-gradient(90deg, color-mix(in srgb, var(--c2) 60%, #000) 0%, color-mix(in srgb, var(--c3) 60%, #000) 60%, color-mix(in srgb, var(--c4) 60%, #000) 100%);
  --grad-ink: linear-gradient(90deg, color-mix(in srgb, var(--c2) 55%, #000) 0%, color-mix(in srgb, var(--c3) 55%, #000) 55%, color-mix(in srgb, var(--c4) 55%, #000) 100%);
  --grad-icon: color-mix(in srgb, var(--c3) 55%, #000);
  --grad-title: linear-gradient(90deg, color-mix(in srgb, var(--c1) 55%, #000) 0%, color-mix(in srgb, var(--c2) 58%, #000) 32%, color-mix(in srgb, var(--c3) 60%, #000) 68%, color-mix(in srgb, var(--c4) 62%, #000) 100%);
}
/* white letters and symbols on the very light gradients would vanish: dark ones instead */
:root[data-accent-tone="light"] :is(.o-avatar, .avatar, .meter-icon, .root-card:not(.is-shared) .root-folder-icon) { color: #16141C; }

/* OCTA Vault in the browser (vault.js, 24 Nov 2026): tools row, category tabs, selection bar, busy and drop states */
.vlt-form [hidden], .vlt-root [hidden] { display: none !important; }
.vlt-mode { margin: 0 0 14px; }
.vlt-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.vlt-root:not(.in-trash) .vlt-trashonly { display: none; }
.vlt-tools .danger, .vlt-sel .danger { color: #ff9db2; }
.vlt-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; margin: 0 0 12px; scrollbar-width: none; }
.vlt-tabs::-webkit-scrollbar { display: none; }
.vlt-tabs button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.vlt-tabs small { opacity: .65; font-size: .8em; font-family: var(--mono); }
.vlt-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.vlt-sel .grow { flex: 1; }
.vlt-sel .selcount { font-size: 13.5px; }
.vlt-cb { width: 34px; }
.vlt-cb input { width: 16px; height: 16px; accent-color: var(--c2); }
.vlt-star { font-size: 1.05rem; margin-right: 6px; }
.vlt-star.on { color: var(--c2); }
.vlt-prog { margin: 0 0 12px; }
.vlt-root.is-busy .vlt-tools button, .vlt-root.is-busy .vlt-sel button, .vlt-root.is-busy .vlt-star { opacity: .45; pointer-events: none; }
.vlt-root.is-drop { outline: 2px dashed var(--c2); outline-offset: 6px; border-radius: var(--radius-lg); }
.vlt-iconwrap { position: relative; flex: none; }
.vlt-iconbtn { padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.vlt-noicon { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; border: 1px solid var(--line); }
.vlt-iconmenu { position: absolute; top: 70px; left: 0; z-index: 5; display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); min-width: 150px; }
.vlt-maker { margin: 0 0 14px; }
.vlt-edit { display: block; width: 100%; min-height: 40vh; resize: vertical; box-sizing: border-box; border: 1px solid var(--line); font-family: var(--mono); }
.vlt-pbtns { margin: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 820px) {
  .vlt-date { display: none; }
  .vlt-tools button, .vlt-sel button, .vlt-tabs button { min-height: 44px; }
}
/* vault: path and search on one row of equal height, flush with the tabs and the list */
.vlt-root .files-bar { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 8px; padding: 0; margin: 0 0 12px; border: 0; background: none; box-shadow: none; }
.vlt-root .files-bar .crumbs { flex: 1 1 auto; min-width: 0; width: auto; margin: 0; min-height: 42px; box-sizing: border-box; display: flex; align-items: center; }
.vlt-root .files-bar .files-tools { flex: 0 0 260px; margin: 0; padding: 0; }
.vlt-root .files-bar .files-tools input { width: 100%; height: 100%; min-height: 42px; box-sizing: border-box; margin: 0; }
@media (max-width: 820px) {
  .vlt-root .files-bar { flex-wrap: wrap; }
  .vlt-root .files-bar .files-tools { flex: 1 1 100%; }
  .vlt-root .files-bar .crumbs, .vlt-root .files-bar .files-tools input { min-height: 44px; }
}
/* vault: star and Download stay on one line */
.vlt-table td.act { white-space: nowrap; }

/* Vault explorer in the Cloud style (vault.js, 25 Nov 2026): heading with the vault's icon, star mark, busy state, Password maker window */
.vlt-heading .vlt-headtext { display: flex; align-items: center; gap: 16px; min-width: 0; }
.vlt-heading .files-heading-text { min-width: 0; }
.vlt-heading .files-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vlt-mark { flex: none; width: 58px; height: 58px; min-width: 58px; min-height: 58px; padding: 0; border: 0; border-radius: 5px; overflow: hidden; }
button.vlt-mark { cursor: pointer; }
.vlt-mark svg, .o-app button.vlt-mark .ui-icon { width: 26px; height: 26px; }
.vlt-mark.has-img { background: transparent; }
.vlt-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vlt-starmark { flex: none; display: inline-grid; place-items: center; color: var(--c2); margin-left: 6px; }
.vlt-starmark svg { width: 15px; height: 15px; fill: currentColor; }
.tool-trash.on { color: var(--c2); border-color: color-mix(in srgb, var(--c2) 55%, transparent); }
.vlt-files.is-busy .tool-filter-group, .vlt-files.is-busy .selbar button, .vlt-files.is-busy .more, .vlt-files.is-busy .trash-act button { opacity: .45; pointer-events: none; }
.vlt-files .vlt-prog { margin: 0 0 12px; }
.vlt-files .vlt-preview:empty { display: none; }
.vlt-files .vlt-preview { margin: 0 0 14px; }
.vlt-files .trash-tools { display: flex; justify-content: flex-end; margin: 0 0 10px; }
.vlt-maker-modal .modal-card { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; }
.vlt-maker-modal .modal-card .panel { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
@media (max-width: 820px) {
  .vlt-heading { flex-wrap: wrap; }
  .vlt-heading .tool-actions { width: 100%; margin-left: 0; display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px 44px; gap: 6px; }
  .vlt-heading .tool-actions > button { width: 100% !important; min-width: 0 !important; min-height: 44px; padding-inline: 0 !important; justify-content: center; }
  .vlt-pwbtn span { display: none; }
}
/* vault: unlock and New vault forms inside the explorer panel */
.vlt-lockform { display: grid; gap: 12px; max-width: 560px; padding: 2px 6px 10px; }
.vlt-lockform .vlt-mode { margin: 0; justify-self: start; }
.vlt-lockform > button[type=submit] { justify-self: start; }
.vlt-lockform .note:empty { display: none; }

/* Home (27 Nov 2026): a row of big tiles with each page's own content (Cloud, FiveM, Twitch); FiveM accounts get a second
   row (players online, latest actions, and the small cards with the Windows downloads stacked beside them), other accounts
   a row of small cards and the downloads. All rows use the same columns (--home-cols, set in app.js). Boxes inside a tile stay see-through. */
.home-big, .home-small { display: grid; grid-template-columns: repeat(var(--home-cols, 3), minmax(0, 1fr)); gap: 14px; }
.home-small, .home-second { margin-top: 14px; }
.home-tile { display: flex; flex-direction: column; gap: 22px; padding: 22px 24px 24px; }
.home-tile.home-wide { grid-column: span 2; }
.home-head { display: flex; align-items: center; gap: 14px; color: var(--text); }
.home-head::after { content: ""; position: absolute; inset: 0; }
#view .home-head h3 { flex: 1; min-width: 0; }
.home-head .o-tile { width: 46px; height: 46px; flex: none; }
.home-body { flex: 1; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.home-count { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.home-num { font-size: 72px; line-height: .86; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.home-num.sm { font-size: 36px; line-height: 1; letter-spacing: -.02em; }
.home-sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.home-sub.is-on::before, .home-sub.is-off::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ok); }
.home-sub.is-off::before { background: var(--danger); }
.home-stats { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(68px, 1fr); gap: 8px; }
.home-stat { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--text) 16%, transparent); border-radius: var(--radius-md); }
.home-stat small { color: var(--muted); font-size: 13.5px; }
.home-stat b { font-size: 22px; line-height: 1; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* lists inside a tile: newest files, players, log */
.home-recent { display: flex; flex-direction: column; margin-top: auto; }
.home-players .home-recent, .home-log .home-recent { margin-top: 0; }
.home-file { display: flex; align-items: center; gap: 10px; height: 36px; border-top: 1px solid var(--line); font-size: 14px; min-width: 0; }
.home-players .home-file:first-child, .home-log .home-file:first-child { border-top: 0; }
.home-file svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.home-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-file small { color: var(--faint); font-size: 13px; white-space: nowrap; }
.home-id { flex: none; min-width: 34px; font-style: normal; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* Twitch: saved people, two per row, with their pictures */
.home-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.home-person { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px; border: 1px solid color-mix(in srgb, var(--text) 16%, transparent); border-radius: var(--radius-md); font-size: 14.5px; font-weight: 600; }
.home-person .tt-avatar { width: 44px; height: 44px; }
.home-person span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* small cards and the downloads stacked beside the FiveM row */
.home-stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home-stack .app-card { padding: 12px 18px; }
.home-stack .app-card-head { align-items: center; }
.home-stack .app-card .o-tile { width: 44px; height: 44px; }
#view .home-stack .section-title { margin: 6px 0 -2px; }
.home-links { display: flex; flex-wrap: wrap; gap: 12px; }
.home-stack .home-links { gap: 8px; }
.home-links .o-btn { gap: 9px; }
.home-stack .home-links .o-btn { padding: 0 14px; }
.home-links .o-btn svg { width: 16px; height: 16px; }
/* narrower screens: two columns, whatever is left alone on the last row takes the whole row */
@media (max-width: 1100px) {
  .home-big, .home-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-big > :last-child:nth-child(odd) { grid-column: span 2; }
}
@media (max-width: 820px) {
  .home-big, .home-small { grid-template-columns: minmax(0, 1fr); }
  .home-big > :last-child:nth-child(odd), .home-tile.home-wide { grid-column: auto; }
  .home-tile { padding: 18px; gap: 18px; }
  .home-num { font-size: 60px; }
  .home-links .o-btn { flex: 1 1 100%; }
}

/* Theme picker: a caption on the colour swatch, dark letters on a very bright colour */
.o-theme-pick { position: relative; display: block; }
.o-theme-pick span { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font-size: 14px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
:root[data-accent-tone="light"] .o-theme-pick span { color: #16141C; text-shadow: none; }
