/* FemboyAddons website - the one stylesheet every page shares.
   Look "A - Soft Glass": dark plum night, pastel pink / lavender / peach aurora behind frosted
   glass, generous rounding, gradient buttons. Outfit for headings, Plus Jakarta Sans for text
   (both loaded by each page's <link> to Google Fonts).
   Components: buttons, fields, cards, tabs, badges, tables, modal, toast, popover, maintenance,
   and the app shell (sidebar + top bar) the panels use.
   The variables --white, --pink-soft, --green, --red, --yellow and --dim are also used by the
   pages' scripts in inline styles - keep them. */

:root {
  color-scheme: dark;
  --bg: #0d0a14;
  --bg-2: #141020;
  --glass: rgba(255,255,255,0.06);
  --glass-2: rgba(255,255,255,0.085);
  --glass-hi: rgba(255,255,255,0.14);
  --surface: rgba(255,255,255,0.045);
  --surface-2: rgba(255,255,255,0.07);
  --surface-3: rgba(255,255,255,0.10);
  --field: rgba(10,8,18,0.55);
  --solid: rgba(26,20,38,0.92);         /* modals, toasts, popovers, dropdowns */
  --pink: #ff8fc8;
  --pink-2: #ffa9d6;
  --pink-soft: #ffc4e3;
  --pink-glow: rgba(255,143,200,0.22);
  --lav: #b9a4ff;
  --peach: #ffc9a8;
  --white: #fbf8ff;
  --text: #ece6f6;
  --dim: #aea6c0;
  --faint: #8a82a0;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --green: #8ff0c0;
  --yellow: #ffd98a;
  --red: #ff9aa8;
  --blue: #9cc2ff;
  --purple: #c7b2ff;
  --grad: linear-gradient(120deg, #ff8fc8 0%, #c9a4ff 55%, #9fc8ff 100%);
  --grad-soft: linear-gradient(120deg, rgba(255,143,200,.18), rgba(185,164,255,.10) 50%, rgba(159,200,255,.06));
  --on-grad: #2a0f24;
  --radius: 22px;
  --radius-sm: 14px;
  --blur: blur(22px) saturate(140%);
  --shadow: 0 8px 40px rgba(5,2,15,0.5);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 24px -10px rgba(5,2,15,0.6);
  /* Glows: a thin light ring that follows the radius, a tight pink core and a faint lavender
     spread - all centred (no y offset), so the glow sits evenly around the element. */
  --glow-sm: inset 0 0 0 1px rgba(255,255,255,0.18), 0 0 6px rgba(255,143,200,0.32), 0 0 16px rgba(201,164,255,0.2);
  --glow: inset 0 0 0 1px rgba(255,255,255,0.2), 0 0 8px rgba(255,143,200,0.38), 0 0 22px rgba(185,164,255,0.26);
  --glow-hover: inset 0 0 0 1px rgba(255,255,255,0.28), 0 0 10px rgba(255,143,200,0.5), 0 0 28px rgba(185,164,255,0.36);
  --glow-lg: inset 0 0 0 1px rgba(255,255,255,0.22), 0 0 12px rgba(255,143,200,0.38), 0 0 32px rgba(185,164,255,0.28);
  --glow-dot: 0 0 6px rgba(255,143,200,0.65);
  --font-head: 'Outfit', system-ui, sans-serif;
  --font: 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 500 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-user-select: none; user-select: none;
}
input, textarea, select, .selectable { -webkit-user-select: text; user-select: text; }

/* ---- backdrop: three big soft colour blobs that drift and breathe ----
   Each blob is its own fixed element with a still radial gradient; only transform and opacity
   animate, as plain CSS keyframes. Browsers run those on the compositor at the display's refresh
   rate (60/120/144 Hz) without repainting anything and without JavaScript. Paused while the tab
   is hidden and under "reduce motion". */
html::before, html::after, body::before {
  content: ''; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%;
  will-change: transform, opacity; contain: strict;
  animation-timing-function: ease-in-out; animation-iteration-count: infinite; animation-direction: alternate;
}
/* The blobs drift AND pulse their brightness, as before. Performance variant: they are ~20% smaller
   than they were, so each frame the compositor blends a much smaller area under the translucent glass
   panels (cost grows with the square of the size, so -20% size ~= -35% work) - the pulse stays, the
   site stops feeling delayed. transform + opacity are both GPU-composited; keeping them on their own
   layer (will-change) and shrinking the area is what buys the speed. Paused when hidden / reduce-motion. */
html::before {   /* pink, top left */
  width: 48vmax; height: 48vmax; left: -16vmax; top: -20vmax;
  background: radial-gradient(closest-side, rgba(255,124,192,0.5), rgba(255,124,192,0.14) 55%, transparent);
  animation-name: fa-blob-a; animation-duration: 16s;
}
html::after {    /* violet, right */
  width: 46vmax; height: 46vmax; right: -18vmax; top: 2vmax;
  background: radial-gradient(closest-side, rgba(143,107,255,0.44), rgba(143,107,255,0.12) 55%, transparent);
  animation-name: fa-blob-b; animation-duration: 19s; animation-delay: -7s;
}
body::before {   /* peach, bottom */
  width: 44vmax; height: 44vmax; left: 28vw; bottom: -26vmax;
  background: radial-gradient(closest-side, rgba(255,179,143,0.32), rgba(255,179,143,0.09) 55%, transparent);
  animation-name: fa-blob-c; animation-duration: 13s; animation-delay: -4s;
}
@keyframes fa-blob-a {
  0%   { transform: translate(0, 0) scale(.9);       opacity: .6; }
  50%  { transform: translate(9vw, 5vw) scale(1.12); opacity: .9; }
  100% { transform: translate(4vw, 10vw) scale(1);   opacity: .7; }
}
@keyframes fa-blob-b {
  0%   { transform: translate(0, 0) scale(1.05);       opacity: .85; }
  50%  { transform: translate(-10vw, 6vw) scale(.88);  opacity: .55; }
  100% { transform: translate(-4vw, -5vw) scale(1.2);  opacity: .9; }
}
@keyframes fa-blob-c {
  0%   { transform: translate(0, 0) scale(.95);        opacity: .7; }
  50%  { transform: translate(8vw, -7vw) scale(1.18);  opacity: .9; }
  100% { transform: translate(-6vw, -3vw) scale(.85);  opacity: .55; }
}
html.fa-hidden::before, html.fa-hidden::after, html.fa-hidden body::before { animation-play-state: paused; }

a { color: var(--pink-soft); text-decoration: none; transition: color .1s; }
a:hover { color: var(--white); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--white); letter-spacing: -0.02em; }
::selection { background: rgba(255,143,200,0.35); }
html { scrollbar-color: rgba(255,255,255,0.14) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.10); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,143,200,0.4); background-clip: padding-box; border: 2px solid transparent; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ---- glow behind a centre piece ---- */
.glow { position: relative; }
.glow::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 140%; height: 160%;
  transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, var(--pink-glow), transparent 65%);
}

/* ---- breadcrumb: a glass pill in the top left, plain inside the top bar ---- */
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
.crumbs a.brand, .brand-text { font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--white); }
.crumbs .sep { color: var(--faint); }
.crumbs .current { color: var(--text); font-weight: 600; }
.corner { position: fixed; top: 18px; left: 18px; z-index: 20; }
.corner.crumbs, .crumbs.corner { display: inline-flex; padding: 8px 16px; border-radius: 999px; background: rgba(28,21,40,0.86); border: 1px solid var(--border);
  box-shadow: var(--glass-shadow); max-width: calc(100vw - 36px); overflow: hidden; white-space: nowrap; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--glass-2); color: var(--white);
  font: 600 13px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .1s, border-color .1s, color .1s, transform .1s, box-shadow .1s, opacity .1s;
}
.btn:hover { background: var(--glass-hi); border-color: rgba(255,255,255,0.22); color: var(--white); transform: translateY(-1px); }
.btn:active { transform: translateY(0); transition: none; }
.btn:focus-visible, .field:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.btn:disabled, .btn.is-busy { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { border: 0; background: var(--grad); color: var(--on-grad); box-shadow: var(--glow); }
.btn-primary:hover { background: var(--grad); color: var(--on-grad); box-shadow: var(--glow-hover); }
.btn-primary:disabled { box-shadow: none; }
.btn-danger { color: var(--red); border-color: rgba(255,154,168,0.3); background: rgba(255,154,168,0.08); }
.btn-danger:hover { background: rgba(255,154,168,0.16); color: #ffe0e5; border-color: rgba(255,154,168,0.5); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--dim); }
.btn-ghost:hover { background: var(--glass-2); color: var(--white); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
.btn svg, .nav-item svg, .icon { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---- fields ---- */
.field, input[type=text], input[type=password], input[type=number], input[type=search], input[type=email], input:not([type]), textarea, select {
  width: 100%; height: 42px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--field); border: 1px solid var(--border); color: var(--white);
  font: 500 14px var(--font); transition: border-color .1s, box-shadow .1s, background .1s;
}
textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aea6c0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
select option { background: #1b1528; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(255,143,200,0.6); box-shadow: 0 0 0 4px rgba(255,143,200,0.15); }
input[type=checkbox] { -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 18px; height: 18px; margin: 0; border-radius: 6px; cursor: pointer; vertical-align: middle; position: relative;
  background: var(--field); border: 1px solid var(--border-strong); transition: background .12s, border-color .12s, box-shadow .12s; }
input[type=checkbox]::after { content: ''; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 10px; border: solid var(--on-grad); border-width: 0 2.2px 2.2px 0;
  transform: rotate(45deg) scale(0); transition: transform .14s cubic-bezier(.2,.8,.2,1.3); }
input[type=checkbox]:checked { background: var(--grad); border-color: transparent; box-shadow: var(--glow-sm); }
input[type=checkbox]:checked::after { transform: rotate(45deg) scale(1); }
input[type=checkbox]:hover:not(:disabled) { border-color: rgba(255,143,200,.6); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; --fill: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, #ff8fc8, #c9a4ff) 0 / var(--fill) 100% no-repeat, rgba(255,255,255,0.1); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.1); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: linear-gradient(90deg, #ff8fc8, #c9a4ff); }
input[type=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 rgba(255,143,200,0.35), 0 0 10px rgba(255,143,200,0.45); transition: box-shadow .12s, transform .12s; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 0 0 4px rgba(255,143,200,0.35), 0 0 10px rgba(255,143,200,0.45); }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(255,143,200,0.3), 0 0 14px rgba(255,143,200,0.55); }
input[type=range]:focus { outline: none; box-shadow: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--pink); }
input[type=range]:disabled { opacity: .45; cursor: not-allowed; }
input[type=datetime-local], input[type=date], input[type=time] { width: 100%; height: 42px; padding: 0 14px; border-radius: var(--radius-sm); background: var(--field); border: 1px solid var(--border); color: var(--white); font: 500 14px var(--font); color-scheme: dark; }
input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(80%) sepia(30%) saturate(400%) hue-rotate(280deg); cursor: pointer; opacity: .85; }
input[type=color] { width: 42px; height: 42px; padding: 3px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--field); cursor: pointer; }
input[type=file] { color: var(--dim); font: 500 12.5px var(--font); }
input[type=file]::file-selector-button { margin-right: 10px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--glass-2); color: var(--white); font: 600 12px var(--font); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--glass-hi); }
.label, label.label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-row > .grow { flex: 1; min-width: 160px; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; font-size: 13px; }

/* ---- glass cards ---- */
.card { position: relative; background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--glass-shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font: 600 17px var(--font-head); color: var(--white); letter-spacing: -0.01em; }
.card-sub { color: var(--dim); font-size: 12.5px; margin-top: 2px; }
.card.glow-card { box-shadow: var(--glass-shadow), 0 0 40px rgba(255,143,200,0.1); }
.section-title { font: 600 15px var(--font-head); color: var(--white); margin: 28px 0 12px; letter-spacing: -0.01em; }
.muted { color: var(--dim); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12px; }
.empty { padding: 28px; text-align: center; color: var(--dim); border: 1px dashed var(--border-strong); border-radius: var(--radius); font-size: 13px; background: rgba(255,255,255,0.02); }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--glass); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; min-width: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.card .tile { background: rgba(255,255,255,0.04); }
.tile .label { margin-bottom: 4px; }
.tile .value { color: var(--white); font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.tile .value.mono { font-size: 12.5px; color: var(--text); }

/* ---- tabs (segmented pill) ---- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--glass); border: 1px solid var(--border); border-radius: 999px; flex-wrap: wrap;
  }
.tab { height: 32px; padding: 0 14px; border-radius: 999px; border: 0; background: transparent; color: var(--dim); font: 600 13px var(--font); cursor: pointer; transition: background .1s, color .1s; }
.tab:hover { color: var(--white); background: rgba(255,255,255,0.05); }
.tab.active { background: rgba(255,255,255,0.13); color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }

/* ---- badges ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 999px; font: 700 11px var(--font); letter-spacing: .03em; text-transform: capitalize; background: rgba(255,255,255,0.08); color: var(--text); white-space: nowrap; }
.badge.green { background: rgba(143,240,192,0.14); color: var(--green); }
.badge.green::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 5px currentColor; }
.badge.yellow { background: rgba(255,217,138,0.14); color: var(--yellow); }
.badge.red { background: rgba(255,154,168,0.14); color: var(--red); }
.badge.blue { background: rgba(156,194,255,0.14); color: var(--blue); }
.badge.purple { background: rgba(199,178,255,0.15); color: var(--purple); }
.badge.pink { background: rgba(255,143,200,0.16); color: var(--pink-soft); }
.rank-admin { color: #ff9aa8; } .rank-dev { color: #c7b2ff; } .rank-staff { color: #ffd98a; } .rank-beta { color: #9cc2ff; } .rank-access { color: #8ff0c0; } .rank-no_access { color: #a59db6; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--glass);
  box-shadow: var(--glass-shadow); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 13px 16px; font: 700 11px var(--font); letter-spacing: .09em; text-transform: uppercase; color: var(--dim); background: rgba(255,255,255,0.035); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .08s; }
.table tbody tr:hover td { background: rgba(255,143,200,0.04); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.clickable { cursor: pointer; border-bottom: 1px dotted rgba(255,255,255,0.3); }
.clickable:hover { color: var(--white); border-bottom-color: var(--pink); }

/* ---- list items (reports, tickets, changelog, macros) ---- */
.item { background: var(--glass); border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; transition: border-color .12s, transform .12s, background .12s; box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.card .item { background: rgba(255,255,255,0.035); }
.item + .item { margin-top: 12px; }
.item:hover { border-color: var(--border-strong); }
.item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-meta { margin-left: auto; color: var(--dim); font-size: 12.5px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.item-body { margin-top: 10px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.item-actions { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.version { font: 700 18px var(--font-head); color: var(--white); letter-spacing: -0.02em; }
.changelog-lines { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.changelog-lines div { color: var(--text); }

/* ---- modal ---- */
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,5,16,0.74); opacity: 0; transition: opacity .2s; }
.modal-backdrop.show { opacity: 1; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 40px); overflow: auto; background: linear-gradient(160deg, rgba(255,143,200,0.08), rgba(185,164,255,0.04) 60%), var(--solid);
  border: 1px solid var(--border-strong); border-radius: 26px; padding: 26px; box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.1); transform: translateY(10px) scale(.98); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.modal-backdrop.show .modal { transform: none; }
.modal.wide { max-width: 720px; }
.modal h3 { font-size: 20px; margin-bottom: 6px; }
.modal-body { color: var(--text); margin-top: 8px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ---- toast ---- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 220px; max-width: 380px; padding: 12px 16px; border-radius: 16px; background: var(--solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); color: var(--text); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: toast-in .25s cubic-bezier(.2,.8,.2,1); }
.toast::before { content: ''; width: 4px; align-self: stretch; border-radius: 4px; background: var(--grad); flex-shrink: 0; }
.toast.ok::before { background: var(--green); } .toast.err::before { background: var(--red); } .toast.warn::before { background: var(--yellow); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---- popover (a value to copy) ---- */
.popover { position: fixed; z-index: 1500; background: var(--solid); border: 1px solid var(--border-strong); border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); max-width: 360px; }
.popover .mono { overflow-wrap: anywhere; color: var(--white); }

/* ---- maintenance ---- */
.maint { position: fixed; inset: 0; z-index: 9999; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; overflow: auto; }
/* While it shows, the page underneath is hidden and the maintenance card sits on the same moving
   colour background as every other page. */
html.fa-covered body > *:not(.maint):not(.toasts) { visibility: hidden; }
.maint.show { display: flex; }
.maint h1 { font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.1; margin: 18px 0 10px; }
.maint-card { width: 100%; max-width: 520px; padding: 38px 30px; border-radius: 30px; background: linear-gradient(160deg, rgba(255,143,200,0.08), rgba(185,164,255,0.04) 60%), rgba(30,23,44,0.92); border: 1px solid var(--border-strong); box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.1); display: flex; flex-direction: column; align-items: center; }
.maint-icon { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--grad); color: var(--on-grad); box-shadow: var(--glow-lg); animation: fa-bob 4s ease-in-out infinite; }
.maint-icon svg { width: 28px; height: 28px; }
@keyframes fa-bob { 50% { transform: translateY(-4px) rotate(-5deg); } }
.maint-text { max-width: 400px; font-size: 15px; }
.maint-until { margin-top: 14px; padding: 8px 16px; border-radius: 18px; background: var(--glass-2); color: var(--pink-soft); font-weight: 600; font-size: 13.5px; }
.maint-actions { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; justify-content: center; }
.maint-note { margin-top: 14px; font-size: 12px; }
.maint-banner { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1900; max-width: calc(100vw - 32px); padding: 9px 18px; border-radius: 999px;
  background: rgba(52,44,30,0.95); border: 1px solid rgba(255,217,138,0.4); color: var(--yellow); font-size: 12.5px; font-weight: 600; text-align: center; box-shadow: var(--shadow); }

/* ---- the app shell: floating glass sidebar + top bar ---- */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 16px; padding: 16px; min-height: 100vh; transition: grid-template-columns .25s; }
.app.collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar { position: sticky; top: 16px; height: calc(100vh - 32px); display: flex; flex-direction: column; padding: 18px 12px; border-radius: 26px; overflow: hidden;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); box-shadow: var(--glass-shadow); }
.sidebar .brand-row { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 14px 10px; gap: 8px; }
.sidebar .brand-text { font-size: 20px; white-space: nowrap; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; overflow-y: auto; scrollbar-width: none; }
.sidebar nav::-webkit-scrollbar { display: none; }
.sidebar .nav-label { font: 700 10.5px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 14px 14px 6px; white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 14px; border-radius: 14px; color: var(--dim); font: 600 13.5px var(--font); cursor: pointer; border: 0; background: transparent; text-align: left; white-space: nowrap; position: relative; text-decoration: none; transition: background .1s, color .1s; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-item.active { background: linear-gradient(100deg, rgba(255,143,200,.24), rgba(185,164,255,.12)); color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 0 14px -4px rgba(255,143,200,.45); }
.nav-item.active svg { color: var(--pink); }
.nav-item .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--grad); color: var(--on-grad); font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.sidebar .nav-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.app.collapsed .sidebar .brand-text, .app.collapsed .nav-item span, .app.collapsed .nav-label, .app.collapsed .nav-item .count { display: none; }
.app.collapsed .nav-item { justify-content: center; padding: 0; }
.app.collapsed .sidebar .brand-row { justify-content: center; padding: 0 0 14px; }
.topbar { position: sticky; top: 16px; z-index: 30; display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 10px 0 20px; border-radius: 20px;
  background: rgba(24,18,36,0.9); border: 1px solid var(--border); box-shadow: var(--glass-shadow); }
.topbar .spacer { flex: 1; }
.bell { position: relative; }
.bell .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: var(--glow-dot); }
.main { min-width: 0; }
.content { max-width: 1040px; padding: 30px 14px 64px; }
.content.wide { max-width: 1280px; }
.page-title { font: 700 34px/1.15 var(--font-head); color: var(--white); letter-spacing: -0.03em; margin-bottom: 4px; }
.page-sub { color: var(--dim); margin: 4px 0 24px; max-width: 700px; font-size: 14.5px; }
.page { display: none; }
.page.active { display: block; }
/* Long lists: items outside the viewport skip layout and paint until scrolled to. */
/* (no content-visibility: it made every newly scrolled-in item lay out and paint during the scroll) */
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 340px; max-height: 440px; overflow: auto; background: var(--solid); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow); padding: 8px; z-index: 50; visibility: hidden; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top right; pointer-events: none;
  transition: opacity .11s ease-in, transform .11s ease-in, visibility 0s linear .11s; }
.dropdown.show { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .16s ease-out, transform .16s ease-out, visibility 0s; }

@media (max-width: 860px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px; }
  .sidebar { position: relative; top: 0; height: auto; padding: 12px 10px; border-radius: 22px; }
  .sidebar .brand-row { padding: 0 6px 8px 8px; }
  .app.collapsed .sidebar .brand-text, .app.collapsed .nav-item span, .app.collapsed .nav-item .count { display: revert; }
  .app.collapsed .nav-item { padding: 0 14px; }
  .sidebar nav, .sidebar .nav-foot { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 4px; margin-top: 0; scrollbar-width: none; }
  .sidebar .nav-foot::-webkit-scrollbar { display: none; }
  .sidebar .nav-foot { margin-top: 6px; padding-top: 8px; }
  .nav-item { width: auto; height: 38px; flex-shrink: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 20px 4px 50px; }
  .topbar { top: 10px; height: 54px; padding: 0 8px 0 16px; border-radius: 18px; }
  .page-title { font-size: 28px; }
  .item-meta { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html::before, html::after, body::before { animation: none !important; opacity: .9; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---- custom controls (fa.js builds them on top of the native elements, which stay in place
   for the page scripts) ---- */
.fa-native { position: absolute !important; left: 0 !important; top: 0 !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }
.fa-select { position: relative; display: inline-block; width: 100%; min-width: 0; vertical-align: middle; }
.fa-select-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 42px; padding: 0 12px 0 14px; border-radius: var(--radius-sm);
  background: var(--field); border: 1px solid var(--border); color: var(--white); font: 500 14px var(--font); text-align: left; cursor: pointer; transition: border-color .1s, box-shadow .1s, background .1s; }
.fa-select-btn:hover { border-color: var(--border-strong); background: rgba(20,15,32,0.7); }
.fa-select-btn:focus-visible, .fa-select.open .fa-select-btn { outline: none; border-color: rgba(255,143,200,0.6); box-shadow: 0 0 0 4px rgba(255,143,200,0.15); }
.fa-select-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-select-btn svg { width: 14px; height: 14px; flex-shrink: 0; stroke: var(--dim); fill: none; stroke-width: 2.4; stroke-linecap: round; transition: transform .16s ease-out; }
.fa-select.open .fa-select-btn svg { transform: rotate(180deg); stroke: var(--pink); }
.fa-select.disabled .fa-select-btn { opacity: .45; cursor: not-allowed; }
.fa-select.sm .fa-select-btn, .table .fa-select .fa-select-btn { height: 30px; font-size: 12px; padding: 0 10px 0 12px; border-radius: 999px; }
.fa-list { position: fixed; z-index: 3000; min-width: 160px; max-height: 300px; overflow: auto; padding: 6px; margin: 0; list-style: none; border-radius: 16px;
  background: rgba(30,23,44,0.97); border: 1px solid var(--border-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(255,143,200,0.05);
  visibility: hidden; opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center; pointer-events: none;
  transition: opacity .11s ease-in, transform .11s ease-in, visibility 0s linear .11s; }
.fa-list.up { transform-origin: bottom center; transform: translateY(6px) scale(.98); }
.fa-list.show { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .16s ease-out, transform .16s ease-out, visibility 0s; }
.fa-list li { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; color: var(--text); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; }
.fa-list li.active { background: rgba(255,255,255,0.07); color: var(--white); }
.fa-list li[aria-selected=true] { color: var(--white); font-weight: 700; }
.fa-list li[aria-selected=true]::after { content: ''; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--pink); box-shadow: var(--glow-dot); }
.fa-list li[aria-disabled=true] { opacity: .4; cursor: default; }
.fa-tip { position: fixed; z-index: 4000; max-width: 280px; padding: 7px 11px; border-radius: 10px; background: rgba(36,28,52,0.97); border: 1px solid var(--border-strong);
  color: var(--white); font: 600 12px/1.4 var(--font); box-shadow: var(--shadow); pointer-events: none;
  visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .1s ease-in, transform .1s ease-in, visibility 0s linear .1s; }
.fa-tip.show { visibility: visible; opacity: 1; transform: none; transition: opacity .14s ease-out, transform .14s ease-out, visibility 0s; }
.fa-bubble { position: fixed; z-index: 4000; padding: 3px 8px; border-radius: 8px; background: var(--grad); color: var(--on-grad); font: 700 11.5px var(--mono); box-shadow: var(--glow-sm);
  pointer-events: none; transform: translate(-50%, -4px) scale(.9); opacity: 0; transition: opacity .1s, transform .1s; }
.fa-bubble.show { opacity: 1; transform: translate(-50%, -8px) scale(1); }
.popover { animation: fa-pop-in .16s ease-out; }
@keyframes fa-pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.cpop, .color-pop { display: block !important; visibility: hidden; opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top left; pointer-events: none;
  transition: opacity .11s ease-in, transform .11s ease-in, visibility 0s linear .11s; }
.cpop.show, .color-pop.show { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .16s ease-out, transform .16s ease-out, visibility 0s; }

/* ---- changelog entries (FA.changelogHtml: bullets, headings) + Security sub-tabs ---- */
.item-body.cl, .changelog-lines.cl { white-space: normal; }
.cl-list { margin: 2px 0; padding-left: 20px; }
.cl-list li { margin: 3px 0; }
.cl-list li::marker { color: var(--pink); }
.cl-head { margin-top: 6px; font-weight: 700; color: var(--white); }
.cl-head:first-child { margin-top: 0; }
.cl-gap { height: 6px; }
.sec-tabs { margin: 0 0 14px; }
.sec-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
