:root {
  color-scheme: light;
  --bg: #fbfaf9;
  --surface: #ffffff;
  --surface-soft: #f8f6f5;
  --surface-warm: #fff7f3;
  --ink: #30343b;
  --ink-soft: #47505c;
  --muted: #8a93a3;
  --line: #edf0f3;
  --line-strong: #dde3ea;
  --sidebar: #ffffff;
  --sidebar-hover: #fff3f5;
  --sidebar-active: #9d1f31;
  --burgundy: #a82438;
  --burgundy-dark: #7f1b2a;
  --burgundy-soft: #fff0f3;
  --rose-soft: #ffe8ed;
  --peach-soft: #fff2e8;
  --blue-soft: #eef5ff;
  --green-soft: #edf9f2;
  --amber-soft: #fff7df;
  --blue: #3f65a8;
  --amber: #b7791f;
  --red: #a91f2f;
  --green: #2f855a;
  --shadow: 0 12px 28px rgba(55, 65, 81, 0.06);
  --shadow-soft: 0 1px 2px rgba(55, 65, 81, 0.04);
  --radius: 10px;
  --sidebar-width: 264px;
  --content-padding-y: 14px;
  --content-padding-x: 16px;
  --section-gap: 10px;
  --card-gap: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.38;
  color: var(--ink);
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(168, 36, 56, 0.045), transparent 32%),
    var(--bg);
}

body.overlay-open {
  overflow: hidden;
}

body[data-auth-state="loading"],
body[data-auth-state="logged-out"] {
  overflow-x: hidden;
  overflow-y: auto;
}

body[data-auth-state="loading"] .app-shell,
body[data-auth-state="logged-out"] .app-shell,
body[data-auth-state="loading"] .side-panel,
body[data-auth-state="logged-out"] .side-panel,
body[data-auth-state="loading"] .modal-layer,
body[data-auth-state="logged-out"] .modal-layer,
body[data-auth-state="loading"] .toast,
body[data-auth-state="logged-out"] .toast {
  display: none !important;
}

body[data-auth-state="logged-in"] .auth-shell {
  display: none;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fbfbfa;
  -webkit-overflow-scrolling: touch;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.auth-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #f8f9fb;
  background-image: linear-gradient(rgba(255,255,255,0.08), rgba(255,255,255,0.08)), url("lcdc-login-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(380px, calc(100vw - 32px));
  padding: 24px 24px 20px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.07);
}

.auth-login-card,
.auth-loading-card {
  display: none;
}

body[data-auth-state="loading"] .auth-loading-card,
body[data-auth-state="logged-out"] .auth-login-card {
  display: block;
}

.auth-brand-lockup {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
  text-align: center;
}

.auth-brand-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.auth-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand-copy p {
  max-width: 280px;
  margin: 0;
  color: #a82438;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
}

.auth-support-copy {
  margin: 6px 0 0;
  color: #777d89;
  font-size: 12px;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.auth-field {
  display: grid;
  gap: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
  width: 100%;
  height: 44px;
  padding: 0 40px;
  color: #2f323a;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field input::placeholder {
  color: #8a93a3;
}

.auth-field input:focus {
  outline: 0;
  border-color: rgba(170, 24, 34, 0.62);
  box-shadow: 0 0 0 3px rgba(170, 24, 34, 0.1);
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #69707d;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.auth-password-toggle {
  position: absolute;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #676e79;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.auth-password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  color: #9f1019;
  background: #fff2f3;
  outline: 0;
}

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: -1px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #30343b;
  font-size: 13px;
  font-weight: 600;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #a71019;
}

.auth-link-button,
.auth-helper-text button {
  padding: 0;
  color: #a82438;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 650;
}

.auth-link-button:hover,
.auth-link-button:focus-visible,
.auth-helper-text button:hover,
.auth-helper-text button:focus-visible {
  color: #7f0e16;
  text-decoration: underline;
  outline: 0;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  margin-top: 2px;
  border-radius: 8px;
  border-color: #9d1f31;
  background: #a82438;
  box-shadow: none;
  font-size: 15px;
  font-weight: 750;
}

.auth-submit[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  background: #8f1724;
  box-shadow: 0 0 0 3px rgba(170, 24, 34, 0.12), 0 8px 18px rgba(169, 15, 25, 0.22);
  outline: 0;
}

.auth-status {
  min-height: 18px;
  margin: -4px 0 -4px;
  color: #777d89;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.auth-status:empty {
  display: none;
}

.auth-personnel-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
  color: var(--ink);
  text-align: center;
}

.auth-personnel-note svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  fill: none;
  stroke: #69707d;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-personnel-note div {
  display: grid;
  gap: 1px;
}

.auth-personnel-note strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.auth-personnel-note span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.auth-status.is-error {
  color: var(--red);
}

.auth-status.is-success {
  color: var(--green);
}

.auth-status.is-loading {
  color: var(--blue);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  transition: grid-template-columns 220ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
}

.app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 31, 0.26);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 35;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  padding: 12px 10px;
  color: var(--ink);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: none;
  transition: transform 220ms ease, opacity 180ms ease, visibility 0s linear 220ms;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
  padding: 0;
  border-right: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

.brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 12px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 3px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: none;
}

.brand-logo-link {
  appearance: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.brand-logo-link:hover,
.brand-logo-link:focus-visible {
  border-color: #e8c8ce;
  box-shadow: 0 0 0 3px rgba(168, 36, 56, 0.06);
  outline: 0;
}

.brand-logo-link:active {
  transform: translateY(1px);
}

.brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
}

.brand-name {
  color: var(--burgundy);
  font-size: 23px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0;
}

.brand-subtitle {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.sidebar-pin-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 9px;
  color: #b5bec9;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.nav-list {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

.nav-primary {
  margin-top: 12px;
  margin-bottom: 10px;
}

.nav-primary .nav-item {
  margin-bottom: 3px;
}

.sidebar-divider {
  height: 1px;
  margin: 6px 6px 10px;
  background: #eceff3;
  border-radius: 999px;
}

.nav-sections {
  margin-top: 0;
  gap: 5px;
}

.nav-group {
  display: grid;
  gap: 0;
}

.nav-parent .nav-label {
  font-size: 13px;
  font-weight: 700;
}

.nav-child {
  margin-left: 0;
  width: 100%;
  min-height: 32px;
  padding: 4px 8px 4px 6px;
  border-radius: 9px;
  color: #747d8c;
  background: transparent;
  opacity: 1;
}

.nav-child .nav-label {
  font-size: 12px;
  font-weight: 600;
}

.nav-children {
  display: grid;
  gap: 3px;
}

.nav-children[hidden] {
  display: none !important;
}

.nav-group:not(.open) .nav-children {
  display: none !important;
}

.nav-group.open .nav-children {
  display: grid;
  margin-top: 4px;
  padding-left: 9px;
  gap: 3px;
}

.nav-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #a8b0bd;
  border-bottom: 1.5px solid #a8b0bd;
  transform: rotate(45deg);
  transition: transform 140ms ease, border-color 140ms ease;
  opacity: 0.75;
  margin-right: 2px;
}

.nav-parent:hover .nav-chevron {
  border-color: #8a93a3;
  opacity: 0.9;
}

.nav-group.open .nav-chevron {
  transform: rotate(225deg);
  border-color: #8a93a3;
}

.nav-item.active .nav-chevron {
  border-color: #a8b0bd;
}

.nav-bottom {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.nav-bottom:empty {
  display: none;
}

.nav-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 4px 8px 4px 5px;
  color: #49515c;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: left;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--burgundy);
  background: var(--sidebar-hover);
  outline: 0;
}

.nav-item.active {
  color: #8f1724;
  background: #fff0f3;
  border-color: transparent;
  box-shadow: none;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 0;
  color: #a82438;
  background: transparent !important;
}

.nav-icon .line-icon,
.nav-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.nav-child .nav-icon {
  color: #9aa3b2;
}

.nav-item:hover .nav-icon {
  color: #a82438;
}

.nav-item.active .nav-icon {
  color: #a82438;
  background: transparent !important;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}

.nav-group.open > .nav-parent {
  color: #8f1724;
  background: #fff4f6;
  box-shadow: none;
  border-color: transparent;
}

.nav-group.open > .nav-parent .nav-icon {
  color: #a82438;
}

.nav-group.open > .nav-parent .nav-chevron {
  border-color: #a8b0bd;
}

.nav-child.active {
  position: relative;
  color: #8f1724;
  background: #fff0f3;
  border-color: transparent;
  box-shadow: none;
}

.nav-child.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: #a82438;
}

.nav-child.active .nav-label {
  font-weight: 700;
}

.nav-parent.active,
.nav-group.open > .nav-parent {
  box-shadow: none;
}

.nav-group.open {
  gap: 6px;
}

.nav-primary .nav-item.active {
  color: #ffffff;
  background: linear-gradient(135deg, #a82438, #8f1724);
  border-color: #9d1f31;
}

.nav-primary .nav-item.active .nav-icon {
  color: rgba(255, 255, 255, 0.95);
}

.nav-primary .nav-item.active .nav-chevron {
  border-color: rgba(255, 255, 255, 0.8);
}

.nav-badge {
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 7px;
  color: #ffffff;
  background: var(--burgundy-dark);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.nav-badge.tone-red {
  background: #d54545;
}

.nav-badge.tone-amber {
  background: #d28a1c;
}

.nav-badge.tone-blue {
  background: #4a78c9;
}

.nav-badge.tone-burgundy {
  background: var(--burgundy-dark);
}

.workspace {
  min-width: 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 48px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #eef1f4;
  box-shadow: 0 2px 12px rgba(20, 23, 31, 0.04);
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.topbar-title {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-title h1,
.page-subtitle {
  max-width: 100%;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.is-breadcrumb {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: #2f3542;
  font-weight: 760;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 16px;
  color: #343b46;
  font-weight: 720;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 14px;
  color: #343b46;
  font-weight: 720;
  letter-spacing: 0;
}

h4 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.topbar-actions > .dropdown,
.topbar-actions > .account-dropdown {
  flex: 0 0 auto;
}

.global-search,
.search-control {
  position: relative;
  display: flex;
  align-items: stretch;
}

.global-search {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(190px, 1fr);
  align-items: center;
  width: min(460px, 42vw);
  min-width: 260px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.global-search-filter {
  position: static;
}

.global-search-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 96px;
  min-height: 30px;
  padding: 0 8px 0 10px;
  color: #5a6473;
  background: #fff8f9;
  border: 1px solid #f0dfe4;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.global-search-input {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.global-search-results[hidden] {
  display: none;
}

.global-search-result,
.global-search-view-all,
.global-search-empty {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
}

.global-search-result:hover,
.global-search-result:focus-visible,
.global-search-result.is-active,
.global-search-view-all:hover,
.global-search-view-all:focus-visible {
  background: var(--sidebar-hover);
  border-color: #f1d4d9;
  outline: 0;
}

.global-search-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.global-search-result-type,
.notification-item-type {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid #f1d4d9;
  border-radius: 999px;
  color: var(--burgundy-dark);
  background: var(--burgundy-soft);
  font-size: 11px;
  font-weight: 800;
}

.global-search-results span,
.global-search-empty {
  color: var(--muted);
  font-size: 12px;
}

.global-search input,
.search-control input {
  width: 100%;
  max-width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 999px;
  outline: 0;
  box-shadow: none;
}

.global-search input:focus {
  box-shadow: none;
}

.search-control input {
  width: 220px;
  max-width: 100%;
}

.global-search input:focus,
.search-control input:focus,
.filter-field select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(153, 27, 46, 0.12);
}

.global-search:focus-within {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(153, 27, 46, 0.12);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-50%);
}

.search-icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
}

.global-search-view-all {
  margin-top: 2px;
  color: var(--burgundy-dark);
  font-weight: 700;
}

.content {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: var(--section-gap);
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--content-padding-y) var(--content-padding-x);
}

.section-grid {
  display: grid;
  gap: var(--section-gap);
  min-height: 0;
  align-content: start;
}

.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-header p {
  max-width: 820px;
  margin: 4px 0 0;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-gap);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--card-gap);
}

.metric-card,
.panel,
.record-card,
.module-card,
.report-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(55, 65, 81, 0.04);
}

.metric-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 4px;
  min-height: 76px;
  padding: 10px 12px;
}

.dashboard-metric {
  width: 100%;
  color: inherit;
  text-align: left;
}

.dashboard-metric:hover,
.dashboard-metric:focus-visible {
  border-color: rgba(153, 27, 46, 0.28);
  box-shadow: 0 8px 20px rgba(20, 23, 31, 0.06);
  outline: 0;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--burgundy);
  background: #fff3f5;
  font-size: 12px;
  font-weight: 800;
}

.metric-icon .line-icon {
  width: 16px;
  height: 16px;
  color: currentColor;
}

.metric-icon.alt {
  color: var(--blue);
  background: var(--blue-soft);
}

.metric-icon.warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.metric-icon.risk {
  color: var(--red);
  background: #fdeeed;
}

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.metric-value {
  font-size: 22px;
  font-weight: 780;
  line-height: 1;
}

.metric-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.32;
}

.widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.dashboard-column {
  display: grid;
  gap: 10px;
  align-content: start;
}

.priority-list {
  gap: 8px;
  align-content: start;
}

.priority-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(148px, auto);
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdfc;
}

.priority-main {
  display: grid;
  gap: 5px;
  min-width: 0;
  align-content: start;
}

.priority-main h3 {
  margin-top: 0;
  line-height: 1.35;
}

.priority-side {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.priority-meta {
  display: grid;
  gap: 6px;
  justify-items: end;
  align-content: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.priority-side .status {
  justify-self: end;
}

.project-snapshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-content: start;
}

.project-snapshot-card {
  display: grid;
  gap: 8px;
  min-height: 76px;
  padding: 10px 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdfc;
}

.project-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-card-top > div {
  display: grid;
  gap: 4px;
}

.project-card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-reference {
  gap: 12px;
}

.dashboard-reference .dashboard-metrics {
  gap: 10px;
}

.dashboard-reference .metric-card {
  min-height: 94px;
  padding: 12px 14px;
  border: 1px solid #e7eaee;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.dashboard-reference .dashboard-metric-content {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 100%;
}

.dashboard-reference .dashboard-metric-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  align-content: center;
}

.dashboard-reference .metric-icon {
  width: 42px;
  height: 42px;
  box-shadow: none;
}

.dashboard-reference .metric-icon .line-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.dashboard-reference .metric-icon.tone-project {
  color: #b3263d;
  background: #fff1f3;
}

.dashboard-reference .metric-icon.tone-schedule {
  color: #d67a21;
  background: #fff3e8;
}

.dashboard-reference .metric-icon.tone-approvals {
  color: #c38a16;
  background: #fff7df;
}

.dashboard-reference .metric-icon.tone-alerts {
  color: #d34747;
  background: #fff1f1;
}

.dashboard-reference .metric-label {
  color: #404754;
  font-size: 13px;
  font-weight: 650;
}

.dashboard-reference .metric-value {
  color: #232834;
  font-size: 24px;
  font-weight: 780;
}

.dashboard-reference .metric-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.32;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 12px;
  align-items: start;
}

.dashboard-main-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.dashboard-panel {
  border: 1px solid #e7eaee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.dashboard-panel-header {
  min-height: 46px;
  padding: 12px 14px;
  border-bottom: 1px solid #eff1f4;
}

.dashboard-panel-header h2 {
  margin: 0;
  color: #232834;
  font-size: 15px;
  font-weight: 720;
}

.dashboard-panel-body {
  display: grid;
  gap: 0;
  padding: 10px 12px 12px;
}

.dashboard-panel-body-tight {
  padding-top: 10px;
}

.dashboard-link-button,
.dashboard-panel-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: #b3263d;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-link-button:hover,
.dashboard-panel-footer-link:hover,
.dashboard-link-button:focus-visible,
.dashboard-panel-footer-link:focus-visible {
  color: #8f1724;
  outline: 0;
}

.dashboard-panel-footer-link {
  margin-top: 10px;
  justify-self: start;
}

.dashboard-priority-list,
.dashboard-schedule-list,
.dashboard-activity-list {
  display: grid;
}

.dashboard-priority-row,
.dashboard-schedule-row,
.dashboard-activity-row {
  display: grid;
  width: 100%;
  min-width: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #eff1f4;
}

.dashboard-priority-row:last-child,
.dashboard-schedule-row:last-child,
.dashboard-activity-row:last-child {
  border-bottom: 0;
}

.dashboard-priority-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
}

.dashboard-priority-icon,
.dashboard-activity-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.dashboard-priority-icon .line-icon,
.dashboard-activity-icon .line-icon {
  width: 16px;
  height: 16px;
}

.dashboard-priority-icon-schedule {
  color: #d67a21;
  background: #fff3e8;
}

.dashboard-priority-icon-approval {
  color: #a24dc8;
  background: #f5edff;
}

.dashboard-priority-icon-billing {
  color: #2d8b57;
  background: #edf9f2;
}

.dashboard-priority-icon-record {
  color: #c14444;
  background: #fff0f1;
}

.dashboard-priority-icon-client {
  color: #4e86d6;
  background: #eef5ff;
}

.dashboard-priority-copy,
.dashboard-activity-copy,
.dashboard-schedule-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.dashboard-row-title {
  color: #262d39;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
}

.dashboard-row-subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-priority-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 76px;
}

.dashboard-priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-priority-badge.priority-high {
  color: #b23641;
  background: #fff0f2;
}

.dashboard-priority-badge.priority-medium {
  color: #b96d1f;
  background: #fff4e7;
}

.dashboard-priority-badge.priority-low {
  color: #2a8d59;
  background: #edf9f2;
}

.dashboard-priority-time,
.dashboard-activity-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.dashboard-project-table {
  display: grid;
  gap: 0;
}

.dashboard-project-table-head,
.dashboard-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(108px, 0.7fr) minmax(104px, 0.68fr) auto;
  align-items: center;
  gap: 10px;
}

.dashboard-project-table-head {
  padding: 0 2px 8px;
  color: #6a7380;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-project-table-body {
  display: grid;
}

.dashboard-project-row {
  padding: 9px 2px;
  border-top: 1px solid #eff1f4;
}

.dashboard-project-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.dashboard-project-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 32px;
  border: 1px solid #e2e7ec;
  border-radius: 9px;
  color: #67707c;
  background: linear-gradient(180deg, #f7f9fb 0%, #edf2f6 100%);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.dashboard-project-progress,
.dashboard-project-budget {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dashboard-project-progress-value,
.dashboard-project-budget strong {
  color: #262d39;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-project-budget span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-progress-track {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #eceff3;
  overflow: hidden;
}

.dashboard-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c52f46 0%, #9d1f31 100%);
}

.dashboard-project-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-status-pill.is-track {
  color: #2a8d59;
  background: #edf9f2;
}

.dashboard-status-pill.is-risk {
  color: #c26c1f;
  background: #fff4e7;
}

.dashboard-status-pill.is-watch {
  color: #8d6b1f;
  background: #fff8df;
}

.dashboard-status-pill.is-overdue {
  color: #b4233b;
  background: #fff0f3;
}

.dashboard-status-pill.is-neutral {
  color: #5c6675;
  background: #f2f4f7;
}

.dashboard-schedule-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
}

.dashboard-schedule-main {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}

.dashboard-date-block {
  display: grid;
  place-items: center;
  width: 38px;
  min-height: 40px;
  padding: 5px 3px;
  border: 1px solid #edf0f3;
  border-radius: 9px;
  background: #fffdfd;
}

.dashboard-date-month {
  color: #b3263d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dashboard-date-day {
  color: #262d39;
  font-size: 20px;
  font-weight: 760;
  line-height: 1;
}

.dashboard-schedule-meta {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 82px;
}

.dashboard-schedule-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #48515c;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-schedule-time .line-icon {
  width: 14px;
  height: 14px;
}

.dashboard-activity-row {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  text-align: left;
}

.dashboard-activity-icon.is-green {
  color: #2a8d59;
  background: #edf9f2;
}

.dashboard-activity-icon.is-orange {
  color: #d67a21;
  background: #fff3e8;
}

.dashboard-activity-icon.is-blue {
  color: #4e86d6;
  background: #eef5ff;
}

.dashboard-activity-icon.is-purple {
  color: #8d59d3;
  background: #f5edff;
}

.dashboard-activity-icon.is-neutral {
  color: #7a8697;
  background: #f2f5f8;
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: start;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.panel-body {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
  align-content: start;
}

.panel-body.flush {
  padding: 0;
}

.toolbar,
.filter-bar,
.tabbar,
.actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

.toolbar:has(.table-toolbar-panel) {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.tabbar {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.tab-button {
  min-height: 30px;
  padding: 5px 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.tab-button:hover,
.tab-button:focus-visible {
  color: var(--ink);
  background: var(--surface-soft);
  outline: 0;
}

.tab-button.active {
  color: var(--burgundy-dark);
  background: var(--burgundy-soft);
}

.filter-field {
  display: grid;
  gap: 4px;
}

.filter-field label,
.field label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.filter-field select,
.field input,
.field select,
.field textarea {
  min-height: 32px;
  padding: 6px 8px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: 0;
}

.file-upload-input {
  margin-top: 6px;
  min-height: auto;
  padding: 8px;
  font-size: 12px;
  background: #fff;
}

.file-upload-input::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  color: var(--burgundy);
  background: var(--burgundy-soft);
  border: 1px solid rgba(178, 30, 52, 0.18);
  border-radius: 999px;
  font-weight: 800;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.field textarea {
  resize: vertical;
  min-height: 72px;
}

.form-error {
  margin-top: 12px;
  padding: 10px 12px;
  color: #994036;
  background: #fae8e5;
  border: 1px solid #efc0bb;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button,
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.primary-button {
  color: #ffffff;
  background: var(--burgundy);
  border: 1px solid var(--burgundy);
}

.secondary-button,
.table-action {
  color: var(--ink-soft);
  background: #fffafb;
  border: 1px solid #eadfe3;
}

.ghost-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent;
}

.danger-button {
  color: #ffffff;
  background: var(--red);
  border: 1px solid var(--red);
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.ghost-button:hover,
.table-action:hover,
.icon-button:hover {
  filter: none;
  box-shadow: 0 0 0 3px rgba(168, 36, 56, 0.08);
}

.icon-button:hover,
.account-button:hover {
  color: var(--burgundy);
  background: #fff7f8;
  border-color: #f3c8d0;
}

.icon-button {
  position: relative;
  width: 32px;
  min-height: 32px;
  padding: 0;
  color: #47505c;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.compact-button {
  min-height: 30px;
  padding: 5px 8px;
  gap: 6px;
  white-space: nowrap;
}

.ops-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.ops-toolbar .search-control {
  flex: 1 1 280px;
  min-width: 220px;
}

.ops-filter-bar {
  width: 100%;
  margin-top: 10px;
}

.ops-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ops-widget .panel-body {
  min-height: 182px;
}

.record-link {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}

.record-link strong {
  color: #29313c;
  font-weight: 750;
}

.record-link span {
  color: var(--muted);
  font-size: 12px;
}

tr:hover .record-link strong,
.record-link:hover strong,
.record-link:focus-visible strong {
  color: var(--burgundy);
}

.record-link:focus-visible {
  outline: 2px solid rgba(168, 36, 56, 0.18);
  outline-offset: 3px;
  border-radius: 6px;
}

.panel-tabs,
.static-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-tabs span,
.static-tabs span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #697386;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.panel-tabs span.active,
.static-tabs span.active {
  color: #8f1724;
  background: var(--burgundy-soft);
  border-color: #f1d4d9;
}

.linked-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.linked-record-chip {
  display: grid;
  gap: 2px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.linked-record-chip strong {
  font-size: 12px;
  color: #566071;
}

.linked-record-chip span {
  color: var(--ink);
  font-weight: 650;
}

.linked-record-chip:hover,
.linked-record-chip:focus-visible {
  border-color: #e8c8ce;
  background: #fff8f9;
  outline: 0;
}

.compact-tabs {
  margin-bottom: 14px;
}

.topbar-icon {
  border-radius: 10px;
}

.line-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
}

.plus-icon::before,
.plus-icon::after,
.more-icon::before,
.close-icon::before,
.close-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.plus-icon::after {
  transform: rotate(90deg);
}

.more-icon::before {
  top: 7px;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  box-shadow: 4px 0 0 currentColor, 8px 0 0 currentColor;
}

.chevron-icon {
  width: 12px;
  height: 12px;
}

.chevron-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.burger-icon::before,
.burger-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  width: 12px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.burger-icon::before {
  top: 4px;
  box-shadow: 0 4px 0 currentColor;
}

.burger-icon::after {
  top: 12px;
}

.pin-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 1.6px solid currentColor;
  border-radius: 4px;
}

.pin-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 3px;
  height: 8px;
  background: currentColor;
  border-radius: 999px;
  opacity: 0.78;
  transition: transform 140ms ease, opacity 140ms ease;
}

.sidebar-pin-button:not(.pin-active) .pin-icon::after {
  transform: translateX(5px);
  opacity: 0.38;
}

.lock-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 8px;
  height: 7px;
  border: 1.7px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.lock-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 10px;
  height: 8px;
  border: 1.7px solid currentColor;
  border-radius: 3px;
}

.pin-active {
  color: #8d98a8;
  background: #f6f8fb;
  border-color: transparent;
}

.sidebar-pin-button:hover,
.sidebar-pin-button:focus-visible,
.sidebar-pin-button.pin-active:hover,
.sidebar-pin-button.pin-active:focus-visible {
  color: #7f8a99;
  background: #f4f7fa;
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
}

.grid-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 3px;
  box-shadow:
    inset -5px 0 0 -3px currentColor,
    inset 5px 0 0 -3px currentColor,
    inset 0 -5px 0 -3px currentColor,
    inset 0 5px 0 -3px currentColor;
}

.close-icon::before {
  transform: rotate(45deg);
}

.close-icon::after {
  transform: rotate(-45deg);
}

.bell-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 10px;
  height: 11px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 8px 8px 2px 2px;
}

.bell-icon::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 1px;
  width: 4px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.trash-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 8px;
  height: 9px;
  border: 1.8px solid currentColor;
  border-top: 0;
  border-radius: 0 0 2px 2px;
}

.trash-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: 3px -2px 0 -0.5px currentColor;
}

.filter-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 3px;
  width: 12px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.filter-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 6px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.sort-icon::before,
.sort-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  width: 10px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.sort-icon::before {
  top: 4px;
  box-shadow: 0 4px 0 currentColor;
}

.sort-icon::after {
  top: 12px;
  width: 6px;
}

.settings-icon::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.settings-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 1px;
  width: 2px;
  height: 14px;
  background: currentColor;
  border-radius: 2px;
  box-shadow: -5px 5px 0 -0.5px currentColor, 5px 5px 0 -0.5px currentColor;
  opacity: 0.75;
}

.notification-dot {
  position: absolute;
  right: -5px;
  top: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--bg);
  border-radius: 10px;
  color: #ffffff;
  background: var(--burgundy);
  font-size: 10px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
}

.dropdown {
  position: relative;
}

.dropdown-trigger {
  white-space: nowrap;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 60;
  display: grid;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  max-width: min(360px, calc(100vw - 32px));
  transition: opacity 160ms ease, transform 160ms ease;
}

.dropdown.open .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu-right {
  right: 0;
}

.dropdown-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  text-align: left;
  font-weight: 700;
}

.menu-group-title {
  margin-top: 4px;
  padding: 5px 8px 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.menu-group-title:first-child {
  margin-top: 0;
}

.dropdown-menu button:hover,
.dropdown-menu button:focus-visible {
  color: var(--burgundy);
  background: var(--burgundy-soft);
  outline: 0;
}

.menu-option-active {
  color: var(--burgundy-dark) !important;
  background: var(--burgundy-soft) !important;
}

.menu-divider {
  height: 1px;
  margin: 6px 10px;
  background: var(--line);
}

.menu-view-all {
  color: var(--burgundy-dark);
  font-weight: 700;
}

.account-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px 4px 5px;
  color: #47505c;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--burgundy);
  font-size: 11px;
  font-weight: 900;
}

.account-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.account-copy span {
  font-weight: 850;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-menu {
  min-width: 360px;
  max-width: min(400px, 94vw);
}

.notification-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefe;
  text-align: left;
}

.notification-item:hover {
  border-color: #f1d4d9;
  background: var(--burgundy-soft);
}

.notification-menu-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 6px 10px;
}

.notification-menu-head strong {
  display: block;
  color: #2f3542;
}

.notification-menu-head span {
  color: var(--muted);
  font-size: 12px;
}

.notification-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notification-filter-row {
  display: grid;
  gap: 10px;
  padding: 0 6px 10px;
}

.notification-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.notification-filter-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #e7dde2;
  border-radius: 999px;
  color: #5b6573;
  background: #fffafb;
  font-size: 12px;
  font-weight: 700;
}

.notification-filter-pill.is-active,
.notification-filter-pill:hover,
.notification-filter-pill:focus-visible {
  color: var(--burgundy-dark);
  background: var(--burgundy-soft);
  border-color: #f1d4d9;
  outline: 0;
}

.notification-type-select {
  display: grid;
  gap: 4px;
  min-width: 132px;
}

.notification-type-select span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.notification-type-select select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #ffffff;
}

.notification-menu-list,
.notification-center-list {
  display: grid;
  gap: 8px;
}

.notification-menu-list {
  max-height: 360px;
  overflow: auto;
  padding: 0 2px 2px;
}

.notification-center-panel .panel-body {
  display: grid;
  gap: 14px;
}

.account-menu {
  min-width: 320px;
}

.account-menu-head {
  display: grid;
  gap: 4px;
  padding: 12px;
  margin-bottom: 6px;
  border: 1px solid #f1d4d9;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff8f9 0%, #ffffff 100%);
}

.account-menu-head span {
  color: var(--muted);
  font-size: 12px;
}

.account-menu-head small {
  color: var(--burgundy);
  font-size: 12px;
  font-weight: 800;
}

.settings-panel .panel-header p,
.settings-company-panel .panel-header p {
  margin: 6px 0 0;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.smart-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.smart-table-search {
  width: min(220px, 36vw);
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 12px;
}

.smart-table-save-status {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.smart-table-save-status[data-state="dirty"] {
  color: #9b6a00;
}

.smart-table-save-status[data-state="error"] {
  color: var(--red);
}

.table-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.table-status[data-state="saving"],
.table-status[data-state="dirty"] {
  color: #9b6a00;
}

.table-status[data-state="error"] {
  color: var(--red);
}

.smart-cell-input {
  width: 100%;
  min-width: 86px;
  min-height: 26px;
  padding: 3px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.smart-cell-editable {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  cursor: text;
}

.smart-cell-textarea {
  min-height: 52px;
  line-height: 1.35;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.smart-cell-editable:empty::before {
  content: attr(aria-label);
  color: rgba(82, 97, 106, 0.45);
}

.smart-cell-input:focus {
  background: #ffffff;
  border-color: rgba(168, 36, 56, 0.36);
  box-shadow: 0 0 0 2px rgba(168, 36, 56, 0.08);
  outline: 0;
}

.smart-editable-table td:focus-within {
  background: #fffdf8;
  box-shadow: inset 0 0 0 1px rgba(168, 36, 56, 0.22);
}

.ac-spreadsheet-toolbar {
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.ac-table-input,
.ac-table-assignee-select {
  width: 100%;
  min-width: 108px;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.ac-table-select {
  padding-right: 22px;
}

.ac-table-assignee-select {
  min-height: 58px;
  max-height: 72px;
  min-width: 136px;
}

.ac-table-input:focus,
.ac-table-assignee-select:focus {
  border-color: rgba(168, 36, 56, 0.36);
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(168, 36, 56, 0.08);
  outline: 0;
}

.editable-grid-shell {
  min-width: 0;
}

.editable-grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 6px;
  padding: 0 2px;
  flex-wrap: nowrap;
}

.grid-tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: nowrap;
}

.smart-table-toolbar .grid-tool-group {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.grid-tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 26px;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.grid-tool-button:hover,
.grid-tool-button:focus-visible {
  border-color: rgba(122, 26, 42, 0.28);
  color: var(--burgundy-dark);
  background: var(--burgundy-soft);
  outline: 0;
}

.grid-tool-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.grid-tool-button .line-icon,
.grid-tool-search .line-icon {
  width: 12px;
  height: 12px;
}

.grid-tool-search {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  margin-left: 2px;
}

.grid-tool-search input {
  width: 92px;
  min-width: 56px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 10px;
}

.editable-grid-table-status {
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  flex: 0 0 auto;
}

.editable-grid-table-status[data-state="saving"] {
  color: var(--burgundy);
}

.editable-grid-table-status[data-state="error"] {
  color: var(--red);
}

.editable-grid-wrap {
  border-radius: 8px;
  box-shadow: none;
}

.editable-grid-table {
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.editable-grid-table th,
.editable-grid-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.editable-grid-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 34px;
  padding: 0 8px;
  background: #fbfbfc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.editable-grid-header-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1;
  text-align: left;
}

.editable-grid-header-button span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editable-grid-header-button .line-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  opacity: 0;
}

.editable-grid-table th:hover .editable-grid-header-button .line-icon,
.editable-grid-header-button:focus-visible .line-icon {
  opacity: 0.7;
}

.editable-grid-table td {
  height: 34px;
  padding: 2px;
  background: #ffffff;
  vertical-align: middle;
}

.editable-grid-row[data-grid-mode="create"] td {
  background: #fffdf8;
}

.editable-grid-input {
  width: 100%;
  min-width: 96px;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
}

.editable-grid-input:focus {
  border-color: var(--burgundy);
  box-shadow: inset 0 0 0 1px rgba(122, 26, 42, 0.2), 0 0 0 2px rgba(122, 26, 42, 0.08);
  outline: 0;
}

.editable-grid-checkbox {
  width: 16px;
  height: 16px;
  margin: 5px 6px;
  accent-color: var(--burgundy);
}

.editable-grid-input.cell-just-saved {
  border-color: rgba(20, 120, 72, 0.42);
  background: #f3fbf6;
}

.editable-grid-readonly {
  display: block;
  overflow: hidden;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid-allocation-cell {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.grid-allocation-cell .table-action {
  min-height: 26px;
  padding: 3px 6px;
  white-space: nowrap;
}

.editable-grid-actions {
  min-width: 76px;
  width: 76px;
  text-align: right;
}

.editable-grid-actions .table-action {
  min-height: 24px;
  padding: 0;
}

.icon-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
}

.icon-table-action .line-icon {
  width: 12px;
  height: 12px;
}

.editable-grid-more-menu,
.editable-grid-more-menu button {
  font-size: 11px;
}

.editable-grid-more-menu button {
  gap: 6px;
}

.editable-grid-more-menu .line-icon {
  width: 12px;
  height: 12px;
}

.editable-grid-more-menu .menu-group-title {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.editable-grid-more-menu .menu-group-title:first-child {
  margin-top: 0;
  padding-top: 5px;
  border-top: 0;
}

.editable-grid-state {
  display: inline-flex;
  align-items: center;
  min-width: 52px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.editable-grid-state[data-state="dirty"] {
  color: #9b6a00;
}

.editable-grid-state[data-state="saving"] {
  color: var(--burgundy);
}

.editable-grid-state[data-state="error"] {
  color: var(--red);
}

.editable-grid-note {
  margin: 6px 4px 0;
  font-size: 11px;
}

.option-editor-list,
.editable-grid-columns-panel {
  display: grid;
  gap: 6px;
}

.option-editor-row,
.column-editor-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.option-editor-row input {
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.bulk-select-cell {
  width: 34px;
  min-width: 34px;
  text-align: center;
}

.actions-sticky {
  position: sticky;
  right: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: -8px 0 12px rgba(17, 24, 39, 0.04);
}

th.actions-sticky {
  z-index: 4;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
  flex-wrap: wrap;
}

.table-pager.has-error {
  color: #8f1724;
}

.table-pager-copy {
  display: grid;
  gap: 4px;
}

.table-pager-copy strong {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.table-pager-copy span {
  color: var(--muted);
  font-size: 12px;
}

.projects-table-desktop {
  display: block;
}

.projects-mobile-cards {
  display: none;
}

.project-summary-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfc;
}

.project-cell-stack,
.project-health-cell {
  display: grid;
  gap: 6px;
}

.inline-edit-input,
.inline-edit-select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
}

.inline-edit-input:focus,
.inline-edit-select:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 3px rgba(168, 36, 56, 0.08);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 12.5px;
  line-height: 1.3;
}

td,
.record-link strong,
.record-link span,
.row-title,
.row-meta,
.detail-value,
.dashboard-row-title,
.dashboard-row-subtitle,
.action-card .row-title,
.action-card .row-meta,
.action-card-meta-line,
.action-card-chip {
  min-width: 0;
}

.record-link strong,
.record-link span,
.action-card .row-title,
.action-card .row-meta,
.action-card-chip {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}

.smart-editable-table.table-wrap-disabled td,
.smart-editable-table.table-wrap-disabled td .smart-cell-input,
.smart-editable-table.table-wrap-disabled td .smart-cell-editable,
.smart-editable-table.table-wrap-disabled td .truncate-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  overflow-wrap: normal;
}

td .actions-row,
td .assignee-chip-row,
td .row-action-menu,
td .status {
  white-space: normal;
}

th {
  color: var(--muted);
  background: #fffefe;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: none;
}

th[data-action="smart-sort-column"] {
  cursor: pointer;
}

th[data-sort-direction="asc"]::after {
  content: " ^";
}

th[data-sort-direction="desc"]::after {
  content: " v";
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fcfcfd;
}

.status {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.state-good {
  color: #1e6844;
  background: #e5f5ed;
  border: 1px solid #bde3ce;
}

.state-watch {
  color: #8a5d12;
  background: #fff4d8;
  border: 1px solid #f1d797;
}

.state-info {
  color: #31508c;
  background: #e9eefb;
  border: 1px solid #c7d3ef;
}

.state-danger {
  color: #994036;
  background: #fae8e5;
  border: 1px solid #efc0bb;
}

.state-muted {
  color: #52616a;
  background: #eef2f4;
  border: 1px solid #d7e0e4;
}

.list-stack {
  display: grid;
  gap: 8px;
}

.list-row,
.activity-row,
.timeline-item,
.detail-row,
.reminder-row {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.list-row.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
}

.reminder-row.compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
}

.row-title {
  font-weight: 700;
  line-height: 1.28;
}

.row-meta,
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.row-meta {
  display: block;
  margin-top: 4px;
}

.priority-item[data-urgency="due"],
.project-snapshot-card[data-urgency="due"],
.list-row.compact[data-urgency="due"],
.reminder-row.compact[data-urgency="due"] {
  box-shadow: inset 3px 0 0 #a82438;
}

.priority-item[data-urgency="overdue"],
.project-snapshot-card[data-urgency="overdue"],
.list-row.compact[data-urgency="overdue"],
.reminder-row.compact[data-urgency="overdue"] {
  box-shadow: inset 3px 0 0 #d54545;
}

.priority-item[data-urgency="review"],
.project-snapshot-card[data-urgency="review"],
.list-row.compact[data-urgency="review"],
.reminder-row.compact[data-urgency="review"] {
  box-shadow: inset 3px 0 0 #d28a1c;
}

.priority-item .table-action,
.project-snapshot-card .table-action {
  align-self: center;
}

.reminder-row.compact .actions-row {
  justify-content: flex-end;
  align-self: center;
}

.panel-header .table-action {
  flex-shrink: 0;
}

.quiet-icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}

.card-actions-menu {
  min-width: 176px;
}

.button-stack {
  display: grid;
  gap: 8px;
}

.quick-add-primary-button {
  justify-content: flex-start;
}

.add-option-button {
  justify-content: flex-start;
}

.summary-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  gap: 5px;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(55, 65, 81, 0.04);
}

.summary-card strong {
  font-size: 19px;
  line-height: 1;
  color: #2f3542;
}

.summary-card span {
  font-size: 12px;
  font-weight: 800;
  color: #4b5563;
}

.summary-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.settings-summary-grid {
  align-items: stretch;
}

.quick-add-directory {
  display: grid;
  gap: 14px;
}

.quick-add-directory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-add-group {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 18px rgba(55, 65, 81, 0.04);
  overflow: hidden;
}

.quick-add-group summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.quick-add-group summary::-webkit-details-marker {
  display: none;
}

.quick-add-group[open] summary {
  border-bottom: 1px solid var(--line);
}

.quick-add-group summary h3 {
  margin-top: 2px;
}

.quick-add-group summary .button-icon {
  flex: 0 0 auto;
  margin-top: 4px;
  color: #7b8797;
  transition: transform 160ms ease;
}

.quick-add-group[open] summary .button-icon {
  transform: rotate(180deg);
}

.quick-add-subactions {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
}

.search-results-groups {
  display: grid;
  gap: 14px;
}

.search-results-group {
  display: grid;
  gap: 8px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.5fr);
  gap: 16px;
  align-items: start;
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.three-column {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-item {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.detail-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.detail-value {
  margin-top: 3px;
  font-weight: 750;
}

.progress-track {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 8px;
  background: #e5ecef;
}

.progress-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--burgundy), var(--blue));
}

.status-distribution {
  display: grid;
  gap: 10px;
}

.distribution-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 10px;
}

.calendar-grid,
.week-grid {
  display: grid;
  gap: 8px;
}

.week-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-cell,
.week-column,
.time-slot {
  min-height: 96px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.calendar-cell.muted-cell {
  background: #f1f5f7;
  color: var(--muted);
}

.calendar-date,
.week-day {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-event {
  display: block;
  margin-top: 6px;
  padding: 6px;
  border-left: 3px solid var(--burgundy);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 750;
}

.ac-calendar-panel {
  overflow: visible;
}

.ac-calendar-header {
  align-items: center;
}

.ac-calendar-header .actions-row {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ac-calendar-mode-toggle .tab-button {
  padding: 6px 10px;
  font-size: 11px;
}

.ac-calendar-body {
  display: grid;
  gap: 8px;
}

.ac-calendar-today-list {
  display: grid;
  gap: 7px;
}

.ac-week-grid {
  grid-template-columns: repeat(7, minmax(138px, 1fr));
  overflow-x: auto;
  padding-bottom: 4px;
}

.week-column.is-today,
.calendar-cell:has(.ac-event-chip.is-overdue) {
  border-color: rgba(168, 36, 56, 0.22);
}

.calendar-event.ac-event-chip {
  width: 100%;
  border: 1px solid #e5eaf0;
  border-left: 3px solid var(--burgundy);
  text-align: left;
}

.calendar-event.ac-event-chip span,
.calendar-event.ac-event-chip small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event.ac-event-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.calendar-event.ac-event-chip.is-compact {
  min-height: 27px;
  padding: 5px 6px;
  font-size: 11px;
}

.calendar-event.ac-event-chip.type-schedule {
  border-left-color: #d99418;
}

.calendar-event.ac-event-chip.type-approval,
.calendar-event.ac-event-chip.type-request {
  border-left-color: #28814b;
}

.calendar-event.ac-event-chip.is-overdue {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.calendar-empty-mini {
  display: grid;
  place-items: center;
  min-height: 54px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.timeline {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px 12px;
}

.time-label {
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.profile-header {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.profile-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-title-row h2 {
  font-size: 20px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.site-photo {
  min-height: 128px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(20, 52, 58, 0.28), rgba(70, 104, 168, 0.2)),
    linear-gradient(0deg, #6f7b70 0 26%, #c7b38a 26% 44%, #d8dde0 44% 100%);
  position: relative;
}

.site-photo::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 18%;
  bottom: 25%;
  height: 34%;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.9) 0 12%, transparent 12% 18%, rgba(255,255,255,0.85) 18% 30%, transparent 30% 36%, rgba(255,255,255,0.82) 36% 48%, transparent 48% 54%, rgba(255,255,255,0.84) 54% 66%, transparent 66% 72%, rgba(255,255,255,0.88) 72% 100%),
    #9aa9ad;
  clip-path: polygon(0 35%, 100% 12%, 100% 100%, 0 100%);
}

.site-photo::after {
  content: attr(data-caption);
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: #ffffff;
  background: rgba(23, 33, 38, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.template-grid,
.reports-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.record-card,
.module-card,
.report-card {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.card-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: none;
}

.toolbar > .search-control {
  flex: 1 1 260px;
}

.toolbar .search-control input {
  width: 100%;
  min-width: 220px;
}

.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.field.full {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 3px;
}

.attendance-hours-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 4px;
}

.attendance-hours-preview div {
  min-width: 0;
  padding: 9px 10px;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.attendance-hours-preview span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.attendance-hours-preview strong {
  color: var(--ink);
  font-size: 15px;
}

.attendance-flow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 220px;
  max-width: 520px;
}

.attendance-flow-chip {
  display: inline-flex;
  align-items: center;
  max-width: 180px;
  min-height: 26px;
  padding: 5px 8px;
  overflow-wrap: anywhere;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.attendance-flow-chip.lunch {
  color: #73510f;
  background: #fff5db;
  border-color: #ecd28e;
}

.attendance-flow-chip.out {
  color: #1f5f47;
  background: #eaf6ef;
  border-color: #bfe4cd;
}

.attendance-flow-chip.empty {
  color: var(--muted);
  background: var(--surface-soft);
}

.attendance-flow-link {
  flex: 0 0 22px;
  height: 1px;
  background: var(--line-strong);
  position: relative;
}

.attendance-flow-link::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
  background: transparent;
}

.task-attendance-submit-row {
  justify-content: flex-end;
  margin: 8px 0;
}

.permission-grid {
  display: grid;
  grid-template-columns: 190px repeat(7, minmax(92px, 1fr));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.permission-cell {
  min-height: 42px;
  padding: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.permission-cell:nth-child(8n) {
  border-right: 0;
}

.permission-cell.header {
  color: var(--muted);
  background: #f9fbfc;
  font-weight: 900;
  text-transform: uppercase;
}

.checkmark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: #ffffff;
  background: var(--green);
  font-weight: 900;
}

.dashmark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: var(--muted);
  background: #edf2f4;
  font-weight: 900;
}

.side-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.side-panel.open {
  display: block;
}

.side-panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 33, 38, 0.34);
}

.side-panel-card {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, 92vw);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.side-panel .panel-header {
  min-height: 76px;
}

.side-panel .panel-body {
  overflow: auto;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(23, 33, 38, 0.36);
}

.modal-layer.open {
  display: grid;
}

.modal-card {
  width: min(720px, 100%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(700px, calc(100vh - 32px));
  max-height: min(700px, calc(100dvh - 32px));
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

#modalBody {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  overflow: auto;
  overscroll-behavior: contain;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 150;
  display: none;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #ffffff;
  background: #172126;
  box-shadow: var(--shadow);
  font-weight: 750;
}

.toast.show {
  display: block;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: #fbfdfe;
  text-align: center;
}

.empty-state-copy {
  display: grid;
  gap: 3px;
  max-width: 420px;
  margin: 0 auto;
}

.empty-state strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.empty-state span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.empty-state .actions-row {
  justify-content: center;
  margin-top: 8px;
}

.checklist-field {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px 10px;
  background: #ffffff;
}

.checklist-field legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 5px 8px;
  margin-top: 4px;
}

.checklist-option {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.3;
}

.checklist-option input {
  margin-top: 2px;
  accent-color: var(--burgundy);
}

.assignee-chip-row,
.assignee-selected,
.assignee-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 19px;
  padding: 2px 6px;
  border: 1px solid #d9e2e7;
  border-radius: 999px;
  color: var(--ink-soft);
  background: #f7fafb;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.assignee-chip.is-empty,
.assignee-chip.is-more {
  color: var(--muted);
  background: #ffffff;
}

.assignee-chip-remove {
  cursor: pointer;
}

.assignee-chip-remove:hover,
.assignee-chip-remove:focus-visible {
  border-color: var(--burgundy);
  color: var(--burgundy);
}

.assignee-selector {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px 10px;
  background: #ffffff;
}

.assignee-selector legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.assignee-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 5px 8px;
  margin-top: 6px;
}

.assignee-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.table-assignee-select {
  min-width: 150px;
  min-height: 92px;
}

.sensitive-strip {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  background: var(--surface-warm);
}

.kanban-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.kanban-column {
  min-height: 160px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfc;
}

.kanban-column h3 {
  margin-bottom: 10px;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.segmented-toggle {
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.segmented-toggle .tab-button {
  border-radius: 999px;
  padding: 8px 12px;
}

.segmented-toggle .tab-button.active {
  background: var(--burgundy);
  color: #ffffff;
}

.quick-chip-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quick-chip {
  border: 1px solid #eef1f4;
  background: #fbfcfd;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
}

.quick-chip.active {
  border-color: var(--burgundy);
  background: var(--burgundy-soft);
  color: var(--burgundy-dark);
}

.action-kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(246px, 1fr);
  overflow-x: auto;
  gap: 9px;
  align-items: start;
  padding: 0 0 6px;
}

.action-kanban-column {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  padding: 9px;
  min-height: 430px;
  box-shadow: none;
}

.action-kanban-column.is-collapsed {
  min-height: 46px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.kanban-column-header h3 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12.5px;
  font-weight: 800;
  color: #202633;
}

.kanban-column-header h3 span {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  color: #202633;
  background: #f5f6f8;
  font-weight: 800;
  font-size: 11px;
}

.kanban-column-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.action-kanban-column .kanban-stack.drop-target-active {
  border: 1px solid rgba(168, 36, 56, 0.35);
  background: rgba(168, 36, 56, 0.06);
  border-radius: 10px;
}

.action-kanban-column.drop-target-active {
  border-color: rgba(168, 36, 56, 0.38);
  background: rgba(168, 36, 56, 0.05);
}

.kanban-stack {
  display: grid;
  gap: 7px;
  align-content: start;
  min-height: 0;
  flex: 1;
}

.kanban-stack.is-empty {
  align-content: center;
  border: 1px solid #eef1f4;
  border-radius: 10px;
  background: #ffffff;
  min-height: 118px;
}

.action-card {
  display: grid;
  gap: 6px;
  cursor: pointer;
  border: 1px solid #e5eaf0;
  background: #ffffff;
  border-radius: 10px;
  padding: 9px 10px;
  transition: box-shadow 120ms ease, opacity 120ms ease, transform 120ms ease;
}

.action-card.type-tasks {
  border-left: 1px solid #e5eaf0;
}

.action-card.type-schedules {
  border-left: 1px solid #e5eaf0;
}

.action-card.type-approvals {
  border-left: 1px solid #e5eaf0;
}

.action-card.type-requests {
  border-left: 1px solid #e5eaf0;
}

.action-card:hover,
.action-card:focus-within {
  border-color: #e2c3c9;
  box-shadow: 0 8px 18px rgba(55, 65, 81, 0.06);
}

.action-card-id {
  color: #0f172a;
  font-size: 12px;
  font-weight: 850;
}

.action-card .row-title {
  color: #111827;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.25;
}

.action-card .row-meta {
  color: #536071;
  font-size: 11px;
}

.action-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.action-card-top .row-title {
  flex: 1 1 auto;
}

.action-card-top .status {
  flex: 0 1 auto;
  max-width: 48%;
}

.action-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.action-type-badge .line-icon {
  width: 13px;
  height: 13px;
}

.action-type-badge.type-tasks {
  color: #315f83;
  background: #eaf3fb;
  border: 1px solid #c9deef;
}

.action-type-badge.type-schedules {
  color: #7a5820;
  background: #fff5df;
  border: 1px solid #ead39d;
}

.action-type-badge.type-approvals {
  color: #326443;
  background: #eaf7ed;
  border: 1px solid #c5e3cd;
}

.action-card-fields {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}

.action-card-fields div {
  display: grid;
  gap: 2px;
}

.action-card-fields span:first-child {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.action-card:active {
  cursor: grabbing;
}

.action-card.is-dragging {
  opacity: 0.65;
  box-shadow: 0 10px 24px rgba(20, 23, 31, 0.14);
  transform: scale(0.99);
}

.kanban-priority {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-soft);
  border: 0;
  border-radius: 999px;
  padding: 2px 0;
  white-space: nowrap;
}

.kanban-priority.is-high {
  color: #dc2626;
}

.kanban-priority.is-medium {
  color: #f97316;
}

.kanban-priority.is-low {
  color: #16a34a;
}

.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.action-card-meta-line,
.action-card-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #536071;
  font-size: 11px;
}

.action-card-footer {
  justify-content: space-between;
  gap: 6px;
  margin-top: 0;
}

.action-card-detail-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.action-card-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 19px;
  padding: 2px 6px;
  border-radius: 999px;
  color: #4b5563;
  background: #f7fafb;
  border: 1px solid #e1e7ee;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.2;
}

.mini-person-icon,
.mini-calendar-icon {
  position: relative;
  width: 14px;
  height: 14px;
  color: #64748b;
  flex: 0 0 14px;
}

.mini-person-icon::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.mini-person-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: 1px;
  width: 9px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

.mini-calendar-icon::before {
  content: "";
  position: absolute;
  inset: 2px 1px 1px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.mini-calendar-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 5px;
  height: 1.5px;
  background: currentColor;
}

.kanban-empty-mini {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  min-height: 92px;
  font-size: 12px;
  color: var(--muted);
  padding: 12px 10px;
  text-align: center;
}

.kanban-empty-mini strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.kanban-empty-mini span {
  max-width: 190px;
}

.kanban-add-item {
  align-self: center;
  min-height: 30px;
  margin-top: 8px;
  padding: 5px 10px;
  border: 0;
  color: var(--burgundy);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.kanban-add-item:hover,
.kanban-add-item:focus-visible {
  color: var(--burgundy-dark);
  background: #fff0f3;
  border-radius: 999px;
  outline: 0;
}

.action-filter-menu {
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  overflow: auto;
}

.action-center-tools {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0 0 16px 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}

.action-center-overview-tools {
  margin-top: 0;
  margin-bottom: 0;
  overflow-x: visible;
  overflow-y: visible;
  align-items: stretch;
}

.action-center-filter-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.action-center-overview-tools .dropdown:not(.open) > .dropdown-menu {
  display: none;
}

.action-center-overview-tools .dropdown.open > .dropdown-menu {
  display: grid;
}

.action-center-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  align-items: end;
  min-width: 0;
}

.action-center-filter-main {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.action-filter-title {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.action-filter-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.action-filter-field label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.action-filter-dropdown {
  width: 100%;
  min-width: 0;
}

.action-filter-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.action-filter-dropdown-trigger span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-filter-dropdown-trigger .chevron-icon {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  color: var(--ink-soft);
}

.action-filter-dropdown-trigger:hover,
.action-filter-dropdown-trigger:focus-visible,
.action-filter-dropdown.open .action-filter-dropdown-trigger {
  border-color: #e8c8ce;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgba(168, 36, 56, 0.08);
  outline: 0;
}

.action-filter-dropdown-menu {
  left: 0;
  right: auto;
  width: 100%;
  min-width: 0;
  max-height: 260px;
  overflow-y: auto;
  gap: 3px;
  padding: 6px;
}

.action-filter-dropdown-menu .action-filter-option {
  justify-content: flex-start;
  min-height: 30px;
  padding: 6px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.action-filter-dropdown-menu .action-filter-option.is-active {
  color: #ffffff;
  background: var(--burgundy);
}

.action-filter-dropdown-menu .action-filter-option.is-active:hover,
.action-filter-dropdown-menu .action-filter-option.is-active:focus-visible {
  color: #ffffff;
  background: var(--burgundy-dark);
}

.action-center-filter-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex: 0 0 auto;
  min-width: 0;
}

.action-center-filter-actions .action-toolbar {
  justify-content: flex-end;
  margin-left: 0;
}

.action-center-page-tools {
  gap: 10px;
}

.action-center-page-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
}

.action-center-page-meta .view-toggle {
  margin-left: auto;
}

.action-center-primary-row {
  justify-content: space-between;
}

.section-top-controls {
  align-items: stretch;
  width: 100%;
}

.action-control-group {
  display: grid;
  gap: 6px;
}

.action-control-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.action-center-workflow-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.action-center-filter-row {
  display: flex;
  align-items: end;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.ac-approved-toolbar {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-wrap: nowrap;
}

.action-center-workflow-row {
  padding-top: 2px;
}

.action-center-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 220px;
  max-width: 420px;
  flex: 1 1 300px;
}

.action-center-search .search-icon {
  position: absolute;
  left: 11px;
}

.action-center-search input,
.compact-filter-select {
  min-height: 32px;
  border: 1px solid #e5e9ee;
  border-radius: 999px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 12px;
  font-weight: 650;
}

.action-center-search input {
  width: 100%;
  padding: 7px 12px 7px 32px;
}

.compact-filter-select {
  min-height: 32px;
  min-width: 108px;
  max-width: 190px;
  border-radius: 10px;
  padding: 6px 28px 6px 10px;
  color: #1f2937;
  border-color: #e1e6ed;
  font-size: 11px;
}

.ac-approved-toolbar .compact-filter-field:nth-of-type(2) .compact-filter-select {
  min-width: 178px;
  max-width: 190px;
}

.compact-filter-field {
  display: grid;
  gap: 4px;
  flex: 0 0 auto;
}

.compact-filter-field span {
  color: #47505c;
  font-size: 11px;
  font-weight: 800;
  text-transform: none;
  white-space: nowrap;
}

.action-toolbar-divider {
  width: 1px;
  align-self: stretch;
  min-height: 32px;
  background: #e5e9ee;
  margin: 0 2px 0 2px;
  flex: 0 0 auto;
}

.action-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
  flex-wrap: nowrap;
  flex: 0 0 auto;
}

.action-toolbar .dropdown {
  flex: 0 0 auto;
}

.action-center-main-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.action-center-main-toolbar-left,
.action-center-main-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.action-center-main-toolbar-left {
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.action-center-main-toolbar-left strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
}

.action-center-main-toolbar-right {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.action-center-summary-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border: 1px solid #e4e9ef;
  border-radius: 999px;
  color: #475569;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.summary-pill.is-alert {
  color: #9f1239;
  background: #fff1f2;
  border-color: #fecdd3;
}

.summary-pill.is-today {
  color: #075985;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.table-toolbar-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.table-quick-filter-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  flex-wrap: wrap;
}

.table-toolbar-divider {
  width: 1px;
  min-height: 34px;
  background: var(--line-strong);
  flex: 0 0 auto;
}

.table-toolbar-actions {
  align-items: center;
  gap: 6px;
}

.table-toolbar-button,
.table-add-button {
  height: 32px;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.table-toolbar-button {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.table-toolbar-button .line-icon,
.table-add-button .line-icon {
  width: 14px;
  height: 14px;
}

.table-toolbar-button:hover,
.table-toolbar-button:focus-visible {
  color: var(--burgundy-dark);
  border-color: #e8c8ce;
  background: #fffafa;
  box-shadow: none;
  outline: 0;
}

.table-add-button {
  background: var(--burgundy);
  border-color: var(--burgundy);
  box-shadow: none;
}

.table-add-button:hover,
.table-add-button:focus-visible {
  background: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
  box-shadow: 0 0 0 3px rgba(168, 36, 56, 0.08);
  outline: 0;
}

.table-add-button .chevron-icon {
  width: 10px;
  height: 10px;
  margin-left: 2px;
}

.table-filter-menu,
.table-settings-menu {
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  overflow: auto;
  gap: 10px;
}

.table-add-menu {
  min-width: 220px;
}

.table-filter-popover-grid {
  display: grid;
  gap: 10px;
}

.table-popover-actions {
  justify-content: flex-end;
  gap: 8px;
}

.row-action-menu {
  display: inline-flex;
  justify-content: flex-end;
  width: 100%;
}

.table-setting-stack {
  display: grid;
  gap: 8px;
  margin: 6px 0 10px;
}

.table-setting-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.table-setting-row span {
  min-width: 0;
}

.table-setting-row input {
  width: 100%;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
  text-align: right;
}

.row-action-trigger {
  width: 24px;
  min-height: 24px;
  border-radius: 8px;
  box-shadow: none;
}

.row-action-trigger .line-icon {
  width: 12px;
  height: 12px;
}

.action-filter-settings-button,
.ac-add-action-button {
  height: 32px;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.action-filter-settings-button {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.action-filter-settings-button .line-icon,
.ac-add-action-button .line-icon {
  width: 14px;
  height: 14px;
}

.action-filter-settings-button:hover,
.action-filter-settings-button:focus-visible {
  color: var(--burgundy-dark);
  border-color: #e8c8ce;
  background: #fffafa;
  box-shadow: none;
  outline: 0;
}

.ac-add-action-button {
  background: var(--burgundy);
  border-color: var(--burgundy);
  box-shadow: none;
}

.ac-add-action-button:hover,
.ac-add-action-button:focus-visible {
  background: var(--burgundy-dark);
  border-color: var(--burgundy-dark);
  box-shadow: 0 0 0 3px rgba(168, 36, 56, 0.08);
  outline: 0;
}

.ac-add-action-button .chevron-icon {
  width: 10px;
  height: 10px;
  margin-left: 2px;
}

.ac-add-menu {
  min-width: 184px;
  padding: 8px;
}

.ac-add-menu button {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
}

.ac-add-menu .line-icon {
  width: 16px;
  height: 16px;
  color: #1f2937;
}

.action-filter-settings-menu {
  width: min(360px, calc(100vw - 24px));
  max-height: 70vh;
  overflow: auto;
}

.action-filter-settings-scroll {
  display: grid;
  gap: 10px;
}

.action-filter-menu-actions {
  justify-content: flex-end;
  gap: 8px;
  padding-bottom: 2px;
}

.task-focus-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.task-focus-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 0 0 auto;
}

.task-focus-strip-label span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.task-focus-strip-label strong {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--burgundy-dark);
  background: var(--burgundy-soft);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.task-focus-chip-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.task-focus-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 150px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #e4e9ef;
  border-radius: 999px;
  color: var(--ink-soft);
  background: #fbfcfd;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-focus-chip:hover,
.task-focus-chip:focus-visible {
  border-color: #e8c8ce;
  color: var(--burgundy-dark);
  background: #fffafa;
  outline: 0;
}

.task-focus-chip.active {
  border-color: var(--burgundy);
  color: #ffffff;
  background: var(--burgundy);
}

.active-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 0;
  flex-wrap: wrap;
}

.active-filter-chip,
.clear-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 0;
  color: var(--burgundy-dark);
  background: #fff0f3;
  font-size: 11px;
  font-weight: 750;
}

.active-filter-chip span {
  font-size: 16px;
  line-height: 1;
}

.clear-filter-chip {
  background: transparent;
  color: var(--burgundy);
}

.clear-filter-chip .button-icon {
  width: 14px;
  height: 14px;
}

.workflow-chip {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #e5e9ee;
  border-radius: 999px;
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 11px;
  font-weight: 650;
}

.workflow-chip.active {
  border-color: rgba(168, 36, 56, 0.32);
  background: var(--burgundy-soft);
  color: var(--burgundy-dark);
}

.filter-inline {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.menu-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.action-table-tools {
  margin-bottom: 10px;
  justify-content: flex-start;
  gap: 8px;
}

.action-table-search {
  min-width: 220px;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 34px;
  padding: 7px 12px;
  background: #fff;
}

.action-center-table thead th {
  white-space: nowrap;
}

.action-center-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.th-filter-btn {
  border: 0;
  background: transparent;
  color: #9aa3b2;
  font-size: 11px;
  margin-left: 6px;
  padding: 0 4px;
}

.column-filter-menu {
  width: 220px;
}

.action-center-table.density-compact td,
.action-center-table.density-compact th {
  padding-top: 6px;
  padding-bottom: 6px;
}

.action-center-table.density-comfortable td,
.action-center-table.density-comfortable th {
  padding-top: 9px;
  padding-bottom: 9px;
}

.action-center-table td:first-child,
.action-center-table th:first-child {
  width: 32px;
}

.action-center-table td:last-child,
.action-center-table th:last-child {
  width: 52px;
}

.action-center-table input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.compact-icon-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 8px;
}

.ac-row-clickable {
  cursor: pointer;
}

.ac-row-clickable .status {
  font-size: 11px;
  padding: 2px 8px;
}

.ac-event-chip {
  border-radius: 999px;
}

.ac-event-chip.type-task {
  background: #eef4ff;
  color: #335b94;
}

.ac-event-chip.type-schedule {
  background: #fff0f3;
  color: var(--burgundy-dark);
}

.ac-event-chip.type-approval {
  background: #fff7df;
  color: #8d6100;
}

.ac-event-chip.is-overdue {
  background: #ffecef;
  color: #a31f32;
}

.schedule-cockpit {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.schedule-cockpit-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.schedule-cockpit-metric {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.schedule-cockpit-metric span,
.schedule-cockpit-metric small,
.schedule-cockpit-meta,
.schedule-upcoming-head span,
.schedule-group-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-cockpit-metric span,
.schedule-cockpit-panel-head span,
.schedule-group-title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.schedule-cockpit-metric strong {
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
}

.schedule-cockpit-metric small {
  color: var(--ink-soft);
  font-size: 11px;
}

.schedule-cockpit-metric.tone-alert {
  border-color: #ffd3db;
  background: #fff6f7;
}

.schedule-cockpit-metric.tone-alert strong {
  color: #a31f32;
}

.schedule-cockpit-metric.tone-today {
  border-color: #cfe0ff;
  background: #f5f8ff;
}

.schedule-cockpit-metric.tone-today strong {
  color: #2f5e9d;
}

.schedule-cockpit-metric.tone-watch {
  border-color: #f5dfa7;
  background: #fffaf0;
}

.schedule-cockpit-metric.tone-watch strong {
  color: #8d6100;
}

.schedule-cockpit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 10px;
}

.schedule-cockpit-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.schedule-cockpit-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.schedule-cockpit-panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.schedule-timeline,
.schedule-upcoming-list,
.schedule-upcoming-groups {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.schedule-timeline-row,
.schedule-upcoming-card {
  min-width: 0;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  background: #fbfcfd;
}

.schedule-timeline-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
}

.schedule-timeline-row time {
  color: var(--burgundy-dark);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.schedule-timeline-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-cockpit-title {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-cockpit-meta {
  color: var(--muted);
  font-size: 11px;
}

.schedule-cockpit-assignees {
  min-width: 0;
}

.schedule-timeline-status {
  display: inline-flex;
  justify-content: flex-end;
}

.schedule-cockpit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}

.schedule-cockpit-actions .table-action {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 11px;
  white-space: nowrap;
}

.schedule-upcoming-group {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.schedule-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px;
  text-transform: uppercase;
}

.schedule-group-title span {
  color: var(--burgundy);
}

.schedule-upcoming-card {
  display: grid;
  gap: 5px;
  padding: 8px;
}

.schedule-upcoming-head,
.schedule-upcoming-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.schedule-upcoming-head span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.schedule-upcoming-foot .assignee-chip-row {
  min-width: 0;
}

.editable-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfd;
}

.data-table.is-empty,
.editable-table.is-empty {
  min-width: 0;
}

.empty-table-row:hover {
  background: transparent;
}

.empty-table-row td {
  padding: 0;
  border-bottom: 0;
}

.empty-table-row .empty-state {
  min-height: 76px;
  padding: 14px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.editable-table td input,
.editable-table td select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  min-height: 32px;
  padding: 6px 8px;
  background: #ffffff;
}

.editable-table.is-editing td input:focus,
.editable-table.is-editing td select:focus {
  border-color: var(--burgundy);
  box-shadow: 0 0 0 2px rgba(168, 36, 56, 0.1);
  outline: none;
}

.truncate-cell {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.compact-actions {
  gap: 4px;
  flex-wrap: nowrap;
}

.compact-actions .table-action {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 11px;
}

.table-action.danger-link {
  color: var(--red);
  background: #fff7f8;
  border-color: #f3c8d0;
}

@media (max-width: 1366px) {
  .truncate-cell {
    max-width: 140px;
  }

  .compact-actions .table-action {
    min-height: 24px;
    padding: 3px 6px;
  }
}

@media (max-width: 1366px) {
  :root {
    --sidebar-width: 252px;
    --content-padding-y: 12px;
    --content-padding-x: 14px;
    --section-gap: 9px;
    --card-gap: 7px;
  }

  .topbar {
    min-height: 46px;
    padding: 6px 12px;
  }

  .global-search {
    width: min(420px, 38vw);
    min-width: 240px;
  }

  .dashboard-metrics,
  .summary-grid {
    gap: 7px;
  }

  table {
    min-width: 700px;
  }
}

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 240px;
    --content-padding-y: 10px;
    --content-padding-x: 12px;
    --section-gap: 8px;
    --card-gap: 7px;
  }

  .brand {
    grid-template-columns: 40px minmax(0, 1fr) 28px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .brand-name {
    font-size: 21px;
  }

  .nav-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }

  .topbar-actions {
    flex-wrap: nowrap;
  }

  .global-search {
    width: min(380px, 34vw);
    min-width: 220px;
  }

  .dashboard-reference .metric-note,
  .metric-note,
  .page-subtitle {
    display: none;
  }

  .action-center-filter-grid {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
  }

  .action-kanban {
    grid-auto-columns: minmax(232px, 1fr);
  }
}

@media (max-width: 1220px) {
  .widget-grid,
  .template-grid,
  .reports-grid,
  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-layout,
  .two-column,
  .three-column {
    grid-template-columns: 1fr;
  }

  .ops-overview-grid {
    grid-template-columns: 1fr;
  }

  .week-grid,
  .kanban-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-cockpit-grid {
    grid-template-columns: 1fr;
  }

  .schedule-timeline-row {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .schedule-timeline-row .schedule-cockpit-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: auto;
  }

  .projects-table-desktop table {
    min-width: 640px;
  }

  .projects-table-desktop th,
  .projects-table-desktop td {
    padding: 9px 10px;
  }
}

@media (max-width: 1024px) {
  :root {
    --content-padding-y: 10px;
    --content-padding-x: 12px;
    --section-gap: 8px;
    --card-gap: 7px;
  }

  .topbar {
    align-items: flex-start;
    gap: 8px;
    padding: 7px 10px;
  }

  .topbar-left,
  .topbar-actions {
    width: 100%;
  }

  .topbar-left {
    align-items: flex-start;
  }

  .topbar-title {
    flex: 1 1 auto;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .global-search {
    order: -1;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .global-search input {
    width: 100%;
  }

  .summary-grid,
  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-button {
    margin-left: auto;
    max-width: 230px;
  }

  .panel-header,
  .modal-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .panel-header,
  .panel-body,
  #modalBody {
    padding-left: 12px;
    padding-right: 12px;
  }

  .toolbar {
    padding: 7px 9px;
  }

  .side-panel-card {
    width: min(680px, 100vw);
  }

  table {
    min-width: 680px;
  }
}

@media (max-width: 1180px) {
  .action-center-filter-row {
    display: grid;
    align-items: start;
  }

  .action-center-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .action-center-main-toolbar {
    align-items: stretch;
  }

  .action-center-main-toolbar-right {
    flex-wrap: wrap;
  }

  .action-center-main-toolbar-right,
  .action-center-main-toolbar-right .action-toolbar {
    margin-left: 0;
  }

  .task-focus-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .task-focus-chip-row {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .action-center-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-cockpit-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-toolbar-panel {
    display: grid;
    gap: 8px;
    align-items: stretch;
    min-height: 0;
    padding: 10px;
  }

  .table-toolbar-left,
  .table-toolbar-actions {
    width: 100%;
  }

  .table-toolbar-divider {
    display: none;
  }

  .table-toolbar-actions {
    justify-content: flex-end;
  }

  .action-center-main-toolbar {
    display: grid;
    gap: 8px;
  }

  .action-center-main-toolbar-right {
    justify-content: space-between;
  }

  .task-focus-strip {
    display: grid;
    align-items: stretch;
  }

  .task-focus-strip-label {
    justify-content: space-between;
    width: 100%;
  }

  .ac-spreadsheet-toolbar {
    display: grid;
    align-items: stretch;
  }

  .ac-week-grid {
    grid-template-columns: repeat(7, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .attendance-hours-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attendance-flow {
    min-width: 0;
    max-width: 100%;
  }

  .attendance-flow-chip {
    max-width: 100%;
  }

  .schedule-timeline-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .schedule-timeline-row time,
  .schedule-timeline-status,
  .schedule-timeline-row .schedule-cockpit-actions {
    justify-content: flex-start;
  }

  .schedule-timeline-row .schedule-cockpit-actions {
    grid-column: auto;
  }

  .schedule-upcoming-foot {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 880px) {
  :root {
    --content-padding-y: 10px;
    --content-padding-x: 10px;
    --section-gap: 8px;
    --card-gap: 7px;
  }

  .app-shell {
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    grid-template-columns: 1fr;
  }

  .ops-toolbar {
    align-items: stretch;
  }

  .ops-toolbar .search-control,
  .ops-toolbar .secondary-button {
    width: 100%;
  }

  .linked-record-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 40;
    left: 0;
    top: 0;
    width: min(300px, 88vw);
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    padding: 12px;
    box-shadow: var(--shadow);
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  .app-shell.sidebar-open::after {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list,
  .nav-bottom {
    display: grid;
    overflow-x: visible;
    overflow-y: auto;
    gap: 8px;
    padding-bottom: 4px;
  }

  .nav-bottom {
    margin-top: 10px;
    padding-top: 10px;
  }

  .nav-item {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    min-width: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    align-items: stretch;
    flex-direction: row;
    flex-wrap: wrap;
    min-height: 0;
    padding: 8px 12px;
    gap: 8px;
  }

  .topbar-left {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    width: 100%;
    align-items: flex-start;
    gap: 8px;
  }

  .topbar-title h1 {
    font-size: 17px;
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .page-subtitle {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    gap: 8px;
  }

  .topbar-actions > .dropdown {
    flex: 0 0 auto;
  }

  .topbar-actions > .account-dropdown {
    flex: 1 1 220px;
    margin-left: auto;
    min-width: 0;
  }

  .global-search {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .global-search-results {
    max-height: min(52svh, 360px);
    overflow: auto;
  }

  .global-search input {
    width: 100%;
    max-width: none;
  }

  .global-search-filter-button {
    min-width: 96px;
  }

  .account-button {
    width: 100%;
    max-width: none;
    margin-left: 0;
    justify-content: flex-start;
  }

  .topbar-actions > .dropdown .dropdown-menu,
  .topbar-actions > .account-dropdown .dropdown-menu {
    left: auto;
    right: 0;
    width: min(320px, calc(100vw - 36px));
    max-width: calc(100vw - 36px);
  }

  .action-filter-dropdown-menu {
    right: auto;
    width: 100%;
    min-width: 0;
  }

  .dropdown,
  .account-dropdown {
    min-width: 0;
  }

  .notification-menu,
  .account-menu {
    min-width: 0;
  }

  .quick-add-directory-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border-radius: 14px;
  }

  .projects-table-desktop {
    display: none;
  }

  .projects-mobile-cards {
    display: grid;
    gap: 10px;
  }

  .summary-grid,
  .dashboard-metrics,
  .widget-grid,
  .template-grid,
  .reports-grid,
  .module-grid,
  .detail-grid,
  .detail-grid.three,
  .photo-grid,
  .form-grid,
  .calendar-grid,
  .week-grid,
  .kanban-row {
    grid-template-columns: 1fr;
  }

  .priority-item,
  .reminder-row.compact {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .priority-side,
  .priority-meta,
  .priority-side .status {
    justify-items: start;
    justify-self: start;
    text-align: left;
  }

  .priority-side {
    width: 100%;
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-reference .metric-card {
    min-height: auto;
    padding: 18px;
  }

  .dashboard-reference .dashboard-metric-content {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
  }

  .dashboard-project-table-head {
    display: none;
  }

  .dashboard-project-row,
  .dashboard-schedule-row,
  .dashboard-priority-row,
  .dashboard-activity-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-project-main,
  .dashboard-schedule-main {
    width: 100%;
  }

  .dashboard-project-status,
  .dashboard-priority-side {
    justify-content: flex-start;
    justify-items: start;
  }

  .dashboard-project-progress,
  .dashboard-project-budget,
  .dashboard-schedule-meta {
    padding-left: 64px;
  }

  .dashboard-activity-time,
  .dashboard-priority-time {
    white-space: normal;
  }

  .priority-item .table-action,
  .reminder-row.compact .table-action {
    width: 100%;
  }

  .calendar-cell,
  .week-column {
    min-height: auto;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar > *,
  .filter-field,
  .search-control,
  .search-control input {
    width: 100%;
    min-width: 0;
  }

  .tabbar {
    flex-wrap: nowrap;
  }

  .list-row.compact,
  .reminder-row.compact {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .panel-header,
  .panel-body,
  #modalBody {
    padding-left: 14px;
    padding-right: 14px;
  }

  .modal-layer {
    padding: 16px;
  }

  .modal-card {
    width: min(560px, 100%);
    max-height: calc(100dvh - 32px);
  }

  .side-panel-card {
    width: 100vw;
  }
}

@media (max-width: 640px) {
  :root {
    --content-padding-y: 12px;
    --content-padding-x: 12px;
    --section-gap: 12px;
    --card-gap: 8px;
  }

  h1 {
    font-size: 18px;
  }

  .page-subtitle {
    font-size: 11px;
  }

  .auth-shell {
    align-items: start;
    place-items: start center;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding: max(12px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
    background: #f8f9fb;
  }

  .auth-shell::before {
    display: block;
    background: rgba(255, 255, 255, 0.28);
  }

  .auth-background {
    background-position: center;
  }

  .auth-card {
    width: min(100%, 348px);
    max-width: calc(100vw - 28px);
    padding: 18px 16px 15px;
    border-radius: 16px;
    margin: auto 0;
  }

  .auth-brand-lockup {
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
  }

  .auth-brand-mark {
    width: 56px;
    height: 56px;
  }

  .auth-brand-copy p {
    font-size: 12px;
  }

  .auth-title {
    font-size: 16px;
  }

  .auth-form {
    gap: 10px;
    margin-top: 12px;
  }

  .auth-field input[type="email"],
  .auth-field input[type="password"],
  .auth-field input[type="text"] {
    height: 42px;
    font-size: 16px;
  }

  .auth-options-row {
    align-items: center;
    gap: 8px;
  }

  .auth-remember,
  .auth-link-button {
    font-size: 12px;
  }

  .auth-submit {
    min-height: 42px;
  }

  .auth-status {
    min-height: 16px;
  }

  .auth-personnel-note strong {
    font-size: 11px;
  }

  .auth-personnel-note span {
    font-size: 10px;
  }

  .action-center-tools {
    padding: 12px;
  }

  .action-center-filter-row {
    gap: 10px;
  }

  .action-center-filter-grid {
    grid-template-columns: 1fr;
  }

  .action-center-filter-actions {
    position: relative;
    justify-content: stretch;
  }

  .action-center-filter-actions .action-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    justify-content: stretch;
  }

  .action-center-filter-actions .dropdown {
    position: static;
    width: 100%;
    min-width: 0;
  }

  .action-filter-settings-button,
  .ac-add-action-button {
    width: 100%;
  }

  .action-center-filter-actions .dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
  }

  .content {
    gap: var(--section-gap);
    padding: var(--content-padding-y) var(--content-padding-x);
  }

  .topbar-left {
    align-items: center;
  }

  .topbar {
    padding: 8px 10px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .topbar-icon,
  .account-button {
    width: 36px;
    min-width: 36px;
    justify-content: center;
  }

  .topbar-actions > .account-dropdown {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .account-button {
    padding-inline: 0;
  }

  .account-copy,
  .account-button .chevron-icon {
    display: none;
  }

  .dropdown,
  .account-dropdown {
    width: auto;
  }

  .global-search input,
  .search-control input,
  .field input,
  .field select,
  .field textarea,
  .inline-edit-input,
  .inline-edit-select {
    font-size: 16px;
  }

  .global-search {
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 3px;
  }

  .global-search-filter-button {
    min-width: 0;
    padding-inline: 10px 8px;
  }

  .global-search input {
    height: 36px;
    padding-left: 32px;
  }

  .notification-filter-row {
    padding-inline: 2px;
  }

  .notification-menu-head {
    padding-inline: 2px;
  }

  .panel-header {
    min-height: 0;
    padding: 14px;
  }

  .panel-body,
  #modalBody {
    padding: 14px;
  }

  .modal-layer {
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }

  .dashboard-project-progress,
  .dashboard-project-budget,
  .dashboard-schedule-meta {
    padding-left: 0;
  }

  .dropdown-menu,
  .notification-menu,
  .account-menu {
    max-width: calc(100vw - 24px);
  }

  table {
    min-width: 560px;
  }

  .data-table {
    min-width: 0;
    border-collapse: separate;
  }

  .data-table.is-empty {
    display: table;
    min-width: 560px;
    border-collapse: collapse;
  }

  .data-table thead {
    display: none;
  }

  .data-table.is-empty thead {
    display: table-header-group;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tbody {
    display: grid;
    gap: 10px;
  }

  .data-table.is-empty tbody {
    display: table-row-group;
  }

  .data-table tr {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
  }

  .editable-grid-table {
    min-width: 0;
  }

  .editable-grid-table thead {
    display: none;
  }

  .editable-grid-table tbody {
    gap: 8px;
  }

  .editable-grid-table tr {
    padding: 10px;
    border-radius: 10px;
  }

  .editable-grid-table td {
    height: auto;
    padding: 6px 0;
    border-right: 0;
  }

  .editable-grid-table .bulk-select-cell {
    display: none;
  }

  .editable-grid-input {
    min-width: 0;
    min-height: 30px;
  }

  .grid-allocation-cell {
    grid-template-columns: 1fr;
  }

  .editable-grid-actions {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .editable-grid-toolbar,
  .grid-tool-group {
    align-items: stretch;
    width: 100%;
    flex-wrap: wrap;
  }

  .grid-tool-button {
    flex: 1 1 96px;
  }

  .grid-tool-search {
    flex: 1 1 140px;
  }

  .grid-tool-search input {
    width: 100%;
  }

  .editable-grid-table-status {
    margin-left: 0;
  }

  .option-editor-row,
  .column-editor-row {
    grid-template-columns: 1fr;
  }

  .data-table.is-empty tr {
    display: table-row;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .data-table td {
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .data-table .bulk-select-cell {
    text-align: left;
  }

  .data-table .actions-sticky {
    position: static;
    box-shadow: none;
  }

  .smart-table-toolbar {
    align-items: stretch;
  }

  .smart-table-toolbar .actions-row {
    width: 100%;
  }

  .smart-table-search {
    width: 100%;
    min-width: 0;
  }

  .data-table.is-empty td {
    display: table-cell;
    padding: 0;
    border-bottom: 0;
  }

  .data-table td:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .data-table td[data-label=""]::before {
    display: none;
  }

  .data-table.is-empty td::before {
    display: none;
  }

  .data-table .actions-row {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .data-table .row-action-menu {
    margin-left: auto;
  }

  .table-quick-filter-row {
    width: 100%;
    overflow: visible;
  }

  .table-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .table-toolbar-actions .table-toolbar-dropdown:last-child {
    grid-column: 1 / -1;
  }

  .table-toolbar-actions .dropdown {
    position: static;
    width: 100%;
    min-width: 0;
  }

  .table-toolbar-button,
  .table-add-button {
    width: 100%;
  }

  .table-toolbar-actions .dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .page-subtitle {
    display: none;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: repeat(4, 36px);
    justify-content: end;
    justify-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .topbar-actions > .account-dropdown {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .account-button {
    width: 36px;
    min-width: 36px;
    padding: 0;
    justify-content: center;
  }

  .account-copy,
  .account-button .chevron-icon {
    display: none;
  }

  .global-search {
    grid-column: 1 / -1;
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 3px;
  }

  .global-search-filter-button {
    min-width: 0;
    padding-inline: 10px 8px;
  }

  .global-search input {
    height: 36px;
    padding-left: 32px;
  }
}

@media (max-width: 480px) {
  .topbar {
    padding: 8px;
    gap: 6px;
  }

  .topbar-left {
    align-items: center;
  }

  .topbar-title h1 {
    font-size: 16px;
    line-height: 1.15;
  }

  .page-subtitle {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .global-search {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .global-search-filter-button {
    gap: 6px;
    padding-inline: 8px 6px;
    font-size: 11px;
  }

  .topbar-actions > .dropdown .dropdown-menu,
  .topbar-actions > .account-dropdown .dropdown-menu {
    top: calc(100% + 8px);
  }
}

@media (max-width: 380px) {
  .auth-shell {
    padding-inline: 10px;
  }

  .auth-card {
    max-width: calc(100vw - 20px);
    padding: 16px 14px 14px;
  }

  .auth-brand-lockup {
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .auth-brand-mark {
    width: 50px;
    height: 50px;
  }

  .auth-title {
    font-size: 15px;
  }

  .auth-form {
    gap: 9px;
  }

  .auth-options-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .auth-link-button {
    align-self: flex-start;
  }

  .auth-personnel-note {
    justify-content: flex-start;
    text-align: left;
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-saving {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.btn-saving::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.secondary-button.btn-saving::after,
.ghost-button.btn-saving::after {
  border-color: rgba(168, 36, 56, 0.2);
  border-top-color: var(--burgundy);
}

.upload-progress {
  display: grid;
  gap: 6px;
  padding: 10px 0;
}

.upload-progress-track {
  height: 6px;
  border-radius: 999px;
  background: #eceff3;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--burgundy), var(--blue));
  transition: width 200ms ease;
}

.upload-progress-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.draft-restore-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f1d4d9;
  border-radius: 12px;
  background: #fff8f9;
  font-size: 12px;
  font-weight: 700;
  color: var(--burgundy-dark);
}

.draft-restore-bar .draft-actions {
  display: flex;
  gap: 6px;
}

.connection-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 8px 16px;
  color: #ffffff;
  background: #d54545;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transform: translateY(-100%);
  transition: transform 200ms ease;
}

.connection-banner.show {
  transform: translateY(0);
}

@media print {
  .sidebar,
  .topbar,
  .toolbar,
  .side-panel,
  .modal-layer,
  .toast,
  .connection-banner {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .content {
    padding: 0;
  }

  body {
    background: #ffffff;
  }
}
