:root {
  /* shadcn-ish tokens (light) */
  --page-bg: #f6f7fb;
  --panel: #ffffff;
  --panel2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --brand: #7ac141;
  --link: #2563eb;
  --danger: #dc2626;
  --border: rgba(15, 23, 42, 0.12);
  --ring: rgba(37, 99, 235, 0.35);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.10);

  --subtle-bg: rgba(15, 23, 42, 0.04);
  --overlay-bg: rgba(15, 23, 42, 0.70);
  --overlay-bg-soft: rgba(15, 23, 42, 0.45);

  --glass-bg-soft: rgba(255,255,255,0.5);
  --glass-bg-muted: rgba(255,255,255,0.55);
  --glass-bg: rgba(255,255,255,0.65);
  --glass-bg-hover: rgba(255,255,255,0.9);
  --glass-bg-strong: rgba(255,255,255,0.92);
  --glass-border: rgba(15, 23, 42, 0.12);
  --glass-border-strong: rgba(15, 23, 42, 0.22);

  --btn-bg: #0f172a;
  --btn-bg-hover: #111c33;
  --btn-text: #ffffff;

  --alert-danger-bg: rgba(220,38,38,0.08);
  --alert-danger-border: rgba(220,38,38,0.35);
  --alert-danger-text: #7f1d1d;

  --alert-success-bg: rgba(22,163,74,0.08);
  --alert-success-border: rgba(22,163,74,0.35);
  --alert-success-text: #14532d;

  --liked: #1d4ed8;

  --radius-lg: 18px;
  --radius-xl: 22px;

  --header-inner-h: 52px;
  --header-h: 76px;
  --sidebar-w: 260px;
  --page-max: 1200px;
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);
  --header-h-safe: calc(var(--header-h) + var(--safe-top));

  --corp-bg: #ffffff;
  --corp-text: var(--text);
  --corp-muted: var(--muted);
  --corp-border: rgba(15, 23, 42, 0.10);

  --menu-bg: var(--panel);
  --menu-hover: rgba(15, 23, 42, 0.05);

  --bg-glow: radial-gradient(1200px 600px at 12% 0%, rgba(37,99,235,0.06), transparent 55%),
             radial-gradient(900px 520px at 90% 10%, rgba(122,193,66,0.18), transparent 50%);
}

html { color-scheme: light; }

html[data-theme="dark"] {
  color-scheme: dark;

  --page-bg: #0b1220;
  --panel: #0f172a;
  --panel2: #111c33;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --link: #93c5fd;
  --danger: #ef4444;
  --border: rgba(148,163,184,0.22);
  --ring: rgba(96,165,250,0.55);
  --shadow: 0 16px 40px rgba(0,0,0,0.55);
  --shadow-sm: 0 6px 18px rgba(0,0,0,0.45);

  --subtle-bg: rgba(148,163,184,0.08);
  --overlay-bg: rgba(0,0,0,0.72);
  --overlay-bg-soft: rgba(0,0,0,0.55);

  --glass-bg-soft: rgba(15,23,42,0.55);
  --glass-bg-muted: rgba(15,23,42,0.50);
  --glass-bg: rgba(15,23,42,0.62);
  --glass-bg-hover: rgba(15,23,42,0.82);
  --glass-bg-strong: rgba(15,23,42,0.88);
  --glass-border: rgba(148,163,184,0.22);
  --glass-border-strong: rgba(148,163,184,0.32);

  --btn-bg: #2563eb;
  --btn-bg-hover: #1d4ed8;
  --btn-text: #ffffff;

  --alert-danger-bg: rgba(248,113,113,0.14);
  --alert-danger-border: rgba(248,113,113,0.35);
  --alert-danger-text: #fecaca;

  --alert-success-bg: rgba(34,197,94,0.14);
  --alert-success-border: rgba(34,197,94,0.35);
  --alert-success-text: #bbf7d0;

  --liked: #93c5fd;

  --corp-bg: rgba(15,23,42,0.78);
  --corp-border: rgba(148,163,184,0.18);
  --menu-bg: rgba(15,23,42,0.78);
  --menu-hover: rgba(148,163,184,0.12);

  --bg-glow: radial-gradient(1200px 680px at 12% 0%, rgba(59,130,246,0.18), transparent 58%),
             radial-gradient(900px 520px at 90% 10%, rgba(122,193,66,0.12), transparent 52%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--page-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-glow);
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

#corpheader {
  background: transparent;
  color: var(--corp-text);
  border-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1300;
  height: var(--header-h-safe);
  padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) 12px calc(12px + var(--safe-left));
}
.corpheader__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  height: var(--header-inner-h);
  padding: 0 16px;
  gap: 14px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--corp-border);
  background: var(--corp-bg);
  box-shadow: none;
  overflow: visible;
}
.corpheader__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--corp-text);
  text-decoration: none;
  font-weight: 950;
  letter-spacing: 0.2px;
}
.brand:hover { text-decoration: none; }
.brand__logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}
.brand__logo--dark { display: none; }
html[data-theme="dark"] .brand__logo--light { display: none; }
html[data-theme="dark"] .brand__logo--dark { display: block; }
.brand__text {
  display: inline-flex;
  align-items: center;
  height: 28px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(1px);
}
.corpheader__links {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  white-space: nowrap;
}
.top-menu,
a.top-menu {
  color: var(--corp-muted);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid var(--corp-border);
  background: var(--glass-bg-soft);
  padding: 6px 8px;
  border-radius: 999px;
  font-weight: 800;
}
a.top-menu:hover {
  text-decoration: none;
  color: var(--corp-text);
  background: var(--glass-bg-hover);
}

.corpheader__right {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  justify-self: end;
  min-width: 0;
}
.corpheader__user { color: var(--corp-muted); font-size: 12px; font-weight: 800; }
.corpheader__logout { margin: 0; }
.corpheader__logout .logout-icon { display: none; }
.linklike {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 8px 10px;
  cursor: pointer;
  color: var(--corp-text);
  font-size: 13px;
  font-weight: 900;
  border-radius: 12px;
}
.linklike:hover { text-decoration: none; background: var(--glass-bg-hover); }
.linklike:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  padding: 6px 8px;
  min-width: 48px;
}
.theme-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  opacity: 0.45;
}
.theme-toggle__icon svg { width: 16px; height: 16px; display: block; }
html[data-theme="dark"] .theme-toggle__icon--moon { opacity: 1; }
html[data-theme="dark"] .theme-toggle__icon--sun { opacity: 0.35; }
html:not([data-theme="dark"]) .theme-toggle__icon--sun { opacity: 1; }
html:not([data-theme="dark"]) .theme-toggle__icon--moon { opacity: 0.35; }
.theme-toggle__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--corp-muted);
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
a.icon-btn:hover { text-decoration: none; }
.icon-btn:hover { background: var(--glass-bg-hover); color: var(--corp-text); }
.icon-btn--danger { color: var(--danger); }
.icon-btn--danger:hover { background: rgba(220,38,38,0.10); color: var(--danger); }
.icon-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.icon-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.like-group {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--glass-bg);
  color: var(--corp-muted);
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.like-group:hover { background: var(--glass-bg-hover); color: var(--corp-text); }
.like-group.is-liked {
  background: rgba(37,99,235,0.10);
  border-color: rgba(37,99,235,0.35);
  color: var(--liked);
}

.like-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  color: inherit;
  line-height: 1;
}
.like-toggle:disabled { opacity: 0.55; cursor: not-allowed; }
.like-toggle:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.like-toggle__count {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-left: 1px solid var(--glass-border);
  font-weight: 800;
}
.like-toggle__count a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}
.like-toggle__count a:hover { text-decoration: underline; }
.like-group.is-liked .like-toggle__count { border-left-color: rgba(37,99,235,0.35); }

.like-toggle__icon,
.icon-btn__icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .theme-icon { display: none; }
.theme-toggle .theme-icon--moon { display: block; }
html[data-theme="dark"] .theme-toggle .theme-icon--moon { display: none; }
html[data-theme="dark"] .theme-toggle .theme-icon--sun { display: block; }

.mobile-menu-trigger {
  display: none;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  color: var(--corp-text);
  align-items: center;
  justify-content: center;
}
.mobile-menu-trigger:hover { background: rgba(255,255,255,0.15); }
.mobile-menu-trigger:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.burger-icon {
  width: 18px;
  height: 2px;
  background: #f8fafc;
  border-radius: 999px;
  box-shadow: 0 -6px 0 #f8fafc, 0 6px 0 #f8fafc;
  display: block;
}

#layout {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: calc(100vh - var(--header-h-safe));
  gap: 14px;
  padding: 0 calc(14px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(14px + var(--safe-left));
  max-width: none;
  margin: 0;
}

#menu {
  width: var(--sidebar-w);
  background: var(--menu-bg);
  padding: 14px 12px;
  position: sticky;
  top: var(--header-h-safe);
  height: calc(100vh - var(--header-h-safe));
  overflow-y: auto;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: none;
  padding-bottom: calc(14px + var(--safe-bottom));
}
#menu .menuitem {
  display: block;
  border-bottom: 0;
}
#menu .menuitem a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  transition: none;
}
#menu .menuitem a:hover { background: var(--menu-hover); }
#menu .menuitem a.is-active {
  background: rgba(246, 199, 0, 0.18);
  box-shadow: inset 3px 0 0 rgba(246, 199, 0, 0.95);
  font-weight: 900;
}

.menu-extlinks { display: none; }
.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}
.menu-caption {
  padding: 8px 12px 6px;
  font-size: 11px;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#bodycont {
  flex: 1;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  min-width: 0;
}
.page {
  max-width: var(--page-max);
  margin: 0;
}
body.is-guest .page {
  margin-left: auto;
  margin-right: auto;
}

.welcome-message {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

.notification-info {
  font-size: 14px;
  margin: 8px 0 0;
  padding: 0;
  color: var(--muted);
  font-weight: 800;
}

.notification-list {
  margin: 8px 0 0 18px;
  padding: 0;
}
.notification-list li {
  margin: 4px 0;
  line-height: 1.35;
}

.clear-link {
  margin-top: 10px;
  margin-bottom: 18px;
}
.clear-link__btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.clear-link__btn:hover { text-decoration: underline; }

.page-title {
  font-size: 22px;
  font-weight: 900;
  margin: 18px 0 8px;
  padding: 0;
  color: var(--text);
  letter-spacing: 0.2px;
}

.page-meta {
  margin: -2px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.comment-count {
  color: var(--muted);
  font-size: 13px;
  margin-left: 6px;
  font-weight: 700;
}
.comms-table .col-dateupdated {
  white-space: nowrap;
  color: var(--muted);
  font-weight: 700;
}
.data-table.accounts-table { table-layout: fixed; }
.accounts-table thead th,
.accounts-table tbody td {
  padding: 6px 7px;
}
.accounts-table tbody td { overflow-wrap: break-word; word-break: break-word; }
.accounts-table td a { overflow-wrap: break-word; word-break: break-word; }
.accounts-table .col-contact { width: 240px; }
.accounts-table .col-count { width: 60px; }
.accounts-table .col-status { width: 156px; text-align: right; }
.accounts-table .account-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.accounts-table .account-actions form { margin: 0; }
.accounts-table .account-actions .btn--small { font-size: 10px; padding: 5px 8px; border-radius: 10px; min-width: 92px; text-align: center; }
.accounts-table .btn--small { padding: 7px 10px; border-radius: 10px; }

body.menu-open::before {
  content: "";
  position: fixed;
  inset: var(--header-h-safe) 0 0 0;
  background: var(--overlay-bg-soft);
  z-index: 1200;
}

@media (max-width: 1100px) {
  .corpheader__links { display: none; }
  .corpheader__user { display: inline-flex; }
  .menu-extlinks { display: block; }
  .corpheader__logout .logout-text { display: none; }
  .corpheader__logout .logout-icon { display: inline-flex; }

  .mobile-menu-trigger { display: inline-flex; }

  #menu {
    position: fixed;
    top: var(--header-h-safe);
    left: 0;
    height: calc(100vh - var(--header-h-safe));
    width: min(86vw, var(--sidebar-w));
    z-index: 1250;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: var(--shadow);
  }

  body.menu-open #menu { transform: translateX(0); }

  #layout { display: block; }
  #bodycont { padding: 18px calc(14px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(14px + var(--safe-left)); }
  .page { max-width: none; }
}
.bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.bell:hover { background: rgba(255,255,255,0.12); }
.bell:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.bell__icon {
  width: 20px;
  height: 20px;
  display: block;
  opacity: 0.96;
}
.bell__badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-weight: 900;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  border: 2px solid var(--panel);
}
.bell__dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--danger);
  border: 2px solid var(--panel);
}

.notif { position: relative; }
.notif-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
  z-index: 1400;
}
.notif-pop__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.notif-pop__title {
  font-weight: 900;
  letter-spacing: 0.2px;
}
.notif-pop__viewall {
  color: var(--link);
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
}
.notif-pop__viewall:hover { text-decoration: underline; }
.notif-pop__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.notif-pop__empty {
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.notif-pop__list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.notif-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  text-decoration: none;
}
.notif-item:hover { border-color: var(--glass-border-strong); }
.notif-item__label {
  font-weight: 800;
  font-size: 13px;
  line-height: 1.25;
}
.notif-item--urgent {
  border-color: var(--danger);
}
.notif-item--urgent .notif-item__label {
  color: var(--danger);
}
.notif-item__count {
  flex: 0 0 auto;
  min-width: 28px;
  text-align: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(246,199,0,0.9);
  color: #111111;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid var(--glass-border);
}

.notifications-page {
  display: grid;
  gap: 16px;
}
.notifications-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.notifications-section {
  display: grid;
  gap: 10px;
}
.notifications-section h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}
.notifications-empty {
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  background: var(--panel);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 18px;
}

.card--narrow {
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.h1 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.muted { color: var(--muted); margin: 0; }

.prose h2 {
  margin: 18px 0 8px;
  font-size: 16px;
  letter-spacing: 0.2px;
}
.prose p { margin: 0 0 12px; }
.prose ul,
.prose ol {
  margin: 0 0 12px 18px;
  padding: 0;
}
.prose li { margin: 4px 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--glass-bg-muted);
}

.form { display: grid; gap: 12px; margin-top: 12px; }
.field { display: grid; gap: 6px; }
.field span { color: var(--muted); font-size: 13px; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.check span { color: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]) {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):focus { border-color: rgba(37,99,235,0.55); box-shadow: 0 0 0 4px rgba(37,99,235,0.16); }

input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed var(--glass-border-strong);
  background: var(--glass-bg);
}
input[type="file"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  accent-color: var(--link);
}
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
select:focus { border-color: rgba(37,99,235,0.55); box-shadow: 0 0 0 4px rgba(37,99,235,0.16); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid #1b3515;
  border-radius: 11px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #2f5a25 0%, #24461c 100%);
  color: #f8fff2;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(19, 46, 12, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #386b2b 0%, #2a5321 100%);
}
.btn--danger:hover {
  background: linear-gradient(180deg, #c93838 0%, #a52323 100%);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.alert-danger {
  border-color: var(--alert-danger-border);
  background: var(--alert-danger-bg);
  color: var(--alert-danger-text);
}

.alert-success {
  border-color: var(--alert-success-border);
  background: var(--alert-success-bg);
  color: var(--alert-success-text);
}

.grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  background: var(--panel2);
}
.tile h2 { margin: 0 0 6px; font-size: 16px; }
.tile p { margin: 0 0 10px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.pagehead {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}

.pagehead__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text);
  border-color: rgba(246, 199, 0, 0.45);
  background: rgba(246, 199, 0, 0.18);
  font-weight: 900;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filters {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}
.filters.filters--simple {
  align-items: end;
}
.filters.filters--single {
  align-items: end;
}
.filters--clientdb .filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-start;
}
.filters--io-orders .filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  justify-content: flex-start;
}
.field--inline span { font-size: 12px; }

#projects-results.is-loading,
#content-results.is-loading,
#accounts-results.is-loading,
#vendors-results.is-loading,
#jobs-results.is-loading,
#jobtracker-results.is-loading,
#jt-reqarch-results.is-loading,
#files-results.is-loading,
#io-results.is-loading,
#io-contra-results.is-loading,
#retail-schedules-results.is-loading,
#suggestions-results.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

mark.hl {
  background: rgba(246, 199, 0, 0.35);
  padding: 0 2px;
  border-radius: 4px;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 12px;
}
.form-row {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.form-row.form-row--file {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.btn--small {
  width: auto;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 12px;
}
.btn--ghost {
  background: #f3f8ec;
  border: 1px solid rgba(122, 193, 66, 0.55);
  color: #1f3217;
  box-shadow: none;
}
.btn--ghost:hover {
  filter: none;
  background: #e8f1dc;
}
.btn--ghost.is-disabled {
  opacity: 1;
  color: #4a5a42;
  background: #eef3e6;
  border-color: rgba(122, 193, 66, 0.35);
  cursor: not-allowed;
  pointer-events: none;
}
.btn.is-disabled {
  opacity: 1;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--danger {
  background: linear-gradient(180deg, #b32828 0%, #8e1d1d 100%);
  border-color: #6f1616;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(120, 16, 16, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn--table {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 9px;
  min-height: 26px;
  min-width: 72px;
  line-height: 1;
  width: auto;
}

.list {
  display: grid;
  gap: 10px;
}

.anon-board-item {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  overflow: hidden;
}
.anon-board-item:hover { border-color: rgba(17,17,17,0.22); }

.anon-board-item__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}
.anon-board-item__summary::-webkit-details-marker { display: none; }
.anon-board-item__summary::marker { content: ""; }
.anon-board-item__summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.anon-board-item__summary-main { min-width: 0; }
.anon-board-item__summary-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--muted);
}
.anon-board-item__chevron {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 140ms ease;
}
.anon-board-item[open] .anon-board-item__chevron { transform: rotate(180deg); }
.anon-board-item .list-item__badges { margin-top: 8px; }

.anon-board-item__body {
  border-top: 1px solid var(--border);
  padding: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.anon-board-item__layout { display: grid; gap: 12px; }
.anon-board-item__section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--glass-bg);
}
.anon-board-item__section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.anon-board-item__section-title { margin: 0 0 8px; font-size: 14px; font-weight: 900; }
.anon-board-item__section-body { overflow-wrap: anywhere; }

.anon-thread { display: grid; gap: 12px; }
.anon-thread__replies-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.anon-thread__replies-title { margin: 0; font-size: 14px; font-weight: 900; }
.anon-thread__replies .comment-list { margin-top: 10px; }
.anon-thread__replies .comment-form { margin-top: 10px; }
.anon-thread__reply { margin-left: 24px; background: var(--subtle-bg); }

@media (min-width: 980px) {
  .anon-board-item__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    align-items: start;
  }
}

.list-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
}
.list-item:hover { border-color: rgba(17,17,17,0.22); }
.list-item__title {
  font-weight: 800;
  margin-bottom: 6px;
  line-height: 1.25;
}
.list-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.dot { opacity: 0.6; }
.list-item__badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge--new {
  background: rgba(246, 199, 0, 0.22);
  border-color: rgba(246, 199, 0, 0.52);
  color: #111111;
  font-weight: 900;
}

.list-item.is-new {
  border-color: rgba(246, 199, 0, 0.45);
  background: rgba(246, 199, 0, 0.06);
}
.list-item.is-new:hover {
  border-color: rgba(246, 199, 0, 0.60);
  background: rgba(246, 199, 0, 0.10);
}
.badge--danger {
  color: var(--danger);
  border-color: var(--alert-danger-border);
  background: var(--alert-danger-bg);
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.todo-meta strong { color: var(--text); }
.todo-deadline.is-overdue { color: var(--danger); font-weight: 800; }
.todo-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.todo-description { margin-top: 10px; white-space: pre-wrap; }
.todo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.todo-help {
  margin: 6px 0 14px;
  color: var(--muted);
  font-weight: 600;
}
.todo-deadline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.todo-deadline-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  width: 100%;
}
.todo-toggle {
  display: inline-flex;
  font-weight: 800;
  color: var(--link);
  text-decoration: none;
  margin-bottom: 10px;
}
.todo-toggle:hover { text-decoration: underline; }

.todo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}
.todo-toolbar__label {
  font-weight: 800;
  color: var(--muted);
  margin-right: 6px;
}
.todo-toolbar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.todo-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.todo-table thead th {
  background: var(--panel2);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 900;
}
.todo-table tbody td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.todo-table.yellow-header-table tbody tr {
  background: transparent;
}
.todo-table .todo-row-meta {
  background: var(--subtle-bg);
}
.todo-table tr[data-href] {
  cursor: pointer;
}
.todo-item:hover .todo-row-title,
.todo-item:hover .todo-row-meta {
  background: rgba(37,99,235,0.06);
}
.todo-table .todo-title { font-weight: 800; }
.todo-table .todo-done { text-align: center; width: 90px; }
.todo-private {
  margin-left: 8px;
  color: var(--danger);
  text-decoration: underline;
  font-weight: 800;
}
.todo-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel2);
  font-weight: 900;
  color: #1b2a0b;
}
.todo-urgent {
  color: var(--danger);
  font-weight: 800;
}

.todo-form {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.todo-form__cell {
  padding: 0;
  vertical-align: top;
}
.todo-form input[type=\"text\"],
.todo-form select,
.todo-form textarea {
  width: 100%;
  margin-top: 6px;
}
.todo-form strong {
  display: inline-block;
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pager__count { color: var(--muted); font-weight: 700; font-size: 13px; }
.pager__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pager__pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pager__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 9px;
  border: 1px solid rgba(122, 193, 66, 0.55);
  background: #e8f1dc;
  color: #1f3217;
  font-weight: 900;
  min-width: 32px;
}
.pager__ellipsis { color: var(--muted); font-weight: 700; padding: 0 4px; }

.crumbs { margin-bottom: 10px; }
.crumbs { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.crumbs a { color: var(--link); text-decoration: none; font-weight: 700; }
.crumbs a:hover { color: #266c91; }

.doc-head { margin-bottom: 10px; }
.doc-meta { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-weight: 600; font-size: 13px; }
.doc-meta__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.doc-meta__name { font-weight: 900; color: var(--text); }
.doc-meta__sub { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  align-self: center;
  border: 1px solid var(--border);
  background: var(--subtle-bg);
}
.avatar--md { width: 40px; height: 40px; }
.avatar--sm { width: 28px; height: 28px; }
.avatar--xs { width: 24px; height: 24px; }

.doc-body {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.doc-body img { max-width: 100%; height: auto; }

.h2 { margin: 0 0 10px; font-size: 16px; }

.attachments { margin-top: 16px; }
.attachments__list { margin: 0; padding-left: 18px; }
.attachments__list a { color: var(--link); }
.attachments__list a:hover { color: #266c91; }

.attachments__media {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.attachment {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--glass-bg);
}
.attachment__thumb {
  position: relative;
  width: 76px;
  height: 76px;
  flex: 0 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border-strong);
  background: var(--subtle-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.attachment__thumb:hover { text-decoration: none; }
.attachment__thumb img,
.attachment__thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}
.attachment__thumb--video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15,23,42,0.0), rgba(15,23,42,0.26));
  pointer-events: none;
}
.attachment__thumb--video::before {
  content: "▶";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay-bg);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  pointer-events: none;
}
.attachment__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
}
.attachment__link {
  font-weight: 800;
  overflow-wrap: anywhere;
  color: var(--link);
}
.attachment__link:hover { text-decoration: underline; }

body.is-modal-open { overflow: hidden; }
.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--overlay-bg);
  backdrop-filter: blur(2px);
}
.media-lightbox[hidden] { display: none; }
.media-lightbox__dialog {
  width: min(1100px, 100%);
  max-height: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.media-lightbox__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg-strong);
}
.media-lightbox__title {
  min-width: 0;
  font-weight: 900;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-lightbox__content {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--subtle-bg);
}
.media-lightbox__content img,
.media-lightbox__content video {
  max-width: 100%;
  max-height: calc(100vh - 180px);
  border-radius: 12px;
  background: #000;
}

.likes-modal {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--overlay-bg);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 160ms ease;
}
.likes-modal.is-open { opacity: 1; }
.likes-modal[hidden] { display: none; }
.likes-modal__dialog {
  width: min(520px, 100%);
  max-height: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}
.likes-modal.is-open .likes-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.likes-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg-strong);
}
.likes-modal__title {
  min-width: 0;
  font-weight: 900;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.likes-modal__content {
  padding: 12px;
  background: var(--subtle-bg);
  overflow: auto;
  max-height: calc(100vh - 180px);
}
.likes-modal__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.likes-modal__item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  font-weight: 800;
  color: var(--text);
}
.likes-modal__empty { font-weight: 800; color: var(--muted); }

.user-modal {
  position: fixed;
  inset: 0;
  z-index: 3150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--overlay-bg);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 160ms ease;
}
.user-modal.is-open { opacity: 1; }
.user-modal[hidden] { display: none; }
.user-modal__dialog {
  width: min(640px, 100%);
  max-height: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 160ms ease, opacity 160ms ease;
}
.user-modal.is-open .user-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.user-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--glass-bg-strong);
}
.user-modal__title {
  min-width: 0;
  font-weight: 900;
  font-size: 13px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-modal__content {
  padding: 14px;
  background: var(--subtle-bg);
  overflow: auto;
  max-height: calc(100vh - 180px);
}

.user-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.user-card__avatar {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: var(--panel);
  object-fit: cover;
}
.user-card__main { min-width: 0; flex: 1; }
.user-card__name {
  font-size: 18px;
  font-weight: 950;
  letter-spacing: -0.01em;
  color: var(--text);
}
.user-card__handle {
  margin-top: 2px;
  font-weight: 900;
  font-size: 13px;
  color: var(--muted);
}
.user-card__badges {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.user-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  font-weight: 900;
  font-size: 12px;
  color: var(--muted);
}
.user-card__grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.user-card__field {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 0;
}
.user-card__label {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}
.user-card__value {
  margin-top: 4px;
  font-weight: 800;
  color: var(--text);
  overflow-wrap: anywhere;
}
.user-card__value a { color: var(--link); font-weight: 900; }
.user-card__value a:hover { text-decoration: underline; }
.user-card__desc {
  margin-top: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 14px;
  padding: 10px 12px;
}
.user-card__desc .user-card__value { font-weight: 700; line-height: 1.5; color: var(--text); white-space: pre-line; }

.user-link {
  color: inherit;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
.user-link:hover { text-decoration: underline; }
.user-link:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  .likes-modal,
  .likes-modal__dialog,
  .user-modal,
  .user-modal__dialog {
    transition: none;
  }
}

.attachment-remove-help { margin-top: 6px; font-size: 13px; }
.attachment-remove-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.attachment-remove-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.attachment-remove-check { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--muted); }
.attachment-remove-check input { width: 16px; height: 16px; }
.attachment-remove-label { user-select: none; }
.attachment-remove-link { font-weight: 700; color: var(--link); overflow-wrap: anywhere; }
.attachment-remove-link:hover { text-decoration: underline; }

.comments { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.comments__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.comment-form { margin-top: 10px; display: grid; gap: 10px; }
.comment-form.guest-message-form { grid-template-columns: 1fr; align-items: stretch; }
.comment-form.guest-message-form > .btn { justify-self: start; }
.comments .comment-form { grid-template-columns: 1fr; }
.comments .comment-form label,
.comments .comment-form textarea,
.comments .comment-form .emoji-row { grid-column: 1 / -1; }
.comments .comment-form > .btn { justify-self: start; }
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  outline: none;
  resize: vertical;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
textarea:focus { border-color: rgba(37,99,235,0.55); box-shadow: 0 0 0 4px rgba(37,99,235,0.16); }

.comment-list { display: grid; gap: 10px; margin-top: 12px; }
.comment {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
}
.comment__meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.comment__who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comment__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comment__author { font-weight: 800; }
.comment__date { color: var(--muted); font-weight: 600; font-size: 13px; }
.comment__body { line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
#projectMessageList { display: block; }
#projectMessageList > .project-message + .project-message { margin-top: 14px; }
.project-message { display: grid; gap: 14px; }
.project-message .comment__meta { margin-bottom: 0; }
.project-message-actions { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.comment.project-message-subform { margin-top: 10px; background: var(--subtle-bg); }
.comment.project-message-subform .comment-form { margin-top: 0; }
.project-message-children { margin-top: 14px; display: block; }
.project-message-children > .project-message + .project-message { margin-top: 14px; }

.js-project-guest {
  flex-wrap: wrap;
}
.js-project-guest > div {
  min-width: 0;
  flex: 1 1 auto;
}
.js-project-guest details {
  max-width: 100%;
}
.js-project-guest details a {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.js-project-guest details .muted {
  overflow-wrap: anywhere;
}
.js-project-guest-email {
  flex-wrap: wrap;
}
.js-project-guest-email .field {
  min-width: 0;
}
.js-project-guest-email input {
  max-width: 100%;
}
.js-project-guest-email button {
  white-space: nowrap;
}

.empty {
  padding: 18px 0;
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}
.data-table thead th {
  background: var(--panel2);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 900;
}
.data-table tbody td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.data-table tbody tr:where(:nth-child(even)) {
  background: var(--subtle-bg);
}
.data-table tbody tr:hover {
  background: rgba(37,99,235,0.06);
}
.data-table tbody tr.is-new {
  background: rgba(246, 199, 0, 0.10);
}
.data-table tbody tr.is-new:hover {
  background: rgba(246, 199, 0, 0.14);
}
.data-table tbody tr.row-inactive {
  opacity: 0.72;
}
.data-table tbody tr.row-inactive:hover {
  opacity: 1;
}
.data-table .col-comments,
.data-table .col-privacy {
  text-align: center;
  width: 90px;
}
.data-table .col-date {
  width: 120px;
  white-space: nowrap;
}
.data-table .col-author {
  width: 160px;
}
.data-table .col-dept {
  width: 140px;
}
.data-table .col-count {
  width: 90px;
  text-align: center;
}
.data-table--compact thead th,
.data-table--compact tbody td {
  padding: 9px 10px;
}

.data-table.io-orders-table--search {
  table-layout: fixed;
}
.data-table.io-orders-table--search .col-author,
.data-table.io-orders-table--search .col-count {
  width: auto;
}
.data-table.io-orders-table--search th:first-child,
.data-table.io-orders-table--search td:first-child {
  width: 42%;
}
.data-table.io-orders-table--search th:nth-child(2),
.data-table.io-orders-table--search td:nth-child(2) {
  width: 33%;
}
.data-table.io-orders-table--search th:nth-child(3),
.data-table.io-orders-table--search td:nth-child(3) {
  width: 25%;
}
.data-table.io-orders-table--search td {
  overflow-wrap: anywhere;
}

.table-submeta {
  display: none;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.io-rates-print-table {
  table-layout: fixed;
}
.io-rates-print-table thead th,
.io-rates-print-table tbody td {
  padding: 6px 6px;
  font-size: 12px;
}
.io-rates-print-table th:first-child,
.io-rates-print-table td:first-child {
  width: 160px;
}
.io-rates-print-table .col-count {
  width: 64px;
}
.io-rates-print-table input {
  padding: 6px 6px;
  border-radius: 10px;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 12px;
}
.cal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.cal-chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--chip, #cccccc);
  border: 1px solid rgba(17, 17, 17, 0.16);
}

.cal {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--panel);
  overflow-x: auto;
}
.cal-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 860px;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.2px;
}
.cal-head > div {
  padding: 6px 6px;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 860px;
  gap: 8px;
  margin-top: 8px;
}
.cal-cell {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--panel);
  min-height: 120px;
}
.cal-cell.is-empty {
  background: var(--panel2);
}
.cal-cell.is-today {
  border-color: rgba(246, 199, 0, 0.55);
  box-shadow: inset 0 0 0 1px rgba(246, 199, 0, 0.30);
}
.cal-cell.is-today .cal-daynum {
  color: var(--brand);
}
.cal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.cal-daynum {
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
}
.cal-daynum:hover { text-decoration: underline; }
.cal-events {
  display: grid;
  gap: 6px;
}
.cal-event {
  display: block;
  padding: 4px 6px;
  border-radius: 8px;
  border-left: 3px solid var(--brand);
  border: 1px solid rgba(17,17,17,0.12);
  background: var(--panel2);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.25;
}
.cal-event:hover {
  border-color: rgba(17,17,17,0.20);
  background: rgba(255,204,0,0.14);
}
.cal-more {
  font-size: 12px;
  font-weight: 800;
  color: var(--link);
  text-decoration: none;
}
.cal-more:hover { text-decoration: underline; }

@media (min-width: 720px) {
  .container { margin: 36px auto; }
  .card { padding: 22px; }
  .h1 { font-size: 26px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { width: auto; justify-self: start; }
  .pagehead { flex-direction: row; justify-content: space-between; align-items: center; }
  .pagehead__actions { flex-direction: row; align-items: center; justify-content: flex-end; }
  .filters { grid-template-columns: 1fr 190px 240px auto; align-items: end; }
  .filters.filters--simple { grid-template-columns: minmax(200px, 240px) minmax(260px, 1fr) auto; }
  .filters.filters--single { grid-template-columns: minmax(200px, 240px) auto; }
  .filters.filters--clientdb { grid-template-columns: 1fr auto; }
  .filters.filters--io-orders { grid-template-columns: 1fr 190px 240px 120px auto; }
  .form-grid { grid-template-columns: 1fr 1fr 1.4fr; align-items: end; }
  .form-row { grid-template-columns: 1fr 1fr; align-items: end; }
  .list-item { flex-direction: row; align-items: center; }
  .comment-form { grid-template-columns: 1fr auto; align-items: end; }
}

@media (max-width: 720px) {
  :root {
    --header-inner-h: 46px;
    --header-h: 66px;
  }
  #corpheader { padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) 10px calc(10px + var(--safe-left)); }
  #corpheader { height: var(--header-h-safe); }
  .corpheader__inner {
    padding: 8px 12px;
    gap: 8px;
    height: var(--header-inner-h);
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }
  .corpheader__left {
    flex: 1 1 auto;
    min-width: 0;
  }
  .corpheader__right {
    gap: 6px;
    flex: 0 0 auto;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
  }
  .corpheader__user {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
    font-weight: 800;
    min-width: 0;
  }
  .corpheader__right .linklike { padding: 6px 8px; font-size: 12px; }
  .theme-toggle { min-width: 36px; }

  .corpheader__logout .logout-text { display: none; }
  .corpheader__logout .logout-icon { display: inline-flex; }

  .notif-pop {
    position: fixed;
    top: calc(var(--header-h-safe) + 10px);
    left: calc(12px + var(--safe-left));
    right: calc(12px + var(--safe-right));
    width: auto;
    max-width: none;
    max-height: calc(100vh - var(--header-h-safe) - 24px);
    overflow: auto;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }

  .pagehead__actions { align-items: stretch; }
  .pagehead__actions > .btn { width: 100%; justify-content: center; }
  .pagehead__actions > .tabs { width: 100%; }
  .form-row.form-row--file { grid-template-columns: 1fr; }

  .todo-table {
    min-width: 0;
  }
  .todo-table thead { display: none; }
  .todo-table tbody {
    display: block;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    padding: 12px;
    margin-bottom: 12px;
  }
  .todo-table tbody tr { display: block; }
  .todo-table tbody td {
    display: block;
    padding: 6px 0;
    border: 0;
  }
  .todo-row-title td {
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    margin-bottom: 10px;
  }
  .todo-row-meta td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .todo-table .todo-done { text-align: left; }

  .list-table {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.yellow-header-table:not(.todo-table) {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
  }
  table.yellow-header-table:not(.todo-table) thead {
    display: table-header-group;
  }
  table.yellow-header-table:not(.todo-table) tbody {
    display: table-row-group;
  }
  table.yellow-header-table:not(.todo-table) tbody tr {
    display: table-row;
    background: transparent;
    border: 0;
  }
  table.yellow-header-table:not(.todo-table) tbody td {
    display: table-cell;
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    white-space: normal;
    word-break: break-word;
  }

  .comms-table {
    min-width: 640px;
    table-layout: auto;
  }
  .comms-table th,
  .comms-table td {
    white-space: nowrap;
  }

  .comms-table .table-submeta { display: flex; }

  .comms-table { min-width: 0; }
  .comms-table .col-author,
  .comms-table .col-dept,
  .comms-table .col-privacy {
    display: none;
  }
  .comms-table .col-comments { width: 70px; }

  .table-wrap--accounts {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .accounts-table { min-width: 0; table-layout: auto; }
  .accounts-table thead { display: none; }
  .accounts-table tbody { display: grid; gap: 12px; }
  .table-wrap--accounts {
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .accounts-table { min-width: 720px; }
  .accounts-table thead { display: table-header-group; }
  .accounts-table tbody tr { display: table-row; }
  .accounts-table tbody td {
    display: table-cell;
    padding: 8px 10px;
    border-top: 1px solid var(--border);
    white-space: nowrap;
  }
  .accounts-table tbody td.col-user {
    display: block;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .accounts-table tbody td.col-user::before { display: none; }
  .accounts-table .col-status { width: auto; text-align: left; }
  .accounts-table .account-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
  }
  .accounts-table .account-actions .btn--small { min-width: auto; }
}

@media (max-width: 520px) {
  :root {
    --header-inner-h: 42px;
    --header-h: 58px;
  }
  #corpheader { padding: calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) 8px calc(8px + var(--safe-left)); }
  .corpheader__inner { padding: 0 10px; gap: 8px; }
  .brand__text { display: none; }
  .brand__logo { height: auto; max-height: var(--header-inner-h); max-width: 140px; }
  #bodycont { padding: 14px calc(10px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(10px + var(--safe-left)); }
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px;
  }
  .card { padding: 16px; }
  .notif-pop { left: calc(10px + var(--safe-left)); right: calc(10px + var(--safe-right)); }
  .likes-modal,
  .user-modal,
  .media-lightbox { padding: calc(14px + var(--safe-top)) calc(14px + var(--safe-right)) calc(14px + var(--safe-bottom)) calc(14px + var(--safe-left)); }

  .table-wrap--content {
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .comms-table--cards { min-width: 0; }
  .comms-table--cards thead { display: none; }
  .comms-table--cards tbody { display: grid; gap: 12px; }
  .comms-table--cards tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
  }
  .comms-table--cards tbody td {
    padding: 0;
    border: 0;
  }
  .comms-table--cards tbody tr:hover { background: var(--panel); }
  .comms-table--cards tbody tr.is-new {
    border-color: rgba(246, 199, 0, 0.55);
    background: rgba(246, 199, 0, 0.10);
  }
  .comms-table--cards tbody tr.is-new:hover {
    border-color: rgba(246, 199, 0, 0.70);
    background: rgba(246, 199, 0, 0.14);
  }
  .comms-table--cards .col-date {
    grid-column: 1;
    width: auto;
    font-size: 12px;
    font-weight: 900;
    color: var(--muted);
  }
  .comms-table--cards .col-comments {
    grid-column: 2;
    width: auto;
    text-align: right;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel2);
    font-weight: 900;
    font-size: 12px;
    color: var(--muted);
  }
  .comms-table--cards .col-title { grid-column: 1 / -1; }
  .comms-table--cards .col-title a { font-weight: 900; }
  .comms-table--cards .table-submeta { margin-top: 8px; }
}

@media (max-width: 420px) {
  .corpheader__user { display: none; }
  .brand__logo { max-width: 110px; }
}

@media print {
  #corpheader,
  #menu,
  .mobile-menu-trigger,
  .tabs,
  form.filters,
  .pager,
  .no-print {
    display: none !important;
  }

  body {
    background: #ffffff !important;
  }

  #layout {
    display: block !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  #bodycont {
    padding: 0 !important;
  }

  .page {
    max-width: none !important;
    margin: 0 !important;
  }

  .card,
  .table-wrap {
    box-shadow: none !important;
  }

  .card {
    border: 0 !important;
  }

  .table-wrap {
    overflow: visible !important;
  }

  .data-table {
    min-width: 0 !important;
  }
}

/* Pipers overrides + legacy class mapping */
#menu .menuitem a.is-active {
  background: rgba(122, 193, 66, 0.18);
  box-shadow: inset 3px 0 0 rgba(122, 193, 66, 0.9);
}

#corpheader {
  --corp-bg: #7ac141;
  --corp-text: #ffffff;
  --corp-muted: rgba(255, 255, 255, 0.82);
  --corp-border: rgba(255, 255, 255, 0.28);
  background: transparent;
  padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) 12px calc(12px + var(--safe-left));
}

html[data-theme="dark"] #corpheader {
  --corp-bg: #7ac141;
  --corp-text: #f8fafc;
  --corp-muted: rgba(248, 250, 252, 0.82);
  --corp-border: rgba(0, 0, 0, 0.25);
}
.corpheader__inner {
  background: var(--corp-bg);
  border: 1px solid var(--corp-border);
  box-shadow: none;
  padding: 0 16px;
  border-radius: var(--radius-xl);
}
.brand {
  height: var(--header-inner-h);
  overflow: hidden;
  align-items: center;
}
.brand__logo {
  height: auto;
  max-height: calc(var(--header-inner-h) - 4px);
  width: auto;
  max-width: min(280px, 100%);
  object-fit: contain;
  display: block;
}
.brand__text {
  display: none;
  font-weight: 900;
  color: #ffffff;
}
.corpheader__user {
  color: #1b2a0b;
}
.corpheader__right .linklike {
  color: #1b2a0b;
  border-color: rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.7);
}
.corpheader__right .linklike:hover {
  background: rgba(255,255,255,0.85);
}
.corpheader__right .bell {
  color: #f8fafc;
}
.corpheader__right .bell__badge {
  border-color: var(--corp-bg);
}
.corpheader__right .icon-btn {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  color: #f8fafc;
}
.corpheader__right .icon-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #ffffff;
}

@media (max-width: 900px) {
  .brand__logo {
    max-height: var(--header-inner-h);
    max-width: 220px;
  }
}

@media (max-width: 600px) {
  .brand__logo {
    max-height: var(--header-inner-h);
    max-width: 180px;
  }
}

@media (max-width: 720px) {
  #corpheader { padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) 10px calc(10px + var(--safe-left)); }
}

@media (max-width: 520px) {
  #corpheader { padding: calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) 8px calc(8px + var(--safe-left)); }
}

.page-body { display: grid; gap: 14px; }

.panel-grid {
  display: grid;
  gap: 12px;
  align-items: stretch;
}
.panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.toolbar .filters {
  flex: 0 0 auto;
  margin-bottom: 0;
  width: 100%;
}
.toolbar.toolbar--stack {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
}
.toolbar.toolbar--stack .filters {
  flex: 0 0 auto;
}
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.inline-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.upload-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.upload-form .form-row { margin: 0; }
.upload-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.upload-form button { width: fit-content; }

.doc-add summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--text);
  margin: 6px 0 10px;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.notice {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--alert-success-border);
  background: var(--alert-success-bg);
  color: var(--alert-success-text);
  font-weight: 800;
}
.notice.notice--block { margin-bottom: 12px; }

.list-table {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.yellow-header-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.yellow-header-table thead th {
  background: var(--panel2);
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  letter-spacing: 0.2px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-weight: 900;
}
.yellow-header-table tbody td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.yellow-header-table tbody tr:nth-child(even) {
  background: var(--subtle-bg);
}
.yellow-header-table tbody tr:hover {
  background: rgba(37,99,235,0.06);
}
.file-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 20px;
  padding: 0 6px;
  margin-right: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}


.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.doc-body {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  color: var(--text);
  overflow-wrap: anywhere;
}
.doc-attachments {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.doc-attachments ul { margin: 8px 0 0 18px; }
.doc-actions { display: flex; gap: 10px; }

.comment-root { display: grid; gap: 10px; }
.comment-group {
  margin-left: 18px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

.emoji-row { display: flex; flex-wrap: wrap; gap: 6px; }
.emoji-btn {
  border: 1px solid var(--border);
  background: var(--panel2);
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
}
.emoji-btn:hover { background: var(--subtle-bg); }

.lead { font-size: 16px; color: var(--text); font-weight: 600; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.card-title { font-weight: 900; margin-bottom: 6px; color: var(--text); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.tile-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.list-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.list { display: grid; gap: 12px; }
.list-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel);
}
.list-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.list-item__body {
  margin-top: 8px;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.test-form {
  display: grid;
  gap: 12px;
}
.question-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 6px;
}
.question-title { font-weight: 900; color: var(--text); }
.checkline { font-size: 13px; color: var(--muted); font-weight: 700; }

button:not(.btn):not(.icon-btn):not(.mobile-menu-trigger):not(.theme-toggle):not(.emoji-btn),
input[type="submit"],
input[type="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid #1b3515;
  border-radius: 11px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #2f5a25 0%, #24461c 100%);
  color: #f8fff2;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(19, 46, 12, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease;
}
button:not(.btn):not(.icon-btn):not(.mobile-menu-trigger):not(.theme-toggle):not(.emoji-btn):hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #386b2b 0%, #2a5321 100%);
}

@media (min-width: 980px) {
  .panel-grid.panel-grid--two {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
  }
}
