/* ==========================================================================
   Fixly design system
   Tokens → primitives → app shell → components → responsive
   ========================================================================== */

:root {
  --fx-blue: #0A7BFF;
  --fx-green: #7ED321;
  --fx-charcoal: #1F2937;

  --fx-accent: var(--fx-blue);
  --fx-accent-hover: #0568DC;
  --fx-accent-ink: #FFFFFF;
  --fx-accent-weak: #EDF5FF;
  --fx-accent-ring: rgba(10, 123, 255, .18);

  --fx-bg: #F6F8FB;
  --fx-surface: #FFFFFF;
  --fx-surface-2: #F7F9FC;
  --fx-surface-3: #EFF3F8;
  --fx-border: #E5E9F0;
  --fx-border-strong: #D5DCE7;

  --fx-text: #0C1220;
  --fx-text-2: #4A5567;
  --fx-text-3: #8A93A4;

  --fx-ok: #16A34A;
  --fx-ok-weak: #ECFDF3;
  --fx-warn: #C2740B;
  --fx-warn-weak: #FEF7E7;
  --fx-danger: #DC2626;
  --fx-danger-weak: #FEF1F1;

  --fx-r-xs: 6px;
  --fx-r-sm: 8px;
  --fx-r: 10px;
  --fx-r-md: 12px;
  --fx-r-lg: 16px;
  --fx-r-xl: 20px;

  --fx-sh-xs: 0 1px 2px rgba(12, 18, 32, .05);
  --fx-sh-sm: 0 1px 3px rgba(12, 18, 32, .06), 0 1px 2px rgba(12, 18, 32, .04);
  --fx-sh-md: 0 4px 14px rgba(12, 18, 32, .07);
  --fx-sh-lg: 0 18px 48px rgba(12, 18, 32, .14);

  --fx-sidebar: 252px;
  --fx-topbar: 60px;

  --fx-font: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --fx-display: "Plus Jakarta Sans", Inter, "Segoe UI", sans-serif;
  --fx-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fx-ease: .16s cubic-bezier(.2, .7, .3, 1);
}

html[data-theme="dark"] {
  --fx-accent: #3B93FF;
  --fx-accent-hover: #5AA6FF;
  --fx-accent-ink: #04101F;
  --fx-accent-weak: rgba(59, 147, 255, .14);
  --fx-accent-ring: rgba(59, 147, 255, .28);

  --fx-bg: #0A0D14;
  --fx-surface: #11151E;
  --fx-surface-2: #161B26;
  --fx-surface-3: #1C2230;
  --fx-border: #232A38;
  --fx-border-strong: #303948;

  --fx-text: #E9EDF4;
  --fx-text-2: #A6AFBF;
  --fx-text-3: #6B7688;

  --fx-ok: #4ADE80;
  --fx-ok-weak: rgba(74, 222, 128, .12);
  --fx-warn: #FBBF24;
  --fx-warn-weak: rgba(251, 191, 36, .12);
  --fx-danger: #F87171;
  --fx-danger-weak: rgba(248, 113, 113, .12);

  --fx-sh-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --fx-sh-sm: 0 1px 3px rgba(0, 0, 0, .45);
  --fx-sh-md: 0 6px 18px rgba(0, 0, 0, .45);
  --fx-sh-lg: 0 24px 60px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* —— Primitives —————————————————————————————————————————————————— */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.fx-body {
  font-family: var(--fx-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--fx-text);
  background: var(--fx-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { font-family: var(--fx-display); letter-spacing: -.022em; color: var(--fx-text); }
a { color: var(--fx-accent); text-decoration: none; transition: color var(--fx-ease); }
a:hover { color: var(--fx-accent-hover); }
p { margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--fx-border); margin: 16px 0; opacity: 1; }
code, .font-monospace { font-family: var(--fx-mono); font-size: .92em; }
code {
  background: var(--fx-surface-3); color: var(--fx-text);
  padding: 1px 6px; border-radius: var(--fx-r-xs);
}
time { color: var(--fx-text-3); font-size: 12.5px; }
::selection { background: var(--fx-accent-ring); }
:focus-visible { outline: 2px solid var(--fx-accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--fx-border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--fx-text-3); background-clip: content-box; }

/* —— Sidebar ————————————————————————————————————————————————————— */
.fx-sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--fx-sidebar);
  display: flex; flex-direction: column;
  background: var(--fx-surface);
  border-right: 1px solid var(--fx-border);
  z-index: 30;
  transition: width var(--fx-ease);
}
.fx-side-head {
  display: flex; align-items: center; gap: 8px;
  height: var(--fx-topbar);
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--fx-border);
}
.fx-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fx-brand-mark { width: 28px; height: 28px; display: block; flex: 0 0 28px; object-fit: contain; }
.fx-brand-word {
  font-family: var(--fx-display);
  font-size: 19px; font-weight: 800; letter-spacing: -.04em;
  color: var(--fx-text); white-space: nowrap;
}
.fx-brand-word span { color: var(--fx-accent); }
.fx-rail-toggle {
  margin-left: auto;
  width: 28px; height: 28px; flex: 0 0 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--fx-text-3);
  border-radius: var(--fx-r-sm); font-size: 12px; cursor: pointer;
  transition: background var(--fx-ease), color var(--fx-ease);
}
.fx-rail-toggle:hover { background: var(--fx-surface-3); color: var(--fx-text); }

.fx-side-nav {
  display: flex; flex-direction: column; gap: 1px;
  padding: 12px 10px;
  flex: 1; overflow-y: auto; overflow-x: hidden;
}
.fx-nav-label {
  margin: 14px 8px 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--fx-text-3);
}
.fx-nav-label:first-child { margin-top: 2px; }
.fx-side-nav a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px;
  border-radius: var(--fx-r-sm);
  color: var(--fx-text-2);
  font-size: 13.5px; font-weight: 550;
  white-space: nowrap;
  transition: background var(--fx-ease), color var(--fx-ease);
}
.fx-side-nav a > i { width: 17px; text-align: center; font-size: 14px; color: var(--fx-text-3); transition: color var(--fx-ease); }
.fx-side-nav a:hover { background: var(--fx-surface-2); color: var(--fx-text); }
.fx-side-nav a:hover > i { color: var(--fx-text-2); }
.fx-side-nav a.is-active { background: var(--fx-accent-weak); color: var(--fx-accent); font-weight: 650; }
.fx-side-nav a.is-active > i { color: var(--fx-accent); }
.fx-side-nav a.is-active::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--fx-accent);
}
.fx-nav-pill {
  margin-left: auto;
  background: var(--fx-danger); color: #fff;
  font-size: 10.5px; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center;
}

.fx-side-foot { border-top: 1px solid var(--fx-border); padding: 10px; }
.fx-side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: var(--fx-r-sm);
  color: var(--fx-text); min-width: 0;
  transition: background var(--fx-ease);
}
.fx-side-user:hover { background: var(--fx-surface-2); color: var(--fx-text); }
.fx-side-user-meta { min-width: 0; line-height: 1.25; }
.fx-side-user-name { display: block; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-side-user-role { display: block; font-size: 11.5px; color: var(--fx-text-3); }

/* Collapsed rail (desktop) */
html.fx-rail { --fx-sidebar: 72px; }
@media (min-width: 961px) {
  html.fx-rail .fx-brand-word,
  html.fx-rail .fx-nav-text,
  html.fx-rail .fx-nav-label,
  html.fx-rail .fx-side-user-meta,
  html.fx-rail .fx-nav-pill { display: none; }
  html.fx-rail .fx-side-head {
    flex-direction: column;
    height: auto;
    min-height: var(--fx-topbar);
    padding: 10px 8px 8px;
    gap: 4px;
  }
  html.fx-rail .fx-brand { justify-content: center; }
  html.fx-rail .fx-rail-toggle { display: inline-flex; margin-left: 0; }
  html.fx-rail .fx-rail-expand { display: inline-flex; }
  html.fx-rail .fx-side-nav { padding: 12px 10px; }
  html.fx-rail .fx-side-nav a { justify-content: center; padding: 0; gap: 0; }
  html.fx-rail .fx-side-nav a.is-active::before { display: none; }
  html.fx-rail .fx-side-user { justify-content: center; padding: 7px 0; }
}

/* —— Topbar ——————————————————————————————————————————————————————— */
.fx-shell { margin-left: var(--fx-sidebar); min-height: 100vh; display: flex; flex-direction: column; transition: margin var(--fx-ease); }
.fx-topbar {
  display: flex; align-items: center; gap: 10px;
  height: var(--fx-topbar); padding: 0 20px;
  background: color-mix(in srgb, var(--fx-surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--fx-border);
  position: sticky; top: 0; z-index: 20;
}
.fx-search { position: relative; flex: 1; max-width: 420px; }
.fx-search > i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--fx-text-3); font-size: 12.5px; pointer-events: none;
}
.fx-search input {
  width: 100%; height: 36px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
  background: var(--fx-surface-2);
  color: var(--fx-text);
  font: inherit; font-size: 13.5px;
  padding: 0 12px 0 34px;
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease), background var(--fx-ease);
}
.fx-search input::placeholder { color: var(--fx-text-3); }
.fx-search input:focus {
  outline: none; background: var(--fx-surface);
  border-color: var(--fx-accent); box-shadow: 0 0 0 3px var(--fx-accent-ring);
}
.fx-top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.fx-lang {
  display: inline-flex; align-items: center;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-sm);
  background: var(--fx-surface);
  overflow: hidden; height: 34px;
}
.fx-lang form { display: flex; height: 100%; margin: 0; }
.fx-lang button {
  appearance: none; border: 0; background: transparent;
  color: var(--fx-text-3); font: inherit; font-size: 11px; font-weight: 700;
  letter-spacing: .04em; padding: 0 9px; height: 100%; cursor: pointer;
  transition: background var(--fx-ease), color var(--fx-ease);
}
.fx-lang button:hover { color: var(--fx-text); background: var(--fx-surface-3); }
.fx-lang button.is-active {
  color: var(--fx-accent); background: color-mix(in srgb, var(--fx-accent) 12%, transparent);
}
.fx-auth-foot-row {
  display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px;
}
.fx-auth-foot-row .fx-lang { height: 32px; }
.fx-auth-foot-row .fx-auth-legal { margin: 0; }
.fx-icon-btn {
  position: relative;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-sm);
  background: var(--fx-surface);
  color: var(--fx-text-2);
  font-size: 13.5px; cursor: pointer;
  transition: background var(--fx-ease), color var(--fx-ease), border-color var(--fx-ease);
}
.fx-icon-btn:hover { background: var(--fx-surface-3); color: var(--fx-text); }
.fx-nav-toggle { display: none; }
.fx-rail-expand { display: none; }

.fx-avatar, .fx-avatar-sm {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fx-accent); color: #fff;
  border-radius: 50%; font-weight: 700; flex: 0 0 auto;
}
.fx-avatar { width: 30px; height: 30px; font-size: 12px; }
.fx-avatar-sm { width: 22px; height: 22px; font-size: 10px; }

.fx-main { padding: 26px 28px 28px; flex: 1; width: 100%; max-width: 1560px; }
.fx-footer {
  margin-top: auto;
  background: var(--fx-surface);
  border-top: 1px solid var(--fx-border);
}
.fx-footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px 28px; flex-wrap: wrap;
  padding: 13px 28px;
  max-width: 1560px;
}
.fx-footer-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx-footer-mark { width: 18px; height: 18px; object-fit: contain; display: block; }
.fx-footer-name { font-size: 13px; font-weight: 700; color: var(--fx-text-2); letter-spacing: -.01em; }
.fx-footer-ver {
  font-family: var(--fx-mono); font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
  background: var(--fx-surface-3); color: var(--fx-text-3);
  letter-spacing: .02em;
}
.fx-footer-tag {
  margin: 0; flex: 1 1 auto;
  font-size: 12.5px; font-weight: 550; color: var(--fx-text-3);
  text-align: center;
}
.fx-footer-meta {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
  font-size: 12px; font-weight: 550; color: var(--fx-text-3);
}
.fx-footer-meta a { color: var(--fx-text-3); }
.fx-footer-meta a:hover { color: var(--fx-accent); }
.fx-footer-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--fx-border-strong); flex: 0 0 3px;
}

/* —— Page header ——————————————————————————————————————————————————— */
.fx-page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.fx-eyebrow {
  margin: 0 0 6px; font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--fx-text-3);
}
.fx-page-title { margin: 0; font-size: 25px; font-weight: 800; letter-spacing: -.03em; }
.fx-page-title .fx-muted { font-weight: 500; font-size: .7em; letter-spacing: -.01em; }
.fx-page-sub { margin: 7px 0 0; color: var(--fx-text-2); max-width: 68ch; }
.fx-muted { color: var(--fx-text-3); }
.fx-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fx-page-actions form { margin: 0; }

/* —— Buttons ————————————————————————————————————————————————————— */
.btn, .fx-btn-primary, .fx-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: var(--fx-r);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  line-height: 1; white-space: nowrap; cursor: pointer;
  transition: background var(--fx-ease), border-color var(--fx-ease), color var(--fx-ease), box-shadow var(--fx-ease);
}
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: var(--fx-r-sm); }
.fx-btn-primary {
  background: var(--fx-accent); border: 1px solid var(--fx-accent);
  color: var(--fx-accent-ink); box-shadow: var(--fx-sh-xs);
}
.fx-btn-primary:hover, .fx-btn-primary:focus {
  background: var(--fx-accent-hover); border-color: var(--fx-accent-hover); color: var(--fx-accent-ink);
}
.fx-btn-ghost {
  background: var(--fx-surface); border: 1px solid var(--fx-border); color: var(--fx-text);
}
.fx-btn-ghost:hover, .fx-btn-ghost:focus { background: var(--fx-surface-3); color: var(--fx-text); border-color: var(--fx-border-strong); }
.btn-outline-danger {
  background: transparent; border: 1px solid var(--fx-danger); color: var(--fx-danger);
}
.btn-outline-danger:hover { background: var(--fx-danger); border-color: var(--fx-danger); color: #fff; }
.fx-btn-danger {
  background: var(--fx-danger); border: 1px solid var(--fx-danger);
  color: #fff; box-shadow: var(--fx-sh-xs);
}
.fx-btn-danger:hover, .fx-btn-danger:focus { background: #B91C1C; border-color: #B91C1C; color: #fff; }
.fx-text-link { background: none; border: 0; color: var(--fx-accent); font-size: 12.5px; font-weight: 650; cursor: pointer; padding: 0; }

/* —— Forms ———————————————————————————————————————————————————————— */
.form-control, .form-select, .fx-input, textarea.form-control, input[type="file"].form-control {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
  background-color: var(--fx-surface);
  color: var(--fx-text);
  font-family: inherit; font-size: 13.5px;
  padding: 8px 12px;
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease);
}
textarea.form-control { line-height: 1.55; }
.form-control::placeholder { color: var(--fx-text-3); }
.form-control:focus, .form-select:focus, .fx-input:focus {
  outline: none; background-color: var(--fx-surface);
  border-color: var(--fx-accent); box-shadow: 0 0 0 3px var(--fx-accent-ring); color: var(--fx-text);
}
.form-select {
  height: 38px;
  min-height: 38px;
  padding: 0 36px 0 12px;
  line-height: 38px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background-color: var(--fx-surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238A93A4' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
  appearance: none;
  -webkit-appearance: none;
}
.form-select:hover:not(:disabled):not(:focus) {
  border-color: var(--fx-border-strong);
  background-color: var(--fx-surface-2);
}
.form-select:disabled { opacity: .55; cursor: not-allowed; }
.form-select option, .form-select optgroup {
  background-color: var(--fx-surface);
  color: var(--fx-text);
}
.form-select[multiple] {
  height: auto;
  min-height: 88px;
  line-height: 1.45;
  padding: 8px 10px;
  background-image: none;
  overflow: auto;
  white-space: normal;
  cursor: default;
}
html[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236B7688' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
}
html[data-theme="dark"] .form-select[multiple] { background-image: none; }
html[data-theme="dark"] input[type="file"]::file-selector-button {
  background: var(--fx-surface-3); color: var(--fx-text);
  border: 0; border-radius: var(--fx-r-xs); padding: 4px 10px; margin-right: 10px;
}

.fx-select { position: relative; display: block; min-width: 0; }
.fx-select > select {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important; border: 0 !important;
  opacity: 0; pointer-events: none;
}
.fx-select-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; height: 38px; min-height: 38px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
  background: var(--fx-surface);
  color: var(--fx-text);
  font-family: inherit; font-size: 13.5px; font-weight: 550;
  text-align: left; cursor: pointer;
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease), background var(--fx-ease);
}
.fx-select-btn:hover:not(:disabled) {
  border-color: var(--fx-border-strong);
  background: var(--fx-surface-2);
}
.fx-select-btn:focus, .fx-select-btn:focus-visible {
  outline: none;
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 3px var(--fx-accent-ring);
  background: var(--fx-surface);
}
.fx-select.is-open .fx-select-btn {
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 3px var(--fx-accent-ring);
}
.fx-select.is-placeholder .fx-select-value { color: var(--fx-text-3); font-weight: 500; }
.fx-select.is-disabled .fx-select-btn,
.fx-select-btn:disabled {
  opacity: .55; cursor: not-allowed;
}
.fx-select.is-invalid .fx-select-btn { border-color: var(--fx-danger); }
.fx-select-value {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-select-caret {
  flex: 0 0 auto;
  font-size: 10px; color: var(--fx-text-3);
  transition: transform var(--fx-ease);
}
.fx-select.is-open .fx-select-caret { transform: rotate(180deg); color: var(--fx-accent); }
.fx-select.is-sm .fx-select-btn {
  height: 32px; min-height: 32px; font-size: 12.5px; padding: 0 8px 0 10px;
}
.fx-select.is-multi .fx-select-btn { height: auto; min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
.fx-select-menu.is-multi .fx-select-option i {
  opacity: 1;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--fx-border-strong);
  border-radius: 4px;
  font-size: 8px; color: transparent;
}
.fx-select-menu.is-multi .fx-select-option.is-selected i {
  opacity: 1;
  background: var(--fx-accent);
  border-color: var(--fx-accent);
  color: var(--fx-accent-ink);
}
.fx-select-menu {
  position: fixed; z-index: 90;
  display: flex; flex-direction: column;
  min-width: 160px; max-width: min(420px, calc(100vw - 16px));
  max-height: min(320px, calc(100vh - 24px));
  padding: 6px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  box-shadow: var(--fx-sh-lg);
}
.fx-select-search {
  position: relative; flex: 0 0 auto; margin: 2px 2px 6px;
}
.fx-select-search > i {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 11px; color: var(--fx-text-3); pointer-events: none;
}
.fx-select-search input {
  width: 100%; height: 32px; min-height: 32px;
  padding: 0 10px 0 30px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-sm);
  background: var(--fx-surface-2);
  color: var(--fx-text);
  font: inherit; font-size: 13px;
}
.fx-select-search input:focus {
  outline: none;
  border-color: var(--fx-accent);
  background: var(--fx-surface);
  box-shadow: 0 0 0 3px var(--fx-accent-ring);
}
.fx-select-list {
  overflow: auto; min-height: 0; padding: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.fx-select-option {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 8px 10px;
  border: 0; border-radius: var(--fx-r-sm);
  background: transparent;
  color: var(--fx-text);
  font-family: inherit; font-size: 13.5px; font-weight: 550;
  text-align: left; cursor: pointer;
  line-height: 1.35;
}
.fx-select-option:hover,
.fx-select-option.is-active { background: var(--fx-surface-2); }
.fx-select-option.is-selected {
  background: var(--fx-accent-weak);
  color: var(--fx-accent);
  font-weight: 650;
}
.fx-select-option.is-selected:hover,
.fx-select-option.is-selected.is-active { background: var(--fx-accent-weak); }
.fx-select-option:disabled {
  opacity: .45; cursor: not-allowed;
}
.fx-select-option span {
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-select-option i {
  flex: 0 0 auto; font-size: 11px; opacity: 0;
}
.fx-select-option.is-selected i { opacity: 1; }
.fx-select-empty {
  margin: 0; padding: 16px 10px;
  text-align: center; color: var(--fx-text-3);
  font-size: 13px; font-weight: 550;
}

.form-label, .fx-field label, .fx-field > span {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 650; color: var(--fx-text-2);
}
.form-check-input {
  width: 16px; height: 16px; margin-top: .18rem;
  border: 1px solid var(--fx-border-strong); background-color: var(--fx-surface);
}
.form-check-input:checked { background-color: var(--fx-accent); border-color: var(--fx-accent); }
.form-check-input:focus { border-color: var(--fx-accent); box-shadow: 0 0 0 3px var(--fx-accent-ring); }
.form-check-label { font-size: 13.5px; color: var(--fx-text); }
.form-switch .form-check-input { width: 34px; height: 19px; }
input[type="color"] {
  width: 42px; height: 38px; padding: 3px;
  border: 1px solid var(--fx-border); border-radius: var(--fx-r);
  background: var(--fx-surface); cursor: pointer;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--fx-accent); }

.fx-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
  padding: 12px; background: var(--fx-surface);
  border: 1px solid var(--fx-border); border-radius: var(--fx-r-md);
  box-shadow: var(--fx-sh-xs);
}
.fx-filters > * { flex: 1 1 150px; min-width: 0; }
.fx-filters > .fx-select { flex: 1 1 140px; }
.fx-filters .btn { flex: 0 0 auto; }
.fx-bulk {
  display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center;
  padding: 10px 12px; background: var(--fx-accent-weak);
  border: 1px solid color-mix(in srgb, var(--fx-accent) 20%, transparent);
  border-radius: var(--fx-r-md);
}
.fx-bulk-label {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fx-accent);
}
.fx-bulk .form-select,
.fx-bulk > .fx-select { flex: 1 1 140px; min-width: 0; max-width: 240px; }
.fx-bulk .btn { flex: 0 0 auto; }
.fx-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.fx-form h3 {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--fx-text-3); margin: 22px 0 12px;
}
.fx-form h3:first-child { margin-top: 0; }

/* —— Alerts —————————————————————————————————————————————————————— */
.alert {
  display: flex; align-items: flex-start; gap: 9px;
  border: 1px solid transparent; border-radius: var(--fx-r-md);
  padding: 11px 14px; font-size: 13.5px; font-weight: 550; margin-bottom: 16px;
}
.alert-success { background: var(--fx-ok-weak); color: var(--fx-ok); border-color: color-mix(in srgb, var(--fx-ok) 24%, transparent); }
.alert-danger, .alert-error { background: var(--fx-danger-weak); color: var(--fx-danger); border-color: color-mix(in srgb, var(--fx-danger) 24%, transparent); }
.alert-warning { background: var(--fx-warn-weak); color: var(--fx-warn); border-color: color-mix(in srgb, var(--fx-warn) 24%, transparent); }
.alert-info { background: var(--fx-accent-weak); color: var(--fx-accent); border-color: color-mix(in srgb, var(--fx-accent) 24%, transparent); }

/* —— Stats ———————————————————————————————————————————————————————— */
.fx-stat-grid, .fx-stat-grid--8 {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.fx-dash-kpis { margin-bottom: 22px; }
.fx-dash-kpis .fx-project-group-title { margin-bottom: 10px; }
.fx-dash-kpis .fx-stat-grid {
  margin-bottom: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.fx-stat {
  position: relative; overflow: hidden;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  padding: 14px 16px;
  box-shadow: var(--fx-sh-xs);
  color: inherit;
  display: flex; align-items: center; gap: 12px;
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease), transform var(--fx-ease);
}
a.fx-stat:hover { color: inherit; border-color: var(--fx-border-strong); box-shadow: var(--fx-sh-md); transform: translateY(-1px); }
.fx-stat-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--fx-r-sm);
  background: var(--fx-accent-weak); color: var(--fx-accent);
  font-size: 14px;
}
.fx-stat--danger .fx-stat-icon { background: var(--fx-danger-weak); color: var(--fx-danger); }
.fx-stat--ok .fx-stat-icon { background: var(--fx-ok-weak); color: var(--fx-ok); }
.fx-stat--warn .fx-stat-icon { background: var(--fx-warn-weak); color: var(--fx-warn); }
.fx-stat-body { min-width: 0; }
.fx-stat-l {
  color: var(--fx-text-3); font-size: 12px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-stat-n {
  font-family: var(--fx-display);
  font-size: 24px; font-weight: 800; line-height: 1.2;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.fx-stat--danger .fx-stat-n { color: var(--fx-danger); }
.fx-stat--ok .fx-stat-n { color: var(--fx-ok); }

/* —— Panels ——————————————————————————————————————————————————————— */
.fx-panel {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  padding: 16px 18px 18px;
  margin-bottom: 16px;
  box-shadow: var(--fx-sh-xs);
}
.fx-panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin: -2px 0 14px;
}
.fx-panel-head h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.fx-panel-head a { font-size: 12.5px; font-weight: 650; }
.fx-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.fx-grid-2 > .fx-panel { margin-bottom: 0; }
.fx-chart {
  position: relative;
  height: 260px;
}
.fx-chart canvas { display: block; max-height: 100%; width: 100% !important; }
.fx-chart--donut { height: 260px; max-width: none; margin: 0; }

.fx-dash-list { display: flex; flex-direction: column; }
.fx-dash-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: 0 -8px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--fx-border);
  border-radius: var(--fx-r-sm);
  color: var(--fx-text);
}
.fx-dash-item:last-child { border-bottom: 0; }
.fx-dash-item:hover { color: var(--fx-text); background: var(--fx-surface-2); }
.fx-dash-item:hover .fx-dash-title { color: var(--fx-accent); }
.fx-dash-title {
  display: block;
  font-size: 13.5px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-dash-item .fx-ticket-cell { max-width: none; }
.fx-dash-item-side {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
}

.fx-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 8px; margin: 0 -8px;
  border-bottom: 1px solid var(--fx-border);
  border-radius: var(--fx-r-sm);
  color: var(--fx-text); font-size: 13.5px;
  transition: background var(--fx-ease);
}
.fx-row:hover { background: var(--fx-surface-2); color: var(--fx-text); }
.fx-row strong { font-size: 12.5px; font-weight: 700; color: var(--fx-accent); }
.fx-row.is-unread { position: relative; font-weight: 650; box-shadow: inset 2px 0 0 var(--fx-accent); }
.fx-row:last-child { border-bottom: 0; }
.fx-row time { margin-left: auto; }

/* —— Pills & status ———————————————————————————————————————————————— */
.fx-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: var(--fx-r-xs);
  font-size: 11.5px; font-weight: 650; letter-spacing: .01em;
  background: color-mix(in srgb, var(--pill, var(--fx-text-3)) 14%, var(--fx-surface));
  color: color-mix(in srgb, var(--pill, var(--fx-text-3)) 72%, var(--fx-text));
  border: 1px solid color-mix(in srgb, var(--pill, var(--fx-text-3)) 26%, transparent);
  white-space: nowrap;
}
.fx-sla { font-size: 12px; font-weight: 700; }
.fx-sla--ok { color: var(--fx-ok); }
.fx-sla--warn { color: var(--fx-warn); }
.fx-sla--danger { color: var(--fx-danger); }
.fx-key {
  font-family: var(--fx-mono); font-size: 11.5px; font-weight: 700;
  color: var(--fx-accent); background: var(--fx-accent-weak);
  padding: 3px 8px; border-radius: var(--fx-r-xs);
  width: fit-content; letter-spacing: .02em;
}

/* —— Tables ——————————————————————————————————————————————————————— */
.fx-table-wrap {
  overflow: auto;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  box-shadow: var(--fx-sh-xs);
}
.fx-table { width: 100%; border-collapse: collapse; }
.fx-table th, .fx-table td {
  padding: 11px 14px; text-align: left;
  border-bottom: 1px solid var(--fx-border);
  font-size: 13.5px; vertical-align: middle;
}
.fx-table th {
  position: sticky; top: 0; z-index: 1;
  background: var(--fx-surface-2); color: var(--fx-text-3);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap;
}
.fx-table td { color: var(--fx-text); }
.fx-table tbody tr { transition: background var(--fx-ease); }
.fx-table tbody tr:hover { background: var(--fx-surface-2); }
.fx-table tbody tr:last-child td { border-bottom: 0; }
.fx-table td .btn { margin-right: 4px; }
.fx-table td form { display: inline-flex; vertical-align: middle; margin-right: 4px; }
.fx-table td a { font-weight: 600; }
.fx-panel > .fx-table { margin: 0 -18px -18px; width: calc(100% + 36px); }

.fx-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 34px 18px; text-align: center;
  color: var(--fx-text-3); font-size: 13.5px; font-weight: 550;
}
.fx-empty i {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--fx-surface-3);
  color: var(--fx-text-3); font-size: 16px;
}

/* —— Tabs (segmented) ——————————————————————————————————————————————— */
.fx-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 2px; margin-bottom: 18px;
  padding: 3px; background: var(--fx-surface-3);
  border-radius: var(--fx-r); border: 1px solid var(--fx-border);
}
.fx-tabs a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--fx-r-sm);
  color: var(--fx-text-2); font-size: 13px; font-weight: 600;
  transition: background var(--fx-ease), color var(--fx-ease), box-shadow var(--fx-ease);
}
.fx-tabs a:hover { color: var(--fx-text); }
.fx-tabs a.is-active { background: var(--fx-surface); color: var(--fx-text); box-shadow: var(--fx-sh-xs); }
.fx-tabs a.is-active i { color: var(--fx-accent); }
.fx-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 2px;
  border-radius: 99px; font-size: 11px; font-weight: 700;
  background: var(--fx-surface-3); color: var(--fx-text-3);
}
.fx-tabs a.is-active .fx-tab-count { background: var(--fx-accent-weak); color: var(--fx-accent); }

.fx-inbox-list { display: flex; flex-direction: column; }
.fx-inbox-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px; align-items: center;
  padding: 13px 18px;
  border-bottom: 1px solid var(--fx-border);
  color: var(--fx-text);
}
.fx-inbox-item:last-child { border-bottom: 0; }
.fx-inbox-item:hover { color: var(--fx-text); background: var(--fx-surface-2); }
.fx-inbox-item.is-unread { background: color-mix(in srgb, var(--fx-accent) 6%, var(--fx-surface)); }
.fx-inbox-item.is-unread:hover { background: color-mix(in srgb, var(--fx-accent) 10%, var(--fx-surface)); }
.fx-inbox-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px;
  background: var(--fx-surface-3); color: var(--fx-text-3);
}
.fx-inbox-icon.is-accent { background: var(--fx-accent-weak); color: var(--fx-accent); }
.fx-inbox-icon.is-warn { background: var(--fx-warn-weak); color: var(--fx-warn); }
.fx-inbox-icon.is-danger { background: var(--fx-danger-weak); color: var(--fx-danger); }
.fx-inbox-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fx-inbox-body strong {
  font-size: 13.5px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-inbox-item.is-unread .fx-inbox-body strong { font-weight: 750; }
.fx-inbox-body .fx-muted { font-size: 12px; }
.fx-inbox-when {
  font-size: 12px; font-weight: 550; color: var(--fx-text-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.fx-inbox-item.is-unread .fx-inbox-when { color: var(--fx-accent); font-weight: 650; }

/* —— Settings ————————————————————————————————————————————————————— */
.fx-settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.fx-settings-nav {
  position: sticky; top: calc(var(--fx-topbar) + 16px);
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  box-shadow: var(--fx-sh-xs);
}
.fx-settings-nav a {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px;
  border-radius: var(--fx-r-sm);
  color: var(--fx-text-2);
  transition: background var(--fx-ease), color var(--fx-ease);
}
.fx-settings-nav a i {
  flex: 0 0 30px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--fx-surface-3);
  color: var(--fx-text-3);
  font-size: 12.5px;
  margin-top: 1px;
  transition: background var(--fx-ease), color var(--fx-ease);
}
.fx-settings-nav a span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fx-settings-nav a strong { font-size: 13.5px; font-weight: 650; color: var(--fx-text); }
.fx-settings-nav a em {
  font-style: normal; font-size: 11.5px; font-weight: 500;
  color: var(--fx-text-3); line-height: 1.35;
}
.fx-settings-nav a:hover { background: var(--fx-surface-2); }
.fx-settings-nav a.is-active { background: var(--fx-accent-weak); }
.fx-settings-nav a.is-active strong { color: var(--fx-accent); }
.fx-settings-nav a.is-active i { background: var(--fx-accent); color: var(--fx-accent-ink); }

.fx-settings-head { margin: 2px 0 16px; }
.fx-settings-head h2 {
  margin: 0; font-family: var(--fx-display);
  font-size: 18px; font-weight: 800; letter-spacing: -.02em;
}
.fx-settings-head p { margin: 4px 0 0; color: var(--fx-text-3); font-size: 13.5px; }
.fx-settings-lead {
  margin: -4px 0 16px; color: var(--fx-text-2);
  font-size: 13.5px; line-height: 1.55;
}
.fx-settings-main .fx-panel { padding-bottom: 18px; }
.fx-settings-main .fx-panel .fx-form-grid { margin-bottom: 0; }
.fx-settings-main .fx-panel .fx-form-grid + .fx-setting { margin-top: 4px; }

.fx-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--fx-border);
}
.fx-panel-head + .fx-setting { padding-top: 2px; }
.fx-setting:last-child { border-bottom: 0; padding-bottom: 0; }
.fx-setting + .fx-field, .fx-setting + .fx-form-grid { margin-top: 12px; }
.fx-field + .fx-setting { border-top: 1px solid var(--fx-border); }
.fx-settings-main .fx-field { margin-bottom: 14px; }
.fx-settings-main .fx-panel > .fx-field:last-child,
.fx-settings-main .fx-panel > .fx-form-grid:last-child { margin-bottom: 0; }
.fx-setting-copy label, .fx-setting-copy strong {
  display: block; margin: 0;
  font-size: 13.5px; font-weight: 650; color: var(--fx-text);
}
.fx-setting-copy p { margin: 3px 0 0; font-size: 12.5px; color: var(--fx-text-3); line-height: 1.45; max-width: 52ch; }
.fx-setting-ctrl { display: flex; justify-content: flex-end; }

.fx-switch {
  display: inline-flex; align-items: center; cursor: pointer;
}
.fx-switch input {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px; margin: 0;
  border-radius: 999px;
  background: var(--fx-surface-3);
  border: 1px solid var(--fx-border-strong);
  position: relative; cursor: pointer;
  transition: background var(--fx-ease), border-color var(--fx-ease);
}
.fx-switch input::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(12, 18, 32, .18);
  transition: transform .16s cubic-bezier(.2, .7, .3, 1);
}
.fx-switch input:checked { background: var(--fx-accent); border-color: var(--fx-accent); }
.fx-switch input:checked::after { transform: translateX(18px); }
.fx-switch input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--fx-accent-ring); }

.fx-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--fx-text-3); line-height: 1.4; }
.fx-mono, .font-monospace { font-family: var(--fx-mono); font-size: 12.5px; letter-spacing: .01em; }
.fx-page-sub code, .fx-muted code, .fx-hint code {
  font-family: var(--fx-mono); font-size: .92em;
  padding: 1px 5px; border-radius: 4px;
  background: var(--fx-surface-3); color: var(--fx-text-2);
}

.fx-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.fx-color {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  background: var(--fx-surface-2);
  cursor: pointer;
}
.fx-color:hover { border-color: var(--fx-border-strong); }
.fx-color input[type="color"] {
  width: 42px; height: 42px; padding: 0; border: 0;
  border-radius: 10px; background: transparent;
  overflow: hidden; flex: 0 0 42px; cursor: pointer;
}
.fx-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.fx-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 10px; }
.fx-color span { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.fx-color strong { font-size: 13px; font-weight: 700; }
.fx-color em { font-style: normal; font-size: 11.5px; color: var(--fx-text-3); }
.fx-color .form-control { min-height: 32px; height: 32px; padding: 4px 8px; font-size: 12.5px; }

.fx-logo-row { display: flex; gap: 18px; align-items: flex-start; }
.fx-logo-preview {
  width: 76px; height: 76px; flex: 0 0 76px;
  display: grid; place-items: center;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  background: var(--fx-surface-2);
}
.fx-logo-preview img { max-width: 52px; max-height: 52px; object-fit: contain; }
.fx-logo-fields { flex: 1; min-width: 0; }
.fx-logo-fields .fx-field { margin-bottom: 8px; }

.fx-settings-foot {
  position: sticky; bottom: 12px; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 4px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--fx-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  box-shadow: var(--fx-sh-md);
}
.fx-settings-foot-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fx-settings-foot--end { justify-content: flex-end; }
.fx-panel > .fx-settings-foot { margin-top: 16px; }

.fx-perm-panel { padding-bottom: 8px; }
.fx-perm-wrap {
  overflow: auto;
  margin: 0 -6px;
  padding: 0 6px 4px;
}
.fx-perm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
}
.fx-perm-table--user { min-width: 0; }
.fx-perm-table th, .fx-perm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--fx-border);
  vertical-align: middle;
  text-align: center;
}
.fx-perm-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--fx-surface);
  font-size: 12px;
}
.fx-perm-table tbody th {
  text-align: left;
  font-weight: 500;
  position: sticky; left: 0; z-index: 1;
  background: var(--fx-surface);
  min-width: 220px;
  width: 32%;
}
.fx-perm-table tbody th strong { display: block; font-size: 13px; font-weight: 650; color: var(--fx-text); }
.fx-perm-table tbody th span { display: block; margin-top: 2px; font-size: 12px; color: var(--fx-text-3); line-height: 1.35; font-weight: 500; }
.fx-perm-table .fx-perm-group th {
  padding: 14px 12px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fx-text-3); background: var(--fx-surface-2); text-align: left;
  position: sticky; left: 0;
}
.fx-perm-table thead th .fx-role { display: inline-flex; margin-bottom: 6px; }
.fx-perm-col {
  display: block; margin: 0 auto;
  background: none; border: 0; padding: 0;
  color: var(--fx-accent); font-size: 11px; font-weight: 700; cursor: pointer;
}
.fx-perm-col:hover { text-decoration: underline; }
.fx-perm-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin: 0;
  cursor: pointer;
}
.fx-perm-check input { width: 16px; height: 16px; accent-color: var(--fx-accent); cursor: pointer; }
.fx-perm-check input:disabled { cursor: not-allowed; opacity: .7; }
.fx-perm-default {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fx-text-3);
}
.fx-perm-default.is-on { color: var(--fx-ok); }
.fx-perm-table--user td:last-child { min-width: 140px; text-align: left; }

/* —— Ticket detail ————————————————————————————————————————————————— */
.fx-ticket-grid { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 16px; align-items: start; }
.fx-ticket-grid > aside .fx-panel { position: sticky; top: calc(var(--fx-topbar) + 16px); }
.fx-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.fx-prose { line-height: 1.65; color: var(--fx-text); }
.fx-prose :last-child { margin-bottom: 0; }
.fx-comment { padding: 14px 0; border-bottom: 1px solid var(--fx-border); }
.fx-comment:last-of-type { border-bottom: 0; }
.fx-comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-comment-head strong { font-size: 13px; font-weight: 700; }
.fx-comment-head time { font-size: 12px; color: var(--fx-text-3); }
.fx-comment-del { margin-left: auto; }
.fx-comment.is-internal {
  background: var(--fx-warn-weak); border: 1px solid color-mix(in srgb, var(--fx-warn) 22%, transparent);
  padding: 12px 14px; border-radius: var(--fx-r-md); margin-bottom: 10px;
}
.fx-timeline { list-style: none; padding: 0; margin: 0; }
.fx-timeline li {
  position: relative; padding: 9px 0 9px 20px;
  font-size: 13px; color: var(--fx-text-2);
  border-left: 1px solid var(--fx-border); margin-left: 5px;
}
.fx-timeline li::before {
  content: ""; position: absolute; left: -4px; top: 15px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fx-surface); border: 2px solid var(--fx-border-strong);
}
.fx-timeline strong { color: var(--fx-text); font-weight: 650; }
.fx-dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px dashed var(--fx-border-strong); border-radius: var(--fx-r-md);
  padding: 22px 16px; text-align: center; color: var(--fx-text-3);
  background: var(--fx-surface-2); font-size: 13px; font-weight: 550;
  cursor: pointer;
  transition: border-color var(--fx-ease), background var(--fx-ease), color var(--fx-ease);
}
.fx-dropzone i { font-size: 18px; color: var(--fx-accent); }
.fx-dropzone strong { color: var(--fx-text); font-size: 13.5px; font-weight: 650; }
.fx-dropzone span { font-size: 12.5px; }
.fx-dropzone:hover, .fx-dropzone.is-over {
  border-color: var(--fx-accent); background: var(--fx-accent-weak); color: var(--fx-accent);
}
.fx-file-list {
  margin: 10px 0 0;
  font-size: 12.5px; font-weight: 550; color: var(--fx-text-2);
  word-break: break-word;
}
.fx-gallery { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.fx-attach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 10px;
}
.fx-attach-card {
  display: flex; flex-direction: column;
  background: var(--fx-surface-2);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
  overflow: hidden;
}
.fx-attach-preview {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; width: 100%; padding: 0;
  border: 0; background: var(--fx-surface-3);
  cursor: pointer; color: var(--fx-text-3);
}
.fx-attach-preview:hover { color: var(--fx-accent); }
.fx-attach-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fx-attach-preview i { font-size: 28px; }
.fx-attach-meta { padding: 8px 10px 4px; min-width: 0; }
.fx-attach-name {
  margin: 0; font-size: 12.5px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-attach-size { margin: 2px 0 0; font-size: 11.5px; color: var(--fx-text-3); }
.fx-attach-actions {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px 8px 8px;
}
.fx-attach-actions form { display: inline; margin: 0; }
.fx-attach-actions .btn { height: 28px; min-height: 28px; padding: 0 8px; font-size: 12px; }
.fx-attach-grid + .fx-dropzone,
.fx-panel > .fx-empty + .fx-dropzone { margin-top: 14px; }

.fx-lightbox[hidden] { display: none !important; }
.fx-lightbox {
  position: fixed; inset: 0; z-index: 110;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  background: rgba(8, 12, 20, .88);
}
.fx-lightbox-backdrop { display: none; }
.fx-lightbox-bar {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px;
  color: #fff;
}
.fx-lightbox-name {
  margin: 0; font-size: 14px; font-weight: 650;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-lightbox-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.fx-lightbox-actions .btn { color: #fff; background: transparent; border-color: rgba(255,255,255,.2); }
.fx-lightbox-actions .btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.fx-lightbox-actions .fx-icon-btn { color: #fff; background: transparent; border-color: rgba(255,255,255,.2); }
.fx-lightbox-stage {
  grid-column: 2; min-width: 0; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 8px 0 20px;
}
.fx-lightbox-stage img {
  max-width: 100%; max-height: calc(100vh - 90px);
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0,0,0,.45);
}
.fx-lightbox-stage iframe {
  width: 100%; height: calc(100vh - 90px);
  border: 0; border-radius: 8px; background: #fff;
}
.fx-lightbox-nav {
  align-self: center;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.08); color: #fff;
  cursor: pointer;
}
.fx-lightbox-nav:hover { background: rgba(255,255,255,.16); }
.fx-lightbox-fallback {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: #fff; text-align: center; padding: 24px;
}
.fx-lightbox-fallback i { font-size: 42px; opacity: .8; }
.fx-lightbox-fallback p { margin: 0; color: rgba(255,255,255,.75); }

.fx-upload-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 24px;
}
.fx-upload-group { display: flex; flex-direction: column; gap: 8px; }
.fx-upload-group .fx-check { font-weight: 550; }
.fx-upload-group .fx-muted { font-family: var(--fx-mono); font-size: 11.5px; }

/* —— Board ———————————————————————————————————————————————————————— */
.fx-page--board { min-width: 0; }
.fx-board-filters { align-items: end; }
.fx-board-filters .fx-field { margin: 0; flex: 1 1 180px; }
.fx-board-filters .fx-field > span { margin-bottom: 4px; }
.fx-board {
  display: flex; gap: 12px; align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  padding: 2px 2px 14px;
  margin: 0 -4px;
  scrollbar-color: var(--fx-border-strong) transparent;
}
.fx-board::-webkit-scrollbar { height: 8px; }
.fx-board::-webkit-scrollbar-thumb {
  background: var(--fx-border-strong); border-radius: 99px;
}
.fx-col {
  flex: 1 0 280px;
  max-width: 360px;
  display: flex; flex-direction: column;
  background: var(--fx-surface-2);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  min-height: min(70vh, 720px);
  box-shadow: var(--fx-sh-xs);
  overflow: hidden;
}
.fx-col h2 {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin: 0; padding: 12px 12px 11px;
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--fx-text-2);
  border-top: 3px solid var(--col, var(--fx-border-strong));
  background: color-mix(in srgb, var(--col, var(--fx-border)) 8%, var(--fx-surface-2));
}
.fx-col-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-col-count, .fx-col h2 span {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: 99px;
  font-size: 11px; font-weight: 700; color: var(--fx-text-3); letter-spacing: 0;
  flex: 0 0 auto;
}
.fx-col-body {
  padding: 8px 8px 12px; min-height: 140px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; overflow-y: auto;
  transition: background var(--fx-ease), box-shadow var(--fx-ease);
}
.fx-col-empty {
  display: none; margin: auto 0; padding: 18px 8px;
  text-align: center; color: var(--fx-text-3);
  font-size: 12.5px; font-weight: 550;
}
.fx-col-body:not(:has(.fx-card)) .fx-col-empty { display: block; }
.fx-col-body.is-over {
  background: var(--fx-accent-weak);
  box-shadow: inset 0 0 0 1.5px var(--fx-accent);
}
.fx-col-body.is-blocked {
  opacity: .55;
  background: repeating-linear-gradient(135deg, transparent 0 6px, var(--fx-surface-3) 6px 12px);
}
.fx-card {
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r); padding: 10px 11px 11px;
  box-shadow: var(--fx-sh-xs); cursor: grab;
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease), transform var(--fx-ease);
}
.fx-card:hover { border-color: var(--fx-border-strong); box-shadow: var(--fx-sh-md); }
.fx-card.is-dragging { opacity: .5; transform: rotate(1.5deg); }
.fx-card[draggable="true"] { touch-action: none; }
.fx-card:not([draggable]) { cursor: default; }
.fx-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.fx-card > a, .fx-card-top > a {
  font-family: var(--fx-mono); font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.fx-card-type { font-size: 10px; padding: 2px 6px; flex: 0 0 auto; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.fx-card p { margin: 7px 0 0; font-size: 13px; color: var(--fx-text); line-height: 1.4; font-weight: 550; }
.fx-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fx-card-meta .fx-avatar-sm { margin-left: auto; }
.fx-avatar-sm.is-empty {
  background: var(--fx-surface-3); color: var(--fx-text-3); font-size: 9px;
}
.fx-card-due { font-size: 11.5px; font-weight: 650; color: var(--fx-text-3); }
.fx-card-due.is-today { color: var(--fx-warn); }
.fx-card-due.is-overdue { color: var(--fx-danger); }

/* —— Cards grid / projects ——————————————————————————————————————————— */
.fx-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.fx-project-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md); padding: 18px;
  box-shadow: var(--fx-sh-xs); color: var(--fx-text);
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease), transform var(--fx-ease);
}
.fx-project-card:hover { color: var(--fx-text); border-color: var(--fx-border-strong); box-shadow: var(--fx-sh-md); transform: translateY(-2px); }
.fx-project-card h2 { margin: 0; font-size: 15px; font-weight: 700; }
.fx-project-card p { margin: 0; color: var(--fx-text-3); font-size: 12.5px; }

.fx-client-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md); padding: 18px;
  box-shadow: var(--fx-sh-xs); color: var(--fx-text);
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease), transform var(--fx-ease);
}
.fx-client-card:hover { color: var(--fx-text); border-color: var(--fx-border-strong); box-shadow: var(--fx-sh-md); transform: translateY(-2px); }
.fx-client-card-body { min-width: 0; }
.fx-client-card h2 { margin: 0; font-size: 15px; font-weight: 700; }
.fx-client-card p { margin: 4px 0 10px; color: var(--fx-text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.fx-client-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-client-side { display: flex; flex-direction: column; gap: 16px; }
.fx-client-side .fx-panel { margin-bottom: 0; }
.fx-role-cards--stack { grid-template-columns: 1fr; }
.fx-danger-panel { border-color: color-mix(in srgb, var(--fx-danger) 28%, var(--fx-border)); }
.fx-danger-panel .fx-panel-head h2 { color: var(--fx-danger); }
.fx-project-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fx-project-head > div { min-width: 0; }
.fx-project-logo {
  width: 38px; height: 38px; object-fit: contain;
  border-radius: var(--fx-r-sm); background: var(--fx-surface-3); padding: 5px;
  border: 1px solid var(--fx-border);
}
.fx-project-logo--lg { width: 52px; height: 52px; }
.fx-project-group { margin-bottom: 22px; }
.fx-project-group:last-child { margin-bottom: 0; }
.fx-project-group-title {
  margin: 0 0 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--fx-text-3);
}
.fx-project-card-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.fx-project-card .fx-key { flex: 0 0 auto; }

.fx-chip-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.fx-type-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  border-radius: 99px;
  font-size: 12.5px; font-weight: 650;
  background: color-mix(in srgb, var(--chip, var(--fx-text-3)) 14%, var(--fx-surface));
  color: color-mix(in srgb, var(--chip, var(--fx-text-3)) 78%, var(--fx-text));
  border: 1px solid color-mix(in srgb, var(--chip, var(--fx-text-3)) 28%, transparent);
}
.fx-type-chip em {
  font-style: normal; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; opacity: .65;
}
.fx-status-flow {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 2px;
  align-items: center;
}
.fx-status-flow li {
  display: inline-flex; align-items: center; gap: 6px;
}
.fx-status-flow li:not(:last-child)::after {
  content: "";
  width: 10px; height: 1.5px;
  margin: 0 6px 0 4px;
  background: var(--fx-border-strong);
  border-radius: 99px;
}
.fx-status-flow em {
  font-style: normal; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--fx-text-3);
}
.fx-team-add.fx-invite-form {
  grid-template-columns: minmax(0, 1.6fr) minmax(140px, .8fr) auto;
  padding: 16px 18px 18px;
  border-top: 1px solid var(--fx-border);
}
.fx-panel--table p.fx-team-add {
  margin: 0; padding: 14px 18px 16px;
  border-top: 1px solid var(--fx-border);
}

.fx-cfg { display: flex; flex-direction: column; gap: 16px; }
.fx-cfg > .fx-panel { margin-bottom: 0; }
.fx-panel--table .fx-panel-head { align-items: flex-start; }
.fx-panel--table .fx-panel-head .fx-settings-lead {
  margin: 4px 0 0;
  max-width: 72ch;
}
.fx-cfg-table .form-control,
.fx-cfg-table .form-select {
  width: auto;
  min-height: 36px;
  height: 36px;
  padding: 6px 10px;
}
.fx-cfg-table td .form-control:not([type="number"]) { width: 100%; max-width: 420px; }
.fx-cfg-table .form-control[readonly] {
  background-color: var(--fx-surface-2);
  color: var(--fx-text-2);
}
.fx-cfg-table th, .fx-cfg-table td { padding-top: 8px; padding-bottom: 8px; }
.fx-cfg-table tbody tr:hover { background: transparent; }
.fx-cfg-table tbody tr.is-dragging { opacity: .45; }
.fx-cfg-table tbody tr.is-drag-over td { box-shadow: inset 0 2px 0 var(--fx-accent); }
.fx-cfg-col-grip { width: 56px; vertical-align: middle; }
.fx-cfg-move { display: flex; align-items: center; gap: 2px; }
.fx-cfg-grip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 32px;
  color: var(--fx-text-3); cursor: grab;
  border-radius: var(--fx-r-sm);
}
.fx-cfg-grip:hover { color: var(--fx-text); background: var(--fx-surface-3); }
.fx-cfg-grip:active { cursor: grabbing; }
.fx-cfg-nudge { display: inline-flex; flex-direction: column; }
.fx-cfg-nudge button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 14px; padding: 0; border: 0;
  background: transparent; color: var(--fx-text-3);
  font-size: 9px; line-height: 1; cursor: pointer; border-radius: 3px;
}
.fx-cfg-nudge button:hover { color: var(--fx-text); background: var(--fx-surface-3); }
.fx-cfg-col-color { width: 72px; }
.fx-cfg-col-final { width: 108px; white-space: nowrap; }
.fx-cfg-actions { width: 1%; text-align: right; white-space: nowrap; }
.fx-cfg-actions .btn { margin: 0; }
.fx-cfg-foot {
  padding: 12px 18px 14px;
  border-top: 1px solid var(--fx-border);
  background: var(--fx-surface-2);
}
.fx-cfg-swatch {
  position: relative;
  display: block;
  width: 32px; height: 32px;
  border: 1px solid var(--fx-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--fx-surface-3);
}
.fx-cfg-swatch input[type="color"] {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  padding: 0; border: 0; border-radius: 0;
  background: transparent; cursor: pointer;
}
.fx-cfg-swatch input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.fx-cfg-swatch input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 0; }
.fx-cfg-swatch input[type="color"]:disabled { cursor: default; opacity: .85; }
.fx-cfg-tag {
  display: inline-flex; align-items: center;
  font-style: normal; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--fx-text-3);
  background: var(--fx-surface-3);
  padding: 3px 7px; border-radius: 99px;
}
.fx-cfg-tag--project {
  color: var(--fx-accent);
  background: var(--fx-accent-weak);
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.fx-cfg-remove { justify-content: flex-end; }
.fx-cfg-sla { display: flex; align-items: center; gap: 8px; }
.fx-cfg-sla .form-control {
  width: 84px; min-width: 84px; flex: 0 0 84px;
}
.fx-cfg-sla .form-select,
.fx-cfg-sla .fx-select {
  width: 124px; min-width: 124px; flex: 0 0 124px;
}

/* —— Calendar ————————————————————————————————————————————————————— */
.fx-cal-nav .btn.is-disabled { opacity: .45; pointer-events: none; }
.fx-cal-filters { align-items: end; }
.fx-cal-filters .fx-field { margin: 0; flex: 1 1 160px; }
.fx-cal-filters .fx-field > span { margin-bottom: 4px; }
.fx-cal-month { max-width: 200px; flex: 0 1 200px; }
.fx-cal-done { flex: 0 0 auto; height: 38px; margin: 0 0 1px; }
.fx-cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}
.fx-cal-board {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  padding: 10px;
  box-shadow: var(--fx-sh-xs);
  overflow: auto;
}
.fx-cal {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--fx-border);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
  overflow: hidden;
  min-width: 640px;
}
.fx-cal-h {
  background: var(--fx-surface-2);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--fx-text-3); text-align: center; padding: 8px 6px;
}
.fx-cal-h.is-weekend { color: var(--fx-text-3); background: var(--fx-surface-3); }
.fx-cal-cell {
  display: flex; flex-direction: column; gap: 4px;
  min-height: 118px; padding: 6px;
  background: var(--fx-surface);
  font-size: 12px;
}
.fx-cal-cell.is-weekend { background: color-mix(in srgb, var(--fx-surface-2) 70%, var(--fx-surface)); }
.fx-cal-cell.is-outside { background: var(--fx-surface-2); }
.fx-cal-cell.is-outside > .fx-cal-cell-head strong { color: var(--fx-text-3); }
.fx-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--fx-accent); }
.fx-cal-cell-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  min-height: 22px;
}
.fx-cal-cell-head strong { font-size: 12px; font-weight: 700; color: var(--fx-text-2); }
.fx-cal-cell.is-today .fx-cal-cell-head strong {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 99px; background: var(--fx-accent); color: var(--fx-accent-ink);
}
.fx-cal-add {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--fx-r-sm);
  color: var(--fx-text-3); opacity: 0;
  font-size: 11px;
}
.fx-cal-cell:hover .fx-cal-add { opacity: 1; }
.fx-cal-add:hover { color: var(--fx-accent); background: var(--fx-accent-weak); }
.fx-cal-ev {
  display: flex; align-items: baseline; gap: 5px;
  min-width: 0;
  padding: 3px 6px;
  border-radius: var(--fx-r-xs);
  border-left: 2px solid var(--ev, var(--fx-accent));
  background: color-mix(in srgb, var(--ev, var(--fx-accent)) 14%, var(--fx-surface));
  color: var(--fx-text);
  font-size: 11px; line-height: 1.3;
}
.fx-cal-ev:hover { color: var(--fx-text); filter: brightness(0.97); }
.fx-cal-ev-code {
  font-family: var(--fx-mono); font-size: 10px; font-weight: 700;
  color: color-mix(in srgb, var(--ev, var(--fx-accent)) 72%, var(--fx-text));
  flex: 0 0 auto;
}
.fx-cal-ev-title {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 550;
}
.fx-cal-ev.is-overdue {
  border-left-color: var(--fx-danger);
  background: var(--fx-danger-weak);
}
.fx-cal-ev.is-overdue .fx-cal-ev-code { color: var(--fx-danger); }
.fx-cal-ev.is-done { opacity: .55; }
.fx-cal-more { margin: 0; }
.fx-cal-more summary {
  cursor: pointer; list-style: none;
  font-size: 11px; font-weight: 650; color: var(--fx-text-3);
  padding: 2px 4px;
}
.fx-cal-more summary::-webkit-details-marker { display: none; }
.fx-cal-more[open] summary { margin-bottom: 4px; }
.fx-cal-more .fx-cal-ev { margin-top: 4px; }
.fx-cal-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center;
}
.fx-cal-kpis span {
  display: block;
  font-family: var(--fx-display); font-size: 22px; font-weight: 800;
  letter-spacing: -.03em;
}
.fx-cal-kpis span.is-overdue { color: var(--fx-danger); }
.fx-cal-kpis em { font-style: normal; font-size: 11px; font-weight: 650; color: var(--fx-text-3); }
.fx-cal-empty { margin: 0; font-size: 13px; }
.fx-cal-side-item {
  display: grid; gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid var(--fx-border);
  color: var(--fx-text);
}
.fx-cal-side-item:last-child { border-bottom: 0; }
.fx-cal-side-item:hover { color: var(--fx-text); }
.fx-cal-side-item strong { font-family: var(--fx-mono); font-size: 11.5px; color: var(--fx-accent); }
.fx-cal-side-item span {
  font-size: 13px; font-weight: 550;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-cal-side-item em { font-style: normal; font-size: 11.5px; color: var(--fx-danger); }

/* —— Notifications bell ————————————————————————————————————————————— */
.fx-bell { position: relative; }
.fx-bell-btn { position: relative; }
.fx-bell-btn[aria-expanded="true"] { background: var(--fx-surface-3); color: var(--fx-text); }
.fx-bell-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fx-danger); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 99px;
  box-shadow: 0 0 0 2px var(--fx-surface);
}
.fx-bell-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 400px;
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-lg); box-shadow: var(--fx-sh-lg);
  z-index: 40; overflow: hidden;
}
.fx-bell-panel:not([hidden]) { animation: fx-bell-in .16s ease; }
@keyframes fx-bell-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.fx-bell-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--fx-border);
}
.fx-bell-head strong { display: block; font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.fx-bell-head-count { display: block; margin-top: 2px; font-size: 12px; font-weight: 550; color: var(--fx-text-3); }
.fx-bell-mark { margin: 0; }
.fx-bell-list { max-height: 380px; overflow: auto; padding: 0; }
.fx-bell-list .fx-inbox-item { padding: 11px 16px; gap: 10px; }
.fx-bell-list .fx-inbox-icon { width: 30px; height: 30px; font-size: 12px; border-radius: 8px; }
.fx-bell-list .fx-inbox-body strong {
  font-size: 13px; white-space: normal; display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fx-bell-list .fx-inbox-when { font-size: 11px; align-self: start; padding-top: 2px; }
.fx-bell-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 0; padding: 28px 18px 32px;
  text-align: center; color: var(--fx-text-3); font-size: 13.5px; font-weight: 550;
}
.fx-bell-empty i {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--fx-surface-3);
  color: var(--fx-text-3); font-size: 16px;
}
.fx-bell-empty p { margin: 0; }
.fx-bell-all {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; text-align: center;
  border-top: 1px solid var(--fx-border);
  font-size: 12.5px; font-weight: 650;
  background: var(--fx-surface-2); color: var(--fx-text);
}
.fx-bell-all:hover { color: var(--fx-accent); background: var(--fx-accent-weak); }
.fx-bell-all i { font-size: 11px; }
.fx-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.fx-pager-pages { display: flex; align-items: center; gap: 4px; }
.fx-page-num {
  min-width: 32px; height: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--fx-r-sm);
  font-size: 13px; font-weight: 650; color: var(--fx-text-2);
}
.fx-page-num:hover { background: var(--fx-surface-3); color: var(--fx-text); }
.fx-page-num.is-active {
  background: var(--fx-accent); color: var(--fx-accent-ink);
}
.fx-pager-gap { color: var(--fx-text-3); padding: 0 2px; }
.fx-pager .is-disabled { opacity: .4; pointer-events: none; }
.fx-pager-per { display: inline-flex; align-items: center; gap: 8px; color: var(--fx-text-3); font-size: 12.5px; font-weight: 550; margin-left: auto; }
.fx-pager-per .form-select,
.fx-pager-per .fx-select { width: auto; min-width: 72px; flex: 0 0 auto; }
.fx-pager-per .fx-select-btn { height: 32px; min-height: 32px; font-size: 12.5px; padding: 0 8px 0 10px; }

.fx-sort {
  display: inline-flex; align-items: center; gap: 6px;
  color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit;
  white-space: nowrap;
}
.fx-sort i { font-size: 11px; color: var(--fx-text-3); }
.fx-sort:hover, .fx-sort.is-active { color: var(--fx-text); }
.fx-sort.is-active i { color: var(--fx-accent); }
.fx-table th .fx-sort { font-weight: 700; }

.fx-invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, .7fr) minmax(160px, .9fr) auto;
  gap: 12px;
  align-items: end;
}
.fx-invite-form.is-no-client {
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, .7fr) auto;
}
.fx-invite-form .fx-field { margin: 0; }
.fx-invite-form [data-invite-client][hidden] { display: none !important; }
.fx-invite-hint { margin: 10px 0 0; }
.fx-invite-submit { display: flex; align-items: flex-end; padding-bottom: 1px; }
.fx-invite-pending { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--fx-border); }
.fx-invite-pending-label {
  margin: 0 0 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fx-text-3);
}
.fx-invite-pending ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fx-invite-pending li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--fx-surface-2);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
}
.fx-invite-pending li form { margin-left: auto; }
.fx-invite-email { font-weight: 650; }

.fx-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fx-person > span:last-child { min-width: 0; }
.fx-person strong { display: block; font-size: 13.5px; font-weight: 650; }
.fx-person .fx-muted { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.fx-you {
  font-style: normal; font-size: 10px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--fx-accent); background: var(--fx-accent-weak);
  padding: 2px 6px; border-radius: 99px; margin-left: 4px; vertical-align: 1px;
}
.fx-client-tag { display: block; margin-top: 4px; font-size: 12px; }
.fx-row-actions { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.fx-form-narrow { max-width: 720px; }
.fx-form-narrow .fx-settings-foot { justify-content: flex-end; }
.fx-avatar--lg { width: 56px; height: 56px; font-size: 20px; flex: 0 0 56px; }
.fx-avatar.is-placeholder {
  background: var(--fx-surface-3); color: var(--fx-text-3); font-size: 18px;
}
.fx-user-hero.is-create { border-style: dashed; }
.fx-project-hero-mark {
  width: 56px; height: 56px; flex: 0 0 56px;
  display: grid; place-items: center;
  border-radius: var(--fx-r-md);
  background: var(--fx-accent-weak);
  border: 1px solid color-mix(in srgb, var(--fx-accent) 22%, transparent);
  overflow: hidden;
}
.fx-user-hero.is-create .fx-project-hero-mark {
  background: var(--fx-surface-3);
  border: 1px dashed var(--fx-border-strong);
}
.fx-project-hero-mark img { width: 100%; height: 100%; object-fit: contain; padding: 7px; background: var(--fx-surface); }
.fx-project-hero-mark .fx-key { font-size: 12.5px; }
.fx-input-key { text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.fx-create-notes {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.fx-create-notes li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--fx-text-2); line-height: 1.45;
}
.fx-create-notes i {
  flex: 0 0 28px; width: 28px; height: 28px; margin-top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--fx-accent-weak); color: var(--fx-accent); font-size: 12px;
}
.fx-empty .btn { margin-top: 8px; }
.fx-user-edit { display: flex; flex-direction: column; gap: 16px; }
.fx-user-edit-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: start;
}
.fx-ticket-create {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 16px;
  align-items: start;
}
.fx-ticket-create > .fx-parent-banner { grid-column: 1 / -1; }
.fx-parent-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; color: var(--fx-text);
  text-decoration: none;
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease);
}
.fx-parent-banner:hover { color: var(--fx-text); border-color: var(--fx-border-strong); box-shadow: var(--fx-sh-sm); }
.fx-parent-banner-copy { min-width: 0; }
.fx-parent-banner-copy .fx-eyebrow { margin: 0 0 4px; }
.fx-parent-banner-copy strong {
  display: block; font-size: 16px; font-weight: 750; letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-parent-banner-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fx-parent-banner-go {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 650; color: var(--fx-accent);
  white-space: nowrap;
}
.fx-locked-value {
  display: flex; align-items: center; gap: 8px;
  min-height: 38px; margin: 0; padding: 0 12px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
  background: var(--fx-surface-2);
  font-size: 13.5px; font-weight: 550; color: var(--fx-text-2);
}
.fx-custom-fields:empty { display: none; }
.fx-custom-fields:not(:empty) {
  margin-top: 4px; padding-top: 16px;
  border-top: 1px solid var(--fx-border);
  display: flex; flex-direction: column; gap: 14px;
}
.fx-custom-label {
  margin: 0;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fx-text-3);
}
.fx-custom-fields .fx-field { margin-bottom: 0; }
.fx-user-edit .fx-field { margin-bottom: 14px; }
.fx-user-edit .fx-field:last-child { margin-bottom: 0; }
.fx-user-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin-bottom: 0; }
.fx-user-hero-copy { min-width: 0; }
.fx-user-hero h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.fx-user-hero p { margin: 4px 0 10px; color: var(--fx-text-3); font-size: 13.5px; }
.fx-user-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.fx-profile { display: flex; flex-direction: column; gap: 16px; }
.fx-profile > .fx-panel,
.fx-profile > .fx-user-edit-grid { margin-bottom: 0; }
.fx-profile .fx-field { margin-bottom: 14px; }
.fx-profile .fx-field:last-child { margin-bottom: 0; }
.fx-profile .fx-panel-head .btn { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.fx-profile .fx-input-wrap .form-control { padding-right: 42px; }
.fx-profile-secret {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; padding: 12px 14px;
  background: var(--fx-surface-2);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
}
.fx-profile-secret code {
  flex: 1; min-width: 0;
  font-family: var(--fx-mono); font-size: 15px; font-weight: 700;
  letter-spacing: .14em; color: var(--fx-text);
}
.fx-copy-btn {
  flex: 0 0 34px; width: 34px; height: 34px; margin: 0; padding: 0;
  border: 0; border-radius: var(--fx-r-sm);
  background: transparent; color: var(--fx-text-3); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: color var(--fx-ease), background var(--fx-ease);
}
.fx-copy-btn:hover, .fx-copy-btn:focus-visible { color: var(--fx-accent); background: var(--fx-accent-weak); outline: none; }
.fx-copy-btn.is-copied { color: var(--fx-ok); }
.fx-backup-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  margin: 10px 0 8px;
}
.fx-backup-code {
  display: block;
  font-family: var(--fx-mono); font-size: 12.5px; font-weight: 650;
  text-align: center; padding: 8px 10px;
  background: var(--fx-surface-2);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-sm);
  color: var(--fx-text);
}
.fx-backup-copy { margin-top: 2px; }
.fx-2fa-steps {
  margin: 0; padding: 0 0 0 22px;
  display: flex; flex-direction: column; gap: 18px;
  color: var(--fx-text-2);
}
.fx-2fa-steps li { padding-left: 6px; }
.fx-2fa-steps strong { display: block; color: var(--fx-text); font-size: 13.5px; font-weight: 700; }
.fx-2fa-steps p { margin: 4px 0 0; font-size: 13px; color: var(--fx-text-3); line-height: 1.5; }
.fx-2fa-confirm { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; max-width: 280px; }
.fx-2fa-confirm .fx-field { margin-bottom: 0; }
.fx-2fa-disable {
  display: grid;
  grid-template-columns: minmax(0, 280px) auto;
  gap: 12px; align-items: end;
  margin-top: 16px; max-width: 520px;
}
.fx-2fa-disable .fx-field { margin-bottom: 0; }
.fx-2fa-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  background: var(--fx-surface-2);
}
.fx-2fa-banner.is-on {
  background: var(--fx-ok-weak);
  border-color: color-mix(in srgb, var(--fx-ok) 28%, transparent);
}
.fx-2fa-banner-icon {
  flex: 0 0 40px; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--fx-accent-weak); color: var(--fx-accent);
  font-size: 16px;
}
.fx-2fa-banner.is-on .fx-2fa-banner-icon { background: color-mix(in srgb, var(--fx-ok) 18%, transparent); color: var(--fx-ok); }
.fx-2fa-banner strong { display: block; font-size: 14px; font-weight: 700; }
.fx-2fa-banner p { margin: 3px 0 0; font-size: 13px; color: var(--fx-text-3); line-height: 1.45; }
.fx-2fa-banner form { margin-left: auto; flex: 0 0 auto; }
.fx-pref-table .fx-pref-col { width: 108px; text-align: center; }
.fx-pref-table td.fx-pref-col { vertical-align: middle; }
.fx-pref-table .fx-switch { justify-content: center; }
.fx-pref-event { display: flex; align-items: flex-start; gap: 12px; }
.fx-pref-event > i {
  flex: 0 0 32px; width: 32px; height: 32px; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: var(--fx-surface-3); color: var(--fx-text-3); font-size: 12.5px;
}
.fx-pref-event strong { display: block; font-size: 13.5px; font-weight: 650; color: var(--fx-text); }
.fx-pref-event em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--fx-text-3); }
.fx-profile .fx-log-status { text-transform: none; }

.fx-role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.fx-role-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
  background: var(--fx-surface-2);
  cursor: pointer;
  transition: border-color var(--fx-ease), background var(--fx-ease), box-shadow var(--fx-ease);
}
.fx-role-card:hover { border-color: var(--fx-border-strong); }
.fx-role-card:has(input:checked) {
  border-color: var(--fx-accent);
  background: var(--fx-accent-weak);
  box-shadow: 0 0 0 3px var(--fx-accent-ring);
}
.fx-role-card input {
  margin-top: 3px; flex: 0 0 auto;
  accent-color: var(--fx-accent);
}
.fx-role-card span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.fx-role-card em { font-style: normal; font-size: 12.5px; color: var(--fx-text-3); line-height: 1.45; font-weight: 500; }

.fx-role {
  display: inline-flex; align-items: center;
  padding: 3px 8px; border-radius: var(--fx-r-xs);
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: var(--fx-surface-3); color: var(--fx-text-2);
}
.fx-role--admin { background: var(--fx-accent-weak); color: var(--fx-accent); }
.fx-role--lead { background: #F3E8FF; color: #7C3AED; }
.fx-role--staff { background: var(--fx-surface-3); color: var(--fx-text-2); }
.fx-role--viewer { background: var(--fx-surface-3); color: var(--fx-text-3); }
.fx-role--client { background: var(--fx-ok-weak); color: var(--fx-ok); }
html[data-theme="dark"] .fx-role--lead { background: rgba(124, 58, 237, .18); color: #C4B5FD; }

.fx-filters .fx-filter-search { position: relative; flex: 2 1 240px; min-width: 0; }
.fx-filter-search > i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--fx-text-3); font-size: 12px; pointer-events: none;
}
.fx-filter-search .form-control { padding-left: 34px; }

.fx-panel--table { padding: 0; overflow: hidden; }
.fx-panel--table .fx-panel-head { padding: 14px 18px 12px; margin: 0; border-bottom: 1px solid var(--fx-border); }
.fx-panel--table .fx-table-wrap {
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
.fx-panel--table .fx-pager {
  margin: 0; padding: 12px 16px 14px;
  border-top: 1px solid var(--fx-border);
}
.fx-panel--table .fx-empty { padding: 40px 18px; }
.fx-panel--table .fx-bulk {
  margin: 0; border: 0; border-radius: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--fx-accent) 18%, var(--fx-border));
  padding: 10px 16px;
}
.fx-panel--table > form { margin: 0; }

.fx-ticket-filters .fx-filter-search { flex: 2 1 240px; }
.fx-ticket-filters > .form-select,
.fx-ticket-filters > .fx-select { flex: 1 1 132px; }
.fx-table--tickets .fx-col-check {
  width: 42px; text-align: center; padding-left: 16px; padding-right: 8px;
}
.fx-table--tickets .fx-col-check input { margin: 0; vertical-align: middle; }
.fx-ticket-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 42ch; }
.fx-ticket-cell a {
  font-weight: 650; color: var(--fx-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-ticket-cell a:hover { color: var(--fx-accent); }
.fx-ticket-cell .fx-muted {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px;
}
.fx-ticket-code {
  font-family: var(--fx-mono); font-size: 11.5px; font-weight: 700;
  color: var(--fx-accent); letter-spacing: .02em;
}
.fx-table--tickets .fx-log-who { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; }
.fx-table--tickets .fx-card-due { white-space: nowrap; }

.fx-table--logs td { vertical-align: top; padding-top: 12px; padding-bottom: 12px; }
.fx-log-when { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.fx-log-when strong { font-size: 13px; font-weight: 650; }
.fx-log-when span { font-size: 12px; color: var(--fx-text-3); font-variant-numeric: tabular-nums; }
.fx-log-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 650; text-transform: capitalize;
  white-space: nowrap;
}
.fx-log-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.fx-log-status.is-success { color: var(--fx-ok); }
.fx-log-status.is-failure { color: var(--fx-danger); }
.fx-log-status.is-info { color: var(--fx-text-3); }
.fx-log-cat {
  display: inline-block;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--fx-text-3); margin-bottom: 3px;
}
.fx-log-action {
  display: block;
  font-family: var(--fx-mono); font-size: 12px; font-weight: 650;
  color: var(--fx-text); background: none; padding: 0;
}
.fx-log-who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 550; }
.fx-log-msg {
  margin: 0; max-width: 52ch;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.fx-log-path {
  display: inline-block; margin-top: 4px;
  font-family: var(--fx-mono); font-size: 11px;
  color: var(--fx-text-3); background: var(--fx-surface-3);
  padding: 2px 7px; border-radius: 4px;
}

.fx-log-file {
  max-height: 380px; overflow: auto;
  background: var(--fx-surface-2);
}
.fx-log-line {
  display: grid;
  grid-template-columns: 72px 56px minmax(0, 1fr);
  gap: 10px; align-items: start;
  padding: 9px 16px;
  border-bottom: 1px solid var(--fx-border);
  font-size: 12.5px;
}
.fx-log-line:last-child { border-bottom: 0; }
.fx-log-line time {
  font-family: var(--fx-mono); font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--fx-text-3); padding-top: 2px;
}
.fx-log-level {
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  padding-top: 3px;
}
.fx-log-line.is-error .fx-log-level { color: var(--fx-danger); }
.fx-log-line.is-warn .fx-log-level { color: var(--fx-warn); }
.fx-log-line.is-info .fx-log-level { color: var(--fx-ok); }
.fx-log-line code {
  font-family: var(--fx-mono); font-size: 12px; font-weight: 650;
  background: none; padding: 0; color: var(--fx-text);
}
.fx-log-line p { margin: 2px 0 0; color: var(--fx-text-2); font-size: 12.5px; line-height: 1.45; }
.fx-log-line .fx-log-path { margin-top: 5px; }

.fx-log-tail {
  background: var(--fx-surface-2); color: var(--fx-text-2);
  border: 0;
  padding: 12px 16px;
  max-height: 260px; overflow: auto;
  font-family: var(--fx-mono); font-size: 11.5px; line-height: 1.6;
}
.fx-nav-overlay { display: none; }

/* —— Auth ————————————————————————————————————————————————————————— */
body.fx-guest { background: #070A11; }
body.fx-guest > .fx-auth-wrap {
  min-height: 100vh;
  background: var(--fx-bg);
}
.fx-auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.fx-auth-brand {
  position: relative; display: flex; align-items: center;
  padding: 56px 60px; color: #fff; overflow: hidden;
  background:
    radial-gradient(760px 420px at 12% 88%, rgba(126, 211, 33, .12), transparent 60%),
    radial-gradient(700px 460px at 88% 6%, rgba(10, 123, 255, .3), transparent 58%),
    linear-gradient(160deg, #0D1424 0%, #0A0F1B 55%, #06080E 100%);
}
.fx-auth-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
}
.fx-auth-brand-inner { position: relative; z-index: 1; max-width: 460px; }
.fx-auth-brand-lockup { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.fx-auth-brand-lockup img { width: 40px; height: 40px; display: block; }
.fx-auth-wordmark { font-family: var(--fx-display); font-size: 24px; font-weight: 800; letter-spacing: -.04em; color: #fff; }
.fx-auth-wordmark span { color: #6FA8FF; }
.fx-auth-brand-tag {
  font-family: var(--fx-display);
  font-size: 34px; font-weight: 800; line-height: 1.18; letter-spacing: -.035em;
  margin: 0 0 16px; color: #fff;
}
.fx-auth-brand-lede { margin: 0 0 34px; color: #94A2B8; font-size: 15px; line-height: 1.6; max-width: 42ch; }
.fx-auth-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.fx-auth-points li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0; color: #CBD5E1; font-size: 14px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.fx-auth-points li:last-child { border-bottom: 1px solid rgba(255,255,255,.07); }
.fx-auth-points i {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--fx-r-sm); font-size: 12px;
  background: rgba(255,255,255,.06); color: #7EB8FF;
  border: 1px solid rgba(255,255,255,.07);
}
.fx-auth-wrap {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 28px; background: var(--fx-bg);
}
.fx-auth-card {
  width: 100%; max-width: 420px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-xl);
  padding: 30px 30px 26px;
  box-shadow: var(--fx-sh-md);
}
.fx-auth-card-mark {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 22px;
}
.fx-auth-card-mark img { height: 34px; width: 34px; object-fit: contain; display: block; }
.fx-auth-head { margin-bottom: 22px; }
.fx-auth-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.fx-auth-sub { margin: 0; color: var(--fx-text-3); font-size: 13.5px; line-height: 1.55; }
.fx-auth-form { display: flex; flex-direction: column; gap: 15px; }
.fx-field { display: flex; flex-direction: column; margin: 0; }
.fx-auth-form .fx-input, .fx-auth-form .form-control { height: 42px; padding: 0 13px; font-size: 14px; }
.fx-input--code { letter-spacing: .3em; font-weight: 700; text-align: center; font-size: 17px; font-family: var(--fx-mono); }
.fx-input-wrap { position: relative; display: block; }
.fx-input-wrap .fx-input { padding-right: 42px; }
.fx-input-wrap .fx-input.has-leading { padding-left: 38px; }
.fx-input-leading {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--fx-text-3); font-size: 13px; pointer-events: none;
}
.fx-toggle-pass {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: var(--fx-r-sm);
  background: transparent; color: var(--fx-text-3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer; transition: color var(--fx-ease), background var(--fx-ease);
}
.fx-toggle-pass:hover, .fx-toggle-pass:focus-visible { color: var(--fx-accent); background: var(--fx-accent-weak); outline: none; }
.fx-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fx-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 550; color: var(--fx-text-2); cursor: pointer; }
.fx-check input { width: 15px; height: 15px; }
.fx-auth-link { font-size: 13px; font-weight: 650; }
.fx-auth-submit { height: 44px; margin-top: 5px; width: 100%; font-size: 14px; border-radius: var(--fx-r); }
.fx-auth-foot { margin: 20px 0 0; text-align: center; font-size: 13.5px; color: var(--fx-text-3); }
.fx-auth-legal { margin: 22px 0 0; font-size: 12px; color: var(--fx-text-3); }
.fx-auth-alert {
  border-radius: var(--fx-r-md); padding: 11px 13px;
  font-size: 13px; font-weight: 550; margin-bottom: 18px; border: 1px solid transparent;
}
.fx-auth-alert--danger { background: var(--fx-danger-weak); color: var(--fx-danger); border-color: color-mix(in srgb, var(--fx-danger) 26%, transparent); }
.fx-auth-alert--ok { background: var(--fx-ok-weak); color: var(--fx-ok); border-color: color-mix(in srgb, var(--fx-ok) 26%, transparent); }
.fx-auth-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 12px;
  background: var(--fx-accent-weak); color: var(--fx-accent);
  font-size: 16px;
}
.fx-auth-state { text-align: center; padding: 8px 0 4px; }
.fx-auth-state .fx-auth-title { margin-top: 12px; }
.fx-auth-state-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%; font-size: 20px;
  background: var(--fx-accent-weak); color: var(--fx-accent);
}
.fx-auth-state-icon.is-danger { background: var(--fx-danger-weak); color: var(--fx-danger); }
.fx-auth-invite-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: -6px 0 18px; padding: 12px 14px;
  background: var(--fx-surface-2);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md);
}
.fx-auth-invite-email {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 650; color: var(--fx-text);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fx-auth-invite-email i { color: var(--fx-text-3); font-size: 12px; }
.fx-auth-form .fx-hint { margin-top: 8px; text-align: center; }
.fx-auth-form .fx-input--code { height: 52px; font-size: 22px; letter-spacing: .36em; }

.fx-error {
  width: 100%; max-width: 440px;
  margin: 0 auto;
  padding: 42px 32px 32px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-xl);
  box-shadow: var(--fx-sh-md);
  text-align: center;
}
.fx-main .fx-error { margin-top: 36px; }
.fx-error-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 22px;
}
.fx-error-brand img { height: 34px; width: 34px; object-fit: contain; }
.fx-error-code {
  margin: 0;
  font-family: var(--fx-display);
  font-size: 72px; font-weight: 800; line-height: .9;
  letter-spacing: -.06em; color: var(--fx-accent);
}
.fx-error-title {
  margin: 14px 0 0;
  font-family: var(--fx-display);
  font-size: 22px; font-weight: 800; letter-spacing: -.03em;
}
.fx-error-text { margin: 8px 0 0; color: var(--fx-text-3); font-size: 14px; line-height: 1.55; }
.fx-error-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.fx-error-actions .btn { min-width: 140px; }

/* —— Dialogs ——————————————————————————————————————————————————————— */
.fx-modal {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 20px;
}
.fx-modal[hidden] { display: none; }
.fx-modal-backdrop {
  position: absolute; inset: 0; border: 0; padding: 0;
  background: rgba(8, 12, 20, .5);
  backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s ease;
  cursor: default;
}
.fx-modal-dialog {
  position: relative;
  width: 100%; max-width: 396px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-lg);
  box-shadow: var(--fx-sh-lg);
  padding: 26px 26px 22px;
  text-align: center;
  opacity: 0; transform: translateY(10px) scale(.97);
  transition: opacity .18s ease, transform .18s cubic-bezier(.2, .8, .3, 1);
}
.fx-modal.is-open .fx-modal-backdrop { opacity: 1; }
.fx-modal.is-open .fx-modal-dialog { opacity: 1; transform: none; }
.fx-modal-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; margin-bottom: 15px;
  border-radius: 50%; font-size: 19px;
  background: var(--fx-accent-weak); color: var(--fx-accent);
}
.fx-modal-dialog.is-danger .fx-modal-icon { background: var(--fx-danger-weak); color: var(--fx-danger); }
.fx-modal-dialog.is-warning .fx-modal-icon { background: var(--fx-warn-weak); color: var(--fx-warn); }
.fx-modal-dialog.is-success .fx-modal-icon { background: var(--fx-ok-weak); color: var(--fx-ok); }
.fx-modal-title { margin: 0; font-family: var(--fx-display); font-size: 17.5px; font-weight: 800; letter-spacing: -.02em; }
.fx-modal-text { margin: 8px 0 0; color: var(--fx-text-2); font-size: 13.5px; line-height: 1.6; }
.fx-modal-text[hidden] { display: none; }
.fx-modal-actions { display: flex; gap: 8px; margin-top: 22px; }
.fx-modal-actions .btn { flex: 1; height: 40px; }
.fx-modal-actions .btn[hidden] { display: none; }

/* —— Wait overlay ————————————————————————————————————————————————— */
.fx-wait {
  position: fixed; inset: 0; z-index: 140;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--fx-bg, #F4F6FA) 55%, rgba(8, 12, 20, .35));
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .16s ease;
}
.fx-wait.is-on { opacity: 1; pointer-events: auto; }
.fx-wait-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  min-width: 160px; padding: 22px 26px 18px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-lg);
  box-shadow: var(--fx-sh-lg);
}
.fx-wait-spin {
  width: 32px; height: 32px;
  border: 3px solid var(--fx-border);
  border-top-color: var(--fx-accent, var(--fx-blue, #0A7BFF));
  border-radius: 50%;
  animation: fx-spin .7s linear infinite;
}
.fx-wait-card p {
  margin: 0; color: var(--fx-text-2);
  font-size: 13.5px; font-weight: 600;
}
@keyframes fx-spin { to { transform: rotate(360deg); } }
.btn.is-busy, button.is-busy, .fx-icon-btn.is-busy {
  pointer-events: none; opacity: .72;
}
.btn.is-busy .fa-spinner { margin-right: 6px; }
[aria-busy="true"].fx-field,
[aria-busy="true"].form-select,
#fx-custom-fields[aria-busy="true"] {
  opacity: .55; pointer-events: none;
  position: relative;
}

/* —— Reports ————————————————————————————————————————————————————— */
.fx-report-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.fx-report-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-md); padding: 18px;
  box-shadow: var(--fx-sh-xs); color: var(--fx-text);
  transition: border-color var(--fx-ease), box-shadow var(--fx-ease), transform var(--fx-ease);
}
.fx-report-card:hover { color: var(--fx-text); border-color: var(--fx-border-strong); box-shadow: var(--fx-sh-md); transform: translateY(-2px); }
.fx-report-card h2 { margin: 0; font-size: 15px; font-weight: 700; }
.fx-report-card p { margin: 0; color: var(--fx-text-3); font-size: 12.5px; line-height: 1.45; }
.fx-report-card-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--fx-r-sm);
  background: var(--fx-accent-weak); color: var(--fx-accent);
  font-size: 14px;
}
.fx-report-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 0;
}
.fx-report-tabs a {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--fx-border); border-radius: 99px;
  background: var(--fx-surface); color: var(--fx-text-2);
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.fx-report-tabs a i { font-size: 11px; color: var(--fx-text-3); }
.fx-report-tabs a:hover { color: var(--fx-text); border-color: var(--fx-border-strong); }
.fx-report-tabs a.is-active {
  background: var(--fx-accent-weak); border-color: transparent; color: var(--fx-accent);
}
.fx-report-tabs a.is-active i { color: var(--fx-accent); }
.fx-range { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-report-filters .fx-range { flex: 1 1 100%; }
.fx-chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border: 1px solid var(--fx-border); border-radius: 99px;
  background: var(--fx-surface); color: var(--fx-text-2);
  font-size: 12.5px; font-weight: 650;
}
.fx-chip:hover { color: var(--fx-text); border-color: var(--fx-border-strong); }
.fx-chip.is-on { background: var(--fx-accent-weak); border-color: transparent; color: var(--fx-accent); }
.fx-field--date { margin: 0; min-width: 150px; }
.fx-field--date span { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fx-text-3); }
.fx-stat-grid--report,
.fx-dash-kpis .fx-stat-grid--report {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.fx-grid-2 > .fx-panel--wide { grid-column: 1 / -1; }
.fx-chart--wide { height: 280px; }
.fx-page-header .fx-eyebrow a { color: inherit; }
.fx-page-header .fx-eyebrow a:hover { color: var(--fx-accent); }

/* —— Utilities ———————————————————————————————————————————————————— */
.fx-inline-form { display: inline-flex; }

/* —— Responsive ——————————————————————————————————————————————————— */
@media (max-width: 1180px) {
  .fx-ticket-grid { grid-template-columns: 1fr; }
  .fx-ticket-grid > aside .fx-panel { position: static; }
}
@media (max-width: 1100px) {
  .fx-cal-layout { grid-template-columns: 1fr; }
  .fx-dash-kpis .fx-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .fx-sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: none; }
  .fx-sidebar.is-open { transform: none; box-shadow: var(--fx-sh-lg); }
  .fx-shell { margin-left: 0; }
  .fx-nav-toggle { display: inline-flex; }
  .fx-rail-toggle { display: none; }
  .fx-nav-overlay.is-on { display: block; position: fixed; inset: 0; background: rgba(6, 9, 15, .5); z-index: 25; }
  .fx-main { padding: 20px 16px 24px; }
  .fx-footer-inner { padding: 14px 16px; }
  .fx-topbar { padding: 0 14px; }
  .fx-filters > * { flex: 1 1 100%; }
  .fx-report-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .fx-settings-layout { grid-template-columns: 1fr; }
  .fx-settings-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .fx-settings-nav a { flex: 0 0 auto; align-items: center; }
  .fx-settings-nav a em { display: none; }
  .fx-settings-nav a i { margin-top: 0; }
  .fx-invite-form, .fx-invite-form.is-no-client, .fx-team-add.fx-invite-form { grid-template-columns: 1fr; }
  .fx-user-edit-grid, .fx-ticket-create { grid-template-columns: 1fr; }
  .fx-role-cards { grid-template-columns: 1fr; }
  .fx-2fa-banner { flex-wrap: wrap; }
  .fx-2fa-banner form { margin-left: 0; width: 100%; }
  .fx-2fa-banner form .btn { width: 100%; }
  .fx-2fa-disable { grid-template-columns: 1fr; max-width: none; }
}
@media (max-width: 900px) {
  .fx-auth-shell { grid-template-columns: 1fr; }
  .fx-auth-brand { display: none; }
  .fx-auth-wrap { padding: 28px 18px 36px; }
  .fx-auth-card { border-radius: var(--fx-r-lg); padding: 26px 22px 22px; box-shadow: var(--fx-sh-sm); }
  .fx-auth-card-mark { text-align: center; justify-content: center; }
  .fx-auth-card-mark img { margin: 0; height: 36px; width: 36px; }
  .fx-auth-head { text-align: center; }
  .fx-auth-badge { margin-left: auto; margin-right: auto; }
  .fx-error { padding: 32px 22px 26px; }
}
@media (max-width: 640px) {
  .fx-page-title { font-size: 21px; }
  .fx-footer-inner { flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; }
  .fx-footer-tag { text-align: left; }
  .fx-footer-meta { justify-content: flex-start; }
  .fx-stat-grid, .fx-stat-grid--8 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fx-stat { padding: 12px 13px; gap: 10px; }
  .fx-stat-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: 12.5px; }
  .fx-stat-n { font-size: 21px; }
  .fx-search { max-width: none; }
  .fx-bell-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--fx-topbar) + 8px); width: auto; }
  .btn, .fx-btn-primary, .fx-btn-ghost, .fx-icon-btn { min-height: 40px; }
  .fx-cal { min-width: 0; }
  .fx-cal-cell { min-height: 88px; }
  .fx-cal-ev-title { display: none; }
  .fx-tabs { display: flex; width: 100%; overflow-x: auto; }
  .fx-panel { padding: 14px 14px 16px; }
  .fx-panel > .fx-table { margin: 0 -14px -16px; width: calc(100% + 28px); }
  .fx-table th, .fx-table td { padding: 10px 12px; }
  .fx-settings-foot { flex-direction: column; align-items: stretch; }
  .fx-settings-foot .btn { width: 100%; }
  .fx-logo-row { flex-direction: column; }
  .fx-parent-banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .fx-page-header { flex-direction: column; align-items: stretch; }
  .fx-page-actions .btn { width: 100%; }
  .fx-page-actions.fx-cal-nav .btn { width: auto; flex: 1; }
  .fx-auth-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .fx-dash-item { grid-template-columns: 1fr; }
  .fx-dash-item-side { justify-content: flex-start; }
  .fx-inbox-item { grid-template-columns: auto minmax(0, 1fr); }
  .fx-inbox-when { grid-column: 2; }
}

img.fx-avatar { object-fit: cover; padding: 0; }
.fx-chip-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.fx-chip-nav a, .fx-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  border: 1px solid var(--fx-border); background: var(--fx-surface);
  color: var(--fx-text-2); font-size: 13px; font-weight: 650; text-decoration: none;
}
.fx-chip-nav a.is-active, .fx-chip:hover, .fx-chip-nav a:hover {
  border-color: var(--fx-accent); color: var(--fx-accent); background: var(--fx-accent-weak);
}
.fx-saved-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: -6px 0 16px;
}
.fx-save-filter { display: flex; gap: 8px; align-items: center; }
.fx-save-filter .form-control { width: 160px; }
.fx-chip-del { display: inline-flex; }
.fx-table-actions { display: flex; gap: 8px; justify-content: flex-end; }
.fx-mention-box {
  position: absolute; left: 0; right: 0; z-index: 20;
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r); box-shadow: 0 8px 24px rgb(0 0 0 / .12);
  padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.fx-mention-box[hidden] { display: none !important; }
.fx-mention-box button {
  display: flex; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: var(--fx-r); color: var(--fx-text); font-weight: 650;
}
.fx-mention-box button:hover { background: var(--fx-surface-2); }
.fx-mention-box span { color: var(--fx-text-3); font-weight: 500; font-size: 12px; }
.fx-workflow-roles {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 0 16px 12px; font-size: 13px; color: var(--fx-text-2);
}
.fx-workflow-table th, .fx-workflow-table td { text-align: center; }
.fx-workflow-table th:first-child, .fx-workflow-table td:first-child { text-align: left; }

.fx-inline-form {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 12px;
}
.fx-inline-form .form-control,
.fx-inline-form .form-select { min-width: 140px; flex: 1 1 140px; }
.fx-inline-form .form-control[type="number"] { max-width: 110px; flex: 0 0 110px; }
.fx-inline-form .form-control[type="date"] { max-width: 170px; flex: 0 0 170px; }
.fx-col-count.is-wip { color: var(--fx-warn, #F59E0B); }
.fx-col-body.is-wip-over {
  box-shadow: inset 0 0 0 1.5px var(--fx-warn, #F59E0B);
}
.fx-wiki {
  display: grid; grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 16px; align-items: start;
}
.fx-wiki-nav {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--fx-surface); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r); padding: 8px;
}
.fx-wiki-nav a {
  padding: 8px 10px; border-radius: var(--fx-r);
  color: var(--fx-text-2); font-weight: 650; text-decoration: none;
}
.fx-wiki-nav a.is-active, .fx-wiki-nav a:hover {
  background: var(--fx-accent-weak); color: var(--fx-accent);
}
.fx-wiki-nav a.fx-wiki-new {
  margin-top: 4px;
  border: 1px dashed var(--fx-border);
  color: var(--fx-text-3);
  font-weight: 650;
}
.fx-wiki-nav a.fx-wiki-new:hover,
.fx-wiki-nav a.fx-wiki-new.is-active {
  border-style: solid;
  border-color: var(--fx-accent);
}
.fx-wiki-form { padding: 18px; }
.fx-wiki-prose h2, .fx-editor-area h2 {
  font-family: var(--fx-display, 'Plus Jakarta Sans', Inter, sans-serif);
  font-size: 1.35rem; font-weight: 800; margin: 1.1em 0 .4em; color: var(--fx-text);
}
.fx-wiki-prose h3, .fx-editor-area h3 {
  font-size: 1.12rem; font-weight: 750; margin: 1em 0 .35em; color: var(--fx-text);
}
.fx-wiki-prose h4, .fx-editor-area h4 {
  font-size: 1rem; font-weight: 700; margin: .9em 0 .3em;
}
.fx-wiki-prose p, .fx-editor-area p { margin: 0 0 .75em; }
.fx-wiki-prose ul, .fx-wiki-prose ol,
.fx-editor-area ul, .fx-editor-area ol { margin: 0 0 .85em; padding-left: 1.25em; }
.fx-wiki-prose li, .fx-editor-area li { margin: .2em 0; }
.fx-wiki-prose blockquote, .fx-editor-area blockquote {
  margin: 0 0 .85em; padding: 8px 12px;
  border-left: 3px solid var(--fx-accent);
  background: var(--fx-surface-2); color: var(--fx-text-2); border-radius: 0 var(--fx-r-sm) var(--fx-r-sm) 0;
}
.fx-wiki-prose pre, .fx-editor-area pre {
  margin: 0 0 .85em; padding: 12px 14px;
  background: var(--fx-surface-2); border: 1px solid var(--fx-border);
  border-radius: var(--fx-r-sm); overflow-x: auto;
  font-family: var(--fx-mono, ui-monospace, monospace); font-size: 13px;
}
.fx-wiki-prose code, .fx-editor-area code {
  font-family: var(--fx-mono, ui-monospace, monospace); font-size: .92em;
}
.fx-wiki-prose a, .fx-editor-area a { color: var(--fx-accent); }
.fx-wiki-prose hr, .fx-editor-area hr {
  border: 0; border-top: 1px solid var(--fx-border); margin: 1.1em 0;
}

.fx-editor {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-r);
  background: var(--fx-surface);
  overflow: hidden;
}
.fx-editor-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--fx-border);
  background: var(--fx-surface-2);
}
.fx-editor-bar button {
  width: 32px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--fx-text-2);
  border-radius: var(--fx-r-sm); cursor: pointer; font: inherit;
}
.fx-editor-bar button:hover,
.fx-editor-bar button:focus-visible {
  background: var(--fx-surface-3); color: var(--fx-text); outline: none;
}
.fx-editor-h { font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.fx-editor-sep {
  width: 1px; height: 18px; background: var(--fx-border); margin: 0 4px;
}
.fx-editor-area {
  min-height: 280px; max-height: 640px; overflow: auto;
  padding: 14px 16px;
  color: var(--fx-text);
  outline: none;
}
.fx-editor-area:focus { box-shadow: inset 0 0 0 2px var(--fx-accent-ring); }
.fx-gantt { overflow-x: auto; border: 1px solid var(--fx-border); border-radius: var(--fx-r); background: var(--fx-surface); }
.fx-gantt-head, .fx-gantt-row {
  display: grid; grid-template-columns: minmax(180px, 240px) minmax(420px, 1fr);
  border-bottom: 1px solid var(--fx-border);
}
.fx-gantt-head { background: var(--fx-surface-2); font-size: 12px; font-weight: 700; color: var(--fx-text-3); }
.fx-gantt-label {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; min-width: 0; color: var(--fx-text); text-decoration: none;
}
.fx-gantt-label strong { font-family: var(--fx-mono); font-size: 11px; color: var(--fx-accent); }
.fx-gantt-label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.fx-gantt-scale, .fx-gantt-track { position: relative; min-height: 44px; }
.fx-gantt-scale span {
  position: absolute; top: 12px; transform: translateX(-50%);
  white-space: nowrap; font-size: 11px;
}
.fx-gantt-bar {
  position: absolute; top: 12px; height: 18px; border-radius: 99px;
  min-width: 12px; opacity: .9;
}
.fx-gantt-bar:hover { opacity: 1; filter: brightness(1.08); }
@media (max-width: 800px) {
  .fx-wiki { grid-template-columns: 1fr; }
  .fx-gantt-head, .fx-gantt-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
