:root {
  --ot-brand-blue: #0A4DB3;
  --ot-brand-cyan: #00C2FF;
  --ot-brand-orange: #FF6A00;
  --ot-brand-navy: #0B1D3A;
  --ot-brand-blue-rgb: 10, 77, 179;
  --ot-brand-cyan-rgb: 0, 194, 255;
  --ot-brand-orange-rgb: 255, 106, 0;
  --ot-brand-navy-rgb: 11, 29, 58;
  --ot-primary: var(--ot-brand-blue);
  --ot-primary-hover: var(--ot-brand-navy);
  --ot-primary-soft: #EAF2FF;
  --ot-accent: var(--ot-brand-orange);
  --ot-accent-soft: #FFF3EA;
  --ot-cyan-soft: #E5F9FF;
  --ot-ink: var(--ot-brand-navy);
  --ot-text: #111827;
  --ot-muted: #64748B;
  --ot-page-bg: #F6F8FB;
  --ot-surface: #FFFFFF;
  --ot-border: #DDE3EA;
  --ot-success: #15803D;
  --ot-success-bg: #ECFDF3;
  --ot-warning: #D97706;
  --ot-warning-bg: #FFF7E6;
  --ot-danger: #DC2626;
  --ot-danger-bg: #FEF2F2;
  --ot-info: #0284C7;
  --ot-info-bg: #E0F2FE;
  --ot-radius-sm: 4px;
  --ot-radius-md: 6px;
  --ot-radius-lg: 10px;
  --ot-radius-xl: 14px;
  --ot-shadow-card: 0 2px 8px rgba(11, 29, 58, 0.06);
  --ot-shadow-popover: 0 8px 24px rgba(11, 29, 58, 0.12);
  --ot-shadow-modal: 0 20px 48px rgba(11, 29, 58, 0.18);
  --ot-shadow-surface: var(--ot-shadow-card);
  --ot-focus-ring: rgba(10, 77, 179, 0.24);
  --ot-focus-outline: var(--ot-brand-blue);
  --ot-font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ot-font-size-page-title: 2rem;
  --ot-font-size-section-title: 1.05rem;
  --ot-font-size-body: 0.95rem;
  --ot-font-size-metadata: 0.84rem;
  --ot-font-size-table: 0.9rem;
  --ot-font-size-label: 0.8rem;

  --ot-primary-rgb: var(--ot-brand-blue-rgb);
  --ot-primary-hover-rgb: var(--ot-brand-navy-rgb);
  --ot-accent-rgb: var(--ot-brand-orange-rgb);
  --ot-ink-rgb: var(--ot-brand-navy-rgb);
  --ot-success-rgb: 21, 128, 61;
  --ot-warning-rgb: 217, 119, 6;
  --ot-danger-rgb: 220, 38, 38;
  --ot-info-rgb: 2, 132, 199;

  --surface: var(--ot-surface);
  --surface-muted: var(--ot-page-bg);
  --surface-strong: var(--ot-primary-soft);
  --border: var(--ot-border);
  --text: var(--ot-text);
  --text-strong: var(--ot-text);
  --text-muted: var(--ot-muted);
  --primary: var(--ot-primary);
  --primary-strong: var(--ot-primary-hover);
  --accent: var(--ot-accent);
  --success: var(--ot-success);
  --warning: var(--ot-warning);
  --danger: var(--ot-danger);
  --info: var(--ot-info);
  --shadow: var(--ot-shadow-surface);

  --bs-body-color: var(--ot-text);
  --bs-body-bg: var(--ot-page-bg);
  --bs-body-font-family: var(--ot-font-family);
  --bs-primary-rgb: var(--ot-primary-rgb);
  --bs-success-rgb: var(--ot-success-rgb);
  --bs-warning-rgb: var(--ot-warning-rgb);
  --bs-danger-rgb: var(--ot-danger-rgb);
  --bs-info-rgb: var(--ot-info-rgb);
}

html {
  font-size: 15px;
  color-scheme: light;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--surface-muted);
  font-family: var(--ot-font-family);
  font-size: var(--ot-font-size-body);
  text-rendering: optimizeLegibility;
}

a {
  color: var(--primary);
  text-decoration: none;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--primary-strong);
}

a:not(.btn):focus-visible {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--ot-focus-outline);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--ot-radius-md);
  font-weight: 700;
  line-height: 1.25;
  vertical-align: middle;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.ui-action-icon {
  flex: 0 0 auto;
}

.ui-action-label {
  min-width: 0;
}

.ui-icon {
  position: relative;
  display: inline-grid;
  width: 1.05em;
  height: 1.05em;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
  font-size: 0.95em;
  font-weight: 820;
  line-height: 1;
}

.ui-icon::before {
  content: "";
  display: block;
}

.ui-icon-plus::before {
  width: 0.75em;
  height: 0.75em;
  background:
    linear-gradient(currentColor, currentColor) 50% 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat;
}

.ui-icon-search::before {
  width: 0.72em;
  height: 0.72em;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0.42em 0.42em 0 -0.27em currentColor;
}

.ui-icon-check::before {
  width: 0.72em;
  height: 0.42em;
  margin-top: -0.12em;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}

.ui-icon-alert::before {
  content: "!";
}

.ui-icon-danger::before,
.ui-icon-close::before {
  width: 0.76em;
  height: 0.76em;
  background:
    linear-gradient(currentColor, currentColor) 50% 50% / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 50% 50% / 100% 2px no-repeat;
  transform: rotate(45deg);
}

.ui-icon-info::before {
  content: "i";
}

.ui-icon-up::before {
  width: 0.62em;
  height: 0.62em;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(0.14em) rotate(45deg);
}

.ui-icon-down::before {
  width: 0.62em;
  height: 0.62em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.14em) rotate(45deg);
}

.ui-icon-pause::before {
  width: 0.72em;
  height: 0.76em;
  background:
    linear-gradient(currentColor, currentColor) 25% 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 75% 0 / 2px 100% no-repeat;
}

.ui-icon-stack::before,
.ui-icon-activity::before,
.ui-icon-dashboard::before,
.ui-icon-work-items::before,
.ui-icon-calendar::before,
.ui-icon-clients::before,
.ui-icon-reports::before,
.ui-icon-bell::before,
.ui-icon-view::before,
.ui-icon-workflow::before,
.ui-icon-templates::before,
.ui-icon-settings::before,
.ui-icon-users::before,
.ui-icon-circle::before {
  font-size: 0.68em;
}

.ui-icon-stack::before,
.ui-icon-activity::before {
  content: "#";
}

.ui-icon-dashboard::before {
  content: "D";
}

.ui-icon-work-items::before {
  content: "W";
}

.ui-icon-calendar::before {
  width: 0.8em;
  height: 0.74em;
  border: 2px solid currentColor;
  border-radius: 0.18em;
  box-shadow: inset 0 0.18em 0 currentColor;
}

.ui-icon-clients::before {
  content: "C";
}

.ui-icon-reports::before {
  content: "R";
}

.ui-icon-bell::before {
  content: "N";
}

.ui-icon-access::before {
  width: 0.48em;
  height: 0.48em;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 0.46em 0.18em 0 -0.12em currentColor;
}

.ui-icon-role::before {
  width: 0.72em;
  height: 0.84em;
  background: currentColor;
  clip-path: polygon(50% 0, 88% 16%, 82% 68%, 50% 100%, 18% 68%, 12% 16%);
}

.ui-icon-edit::before {
  width: 0.78em;
  height: 0.22em;
  background: currentColor;
  border-radius: 999px;
  box-shadow: -0.34em 0.34em 0 -0.04em currentColor;
  transform: rotate(-42deg);
}

.ui-icon-view::before {
  width: 0.84em;
  height: 0.54em;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.ui-icon-view::after {
  content: "";
  position: absolute;
  display: block;
  width: 0.24em;
  height: 0.24em;
  background: currentColor;
  border-radius: 50%;
}

.ui-icon-workflow::before {
  content: "F";
}

.ui-icon-templates::before {
  content: "T";
}

.ui-icon-settings::before {
  content: "A";
}

.ui-icon-users::before {
  content: "U";
}

.ui-icon-circle::before {
  content: "";
  width: 0.48em;
  height: 0.48em;
  background: currentColor;
  border-radius: 50%;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(var(--ot-ink-rgb), 0.08);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
  color: #fff;
}

.btn-secondary {
  color: var(--ot-ink);
  background: #f8fafc;
  border-color: var(--border);
}

.btn-secondary:hover,
.btn-secondary:focus {
  color: var(--ot-ink);
  background: #eef2f7;
  border-color: #cbd5e1;
}

.btn-subtle {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: rgba(var(--ot-primary-rgb), 0.24);
}

.btn-subtle:hover,
.btn-subtle:focus {
  color: var(--primary-strong);
  background: #dce9ff;
  border-color: rgba(var(--ot-primary-rgb), 0.34);
}

.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover,
.btn-ghost:focus {
  color: var(--text);
  background: #eef2f7;
  border-color: transparent;
}

.btn-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover,
.btn-danger:focus {
  color: #fff;
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: rgba(var(--ot-primary-rgb), 0.35);
  background: var(--surface);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
}

.btn-outline-danger {
  color: var(--danger);
  border-color: #fecaca;
  background: var(--surface);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus {
  color: #fff;
  border-color: var(--danger);
  background: var(--danger);
}

.btn.disabled,
.btn:disabled,
fieldset:disabled .btn {
  color: #94a3b8;
  pointer-events: none;
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  opacity: 1;
}

.btn[role="link"][aria-disabled="true"] {
  cursor: not-allowed;
}

.form-control,
.form-select {
  min-height: 38px;
  color: var(--text);
  background-color: var(--surface);
  border-color: var(--border);
  border-radius: var(--ot-radius-md);
  font-size: var(--ot-font-size-body);
}

.form-label,
.form-field > label,
.field-label {
  color: var(--text);
  font-size: var(--ot-font-size-label);
  font-weight: 760;
  line-height: 1.35;
}

.form-control::placeholder {
  color: #94A3B8;
  opacity: 1;
}

textarea.form-control {
  min-height: auto;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem var(--ot-focus-ring);
}

.form-control:focus,
.form-select:focus {
  color: var(--text);
  background-color: var(--surface);
}

.password-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.password-input-group .form-control {
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.password-toggle-button {
  min-width: 66px;
  color: var(--primary);
  background: #f8fafc;
  border-color: var(--border);
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  font-size: 0.82rem;
  font-weight: 800;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: rgba(var(--ot-primary-rgb), 0.28);
}

.submit-loading {
  align-items: center;
  gap: 0.45rem;
}

.submit-loading:not([hidden]) {
  display: inline-flex;
}

.btn:focus {
  box-shadow: 0 0 0 0.2rem var(--ot-focus-ring);
}

.form-check-input {
  border-color: #cbd5e1;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem var(--ot-focus-ring);
}

.alert {
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  font-weight: 650;
}

.alert-success {
  color: var(--success);
  background: var(--ot-success-bg);
  border-color: rgba(var(--ot-success-rgb), 0.24);
}

.alert-info {
  color: var(--info);
  background: var(--ot-info-bg);
  border-color: rgba(var(--ot-info-rgb), 0.24);
}

.alert-warning {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.24);
}

.alert-danger {
  color: var(--danger);
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.24);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  color: #fff;
  font-weight: 760;
  background: var(--primary);
  border-radius: var(--ot-radius-md);
  transform: translateY(-140%);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(var(--ot-ink-rgb), 0.03);
}

.topbar-brand-region {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.topbar-nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
}

.topbar-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  color: #475569;
  border: 1px solid transparent;
  border-radius: var(--ot-radius-md);
  font-size: 0.92rem;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.topbar-nav-link:hover,
.topbar-nav-link:focus-visible {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: rgba(var(--ot-primary-rgb), 0.16);
  text-decoration: none;
}

.topbar-nav-link.active {
  color: var(--primary);
  background: var(--ot-primary-soft);
  border-color: rgba(var(--ot-primary-rgb), 0.2);
}

.topbar-nav-link.active::after {
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  content: "";
  background: var(--primary);
  border-radius: 999px;
}

.topbar-mobile-menu {
  display: none;
  position: relative;
  flex: 0 0 auto;
}

.topbar-menu-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  color: var(--primary);
  list-style: none;
  cursor: pointer;
  background: var(--ot-primary-soft);
  border: 1px solid rgba(var(--ot-primary-rgb), 0.2);
  border-radius: var(--ot-radius-md);
  font-size: 0.88rem;
  font-weight: 800;
}

.topbar-menu-button::-webkit-details-marker {
  display: none;
}

.topbar-mobile-menu[open] .topbar-menu-button {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.topbar-mobile-nav {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  display: grid;
  gap: 4px;
  width: min(280px, calc(100vw - 28px));
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-popover);
}

.topbar-mobile-nav-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  color: #475569;
  border-radius: var(--ot-radius-md);
  font-weight: 760;
}

.topbar-mobile-nav-link:hover,
.topbar-mobile-nav-link:focus-visible,
.topbar-mobile-nav-link.active {
  color: var(--primary);
  background: var(--ot-primary-soft);
  text-decoration: none;
}

.topbar-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  flex: 0 1 420px;
  width: min(100%, 420px);
  min-width: 0;
}

.topbar-search .form-control {
  min-height: 40px;
  background: #F8FAFC;
  border-color: #CBD5E1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
  margin-left: auto;
  min-width: 0;
  max-width: 100%;
}

.topbar-create-action {
  flex: 0 0 auto;
  white-space: nowrap;
}

.logout-form {
  margin: 0;
}

.account-menu {
  position: relative;
  flex: 0 0 auto;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  max-width: 248px;
  padding: 5px 9px 5px 5px;
  color: var(--text);
  list-style: none;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.account-summary::-webkit-details-marker {
  display: none;
}

.account-summary:hover,
.account-menu[open] .account-summary {
  background: #F8FAFC;
  border-color: rgba(var(--ot-primary-rgb), 0.24);
}

.account-menu[open] .account-summary {
  box-shadow: 0 0 0 0.2rem var(--ot-focus-ring);
}

.account-avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  flex: 0 0 auto;
  color: var(--primary);
  background: var(--ot-primary-soft);
  border: 1px solid rgba(var(--ot-primary-rgb), 0.2);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
}

.account-copy {
  display: grid;
  min-width: 0;
}

.account-label {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.account-name {
  overflow: hidden;
  max-width: 168px;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 45;
  width: 248px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-popover);
}

.account-menu-user {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.account-menu-user strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-user span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.account-menu-link {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 10px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-weight: 760;
}

.account-menu-link:hover,
.account-menu-link:focus-visible {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  text-decoration: none;
  outline-offset: -2px;
}

.account-menu-action {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  padding: 10px 16px;
  color: var(--danger);
  font-weight: 760;
  text-align: left;
  background: transparent;
  border: 0;
}

.account-menu-action:hover,
.account-menu-action:focus-visible {
  background: var(--ot-danger-bg);
  outline-offset: -2px;
}

.notification-bell-shell {
  position: relative;
  flex: 0 0 auto;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.notification-bell:hover,
.notification-bell:focus-visible,
.notification-bell[aria-expanded="true"] {
  color: var(--text);
  border-color: rgba(var(--ot-primary-rgb), 0.28);
  box-shadow: var(--ot-shadow-popover);
  transform: translateY(-1px);
  outline: 0;
}

.notification-bell:focus-visible {
  box-shadow: 0 0 0 0.2rem var(--ot-focus-ring), var(--ot-shadow-popover);
}

.notification-bell-icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  background: var(--primary);
  border-radius: 999px;
}

.notification-popup {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: min(440px, calc(100vw - 28px));
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-popover);
}

.notification-popup-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 15px;
  border-bottom: 1px solid var(--border);
}

.notification-popup-header strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 760;
}

.notification-popup-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 650;
}

.notification-popup-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.notification-popup-actions form {
  margin: 0;
}

.notification-popup-link,
.notification-popup-button {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 760;
  text-decoration: none;
}

.notification-popup-link:hover,
.notification-popup-button:hover,
.notification-popup-link:focus-visible,
.notification-popup-button:focus-visible {
  color: var(--primary-strong);
  text-decoration: underline;
}

.notification-popup-button {
  padding: 0;
  background: transparent;
  border: 0;
}

.notification-popup-list {
  max-height: min(430px, calc(100vh - 170px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-popup-section {
  display: grid;
  border-bottom: 1px solid var(--border);
}

.notification-popup-section:last-child {
  border-bottom: 0;
}

.notification-popup-section h3 {
  margin: 0;
  padding: 10px 18px 8px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.notification-popup-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.notification-popup-item:hover,
.notification-popup-item:focus-visible {
  color: inherit;
  text-decoration: none;
  background: #f8fafc;
  outline: 0;
}

.notification-popup-item:focus-visible {
  box-shadow: inset 0 0 0 2px var(--ot-focus-ring);
}

.notification-popup-item.is-unread {
  background: var(--ot-primary-soft);
}

.notification-popup-item:last-child {
  border-bottom: 0;
}

.notification-popup-severity {
  width: 10px;
  min-height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.notification-popup-severity.severity-primary {
  background: var(--primary);
}

.notification-popup-severity.severity-info {
  background: var(--info);
}

.notification-popup-severity.severity-warning {
  background: var(--warning);
}

.notification-popup-severity.severity-danger {
  background: var(--danger);
}

.notification-popup-severity.severity-success {
  background: var(--success);
}

.notification-popup-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.notification-popup-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notification-popup-title-row strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 760;
}

.notification-popup-title-row time {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.notification-popup-message {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.notification-popup-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.notification-popup-related {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.notification-popup-empty {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 150px;
  padding: 26px;
  color: var(--text-muted);
  text-align: center;
}

.notification-popup-empty svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-popup-empty p {
  margin: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: var(--ot-radius-md);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.brand-logo {
  width: auto;
  max-width: 148px;
  height: 36px;
  object-fit: contain;
}

.topbar .brand-logo {
  max-width: 172px;
  height: 40px;
}

.brand-wordmark {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  transition: grid-template-columns 0.18s ease;
}

.sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: width 0.18s ease, border-color 0.18s ease;
}

.sidebar-inner {
  display: grid;
  gap: 18px;
  padding: 18px 14px;
}

.sidebar-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  padding: 0;
  justify-self: end;
  color: var(--primary-strong);
  background: #FFFFFF;
  border: 1px solid rgba(var(--ot-primary-rgb), 0.18);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(var(--ot-ink-rgb), 0.08);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  color: var(--primary);
  background: var(--ot-primary-soft);
  border-color: rgba(var(--ot-primary-rgb), 0.24);
  box-shadow: 0 8px 18px rgba(var(--ot-ink-rgb), 0.14);
}

.sidebar-toggle:focus-visible {
  outline: 3px solid rgba(var(--ot-primary-rgb), 0.24);
  outline-offset: 2px;
}

.sidebar-toggle-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
}

.sidebar-toggle-icon::before {
  width: 0.54em;
  height: 0.54em;
  content: "";
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.sidebar-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sidebar-toggle-popup .tooltip-inner {
  padding: 8px 10px;
  color: #FFFFFF;
  background: var(--ot-brand-navy);
  border-radius: var(--ot-radius-md);
  box-shadow: var(--ot-shadow-popover);
  font-size: 0.78rem;
  font-weight: 740;
  letter-spacing: 0;
}

.sidebar-toggle-popup.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: var(--ot-brand-navy);
}

.sidebar-toggle-popup.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: var(--ot-brand-navy);
}

.sidebar-toggle-popup.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--ot-brand-navy);
}

.sidebar-toggle-popup.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--ot-brand-navy);
}

.sidebar-section {
  display: grid;
  gap: 8px;
}

.sidebar-section + .sidebar-section {
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.sidebar-section-admin {
  padding: 14px 12px 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  border: 1px solid rgba(var(--ot-primary-rgb), 0.16);
  border-radius: var(--ot-radius-lg);
}

.sidebar-section-admin + .sidebar-section,
.sidebar-section + .sidebar-section-admin {
  border-top: 0;
}

.sidebar-section-label {
  margin: 0;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-section-admin .sidebar-section-label {
  color: var(--primary-strong);
}

.nav-menu {
  display: grid;
  gap: 5px;
}

.nav-menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 9px 12px 9px 14px;
  color: #475569;
  border-radius: var(--ot-radius-md);
  font-size: 0.93rem;
  font-weight: 720;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.ui-side-nav-icon {
  width: 24px;
  height: 24px;
  color: #64748B;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
  font-size: 0.84rem;
}

.ui-side-nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu-link:hover,
.nav-menu-link.active {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #d7e3ff;
}

.nav-menu-link:hover .ui-side-nav-icon,
.nav-menu-link.active .ui-side-nav-icon {
  color: var(--primary);
  background: var(--surface);
  border-color: rgba(var(--ot-primary-rgb), 0.24);
}

.nav-menu-link.active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 5px;
  width: 3px;
  content: "";
  background: var(--primary);
  border-radius: 999px;
}

@media (min-width: 1021px) {
  body.sidebar-collapsed .workspace {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body.sidebar-collapsed .sidebar-inner {
    gap: 14px;
    padding: 16px 10px;
  }

  body.sidebar-collapsed .sidebar-toggle {
    width: 42px;
    min-height: 42px;
    padding: 0;
    justify-self: center;
  }

  body.sidebar-collapsed .ui-side-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.sidebar-collapsed .sidebar-toggle-icon::before {
    transform: rotate(-135deg);
  }

  body.sidebar-collapsed .sidebar-section {
    justify-items: center;
    gap: 9px;
  }

  body.sidebar-collapsed .sidebar-section + .sidebar-section {
    padding-top: 14px;
  }

  body.sidebar-collapsed .sidebar-section-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.sidebar-collapsed .sidebar-section-admin {
    width: 100%;
    padding: 8px 6px;
    border-radius: var(--ot-radius-md);
  }

  body.sidebar-collapsed .nav-menu {
    width: 100%;
    justify-items: center;
  }

  body.sidebar-collapsed .nav-menu-link {
    width: 42px;
    min-height: 42px;
    justify-content: center;
    gap: 0;
    padding: 8px;
  }

  body.sidebar-collapsed .nav-menu-link.active::before {
    top: 8px;
    bottom: 8px;
    left: -1px;
  }

  body.sidebar-collapsed .ui-side-nav-icon {
    width: 26px;
    height: 26px;
  }
}

.content {
  width: 100%;
  min-width: 0;
  padding: 28px;
}

.page-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.signed-out-content {
  margin: 0 auto;
}

.signed-out-content .page-container {
  max-width: 920px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.page-heading h1 {
  margin: 0;
  font-size: var(--ot-font-size-page-title);
  line-height: 1.1;
  font-weight: 760;
  letter-spacing: 0;
}

.page-heading-copy {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--text-muted);
  font-weight: 650;
}

.ui-page-header-copy {
  min-width: 0;
}

.ui-page-header-meta {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ui-page-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto;
  gap: 10px;
  width: min(100%, 560px);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 126px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-card);
}

a.metric-card {
  color: inherit;
  text-decoration: none;
}

.metric-card-link {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.metric-card-link:hover,
.metric-card-link:focus-visible {
  color: inherit;
  border-color: rgba(var(--ot-primary-rgb), 0.36);
  box-shadow: 0 8px 22px rgba(var(--ot-ink-rgb), 0.11);
  text-decoration: none;
  transform: translateY(-1px);
}

.metric-card-link:focus-visible {
  outline: 2px solid var(--ot-focus-outline);
  outline-offset: 3px;
}

.ui-metric-card-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ui-metric-icon {
  width: 38px;
  height: 38px;
  color: var(--primary);
  background: var(--ot-primary-soft);
  border: 1px solid rgba(var(--ot-primary-rgb), 0.18);
  border-radius: var(--ot-radius-md);
  font-size: 1rem;
}

.metric-card.success .ui-metric-icon {
  color: var(--success);
  background: var(--ot-success-bg);
  border-color: rgba(var(--ot-success-rgb), 0.18);
}

.metric-card.warning .ui-metric-icon,
.metric-card.at-risk .ui-metric-icon {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.18);
}

.metric-card.danger .ui-metric-icon,
.metric-card.overdue .ui-metric-icon {
  color: var(--danger);
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.18);
}

.metric-card.info .ui-metric-icon {
  color: var(--info);
  background: var(--ot-info-bg);
  border-color: rgba(var(--ot-info-rgb), 0.18);
}

.metric-card.paused .ui-metric-icon {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.ui-metric-card-main {
  display: grid;
  gap: 4px;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1;
  font-weight: 760;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.metric-card.danger {
  border-left: 4px solid var(--danger);
}

.metric-card.danger strong {
  color: var(--danger);
}

.metric-card.warning {
  border-left: 4px solid var(--warning);
}

.metric-card.warning strong {
  color: var(--warning);
}

.metric-card.info {
  border-left: 4px solid var(--info);
}

.metric-card.info strong {
  color: var(--info);
}

.metric-card.primary {
  border-left: 4px solid var(--primary);
}

.metric-card.primary strong {
  color: var(--primary-strong);
}

.metric-card.success {
  border-left: 4px solid var(--success);
}

.metric-card.success strong {
  color: var(--success);
}

.metric-card.paused {
  border-left: 4px solid #64748b;
}

.metric-card.paused strong {
  color: #475569;
}

.metric-card.overdue {
  border-left: 4px solid var(--danger);
}

.metric-card.overdue strong {
  color: var(--danger);
}

.metric-card.at-risk {
  border-left: 4px solid var(--warning);
}

.metric-card.at-risk strong {
  color: var(--warning);
}

.ui-metric-delta {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 760;
}

.metric-link {
  align-self: end;
  font-size: 0.85rem;
  font-weight: 750;
}

.metric-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.metric-note {
  align-self: end;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.dashboard-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.control-room-dashboard {
  display: grid;
  gap: 18px;
}

.control-room-dashboard .page-heading {
  margin-bottom: 4px;
}

.control-room-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 0;
}

.control-room-main-grid,
.control-room-grid,
.control-room-lower-grid {
  display: grid;
  gap: 18px;
}

.control-room-main-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
}

.control-room-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: start;
}

.control-room-lower-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-panel,
.queue-health-panel,
.recent-activity-panel {
  min-height: 100%;
}

.action-list,
.risk-lane-list,
.activity-timeline {
  display: grid;
}

.queue-health-panel .table-responsive,
.recent-activity-panel .activity-timeline {
  max-height: min(360px, 52vh);
  overflow-y: auto;
  scrollbar-width: thin;
}

.action-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.action-row:hover,
.action-row:focus-visible {
  color: var(--text);
  background: #fbfdff;
}

.action-row:last-child {
  border-bottom: 0;
}

.action-row-bar {
  width: 8px;
  height: 100%;
  min-height: 54px;
  background: var(--text-muted);
  border-radius: 999px;
}

.action-row.is-danger .action-row-bar {
  background: var(--danger);
}

.action-row.is-warning .action-row-bar {
  background: var(--warning);
}

.action-row.is-info .action-row-bar {
  background: var(--info);
}

.action-row-main,
.action-row-title,
.action-row-state {
  min-width: 0;
}

.action-row-main {
  display: grid;
  gap: 3px;
}

.action-row-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}

.action-row-title span {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.action-row-title strong {
  color: var(--text);
}

.action-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 12px;
  align-items: center;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 650;
}

.action-row-meta span {
  min-width: 0;
}

.action-row-meta span + span {
  position: relative;
}

.action-row-meta span + span::before {
  position: absolute;
  top: 50%;
  left: -8px;
  width: 4px;
  height: 4px;
  content: "";
  background: #cbd5e1;
  border-radius: 50%;
  transform: translateY(-50%);
}

.action-row-state {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.risk-lane {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 14px 18px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.risk-lane:hover,
.risk-lane:focus-visible {
  color: var(--text);
  background: #fbfdff;
}

.risk-lane:last-child {
  border-bottom: 0;
}

.risk-lane span:first-child {
  display: grid;
  gap: 3px;
}

.risk-lane strong {
  color: var(--text);
}

.risk-lane small {
  color: var(--text-muted);
  font-weight: 650;
}

.risk-lane-danger {
  box-shadow: inset 4px 0 0 var(--danger);
}

.risk-lane-warning {
  box-shadow: inset 4px 0 0 var(--warning);
}

.queue-health-table td,
.queue-health-table th {
  white-space: nowrap;
}

.activity-event {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px 18px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.activity-event:hover,
.activity-event:focus-visible {
  color: var(--text);
  background: #fbfdff;
}

.activity-event:last-child {
  border-bottom: 0;
}

.activity-event-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.activity-event-copy strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-event-copy span,
.activity-event time {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 650;
}

.activity-event time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.stuck-list {
  padding: 0;
}

.stuck-row {
  color: var(--text);
}

.stuck-row:hover,
.stuck-row:focus-visible {
  color: var(--text);
  background: #fbfdff;
}

.throughput-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.throughput-grid > div {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.throughput-grid > div:nth-child(2n) {
  border-right: 0;
}

.throughput-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.throughput-grid span {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 760;
}

.throughput-grid strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.overdue-clear-panel {
  border-style: dashed;
}

.my-work-panel,
.operations-dashboard-grid {
  margin-bottom: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.queue-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-card);
}

.card {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-card);
}

.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  margin: 0;
  font-size: var(--ot-font-size-section-title);
  font-weight: 760;
  letter-spacing: 0;
}

.panel-header p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
}

.ops-table {
  color: var(--text);
  font-size: var(--ot-font-size-table);
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.ops-table th {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  background: #F8FAFC;
}

.ops-table th,
.ops-table td {
  padding: 10px 16px;
  border-color: var(--border);
  vertical-align: middle;
}

.ops-table tbody tr:hover td {
  background: #FBFDFF;
}

.table-title {
  display: block;
  color: var(--text);
  font-weight: 760;
}

.table-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
}

.table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.table-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  color: var(--primary);
  border: 1px solid transparent;
  border-radius: var(--ot-radius-md);
  font-size: 0.82rem;
  font-weight: 700;
}

.table-actions a:hover,
.table-actions a:focus-visible {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: rgba(var(--ot-primary-rgb), 0.18);
  text-decoration: none;
}

.table-actions a.table-action-icon {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  justify-content: center;
  padding: 0;
  color: var(--primary-strong);
  background: #FFFFFF;
  border-color: rgba(var(--ot-primary-rgb), 0.18);
  box-shadow: 0 1px 3px rgba(var(--ot-ink-rgb), 0.06);
}

.table-actions a.table-action-icon:hover,
.table-actions a.table-action-icon:focus-visible {
  color: var(--primary);
  background: var(--ot-primary-soft);
  border-color: rgba(var(--ot-primary-rgb), 0.28);
  box-shadow: 0 6px 14px rgba(var(--ot-ink-rgb), 0.12);
}

.table-action-tooltip .tooltip-inner {
  padding: 7px 9px;
  color: #FFFFFF;
  background: var(--ot-brand-navy);
  border-radius: var(--ot-radius-md);
  box-shadow: var(--ot-shadow-popover);
  font-size: 0.76rem;
  font-weight: 740;
  letter-spacing: 0;
}

.table-action-tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-right-color: var(--ot-brand-navy);
}

.table-action-tooltip.bs-tooltip-start .tooltip-arrow::before {
  border-left-color: var(--ot-brand-navy);
}

.table-action-tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: var(--ot-brand-navy);
}

.table-action-tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: var(--ot-brand-navy);
}

.table-responsive[tabindex] {
  scrollbar-width: thin;
}

.table-responsive[tabindex]:focus-visible {
  outline: 2px solid var(--ot-focus-outline);
  outline-offset: 3px;
  border-radius: var(--ot-radius-md);
}

.work-list-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: -2px 0 18px;
}

.work-saved-view-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px;
}

.work-saved-view-main,
.work-saved-view-actions,
.work-view-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.work-saved-view-main {
  justify-content: space-between;
}

.work-saved-view-main > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.work-saved-view-main strong {
  color: var(--text);
  font-size: 1rem;
}

.work-view-picker .form-select {
  width: min(280px, 58vw);
}

.work-saved-view-actions form {
  margin: 0;
}

.work-saved-view-list {
  display: grid;
  gap: 10px;
}

.work-saved-view-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, auto) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
  background: var(--surface);
}

.work-saved-view-rename {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.work-saved-view-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
}

.work-column-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
}

.work-column-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.work-summary-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 96px;
  padding: 14px 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-card);
}

a.work-summary-card:hover,
a.work-summary-card:focus-visible {
  color: var(--text);
  border-color: rgba(var(--ot-primary-rgb), 0.28);
  box-shadow: 0 4px 14px rgba(var(--ot-ink-rgb), 0.08);
  text-decoration: none;
}

.work-summary-card.is-warning {
  border-top-color: var(--warning);
}

.work-summary-card.is-danger {
  border-top-color: var(--danger);
}

.work-summary-card span {
  color: var(--text-muted);
  font-size: var(--ot-font-size-label);
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-summary-card strong {
  color: var(--text);
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.work-summary-card small {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 650;
}

.queue-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.work-view-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: -4px 0 18px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
}

.work-view-tab {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 760;
  border: 1px solid transparent;
  border-radius: var(--ot-radius-md);
}

.work-view-tab:hover,
.work-view-tab:focus-visible {
  color: var(--primary-strong);
  background: #f8fafc;
}

.work-view-tab.active {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

.work-list-panel {
  overflow: hidden;
}

.queue-process-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.queue-process-filter {
  display: grid;
  grid-template-columns: minmax(240px, 420px) auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
}

.queue-items-panel {
  overflow: hidden;
}

.queue-panel-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.work-table-wrap {
  max-height: min(760px, calc(100vh - 280px));
  overflow: auto;
}

.queue-table-wrap {
  max-height: min(760px, calc(100vh - 280px));
  overflow: auto;
}

.work-items-table {
  min-width: 1180px;
}

.queue-items-table {
  min-width: 1080px;
}

.work-items-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.queue-items-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.work-item-row td {
  background-clip: padding-box;
}

.work-item-row.is-overdue td:first-child {
  box-shadow: inset 4px 0 0 var(--danger);
}

.work-item-row.is-at-risk td:first-child {
  box-shadow: inset 4px 0 0 var(--warning);
}

.work-item-row.is-paused td:first-child {
  box-shadow: inset 4px 0 0 #94a3b8;
}

.work-item-number {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 820;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.work-title-cell {
  min-width: 240px;
}

.work-due,
.work-updated,
.work-card-footer > span:first-child {
  display: grid;
  gap: 2px;
}

.work-due strong,
.work-updated strong,
.work-card-footer strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 760;
  white-space: nowrap;
}

.work-due small,
.work-updated small,
.work-card-footer small {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.work-row-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

.work-row-actions a {
  margin-left: 0;
}

.work-item-card-list {
  display: none;
}

.queue-item-card-list {
  display: none;
}

.work-item-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.work-item-card.is-overdue {
  box-shadow: inset 4px 0 0 var(--danger);
}

.work-item-card.is-at-risk {
  box-shadow: inset 4px 0 0 var(--warning);
}

.work-card-topline,
.work-card-footer,
.work-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.work-card-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 700;
}

.work-card-id {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}

.work-card-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.work-filter {
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(150px, 0.7fr)) auto;
}

.work-list-filter {
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(150px, 0.72fr)) auto;
}

.notification-filter {
  grid-template-columns: minmax(150px, auto) repeat(2, minmax(180px, 0.7fr)) auto;
}

.ui-filter-bar {
  margin-bottom: 0;
}

.ui-filter-search {
  min-width: min(100%, 260px);
}

.ui-search-control {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.ui-search-icon {
  position: absolute;
  left: 12px;
  z-index: 1;
  color: var(--text-muted);
  pointer-events: none;
}

.ui-search-input {
  width: 100%;
  padding-left: 38px;
}

.ui-search-shortcut {
  position: absolute;
  right: 10px;
  padding: 2px 6px;
  color: var(--text-muted);
  background: #EEF2F7;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-sm);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
}

.ui-search-control:focus-within .ui-search-icon {
  color: var(--primary);
}

.ui-search-control:focus-within .ui-search-shortcut {
  border-color: rgba(var(--ot-primary-rgb), 0.28);
}

.ui-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.ui-active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.ui-active-filter-label {
  color: var(--text-muted);
  font-size: var(--ot-font-size-label);
  font-weight: 760;
}

.ui-active-filter-list {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.ui-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--text-strong);
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
  font-size: 0.8rem;
  font-weight: 720;
  line-height: 1.2;
  text-decoration: none;
}

.ui-filter-chip span {
  color: var(--text-muted);
  font-weight: 760;
}

.ui-filter-chip strong {
  color: var(--text-strong);
  font-weight: 800;
}

.ui-filter-chip-info,
.ui-filter-chip-primary {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

a.ui-filter-chip:hover,
a.ui-filter-chip:focus-visible {
  color: var(--primary-strong);
  border-color: rgba(var(--ot-primary-rgb), 0.42);
  text-decoration: none;
}

.filter-field {
  display: grid;
  gap: 5px;
}

.filter-field label,
.form-field label {
  color: var(--text-muted);
  font-size: var(--ot-font-size-label);
  font-weight: 760;
}

.filter-field.wide {
  min-width: 0;
}

.check-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--text-muted);
  font-weight: 700;
}

.button-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.form-panel {
  max-width: 900px;
}

.ops-form {
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.span-2 {
  grid-column: span 2;
}

.form-actions {
  justify-content: flex-start;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.identity-summary {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
}

.identity-summary strong {
  font-weight: 760;
}

.identity-summary span {
  color: var(--text-muted);
}

.role-check-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.role-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  background: #fbfcfe;
}

.role-check input {
  margin-top: 3px;
}

.role-check span {
  display: grid;
  gap: 2px;
}

.role-check strong {
  font-weight: 760;
}

.role-check small {
  color: var(--text-muted);
  line-height: 1.4;
}

.work-item-form-panel {
  max-width: 1120px;
}

.dynamic-section {
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.dynamic-section-success {
  border-left: 3px solid var(--success);
}

.dynamic-section-danger {
  border-left: 3px solid var(--danger);
}

.dynamic-section:last-of-type {
  border-bottom: 0;
}

.dynamic-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 0 12px;
}

.dynamic-section-header h2 {
  margin: 0;
  font-size: var(--ot-font-size-section-title);
  font-weight: 760;
}

.dynamic-section-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dynamic-section-error {
  color: var(--danger) !important;
  font-weight: 700;
}

.required-marker {
  color: var(--danger);
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  color: var(--danger);
  font-size: 0.72rem;
  font-weight: 820;
  line-height: 1.2;
  background: var(--ot-danger-bg);
  border: 1px solid rgba(var(--ot-danger-rgb), 0.18);
  border-radius: 999px;
}

.field-help {
  margin: -1px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.form-control.is-invalid,
.form-select.is-invalid,
.dynamic-check.is-invalid {
  border-color: rgba(var(--ot-danger-rgb), 0.72);
  box-shadow: 0 0 0 0.16rem rgba(var(--ot-danger-rgb), 0.12);
}

.form-field.has-error {
  padding: 12px;
  background: #fffafa;
  border: 1px solid rgba(var(--ot-danger-rgb), 0.18);
  border-radius: var(--ot-radius-md);
}

.dynamic-check {
  justify-content: flex-start;
}

.field-validation {
  margin: 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.validation-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px 16px;
  color: var(--danger);
  background: var(--ot-danger-bg);
  border: 1px solid rgba(var(--ot-danger-rgb), 0.24);
  border-radius: var(--ot-radius-lg);
}

.validation-summary.validation-summary-valid,
.field-validation-valid {
  display: none;
}

.validation-summary:focus-visible {
  outline: 2px solid var(--ot-focus-outline);
  outline-offset: 2px;
}

.validation-summary strong {
  color: var(--danger);
}

.validation-summary p {
  margin: 0;
}

.validation-summary ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 1.1rem;
}

.validation-summary a {
  color: var(--danger);
  font-weight: 760;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ui-validation-summary-warning {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.28);
}

.ui-validation-summary-warning strong,
.ui-validation-summary-warning a {
  color: #92400E;
}

.ui-validation-summary-info {
  color: var(--info);
  background: var(--ot-info-bg);
  border-color: rgba(var(--ot-info-rgb), 0.24);
}

.ui-validation-summary-info strong,
.ui-validation-summary-info a {
  color: #075985;
}

.ui-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.ui-pagination-summary {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 760;
}

.ui-pagination .page-link {
  color: var(--primary-strong);
  border-color: var(--border);
}

.ui-pagination .page-item.active .page-link {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.ui-confirmation-modal .modal-content {
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-modal);
}

.ui-confirmation-modal .modal-title {
  color: var(--text-strong);
  font-size: 1.05rem;
  font-weight: 760;
}

.ui-confirmation-modal .modal-body p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 650;
}

.ui-confirmation-modal-form {
  margin: 0;
}

.file-reference-field {
  display: grid;
  gap: 8px;
}

.file-upload-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.status-pill,
.flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}

.status-pill {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

.status-active,
.status-success {
  color: var(--success);
  background: var(--ot-success-bg);
  border-color: rgba(var(--ot-success-rgb), 0.22);
}

.status-muted {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.status-neutral {
  color: #475569;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.status-progress,
.status-primary {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

.status-info {
  color: var(--info);
  background: var(--ot-info-bg);
  border-color: rgba(var(--ot-info-rgb), 0.22);
}

.status-warning {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.22);
}

.status-danger {
  color: var(--danger);
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.22);
}

.flag-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.flag-danger {
  color: var(--danger);
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.2);
}

.flag-warning {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.2);
}

.flag-info {
  color: var(--info);
  background: var(--ot-info-bg);
  border-color: rgba(var(--ot-info-rgb), 0.2);
}

.flag-muted {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.flag-primary {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

.flag-success {
  color: var(--success);
  background: var(--ot-success-bg);
  border-color: rgba(var(--ot-success-rgb), 0.2);
}

.chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 9px;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.ui-status-chip-icon {
  display: inline-grid;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
}

.ui-status-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-neutral,
.chip-paused {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.chip-paused .ui-status-chip-icon {
  width: 9px;
  height: 9px;
  background:
    linear-gradient(currentColor, currentColor) 25% 0 / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 75% 0 / 2px 100% no-repeat;
  border-radius: 0;
}

.chip-primary {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

.chip-info {
  color: var(--info);
  background: var(--ot-info-bg);
  border-color: rgba(var(--ot-info-rgb), 0.2);
}

.chip-success {
  color: var(--success);
  background: var(--ot-success-bg);
  border-color: rgba(var(--ot-success-rgb), 0.2);
}

.chip-warning {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.2);
}

.chip-danger {
  color: var(--danger);
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.2);
}

.chip-overdue {
  color: var(--danger);
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.2);
}

.chip-at-risk {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.2);
}

.sla-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 9px;
  font-size: 0.8rem;
  font-weight: 780;
  line-height: 1.2;
  text-align: left;
  white-space: normal;
  border: 1px solid transparent;
  border-radius: 999px;
}

.sla-badge-on-track {
  color: var(--success);
  background: var(--ot-success-bg);
  border-color: rgba(var(--ot-success-rgb), 0.22);
}

.sla-badge-due-soon,
.sla-badge-at-risk {
  color: var(--warning);
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.22);
}

.sla-badge-overdue {
  color: var(--danger);
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.22);
}

.sla-badge-paused {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.attention-list,
.workload-list,
.activity-list,
.personal-summary-list {
  display: grid;
}

.attention-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.attention-item:hover,
.attention-item:focus {
  color: var(--text);
  background: #fbfcfe;
}

.attention-item:last-child,
.workload-row:last-child,
.activity-row:last-child {
  border-bottom: 0;
}

.attention-bar {
  width: 8px;
  height: 100%;
  min-height: 52px;
  border-radius: 999px;
  background: var(--text-muted);
}

.attention-item.is-danger .attention-bar {
  background: var(--danger);
}

.attention-item.is-warning .attention-bar {
  background: var(--warning);
}

.attention-item.is-info .attention-bar {
  background: var(--info);
}

.attention-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attention-title {
  overflow: hidden;
  color: var(--text);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-meta,
.attention-side,
.activity-row span,
.activity-row time,
.workload-row span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.attention-side {
  display: grid;
  gap: 6px;
  justify-items: end;
  white-space: nowrap;
}

.personal-summary-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.personal-summary-list > div {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.personal-summary-list > div:nth-child(2n) {
  border-right: 0;
}

.personal-summary-list > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.personal-summary-list span {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.personal-summary-list strong {
  align-self: end;
  font-size: 1.55rem;
  line-height: 1;
}

.priority-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
}

.priority-chip::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--priority-color, var(--border));
  border-radius: 50%;
}

.dashboard-work-table tr.is-overdue td {
  background: var(--ot-danger-bg);
}

.dashboard-work-table tr.is-stalled td {
  background: var(--ot-warning-bg);
}

.dashboard-work-table tr.is-due-soon td {
  background: var(--ot-info-bg);
}

.workload-row,
.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.activity-row:hover,
.activity-row:focus {
  color: var(--text);
  background: #fbfcfe;
}

.workload-row > div,
.activity-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.workload-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.priority-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 6px;
  background: var(--priority-color);
  border-radius: 50%;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-strip > div {
  display: grid;
  gap: 4px;
  min-height: 88px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--shadow);
}

.summary-strip strong {
  overflow: hidden;
  font-size: 1.05rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.details-list {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px 18px;
  margin: 0;
  padding: 18px;
}

.details-list dt {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.details-list dd {
  margin: 0;
  min-width: 0;
}

.email-audit-filter-panel .panel-header {
  align-items: center;
  padding: 14px 18px 10px;
}

.email-audit-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  padding: 12px 18px 16px;
}

.audit-log-filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  padding: 12px 18px 16px;
}

.email-audit-filter-grid .form-field {
  gap: 4px;
  min-width: 0;
}

.audit-log-filter-grid .form-field {
  gap: 4px;
  min-width: 0;
}

.email-audit-filter-grid .form-control,
.email-audit-filter-grid .form-select,
.email-audit-filter-grid .btn,
.audit-log-filter-grid .form-control,
.audit-log-filter-grid .form-select,
.audit-log-filter-grid .btn {
  min-height: 36px;
  font-size: 0.9rem;
}

.email-audit-filter-grid .form-field-actions .btn,
.audit-log-filter-grid .form-field-actions .btn {
  white-space: nowrap;
}

.audit-log-warning {
  display: grid;
  gap: 4px;
}

.audit-log-summary-cell,
.audit-log-detail-value {
  max-width: 420px;
  overflow-wrap: anywhere;
}

.audit-log-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.audit-log-event-id {
  color: var(--text);
  font-size: 0.84rem;
  overflow-wrap: anywhere;
}

.form-field-actions {
  display: flex;
  align-items: end;
  min-height: 100%;
}

@media (max-width: 920px) {
  .email-audit-filter-grid,
  .audit-log-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-saved-view-row {
    grid-template-columns: 1fr;
  }
}

.email-audit-detail-grid,
.audit-log-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.email-audit-detail-grid .details-panel,
.audit-log-detail-grid .details-panel {
  min-width: 0;
}

.kpi-scorecard-filter-panel {
  margin-bottom: 20px;
}

.kpi-scorecard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.kpi-scorecard-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px;
  align-items: end;
}

.kpi-target-panel,
.kpi-scorecard-section {
  margin-top: 20px;
}

.kpi-target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.kpi-scorecard-table-wrap {
  max-height: 620px;
}

.kpi-scorecard-table th {
  white-space: nowrap;
}

.kpi-scorecard-table td {
  vertical-align: top;
}

.kpi-target-chip {
  margin-left: 6px;
  transform: translateY(-1px);
}

.kpi-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.kpi-trend-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--surface);
}

.kpi-trend-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.kpi-trend-card-header strong,
.kpi-trend-card-header span {
  display: block;
}

.kpi-trend-card-header span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.description-block {
  padding: 18px 18px 0;
}

.description-block p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.custom-fields-panel {
  margin-bottom: 18px;
}

.custom-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.custom-field-item {
  display: grid;
  gap: 3px;
  min-height: 112px;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.custom-field-item span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 760;
  text-transform: uppercase;
}

.custom-field-item strong {
  font-size: 0.94rem;
}

.custom-field-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.danger-action {
  padding: 0 18px 18px;
}

.work-list,
.queue-nav,
.timeline,
.compact-section {
  display: grid;
}

.work-list-item,
.queue-link,
.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.work-list-item:last-child,
.queue-link:last-child,
.compact-row:last-child {
  border-bottom: 0;
}

.work-list-item {
  color: var(--text);
}

.work-list-item > span:first-child,
.queue-link > span:first-child,
.compact-row > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.work-list-item small,
.queue-link small,
.compact-row small {
  color: var(--text-muted);
}

.queue-link {
  color: var(--text);
  border-left: 3px solid transparent;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.queue-link:hover,
.queue-link:focus-visible,
.queue-link.active {
  color: var(--primary-strong);
  background: #f3f6fb;
  border-left-color: var(--primary);
  text-decoration: none;
}

.ui-queue-card {
  min-height: 64px;
}

.ui-queue-card strong {
  font-weight: 780;
}

.ui-queue-card.active {
  background: var(--ot-primary-soft);
}

.ui-queue-card.active small {
  color: var(--primary-strong);
}

.queue-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.stage-progress {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 18px;
  list-style: none;
}

.stage-progress li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  min-height: 54px;
  color: var(--text-muted);
  position: relative;
}

.stage-progress li::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -2px;
  left: 6px;
  width: 2px;
  background: var(--border);
}

.stage-progress li:last-child::before {
  display: none;
}

.stage-progress li > span {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  background: #d7deea;
  border-radius: 50%;
  z-index: 1;
}

.stage-progress li.complete > span,
.stage-progress li.current > span {
  background: var(--primary);
}

.stage-progress li.current {
  color: var(--text);
}

.stage-progress strong,
.compact-row strong {
  color: var(--text);
}

.stage-progress small {
  display: block;
  color: var(--text-muted);
}

.timeline {
  padding: 4px 18px 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.timeline-item p {
  margin: 2px 0;
  color: var(--text-muted);
}

.timeline-item small {
  color: var(--text-muted);
}

.ui-timeline-copy {
  display: grid;
  gap: 3px;
}

.ui-timeline-copy strong {
  color: var(--text);
}

.ui-timeline-copy time {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ui-timeline-item-success .timeline-dot {
  background: var(--success);
}

.ui-timeline-item-warning,
.ui-timeline-item-at-risk {
  background: var(--ot-warning-bg);
}

.ui-timeline-item-warning .timeline-dot,
.ui-timeline-item-at-risk .timeline-dot {
  background: var(--warning);
}

.ui-timeline-item-danger .timeline-dot,
.ui-timeline-item-overdue .timeline-dot {
  background: var(--danger);
}

.compact-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.compact-section:last-child {
  border-bottom: 0;
}

.compact-section h3 {
  margin: 0;
  padding: 0 18px 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  gap: 5px;
  min-height: 174px;
  place-content: center;
  padding: 28px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 1rem;
}

.ui-empty-state {
  border-radius: var(--ot-radius-lg);
}

.ui-empty-state-action {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.ui-empty-state-info {
  background: var(--ot-info-bg);
}

.ui-empty-state-warning,
.ui-empty-state-at-risk {
  background: var(--ot-warning-bg);
}

.ui-empty-state-danger,
.ui-empty-state-overdue {
  background: var(--ot-danger-bg);
}

.ui-data-table-card .panel-header {
  border-bottom: 1px solid var(--border);
}

.ui-data-table-scroll {
  max-height: min(720px, calc(100vh - 260px));
  overflow: auto;
  scrollbar-width: thin;
}

.ui-data-table-scroll.has-sticky-header .ops-table thead th,
.ui-data-table-scroll.has-sticky-header table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.ui-form-section {
  overflow: hidden;
}

.ui-form-section-complete,
.ui-form-section-success {
  border-left: 4px solid var(--success);
}

.ui-form-section-error,
.ui-form-section-danger {
  border-left: 4px solid var(--danger);
}

.ui-form-section-warning,
.ui-form-section-at-risk {
  border-left: 4px solid var(--warning);
}

.ui-form-section-body {
  padding: 0 18px 18px;
}

.ui-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-card);
}

.ui-alert-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.82rem;
}

.ui-alert-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.ui-alert-copy span {
  min-width: 0;
}

.ui-alert strong {
  font-weight: 780;
}

.ui-alert-success .ui-alert-icon {
  color: var(--success);
  background: var(--ot-success-bg);
}

.ui-alert-warning .ui-alert-icon {
  color: var(--warning);
  background: var(--ot-warning-bg);
}

.ui-alert-danger .ui-alert-icon {
  color: var(--danger);
  background: var(--ot-danger-bg);
}

.ui-alert-info .ui-alert-icon {
  color: var(--info);
  background: var(--ot-info-bg);
}

.ui-alert .btn-close {
  margin-left: auto;
}

.notifications-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notification-mark-all-form {
  display: flex;
  justify-content: flex-end;
  margin: -12px 0 18px;
}

.notification-quick-filters {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: -4px 0 18px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
}

.notification-quick-filter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 760;
  border: 1px solid transparent;
  border-radius: var(--ot-radius-md);
}

.notification-quick-filter:hover,
.notification-quick-filter:focus-visible {
  color: var(--primary-strong);
  background: #f8fafc;
}

.notification-quick-filter.active {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

.notification-panel {
  overflow: hidden;
}

.notification-list {
  display: grid;
}

.notification-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.notification-row.unread {
  background: var(--ot-primary-soft);
}

.notification-row-danger {
  box-shadow: inset 4px 0 0 var(--danger);
}

.notification-row-warning {
  box-shadow: inset 4px 0 0 var(--warning);
}

.notification-row-info {
  box-shadow: inset 4px 0 0 var(--info);
}

.notification-row:last-child {
  border-bottom: 0;
}

.notification-severity {
  width: 10px;
  min-height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

.notification-severity.info {
  background: var(--info);
}

.notification-severity.warning {
  background: var(--warning);
}

.notification-severity.danger {
  background: var(--danger);
}

.notification-severity.success {
  background: var(--success);
}

.notification-content {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.notification-title-row,
.notification-meta,
.notification-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-title-row {
  justify-content: space-between;
  align-items: flex-start;
}

.notification-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.notification-content p {
  margin: 0;
  color: var(--text-muted);
}

.notification-sla-copy {
  color: var(--warning) !important;
  font-size: 0.86rem;
  font-weight: 760;
}

.notification-meta {
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.notification-category {
  flex: 0 0 auto;
}

.notification-actions {
  justify-content: flex-end;
}

.notification-actions form {
  margin: 0;
}

.deadline-list {
  display: grid;
}

.deadline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.deadline-item:last-child {
  border-bottom: 0;
}

.deadline-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.deadline-item strong,
.deadline-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-item span,
.deadline-item time {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.deadline-item time {
  flex: 0 0 auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.page-timestamp {
  color: var(--text-muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.process-stack {
  display: grid;
  gap: 18px;
}

.process-panel {
  overflow: hidden;
}

.process-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.process-overview-grid > div {
  display: grid;
  gap: 3px;
  min-height: 106px;
  padding: 16px 18px;
  border-right: 1px solid var(--border);
}

.process-overview-grid > div:last-child {
  border-right: 0;
}

.process-overview-grid span {
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 760;
  text-transform: uppercase;
}

.process-overview-grid strong {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-overview-grid small {
  color: var(--text-muted);
}

.process-detail-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, 0.55fr);
  align-items: stretch;
  height: min(420px, 58vh);
  overflow: hidden;
}

.process-detail-grid > .table-responsive {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}

.process-transition-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
  border-bottom: 0;
  border-left: 1px solid var(--border);
}

.process-transition-list h3 {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.process-transition-scroll {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.process-transition-scroll .compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.process-transition-list .flag-group {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  min-width: max-content;
}

.process-transition-list .chip {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
}

.process-transition-list .ui-status-chip-label {
  overflow: visible;
  text-overflow: clip;
}

.transition-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.transition-action:last-child {
  border-bottom: 0;
}

.transition-action > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.transition-action small {
  color: var(--text-muted);
}

.reports-grid {
  align-items: start;
  margin-bottom: 18px;
}

.reports-filter-panel {
  margin-bottom: 14px;
  overflow: hidden;
}

.reports-filter-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.reports-filter-header h2,
.reports-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--ot-font-size-section-title);
  font-weight: 780;
}

.reports-filter-header p,
.reports-section-heading p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
}

.reports-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.reports-filter-token {
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.reports-filter-token:last-child {
  border-right: 0;
}

.reports-filter-token span {
  color: var(--text-muted);
  font-size: var(--ot-font-size-label);
  font-weight: 760;
  text-transform: uppercase;
}

.reports-filter-token strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-filter-form {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.reports-filter-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reports-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 2px;
}

.report-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 18px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
}

.report-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 760;
  border: 1px solid transparent;
  border-radius: var(--ot-radius-md);
}

.report-tabs a:hover,
.report-tabs a:focus-visible {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
}

.reports-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.reports-section {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  scroll-margin-top: 92px;
}

.reports-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.report-bar-list {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.report-bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.62fr) minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.report-bar-row > span:first-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.report-bar-row strong {
  color: var(--text);
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.report-bar-row small {
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-bar-track {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 999px;
}

.report-bar-fill {
  display: block;
  width: calc(var(--bar-value) * 1%);
  min-width: 4px;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
}

.report-bar-fill-primary {
  background: var(--primary);
}

.report-bar-fill-success {
  background: var(--success);
}

.report-bar-fill-warning {
  background: var(--warning);
}

.report-bar-fill-danger {
  background: var(--danger);
}

.report-bar-fill-info {
  background: var(--info);
}

.reports-status-list {
  display: grid;
}

.reports-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.reports-status-row:last-child {
  border-bottom: 0;
}

.reports-status-row span {
  display: grid;
  gap: 2px;
}

.reports-status-row strong,
.reports-status-row b {
  color: var(--text);
  font-weight: 780;
}

.reports-status-row small {
  color: var(--text-muted);
}

.reports-status-row b {
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.reports-status-row.is-danger {
  box-shadow: inset 4px 0 0 var(--danger);
}

.reports-status-row.is-warning {
  box-shadow: inset 4px 0 0 var(--warning);
}

.reports-status-row.is-success {
  box-shadow: inset 4px 0 0 var(--success);
}

.reports-status-row.is-info {
  box-shadow: inset 4px 0 0 var(--info);
}

.reports-workload-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
}

.reports-workload-layout .report-bar-list {
  border-right: 1px solid var(--border);
}

.report-table-wrap {
  max-height: min(760px, calc(100vh - 260px));
  overflow: auto;
}

.report-table {
  min-width: 920px;
}

.report-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.report-inline-bar {
  display: block;
  width: min(180px, 100%);
  height: 9px;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 999px;
}

.report-inline-bar span {
  display: block;
  width: calc(var(--bar-value) * 1%);
  min-width: 4px;
  max-width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: inherit;
}

.reports-export-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
}

.reports-export-card {
  display: grid;
  gap: 4px;
  min-height: 112px;
  padding: 14px;
  background: #fbfcfe;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
}

.reports-export-card strong {
  color: var(--text);
  font-weight: 780;
}

.reports-export-card span {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  line-height: 1.45;
}

.admin-grid,
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.admin-area-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-card);
}

.admin-area-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: var(--ot-radius-md);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.2;
}

.admin-area-nav-link:hover,
.admin-area-nav-link:focus-visible,
.admin-area-nav-link.active {
  color: var(--primary-strong);
  background: var(--ot-primary-soft);
  border-color: #c7d7fe;
  text-decoration: none;
}

.admin-area-nav-link.active .ui-side-nav-icon,
.admin-area-nav-link:hover .ui-side-nav-icon,
.admin-area-nav-link:focus-visible .ui-side-nav-icon {
  color: var(--primary);
  background: var(--surface);
  border-color: rgba(var(--ot-primary-rgb), 0.24);
}

.ui-permission-notice {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: -8px 0 18px;
  padding: 12px 14px;
  background: var(--ot-info-bg);
  border: 1px solid rgba(var(--ot-info-rgb), 0.22);
  border-radius: var(--ot-radius-lg);
}

.ui-permission-notice > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ui-permission-notice strong {
  color: var(--text-strong);
  font-weight: 780;
}

.ui-permission-notice p,
.ui-permission-notice span {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 650;
}

.ui-permission-notice-warning {
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.26);
}

.ui-permission-notice-danger {
  background: var(--ot-danger-bg);
  border-color: rgba(var(--ot-danger-rgb), 0.24);
}

.admin-summary-strip > div {
  border-top: 3px solid #c7d7fe;
}

.admin-summary-strip > div:nth-child(2) {
  border-top-color: var(--primary);
}

.admin-summary-strip > div:nth-child(3) {
  border-top-color: var(--info);
}

.admin-summary-strip > div:nth-child(4) {
  border-top-color: var(--ot-brand-cyan);
}

.admin-hub {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-hub-group {
  display: grid;
  gap: 12px;
}

.admin-hub-group-header {
  display: grid;
  gap: 3px;
}

.admin-hub-group-header h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--ot-font-size-section-title);
  font-weight: 780;
}

.admin-hub-group-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
}

.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-module-card {
  display: grid;
  align-content: space-between;
  gap: 14px;
  min-height: 152px;
  padding: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
}

.admin-module-card.is-linked:hover,
.admin-module-card.is-linked:focus-visible {
  color: var(--text);
  border-color: #c7d7fe;
  box-shadow: inset 3px 0 0 var(--primary);
}

.admin-module-card.is-disabled {
  background: #fbfcfe;
}

.admin-module-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-module-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  background: var(--ot-primary-soft);
  border: 1px solid rgba(var(--ot-primary-rgb), 0.18);
  border-radius: var(--ot-radius-md);
  font-size: 0.82rem;
}

.admin-module-card.is-disabled .admin-module-icon {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.admin-module-kicker {
  min-width: 0;
  overflow: hidden;
  color: var(--primary-strong);
  font-size: var(--ot-font-size-label);
  font-weight: 820;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-module-card strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.42;
}

.admin-module-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 700;
}

.admin-role-list {
  display: grid;
}

.admin-role-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.admin-role-row:last-child {
  border-bottom: 0;
}

.admin-role-row > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-role-title {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-role-title strong {
  color: var(--text);
  font-weight: 780;
}

.admin-role-row small {
  color: var(--text-muted);
  line-height: 1.4;
}

.admin-role-count {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  font-weight: 760;
  white-space: nowrap;
}

.admin-permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-permission-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 760;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-sm);
}

.admin-users-panel,
.admin-teams-panel,
.admin-team-members-panel,
.admin-workflow-panel,
.admin-sla-panel,
.admin-notification-panel,
.admin-integration-panel,
.admin-dynamic-form-panel {
  overflow: hidden;
}

.admin-users-table-wrap,
.admin-teams-table-wrap,
.admin-team-members-table-wrap,
.admin-workflow-table-wrap,
.admin-sla-table-wrap,
.admin-notification-table-wrap,
.admin-integration-table-wrap,
.admin-dynamic-form-table-wrap {
  max-height: min(760px, calc(100vh - 300px));
  overflow: auto;
}

.admin-users-table,
.admin-teams-table,
.admin-team-members-table,
.admin-workflow-table,
.admin-sla-table,
.admin-notification-table,
.admin-integration-table,
.admin-dynamic-form-table,
.admin-dynamic-form-options-table {
  min-width: 980px;
}

.admin-users-table thead th,
.admin-teams-table thead th,
.admin-team-members-table thead th,
.admin-workflow-table thead th,
.admin-sla-table thead th,
.admin-notification-table thead th,
.admin-integration-table thead th,
.admin-dynamic-form-table thead th,
.admin-dynamic-form-options-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-user-row-muted td:first-child {
  box-shadow: inset 4px 0 0 #94a3b8;
}

.admin-user-row-warning td:first-child {
  box-shadow: inset 4px 0 0 var(--warning);
}

.admin-user-email {
  display: block;
  color: var(--text);
  font-weight: 700;
}

.admin-table-actions {
  min-width: 122px;
  white-space: nowrap;
}

.admin-user-detail-grid,
.admin-team-detail-grid,
.admin-workflow-detail-grid,
.admin-sla-detail-grid,
.admin-sla-preview-grid,
.admin-notification-detail-grid,
.admin-notification-form-grid,
.admin-integration-detail-grid,
.admin-integration-form-grid,
.admin-dynamic-form-detail-grid {
  align-items: stretch;
}

.details-muted {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
}

.admin-user-form-panel,
.admin-team-form-panel,
.admin-workflow-form-panel,
.admin-sla-form-panel,
.admin-notification-form-panel,
.admin-integration-form-panel,
.admin-dynamic-form-form-panel {
  max-width: 980px;
}

.admin-team-filter-bar,
.admin-workflow-filter-bar,
.admin-sla-filter-bar,
.admin-notification-filter-bar,
.admin-integration-filter-bar,
.admin-dynamic-form-filter-bar {
  border-bottom: 1px solid var(--border);
}

.admin-team-active-filters,
.admin-workflow-active-filters,
.admin-sla-active-filters,
.admin-notification-active-filters,
.admin-integration-active-filters,
.admin-dynamic-form-active-filters {
  margin: 12px 18px 0;
}

.admin-workflow-tabs {
  margin-top: 18px;
}

.admin-workflow-tab-content {
  padding-top: 18px;
}

.admin-workflow-matrix-panel {
  margin-top: 18px;
  overflow: hidden;
}

.admin-workflow-matrix-wrap {
  max-height: min(680px, calc(100vh - 320px));
  overflow: auto;
}

.admin-workflow-matrix {
  min-width: 980px;
}

.admin-workflow-matrix thead th,
.admin-workflow-matrix tbody th {
  position: sticky;
  background: var(--surface);
  z-index: 1;
}

.admin-workflow-matrix thead th {
  top: 0;
}

.admin-workflow-matrix tbody th {
  left: 0;
}

.admin-workflow-matrix td,
.admin-workflow-matrix th {
  min-width: 150px;
  vertical-align: top;
}

.admin-sla-chip-list,
.admin-notification-chip-list,
.admin-integration-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 220px;
}

.admin-sla-detail-chips,
.admin-notification-detail-chips,
.admin-integration-detail-chips {
  padding: 16px 18px 0;
}

.admin-sla-preview-messages {
  padding: 0 18px 12px;
}

.admin-notification-summary {
  max-width: 460px;
  white-space: normal;
}

.admin-notification-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.admin-notification-variable-panel {
  align-self: start;
}

.admin-integration-guidance-panel {
  align-self: start;
}

.admin-check-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 18px 18px 38px;
  color: var(--text);
  font-size: var(--ot-font-size-body);
}

.admin-check-list li::marker {
  color: var(--ot-brand-blue);
}

.admin-notification-variable-list {
  padding: 16px 18px 18px;
}

.admin-dynamic-form-section-panel {
  margin-top: 18px;
}

.admin-dynamic-form-inline-actions {
  padding: 0 18px 14px;
  border-bottom: 1px solid var(--border);
}

.admin-dynamic-form-preview {
  padding: 0 18px 18px;
}

.admin-dynamic-form-options-wrap {
  max-height: 480px;
  overflow: auto;
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-sm);
}

.admin-team-member-add {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.admin-team-member-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.admin-team-member-form .form-field {
  margin: 0;
}

.form-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.form-section-heading + .form-grid,
.form-section-heading + .role-check-list {
  margin-bottom: 22px;
}

.form-section-heading h2 {
  margin: 0;
  font-size: var(--ot-font-size-section-title);
  font-weight: 780;
}

.form-section-heading p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
}

.admin-access-toggle {
  align-items: flex-start;
  padding: 12px 14px;
  background: #fbfcfe;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
}

.admin-access-toggle span {
  display: grid;
  gap: 2px;
}

.admin-access-toggle strong {
  color: var(--text);
}

.admin-access-toggle small {
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
}

.admin-role-check-list {
  margin-top: 0;
}

.admin-identity-summary {
  margin-bottom: 14px;
}

.admin-security-note {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--ot-info-bg);
  border: 1px solid rgba(var(--ot-info-rgb), 0.22);
  border-radius: var(--ot-radius-md);
}

.admin-security-note strong {
  font-weight: 780;
}

.admin-security-note span {
  color: #075985;
  font-size: var(--ot-font-size-metadata);
}

.admin-security-note-warning {
  background: var(--ot-warning-bg);
  border-color: rgba(var(--ot-warning-rgb), 0.24);
}

.admin-security-note-warning span {
  color: #92400e;
}

.account-security-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.account-security-form-panel {
  max-width: none;
}

.account-security-note {
  display: grid;
  gap: 3px;
  margin-bottom: 18px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--ot-info-bg);
  border: 1px solid rgba(var(--ot-info-rgb), 0.22);
  border-radius: var(--ot-radius-md);
}

.account-security-note strong {
  font-weight: 780;
}

.account-security-note span {
  color: #075985;
  font-size: var(--ot-font-size-metadata);
}

.account-security-guide {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.account-security-guide-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.account-security-guide-header .ui-icon {
  width: 36px;
  height: 36px;
  color: var(--primary);
  background: var(--ot-primary-soft);
  border: 1px solid rgba(var(--ot-primary-rgb), 0.2);
  border-radius: var(--ot-radius-md);
}

.account-security-guide h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--ot-font-size-section-title);
  font-weight: 780;
}

.account-security-guide p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: var(--ot-font-size-metadata);
  line-height: 1.45;
}

.account-policy-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-policy-list li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.account-policy-list li::before {
  position: absolute;
  top: 0.38em;
  left: 0;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--ot-success-bg);
}

.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.admin-action-row form {
  margin: 0;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(var(--ot-primary-rgb), 0.08), rgba(var(--ot-brand-cyan-rgb), 0.08) 42%, rgba(var(--ot-brand-orange-rgb), 0.05) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 248, 251, 0.98)),
    var(--surface-muted);
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
  width: min(100%, 440px);
}

.auth-brand-panel,
.auth-panel {
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--ot-shadow-popover);
}

.auth-brand-panel {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 548px;
  overflow: hidden;
  padding: 38px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(var(--ot-ink-rgb), 0.98), rgba(var(--ot-primary-rgb), 0.96) 72%, rgba(var(--ot-brand-cyan-rgb), 0.82)),
    var(--ot-brand-navy);
  border-color: rgba(255, 255, 255, 0.16);
}

.auth-brand-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--ot-brand-cyan), var(--ot-brand-orange));
}

.auth-brand-icon {
  position: absolute;
  top: 28px;
  right: 28px;
  width: 68px;
  height: 68px;
  object-fit: contain;
  opacity: 0.22;
}

.auth-brand-panel .eyebrow {
  color: var(--ot-brand-cyan);
}

.auth-brand-panel h2 {
  max-width: 460px;
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-brand-panel p:not(.eyebrow) {
  max-width: 520px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.55;
}

.auth-capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.auth-capability-list li {
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--ot-radius-md);
  font-size: 0.82rem;
  font-weight: 760;
}

.auth-panel {
  width: 100%;
  background: var(--surface);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 24px 0;
  color: var(--text);
  font-weight: 760;
}

.auth-brand .brand-logo {
  width: auto;
  max-width: min(100%, 320px);
  height: 52px;
}

.auth-heading {
  padding: 24px 24px 4px;
}

.auth-heading h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 760;
}

.auth-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 15px;
  padding: 20px 24px 24px;
}

.auth-check {
  justify-content: flex-start;
  min-height: auto;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-support-link,
.auth-support-note {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.auth-support-text {
  margin: -4px 0 0;
  text-align: center;
  line-height: 1.45;
}

.auth-support-link:hover,
.auth-support-link:focus-visible {
  color: var(--primary-strong);
}

.auth-submit {
  min-height: 44px;
}

.color-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 7px;
  vertical-align: -1px;
  background: var(--swatch-color);
  border: 1px solid rgba(var(--ot-ink-rgb), 0.16);
  border-radius: var(--ot-radius-sm);
}

.work-detail-page-header {
  align-items: flex-start;
}

.work-detail-state-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--ot-radius-lg);
  box-shadow: var(--shadow);
}

.work-detail-state-card.is-at-risk {
  border-left-color: var(--warning);
}

.work-detail-state-card.is-overdue {
  border-left-color: var(--danger);
}

.work-detail-state-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.work-detail-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.work-detail-number {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 820;
  line-height: 1.2;
  background: var(--ot-primary-soft);
  border: 1px solid #c7d7fe;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.priority-chip {
  color: var(--text);
  background: #f8fafc;
  border-color: var(--border);
}

.priority-chip::before {
  width: 8px;
  height: 8px;
  content: "";
  background: var(--priority-color, var(--text-muted));
  border-radius: 999px;
}

.work-detail-state-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 780;
  letter-spacing: 0;
}

.work-detail-state-copy p {
  max-width: 780px;
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.work-detail-state-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.work-detail-state-grid > div {
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
}

.work-detail-state-grid dt,
.work-detail-meta-list dt,
.work-sla-summary dt {
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-detail-state-grid dd,
.work-detail-meta-list dd,
.work-sla-summary dd {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-weight: 760;
}

.work-detail-state-grid dd span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.work-detail-state-grid dd.is-warning {
  color: var(--warning);
}

.work-detail-state-grid dd.is-danger {
  color: var(--danger);
}

.work-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 18px;
  align-items: start;
}

.work-detail-main,
.work-detail-rail {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.work-detail-overview-section .panel-header {
  align-items: flex-start;
}

.work-required-info {
  display: grid;
  gap: 0;
}

.work-overview-block {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.work-overview-block h3,
.work-detail-subheading,
.work-custom-field-section h3 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.work-overview-block p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
}

.work-core-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.work-core-fields > div {
  min-width: 0;
  padding: 15px 18px;
  border-right: 1px solid var(--border);
}

.work-core-fields > div:last-child {
  border-right: 0;
}

.work-core-fields dt {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-core-fields dd {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-custom-field-sections {
  display: grid;
}

.work-custom-field-section {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.work-custom-field-section:last-child {
  border-bottom: 0;
}

.work-custom-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.work-custom-field-item {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
}

.work-custom-field-item span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.work-custom-field-item strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 720;
  line-height: 1.45;
}

.work-detail-process-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(320px, 1fr);
}

.work-detail-process-grid > div {
  min-width: 0;
}

.work-detail-process-grid > div + div {
  border-left: 1px solid var(--border);
}

.work-detail-subheading {
  padding: 18px 18px 0;
}

.work-stage-progress {
  padding-top: 12px;
}

.work-stage-chip {
  width: fit-content;
  margin-top: 6px;
}

.work-transition-list {
  display: grid;
  align-content: start;
}

.work-transition-card {
  background: var(--surface);
}

.work-transition-card:hover {
  background: #fbfdff;
}

.work-transition-copy span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.work-transition-copy textarea {
  margin-top: 4px;
}

.work-detail-empty-state {
  margin: 18px;
  min-height: 132px;
  border: 1px dashed var(--border);
}

.work-financial-panel {
  overflow: hidden;
}

.work-financial-statuses,
.work-financial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.work-financial-errors {
  margin: 14px 18px 0;
}

.work-financial-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.work-financial-summary > div {
  min-height: 82px;
  padding: 15px 18px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.work-financial-summary > div:last-child {
  border-right: 0;
}

.work-financial-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.work-financial-metrics > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 13px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.work-financial-metrics > div:nth-child(3n) {
  border-right: 0;
}

.work-financial-metrics > div:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.work-financial-metrics dt,
.work-financial-lines-header h3,
.work-financial-form h3,
.work-financial-add-line-form h3,
.work-financial-line-readonly dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.work-financial-metrics dd {
  margin: 0;
  color: var(--text);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.work-financial-actions {
  justify-content: flex-start;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.work-financial-form,
.work-financial-add-line-form {
  padding: 0 18px 18px;
  border-bottom: 1px solid var(--border);
}

.work-financial-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.work-financial-form-actions {
  justify-content: flex-start;
  margin-top: 14px;
}

.work-financial-permission-notice {
  margin: 14px 18px;
}

.work-financial-lines {
  display: grid;
}

.work-financial-lines-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.work-financial-lines-header p,
.work-financial-form p,
.work-financial-add-line-form p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.work-financial-line-list {
  display: grid;
}

.work-financial-line-item {
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.work-financial-line-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.work-financial-line-form .span-2 {
  grid-column: span 2;
}

.work-financial-line-total {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 9px 11px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
}

.work-financial-line-total span,
.work-financial-line-readonly span {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 740;
}

.work-financial-line-total strong,
.work-financial-line-readonly strong {
  color: var(--text);
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.work-financial-line-actions {
  justify-content: flex-start;
}

.work-financial-delete-form {
  display: flex;
  justify-content: flex-end;
}

.work-financial-line-readonly {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: center;
}

.work-financial-line-readonly > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.work-financial-line-readonly dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.work-financial-line-readonly dl > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
}

.work-financial-line-readonly dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.work-invoice-panel,
.invoice-list-panel,
.invoice-detail-summary-panel,
.invoice-lines-panel,
.invoice-notes-panel {
  overflow: hidden;
}

.work-invoice-errors {
  margin: 14px 18px 0;
}

.work-invoice-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.work-invoice-action-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.work-invoice-action-row strong {
  color: var(--text);
  font-weight: 780;
}

.work-invoice-action-row span,
.invoice-footer-notes {
  color: var(--text-muted);
}

.work-invoice-table-wrap,
.invoice-table-wrap {
  width: 100%;
}

.work-invoice-table,
.invoice-table {
  margin-bottom: 0;
  font-size: var(--ot-font-size-table);
}

.work-invoice-table td,
.work-invoice-table th,
.invoice-table td,
.invoice-table th {
  vertical-align: middle;
}

.work-invoice-actions {
  justify-content: flex-end;
}

.invoice-summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.invoice-summary-strip > div {
  min-height: 82px;
  padding: 15px 18px;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

.invoice-summary-strip > div:last-child {
  border-right: 0;
}

.invoice-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.invoice-detail-grid > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 13px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.invoice-detail-grid > div:nth-child(4n) {
  border-right: 0;
}

.invoice-detail-grid dt {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invoice-detail-grid dd {
  margin: 0;
  color: var(--text);
  font-weight: 760;
}

.invoice-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
}

.invoice-footer-notes {
  margin: 0;
  padding: 16px 18px;
  line-height: 1.55;
}

.work-file-upload {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.work-file-upload-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.work-file-upload-form .form-label {
  margin-bottom: 5px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 760;
}

.work-file-upload-form .form-text {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.work-file-upload-errors {
  margin-bottom: 0;
}

.work-file-permission-notice {
  margin: 0;
}

.work-file-table-wrap {
  border-top: 0;
}

.work-file-table {
  font-size: 0.86rem;
}

.work-file-table thead th {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f8fafc;
  border-bottom-color: var(--border);
  white-space: nowrap;
}

.work-file-table tbody td {
  color: var(--text);
  border-bottom-color: var(--border);
  vertical-align: middle;
}

.work-file-name-cell {
  min-width: 220px;
}

.work-file-name-cell strong {
  display: block;
  max-width: 360px;
  overflow: hidden;
  color: var(--text);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-file-name-cell span {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.work-file-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
}

.work-file-list,
.work-audit-list {
  display: grid;
}

.work-file-row,
.work-audit-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.work-file-row {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.work-audit-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.work-file-row:last-child,
.work-audit-row:last-child {
  border-bottom: 0;
}

.work-file-icon {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--primary-strong);
  font-size: 0.72rem;
  font-weight: 820;
  background: var(--ot-primary-soft);
  border: 1px solid #d7e3ff;
  border-radius: var(--ot-radius-md);
}

.work-file-row > div,
.work-audit-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.work-file-row strong,
.work-audit-row strong {
  overflow: hidden;
  color: var(--text);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-file-row span,
.work-audit-row span {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.work-file-row small,
.work-audit-row small {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 650;
  white-space: nowrap;
}

.work-activity-timeline {
  padding-top: 4px;
}

.work-activity-item.is-comment {
  margin: 10px 0;
  padding: 14px 0;
}

.work-activity-item.is-comment .ui-timeline-copy {
  padding: 12px 14px;
  background: var(--ot-primary-soft);
  border: 1px solid #d7e3ff;
  border-radius: var(--ot-radius-md);
}

.work-activity-item.is-system .ui-timeline-copy p {
  font-size: 0.92rem;
}

.work-detail-rail {
  position: sticky;
  top: 92px;
}

.work-detail-rail-panel {
  overflow: hidden;
}

.work-detail-meta-list,
.work-sla-summary dl {
  display: grid;
  margin: 0;
}

.work-detail-meta-list > div,
.work-sla-summary dl > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}

.work-detail-meta-list > div:last-child,
.work-sla-summary dl > div:last-child {
  border-bottom: 0;
}

.work-sla-summary {
  display: grid;
  gap: 0;
}

.work-sla-summary p {
  margin: 0;
  padding: 16px 18px;
  color: var(--text-muted);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 960px) {
  .notification-popup {
    right: 0;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    min-height: auto;
    padding: 10px 18px;
  }

  .topbar-nav {
    display: none;
  }

  .topbar-mobile-menu {
    display: block;
    order: 2;
  }

  .topbar-brand-region {
    order: 1;
    min-height: 42px;
  }

  .topbar-search {
    order: 4;
    flex: 1 0 100%;
    width: 100%;
  }

  .topbar-actions {
    order: 3;
    margin-left: auto;
  }

  .account-copy {
    display: none;
  }

  .account-summary {
    padding-right: 5px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-inner {
    display: flex;
    gap: 14px;
    min-width: max-content;
    padding: 10px 14px;
  }

  .sidebar-toggle {
    display: none;
  }

  .sidebar-section {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .sidebar-section + .sidebar-section {
    padding-top: 0;
    padding-left: 14px;
    border-top: 0;
    border-left: 1px solid var(--border);
  }

  .sidebar-section-admin {
    padding: 6px;
  }

  .nav-menu {
    display: flex;
    gap: 6px;
  }

  .nav-menu-link {
    white-space: nowrap;
  }

  .content {
    padding: 22px;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar,
  .dashboard-grid,
  .dashboard-section-grid,
  .control-room-main-grid,
  .control-room-grid,
  .control-room-lower-grid,
  .reports-workload-layout,
  .detail-grid,
  .work-detail-layout,
  .work-detail-state-card,
  .work-detail-process-grid,
  .work-financial-metrics,
  .work-financial-form-grid,
  .work-financial-line-form,
  .work-financial-line-readonly,
  .work-financial-line-readonly dl,
  .work-invoice-action-row,
  .invoice-detail-grid,
  .queue-layout,
  .process-detail-grid,
  .account-security-layout,
  .admin-grid,
  .admin-dashboard-grid,
  .admin-module-grid {
    grid-template-columns: 1fr;
  }

  .work-detail-rail {
    position: static;
  }

  .work-detail-process-grid > div + div {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .work-financial-metrics > div,
  .work-financial-metrics > div:nth-child(3n) {
    border-right: 0;
  }

  .work-financial-metrics > div:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--border);
  }

  .work-financial-metrics > div:last-child {
    border-bottom: 0;
  }

  .work-financial-line-form .span-2 {
    grid-column: span 1;
  }

  .metric-grid,
  .dashboard-metric-grid,
  .control-room-kpi-grid,
  .reports-kpi-grid,
  .work-list-summary,
  .queue-summary,
  .summary-strip,
  .invoice-summary-strip,
  .process-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-filter-grid,
  .reports-filter-fields,
  .reports-export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-filter-token {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .reports-workload-layout .report-bar-list {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .process-transition-list {
    height: auto;
    max-height: min(360px, 52vh);
    border-left: 0;
  }

  .process-detail-grid {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .filter-bar,
  .work-filter,
  .work-list-filter,
  .queue-process-filter,
  .notification-filter,
  .custom-field-grid {
    grid-template-columns: 1fr;
  }

  .auth-page {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .auth-brand-panel {
    min-height: auto;
    padding: 26px;
  }

  .auth-brand-panel h2 {
    max-width: 420px;
    font-size: 1.58rem;
  }

  .auth-brand-icon {
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: auto;
    padding: 10px 16px;
  }

  .topbar-brand-region {
    grid-column: 1;
    grid-row: 1;
    min-height: 42px;
  }

  .topbar-mobile-menu {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .topbar-mobile-nav {
    right: 0;
    left: auto;
  }

  .topbar-search {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    gap: 8px;
    margin-left: 0;
  }

  .topbar-create-action {
    max-width: 112px;
    min-height: 42px;
    padding-right: 0.72rem;
    padding-left: 0.72rem;
    line-height: 1.12;
    text-align: center;
    white-space: normal;
  }

  .sidebar {
    scrollbar-width: thin;
  }

  .sidebar-inner {
    gap: 10px;
    padding: 9px 12px;
  }

  .sidebar-section-label {
    padding: 0 6px;
    font-size: 0.68rem;
  }

  .nav-menu-link {
    min-height: 42px;
    padding: 10px 12px;
  }

  .content {
    padding: 20px 16px;
  }

  .ui-page-header-actions,
  .button-row,
  .form-actions {
    justify-content: stretch;
  }

  .ui-page-header-actions .btn,
  .ui-filter-actions .btn,
  .form-actions .btn,
  .form-actions a.btn,
  .transition-action .btn {
    min-height: 44px;
  }

  .ui-filter-actions {
    align-items: stretch;
    justify-content: stretch;
  }

  .ui-filter-actions .btn {
    flex: 1 1 160px;
  }

  .dashboard-work-table,
  .dashboard-work-table thead,
  .dashboard-work-table tbody,
  .dashboard-work-table tr,
  .dashboard-work-table th,
  .dashboard-work-table td {
    white-space: normal;
  }

  .attention-title,
  .table-title,
  .work-file-row strong,
  .work-audit-row strong {
    white-space: normal;
  }

  .work-table-wrap,
  .queue-table-wrap {
    display: none;
  }

  .work-item-card-list,
  .queue-item-card-list {
    display: grid;
  }

  .work-item-card {
    gap: 13px;
    padding: 15px;
  }

  .work-card-topline,
  .work-card-footer {
    align-items: flex-start;
  }

  .work-card-footer {
    gap: 14px;
  }

  .work-card-badges {
    justify-content: flex-start;
  }

  .work-card-badges .chip:not(.ui-status-chip),
  .work-card-meta .chip:not(.ui-status-chip),
  .queue-counts .chip:not(.ui-status-chip) {
    white-space: normal;
  }

  .work-card-badges .ui-status-chip,
  .work-card-meta .ui-status-chip,
  .queue-counts .ui-status-chip {
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .work-card-badges .ui-status-chip-label,
  .work-card-meta .ui-status-chip-label,
  .queue-counts .ui-status-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .work-row-actions a,
  .table-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
  }

  .form-grid,
  .work-detail-state-grid,
  .work-core-fields,
  .work-custom-field-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .form-control,
  .form-select,
  .btn,
  .account-summary,
  .notification-bell {
    min-height: 44px;
  }

  textarea.form-control {
    min-height: 112px;
  }

  .dynamic-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-reference-field .form-control {
    min-height: 46px;
  }

  .work-detail-state-card {
    padding: 15px;
  }

  .work-detail-chip-row {
    align-items: flex-start;
  }

  .work-detail-state-copy h2 {
    font-size: 1.08rem;
  }

  .work-transition-card {
    grid-template-columns: 1fr;
  }

  .work-transition-card .btn {
    width: 100%;
  }

  .work-detail-rail {
    position: static;
  }

  .work-file-row,
  .work-audit-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .notification-row,
  .notification-title-row,
  .notification-actions {
    align-items: flex-start;
  }

  .reports-filter-header,
  .reports-section-heading,
  .report-bar-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .reports-filter-header,
  .reports-section-heading {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  html {
    font-size: 14px;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: auto;
    padding: 10px 14px;
  }

  .topbar-brand-region {
    grid-column: 1;
    grid-row: 1;
    min-height: 42px;
  }

  .topbar-mobile-menu {
    grid-column: 2;
    grid-row: 1;
  }

  .topbar-search {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .topbar-search .btn {
    padding-right: 0.7rem;
    padding-left: 0.7rem;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    gap: 8px;
  }

  .notification-bell-shell {
    position: static;
  }

  .notification-popup {
    position: fixed;
    top: 132px;
    right: 14px;
    left: 14px;
    width: auto;
    max-height: calc(100vh - 146px);
  }

  .admin-role-row,
  .admin-module-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-table-actions {
    min-width: 0;
  }

  .admin-team-member-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reports-filter-header,
  .reports-section-heading,
  .report-bar-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .reports-filter-header,
  .reports-section-heading {
    flex-direction: column;
  }

  .reports-filter-grid,
  .reports-filter-fields,
  .reports-export-grid {
    grid-template-columns: 1fr;
  }

  .reports-filter-token:last-child {
    border-bottom: 0;
  }

  .notification-popup-list {
    max-height: calc(100vh - 286px);
  }

  .notification-popup-header,
  .notification-popup-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-menu {
    position: static;
  }

  .account-menu-panel {
    position: fixed;
    top: 132px;
    right: 14px;
    left: auto;
    width: min(280px, calc(100vw - 28px));
  }

  .content {
    padding: 18px 14px;
  }

  .auth-shell {
    padding: 18px 14px;
  }

  .auth-brand-panel {
    padding: 22px;
  }

  .auth-capability-list {
    margin-top: 18px;
  }

  .auth-form-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .dashboard-metric-grid,
  .control-room-kpi-grid,
  .work-list-summary,
  .queue-summary,
  .summary-strip,
  .invoice-summary-strip,
  .work-detail-state-grid,
  .work-core-fields,
  .work-custom-field-grid,
  .form-grid,
  .work-financial-line-form,
  .work-financial-line-readonly,
  .work-financial-line-readonly dl,
  .work-invoice-action-row,
  .invoice-detail-grid {
    grid-template-columns: 1fr;
  }

  .work-detail-state-card {
    padding: 14px;
  }

  .work-core-fields > div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .work-core-fields > div:last-child {
    border-bottom: 0;
  }

  .span-2 {
    grid-column: span 1;
  }

  .panel-header,
  .deadline-item,
  .attention-item,
  .action-row,
  .activity-event,
  .work-list-item,
  .queue-link,
  .compact-row,
  .notification-title-row,
  .notification-actions,
  .transition-action {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-row {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .attention-item {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .attention-side {
    grid-column: 2;
    justify-items: start;
  }

  .action-row,
  .activity-event {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .action-row-state,
  .activity-event time {
    grid-column: 2;
    justify-content: flex-start;
  }

  .action-row-meta,
  .activity-event-copy strong {
    white-space: normal;
  }

  .throughput-grid {
    grid-template-columns: 1fr;
  }

  .risk-lane {
    align-items: flex-start;
    flex-direction: column;
  }

  .personal-summary-list {
    grid-template-columns: 1fr;
  }

  .personal-summary-list > div {
    border-right: 0;
  }

  .personal-summary-list > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .personal-summary-list > div:last-child {
    border-bottom: 0;
  }

  .workload-row,
  .activity-row {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-area-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  .admin-area-nav-link {
    flex: 0 0 auto;
  }

  .workload-flags {
    justify-content: flex-start;
  }

  .notification-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .transition-action {
    grid-template-columns: 1fr;
  }

  .work-file-upload-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .work-file-upload-form .btn {
    justify-self: start;
  }

  .work-file-actions {
    justify-content: flex-start;
  }

  .work-view-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .work-view-tab {
    flex: 0 0 auto;
  }

  .work-table-wrap,
  .queue-table-wrap {
    display: none;
  }

  .work-item-card-list,
  .queue-item-card-list {
    display: grid;
  }

  .work-card-topline,
  .work-card-footer,
  .work-file-row,
  .work-audit-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .work-row-actions {
    justify-content: flex-start;
  }

  .details-list {
    grid-template-columns: 1fr;
  }

  .email-audit-detail-grid,
  .audit-log-detail-grid {
    grid-template-columns: 1fr;
  }

  .kpi-scorecard-filter-grid {
    grid-template-columns: 1fr;
  }

  .kpi-scorecard-actions {
    justify-content: flex-start;
  }

  .kpi-target-chip {
    display: inline-flex;
    margin-top: 4px;
  }

  .process-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .brand-wordmark {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(96px, 1fr) auto;
  }

  .topbar .brand-logo {
    max-width: 108px;
    height: 32px;
  }

  .auth-brand .brand-wordmark {
    display: inline;
  }

  .topbar-actions {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .topbar-create-action {
    max-width: 86px;
    font-size: 0.76rem;
  }

  .notification-bell,
  .account-summary {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }

  .account-summary {
    justify-content: center;
    padding: 4px;
  }

  .account-avatar {
    width: 30px;
    height: 30px;
  }

  .content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .work-item-card {
    padding: 14px 12px;
  }
}

.template-picker-panel {
  align-items: end;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: var(--space-4);
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  margin-bottom: var(--space-5);
  padding: var(--space-4);
}

.template-picker-copy h2 {
  font-size: 1rem;
  margin: 0 0 var(--space-1);
}

.template-picker-copy p,
.template-applied-note,
.template-empty-note {
  color: var(--muted);
  margin: 0;
}

.template-picker-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.template-picker-form .form-select {
  min-width: 240px;
}

.validation-summary-warning {
  background: var(--ot-warning-bg);
  border-color: var(--warning);
  color: var(--warning);
}

.template-filter-panel {
  margin-bottom: var(--space-5);
  padding: 14px 18px 16px;
}

.template-filter-panel .ops-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 2fr) minmax(170px, 1fr) minmax(170px, 1fr) max-content max-content;
  gap: 10px 12px;
  align-items: end;
}

.template-filter-panel .form-field {
  gap: 4px;
  min-width: 0;
}

.template-filter-panel .form-control,
.template-filter-panel .form-select,
.template-filter-panel .btn {
  min-height: 36px;
  font-size: 0.9rem;
}

.template-filter-panel .template-inline-check {
  min-height: 36px;
  margin: 0;
  padding: 0 12px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--ot-radius-md);
  white-space: nowrap;
}

.template-filter-panel .template-inline-check .form-check-input {
  margin: 0;
}

.template-filter-panel .form-actions {
  flex-wrap: nowrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border-top: 0;
}

.template-inline-check {
  align-items: center;
  display: flex;
  gap: var(--space-2);
  min-height: 42px;
}

.template-table .table-subtitle {
  display: block;
}

@media (max-width: 840px) {
  .template-picker-panel {
    grid-template-columns: 1fr;
  }

  .template-picker-form {
    justify-content: stretch;
  }

  .template-picker-form .btn,
  .template-picker-form .form-select {
    width: 100%;
  }

  .template-filter-panel .ops-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .template-filter-panel .form-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .notification-bell:hover,
  .notification-bell:focus-visible,
  .notification-bell[aria-expanded="true"] {
    transform: none;
  }

  .skip-link {
    transition: none !important;
  }
}
