:root {
  color-scheme: light;
  --f-bg: #f7faff;
  --f-surface: #ffffff;
  --f-surface-2: #f1f6fc;
  --f-surface-3: #e8f2ff;
  --f-text: #0b1730;
  --f-muted: #5f6f84;
  --f-faint: #8b99aa;
  --f-line: #dfe7f0;
  --f-line-strong: #cbd7e5;
  --f-blue: #087df5;
  --f-blue-hover: #0069d7;
  --f-blue-soft: #eaf4ff;
  --f-green: #18a957;
  --f-green-soft: #eaf8ef;
  --f-red: #db3a50;
  --f-red-soft: #fff0f2;
  --f-amber: #e79714;
  --f-amber-soft: #fff7e7;
  --f-shadow: 0 18px 55px rgba(19, 48, 85, .11);
  --f-shadow-soft: 0 8px 26px rgba(19, 48, 85, .07);
  --f-radius: 14px;
  --f-radius-lg: 22px;
  --f-sidebar: 238px;
  --f-header: 68px;
  --f-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* Compatibility aliases used by feature modules and Admin previews. */
  --line: var(--f-line);
  --surface: var(--f-surface);
  --soft: var(--f-surface-2);
  --f-soft: var(--f-surface-2);
  --text: var(--f-text);
  --text-secondary: var(--f-muted);
  --accent: var(--f-blue);
  --success: var(--f-green);
  --danger: var(--f-red);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --f-bg: #07111c;
  --f-surface: #0b1724;
  --f-surface-2: #101f2e;
  --f-surface-3: #13283c;
  --f-text: #f7fbff;
  --f-muted: #b3c0ce;
  --f-faint: #7f91a4;
  --f-line: #1e3041;
  --f-line-strong: #2b4258;
  --f-blue: #1396ff;
  --f-blue-hover: #3aa8ff;
  --f-blue-soft: #0b2942;
  --f-green: #4bd17e;
  --f-green-soft: #102d20;
  --f-red: #ff6679;
  --f-red-soft: #35151c;
  --f-amber: #ffc055;
  --f-amber-soft: #322614;
  --f-shadow: 0 22px 68px rgba(0, 0, 0, .35);
  --f-shadow-soft: 0 10px 32px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--f-bg);
  color: var(--f-text);
  font-family: var(--f-font);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { color: inherit; }
[hidden] { display: none !important; }

.f254-shell { min-height: 100vh; position: relative; isolation: isolate; }
.f254-shell::before,
.f254-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.f254-shell::before { width: 420px; height: 420px; top: -230px; right: -160px; background: var(--f-blue-soft); opacity: .8; }
.f254-shell::after { width: 340px; height: 340px; bottom: -210px; left: -150px; background: var(--f-surface-3); opacity: .8; }

.f254-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.f254-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--f-line);
  background: var(--f-surface);
  position: sticky;
  top: 0;
  z-index: 40;
}
.f254-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--f-blue); font-size: 22px; font-weight: 850; letter-spacing: -.035em; }
.f254-brand-mark { width: 32px; height: 32px; color: currentColor; flex: 0 0 auto; }
.f254-theme-btn,
.f254-icon-btn {
  width: 46px;
  height: 46px;
  border: 1px solid var(--f-line);
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: var(--f-surface);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
.f254-theme-btn:hover, .f254-icon-btn:hover { border-color: var(--f-blue); background: var(--f-blue-soft); }
.f254-theme-btn:active, .f254-icon-btn:active { transform: scale(.95); }
.f254-theme-btn svg, .f254-icon-btn svg { width: 23px; height: 23px; }

.f254-card { border: 1px solid var(--f-line); border-radius: var(--f-radius); background: var(--f-surface); box-shadow: var(--f-shadow-soft); }
.f254-card-flat { box-shadow: none; }
.f254-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--f-line); }
.f254-card-body { padding: 20px; }
.f254-title { margin: 0; font-size: clamp(24px, 3vw, 38px); line-height: 1.12; letter-spacing: -.04em; }
.f254-section-title { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -.025em; }
.f254-subtitle { margin: 6px 0 0; color: var(--f-muted); }
.f254-muted { color: var(--f-muted); }
.f254-faint { color: var(--f-faint); }
.f254-small { font-size: 12px; }
.f254-caption { font-size: 11px; color: var(--f-faint); }
.f254-row { display: flex; align-items: center; gap: 12px; }
.f254-between { justify-content: space-between; }
.f254-stack { display: grid; gap: 16px; }
.f254-stack-sm { display: grid; gap: 10px; }
.f254-divider { height: 1px; background: var(--f-line); margin-block: 18px; }
.f254-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.f254-btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--f-blue);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  transition: transform .16s ease, background-color .16s ease, opacity .16s ease, border-color .16s ease;
}
.f254-btn:hover { background: var(--f-blue-hover); }
.f254-btn:active { transform: scale(.98); }
.f254-btn:disabled, .f254-btn[aria-disabled="true"] { opacity: .48; cursor: not-allowed; transform: none; }
.f254-btn-secondary { background: var(--f-surface); color: var(--f-text); border-color: var(--f-line-strong); }
.f254-btn-secondary:hover { background: var(--f-surface-2); }
.f254-btn-danger { background: var(--f-red); }
.f254-btn-danger:hover { background: #c82d42; }
.f254-btn-ghost { background: transparent; color: var(--f-blue); border-color: transparent; }
.f254-btn-ghost:hover { background: var(--f-blue-soft); }
.f254-btn-sm { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.f254-btn-block { width: 100%; }
.f254-btn svg { width: 20px; height: 20px; }

.f254-field { display: grid; gap: 7px; }
.f254-label { font-size: 12px; font-weight: 750; color: var(--f-text); }
.f254-input,
.f254-select,
.f254-textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--f-line-strong);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--f-surface);
  color: var(--f-text);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.f254-textarea { min-height: 98px; resize: vertical; }
.f254-input:focus, .f254-select:focus, .f254-textarea:focus { border-color: var(--f-blue); box-shadow: 0 0 0 3px var(--f-blue-soft); }
.f254-input::placeholder, .f254-textarea::placeholder { color: var(--f-faint); }
.f254-input-wrap { position: relative; }
.f254-input-wrap .f254-input { padding-left: 42px; }
.f254-input-wrap > svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--f-faint); pointer-events: none; }
.f254-input-action { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--f-muted); }
.f254-help { font-size: 11px; color: var(--f-faint); }
.f254-error { color: var(--f-red); font-size: 12px; }
.f254-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.f254-span-2 { grid-column: 1 / -1; }
.f254-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--f-muted); font-size: 12px; line-height: 1.45; }

.f254-alert { border: 1px solid var(--f-line); border-radius: 11px; padding: 12px 14px; display: flex; align-items: flex-start; gap: 10px; background: var(--f-surface-2); }
.f254-alert-success { border-color: #bce6cb; background: var(--f-green-soft); color: var(--f-green); }
.f254-alert-error { border-color: #f2bdc5; background: var(--f-red-soft); color: var(--f-red); }
.f254-alert-info { border-color: #b9d9fb; background: var(--f-blue-soft); color: var(--f-blue); }
.f254-alert svg { width: 19px; height: 19px; margin-top: 1px; flex: 0 0 auto; }
.f254-status { display: inline-flex; align-items: center; gap: 6px; min-height: 25px; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 750; border: 1px solid var(--f-line); background: var(--f-surface-2); color: var(--f-muted); }
.f254-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.f254-status-active, .f254-status-completed, .f254-status-published, .f254-status-resolved { color: var(--f-green); background: var(--f-green-soft); border-color: #bce6cb; }
.f254-status-inactive, .f254-status-draft, .f254-status-dismissed { color: var(--f-faint); }
.f254-status-suspended, .f254-status-failed, .f254-status-removed { color: var(--f-red); background: var(--f-red-soft); border-color: #f2bdc5; }
.f254-status-pending, .f254-status-reviewing, .f254-status-restricted, .f254-status-refunded { color: var(--f-amber); background: var(--f-amber-soft); border-color: #eed5a4; }

/* Installer */
.f254-install-main { padding: 30px 0 52px; }
.f254-installer { width: min(1040px, calc(100% - 40px)); margin: 0 auto; overflow: hidden; }
.f254-stepper { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px; border-bottom: 1px solid var(--f-line); background: var(--f-surface); }
.f254-step { position: relative; display: grid; justify-items: center; gap: 7px; color: var(--f-faint); font-size: 11px; text-align: center; }
.f254-step:not(:last-child)::after { content: ""; position: absolute; left: calc(50% + 22px); right: calc(-50% + 22px); top: 15px; height: 1px; background: var(--f-line-strong); }
.f254-step-number { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--f-line-strong); background: var(--f-surface); font-weight: 800; }
.f254-step.is-active, .f254-step.is-done { color: var(--f-blue); font-weight: 750; }
.f254-step.is-active .f254-step-number, .f254-step.is-done .f254-step-number { background: var(--f-blue); border-color: var(--f-blue); color: #fff; }
.f254-step.is-done:not(:last-child)::after { background: var(--f-blue); }
.f254-install-panel { display: none; animation: f254Fade .24s ease; }
.f254-install-panel.is-active { display: block; }
.f254-install-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 18px; padding: 22px; }
.f254-install-content { min-width: 0; }
.f254-install-side { background: var(--f-blue-soft); border: 1px solid var(--f-line); border-radius: var(--f-radius); padding: 20px; }
.f254-install-visual { min-height: 180px; display: grid; place-items: center; color: var(--f-blue); }
.f254-install-visual svg { width: 140px; height: 140px; }
.f254-requirements { margin-top: 18px; border: 1px solid var(--f-line); border-radius: 12px; overflow: hidden; }
.f254-requirement { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--f-line); }
.f254-requirement:last-child { border-bottom: 0; }
.f254-requirement-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--f-surface-2); color: var(--f-blue); }
.f254-requirement-icon svg { width: 22px; height: 22px; }
.f254-install-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--f-line); background: var(--f-surface); }
.f254-connection-list { display: grid; gap: 9px; margin-top: 14px; }
.f254-connection-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 1px solid var(--f-line); border-radius: 9px; background: var(--f-surface); }
.f254-connection-dot { width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; background: var(--f-green); color: #fff; font-size: 11px; font-weight: 900; flex: 0 0 auto; }
.f254-finish { text-align: center; padding: 54px 24px; }
.f254-finish-icon { width: 82px; height: 82px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; background: var(--f-green-soft); color: var(--f-green); animation: f254Pop .35s ease; }
.f254-finish-icon svg { width: 42px; height: 42px; }

/* Login */
.f254-auth { min-height: 100vh; display: grid; place-items: center; padding: 38px 20px; }
.f254-auth-frame { width: min(1080px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .95fr); overflow: hidden; }
.f254-auth-form { padding: clamp(28px, 5vw, 58px); }
.f254-auth-hero { padding: clamp(28px, 5vw, 58px); background: var(--f-blue-soft); border-left: 1px solid var(--f-line); display: grid; align-content: center; gap: 26px; }
.f254-auth-logo { margin-bottom: 34px; }
.f254-auth-title { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -.045em; line-height: 1.08; }
.f254-auth-fields { display: grid; gap: 15px; margin-top: 28px; }
.f254-auth-or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: var(--f-faint); font-size: 12px; margin-block: 20px; }
.f254-auth-or::before, .f254-auth-or::after { content: ""; height: 1px; background: var(--f-line); }
.f254-auth-visual { min-height: 220px; display: grid; place-items: center; color: var(--f-blue); }
.f254-auth-visual svg { width: min(270px, 80%); }
.f254-feature-list { display: grid; gap: 14px; }
.f254-feature { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; }
.f254-feature-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--f-surface); color: var(--f-blue); border: 1px solid var(--f-line); }
.f254-feature-icon svg { width: 25px; height: 25px; }

/* Admin shell */
.f254-admin { min-height: 100vh; background: var(--f-bg); }
.f254-admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--f-sidebar);
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--f-surface);
  border-right: 1px solid var(--f-line);
  transition: transform .24s ease, width .24s ease;
}
.f254-sidebar-brand { min-height: var(--f-header); padding: 14px 18px; display: flex; align-items: center; border-bottom: 1px solid var(--f-line); }
.f254-sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 10px; }
.f254-nav-section { margin: 14px 10px 7px; color: var(--f-faint); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.f254-nav-link { min-height: 48px; width: 100%; border: 0; border-radius: 11px; display: flex; align-items: center; gap: 13px; padding: 10px 12px; background: transparent; color: var(--f-muted); cursor: pointer; text-align: left; transition: background-color .16s ease, color .16s ease, transform .16s ease; }
.f254-nav-link:hover { background: var(--f-surface-2); color: var(--f-text); }
.f254-nav-link.is-active { background: var(--f-blue); color: #fff; }
.f254-nav-link:active { transform: translateX(2px); }
.f254-nav-link svg { width: 23px; height: 23px; flex: 0 0 auto; }
.f254-sidebar-user { padding: 12px; border-top: 1px solid var(--f-line); }
.f254-user-chip { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 1px solid var(--f-line); border-radius: 11px; background: var(--f-surface-2); }
.f254-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--f-blue-soft); color: var(--f-blue); border: 1px solid var(--f-line); font-weight: 850; overflow: hidden; }
.f254-avatar-sm { width: 31px; height: 31px; font-size: 11px; }
.f254-avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.f254-admin-main { min-height: 100vh; margin-left: var(--f-sidebar); }
.f254-admin-header { height: var(--f-header); position: sticky; top: 0; z-index: 55; display: grid; grid-template-columns: auto minmax(180px, 560px) auto; align-items: center; gap: 16px; padding: 10px 24px; border-bottom: 1px solid var(--f-line); background: var(--f-surface); }
.f254-menu-btn { display: none; width: 46px; height: 46px; border: 1px solid var(--f-line); border-radius: 12px; place-items: center; background: var(--f-surface); color: var(--f-text); cursor: pointer; }
.f254-menu-btn svg { width: 24px; height: 24px; }
.f254-admin-search { position: relative; }
.f254-admin-search input { padding-left: 42px; }
.f254-admin-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--f-faint); }
.f254-admin-head-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.f254-admin-content { width: calc(100% - 40px); max-width: none; margin: 0 auto; padding: 28px 0 90px; animation: f254Fade .22s ease; }
.f254-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.f254-page-title { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; line-height: 1.1; }
.f254-page-description { margin: 6px 0 0; color: var(--f-muted); }
.f254-loading { min-height: 360px; display: grid; place-items: center; color: var(--f-muted); }
.f254-spinner { width: 34px; height: 34px; border: 3px solid var(--f-line); border-top-color: var(--f-blue); border-radius: 50%; animation: f254Spin .75s linear infinite; }

.f254-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.f254-metric { min-width: 0; padding: 17px; }
.f254-metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.f254-metric-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: var(--f-blue); background: var(--f-blue-soft); }
.f254-metric-icon svg { width: 25px; height: 25px; }
.f254-metric-value { margin-top: 14px; font-size: 26px; font-weight: 850; letter-spacing: -.035em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f254-metric-label { color: var(--f-muted); font-size: 12px; }
.f254-change { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 999px; color: var(--f-green); background: var(--f-green-soft); font-size: 10px; font-weight: 800; }
.f254-change.is-down { color: var(--f-red); background: var(--f-red-soft); }

.f254-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 16px; }
.f254-dashboard-bottom { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.f254-chart { min-height: 260px; padding: 8px 0 0; }
.f254-chart svg { width: 100%; height: 250px; overflow: visible; }
.f254-chart-grid-line { stroke: var(--f-line); stroke-width: 1; }
.f254-chart-line { fill: none; stroke: var(--f-blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.f254-chart-point { fill: var(--f-surface); stroke: var(--f-blue); stroke-width: 2; }
.f254-chart-label { fill: var(--f-faint); font-size: 10px; }
.f254-empty { min-height: 180px; display: grid; place-items: center; text-align: center; color: var(--f-muted); padding: 24px; }
.f254-activity-list { display: grid; }
.f254-activity { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--f-line); }
.f254-activity:last-child { border-bottom: 0; }
.f254-activity-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--f-blue); background: var(--f-blue-soft); }
.f254-activity-icon svg { width: 22px; height: 22px; }
.f254-health-list { display: grid; gap: 10px; }
.f254-health { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--f-line); }
.f254-health:last-child { border-bottom: 0; }
.f254-health-state { color: var(--f-green); font-size: 12px; font-weight: 750; }
.f254-health-state.is-bad { color: var(--f-red); }
.f254-bar-list { display: grid; gap: 12px; }
.f254-bar-row { display: grid; grid-template-columns: minmax(80px, auto) 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.f254-bar-track { height: 7px; border-radius: 999px; background: var(--f-surface-2); overflow: hidden; }
.f254-bar-fill { height: 100%; border-radius: inherit; background: var(--f-blue); transform-origin: left; animation: f254Grow .45s ease; }

.f254-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.f254-toolbar .f254-input { width: min(320px, 100%); }
.f254-toolbar .f254-select { width: auto; min-width: 140px; }
.f254-table-wrap { overflow: auto; border: 1px solid var(--f-line); border-radius: 12px; background: var(--f-surface); }
.f254-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.f254-table th { padding: 11px 13px; text-align: left; color: var(--f-faint); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: var(--f-surface-2); border-bottom: 1px solid var(--f-line); }
.f254-table td { padding: 12px 13px; border-bottom: 1px solid var(--f-line); vertical-align: middle; }
.f254-table tr:last-child td { border-bottom: 0; }
.f254-table tbody tr { transition: background-color .16s ease; }
.f254-table tbody tr:hover { background: var(--f-blue-soft); }
.f254-user-cell { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.f254-user-name { font-weight: 750; }
.f254-user-handle { color: var(--f-faint); font-size: 11px; }
.f254-role-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 7px; color: var(--f-blue); background: var(--f-blue-soft); border: 1px solid #b8dafa; font-size: 10px; font-weight: 750; }
.f254-table-actions { display: flex; align-items: center; gap: 6px; }
.f254-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.f254-page-buttons { display: flex; gap: 5px; }
.f254-page-btn { min-width: 34px; height: 34px; border: 1px solid var(--f-line); border-radius: 8px; background: var(--f-surface); cursor: pointer; }
.f254-page-btn.is-active { background: var(--f-blue); color: #fff; border-color: var(--f-blue); }

.f254-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 4px; border: 1px solid var(--f-line); border-radius: 11px; background: var(--f-surface-2); }
.f254-tab { min-height: 36px; white-space: nowrap; border: 0; border-radius: 8px; padding: 7px 12px; background: transparent; color: var(--f-muted); cursor: pointer; }
.f254-tab.is-active { color: #fff; background: var(--f-blue); }

.f254-role-grid { display: grid; grid-template-columns: minmax(270px, .7fr) minmax(0, 1.3fr); gap: 16px; }
.f254-role-list { display: grid; gap: 8px; }
.f254-role-item { width: 100%; border: 1px solid var(--f-line); border-radius: 11px; padding: 12px; background: var(--f-surface); text-align: left; cursor: pointer; transition: border-color .16s ease, background-color .16s ease; }
.f254-role-item:hover, .f254-role-item.is-active { border-color: var(--f-blue); background: var(--f-blue-soft); }
.f254-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; max-height: 430px; overflow: auto; }
.f254-permission { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--f-line); border-radius: 11px; background: var(--f-surface-2); }

.f254-kv { display: grid; grid-template-columns: minmax(120px, .45fr) minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--f-line); }
.f254-kv:last-child { border-bottom: 0; }
.f254-kv dt { color: var(--f-faint); font-size: 12px; }
.f254-kv dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.f254-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.f254-system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.f254-modal-backdrop { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(3, 10, 19, .58); animation: f254Fade .18s ease; }
.f254-modal { width: min(620px, 100%); max-height: min(850px, calc(100vh - 40px)); overflow: auto; border-radius: 18px; background: var(--f-surface); border: 1px solid var(--f-line); box-shadow: var(--f-shadow); animation: f254SlideUp .24s ease; }
.f254-modal-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--f-line); background: var(--f-surface); }
.f254-modal-body { padding: 18px; }
.f254-modal-foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--f-line); background: var(--f-surface); }
.f254-drawer-backdrop { position: fixed; inset: 0; z-index: 109; background: rgba(3, 10, 19, .45); animation: f254Fade .18s ease; }
.f254-drawer { position: fixed; inset: 0 0 0 auto; z-index: 110; width: min(440px, 92vw); overflow-y: auto; background: var(--f-surface); border-left: 1px solid var(--f-line); box-shadow: var(--f-shadow); animation: f254SlideLeft .25s ease; }
.f254-drawer-head { position: sticky; top: 0; z-index: 2; padding: 18px; border-bottom: 1px solid var(--f-line); background: var(--f-surface); }
.f254-drawer-body { padding: 18px; }
.f254-toast-zone { position: fixed; z-index: 200; right: 18px; top: 84px; display: grid; gap: 9px; width: min(380px, calc(100% - 36px)); }
.f254-toast { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 13px 14px; border: 1px solid var(--f-line); border-radius: 12px; background: var(--f-surface); box-shadow: var(--f-shadow); animation: f254Toast .24s ease; }
.f254-toast.is-success { border-color: #bce6cb; }
.f254-toast.is-error { border-color: #f2bdc5; }
.f254-toast svg { width: 20px; height: 20px; color: var(--f-blue); }
.f254-toast.is-success svg { color: var(--f-green); }
.f254-toast.is-error svg { color: var(--f-red); }

.f254-bottom-nav { display: none; }
.f254-overlay { display: none; }

@keyframes f254Spin { to { transform: rotate(360deg); } }
@keyframes f254Fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes f254SlideUp { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes f254SlideLeft { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes f254Toast { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes f254Pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes f254Grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 1100px) {
  :root { --f-sidebar: 210px; }
  .f254-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f254-dashboard-grid { grid-template-columns: 1fr; }
  .f254-dashboard-bottom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f254-dashboard-bottom > :last-child { grid-column: 1 / -1; }
  .f254-admin-content { width: calc(100% - 32px); max-width: none; }
}

@media (max-width: 900px) {
  .f254-admin-sidebar { transform: translateX(-100%); width: min(300px, 86vw); box-shadow: var(--f-shadow); }
  .f254-admin-sidebar.is-open { transform: translateX(0); }
  .f254-admin-main { margin-left: 0; }
  .f254-menu-btn { display: inline-grid; }
  .f254-admin-header { grid-template-columns: auto minmax(0, 1fr) auto; padding: 10px 14px; }
  .f254-admin-search { display: none; }
  .f254-overlay { position: fixed; inset: 0; z-index: 65; background: rgba(3, 10, 19, .45); }
  .f254-overlay.is-open { display: block; }
  .f254-bottom-nav { position: fixed; inset: auto 0 0; z-index: 60; min-height: 62px; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--f-surface); border-top: 1px solid var(--f-line); padding-bottom: env(safe-area-inset-bottom); }
  .f254-bottom-link { border: 0; background: transparent; color: var(--f-muted); display: grid; place-items: center; align-content: center; gap: 3px; padding: 7px 4px; font-size: 9px; cursor: pointer; }
  .f254-bottom-link svg { width: 25px; height: 25px; }
  .f254-bottom-link.is-active { color: var(--f-blue); }
  .f254-admin-content { padding-bottom: 100px; }
  .f254-install-grid { grid-template-columns: 1fr; }
  .f254-auth-frame { grid-template-columns: 1fr; }
  .f254-auth-hero { border-left: 0; border-top: 1px solid var(--f-line); }
  .f254-role-grid, .f254-settings-grid, .f254-system-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .f254-container, .f254-installer { width: min(100% - 22px, 1180px); }
  .f254-topbar { padding-inline: 13px; }
  .f254-brand { font-size: 19px; }
  .f254-install-main { padding-top: 14px; }
  .f254-stepper { padding: 14px 8px; }
  .f254-step-label { display: none; }
  .f254-step:not(:last-child)::after { left: calc(50% + 18px); right: calc(-50% + 18px); }
  .f254-install-grid { padding: 13px; gap: 13px; }
  .f254-card-body { padding: 15px; }
  .f254-install-actions { padding: 13px; flex-wrap: wrap; }
  .f254-install-actions .f254-btn { flex: 1; }
  .f254-form-grid { grid-template-columns: 1fr; }
  .f254-span-2 { grid-column: auto; }
  .f254-auth { padding: 0; place-items: stretch; }
  .f254-auth-frame { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .f254-auth-form { padding: 28px 20px 36px; }
  .f254-auth-hero { padding: 34px 20px; }
  .f254-auth-logo { margin-bottom: 26px; }
  .f254-admin-header { height: 60px; }
  .f254-admin-head-actions .f254-user-chip { display: none; }
  .f254-admin-content { width: calc(100% - 22px); padding-top: 18px; }
  .f254-page-head { align-items: stretch; flex-direction: column; }
  .f254-page-head .f254-actions { width: 100%; }
  .f254-page-head .f254-btn { flex: 1; }
  .f254-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
  .f254-metric { padding: 13px; }
  .f254-metric-value { font-size: 21px; }
  .f254-dashboard-bottom { grid-template-columns: 1fr; }
  .f254-dashboard-bottom > :last-child { grid-column: auto; }
  .f254-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .f254-toolbar .f254-input { width: 100%; grid-column: 1 / -1; }
  .f254-toolbar .f254-select { width: 100%; min-width: 0; }
  .f254-pagination { align-items: flex-start; flex-direction: column; }
  .f254-permission-grid { grid-template-columns: 1fr; }
  .f254-kv { grid-template-columns: 1fr; gap: 3px; }
  .f254-modal-backdrop { padding: 0; align-items: end; }
  .f254-modal { width: 100%; max-height: 92vh; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .f254-toast-zone { top: 72px; right: 11px; width: calc(100% - 22px); }
}

@media (max-width: 420px) {
  .f254-metrics { grid-template-columns: 1fr; }
  .f254-requirement { grid-template-columns: 34px minmax(0, 1fr); }
  .f254-requirement .f254-status { grid-column: 2; justify-self: start; }
  .f254-toolbar { grid-template-columns: 1fr; }
  .f254-toolbar .f254-input { grid-column: auto; }
}

/* Shared responsive setting row used by Admin and Onboarding. */
.f254-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--f-line); cursor: pointer; }
.f254-switch-row:last-child { border-bottom: 0; }


/* Central SVG sprite sizing and accessible toggle controls. */
.f254-icon { width: 24px; height: 24px; display: inline-block; flex: 0 0 auto; color: currentColor; fill: none; overflow: visible; }
.f254-icon-sm { width: 20px; height: 20px; }
.f254-icon-lg { width: 28px; height: 28px; }
.f254-inline-icon { display: inline-flex; align-items: center; justify-content: center; }
.f254-status-icon { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; flex: 0 0 auto; background: var(--f-blue-soft); color: var(--f-blue); }
.f254-status-icon.is-success { background: var(--f-green-soft); color: var(--f-green); }
.f254-status-icon.is-error { background: var(--f-red-soft); color: var(--f-red); }
.f254-status-icon svg { width: 20px; height: 20px; }

.f254-toggle { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; }
.f254-toggle > input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.f254-toggle-track { width: 50px; height: 28px; padding: 3px; border: 1px solid var(--f-line-strong); border-radius: 999px; display: flex; align-items: center; background: var(--f-surface-3); box-shadow: inset 0 1px 2px rgba(6, 23, 46, .09); transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
.f254-toggle-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--f-surface); border: 1px solid var(--f-line); box-shadow: 0 2px 5px rgba(6, 23, 46, .2); transform: translateX(0); transition: transform .2s cubic-bezier(.2,.8,.2,1), background-color .18s ease; }
.f254-toggle > input:checked + .f254-toggle-track { background: var(--f-blue); border-color: var(--f-blue); }
.f254-toggle > input:checked + .f254-toggle-track .f254-toggle-thumb { transform: translateX(20px); background: #fff; border-color: #fff; }
.f254-toggle > input:focus-visible + .f254-toggle-track { outline: 3px solid var(--f-blue-soft); outline-offset: 2px; }
.f254-toggle > input:disabled + .f254-toggle-track { opacity: .5; cursor: not-allowed; }
.f254-toggle-label { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.f254-interest-icon { width: 22px; height: 22px; display: inline-flex; color: currentColor; }
.f254-interest-icon svg { width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.f254-title-icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  vertical-align: -4px;
  margin-inline-start: 4px;
  color: var(--f-blue);
}

/* v3 admin setting shortcuts and responsive tabbed configuration. */
.f254-settings-tabs{display:flex;gap:8px;overflow-x:auto;padding:4px 0 16px;scrollbar-width:none}.f254-settings-tabs::-webkit-scrollbar{display:none}
.f254-settings-tab{min-height:42px;padding:0 15px;border:1px solid var(--f-line);border-radius:12px;background:var(--f-surface);color:var(--f-muted);font-weight:750;white-space:nowrap;cursor:pointer;display:inline-flex;align-items:center;gap:8px}.f254-settings-tab:hover{background:var(--f-surface-2);color:var(--f-text)}.f254-settings-tab.is-active{background:var(--f-blue);border-color:var(--f-blue);color:#fff}
.f254-settings-tab>span{min-width:22px;height:22px;border-radius:20px;background:var(--f-surface-3);color:var(--f-text);display:grid;place-items:center;font-size:11px}.f254-settings-tab.is-active>span{background:rgba(255,255,255,.2);color:#fff}
.f254-settings-single{max-width:900px}.f254-save-dock{position:sticky;bottom:12px;z-index:25;margin-top:18px;box-shadow:var(--f-shadow)}
.f254-side-action.is-danger{color:var(--f-red)}
@media(max-width:767px){.f254-settings-tabs{margin-inline:-11px;padding-inline:11px}.f254-settings-single{max-width:none}.f254-save-dock{bottom:76px}.f254-save-dock .f254-card-body{align-items:stretch;flex-direction:column}.f254-save-dock .f254-btn{width:100%}}

/* Fans254 PHP v5 Reels administration helpers. */
.f254-reel-admin-thumb { width: 48px; height: 48px; border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.f254-reel-admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.f254-admin-clamp { display: block; max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f254-block { display: block; }
.f254-admin-modal-note { margin-top: 14px; }

/* Fans254 v13.3.56 — subtle continuous motion for real Tip actions site-wide. */
[data-feed-tip] svg,
[data-reel-action="tip"] svg,
.f254-reels-action.is-tip svg,
[data-profile-tip] svg,
[data-menu-tip] svg,
[data-feed-menu-tip] svg,
[data-group-menu-tip] svg,
[data-more-tip] svg,
[data-live-surface-tip] svg,
[data-live-tip-open] svg,
[data-chat-tip] svg,
[data-chat-tip-modal] svg,
[data-tip-submit] svg,
.f254-feed-tip-action svg{
  transform-origin:50% 58%;
  animation:f254TipPulse 1.9s cubic-bezier(.4,0,.2,1) infinite;
  will-change:transform,filter;
}
@keyframes f254TipPulse{
  0%,100%{transform:translateY(0) rotate(0deg) scale(1);filter:drop-shadow(0 0 0 transparent)}
  18%{transform:translateY(-1px) rotate(-5deg) scale(1.08)}
  34%{transform:translateY(0) rotate(4deg) scale(1.03);filter:drop-shadow(0 2px 5px color-mix(in srgb,currentColor 36%,transparent))}
  52%{transform:translateY(-1px) rotate(-2deg) scale(1.06)}
  70%{transform:translateY(0) rotate(0deg) scale(1)}
}
@media(prefers-reduced-motion:reduce){
  [data-feed-tip] svg,[data-reel-action="tip"] svg,.f254-reels-action.is-tip svg,[data-profile-tip] svg,[data-menu-tip] svg,[data-feed-menu-tip] svg,[data-group-menu-tip] svg,[data-more-tip] svg,[data-live-surface-tip] svg,[data-live-tip-open] svg,[data-chat-tip] svg,[data-chat-tip-modal] svg,[data-tip-submit] svg,.f254-feed-tip-action svg{animation:none!important}
}

/* Fans254 v13.4.82 — safe sidebar scrollbar and Messenger receipt refinements only.
   Do not hide [data-tablet-sidebar]: that attribute belongs to the complete primary sidebar. */
@media (min-width:768px){
  html:not(.f254-surface-embedded) body .f254-social-left{
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  html:not(.f254-surface-embedded) body .f254-social-left::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }
  html:not(.f254-surface-embedded) body .f254-tablet-sidebar-scroll{
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  html:not(.f254-surface-embedded) body .f254-tablet-sidebar-scroll::-webkit-scrollbar{
    width:0!important;
    height:0!important;
    display:none!important;
  }
}
.f254-chat-receipt svg{width:11px!important;height:11px!important;stroke-width:1.7!important}
