@font-face {
  font-family: "Montserrat";
  src: url("./assets/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --brand-primary: #374f59;
  --brand-secondary: #bcb7ad;
  --brand-primary-dark: #2c4048;
  --brand-primary-light: #4f6974;
  --brand-secondary-dark: #a9a398;
  --brand-secondary-light: #d4d0c8;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-muted: #f4f3f1;
  --text: #111827;
  --muted: #64748b;
  --line: #e6e3dd;
  --line-strong: var(--brand-secondary);
  --primary: var(--brand-primary);
  --primary-hover: var(--brand-primary-dark);
  --secondary: var(--brand-secondary);
  --secondary-hover: var(--brand-secondary-dark);
  --slate: #475569;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #2563eb;
  --purple: #7c3aed;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-card: 0 12px 28px rgba(17, 24, 39, 0.07);
  --radius: 14px;
  --radius-lg: 18px;
  --font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-body: 13px;
  --font-size-small: 12px;
  --font-size-xs: 11px;
  --font-size-nav: 14px;
  --font-size-title: 18px;
  --font-size-page-title: 20px;
  --font-size-button: 13px;
  --line-height-body: 1.45;
  --field-height: 36px;
  --button-height: 36px;
  --space-card: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  font-weight: 400;
  color: var(--text);
  background: var(--background);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: var(--button-height);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--brand-primary);
  padding: 0 12px;
  cursor: pointer;
  font-size: var(--font-size-button);
  font-weight: 600;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

button:hover {
  background: rgba(188, 183, 173, 0.18);
  border-color: var(--line-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.is-hidden {
  display: none !important;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(55, 79, 89, 0.24);
  outline-offset: 2px;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
}

.mobile-header,
.mobile-nav-overlay {
  display: none;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar::before {
  content: "";
  display: block;
  height: 4px;
  margin: -20px -16px 18px;
  background: var(--brand-primary);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 0 4px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  object-fit: contain;
  background: var(--brand-primary);
  box-shadow: 0 10px 20px rgba(55, 79, 89, 0.18);
}

.brand strong {
  color: var(--brand-primary);
  font-size: 0.9rem;
  font-weight: 700;
}

.brand span,
.role-switcher span,
.eyebrow,
.meta {
  display: block;
  color: var(--muted);
  font-size: var(--font-size-small);
  line-height: 1.45;
}

.eyebrow {
  color: var(--brand-primary-light);
  font-weight: 600;
}

.role-switcher {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  padding: 10px;
  background: rgba(188, 183, 173, 0.14);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.role-switcher[hidden],
.role-switcher.is-hidden {
  display: none !important;
}

.compact-button {
  min-height: 32px;
  width: 100%;
}

select,
input,
textarea {
  width: 100%;
  min-height: var(--field-height);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0 10px;
  color: var(--text);
  font-size: var(--font-size-body);
  font-weight: 400;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

select:hover,
input:hover,
textarea:hover {
  border-color: var(--line-strong);
}

textarea {
  min-height: 104px;
  padding-block: 9px;
  resize: vertical;
  font-family: inherit;
}

.nav-list {
  display: grid;
  align-content: start;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  padding-bottom: 14px;
}

.nav-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--slate);
  text-align: left;
  font-size: var(--font-size-nav);
  font-weight: 600;
}

.nav-list button:hover {
  background: rgba(188, 183, 173, 0.18);
  color: var(--brand-primary);
}

.nav-list button.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
  box-shadow: 0 8px 18px rgba(55, 79, 89, 0.16);
}

.nav-label {
  flex: 1 1 auto;
}

.action-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  display: inline-block;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
  vertical-align: middle;
}


.nav-list .logout-button {
  margin-top: 10px;
  border-color: rgba(161, 63, 53, 0.22);
  color: var(--danger);
}

.nav-list .logout-button:hover {
  background: rgba(161, 63, 53, 0.08);
  color: var(--danger);
}

.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon-container {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(55, 79, 89, 0.1);
  color: var(--brand-primary);
}

.main {
  min-width: 0;
  padding: 24px clamp(16px, 3.2vw, 38px) 44px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  color: var(--brand-primary);
  font-size: var(--font-size-page-title);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: 0;
}

h2 {
  color: var(--text);
  font-size: var(--font-size-title);
  margin-bottom: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

h3 {
  font-size: 14px;
  margin-bottom: 7px;
  font-weight: 700;
}

p {
  line-height: var(--line-height-body);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-menu {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
  min-width: 0;
}

.user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  max-width: min(340px, 42vw);
  padding: 5px 9px 5px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.user-menu-button:hover,
.user-menu-button:focus-visible {
  border-color: rgba(55, 79, 89, 0.35);
  background: rgba(55, 79, 89, 0.05);
}

.user-menu-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  font-size: 0.72rem;
}

.user-menu-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.user-menu-name,
.user-menu-viewing {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-name {
  color: var(--brand-primary);
  font-size: 0.86rem;
  font-weight: 800;
}

.user-menu-viewing {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.user-menu-caret {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.user-menu-dropdown {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  gap: 4px;
  width: min(92vw, 290px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.user-menu-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 5px 5px 9px;
}

.user-menu-header .user-menu-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.user-menu-header strong,
.user-menu-header span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-header strong {
  color: var(--brand-primary);
  font-size: 0.9rem;
}

.user-menu-header span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.user-menu-dropdown button,
.user-menu-dropdown .user-menu-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  padding: 0.62rem 0.8rem;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.user-menu-dropdown button:hover,
.user-menu-dropdown button:focus-visible,
.user-menu-dropdown .user-menu-link:hover,
.user-menu-dropdown .user-menu-link:focus-visible {
  background: rgba(55, 79, 89, 0.08);
}

.user-menu-dropdown hr {
  width: 100%;
  margin: 5px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.user-menu-dropdown .danger-menu-item {
  color: var(--danger);
}

.mobile-user-menu-mount {
  display: none;
}

.single-column-form {
  grid-template-columns: 1fr;
}

.primary-button,
button.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
  font-weight: 600;
  box-shadow: 0 10px 18px rgba(55, 79, 89, 0.18);
}

.primary-button:hover,
button.primary-button:hover {
  background: var(--brand-primary-dark);
  border-color: var(--brand-primary-dark);
}

.secondary-button,
button.secondary-button {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary);
  font-weight: 600;
}

.secondary-button:hover,
button.secondary-button:hover {
  background: var(--brand-secondary-dark);
  border-color: var(--brand-secondary-dark);
}

.warning-button,
button.warning-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(245, 158, 11, 0.14);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.58);
  font-weight: 700;
}

.warning-button:hover,
button.warning-button:hover {
  background: rgba(245, 158, 11, 0.24);
  border-color: var(--warning);
  color: #78350f;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--brand-primary);
  border-color: rgba(55, 79, 89, 0.22);
}

.ghost-button:hover {
  background: rgba(55, 79, 89, 0.08);
  border-color: var(--brand-primary);
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}

.danger-button:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.icon-button {
  width: 36px;
  padding: 0;
  display: grid;
  place-items: center;
}

.alert-band {
  border: 1px solid var(--brand-secondary-light);
  background: rgba(188, 183, 173, 0.14);
  color: var(--brand-primary-dark);
  padding: 11px 14px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.view-as-banner {
  border: 1px solid rgba(55, 79, 89, 0.18);
  background: rgba(55, 79, 89, 0.08);
  color: var(--brand-primary);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.view {
  display: grid;
  gap: 16px;
}

.stats-grid,
.card-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card,
.stat,
.table-wrap,
.calendar,
.profile-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card,
.stat,
.profile-panel {
  padding: var(--space-card);
}

.stat {
  display: grid;
  gap: 10px;
  border-top: 3px solid rgba(188, 183, 173, 0.7);
}

.stat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat strong {
  color: var(--brand-primary);
  font-size: 1.25rem;
  line-height: 1;
  display: block;
  font-weight: 700;
}

.stat span {
  color: var(--muted);
}

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

.settings-grid {
  align-items: stretch;
}

.settings-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.settings-card h2,
.settings-card p {
  margin-bottom: 0;
}

.settings-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-card .ghost-button .action-dot {
  margin-left: 4px;
}

.permission-editor-header {
  display: grid;
  gap: 8px;
}

.permission-editor-list {
  display: grid;
  gap: 10px;
}

.permission-toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.permission-toggle-row strong,
.permission-toggle-row small {
  display: block;
}

.permission-toggle-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.permission-toggle-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--brand-primary);
}

.permission-toggle-row.is-locked {
  background: rgba(188, 183, 173, 0.14);
}

.settings-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.settings-list div {
  display: grid;
  gap: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.settings-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-list dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  overflow-wrap: break-word;
}

.mini-log {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.mini-log h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.85rem;
}

.mini-log-row {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.mini-log-row strong,
.mini-log-row span,
.mini-log-row small {
  overflow-wrap: anywhere;
}

.mini-log-row strong {
  color: var(--text);
  font-size: 0.78rem;
}

.mini-log-row span {
  color: var(--muted);
  font-size: 0.72rem;
}

.mini-log-row small {
  color: var(--muted);
  font-size: 0.68rem;
}

.settings-color-row,
.appearance-swatches {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-color-row span,
.appearance-swatches span {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.appearance-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.appearance-preview-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 999px;
  background: var(--brand-primary);
}

.appearance-preview strong,
.appearance-preview span {
  display: block;
}

.appearance-preview strong {
  color: var(--brand-primary);
}

.appearance-preview span {
  color: var(--muted);
  font-size: 0.84rem;
}

.portal-logo-upload {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.12);
}

.portal-logo-upload input[type="file"] {
  padding: 8px;
}

.favicon-preview-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.favicon-preview-row strong,
.favicon-preview-row span {
  display: block;
}

.favicon-preview-icon {
  width: 42px;
  height: 42px;
  padding: 5px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.annual-review-summary,
.annual-review-editor {
  display: grid;
  gap: 14px;
}

.annual-review-summary {
  align-content: start;
}

.annual-review-list-frame {
  margin-top: 12px;
  max-height: min(360px, calc(100vh - 360px));
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.annual-review-list-frame table {
  min-width: 860px;
}

.annual-review-list-frame thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--line-strong), 0 2px 8px rgba(55, 79, 89, 0.08);
}

.annual-review-info .detail-list {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.annual-review-toolbar-actions {
  align-items: center;
}

.annual-review-save-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.annual-review-save-row-top {
  justify-content: flex-start;
  padding: 10px 0 2px;
}

.annual-review-save-row-bottom {
  display: inline-flex;
  padding: 0;
}

.annual-review-save-status {
  color: var(--muted);
  font-size: var(--font-size-small);
  font-weight: 800;
  min-height: 1.2em;
}

.annual-review-save-status[data-tone="dirty"] {
  color: #b45309;
}

.annual-review-save-status[data-tone="saving"] {
  color: var(--brand-primary);
}

.annual-review-save-status[data-tone="saved"] {
  color: #15803d;
}

.annual-review-save-status[data-tone="error"] {
  color: #b91c1c;
}

.annual-review-download-menu {
  position: relative;
}

.annual-review-download-menu summary {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  list-style: none;
}

.annual-review-download-menu summary::-webkit-details-marker {
  display: none;
}

.annual-review-download-options {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 6px;
  min-width: 230px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
}

.annual-review-download-options button {
  justify-content: flex-start;
  width: 100%;
  white-space: nowrap;
}

.search-download-menu {
  display: inline-flex;
}

.search-download-options {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 6px;
  min-width: 120px;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
}

.search-download-options button {
  justify-content: flex-start;
  min-height: 34px;
  width: 100%;
  white-space: nowrap;
}

.annual-review-admin-override {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(180, 83, 9, 0.35);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.12);
}

.annual-review-admin-override h3 {
  margin: 0;
  color: #92400e;
  font-size: var(--font-size-title);
}

.annual-review-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.annual-review-admin-grid .full-span {
  grid-column: 1 / -1;
}

.annual-review-sections {
  display: grid;
  gap: 12px;
}

.annual-review-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.annual-review-section h3 {
  margin: 0;
  color: var(--text);
  font-size: var(--font-size-title);
}

.annual-review-section > label,
.annual-review-final-comments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.annual-review-section .annual-review-question {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(188, 183, 173, 0.35);
}

.annual-review-question h4 {
  margin: 0;
  color: var(--brand-primary);
  font-size: 0.86rem;
}

.annual-review-description,
.annual-review-section-description,
.annual-review-attribute-description {
  margin: 0;
  color: var(--muted);
  font-size: var(--font-size-small);
  line-height: 1.45;
  white-space: pre-line;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.annual-review-section-description {
  margin-top: -2px;
}

.annual-review-attribute-description {
  margin-top: 4px;
}

.annual-review-response-field {
  display: grid;
  gap: 5px;
}

.annual-review-response-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.annual-review-checkbox-list {
  display: grid;
  gap: 6px;
}

.annual-review-checkbox-list label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.annual-review-matrix-wrap {
  overflow-x: auto;
}

.annual-review-matrix {
  width: 100%;
  min-width: 880px;
  table-layout: fixed;
}

.annual-review-matrix .annual-review-attribute-col {
  width: 320px;
}

.annual-review-matrix .annual-review-rating-col {
  width: 140px;
}

.annual-review-matrix th,
.annual-review-matrix td {
  padding: 10px 12px;
  text-align: center;
  vertical-align: middle;
}

.annual-review-matrix th:first-child,
.annual-review-matrix td:first-child,
.annual-review-matrix .annual-review-attribute-column,
.annual-review-matrix .annual-review-attribute-cell {
  text-align: left;
}

.annual-review-matrix th:nth-child(n + 2),
.annual-review-matrix td:nth-child(n + 2),
.annual-review-matrix .annual-review-rating-column {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  text-align: center;
}

.annual-review-matrix thead th:nth-child(n + 2) {
  line-height: 1.2;
  text-align: center;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.annual-review-matrix .annual-review-rating-cell {
  padding-left: 0;
  padding-right: 0;
}

.annual-review-rating-control {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 40px;
  width: 100%;
}

.annual-review-matrix input[type="radio"] {
  appearance: auto;
  background: transparent;
  border: 0;
  border-radius: 50%;
  display: block;
  flex: 0 0 auto;
  height: 16px;
  margin: 0;
  min-height: 0;
  padding: 0;
  width: 16px;
}

.annual-review-section textarea[readonly],
.annual-review-section select:disabled {
  color: var(--muted);
  background: rgba(248, 250, 252, 0.8);
}

.annual-review-builder,
.review-builder-sections {
  display: grid;
  gap: 14px;
}

.review-builder-section,
.review-builder-question {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.review-builder-question {
  background: var(--surface-soft);
}

.review-builder-row,
.review-builder-matrix-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
}

.review-builder-matrix,
.review-builder-matrix-rows,
.review-builder-preview-slot:not(:empty) {
  display: grid;
  gap: 10px;
}

.review-builder-matrix-row {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.checklist-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.checklist-list-panel,
.checklist-detail-panel {
  display: grid;
  gap: 14px;
}

.checklist-card-list,
.checklist-section-list {
  display: grid;
  gap: 10px;
}

.checklist-card {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 12px;
  text-align: left;
  border-radius: 10px;
  background: var(--surface);
}

.checklist-card.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(55, 79, 89, 0.12);
}

.checklist-card span,
.checklist-card small,
.checklist-card em {
  font-size: 0.72rem;
  line-height: 1.25;
}

.checklist-card span {
  color: var(--brand-primary-light);
  font-weight: 800;
  text-transform: uppercase;
}

.checklist-card strong {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.2;
}

.checklist-card small {
  color: var(--muted);
}

.checklist-card em {
  color: var(--brand-primary);
  font-style: normal;
  font-weight: 800;
  text-decoration: underline;
}

.checklist-card .action-dot {
  position: absolute;
  top: 12px;
  right: 12px;
}

.checklist-progress {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.12);
}

.checklist-progress > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.checklist-progress strong {
  color: var(--brand-primary);
  font-size: 1.35rem;
  line-height: 1;
}

.checklist-progress span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(55, 79, 89, 0.12);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-primary);
}

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

.checklist-progress dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.checklist-progress dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.checklist-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.checklist-section h3 {
  margin: 0;
  color: var(--brand-primary);
}

.checklist-item {
  display: grid;
  grid-template-columns: minmax(160px, 0.34fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.checklist-item strong,
.checklist-item .meta {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.checklist-item-controls {
  display: grid;
  grid-template-columns: minmax(126px, 0.24fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.checklist-status-select,
.checklist-status-badge {
  border-width: 1px;
  font-weight: 800;
}

.checklist-status-select {
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.checklist-status-not-started {
  border-color: rgba(220, 38, 38, 0.35) !important;
  background: rgba(220, 38, 38, 0.12) !important;
  color: #991b1b !important;
}

.checklist-status-in-progress {
  border-color: rgba(245, 158, 11, 0.45) !important;
  background: rgba(245, 158, 11, 0.16) !important;
  color: #92400e !important;
}

.checklist-status-complete {
  border-color: rgba(22, 163, 74, 0.38) !important;
  background: rgba(22, 163, 74, 0.13) !important;
  color: #166534 !important;
}

.checklist-status-neutral {
  border-color: var(--line) !important;
  background: var(--surface-muted) !important;
  color: var(--slate) !important;
}

.mobile-only {
  display: none;
}

.task-card {
  gap: 8px;
}

.task-card input {
  width: 100%;
}

.checkbox-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.12);
}

.checkbox-field input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.checkbox-field span,
.checkbox-field small {
  display: block;
}

.checkbox-field small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.email-template-editor {
  display: grid;
  gap: 14px;
  max-height: min(680px, calc(100vh - 260px));
  overflow: auto;
  padding-right: 4px;
}

.email-template-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.email-template-panel > div,
.email-template-panel label:nth-of-type(3),
.email-template-panel label:nth-of-type(5) {
  grid-column: 1 / -1;
}

.email-template-panel h3,
.email-template-panel p {
  margin-bottom: 0;
}

.email-template-panel textarea {
  resize: vertical;
}

.notification-compact-panel,
.notification-detail-editor {
  display: grid;
  gap: 14px;
}

.notification-row-list {
  display: grid;
  gap: 8px;
}

.notification-row {
  display: grid;
  gap: 12px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.notification-row.is-open {
  border-color: rgba(55, 79, 89, 0.32);
  background: rgba(55, 79, 89, 0.04);
}

.notification-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.notification-inline-editor {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.notification-detail-editor-inline {
  padding: 12px;
  border: 1px solid rgba(55, 79, 89, 0.18);
  border-radius: 8px;
  background: rgba(247, 250, 252, 0.86);
}

.notification-inline-actions {
  justify-content: flex-start;
}

.notification-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 700;
  color: var(--brand-primary);
}

.notification-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand-primary);
}

.notification-detail-editor label {
  display: grid;
  gap: 6px;
}

.notification-detail-editor code {
  display: inline-flex;
  margin: 2px 4px 2px 0;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-primary);
  font-size: 0.78rem;
}

.table-wrap > h2 {
  padding: 14px 14px 6px;
  margin-bottom: 0;
  line-height: 1.3;
}

.table-wrap > h2 + table {
  margin-top: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.compact-actions {
  flex-wrap: nowrap;
}

.icon-only-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.payroll-timesheet-filter-row--embedded {
  grid-template-columns: minmax(160px, 1.2fr) minmax(110px, 0.8fr) minmax(130px, 0.9fr) minmax(160px, 1fr) auto;
  align-items: end;
  margin: 0 14px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.1);
}

.payroll-timesheet-filter-row--embedded label {
  min-width: 0;
}

.payroll-timesheet-filter-row--embedded select {
  min-height: 36px;
  font-size: 0.86rem;
}

.payroll-timesheet-filter-row--embedded .button-row {
  flex-wrap: nowrap;
  align-items: end;
  margin-top: 0;
}

.payroll-timesheet-filter-row--embedded .compact-button {
  width: auto;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.timesheet-table-wrap .table-count-meta {
  margin: 0 14px 10px;
}

.padded-filter {
  padding: 0 16px 14px;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: max-content;
  white-space: nowrap;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
}

.sort-button:hover,
.sort-button.active {
  color: var(--brand-primary);
  background: transparent;
}

.sort-button span {
  min-width: 10px;
}

.sort-label,
.sort-indicator {
  white-space: nowrap;
}

.action-menu-wrap {
  position: relative;
  display: inline-flex;
}

.action-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  display: grid;
  gap: 6px;
  width: 240px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.action-menu button {
  width: 100%;
  justify-content: flex-start;
  min-height: 36px;
  font-size: calc(1rem - 1pt);
}

.segmented-control {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  padding: 4px;
  background: rgba(188, 183, 173, 0.18);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.segmented-control button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: transparent;
  background: transparent;
  color: var(--brand-primary);
  box-shadow: none;
}

.segmented-control button.active {
  background: var(--brand-primary);
  color: white;
}

.segmented-control span {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.compact-segmented {
  flex-wrap: wrap;
  max-width: 100%;
}

.compact-segmented button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.settings-log {
  margin: 0;
  padding-left: 18px;
  color: var(--slate);
}

.settings-log li + li {
  margin-top: 8px;
}

.activity-log-table {
  grid-column: 1 / -1;
  width: 100%;
  max-height: min(640px, calc(100vh - 250px));
  min-height: 360px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(188, 183, 173, 0.08);
}

.activity-log-table table {
  min-width: 1680px;
  table-layout: auto;
  font-size: 10px;
  line-height: 1.25;
}

.error-log-table table {
  min-width: 1320px;
}

.activity-log-table th,
.activity-log-table td {
  padding: 7px 9px;
  white-space: nowrap;
  overflow-wrap: normal;
  vertical-align: top;
}

.activity-log-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--line-strong), 0 2px 8px rgba(55, 79, 89, 0.08);
}

.activity-log-table td:nth-child(7),
.activity-log-table td:nth-child(9),
.activity-log-table td:nth-child(10) {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}


.tasks-table-wrap {
  max-height: none;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

.tasks-table-wrap .tasks-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.35;
}

.tasks-table th,
.tasks-table td {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  vertical-align: middle;
  padding: 9px 10px;
}

.tasks-table th:nth-child(1),
.tasks-table .task-employee-cell {
  width: 15%;
}

.tasks-table th:nth-child(2),
.tasks-table .task-detail-cell {
  width: 28%;
}

.tasks-table th:nth-child(3),
.tasks-table .task-date-cell {
  width: 10%;
}

.tasks-table th:nth-child(4),
.tasks-table .task-priority-cell {
  width: 9%;
}

.tasks-table th:nth-child(5),
.tasks-table .task-status-cell {
  width: 12%;
}

.tasks-table th:nth-child(6),
.tasks-table .task-source-cell {
  width: 10%;
}

.tasks-table th:nth-child(7),
.tasks-table .task-actions-cell {
  width: 16%;
}

.tasks-table .task-actions-cell {
  min-width: 145px;
}

.tasks-table .task-detail-cell strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.tasks-table .task-notes-cell input {
  min-height: 34px;
  font-size: 13px;
  padding: 7px 9px;
}

.task-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.task-filter-search {
  grid-column: span 2;
}

.tasks-table .task-actions {
  gap: 5px;
  margin-top: 0;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.tasks-table .task-action-button {
  width: auto;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.tasks-table .task-action-button svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 720px) {
  .task-filter-search {
    grid-column: auto;
  }
}

.carryover-report-toolbar {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(188, 183, 173, 0.45);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.12);
}

.carryover-report-toolbar label {
  max-width: 280px;
}

.carryover-report-toolbar .meta {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.secure-note {
  padding: 12px;
  border: 1px solid rgba(55, 79, 89, 0.18);
  border-radius: var(--radius);
  background: rgba(55, 79, 89, 0.08);
  color: var(--brand-primary);
  font-size: 0.84rem;
  line-height: 1.5;
}

.backup-settings {
  display: grid;
  gap: 14px;
}

.settings-subsection {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(188, 183, 173, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.settings-subsection h3 {
  margin: 0;
  color: var(--brand-primary);
  font-size: 1rem;
}

.compact-settings-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.warning-text {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(184, 92, 0, 0.24);
  border-radius: var(--radius);
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-size: 0.86rem;
  font-weight: 700;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.nightly-backup-layout {
  display: grid;
  gap: 10px;
}

.nightly-backup-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(170px, auto);
  align-items: center;
  gap: 20px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid rgba(188, 183, 173, 0.45);
  border-radius: var(--radius);
  background: var(--surface);
}

.nightly-backup-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.nightly-backup-row strong {
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.25;
}

.nightly-backup-row small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.nightly-backup-row input[type="time"],
.nightly-backup-row input[type="number"] {
  justify-self: end;
  width: 170px;
  min-height: 42px;
}

.nightly-backup-toggle .toggle-control {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
}

.nightly-backup-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
}

.nightly-backup-checkboxes {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  justify-self: end;
  gap: 10px 14px;
  min-width: min(330px, 100%);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(188, 183, 173, 0.42);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.backup-size-control {
  justify-self: end;
  display: inline-grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: 170px;
  border: 1px solid rgba(188, 183, 173, 0.58);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.backup-size-control input[type="number"] {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 0;
}

.backup-size-control span {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding: 0 12px;
  border-left: 1px solid rgba(188, 183, 173, 0.48);
  background: rgba(55, 79, 89, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.backup-storage-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(188, 183, 173, 0.45);
  border-radius: var(--radius);
  background: var(--surface);
}

.backup-storage-card.is-warning {
  border-color: rgba(184, 92, 0, 0.28);
  background: rgba(245, 158, 11, 0.1);
}

.backup-storage-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.backup-storage-card h4,
.backup-storage-card p {
  margin: 0;
}

.backup-storage-card h4 {
  color: var(--text);
  font-size: 0.95rem;
}

.backup-storage-card-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.backup-storage-card-header strong {
  color: var(--brand-primary);
  font-size: 1.1rem;
}

.backup-storage-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(188, 183, 173, 0.32);
}

.backup-storage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-primary);
}

.backup-storage-card.is-warning .backup-storage-bar span {
  background: #b45309;
}

.backup-progress {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
  color: var(--slate);
  font-size: 0.88rem;
}

.final-sweep-management {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.final-sweep-management .settings-form-grid .full-span {
  grid-column: 1 / -1;
}

.final-sweep-management select[multiple] {
  min-height: 150px;
}

.final-sweep-participant-table {
  min-height: 0;
  max-height: 320px;
}

.final-sweep-participant-table table {
  min-width: 760px;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.dashboard-balance-grid {
  grid-template-columns: repeat(auto-fit, 175px);
  justify-content: center;
  align-items: stretch;
}

.balance-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  align-items: center;
  gap: 8px;
  min-height: 152px;
  padding: 12px 10px;
  text-align: center;
  border-radius: 16px;
  border: 1px solid rgba(188, 183, 173, 0.46);
  background: linear-gradient(180deg, #ffffff 0%, rgba(188, 183, 173, 0.07) 100%);
  color: var(--text);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  align-content: center;
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.dashboard-balance-grid .balance-card {
  width: 175px;
  height: 175px;
  min-width: 175px;
  max-width: 175px;
  min-height: 175px;
  max-height: 175px;
  box-sizing: border-box;
}

.balance-card:hover {
  background: #ffffff;
  border-color: rgba(55, 79, 89, 0.24);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.balance-card.active {
  border-color: rgba(55, 79, 89, 0.32);
  background: linear-gradient(180deg, rgba(55, 79, 89, 0.055) 0%, rgba(188, 183, 173, 0.08) 100%);
  box-shadow: 0 0 0 1px rgba(55, 79, 89, 0.1), 0 12px 28px rgba(55, 79, 89, 0.1);
}

.balance-card.active::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand-primary);
}

.balance-card strong {
  color: var(--brand-primary);
  font-size: clamp(1.22rem, 1.8vw, 1.52rem);
  line-height: 1.05;
  min-width: 0;
  overflow-wrap: anywhere;
}

.balance-card small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-balance-grid .badge {
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  padding-inline: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.pto-gauge-card {
  grid-template-rows: 1fr;
  gap: 0;
  padding: 9px;
}

.pto-gauge-ring {
  --pto-gauge-percent: 0;
  --pto-gauge-color: var(--brand-primary);
  --pto-gauge-track: rgba(188, 183, 173, 0.28);
  position: relative;
  display: grid;
  place-items: center;
  width: min(150px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(var(--pto-gauge-color) calc(var(--pto-gauge-percent) * 1%), var(--pto-gauge-track) 0);
  box-shadow: inset 0 0 0 1px rgba(55, 79, 89, 0.08);
}

.pto-gauge-card-vacation .pto-gauge-ring {
  --pto-gauge-color: #3b82f6;
  --pto-gauge-track: rgba(59, 130, 246, 0.13);
}

.pto-gauge-card-sick .pto-gauge-ring {
  --pto-gauge-color: #ef4444;
  --pto-gauge-track: rgba(239, 68, 68, 0.13);
}

.pto-gauge-card-study .pto-gauge-ring {
  --pto-gauge-color: #8b5cf6;
  --pto-gauge-track: rgba(139, 92, 246, 0.13);
}

.pto-gauge-card-missions .pto-gauge-ring {
  --pto-gauge-color: #10b981;
  --pto-gauge-track: rgba(16, 185, 129, 0.13);
}

.pto-gauge-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 7px rgba(15, 23, 42, 0.06);
}

.pto-gauge-center {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  width: calc(100% - 34px);
}

.pto-gauge-badge {
  display: flex;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 3px;
}

.pto-gauge-badge .badge {
  min-height: 24px;
  max-width: 112px;
  padding: 4px 9px;
  font-size: 0.68rem;
  line-height: 1;
}

.pto-gauge-center strong {
  color: var(--brand-primary);
  font-size: clamp(1.72rem, 2.5vw, 2.15rem);
  font-weight: 900;
  line-height: 1;
  max-width: 98px;
  overflow-wrap: normal;
}

.pto-gauge-center small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}

.pto-gauge-center .pto-gauge-total {
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
}

.balance-breakdown {
  display: grid;
  gap: 4px;
  align-self: start;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.balance-breakdown span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.balance-breakdown b {
  color: var(--text);
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.balance-admin-meta {
  color: var(--brand-primary-light);
  font-size: 0.74rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sabbatical-balance-card {
  min-height: 0;
  grid-template-rows: auto auto auto;
}

.sabbatical-balance-card strong {
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  line-height: 1.12;
}

.sabbatical-balance-card .balance-breakdown {
  gap: 8px;
  font-size: 0.82rem;
}

.sabbatical-balance-card .balance-breakdown span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
  align-items: start;
}

.sabbatical-balance-card .balance-admin-meta {
  font-size: 0.72rem;
}

.sabbatical-pending-card {
  min-height: 0;
  align-content: center;
}

.sabbatical-pending-label {
  align-self: end;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
}

.sabbatical-pending-card strong {
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  line-height: 1.12;
}

.balance-detail-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(188, 183, 173, 0.5);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(188, 183, 173, 0.1), rgba(255, 255, 255, 0.88));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  overflow-x: visible;
}

.balance-detail-panel > div:first-child {
  flex: 0 1 160px;
  min-width: 118px;
}

.balance-detail-panel .meta {
  margin: 4px 0 0;
  font-size: var(--font-size-xs);
  line-height: 1.25;
}

.balance-detail-metrics {
  flex: 1 1 350px;
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 132px));
  justify-content: center;
  gap: 7px;
  margin: 0;
  min-width: 0;
}

.balance-detail-metrics:has(> div:only-child) {
  flex-grow: 0;
  grid-template-columns: minmax(104px, 132px);
}

.balance-detail-metrics div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(188, 183, 173, 0.28);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}

.balance-detail-metrics dt {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 800;
  line-height: 1.2;
}

.balance-detail-metrics dd {
  margin: 0;
  color: var(--brand-primary);
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.2;
}

.balance-detail-actions {
  flex: 1 1 300px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.balance-detail-actions button {
  flex: 1 1 140px;
  max-width: 210px;
  min-height: 36px;
  padding: 7px 9px;
  gap: 6px;
  font-size: var(--font-size-button);
  white-space: nowrap;
}

.work-hours-summary-card {
  display: grid;
  gap: 16px;
}

.work-hours-average {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid rgba(55, 79, 89, 0.14);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.1);
}

.work-hours-average span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.work-hours-average strong {
  color: var(--brand-primary);
  font-size: 1.08rem;
  line-height: 1.15;
}

.work-hours-average small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: inherit;
}

.work-hours-chart {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.work-hours-week {
  display: grid;
  grid-template-rows: 118px auto auto auto auto;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.work-hours-bar-shell {
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 0;
  padding: 8px 0 0;
  border-radius: var(--radius);
  background: rgba(55, 79, 89, 0.07);
  overflow: hidden;
}

.work-hours-bar {
  width: min(52px, 70%);
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--brand-secondary), var(--brand-primary));
}

.work-hours-bar.zero {
  min-height: 0;
}

.work-hours-week strong {
  color: var(--brand-primary);
  font-size: 1rem;
  line-height: 1.15;
}

.work-hours-week-label {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
}

.work-hours-date-range {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.work-hours-status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.work-hours-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(55, 79, 89, 0.08);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.15;
}

.work-hours-status.approved {
  background: rgba(22, 101, 52, 0.1);
  color: #166534;
}

.work-hours-status.submitted,
.work-hours-status.reported {
  background: rgba(55, 79, 89, 0.12);
  color: var(--brand-primary);
}

.work-hours-status.draft {
  background: rgba(180, 83, 9, 0.11);
  color: #92400e;
}

.staff-bulletin-card {
  display: grid;
  gap: 14px;
}

.dashboard-card {
  overflow: hidden;
}

.dashboard-card-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-card-header {
  position: relative;
  display: flex !important;
  flex-direction: column;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px;
  margin: calc(var(--space-card) * -1) calc(var(--space-card) * -1) 14px;
  height: 72px;
  min-height: 72px;
  padding: 9px 16px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #374f59;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
}

.dashboard-card-header > .dashboard-card-title-block {
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 0;
  max-width: min(100%, 760px);
  text-align: center;
}

.dashboard-card-header > .dashboard-card-title-block:first-child:not(:last-child) {
  margin-left: 0;
}

.dashboard-card-header > button,
.dashboard-card-header > .icon-container,
.dashboard-card-header > .work-hours-average {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.dashboard-card-title {
  margin: 0;
  color: #fff;
  font-size: var(--font-size-title);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0.03em;
  text-align: center;
  text-transform: uppercase;
}

.dashboard-card-title-block .meta {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--font-size-small);
  line-height: 1.2;
  text-align: center;
}

.dashboard-widget-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: -4px 0 12px;
}

.dashboard-widget-actions-centered {
  justify-content: center;
}

.dashboard-card-header .secondary-button,
.dashboard-card-header .primary-button,
.dashboard-card-header .ghost-button {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.95);
  color: #1f2933;
}

.dashboard-card-header .secondary-button:hover,
.dashboard-card-header .primary-button:hover,
.dashboard-card-header .ghost-button:hover {
  background: #fff;
}

.dashboard-card-header .work-hours-average {
  min-width: 158px;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

.dashboard-card-header .work-hours-average span,
.dashboard-card-header .work-hours-average strong {
  color: #fff;
}

.staff-bulletin-list {
  display: grid;
  gap: 10px;
}

.staff-bulletin-notice {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid rgba(55, 79, 89, 0.38);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.staff-bulletin-notice.priority-important {
  border-left-color: #b45309;
  background: rgba(180, 83, 9, 0.06);
}

.staff-bulletin-notice.priority-urgent {
  border-left-color: #b91c1c;
  background: rgba(185, 28, 28, 0.06);
}

.staff-bulletin-notice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.staff-bulletin-notice h3 {
  margin: 4px 0 0;
  color: var(--brand-primary);
  font-size: 1rem;
  line-height: 1.25;
}

.staff-bulletin-notice p {
  margin: 0;
  line-height: 1.5;
}

.staff-bulletin-priority {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(55, 79, 89, 0.1);
  color: var(--brand-primary);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
}

.priority-important .staff-bulletin-priority {
  background: rgba(180, 83, 9, 0.12);
  color: #92400e;
}

.priority-urgent .staff-bulletin-priority {
  background: rgba(185, 28, 28, 0.12);
  color: #991b1b;
}

.staff-bulletin-link {
  color: var(--brand-primary);
  font-weight: 900;
  text-decoration: none;
}

.staff-bulletin-link:hover {
  text-decoration: underline;
}

.staff-bulletin-dates {
  font-size: 0.75rem;
}

.staff-bulletin-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.staff-bulletin-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(55, 79, 89, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(188, 183, 173, 0.1);
}

.staff-bulletin-actions {
  flex-wrap: nowrap;
}

.dashboard-absence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-absence-section {
  display: grid;
  gap: 10px;
}

.absence-section-head {
  margin-bottom: 0;
}

.absence-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 132px));
  justify-content: center;
  gap: 10px;
}

.absence-card {
  display: grid;
  grid-template-rows: auto auto auto;
  justify-items: center;
  gap: 6px;
  aspect-ratio: 1 / 1;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  align-content: center;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.absence-card-main {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}

.absence-card strong {
  color: var(--brand-primary);
  font-size: clamp(0.82rem, 1.2vw, 0.96rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.absence-card-main span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.absence-breakdown {
  width: 100%;
  align-self: center;
}

.absence-breakdown span {
  justify-content: center;
  flex-direction: column;
  gap: 2px;
}

.absence-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.72rem;
}

.absence-empty {
  margin: 0;
  display: grid;
  min-height: 96px;
  place-items: center;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
}

.balance-details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.balance-details h3 {
  color: var(--brand-primary);
}

.compact-table {
  box-shadow: none;
}

.compact-table table {
  min-width: 460px;
}

.timesheet-total {
  color: var(--brand-primary);
  font-size: 0.95rem;
  white-space: nowrap;
}

.timesheet-editor-actions {
  justify-content: flex-end;
}

.timesheet-editor-top-actions {
  margin: 12px 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.timesheet-editor-bottom-actions {
  margin-top: 14px;
}

.timesheet-entry-table {
  min-width: 930px;
}

.timesheet-table-wrap {
  overflow-x: auto;
}

.timesheet-table {
  min-width: 1160px;
  table-layout: fixed;
  font-size: 0.78rem;
}

.timesheet-table th,
.timesheet-table td {
  padding: 10px 9px;
  line-height: 1.28;
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.timesheet-table th {
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.15;
  white-space: normal;
}

.timesheet-table td {
  color: var(--text);
}

.timesheet-table .person {
  min-width: 0;
}

.timesheet-table .person strong,
.timesheet-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.timesheet-table .timesheet-col-employee {
  width: 15%;
}

.timesheet-table .timesheet-col-month {
  width: 8%;
}

.timesheet-table .timesheet-col-year {
  width: 7%;
}

.timesheet-table .timesheet-col-period {
  width: 11%;
}

.timesheet-table .timesheet-col-hours {
  width: 8%;
}

.timesheet-table .timesheet-col-status {
  width: 10%;
}

.timesheet-table .timesheet-col-supervisor {
  width: 12%;
}

.timesheet-table .timesheet-col-payroll {
  width: 13%;
}

.timesheet-table .timesheet-col-actions {
  width: 16%;
}

.timesheet-table .timesheet-hours-cell,
.timesheet-table .timesheet-status-cell,
.timesheet-table .timesheet-actions-cell {
  text-align: center;
}

.timesheet-table .status-badge {
  max-width: 100%;
  justify-content: center;
  white-space: normal;
  line-height: 1.15;
}

.timesheet-table .compact-actions {
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  flex-wrap: wrap;
}

.timesheet-table .icon-only-button {
  width: 30px;
  min-height: 30px;
}

.timesheet-table .timesheet-actions-cell {
  overflow: visible;
}

.timesheet-entry-table th,
.timesheet-entry-table td {
  vertical-align: top;
}

.timesheet-entry-table select {
  min-width: 112px;
}

.timesheet-entry-table input {
  min-width: 170px;
}

.timesheet-entry-table output {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--brand-primary);
  font-weight: 700;
}

.timesheet-day-heading td {
  background: rgba(55, 79, 89, 0.08);
  color: var(--brand-primary);
}

.timesheet-day-heading strong,
.timesheet-day-heading span {
  display: inline-flex;
  margin-right: 10px;
  align-items: center;
}

.timesheet-day-total-row td {
  background: rgba(188, 183, 173, 0.14);
  color: var(--brand-primary);
}

.timesheet-day-total-row output {
  min-height: 0;
  font-size: 1rem;
}

.timesheet-weekly-summary {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timesheet-weekly-summary h3 {
  margin: 0;
  color: var(--brand-primary);
  font-size: 1rem;
}

.timesheet-overage-row td {
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}

.timesheet-prior-context-row td {
  background: #f3f4f6;
  color: var(--muted);
}

.timesheet-prior-context-row strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-primary);
  font-size: 0.82rem;
}

.timesheet-prior-context-list {
  display: grid;
  gap: 5px;
  font-size: 0.82rem;
}

.timesheet-overage-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.timesheet-overage-panel.active {
  border-color: rgba(180, 83, 9, 0.45);
  background: #fff7ed;
}

.timesheet-overage-panel strong {
  color: var(--brand-primary);
}

.timesheet-overage-panel p {
  margin: 0;
  color: var(--muted);
}

.timesheet-overage-panel.active p {
  color: #9a3412;
  font-weight: 700;
}

.timesheet-overage-panel [hidden] {
  display: none !important;
}

.timesheet-overage-panel textarea {
  width: 100%;
  resize: vertical;
}

.log-detail-table {
  max-height: 420px;
  overflow: auto;
}

.log-detail-table th,
.log-detail-table td {
  vertical-align: top;
}

.log-detail-table pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
}

.table-section-heading {
  padding: 12px 14px 0;
}

.table-section-heading h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--brand-primary);
}

.employee-file-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.employee-file-panel h3 {
  margin: 0;
  color: var(--brand-primary);
}

.compact-tabs {
  justify-content: flex-start;
}

.employee-file-tab {
  display: grid;
  gap: 14px;
}

#directoryDetailDialog .dialog-panel {
  overflow-x: hidden;
}

#directoryDetailDialog .employee-file-panel,
#directoryDetailDialog .employee-file-tab {
  min-width: 0;
}

.employee-file-reviews-table {
  max-height: min(520px, calc(100vh - 340px));
  max-width: 100%;
  overflow-x: auto;
}

.employee-file-reviews-table .employee-file-reviews-grid {
  min-width: 1140px;
  width: 100%;
  table-layout: fixed;
}

.employee-file-reviews-grid th,
.employee-file-reviews-grid td {
  vertical-align: middle;
}

.employee-file-reviews-grid th:nth-child(1),
.employee-file-reviews-grid td:nth-child(1) {
  width: 112px;
}

.employee-file-reviews-grid th:nth-child(2),
.employee-file-reviews-grid td:nth-child(2) {
  width: 145px;
}

.employee-file-reviews-grid th:nth-child(3),
.employee-file-reviews-grid td:nth-child(3),
.employee-file-reviews-grid th:nth-child(4),
.employee-file-reviews-grid td:nth-child(4) {
  width: 128px;
}

.employee-file-reviews-grid th:nth-child(5),
.employee-file-reviews-grid td:nth-child(5) {
  width: 180px;
}

.employee-file-reviews-grid th:nth-child(6),
.employee-file-review-actions-cell {
  width: 400px;
  min-width: 400px;
  text-align: right;
}

.employee-file-review-actions-cell {
  overflow: visible;
  white-space: nowrap;
}

.employee-file-review-actions-cell .compact-actions {
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 0;
}

.employee-file-review-actions-cell .ghost-button,
.employee-file-review-actions-cell .danger-button {
  min-height: 34px;
  padding: 7px 9px;
}

.employee-file-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.employee-file-form .full-span {
  grid-column: 1 / -1;
}

.employee-file-form textarea {
  width: 100%;
  resize: vertical;
}

.employee-file-preview-dialog {
  width: min(1040px, calc(100vw - 28px));
}

.employee-file-preview-panel {
  display: grid;
  gap: 16px;
}

.employee-file-preview-panel h3 {
  margin: 0;
  color: var(--brand-primary);
}

.employee-file-preview-body {
  display: grid;
  place-items: center;
  min-height: min(68vh, 720px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.employee-file-preview-frame {
  width: 100%;
  height: min(68vh, 720px);
  border: 0;
  background: #ffffff;
}

.employee-file-image-preview {
  display: grid;
  place-items: center;
  width: 100%;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding: 14px;
}

.employee-file-image-preview img {
  max-width: 100%;
  height: auto;
  max-height: calc(min(68vh, 720px) - 28px);
  object-fit: contain;
  border-radius: calc(var(--radius) - 2px);
}

.employee-file-media-preview,
.employee-file-audio-preview {
  width: min(100%, 860px);
}

.employee-file-media-preview {
  max-height: min(68vh, 720px);
  background: #000000;
}

.employee-file-audio-preview {
  display: grid;
  place-items: center;
  padding: 28px;
}

.employee-file-audio-preview audio {
  width: 100%;
}

.annual-review-preview-dialog {
  width: min(1120px, calc(100vw - 28px));
}

.annual-review-preview-panel {
  display: grid;
  gap: 16px;
}

.annual-review-preview-panel h2 {
  margin: 0;
  color: var(--brand-primary);
}

.annual-review-preview-frame-wrap {
  min-height: min(72vh, 760px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.annual-review-preview-frame {
  display: block;
  width: 100%;
  height: min(72vh, 760px);
  border: 0;
  background: #ffffff;
}

.notification-log-panel {
  display: grid;
  gap: 12px;
}

.notification-log-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.notification-log-table td {
  vertical-align: top;
}

.notification-log-table .compact-button {
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}

.notification-silence-select {
  min-height: 34px;
  min-width: 76px;
  padding: 6px 28px 6px 10px;
  font-size: 0.9rem;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  background: var(--brand-primary);
  flex: 0 0 auto;
  border: 1px solid var(--brand-primary-light);
}

.avatar.gold {
  background: var(--brand-secondary);
  color: var(--brand-primary);
  border-color: var(--brand-secondary-dark);
}

.avatar.rose {
  background: #f3e8e8;
  color: #9f1239;
  border-color: #e4caca;
}

.avatar.sage {
  background: #e8efec;
  color: var(--brand-primary);
  border-color: #cbd8d3;
}

.photo-avatar {
  object-fit: cover;
  background: var(--surface-muted);
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.large-avatar {
  width: 74px;
  height: 74px;
  font-size: 1.35rem;
}

span.large-avatar {
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.photo-field {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--brand-primary);
  font-size: 0.86rem;
  font-weight: 600;
}

.photo-field-top {
  margin: 4px 0 18px;
}

.photo-edit-control {
  position: relative;
  display: inline-grid;
  cursor: pointer;
}

.photo-edit-control:focus-within {
  outline: 3px solid rgba(55, 79, 89, 0.24);
  outline-offset: 4px;
  border-radius: 999px;
}

.photo-preview {
  width: 86px;
  height: 86px;
  overflow: hidden;
  font-size: 1.2rem;
}

.photo-preview .avatar {
  width: 100%;
  height: 100%;
  border: 0;
}

.photo-edit-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--brand-primary);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
}

.photo-edit-badge .icon {
  width: 15px;
  height: 15px;
}

.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;
}

.full-span {
  grid-column: 1 / -1;
}

.required {
  color: #dc2626;
  font-weight: 800;
}

.required-label-inline {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  max-width: 100%;
  line-height: inherit;
  white-space: nowrap;
}

.required-field-marker {
  display: inline;
  flex: 0 0 auto;
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  vertical-align: baseline;
}

.required-field-note {
  margin: 2px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

#employeeForm .missing-required {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.13);
}

.phone-extension-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, 140px);
  gap: 14px;
}

.mobile-contact-row {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.9fr);
}

.badge-row,
.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar {
  margin-bottom: 2px;
}

.toolbar-between {
  justify-content: space-between;
  align-items: flex-start;
}

.toolbar-between h2,
.toolbar-between p {
  margin-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(188, 183, 173, 0.24);
  color: var(--brand-primary);
  border: 1px solid transparent;
  font-size: var(--font-size-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge .icon {
  width: 14px;
  height: 14px;
}

.badge.pending {
  background: #fef3c7;
  color: #92400e;
}

.badge.approved {
  background: #dcfce7;
  color: #166534;
}

.badge.denied {
  background: #fee2e2;
  color: #991b1b;
}

.badge.info {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge.archived {
  background: rgba(188, 183, 173, 0.28);
  color: var(--brand-primary);
}

.badge.vacation {
  background: #3b82f6;
  color: #ffffff;
}

.badge.sick {
  background: #ef4444;
  color: #ffffff;
}

.badge.study {
  background: #8b5cf6;
  color: #ffffff;
}

.badge.missions {
  background: #10b981;
  color: #ffffff;
}

.badge.other {
  background: #f97316;
  color: #ffffff;
}

.badge.lwop {
  background: #64748b;
  color: #ffffff;
}

.table-wrap {
  overflow-x: auto;
}

.users-table-wrap {
  height: clamp(420px, calc(100vh - 230px), 820px);
  overflow: auto;
  overscroll-behavior: contain;
  padding-bottom: 220px;
}

.users-table-wrap table {
  min-width: 920px;
}

.users-table-wrap td:last-child {
  vertical-align: top;
}

.users-table-wrap .action-menu-wrap {
  display: inline-grid;
  justify-items: end;
  min-width: 240px;
}

.users-table-wrap .action-menu {
  position: static;
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 660px;
  font-size: var(--font-size-small);
}

th,
td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

th {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  color: var(--brand-primary-light);
  background: rgba(188, 183, 173, 0.13);
  letter-spacing: 0.04em;
  font-weight: 700;
}

.employees-table-wrap {
  overflow-x: auto;
}

.employees-table {
  min-width: 980px;
  table-layout: fixed;
  font-size: 0.82rem;
}

.employees-table th,
.employees-table td {
  padding: 10px 11px;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.employees-table th:nth-child(1) {
  width: 19%;
}

.employees-table th:nth-child(2) {
  width: 16%;
}

.employees-table th:nth-child(3),
.employees-table th:nth-child(4) {
  width: 13%;
}

.employees-table th:nth-child(5) {
  width: 9%;
}

.employees-table th:nth-child(6) {
  width: 12%;
}

.employees-table th:nth-child(7) {
  width: 11%;
}

.employees-table th:nth-child(8) {
  width: 7%;
}

.employees-table th:nth-child(9) {
  width: 10%;
}

.employees-table .person {
  min-width: 0;
}

.employees-table .person > div:last-child,
.employees-table .employee-text-cell {
  min-width: 0;
}

.employees-table .person strong,
.employees-table .person .meta,
.employees-table .employee-text-cell,
.employees-table .employee-date-cell,
.employees-table .employee-text-cell .meta {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.employees-table .person strong,
.employees-table .person .meta,
.employees-table .employee-text-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employees-table .person strong,
.employees-table .employee-text-cell {
  white-space: normal;
}

.employees-table .person .meta,
.employees-table .employee-text-cell .meta {
  white-space: nowrap;
}

.employees-table .employee-date-cell,
.employees-table .employee-date-cell .meta {
  white-space: nowrap;
}

.employees-table .compact-actions {
  justify-content: flex-start;
  gap: 6px;
}

.employees-list {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.employees-list.has-actions {
  --employee-columns: minmax(158px, 1.45fr) minmax(118px, 1.02fr) minmax(112px, 0.98fr) minmax(116px, 1fr) minmax(104px, 0.82fr) minmax(58px, 0.46fr) minmax(96px, 0.7fr);
}

.employees-list.no-actions {
  --employee-columns: minmax(164px, 1.45fr) minmax(126px, 1.02fr) minmax(118px, 0.98fr) minmax(124px, 1fr) minmax(108px, 0.82fr) minmax(62px, 0.46fr);
}

.employees-list.has-selection.has-actions {
  --employee-columns: minmax(42px, 42px) minmax(150px, 1.38fr) minmax(112px, 0.98fr) minmax(108px, 0.94fr) minmax(112px, 0.96fr) minmax(100px, 0.78fr) minmax(56px, 0.42fr) minmax(96px, 0.68fr);
}

.employees-list.has-selection.no-actions {
  --employee-columns: minmax(42px, 42px) minmax(156px, 1.38fr) minmax(120px, 0.98fr) minmax(112px, 0.94fr) minmax(120px, 0.96fr) minmax(104px, 0.78fr) minmax(58px, 0.42fr);
}

.employees-list.tvcdc-management-list.has-actions {
  --employee-columns: minmax(170px, 1.35fr) minmax(138px, 1fr) minmax(120px, 0.9fr) minmax(130px, 0.95fr) minmax(130px, 0.95fr) minmax(72px, 0.48fr) minmax(128px, 0.72fr);
}

.employees-list.tvcdc-management-list.no-actions {
  --employee-columns: minmax(176px, 1.35fr) minmax(146px, 1fr) minmax(128px, 0.9fr) minmax(138px, 0.95fr) minmax(138px, 0.95fr) minmax(76px, 0.48fr);
}

.tvcdc-management-list .employee-name-cell .avatar {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  overflow: hidden;
}

.tvcdc-management-list .employee-name-cell .avatar img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.mass-edit-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.1);
  color: var(--brand-primary);
}

.mass-edit-selection-bar strong {
  font-size: 0.88rem;
}

.segmented-fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.08);
}

.segmented-fieldset legend {
  padding: 0 6px;
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 800;
}

.mass-edit-individual-table {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.mass-edit-individual-table table {
  min-width: 620px;
}

.mass-edit-individual-table label {
  margin: 0;
}

.mass-edit-individual-table td {
  vertical-align: middle;
}

.mass-edit-checkbox-value {
  align-items: center;
  justify-content: start;
}

.mass-edit-office-phone-fields {
  width: 100%;
}

.employee-select-cell {
  justify-items: center;
  align-items: center;
  text-align: center;
}

.employee-select-cell input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
}

.employees-list-header,
.employee-list-row {
  display: grid;
  grid-template-columns: var(--employee-columns);
  min-width: 760px;
}

.employees-list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(188, 183, 173, 0.13);
  border-bottom: 1px solid var(--line-strong);
}

.employees-list-header > div,
.employee-list-cell {
  min-width: 0;
  padding: 9px 8px;
  letter-spacing: 0;
}

.employees-list-header > div {
  display: flex;
  align-items: center;
}

.employees-list-body {
  display: grid;
}

.employee-list-row {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: background 160ms ease;
}

.employee-list-row:last-child {
  border-bottom: 0;
}

.employee-list-row:hover {
  background: rgba(188, 183, 173, 0.1);
}

.employee-list-cell {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 64px;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.28;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.employee-list-cell strong {
  min-width: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.employee-list-cell .meta {
  min-width: 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.18;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  hyphens: none;
}

.employee-name-cell .person {
  min-width: 0;
}

.employee-name-cell .person > div:last-child {
  min-width: 0;
}

.employee-name-cell .person strong,
.employee-text-cell > strong,
.employee-date-cell > strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-id-cell,
.employee-actions-cell {
  align-content: center;
}

.employee-id-cell {
  color: var(--brand-primary);
  font-weight: 800;
}

.employee-actions-cell .compact-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  width: auto;
}

.employee-actions-cell .icon-only-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}

.employees-empty {
  margin: 0;
  padding: 18px;
  text-align: center;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: rgba(188, 183, 173, 0.12);
}

.needs-action-row td {
  background: rgba(254, 226, 226, 0.38);
}

.needs-action-row:hover td {
  background: rgba(254, 226, 226, 0.58);
}

.pto-request-section + .pto-request-section {
  margin-top: 18px;
}


tr:last-child td {
  border-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 20px;
  align-items: start;
}

.calendar {
  padding: 14px;
}

.calendar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  text-align: center;
}

.calendar-title {
  margin: 0;
  color: var(--brand-primary);
  font-size: var(--font-size-page-title);
  font-weight: 800;
  line-height: 1.15;
}

.calendar-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.calendar-nav strong {
  color: var(--brand-primary);
  font-size: var(--font-size-body);
  min-width: 160px;
  text-align: center;
}

@media (min-width: 769px) {
  .calendar-header {
    gap: 12px;
    margin-bottom: 18px;
  }

  .calendar-title {
    font-size: 1.45rem;
  }

  .calendar-header .calendar-nav {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .calendar-header .calendar-nav button {
    width: 112px;
    min-height: 38px;
    padding: 0 14px;
    justify-content: center;
    font-size: var(--font-size-button);
    line-height: 1;
    border-radius: 999px;
  }

  .calendar .filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: center;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
  }

  .calendar .filter-row label {
    flex: 0 1 220px;
    min-width: 180px;
  }

  .calendar-legend {
    justify-content: center;
    align-items: center;
    gap: 10px 14px;
    max-width: 920px;
    margin: 14px auto 0;
  }
}

.calendar-grid {
  --calendar-range-join: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.calendar-week-row {
  --calendar-lane-height: 28px;
  --calendar-cell-gap: 10px;
  --calendar-cell-inset: 9px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--calendar-cell-gap);
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.calendar-week-events {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: var(--calendar-lane-height);
  gap: 3px var(--calendar-cell-gap);
  padding-top: 38px;
  pointer-events: none;
  z-index: 2;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: visible;
}

.calendar-week-events .event {
  pointer-events: auto;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  color: var(--brand-primary-light);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}


.day {
  min-height: calc(42px + (var(--calendar-lane-count, 1) * 31px));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 9px;
  background: #ffffff;
  min-width: 0;
  box-sizing: border-box;
}

.day.is-today {
  border-color: #1d9bf0;
  background: rgba(29, 155, 240, 0.08);
  background: color-mix(in srgb, #1d9bf0 8%, #ffffff);
  box-shadow:
    0 0 0 2px rgba(29, 155, 240, 0.34),
    0 0 18px rgba(29, 155, 240, 0.24),
    0 8px 20px rgba(15, 23, 42, 0.08);
}

.day.is-today.muted-day {
  opacity: 1;
}

.day:hover {
  border-color: rgba(55, 79, 89, 0.24);
}

.calendar-manage .day {
  cursor: pointer;
}

.day strong,
.calendar-day-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-primary);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.day.is-today .calendar-day-label {
  color: #0b72b9;
  font-weight: 800;
}

.calendar-today-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 1px 7px;
  background: #1d9bf0;
  color: #ffffff;
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1.45;
  text-transform: uppercase;
}

.event {
  display: block;
  width: 100%;
  min-height: 0;
  border: 0;
  border-radius: 7px;
  padding: 2px 7px;
  margin-top: 3px;
  background: rgba(55, 79, 89, 0.1);
  color: var(--brand-primary);
  font-size: 0.58rem;
  line-height: 1.08;
  font-weight: 600;
  text-align: left;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(15, 23, 42, 0.08),
    3px 4px 7px rgba(15, 23, 42, 0.16),
    1px 2px 2px rgba(15, 23, 42, 0.1);
  box-sizing: border-box;
}

.calendar-mobile-label,
.calendar-day-mobile-date,
.calendar-more-event {
  display: none;
}

.event:hover {
  background: rgba(55, 79, 89, 0.16);
}

.event.calendar-range-event {
  position: relative;
  z-index: 1;
  left: calc(-1 * var(--calendar-range-join));
  width: calc(100% + (var(--calendar-range-join) * 2));
  margin-left: 0;
  margin-right: 0;
  border-radius: 999px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.event.calendar-range-start {
  left: 0;
  width: calc(100% + var(--calendar-range-join));
}

.event.calendar-range-end {
  left: calc(-1 * var(--calendar-range-join));
  width: calc(100% + var(--calendar-range-join));
}

.event.calendar-range-true-start,
.event.calendar-range-row-start {
  left: 0;
  width: calc(100% + var(--calendar-range-join));
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.event.calendar-range-true-end,
.event.calendar-range-row-end {
  left: calc(-1 * var(--calendar-range-join));
  width: calc(100% + var(--calendar-range-join));
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.event.calendar-range-start.calendar-range-end,
.event.calendar-range-true-start.calendar-range-true-end,
.event.calendar-range-row-start.calendar-range-row-end {
  left: 0;
  width: 100%;
}

.event.calendar-range-middle {
  border-radius: 999px;
}

.event.calendar-range-continuation .calendar-desktop-label {
  visibility: hidden;
}

.calendar-lane-placeholder {
  pointer-events: none;
  visibility: hidden;
}

.calendar-week-event {
  display: flex;
  align-items: center;
  align-self: stretch;
  min-width: 0;
  width: auto;
  max-width: 100%;
  height: var(--calendar-lane-height);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.calendar-week-events .event.calendar-range-event,
.calendar-week-events .event.calendar-range-start,
.calendar-week-events .event.calendar-range-end,
.calendar-week-events .event.calendar-range-true-start,
.calendar-week-events .event.calendar-range-true-end,
.calendar-week-events .event.calendar-range-row-start,
.calendar-week-events .event.calendar-range-row-end {
  left: auto;
  width: auto;
  max-width: 100%;
}

.calendar-week-events .calendar-week-segment {
  border-radius: 999px;
  opacity: 0.78;
}

.calendar-week-events .calendar-week-segment:hover,
.calendar-week-events .calendar-week-segment:focus-visible {
  opacity: 0.92;
}

.calendar-week-events .calendar-range-true-start,
.calendar-week-events .calendar-range-row-start {
  margin-left: var(--calendar-cell-inset);
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.calendar-week-events .calendar-range-true-start {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.calendar-week-events .calendar-range-true-end,
.calendar-week-events .calendar-range-row-end {
  margin-right: var(--calendar-cell-inset);
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.calendar-week-events .calendar-range-true-end {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.calendar-week-events .calendar-range-single,
.calendar-week-events .calendar-week-single {
  margin-left: var(--calendar-cell-inset);
  margin-right: var(--calendar-cell-inset);
  border-radius: 7px;
}

.event-two-line {
  text-align: center;
  line-height: 1.12;
}

.calendar-week-event:not(.event-two-line) .calendar-desktop-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-week-event.event-two-line {
  justify-content: center;
  padding-top: 2px;
  padding-bottom: 2px;
  white-space: normal;
}

.calendar-week-event.event-two-line .calendar-desktop-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  line-height: 1.02;
}

.calendar-week-event.event-two-line .event-line,
.calendar-week-event.event-two-line .event-line-name,
.calendar-week-event.event-two-line .event-line-anniversary-person,
.calendar-week-event.event-two-line .event-line-years {
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
  text-overflow: clip;
}

.calendar-week-event.event-two-line .event-line-name,
.calendar-week-event.event-two-line .event-line-anniversary-person {
  display: block;
}

.event-line {
  display: block;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.event-line-type {
  font-weight: 800;
}

.event-line-name {
  margin-top: 1px;
  font-weight: 700;
}

.event-line-anniversary-person {
  font-size: 0.66rem;
  line-height: 1.12;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.event-line-years {
  font-weight: 800;
  white-space: nowrap;
}

.event-line-detail {
  margin-top: 1px;
  font-size: 0.72rem;
  font-weight: 800;
}

.event.private-event {
  background: rgba(55, 79, 89, 0.1);
  color: var(--brand-primary);
}

.event.final-sweep-event,
.legend-item.final-sweep i {
  background: #0f766e;
}

.event.final-sweep-event {
  color: #ffffff;
  font-weight: 800;
}

.event.paid-holiday-event,
.legend-item.paid-holiday i {
  background: rgba(188, 183, 173, 0.34);
  color: var(--brand-primary);
  border: 1px solid rgba(188, 183, 173, 0.46);
  font-weight: 800;
}

.event.birthday-event,
.legend-item.birthday i {
  background: rgba(124, 58, 237, 0.1);
  color: #5b21b6;
  border: 1px solid rgba(124, 58, 237, 0.22);
  font-weight: 800;
}

.event.work-anniversary-event,
.legend-item.work-anniversary i {
  background: rgba(15, 118, 110, 0.1);
  color: #115e59;
  border: 1px solid rgba(15, 118, 110, 0.24);
  font-weight: 800;
}

.event.custom-calendar-event,
.legend-item.custom-calendar i {
  background: var(--brand-primary);
  color: #ffffff;
  border: 1px solid rgba(55, 79, 89, 0.22);
  font-weight: 800;
}

.event.reminder-event,
.legend-item.reminder i {
  background: rgba(14, 165, 233, 0.12);
  color: #075985;
  border: 1px solid rgba(14, 165, 233, 0.26);
  font-weight: 800;
}

.event.custom-calendar-event.color-staff {
  background: var(--brand-primary);
}

.event.custom-calendar-event.color-ministry {
  background: #0f766e;
}

.event.custom-calendar-event.color-admin {
  background: #7c3aed;
}

.event.custom-calendar-event.color-training {
  background: #b45309;
}

.event.custom-calendar-event.color-community {
  background: #2563eb;
}

.calendar .event {
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.14) 28%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0.03) 46%, rgba(15, 23, 42, 0.08) 100%);
  background-blend-mode: screen, overlay;
  border-color: rgba(255, 255, 255, 0.22);
}

.calendar .event:hover,
.calendar .event:focus-visible {
  filter: brightness(1.03) saturate(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(15, 23, 42, 0.1),
    4px 6px 12px rgba(15, 23, 42, 0.18),
    2px 3px 3px rgba(15, 23, 42, 0.12);
}

.calendar-day-detail {
  display: grid;
  gap: 10px;
}

.calendar-day-detail h3 {
  margin: 0 0 2px;
  color: var(--brand-primary);
  font-size: 1.05rem;
}

.calendar-day-detail-item {
  display: grid;
  gap: 3px;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid rgba(55, 79, 89, 0.12);
  border-radius: 12px;
  background: rgba(55, 79, 89, 0.06);
  color: var(--text);
  text-align: left;
}

.calendar-day-detail-item span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.calendar-day-detail-item strong {
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.25;
}

.calendar-detail-actions {
  margin-top: 14px;
}

.calendar-event-editor-dialog .dialog-panel {
  width: min(720px, calc(100vw - 28px));
}

.calendar-event-form-grid {
  margin-top: 12px;
}

.calendar-event-editor-form footer {
  flex-wrap: wrap;
}

.event.vacation,
.legend-item.vacation i {
  background: #3b82f6;
}

.event.sick,
.legend-item.sick i {
  background: #ef4444;
}

.event.study,
.legend-item.study i {
  background: #8b5cf6;
}

.event.missions,
.legend-item.missions i {
  background: #10b981;
}

.event.other,
.legend-item.other i {
  background: #f97316;
}

.event.lwop,
.legend-item.lwop i {
  background: #64748b;
}

.event.vacation,
.event.sick,
.event.study,
.event.missions,
.event.other,
.event.lwop {
  color: #ffffff;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.muted-day {
  background: #fafafa;
  opacity: 0.72;
}

.directory-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.directory-heading-row,
.directory-filter-row,
.directory-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.directory-heading-row {
  justify-content: space-between;
}

.directory-filter-row {
  justify-content: flex-end;
}

.search-field {
  width: min(320px, 42vw);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.directory-card {
  width: 100%;
  min-height: 250px;
  display: grid;
  grid-template-rows: 74px minmax(24px, auto) minmax(42px, auto) 22px minmax(48px, auto);
  justify-items: center;
  align-items: center;
  gap: 7px;
  padding: 16px 12px 14px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  color: var(--text);
  cursor: pointer;
}

.directory-card:hover,
.directory-card:focus-visible {
  border-color: rgba(55, 79, 89, 0.32);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(55, 79, 89, 0.12);
  transform: translateY(-1px);
}

.directory-card:focus-visible {
  outline: 3px solid rgba(55, 79, 89, 0.2);
  outline-offset: 2px;
}

.directory-name {
  color: var(--brand-primary);
  max-width: 100%;
  font-size: clamp(0.7rem, 1vw, 0.84rem);
  font-weight: 700;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-avatar {
  width: 70px;
  height: 70px;
  font-size: 1.12rem;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  transform-origin: center;
  transition: box-shadow 160ms ease, transform 160ms ease;
  z-index: 1;
}

.directory-avatar img,
span.large-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.directory-card .directory-avatar:hover {
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.24);
  transform: scale(2.5);
  z-index: 30;
}

.directory-department,
.directory-card small,
.directory-contact-line {
  color: var(--muted);
  max-width: 100%;
  line-height: 1.25;
  overflow: hidden;
  overflow-wrap: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-title {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: normal;
  text-align: center;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
  hyphens: none;
}

.directory-department {
  font-size: 0.73rem;
  font-weight: 600;
}

.directory-card small {
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--brand-primary-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-contact-list {
  display: grid;
  gap: 5px;
  justify-items: center;
  max-width: 100%;
  min-width: 0;
}

.directory-contact-line {
  align-items: center;
  color: var(--brand-primary-light);
  display: grid;
  gap: 6px;
  grid-template-columns: 16px minmax(0, 1fr);
  font-size: 0.63rem;
  font-weight: 600;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
  word-break: normal;
}

.directory-contact-line:hover {
  color: var(--brand-primary);
}

.directory-contact-icon {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  height: 16px;
  justify-content: center;
  width: 16px;
}

.directory-contact-icon .icon {
  height: 16px;
  stroke-width: 2.1;
  width: 16px;
}

.directory-contact-value {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.directory-tabs {
  flex: 0 0 auto;
}

.tvcdc-directory-grid .directory-card {
  grid-template-rows: 74px minmax(24px, auto) minmax(34px, auto) 22px minmax(48px, auto) auto;
  min-height: 270px;
}

.tvcdc-directory-grid .directory-name {
  overflow: visible;
  overflow-wrap: break-word;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
}

.tvcdc-card-actions {
  align-self: end;
  display: flex;
  justify-content: center;
  width: 100%;
}

.tvcdc-directory-dialog {
  max-width: min(92vw, 760px);
}

.tvcdc-directory-dialog header {
  align-items: start;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.tvcdc-directory-dialog .form-grid {
  margin-top: 12px;
}

.tvcdc-photo-preview {
  align-items: center;
  display: flex;
  gap: 14px;
  margin: 12px 0;
}

.compact-filter select {
  min-width: 130px;
}

.org-chart {
  display: grid;
  gap: 12px;
}

.org-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.org-diagnostics {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  color: #7f1d1d;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
}

.org-diagnostics strong {
  color: #7f1d1d;
  font-size: 0.82rem;
}

.org-diagnostics ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  font-size: 0.76rem;
  line-height: 1.35;
}

.org-radial-viewport {
  position: relative;
  height: min(760px, calc(100vh - 260px));
  min-height: 560px;
  overflow: hidden;
  overscroll-behavior: contain;
  user-select: none;
  touch-action: none;
  cursor: grab;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at center, rgba(55, 79, 89, 0.08) 0, rgba(55, 79, 89, 0.04) 26%, transparent 57%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(188, 183, 173, 0.08));
}

.org-hierarchy-viewport {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
    linear-gradient(90deg, rgba(55, 79, 89, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(55, 79, 89, 0.05) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
}

.org-radial-viewport:active {
  cursor: grabbing;
}

.org-radial-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.org-radial-canvas {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.org-hierarchy-canvas {
  display: inline-block;
  width: max-content;
  min-width: 980px;
  min-height: 100%;
  padding: 36px 42px 58px;
}

.org-hierarchy-tree,
.org-hierarchy-children {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-hierarchy-tree {
  min-width: max-content;
}

.org-hierarchy-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 14px;
}

.org-hierarchy-children {
  position: relative;
  gap: 0;
  padding-top: 36px;
}

.org-hierarchy-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 18px;
  border-left: 2px solid rgba(100, 116, 139, 0.34);
}

.org-hierarchy-children > .org-hierarchy-item::before,
.org-hierarchy-children > .org-hierarchy-item::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 50%;
  height: 18px;
  border-top: 2px solid rgba(100, 116, 139, 0.34);
}

.org-hierarchy-children > .org-hierarchy-item::before {
  right: 50%;
}

.org-hierarchy-children > .org-hierarchy-item::after {
  left: 50%;
}

.org-hierarchy-children > .org-hierarchy-item:first-child::before,
.org-hierarchy-children > .org-hierarchy-item:last-child::after {
  border-top: 0;
}

.org-hierarchy-children > .org-hierarchy-item:only-child::before,
.org-hierarchy-children > .org-hierarchy-item:only-child::after {
  border-top: 0;
}

.org-hierarchy-children > .org-hierarchy-item > .org-hierarchy-card::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 50%;
  height: 18px;
  border-left: 2px solid rgba(100, 116, 139, 0.34);
  transform: translateX(-50%);
}

.org-hierarchy-children > .org-hierarchy-item:only-child > .org-hierarchy-card::before {
  top: -36px;
  height: 36px;
}

.org-ring,
.org-connectors {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.org-ring {
  left: 50%;
  top: 50%;
  inset: auto;
  z-index: 0;
  border: 1px dashed rgba(55, 79, 89, 0.14);
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.ring-executive {
  width: 380px;
  height: 380px;
  border-color: rgba(55, 79, 89, 0.32);
}

.ring-directors {
  width: 660px;
  height: 660px;
  border-color: rgba(188, 183, 173, 0.75);
}

.ring-support {
  width: 910px;
  height: 910px;
  border-color: rgba(100, 116, 139, 0.34);
}

.ring-depth-1 {
  border-color: rgba(55, 79, 89, 0.32);
}

.ring-depth-2 {
  border-color: rgba(188, 183, 173, 0.75);
}

.ring-depth-3,
.ring-depth-4,
.ring-depth-5,
.ring-depth-6 {
  border-color: rgba(100, 116, 139, 0.34);
}

.org-connectors {
  z-index: 0;
  width: 100%;
  height: 100%;
}

.org-connector {
  fill: none;
  stroke: rgba(100, 116, 139, 0.34);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.org-branch-connector {
  stroke-width: 1.9;
}

.org-connector.executive {
  stroke: rgba(55, 79, 89, 0.38);
}

.org-connector.directors {
  stroke: rgba(188, 183, 173, 0.72);
}

.org-radial-node {
  position: absolute;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  width: 154px;
  min-height: 136px;
  padding: 10px 10px 12px;
  color: var(--text);
  text-align: center;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
  transform: translate(-50%, -50%);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.org-hierarchy-card {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
}

button.org-radial-node {
  cursor: pointer;
}

button.org-radial-node:hover,
button.org-radial-node:focus-visible {
  z-index: 4;
  border-color: rgba(55, 79, 89, 0.34);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(55, 79, 89, 0.16);
  outline: none;
  transform: translate(-50%, -50%) translateY(-2px);
}

button.org-hierarchy-card:hover,
button.org-hierarchy-card:focus-visible {
  transform: translateY(-2px);
}

.org-center-node {
  z-index: 3;
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  align-content: center;
  gap: 10px;
  width: 184px;
  min-height: 184px;
  padding: 24px 22px;
  color: #ffffff;
  border-color: var(--brand-primary);
  border-radius: 999px;
  background: var(--brand-primary);
  box-shadow: 0 18px 38px rgba(55, 79, 89, 0.28);
}

.org-board-card {
  width: 176px;
  min-height: 138px;
  padding: 14px 12px 16px;
  color: var(--text);
  border-color: rgba(55, 79, 89, 0.26);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(55, 79, 89, 0.14);
}

.org-board-card strong {
  color: var(--brand-primary);
  max-width: 132px;
  font-size: 0.86rem;
}

.org-board-card .org-center-mark {
  width: 64px;
  height: 64px;
  background: rgba(55, 79, 89, 0.08);
}

.org-board-card .org-center-logo {
  width: 50px;
  height: 50px;
}

.org-center-node strong {
  color: #ffffff;
  max-width: 118px;
  font-family: Montserrat, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.18;
  text-align: center;
  text-wrap: balance;
}

.org-center-mark {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.org-center-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.org-node-avatar {
  width: 68px;
  height: 68px;
  border: 3px solid rgba(55, 79, 89, 0.18);
  border-radius: 999px;
  object-fit: cover;
  background: var(--surface-muted);
  box-shadow: 0 8px 18px rgba(55, 79, 89, 0.14);
}

.org-radial-node > strong,
.org-radial-node > span:not(.org-center-mark):not(.org-node-avatar):not(.avatar) {
  max-width: 100%;
  line-height: 1.18;
  overflow-wrap: normal;
  word-break: normal;
}

.org-radial-node > strong {
  color: var(--brand-primary);
  font-size: 0.82rem;
  font-weight: 800;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.org-radial-node > span:not(.org-center-mark):not(.org-node-avatar):not(.avatar) {
  display: -webkit-box;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.org-radial-node.executive {
  border-color: rgba(55, 79, 89, 0.22);
}

.org-radial-node.executive .org-node-avatar {
  border-color: rgba(55, 79, 89, 0.72);
}

.org-radial-node.directors {
  border-color: rgba(188, 183, 173, 0.68);
}

.org-radial-node.directors .org-node-avatar {
  border-color: rgba(188, 183, 173, 0.95);
}

.org-radial-node.support {
  border-color: rgba(203, 213, 225, 0.92);
}

.org-radial-node.support .org-node-avatar {
  border-color: #cbd5e1;
}

.directory-modal-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-profile {
  margin-bottom: 14px;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.detail-list div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.08);
}

.detail-list dt {
  color: var(--muted);
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-list dd {
  margin: 3px 0 0;
  color: var(--text);
  overflow-wrap: break-word;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--brand-primary);
  font-size: var(--font-size-small);
  font-weight: 600;
  line-height: 1.3;
}

#ptPayTypeField[hidden],
#payrollApproverField[hidden],
#approvedHoursAllocationField[hidden] {
  display: none !important;
}

.form-message {
  min-height: 18px;
  margin: 10px 0 0;
  color: #991b1b;
  font-size: var(--font-size-small);
  font-weight: 600;
}

.request-summary {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(188, 183, 173, 0.1);
  color: var(--slate);
  font-size: 0.82rem;
}

.request-summary:empty {
  display: none;
}

.request-summary strong {
  color: var(--brand-primary);
}

.pto-daily-entry-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.pto-daily-entry-panel:empty {
  display: none;
}

.pto-daily-entry-head,
.pto-daily-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
}

.pto-daily-entry-head {
  color: var(--brand-primary);
  font-size: 0.86rem;
}

.pto-daily-entry-grid {
  display: grid;
  gap: 8px;
}

.pto-daily-entry-row {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.pto-daily-entry-row.non-deductible {
  background: rgba(188, 183, 173, 0.13);
  color: var(--muted);
}

.pto-daily-entry-row strong,
.pto-daily-entry-row small {
  display: block;
}

.pto-daily-entry-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.pto-daily-entry-row input,
.pto-daily-entry-row select {
  min-width: 120px;
}

.paid-holiday-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.paid-holiday-row {
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 0.8fr) minmax(140px, 0.7fr) minmax(90px, auto) auto;
  padding: 12px;
}

.paid-holiday-row.is-inactive {
  opacity: 0.68;
}

.paid-holiday-active {
  align-self: center;
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-bottom: 8px;
}

.paid-holiday-active input {
  width: auto;
}

.pto-toolbar {
  align-items: center;
  flex-wrap: wrap;
}

.pto-category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pto-category-pill {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.pto-category-pill.active .category-badge {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.pto-category-detail {
  margin-bottom: 16px;
}

.pto-balance-actions {
  display: block;
  margin-top: 10px;
}

.pto-balance-actions .secondary-button {
  width: auto;
}


.pto-correction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.pto-correction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.pto-correction-info {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.pto-correction-info > .badge {
  justify-self: start;
  max-width: 100%;
  white-space: nowrap;
}

.pto-correction-metrics {
  display: grid;
  gap: 8px;
}

.pto-correction-metrics span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(188, 183, 173, 0.12);
}

.pto-correction-metrics b {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.pto-correction-metrics strong {
  color: var(--brand-primary);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.2;
}

.pto-correction-row input {
  text-align: right;
  width: 100%;
}

.pto-correction-guard {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.pto-correction-guard p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.pto-backlog-daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.pto-backlog-daily-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.pto-backlog-daily-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pto-backlog-daily-row strong,
.pto-backlog-daily-row small {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.pto-backlog-daily-row small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.pto-backlog-daily-row input {
  width: 100%;
  text-align: right;
}

.pto-backlog-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.pto-backlog-total strong {
  color: var(--brand-primary);
  font-size: 1.05rem;
}

.dialog {
  border: 0;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.22);
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: hidden;
}

#settingsDialog {
  width: min(1280px, calc(100vw - 28px));
}

#directoryDetailDialog {
  width: min(98vw, 1320px);
  max-width: 1320px;
}

.dialog::backdrop {
  background: rgba(44, 64, 72, 0.48);
}

.dialog-panel {
  padding: 18px;
  background: var(--surface);
  max-height: calc(100vh - 28px);
  overflow-y: auto;
}

#settingsDialog .dialog-panel {
  padding-right: 24px;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

#settingsDialog .dialog-panel::-webkit-scrollbar {
  width: 14px;
}

#settingsDialog .dialog-panel::-webkit-scrollbar-track {
  background: rgba(84, 101, 111, 0.12);
  border-radius: 999px;
}

#settingsDialog .dialog-panel::-webkit-scrollbar-thumb {
  background: rgba(55, 79, 89, 0.48);
  border: 3px solid var(--surface);
  border-radius: 999px;
}

#settingsDialog .dialog-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(55, 79, 89, 0.68);
}

.dialog-panel header,
.dialog-panel footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.dialog-panel footer {
  justify-content: flex-end;
  margin-top: 14px;
}

.locked {
  opacity: 0.56;
}

.workflow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.workflow span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: rgba(188, 183, 173, 0.14);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--brand-primary);
  font-weight: 600;
}

.workflow .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-primary);
}

.main,
.card,
.table-wrap,
.calendar,
.profile-panel,
.dialog-panel,
.settings-card,
.dashboard-card-body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

.card p,
.table-wrap p,
.calendar p,
.profile-panel p,
.dialog-panel p,
.settings-card p {
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
}

.card h2,
.table-wrap h2,
.profile-panel h2,
.dialog-panel h2,
.settings-card h2 {
  font-size: var(--font-size-title);
  line-height: 1.2;
}

.card h3,
.table-wrap h3,
.profile-panel h3,
.dialog-panel h3,
.settings-card h3 {
  font-size: 14px;
  line-height: 1.25;
}

.meta,
.help-text,
.form-hint,
.form-note,
.checkbox-field small,
.settings-card .meta,
.dialog-panel .meta {
  font-size: var(--font-size-small);
  line-height: 1.35;
}

.filter-row label,
.form-grid label,
.settings-form-grid label,
.email-template-panel label,
.dialog-panel label {
  font-size: var(--font-size-small);
  line-height: 1.3;
}

.primary-button,
.secondary-button,
.warning-button,
.ghost-button,
.danger-button,
.compact-button {
  font-size: var(--font-size-button);
}

.card .dashboard-card-title {
  font-size: var(--font-size-title);
  line-height: 1.12;
}

.card .annual-review-section h3,
.dialog-panel .annual-review-section h3,
.card .annual-review-admin-override h3,
.dialog-panel .annual-review-admin-override h3 {
  font-size: var(--font-size-title);
}

.card .annual-review-question h4,
.dialog-panel .annual-review-question h4 {
  font-size: 0.86rem;
}

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

html.portal-session-restoring body.auth-mode {
  background: #f8fafc;
}

.portal-loading-page {
  display: none;
  min-height: 100vh;
  font-family: var(--font-family);
  background:
    radial-gradient(circle at 20% 10%, rgba(188, 183, 173, 0.22), transparent 34%),
    linear-gradient(135deg, #f8fafc, #f4f3f1);
}

html.portal-session-restoring body.auth-mode .portal-loading-page,
.portal-loading-page.is-active {
  display: block;
}

html.portal-session-restoring body.auth-mode .login-page {
  display: none;
}

.portal-loading-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(188, 183, 173, 0.28), transparent 34%),
    linear-gradient(135deg, #f8fafc, #f4f3f1);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.login-logo {
  width: 86px;
  height: 86px;
  margin-bottom: 18px;
  object-fit: contain;
}

.login-card h1 {
  margin-bottom: 24px;
  font-size: clamp(1.6rem, 6vw, 2.25rem);
}

.login-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.login-form .primary-button {
  width: 100%;
  margin-top: 4px;
}

.login-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--brand-secondary-dark);
  font-size: 0.88rem;
}

.login-links a {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

body.auth-mode .app {
  display: block;
}

body.auth-mode .sidebar,
body.auth-mode .topbar {
  display: none;
}

body.auth-mode .main {
  margin: 0;
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar::before {
    margin-top: -24px;
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-grid,
  .card-grid,
  .report-grid,
  .filter-row,
  .detail-list,
  .balance-grid,
  .dashboard-absence-grid,
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .balance-detail-panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .balance-detail-actions {
    justify-content: flex-start;
  }

  .directory-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }
}

@media (max-width: 640px) {
  .main {
    padding-inline: 14px;
  }

  .dashboard-card {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 !important;
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .dashboard-card > .dashboard-card-header {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 72px;
    margin: 0 !important;
    padding: 10px 14px;
    border-radius: 16px 16px 0 0;
    box-sizing: border-box;
  }

  .dashboard-card > .dashboard-card-body {
    padding: 14px;
    box-sizing: border-box;
  }

  .dashboard-card-title {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0.02em;
  }

  .dashboard-card-title-block .meta {
    margin-top: 3px;
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .dashboard-time-off-card,
  .staff-bulletin-card,
  .work-hours-summary-card,
  .dashboard-absence-section {
    gap: 0;
  }

  .dashboard-time-off-card .dashboard-balance-grid {
    margin-top: 0;
  }

  .balance-detail-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 0;
    padding: 12px;
    overflow-x: hidden;
  }

  .balance-detail-panel > div:first-child {
    display: grid;
    justify-items: center;
    text-align: center;
  }

  .balance-detail-metrics,
  .balance-detail-metrics:has(> div:only-child) {
    grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
    width: 100%;
  }

  .balance-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .balance-detail-actions button {
    min-width: 0;
    max-width: none;
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    gap: 6px;
    font-size: 12px;
    justify-content: center;
    white-space: nowrap;
  }

  .balance-detail-actions button .icon {
    width: 15px;
    height: 15px;
  }

  .balance-grid,
  .absence-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
  }

  .dashboard-absence-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-absence-section .absence-card-grid {
    grid-template-columns: repeat(2, minmax(0, 132px));
    justify-content: center;
    gap: 9px;
  }

  .dashboard-absence-section .absence-card {
    width: 100%;
    min-width: 0;
  }


  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid,
  .card-grid,
  .report-grid,
  .filter-row,
  .detail-list,
  .balance-grid,
  .split,
  .form-grid,
  .phone-extension-row,
  .nav-list {
    grid-template-columns: 1fr;
  }

  .directory-toolbar,
  .directory-heading-row,
  .directory-filter-row,
  .directory-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .directory-card {
    min-height: 236px;
    grid-template-rows: 62px 24px minmax(42px, auto) 20px minmax(44px, auto);
    gap: 6px;
    padding: 12px 8px;
  }

  .directory-avatar {
    width: 58px;
    height: 58px;
    font-size: 0.98rem;
  }

  .directory-name {
    font-size: clamp(0.66rem, 2.8vw, 0.78rem);
  }

  .directory-title,
  .directory-department {
    font-size: 0.68rem;
  }

  .directory-card small {
    font-size: 0.63rem;
  }

  .directory-contact-line {
    font-size: 0.63rem;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-card {
    padding: 24px;
  }
}

@media (max-width: 420px) {
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .login-page {
    padding: 10px;
  }

  .login-card {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body:not(.auth-mode) {
    padding-top: 68px;
    padding-bottom: 0;
  }

  body.auth-mode .mobile-header {
    display: none;
  }

  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: grid;
  }

  .mobile-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 44px 42px minmax(0, 1fr) 46px;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
  }

  .mobile-menu-button {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    font-size: 1.4rem;
    line-height: 1;
  }

  .mobile-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--brand-primary);
    object-fit: contain;
  }

  .mobile-header strong,
  .mobile-header span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-header strong {
    color: var(--brand-primary);
    font-size: 0.9rem;
  }

  .mobile-header span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
  }

  .mobile-user-menu-mount {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
  }

  .mobile-user-menu-mount .user-menu-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    max-width: 44px;
    justify-content: center;
    gap: 0;
    padding: 5px;
    border-radius: 14px;
  }

  .mobile-user-menu-mount .user-menu-text,
  .mobile-user-menu-mount .user-menu-caret {
    display: none;
  }

  .mobile-user-menu-mount .user-menu-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .mobile-user-menu-mount .user-menu-dropdown {
    position: fixed;
    top: 58px;
    right: 10px;
    width: min(92vw, 310px);
  }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(17, 24, 39, 0.34);
  }

  body.mobile-nav-open .mobile-nav-overlay {
    display: block;
  }

  .app {
    display: block;
    min-width: 0;
  }

  .sidebar {
    display: none;
    position: fixed;
    z-index: 90;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    height: 100dvh;
    padding: 18px 14px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  body.mobile-nav-open .sidebar {
    display: block;
  }

  .sidebar::before {
    margin: -18px -14px 18px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .nav-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nav-list button,
  .role-switcher button,
  .role-switcher select {
    min-height: 46px;
    font-size: 0.94rem;
  }

  .main {
    width: 100%;
    max-width: 100%;
    padding: 14px 12px;
  }

  .topbar {
    display: none;
  }

  .view {
    gap: 14px;
  }

  .card,
  .stat,
  .profile-panel,
  .table-wrap,
  .calendar {
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .card,
  .stat,
  .profile-panel {
    padding: 15px;
  }

  .toolbar,
  .toolbar-between,
  .table-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row,
  .dialog-actions,
  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .button-row button,
  .dialog-actions button,
  .primary-button,
  .secondary-button,
  .warning-button,
  .ghost-button,
  .danger-button {
    min-height: 44px;
    justify-content: center;
    white-space: normal;
  }

  .button-row .icon-only-button,
  .compact-actions .icon-only-button {
    width: 44px;
    min-width: 44px;
  }

  .compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  h1 {
    font-size: 1.35rem;
  }

  h2 {
    font-size: 0.96rem;
    line-height: 1.25;
  }

  .stats-grid,
  .card-grid,
  .report-grid,
  .filter-row,
  .detail-list,
  .split,
  .form-grid,
  .pto-correction-grid,
  .employee-file-form,
  .email-template-panel,
  .appearance-preview,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  label,
  input,
  select,
  textarea {
    width: 100%;
  }

  label {
    display: grid;
    gap: 6px;
    color: var(--slate);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .required,
  .required-indicator {
    display: inline;
    white-space: nowrap;
  }

  textarea {
    min-height: 96px;
  }

  .balance-grid,
  .absence-card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dashboard-balance-grid {
    grid-template-columns: repeat(2, minmax(0, min(175px, calc((100% - 8px) / 2))));
    justify-content: center;
    gap: 8px;
  }

  .balance-card {
    aspect-ratio: auto;
    min-height: 0;
    gap: 9px;
    padding: 12px;
  }

  .balance-card strong {
    font-size: clamp(1.05rem, 5vw, 1.28rem);
  }

  .dashboard-balance-grid .balance-card {
    width: 100%;
    height: auto;
    min-width: 0;
    max-width: 175px;
    max-height: none;
    aspect-ratio: 1 / 1;
    min-height: min(175px, calc((100vw - 40px) / 2));
    gap: 6px;
    padding: 10px 8px 9px;
    border-radius: 14px;
  }

  .dashboard-balance-grid .balance-card.active::before {
    top: 7px;
    width: 30px;
  }

  .dashboard-balance-grid .badge {
    max-width: 100%;
    padding: 4px 7px;
    font-size: 0.68rem;
    line-height: 1.05;
  }

  .dashboard-balance-grid .pto-gauge-card {
    gap: 5px;
    padding: 8px 6px;
  }

  .dashboard-balance-grid .pto-gauge-ring {
    width: min(134px, 92%);
  }

  .dashboard-balance-grid .pto-gauge-ring::after {
    inset: 9px;
  }

  .dashboard-balance-grid .pto-gauge-center {
    width: calc(100% - 30px);
    gap: 1px;
  }

  .dashboard-balance-grid .pto-gauge-badge {
    margin-bottom: 2px;
  }

  .dashboard-balance-grid .pto-gauge-badge .badge {
    min-height: 22px;
    max-width: 98px;
    padding: 3px 7px;
    font-size: 0.6rem;
  }

  .dashboard-balance-grid .pto-gauge-center strong {
    font-size: clamp(1.35rem, 6.2vw, 1.85rem);
    max-width: 82px;
  }

  .dashboard-balance-grid .pto-gauge-center small {
    font-size: 0.62rem;
  }

  .dashboard-balance-grid .pto-gauge-center .pto-gauge-total {
    font-size: 0.53rem;
  }

  .balance-detail-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .work-hours-summary-card .toolbar {
    align-items: stretch;
  }

  .work-hours-average {
    justify-items: start;
    min-width: 0;
  }

  .work-hours-chart {
    grid-template-columns: repeat(6, minmax(40px, 1fr));
    gap: 7px;
  }

  .work-hours-week {
    grid-template-rows: 72px auto auto auto auto;
    gap: 5px;
    padding: 8px 4px;
    border-radius: 12px;
  }

  .work-hours-bar {
    width: min(30px, 68%);
  }

  .work-hours-week strong {
    font-size: 0.78rem;
  }

  .work-hours-week-label {
    font-size: 0.7rem;
  }

  .work-hours-date-range {
    font-size: 0.62rem;
  }

  .work-hours-status {
    min-height: 18px;
    padding: 2px 4px;
    font-size: 0.58rem;
  }

  .staff-bulletin-card .toolbar {
    align-items: stretch;
  }

  .dashboard-card-header {
    display: flex !important;
    flex-direction: column;
    justify-items: center;
    gap: 2px;
    height: 72px;
    min-height: 72px;
    padding: 8px 14px;
  }

  .dashboard-card-header > .dashboard-card-title-block,
  .dashboard-card-header > button,
  .dashboard-card-header > .icon-container,
  .dashboard-card-header > .work-hours-average {
    grid-column: 1;
    position: static;
    transform: none;
  }

  .dashboard-card-header > .dashboard-card-title-block:first-child:not(:last-child) {
    margin-left: 0;
  }

  .dashboard-card-header > button,
  .dashboard-card-header > .icon-container,
  .dashboard-card-header > .work-hours-average {
    justify-self: center;
  }

  .dashboard-card-header .work-hours-average {
    justify-items: center;
    text-align: center;
  }

  .dashboard-widget-actions {
    justify-content: center;
    margin: -4px 0 10px;
  }

  .staff-bulletin-notice-head {
    display: grid;
  }

  .staff-bulletin-actions {
    justify-content: start;
  }

  .staff-bulletin-editor .settings-form-grid {
    grid-template-columns: 1fr;
  }

  .balance-breakdown span {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .dashboard-balance-grid .balance-breakdown {
    gap: 3px;
    font-size: 0.7rem;
    line-height: 1.2;
    width: 100%;
  }

  .dashboard-absence-grid {
    grid-template-columns: 1fr;
  }

  .absence-card {
    aspect-ratio: auto;
    min-height: 0;
  }

  .table-wrap {
    overflow: visible;
    padding: 0;
  }

  .table-wrap table,
  .users-table-wrap table,
  .compact-table table,
  .timesheet-entry-table,
  .report-result-frame table,
  .admin-pto-request-frame table {
    min-width: 0;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap th,
  .table-wrap td,
  .table-wrap tr {
    display: block;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
    padding: 10px;
  }

  .table-wrap tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(88px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-height: 42px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--brand-primary-light);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .table-wrap td .badge,
  .table-wrap td .status-badge {
    justify-self: start;
  }

  .table-wrap td[colspan] {
    grid-template-columns: 1fr;
  }

  .table-wrap td[colspan]::before {
    display: none;
  }

  .employees-table-wrap {
    overflow: visible;
  }

  .employees-table {
    min-width: 0;
    font-size: 0.82rem;
  }

  .employees-table td {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .employees-table .person strong,
  .employees-table .person .meta,
  .employees-table .employee-text-cell,
  .employees-table .employee-text-cell .meta,
  .employees-table .employee-date-cell,
  .employees-table .employee-date-cell .meta {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .employees-table .person .meta,
  .employees-table .employee-text-cell .meta {
    display: inline;
  }

  .employees-list {
    gap: 12px;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .employees-list-header {
    display: none;
  }

  .employees-list-body {
    display: grid;
    gap: 12px;
  }

  .employee-list-row,
  .employees-list.has-actions .employee-list-row,
  .employees-list.no-actions .employee-list-row {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  }

  .employee-list-cell {
    display: grid;
    grid-template-columns: minmax(92px, 0.34fr) minmax(0, 1fr);
    align-items: center;
    min-height: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
  }

  .employee-list-cell:last-child {
    border-bottom: 0;
  }

  .employee-list-cell::before {
    content: attr(data-label);
    color: var(--brand-primary-light);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .employee-name-cell {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .employee-name-cell::before {
    display: none;
  }

  .employee-name-cell .person {
    justify-content: center;
    text-align: left;
  }

  .employee-list-cell .meta {
    white-space: normal;
  }

  .employee-id-cell,
  .employee-actions-cell {
    align-content: center;
  }

  .employee-actions-cell .compact-actions {
    justify-content: flex-start;
  }

  .checklist-layout,
  .checklist-item,
  .checklist-item-controls {
    grid-template-columns: 1fr;
  }

  .checklist-progress dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .users-table-wrap,
  .report-result-frame,
  .admin-pto-request-frame {
    height: auto;
    min-height: 0;
    max-height: none;
    padding-bottom: 0;
    overflow: visible;
  }

  .timesheet-entry-table tr {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
  }

  .timesheet-entry-table td {
    grid-template-columns: 1fr;
    border-bottom: 0;
    padding: 0;
  }

  .timesheet-entry-table td::before {
    margin-bottom: -4px;
  }

  .timesheet-entry-table input,
  .timesheet-entry-table select {
    min-width: 0;
    min-height: 46px;
  }

  .timesheet-entry-table output {
    display: block;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(55, 79, 89, 0.08);
    color: var(--brand-primary);
    font-weight: 800;
  }

  .timesheet-total {
    white-space: normal;
  }

  .paid-holiday-row {
    grid-template-columns: 1fr;
  }

  .paid-holiday-active {
    margin-bottom: 0;
  }

  .timesheet-weekly-summary .table-wrap tbody,
  .compact-table tbody {
    padding: 10px;
  }

  .calendar {
    padding: 10px;
  }

  .calendar-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    align-items: center;
  }

  .calendar-nav button {
    min-width: 0;
    min-height: 44px;
    padding-inline: 8px;
    justify-content: center;
    font-size: 0.72rem;
    line-height: 1;
  }

  .calendar-nav button:nth-of-type(1) {
    grid-column: 1;
    grid-row: 2;
  }

  .calendar-nav button:nth-of-type(2) {
    grid-column: 2;
    grid-row: 2;
  }

  .calendar-nav button:nth-of-type(3) {
    grid-column: 3;
    grid-row: 2;
  }

  .calendar-title,
  .calendar-nav strong {
    min-width: 0;
    text-align: center;
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 0.95rem;
    padding-bottom: 1px;
  }

  .calendar .filter-row,
  .calendar-legend {
    display: none;
  }

  .calendar-weekdays {
    display: grid;
    gap: 3px;
    margin-top: 10px;
    font-size: 0.58rem;
  }

  .calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 7px;
  }

  .calendar-week-row {
    --calendar-lane-height: 21px;
    --calendar-cell-gap: 3px;
    --calendar-cell-inset: 3px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: var(--calendar-cell-gap);
  }

  .calendar-week-events {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-auto-rows: var(--calendar-lane-height);
    gap: 2px var(--calendar-cell-gap);
    padding-top: 33px;
  }

  .day {
    display: grid;
    align-content: start;
    gap: 2px;
    min-height: calc(34px + (var(--calendar-lane-count, 1) * 23px));
    padding: 4px 3px;
    border-radius: 9px;
    cursor: pointer;
    overflow: hidden;
  }

  .day:not(:has(.event)) {
    display: grid;
  }

  .muted-day {
    display: grid;
    opacity: 0.45;
    background: rgba(188, 183, 173, 0.08);
  }

  .day strong {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    margin: 0 auto 2px;
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1;
  }

  .day.is-today strong {
    background: #1d9bf0;
    color: #ffffff;
    box-shadow:
      0 0 0 2px rgba(29, 155, 240, 0.34),
      0 0 12px rgba(29, 155, 240, 0.24);
  }

  .calendar-today-badge {
    display: none;
  }

  .calendar-day-desktop-date,
  .calendar-desktop-label {
    display: none;
  }

  .calendar-day-mobile-date,
  .calendar-mobile-label {
    display: inline;
  }

  .event {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 18px;
    margin-top: 2px;
    padding: 2px 3px;
    border-radius: 999px;
    font-size: 0.48rem;
    line-height: 1.02;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .calendar-mobile-label {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .event.calendar-range-event {
    left: -7px;
    width: calc(100% + 14px);
    margin-left: 0;
    margin-right: 0;
    border-radius: 999px;
  }

  .event.calendar-range-start {
    left: 0;
    width: calc(100% + 7px);
  }

  .event.calendar-range-end {
    left: -7px;
    width: calc(100% + 7px);
  }

  .event.calendar-range-true-start,
  .event.calendar-range-row-start {
    left: 0;
    width: calc(100% + 7px);
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
  }

  .event.calendar-range-true-end,
  .event.calendar-range-row-end {
    left: -7px;
    width: calc(100% + 7px);
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
  }

  .event.calendar-range-start.calendar-range-end,
  .event.calendar-range-true-start.calendar-range-true-end,
  .event.calendar-range-row-start.calendar-range-row-end {
    left: 0;
    width: 100%;
  }

  .calendar-week-events .event.calendar-range-event,
  .calendar-week-events .event.calendar-range-start,
  .calendar-week-events .event.calendar-range-end,
  .calendar-week-events .event.calendar-range-true-start,
  .calendar-week-events .event.calendar-range-true-end,
  .calendar-week-events .event.calendar-range-row-start,
  .calendar-week-events .event.calendar-range-row-end {
    left: auto;
    width: auto;
  }

  .calendar-week-events .calendar-range-true-start,
  .calendar-week-events .calendar-range-row-start,
  .calendar-week-events .calendar-week-single {
    margin-left: var(--calendar-cell-inset);
  }

  .calendar-week-events .calendar-range-true-end,
  .calendar-week-events .calendar-range-row-end,
  .calendar-week-events .calendar-week-single {
    margin-right: var(--calendar-cell-inset);
  }

  .event-two-line {
    text-align: center;
  }

  .calendar-week-event.event-two-line .calendar-mobile-label {
    font-size: 0.46rem;
    line-height: 1;
  }

  .mobile-overflow-event {
    display: none;
  }

  .calendar-more-event {
    display: block;
    background: rgba(55, 79, 89, 0.08);
    color: var(--brand-primary);
    border: 1px dashed rgba(55, 79, 89, 0.18);
    font-weight: 800;
  }

  .directory-toolbar,
  .directory-heading-row,
  .directory-filter-row,
  .directory-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-heading-row .directory-tabs,
  .directory-filter-row .segmented-control,
  .directory-filter-row .search-field,
  .directory-actions .segmented-control,
  .directory-actions .search-field {
    width: 100%;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .directory-card {
    min-height: 230px;
    grid-template-rows: 58px 24px minmax(42px, auto) 20px minmax(44px, auto);
    padding: 10px 7px;
    border-radius: var(--radius);
  }

  .directory-avatar {
    width: 54px;
    height: 54px;
    font-size: 0.92rem;
  }

  .directory-contact-line {
    min-height: 32px;
    font-size: 0.66rem;
  }

  .directory-contact-icon {
    width: 26px;
    height: 26px;
  }

  .org-chart-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .org-chart-toolbar button {
    justify-content: center;
    width: 100%;
  }

  .org-radial-viewport {
    height: min(70vh, 620px);
    min-height: 480px;
  }

  .org-radial-canvas {
    margin: 0;
  }

  .org-hierarchy-canvas {
    min-width: 860px;
    padding: 28px 28px 44px;
  }

  .org-hierarchy-item {
    padding: 0 10px;
  }

  .org-hierarchy-children {
    padding-top: 30px;
  }

  .org-hierarchy-children::before,
  .org-hierarchy-children > .org-hierarchy-item::before,
  .org-hierarchy-children > .org-hierarchy-item::after,
  .org-hierarchy-children > .org-hierarchy-item > .org-hierarchy-card::before {
    border-width: 1.5px;
  }

  .employee-file-panel {
    padding: 12px;
  }

  .compact-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-file-tab {
    min-height: 42px;
  }

  .employee-file-preview-dialog {
    width: min(100vw, 100%);
    max-height: 100dvh;
  }

  .employee-file-preview-body {
    min-height: calc(100dvh - 190px);
  }

  .employee-file-preview-frame {
    height: calc(100dvh - 190px);
  }

  .employee-file-image-preview,
  .employee-file-media-preview {
    max-height: calc(100dvh - 190px);
  }

  .annual-review-preview-dialog {
    width: min(100vw, 100%);
    max-height: 100dvh;
  }

  .annual-review-preview-frame-wrap {
    min-height: calc(100dvh - 220px);
  }

  .annual-review-preview-frame {
    height: calc(100dvh - 220px);
  }

  .employee-file-reviews-table {
    max-height: none;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .employee-file-reviews-table .employee-file-reviews-grid {
    display: block;
    min-width: 0;
    width: 100%;
    font-size: 0.82rem;
  }

  .employee-file-reviews-grid thead {
    display: none;
  }

  .employee-file-reviews-grid tbody,
  .employee-file-reviews-grid tr,
  .employee-file-reviews-grid td {
    display: block;
    width: 100%;
  }

  .employee-file-reviews-grid tbody {
    display: grid;
    gap: 10px;
  }

  .employee-file-reviews-grid tr {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  .employee-file-reviews-grid td {
    display: grid;
    grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 0;
    padding: 7px 0;
    white-space: normal;
  }

  .employee-file-reviews-grid td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .employee-file-reviews-grid td[colspan] {
    display: block;
  }

  .employee-file-reviews-grid td[colspan]::before {
    content: "";
  }

  .employee-file-review-actions-cell {
    min-width: 0;
    text-align: left;
    white-space: normal;
  }

  .employee-file-review-actions-cell .compact-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .employee-file-review-actions-cell .ghost-button,
  .employee-file-review-actions-cell .danger-button,
  .employee-file-review-actions-cell .annual-review-download-menu {
    width: 100%;
  }

  .dialog {
    padding: 0;
  }

  .dialog-panel {
    width: min(100vw, 100%);
    max-width: none;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    padding: 14px 14px calc(22px + env(safe-area-inset-bottom));
  }

  .dialog-panel header,
  .dialog-panel footer {
    position: sticky;
    background: var(--surface);
    z-index: 2;
  }

  .dialog-panel header {
    top: 0;
    padding-bottom: 10px;
  }

  .dialog-panel footer {
    bottom: 0;
    padding-top: 10px;
    box-shadow: 0 -8px 18px rgba(17, 24, 39, 0.05);
  }

  .log-detail-table {
    max-height: none;
  }

  .login-page {
    min-height: 100dvh;
    padding: 16px;
  }

  .login-shell {
    width: 100%;
    padding: 0;
  }

  .login-card {
    width: 100%;
    padding: 22px;
    border-radius: var(--radius-lg);
  }

  .login-logo {
    width: 72px;
    height: 72px;
  }

  .login-card h1 {
    font-size: 1.35rem;
    text-align: center;
  }

  .login-links {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .balance-grid,
  .absence-card-grid,
  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
  }

  .day {
    min-height: 68px;
    padding: 3px 2px;
    border-radius: 8px;
  }

  .event {
    min-height: 16px;
    padding-inline: 3px;
    font-size: 0.48rem;
  }
}

@media print {
  .sidebar,
  .topbar-actions,
  .alert-band {
    display: none;
  }

  .app,
  .main {
    display: block;
    padding: 0;
  }

  .card,
  .stat,
  .table-wrap,
  .calendar,
  .profile-panel {
    box-shadow: none;
  }
}


.admin-pto-review {
  display: grid;
  gap: 16px;
}

.admin-pto-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 128px));
  justify-content: center;
  gap: 8px;
}

.admin-pto-filter-row {
  grid-template-columns:
    minmax(190px, 1.25fr)
    minmax(120px, 0.6fr)
    minmax(110px, 0.6fr)
    minmax(185px, 0.95fr)
    minmax(145px, 0.75fr)
    minmax(130px, 0.7fr)
    auto
    auto;
  gap: 8px;
  justify-content: stretch;
  align-items: end;
}

.admin-pto-filter-row label {
  min-width: 0;
}

.admin-pto-filter-row select {
  min-height: 36px;
  width: 100%;
  font-size: 0.86rem;
}

.admin-pto-filter-row .filter-actions {
  display: flex;
  align-items: end;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.admin-pto-filter-row .filter-actions button {
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .admin-pto-filter-row {
    grid-template-columns:
      minmax(180px, 1.2fr)
      minmax(115px, 0.7fr)
      minmax(110px, 0.7fr)
      minmax(175px, 1fr);
    justify-content: stretch;
  }

  .admin-pto-filter-row .filter-actions {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .admin-pto-filter-row {
    grid-template-columns: 1fr;
  }

  .admin-pto-filter-row .filter-actions {
    display: grid;
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .admin-pto-filter-row .filter-actions button {
    width: 100%;
  }
}

.admin-pto-summary-card {
  display: grid;
  gap: 6px;
  align-content: center;
  justify-items: center;
  text-align: center;
  width: 128px;
  min-height: 74px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  overflow: hidden;
}

.admin-pto-summary-card .category-badge {
  max-width: 100%;
  font-size: 0.68rem;
  padding: 3px 7px;
}

.admin-pto-summary-card strong {
  color: var(--brand-primary);
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.admin-pto-summary-card dl,
.admin-pto-summary-card div {
  display: grid;
  gap: 5px;
  margin: 0;
}

.admin-pto-summary-card div {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
}

.admin-pto-summary-card dt,
.admin-pto-summary-card dd {
  margin: 0;
}

.admin-pto-summary-card dt {
  color: var(--muted);
  font-weight: 700;
  min-width: 0;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.admin-pto-summary-card dd {
  color: var(--text);
  font-weight: 700;
  min-width: 0;
  font-size: 0.78rem;
  text-align: right;
}

.admin-pto-request-frame,
.report-result-frame {
  height: min(720px, calc(100vh - 360px));
  min-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
}

.admin-pto-request-frame table,
.report-result-frame table {
  min-width: 980px;
}

.admin-pto-request-frame thead th,
.report-result-frame thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface);
  box-shadow: inset 0 -1px 0 var(--line-strong), 0 2px 8px rgba(55, 79, 89, 0.08);
}

.pto-report-breakdown summary {
  cursor: pointer;
  color: var(--brand-primary);
  font-weight: 700;
  white-space: nowrap;
}

.pto-report-breakdown ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.timesheet-report-frame {
  min-height: 360px;
}

.timesheet-report-frame .timesheet-report-table {
  min-width: 1180px;
  table-layout: fixed;
  font-size: 0.72rem;
}

.timesheet-report-table th,
.timesheet-report-table td {
  padding: 8px 7px;
  line-height: 1.28;
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.timesheet-report-table th {
  text-align: center;
  white-space: normal;
}

.timesheet-report-table td {
  white-space: normal;
}

.timesheet-report-table .person {
  gap: 7px;
  min-width: 0;
}

.timesheet-report-table .person .avatar {
  width: 30px;
  height: 30px;
  font-size: 0.68rem;
  flex: 0 0 30px;
}

.timesheet-report-table .person strong,
.timesheet-report-table .person .meta {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.timesheet-report-table .badge {
  justify-content: center;
  min-width: 0;
  white-space: nowrap;
  font-size: 0.66rem;
  padding: 4px 7px;
}

.timesheet-report-table .report-status-cell,
.timesheet-report-table .report-action-cell {
  text-align: center;
}

.timesheet-report-table .report-number-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timesheet-report-table .ts-report-employee { width: 18%; }
.timesheet-report-table .ts-report-month { width: 7%; }
.timesheet-report-table .ts-report-year { width: 8%; }
.timesheet-report-table .ts-report-period { width: 9%; }
.timesheet-report-table .ts-report-status { width: 8%; }
.timesheet-report-table .ts-report-number { width: 7%; }
.timesheet-report-table .ts-report-number-small { width: 6%; }
.timesheet-report-table .ts-report-person { width: 10%; }
.timesheet-report-table .ts-report-action { width: 4%; }

.report-result-frame {
  margin-top: 12px;
}

@media (max-width: 768px) {
  .main,
  .view,
  .view > *,
  .card,
  .table-wrap,
  .toolbar,
  .toolbar > *,
  .toolbar-between,
  .filter-row,
  .button-row,
  .segmented-control {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: 1fr;
  }

  .segmented-control button {
    justify-content: center;
    width: 100%;
  }

  .payroll-timesheet-filter-row--embedded {
    grid-template-columns: 1fr;
    margin: 0 10px 12px;
    padding: 10px;
  }

  .payroll-timesheet-filter-row--embedded .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .payroll-timesheet-filter-row--embedded .compact-button {
    width: 100%;
  }

  .nightly-backup-row {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: auto;
  }

  .nightly-backup-row input[type="time"],
  .nightly-backup-row input[type="number"] {
    justify-self: start;
    width: 100%;
  }

  .nightly-backup-toggle .toggle-control,
  .backup-size-control {
    justify-self: start;
  }

  .backup-size-control {
    width: 100%;
  }

  .nightly-backup-checkboxes {
    display: grid;
    justify-self: stretch;
    justify-content: stretch;
    gap: 8px;
  }

  .checkbox-label {
    justify-content: flex-start;
  }

  .backup-storage-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .annual-review-info .detail-list,
  .annual-review-section > label,
  .annual-review-final-comments {
    grid-template-columns: 1fr;
  }

  .admin-pto-request-frame,
  .report-result-frame {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .annual-review-list-frame {
    max-height: none;
    overflow: visible;
  }

  .admin-pto-request-frame table,
  .report-result-frame table,
  .annual-review-list-frame table,
  .users-table-wrap table,
  table {
    min-width: 0;
  }

  .table-wrap thead,
  .table-wrap th {
    display: none;
  }

  .table-wrap tbody {
    width: 100%;
  }

  .table-wrap tr,
  .table-wrap td {
    width: 100%;
    max-width: 100%;
  }

  .table-wrap .person {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .annual-review-admin-grid {
    grid-template-columns: 1fr;
  }

  .annual-review-matrix-wrap {
    overflow-x: auto;
    padding: 0;
  }

  .annual-review-matrix-wrap .annual-review-matrix {
    display: table;
    min-width: 880px;
    table-layout: fixed;
    width: 100%;
  }

  .annual-review-matrix-wrap .annual-review-matrix colgroup {
    display: table-column-group;
  }

  .annual-review-matrix-wrap .annual-review-matrix col {
    display: table-column;
  }

  .annual-review-matrix-wrap .annual-review-matrix thead {
    clip: auto;
    display: table-header-group;
    height: auto;
    overflow: visible;
    position: static;
    width: auto;
  }

  .annual-review-matrix-wrap .annual-review-matrix tbody {
    display: table-row-group;
    padding: 0;
    width: auto;
  }

  .annual-review-matrix-wrap .annual-review-matrix tr {
    background: transparent;
    border: 0;
    border-radius: 0;
    display: table-row;
    overflow: visible;
    width: auto;
  }

  .annual-review-matrix-wrap .annual-review-matrix th,
  .annual-review-matrix-wrap .annual-review-matrix td {
    display: table-cell;
    max-width: none;
    width: auto;
  }

  .annual-review-matrix-wrap .annual-review-matrix td {
    border-bottom: 1px solid var(--line);
    grid-template-columns: none;
  }

  .annual-review-matrix-wrap .annual-review-matrix td::before {
    display: none;
  }

  .annual-review-matrix-wrap .annual-review-matrix th:nth-child(n + 2),
  .annual-review-matrix-wrap .annual-review-matrix td:nth-child(n + 2),
  .annual-review-matrix-wrap .annual-review-matrix .annual-review-rating-column {
    min-width: 140px;
    max-width: 140px;
    text-align: center;
    width: 140px;
  }
}

@media (max-width: 420px) {
  .login-page {
    padding: 10px;
  }

  .login-card {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  .settings-card,
  .settings-subsection,
  .email-template-panel,
  .notification-detail-editor,
  .final-sweep-management,
  .annual-review-section,
  .annual-review-admin-override {
    padding: 12px;
    border-radius: var(--radius);
  }

  .settings-list div,
  .detail-list div {
    grid-template-columns: 1fr;
    gap: 3px;
    padding-block: 9px;
  }

  .settings-list dd,
  .detail-list dd {
    text-align: left;
    overflow-wrap: normal;
    word-break: normal;
  }

  .filter-row label,
  .form-grid label,
  .settings-form-grid label,
  .email-template-panel label,
  .annual-review-section label {
    min-width: 0;
  }

  .report-result-frame .table-wrap,
  .admin-pto-request-frame .table-wrap,
  .annual-review-list-frame {
    overflow: visible;
  }

  .report-result-frame table,
  .admin-pto-request-frame table,
  .timesheet-report-frame .timesheet-report-table {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .report-result-frame tbody,
  .admin-pto-request-frame tbody {
    display: grid;
    gap: 12px;
    padding: 10px;
  }

  .report-result-frame tr,
  .admin-pto-request-frame tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
  }

  .report-result-frame td,
  .admin-pto-request-frame td {
    display: grid;
    grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .report-result-frame td:last-child,
  .admin-pto-request-frame td:last-child {
    border-bottom: 0;
  }

  .report-result-frame td::before,
  .admin-pto-request-frame td::before {
    content: attr(data-label);
    color: var(--brand-primary-light);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .report-result-frame td[colspan],
  .admin-pto-request-frame td[colspan] {
    grid-template-columns: 1fr;
  }

  .report-result-frame td[colspan]::before,
  .admin-pto-request-frame td[colspan]::before {
    display: none;
  }

  .calendar-nav button,
  .calendar-nav .ghost-button {
    min-height: 44px;
  }

  .day > strong {
    color: var(--brand-primary);
    font-size: 0.85rem;
  }

  .day .event + .event {
    margin-top: 0;
  }

  .annual-review-toolbar-actions,
  .annual-review-download-menu,
  .annual-review-download-options {
    width: 100%;
  }

  .annual-review-download-options {
    position: static;
    margin-top: 8px;
  }

  .annual-review-response-field {
    gap: 7px;
  }

  .annual-review-matrix-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    -webkit-overflow-scrolling: touch;
  }

  .dialog-panel footer .button-row,
  .dialog-panel footer .dialog-actions {
    gap: 8px;
  }

  .pto-report-breakdown summary {
    white-space: normal;
  }

  .mobile-contact-row,
  .directory-contact-line {
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 430px) {
  .main {
    padding-inline: 10px;
  }

  .mobile-header {
    padding-inline: 10px;
  }

  .table-wrap td,
  .report-result-frame td,
  .admin-pto-request-frame td,
  .employee-list-cell {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .table-wrap td::before,
  .report-result-frame td::before,
  .admin-pto-request-frame td::before,
  .employee-list-cell::before {
    margin-bottom: 0;
  }

  .dashboard-balance-grid {
    grid-template-columns: repeat(2, minmax(0, min(155px, calc((100% - 7px) / 2))));
    justify-content: center;
    gap: 7px;
  }

  .dashboard-balance-grid .balance-card {
    width: 100%;
    height: auto;
    min-width: 0;
    max-width: 155px;
    max-height: none;
    padding: 8px 7px;
    gap: 5px;
    min-height: min(155px, calc((100vw - 31px) / 2));
  }

  .dashboard-balance-grid .balance-card strong {
    font-size: clamp(0.98rem, 4.6vw, 1.14rem);
  }

  .dashboard-balance-grid .pto-gauge-ring {
    width: min(118px, 90%);
  }

  .dashboard-balance-grid .pto-gauge-ring::after {
    inset: 8px;
  }

  .dashboard-balance-grid .pto-gauge-center {
    width: calc(100% - 28px);
    gap: 1px;
  }

  .dashboard-balance-grid .pto-gauge-badge .badge {
    min-height: 20px;
    max-width: 88px;
    padding: 3px 6px;
    font-size: 0.55rem;
  }

  .dashboard-balance-grid .pto-gauge-center strong {
    font-size: clamp(1.2rem, 6vw, 1.58rem);
  }

  .dashboard-balance-grid .pto-gauge-center .pto-gauge-total {
    font-size: 0.48rem;
  }

  .dashboard-balance-grid .balance-breakdown {
    font-size: 0.66rem;
  }

  .work-hours-chart {
    grid-template-columns: repeat(6, minmax(36px, 1fr));
    gap: 5px;
  }

  .work-hours-week {
    grid-template-rows: 64px auto auto auto auto;
    padding: 7px 4px;
  }

  .work-hours-week strong {
    font-size: 0.72rem;
  }

  .work-hours-week-label {
    font-size: 0.66rem;
  }

  .work-hours-date-range {
    font-size: 0.58rem;
  }

  .work-hours-status {
    font-size: 0.54rem;
  }

  .dashboard-balance-grid .badge {
    font-size: 0.62rem;
    padding-inline: 6px;
  }

  .directory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .directory-card {
    min-height: 218px;
    grid-template-rows: 52px minmax(20px, auto) minmax(36px, auto) 18px minmax(42px, auto);
    gap: 5px;
    padding: 9px 6px;
  }

  .directory-title {
    min-height: 0;
    font-size: 0.64rem;
    line-height: 1.18;
  }

  .directory-name {
    font-size: 0.68rem;
    line-height: 1.08;
  }

  .directory-avatar {
    width: 50px;
    height: 50px;
  }

  .directory-contact-list {
    gap: 4px;
    width: 100%;
  }

  .directory-contact-line {
    min-height: 28px;
    gap: 4px;
    grid-template-columns: 22px minmax(0, 1fr);
    font-size: 0.6rem;
  }

  .directory-contact-icon {
    width: 22px;
    height: 22px;
  }

  .directory-contact-icon .icon {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 359px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .directory-card {
    min-height: 0;
    grid-template-rows: auto;
    padding: 13px;
  }

  .directory-contact-line {
    font-size: 0.66rem;
  }
}

.vehicle-reservation-page {
  gap: 18px;
}

.vehicle-reservation-card .dashboard-card-header h2 {
  margin: 0;
  color: #fff;
}

.vehicle-reservation-card .dashboard-card-header p {
  color: rgba(255, 255, 255, 0.86);
}

.vehicle-reservation-form {
  padding: 18px;
}

.vehicle-reservation-schedule-card {
  padding: 18px;
}

.vehicle-reservation-schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.vehicle-reservation-schedule-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft-surface);
}

.vehicle-reservation-schedule-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.vehicle-reservation-date-list {
  display: grid;
  gap: 8px;
}

.vehicle-reservation-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbe3e7;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.vehicle-reservation-date-row > span:first-child {
  min-width: 0;
  overflow-wrap: break-word;
}

.vehicle-availability {
  padding: 10px 12px;
  border: 1px solid #dbe3e7;
  border-radius: 10px;
  background: #f8fafc;
}

.success-text {
  color: #166534;
}

.danger-text {
  color: #991b1b;
}

.warning-text {
  color: #9a3412;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #dbe3e7;
  background: #f8fafc;
  color: #374f59;
  white-space: nowrap;
}

.status-pill.success {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #166534;
}

.status-pill.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.status-pill.danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.actions-cell {
  min-width: 230px;
}

.actions-cell .ghost-button,
.actions-cell .primary-button,
.actions-cell .danger-button {
  margin: 2px;
  padding: 8px 10px;
  font-size: 0.78rem;
}

.vehicle-reservation-policy-dialog .dialog-panel {
  width: min(94vw, 760px);
  max-width: 760px;
  max-height: 90vh;
  overflow: hidden;
  box-sizing: border-box;
}

.vehicle-reservation-policy-dialog #requestDetailFields {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(90vh - 92px);
  padding-right: 2px;
}

.vehicle-reservation-policy-dialog .dialog-panel > footer {
  display: none;
}

.vehicle-reservation-policy-modal,
.vehicle-reservation-policy-modal * {
  box-sizing: border-box;
}

.vehicle-reservation-policy-modal {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.vehicle-reservation-policy-modal h3,
.vehicle-reservation-policy-modal h4 {
  margin: 0;
  color: #374f59;
}

.vehicle-reservation-policy-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.vehicle-reservation-policy-section,
.vehicle-reservation-policy-documentation,
.vehicle-reservation-policy-signature {
  width: 100%;
  max-width: 100%;
}

.vehicle-reservation-policy-list {
  margin: 0;
  padding-left: 20px;
}

.vehicle-reservation-policy-list li {
  margin-bottom: 8px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.vehicle-reservation-policy-hold-harmless {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(55, 79, 89, 0.18);
  border-radius: 10px;
  background: rgba(55, 79, 89, 0.04);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.vehicle-reservation-policy-agreement,
.vehicle-reservation-policy-radio {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  line-height: 1.4;
  cursor: pointer;
  color: var(--brand-primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.vehicle-reservation-policy-agreement input,
.vehicle-reservation-policy-radio input {
  width: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  flex: 0 0 16px !important;
  margin: 3px 0 0 !important;
  padding: 0 !important;
  border-radius: initial;
}

.vehicle-reservation-policy-agreement span,
.vehicle-reservation-policy-radio span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.vehicle-reservation-policy-documentation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(55, 79, 89, 0.22);
  border-radius: 10px;
  overflow: visible;
}

.vehicle-reservation-policy-documentation legend {
  padding: 0 6px;
  font-weight: 700;
  color: #374f59;
}

.vehicle-reservation-policy-help {
  margin: 0;
  line-height: 1.45;
  color: #5f6f86;
  overflow-wrap: anywhere;
}

.vehicle-reservation-policy-upload {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.vehicle-reservation-policy-upload input[type="file"] {
  width: 100%;
  max-width: 100%;
}

.vehicle-reservation-policy-signature {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vehicle-reservation-policy-signature-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.vehicle-reservation-policy-signature-fields label {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vehicle-reservation-policy-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.hidden {
  display: none !important;
}

.vehicle-reservation-event {
  background: #e8f1f4;
  border-color: #9eb7c1;
  color: #274753;
}

.onoff-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  width: 100%;
}

.onoff-settings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.onoff-type-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.onoff-type-tab {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 9px 14px;
  font-weight: 700;
  min-height: 40px;
}

.onoff-type-tab.active {
  background: var(--primary);
  color: #fff;
}

.onoff-field-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.onoff-field-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.onoff-field-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.onoff-field-card-header h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.onoff-field-card-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.onoff-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  padding-top: 12px;
  min-width: 0;
}

.onoff-field-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.onoff-field-control span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.onoff-field-control input,
.onoff-field-control select,
.onoff-field-control textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.onoff-field-control textarea {
  resize: vertical;
}

.onoff-field-control-wide {
  grid-column: span 2;
}

.onoff-field-control-full {
  grid-column: 1 / -1;
}

.onoff-empty-state {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: #fff;
}

@media (max-width: 720px) {
  .vehicle-reservation-form {
    padding: 14px;
  }

  .vehicle-reservation-policy-dialog .dialog-panel {
    width: min(96vw, 760px);
    max-height: 92vh;
  }

  .vehicle-reservation-policy-dialog #requestDetailFields {
    max-height: calc(92vh - 88px);
  }

  .vehicle-reservation-policy-signature-fields {
    grid-template-columns: 1fr;
  }

  .vehicle-reservation-policy-actions {
    flex-direction: column-reverse;
    justify-content: stretch;
  }

  .vehicle-reservation-policy-actions button {
    width: 100%;
  }

  .actions-cell {
    min-width: 0;
  }

  .onoff-settings-toolbar,
  .onoff-field-card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .onoff-type-tabs,
  .onoff-settings-toolbar button {
    width: 100%;
  }

  .onoff-type-tab {
    flex: 1;
  }

  .onoff-field-grid {
    grid-template-columns: 1fr;
  }

  .onoff-field-control-wide,
  .onoff-field-control-full {
    grid-column: auto;
  }
}

/* Inventory uses a wide operational table; preserve columns and scroll the table area. */
.inventory-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.inventory-summary-grid .summary-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.inventory-summary-grid .summary-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.inventory-summary-grid .summary-card strong {
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.2;
}

.inventory-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.inventory-filter-grid label {
  min-width: 0;
}

.inventory-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-inline: contain;
}

.inventory-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.35;
}

.inventory-table th,
.inventory-table td {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  vertical-align: middle;
  padding: 9px 10px;
}

.inventory-table .inventory-asset-cell { width: 8%; }
.inventory-table .inventory-type-cell { width: 8%; }
.inventory-table .inventory-equipment-cell { width: 18%; }
.inventory-table .inventory-release-cell { width: 8%; }
.inventory-table .inventory-serial-cell { width: 9%; }
.inventory-table .inventory-status-cell { width: 8%; }
.inventory-table .inventory-assigned-cell { width: 11%; }
.inventory-table .inventory-condition-cell { width: 8%; }
.inventory-table .inventory-value-cell { width: 10%; }
.inventory-table .inventory-additional-cell { width: 10%; }
.inventory-table .inventory-actions-cell { width: 12%; }

.inventory-table th,
.inventory-table .inventory-asset-cell,
.inventory-table .inventory-type-cell,
.inventory-table .inventory-release-cell,
.inventory-table .inventory-serial-cell,
.inventory-table .inventory-status-cell,
.inventory-table .inventory-condition-cell {
  white-space: nowrap;
}

.inventory-sort-button {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 700;
  gap: 4px;
  justify-content: flex-start;
  line-height: 1.2;
  max-width: 100%;
  padding: 0;
  text-align: left;
}

.inventory-sort-indicator {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1;
}

.inventory-cell-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.inventory-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.inventory-status-available {
  background: #dcfce7;
  color: #166534;
}

.inventory-status-assigned {
  background: #e5e7eb;
  color: #374151;
}

.inventory-status-repair {
  background: #fef3c7;
  color: #92400e;
}

.inventory-status-lost {
  background: #fee2e2;
  color: #991b1b;
}

.inventory-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}

.inventory-type-chip .icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.inventory-equipment-media {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inventory-product-image.thumb,
.inventory-product-placeholder.thumb {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  object-fit: cover;
}

.inventory-product-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.inventory-product-placeholder .icon {
  width: 18px;
  height: 18px;
}

.inventory-product-image.detail,
.inventory-product-placeholder.detail {
  width: 120px;
  height: 90px;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.inventory-image-fields,
.inventory-buyout-reset {
  min-width: 0;
}

.inventory-image-fields {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.inventory-image-fields h3 {
  margin: 0;
}

.inventory-buyout-reset {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-equipment-name {
  display: block;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: break-word;
  word-break: normal;
}

.inventory-equipment-meta {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  line-height: 1.25;
}

.inventory-additional-cell-text {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.inventory-actions-cell {
  min-width: 0;
}

.inventory-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  width: auto;
}

.inventory-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 28px;
  padding: 4px 6px;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
  word-break: normal;
  flex: 0 0 auto;
}

.inventory-action-button .icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.inventory-dialog {
  width: fit-content;
  max-width: calc(100vw - 28px);
}

.inventory-return-transfer-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  width: min(100%, 260px);
  margin: 2px 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.inventory-return-transfer-menu label {
  display: block;
  min-width: 0;
  margin: 0;
}

.inventory-return-transfer-menu input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.inventory-return-transfer-menu span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
  line-height: 1.1;
  white-space: nowrap;
}

.inventory-return-transfer-menu input:checked + span {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.inventory-return-transfer-menu input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.inventory-return-transfer-panel {
  width: min(92vw, 620px);
}

.inventory-return-transfer-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inventory-return-transfer-fields textarea {
  min-height: 96px;
}

@media (max-width: 1100px) {
  .inventory-table-wrap {
    overflow-x: auto;
  }

  .inventory-table {
    min-width: 920px;
  }
}

.inventory-dialog-panel {
  width: min(94vw, 880px);
  max-height: min(92vh, 900px);
}

.inventory-dialog [hidden] {
  display: none !important;
}

.inventory-view-dialog-panel {
  width: min(94vw, 820px);
}

.inventory-detail-list {
  margin-bottom: 0;
}

.inventory-dialog-panel-compact {
  width: min(92vw, 640px);
}

.inventory-dialog-panel header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.inventory-dialog-panel header h2,
.inventory-dialog-item {
  margin: 0;
}

.inventory-dialog-item {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.inventory-form-grid select[multiple] {
  min-height: 116px;
}

.inventory-custom-fields-heading {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.inventory-custom-fields-heading h3 {
  margin: 0;
}

.inventory-custom-field-settings {
  display: block;
}

.inventory-custom-field-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.inventory-custom-field-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.inventory-custom-field-card [hidden] {
  display: none !important;
}

.inventory-accessory-fieldset {
  min-width: 0;
  margin: 0;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.inventory-assignment-condition {
  align-self: start;
}

.inventory-accessory-fieldset legend {
  padding: 0 4px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.inventory-accessory-checkboxes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.inventory-accessory-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
}

.inventory-accessory-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 18px;
}

.inventory-accessory-checkbox span {
  overflow-wrap: anywhere;
}

.inventory-history-dialog-panel {
  width: min(94vw, 820px);
}

.inventory-history-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.inventory-history-list > li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.inventory-history-event-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.inventory-history-event-header time,
.inventory-history-list p {
  color: var(--muted);
  font-size: 0.82rem;
}

.inventory-history-list p {
  margin: 6px 0 0;
}

.inventory-history-notes {
  color: var(--text) !important;
}

.inventory-history-changes {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.inventory-history-changes > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
}

.inventory-history-changes dt {
  color: var(--muted);
  font-weight: 700;
}

.inventory-history-changes dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .inventory-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .inventory-summary-grid .summary-card {
    min-height: 68px;
    padding: 10px 12px;
  }

  .inventory-summary-grid .summary-card:first-child {
    grid-column: 1 / -1;
  }

  .inventory-filter-grid {
    grid-template-columns: 1fr;
  }

  .inventory-table-wrap {
    overflow-x: visible;
  }

  .inventory-table {
    display: block;
    min-width: 0;
    border: 0;
    font-size: 0.86rem;
  }

  .inventory-table thead {
    display: none;
  }

  .inventory-table tbody {
    display: grid;
    gap: 12px;
  }

  .inventory-table tr {
    display: grid;
    gap: 0;
    padding: 12px;
    border: 1px solid rgba(188, 183, 173, 0.58);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  }

  .inventory-table td {
    display: grid;
    grid-template-columns: minmax(86px, 0.38fr) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    width: 100% !important;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid rgba(188, 183, 173, 0.28);
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .inventory-table td:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .inventory-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .inventory-table .inventory-equipment-cell {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .inventory-table .inventory-equipment-cell::before {
    margin-bottom: 0;
  }

  .inventory-equipment-media {
    align-items: flex-start;
  }

  .inventory-product-image.thumb,
  .inventory-product-placeholder.thumb {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .inventory-cell-text {
    overflow: visible;
    text-overflow: initial;
  }

  .inventory-status-badge {
    min-width: 0;
    justify-self: start;
  }

  .inventory-actions {
    justify-content: flex-start;
    gap: 6px;
  }

  .inventory-action-button {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 0.72rem;
  }

  .inventory-accessory-checkboxes {
    grid-template-columns: 1fr;
  }

  .inventory-dialog-panel,
  .inventory-dialog-panel-compact,
  .inventory-history-dialog-panel {
    width: 100vw;
    max-width: 100vw;
    min-height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .inventory-return-transfer-menu {
    width: 100%;
  }

  .inventory-return-transfer-fields {
    grid-template-columns: 1fr;
  }

  .inventory-history-event-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .inventory-history-changes > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}


/* Dashboard compact card redesign */
.dashboard-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-top: 8px;
}

.dashboard-card-grid .dashboard-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 392px;
  padding: 0 !important;
  border: 1px solid rgba(188, 183, 173, 0.5);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
  overflow: hidden;
}

.dashboard-card-grid .dashboard-card-header {
  position: static;
  display: flex !important;
  flex-direction: row;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px;
  height: 58px;
  min-height: 58px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 0;
  border-bottom: 1px solid rgba(188, 183, 173, 0.45);
  background: rgba(248, 250, 252, 0.92);
  color: var(--text);
  text-align: left;
  overflow: visible;
}

.dashboard-card-grid .dashboard-card-title-block {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 2px;
  min-width: 0;
  max-width: none;
  text-align: left;
}

.dashboard-card-grid .dashboard-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-align: left;
  text-transform: none;
}

.dashboard-card-grid .dashboard-card-title-icon {
  display: inline-flex;
  color: var(--brand-primary);
}

.dashboard-card-grid .dashboard-card-title-icon .icon {
  width: 17px;
  height: 17px;
}

.dashboard-card-grid .dashboard-card-title-block .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
  text-align: left;
}

.dashboard-card-grid .dashboard-card-header-action {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-card-grid .dashboard-card-header-action .compact-button,
.dashboard-card-grid .dashboard-card-footer .compact-button,
.dashboard-task-actions .task-action-button {
  min-height: 30px;
  padding: 6px 9px;
  gap: 5px;
  border-radius: 10px;
  font-size: 0.76rem;
  line-height: 1.1;
  white-space: nowrap;
}

.dashboard-card-grid .dashboard-card-header-action .compact-button .icon,
.dashboard-card-grid .dashboard-card-footer .compact-button .icon,
.dashboard-task-actions .task-action-button .icon {
  width: 14px;
  height: 14px;
}

.dashboard-card-grid .dashboard-card-body {
  flex: 1 1 auto;
  display: block;
  min-height: 0;
  padding: 14px 16px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.dashboard-card-grid .dashboard-card-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
}

.dashboard-card-grid .dashboard-time-off-card .dashboard-time-off-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 12px 16px 10px;
  overflow: hidden;
}

.dashboard-card-grid .dashboard-time-off-card .dashboard-card-footer {
  flex: 0 0 auto;
  gap: 7px;
  padding: 9px 16px 12px;
}

.dashboard-card-grid .dashboard-time-off-card .dashboard-card-footer .compact-button {
  flex: 1 1 145px;
  justify-content: center;
  min-height: 29px;
  padding-block: 6px;
}

.dashboard-card-grid .dashboard-card-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(188, 183, 173, 0.38);
  background: rgba(248, 250, 252, 0.68);
}

.dashboard-list-stack,
.dashboard-card-grid .staff-bulletin-list {
  display: grid;
  gap: 9px;
}

.dashboard-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(188, 183, 173, 0.42);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.035);
}

.dashboard-list-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-list-main strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.dashboard-list-main span,
.dashboard-list-main small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.dashboard-list-side {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
  max-width: 45%;
}

.dashboard-task-actions {
  justify-content: flex-end;
  gap: 5px;
  margin: 0;
}

.dashboard-task-actions:empty {
  display: none;
}

.dashboard-card-grid .staff-bulletin-notice {
  gap: 7px;
  padding: 10px 11px;
  border-radius: 14px;
}

.dashboard-card-grid .staff-bulletin-notice-head {
  gap: 8px;
}

.dashboard-card-grid .staff-bulletin-notice h3 {
  margin-top: 3px;
  font-size: 0.86rem;
  line-height: 1.2;
}

.dashboard-card-grid .staff-bulletin-notice p {
  font-size: 0.78rem;
  line-height: 1.38;
}

.dashboard-card-grid .staff-bulletin-priority {
  min-height: 19px;
  padding: 2px 7px;
  font-size: 0.62rem;
}

.dashboard-card-grid .staff-bulletin-actions .ghost-button,
.dashboard-card-grid .staff-bulletin-actions .danger-button {
  min-height: 28px;
  padding: 5px 7px;
  gap: 4px;
  font-size: 0.72rem;
}

.dashboard-card-grid .staff-bulletin-editor {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
}

.dashboard-empty-state,
.staff-bulletin-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed rgba(188, 183, 173, 0.7);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.68);
  color: var(--muted);
  text-align: center;
}

.dashboard-compact-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.dashboard-time-off-card .dashboard-compact-balance-grid {
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  align-content: start;
  gap: 6px;
  min-height: 0;
  margin-top: 0;
}

.dashboard-time-off-body.dashboard-balance-count-1 .dashboard-compact-balance-grid,
.dashboard-time-off-body.dashboard-balance-count-2 .dashboard-compact-balance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-time-off-body.dashboard-balance-count-3 .dashboard-compact-balance-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-time-off-body.dashboard-balance-count-4 .dashboard-compact-balance-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-compact-balance {
  display: grid;
  align-items: center;
  align-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 68px;
  padding: 7px 6px;
  border: 1px solid rgba(188, 183, 173, 0.46);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.dashboard-time-off-card .dashboard-compact-balance {
  min-height: 56px;
  padding: 5px 6px;
  gap: 2px;
}

.dashboard-compact-balance:hover,
.dashboard-compact-balance.active {
  border-color: rgba(55, 79, 89, 0.34);
  box-shadow: 0 8px 18px rgba(55, 79, 89, 0.08);
  transform: translateY(-1px);
}

.dashboard-compact-balance .badge {
  justify-content: center;
  min-height: 18px;
  max-width: 100%;
  padding: 3px 7px;
  font-size: 0.56rem;
  line-height: 1;
}

.dashboard-time-off-card .dashboard-compact-balance .badge {
  min-height: 17px;
  padding: 3px 7px;
  font-size: 0.53rem;
}

.dashboard-compact-balance strong {
  color: var(--brand-primary);
  font-size: clamp(0.82rem, 1.1vw, 0.94rem);
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.dashboard-time-off-card .dashboard-compact-balance strong {
  font-size: clamp(0.78rem, 1vw, 0.9rem);
}

.dashboard-compact-balance small {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.dashboard-time-off-card .dashboard-compact-balance small {
  font-size: 0.5rem;
}

.dashboard-balance-mini-detail {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(188, 183, 173, 0.38);
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.78);
}

.dashboard-time-off-card .dashboard-balance-mini-detail {
  flex: 0 0 auto;
  gap: 6px;
  padding: 7px;
}

.dashboard-balance-mini-detail > span {
  justify-self: start;
}

.dashboard-balance-mini-detail dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
  margin: 0;
}

.dashboard-time-off-card .dashboard-balance-mini-detail dl {
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
}

.dashboard-balance-mini-detail div {
  display: grid;
  gap: 2px;
  padding: 6px 7px;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.dashboard-time-off-card .dashboard-balance-mini-detail div {
  padding: 5px 6px;
}

.dashboard-balance-mini-detail dt {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.15;
}

.dashboard-time-off-card .dashboard-balance-mini-detail dt {
  font-size: 0.55rem;
}

.dashboard-balance-mini-detail dd {
  margin: 0;
  color: var(--brand-primary);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
}

.dashboard-time-off-card .dashboard-balance-mini-detail dd {
  font-size: 0.74rem;
}

.dashboard-card-grid .absence-card-grid {
  grid-template-columns: 1fr;
  justify-content: stretch;
  gap: 9px;
}

.dashboard-card-grid .absence-card {
  grid-template-rows: none;
  justify-items: stretch;
  aspect-ratio: auto;
  min-height: 0;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  align-content: center;
}

.dashboard-card-grid .absence-avatar,
.dashboard-card-grid .absence-card .avatar {
  width: 34px;
  height: 34px;
  font-size: 0.72rem;
}

.dashboard-card-grid .absence-card-main {
  justify-items: start;
  gap: 3px;
}

.dashboard-card-grid .absence-card strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.18;
}

.dashboard-card-grid .absence-card-main span {
  color: var(--muted);
  font-size: 0.71rem;
  font-weight: 700;
  line-height: 1.25;
}



/* Focused dashboard task summary rows */
.dashboard-task-row {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dashboard-task-row:hover,
.dashboard-task-row:focus-visible {
  border-color: rgba(55, 79, 89, 0.34);
  box-shadow: 0 8px 18px rgba(55, 79, 89, 0.08);
  outline: none;
  transform: translateY(-1px);
}

.dashboard-task-row .dashboard-list-side {
  max-width: 36%;
}

.task-focused-row {
  outline: 2px solid rgba(55, 79, 89, 0.34);
  outline-offset: 2px;
  background: rgba(55, 79, 89, 0.045);
}

@media (max-width: 1150px) {
  .dashboard-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dashboard-card-grid .dashboard-card {
    height: auto;
    min-height: 0;
    border-radius: 18px;
  }

  .dashboard-card-grid .dashboard-card-header {
    height: auto;
    min-height: 56px;
    padding: 11px 13px;
  }

  .dashboard-card-grid .dashboard-card-title {
    font-size: 0.94rem;
  }

  .dashboard-card-grid .dashboard-card-body {
    padding: 12px 13px;
    max-height: none;
  }

  .dashboard-list-row,
  .dashboard-card-grid .absence-card {
    align-items: flex-start;
  }

  .dashboard-list-side {
    justify-items: start;
    max-width: none;
  }

  .dashboard-task-row {
    flex-direction: column;
  }

  .dashboard-compact-balance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .dashboard-card-grid .dashboard-card-header {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .dashboard-card-grid .dashboard-card-header-action {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-compact-balance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-card-grid .dashboard-card-footer {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .dashboard-compact-balance-grid {
    grid-template-columns: 1fr;
  }
}

.inventory-upload-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.inventory-image-fields input[type="file"] {
  padding: 9px;
  background: var(--surface);
}

.inventory-detail-image-hero {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0 18px;
  min-height: 92px;
}

.inventory-detail-image-hero .inventory-product-image.detail,
.inventory-detail-image-hero .inventory-product-placeholder.detail,
.inventory-upload-preview .inventory-product-image.detail,
.inventory-upload-preview .inventory-product-placeholder.detail {
  width: min(260px, 70vw);
  height: min(190px, 42vw);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.inventory-existing-photo-panel {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.inventory-existing-photo-panel summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.inventory-existing-photo-tools {
  margin: 10px 0;
}

.inventory-existing-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.inventory-existing-photo-option {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.inventory-existing-photo-option:hover,
.inventory-existing-photo-option:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(55, 79, 89, 0.12);
}

.inventory-existing-photo-option img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.inventory-existing-photo-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.78rem;
  line-height: 1.25;
}

.inventory-existing-photo-empty {
  margin: 10px 0 0;
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 35, 45, 0.05);
}

.project-list-card {
  min-height: 0;
  gap: 12px;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 79, 89, 0.14);
}

.project-card-main,
.project-info-strip,
.project-history-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.project-card-main {
  align-items: flex-start;
}

.project-card-main > div,
.project-task-main,
.project-category-title {
  min-width: 0;
}

.project-card small,
.project-task-preview,
.project-history-table-wrap small,
.project-drawer-meta dd,
.project-category-header small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.project-meta-grid,
.project-list-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.project-meta-grid span,
.project-list-meta span,
.project-info-strip span,
.project-summary-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-surface);
}

.project-meta-grid b,
.project-list-meta b,
.project-info-strip b,
.project-summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-card-progress {
  display: grid;
  gap: 5px;
  margin-top: auto;
}

.project-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 4px 0 18px;
}

.project-detail-header h2 {
  margin: 12px 0 4px;
}

.project-header-actions {
  justify-content: flex-end;
  max-width: 560px;
}

.project-back-button {
  margin-left: auto;
  min-height: 40px;
}

.project-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.project-header-meta span {
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-surface);
}

.project-header-meta b {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.project-summary-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(4, minmax(115px, 0.75fr));
  gap: 12px;
  margin: 8px 0 18px;
}

.project-summary-primary {
  padding: 16px;
}

.project-summary-primary p {
  margin: 6px 0 12px;
  color: var(--muted);
}

.project-stat-card {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
}

.project-summary-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 1.35rem;
}

.project-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf0;
}

.project-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.project-progress-bar.complete span {
  background: #2f7d4f;
}

.project-progress-bar.active span {
  background: #3f7fd6;
}

.project-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.project-status-not-started,
.project-due-not-started,
.project-due-no-due-date {
  background: #eef1f3;
  color: #33454d;
}

.project-status-in-progress,
.project-due-on-time {
  background: #e4efff;
  color: #255a9c;
}

.project-status-on-hold,
.project-due-completed-late {
  background: #fff3d7;
  color: #7a4b00;
}

.project-status-completed,
.project-due-completed-on-time {
  background: #e1f5ea;
  color: #17633b;
}

.project-due-overdue {
  background: #ffe4e4;
  color: #9f1d1d;
}

.project-priority-low {
  background: #eef1f3;
  color: #33454d;
}

.project-priority-normal {
  background: #e4efff;
  color: #255a9c;
}

.project-priority-high {
  background: #fff3d7;
  color: #7a4b00;
}

.project-priority-urgent {
  background: #ffe4e4;
  color: #9f1d1d;
}

.project-info-strip {
  align-items: stretch;
  flex-wrap: wrap;
  margin: 12px 0;
}

.project-info-strip span {
  flex: 1 1 150px;
}

.project-category-stack {
  display: grid;
  gap: 12px;
}

.project-category-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.project-category-section.dragging {
  opacity: 0.65;
}

.project-category-section.drag-over {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(55, 79, 89, 0.2);
}

.project-category-header {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.project-category-header:focus-visible {
  outline: 3px solid rgba(55, 79, 89, 0.22);
  outline-offset: -3px;
}

.project-category-title strong {
  margin: 0;
  font-size: 1rem;
}

.project-category-count {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.project-category-caret {
  width: 1.25rem;
  color: var(--accent);
  font-weight: 800;
}

.project-category-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.project-category-drag-handle:hover,
.project-category-drag-handle:focus-visible {
  background: #eef1f3;
  color: var(--accent);
}

.project-category-drag-handle:active {
  cursor: grabbing;
}

.project-category-drag-handle.disabled {
  cursor: default;
  opacity: 0.35;
}

.project-category-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 12px 0;
}

.project-task-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.project-task-table-wrap,
.project-history-table-wrap {
  overflow-x: auto;
}

.project-task-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.project-task-table th,
.project-task-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.project-task-title {
  min-width: 220px;
  white-space: normal;
  overflow-wrap: break-word;
}

.project-task-row {
  display: grid;
  grid-template-columns: 28px minmax(110px, 140px) minmax(220px, 1fr) minmax(150px, 210px) minmax(130px, 150px) minmax(90px, 120px);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.project-task-row:hover,
.project-task-row:focus-visible,
.project-task-row.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(55, 79, 89, 0.12);
}

.project-task-row.dragging {
  opacity: 0.62;
}

.project-task-row.drag-over {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(55, 79, 89, 0.22);
}

.project-task-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.project-task-drag-handle:hover,
.project-task-drag-handle:focus-visible {
  background: #eef1f3;
  color: var(--accent);
}

.project-task-drag-handle:active {
  cursor: grabbing;
}

.project-task-drag-handle.disabled {
  cursor: default;
  opacity: 0.35;
}

.project-task-main strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-task-preview {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-owner-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 7px;
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.project-owner-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 0.72rem;
}

.micro-avatar {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid #fff;
  font-size: 0.62rem;
}

.project-supporter-avatars {
  display: flex;
  align-items: center;
  margin-top: 4px;
  padding-left: 2px;
}

.project-supporter-avatars .micro-avatar + .micro-avatar,
.project-avatar-more {
  margin-left: -6px;
}

.project-avatar-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #eef1f3;
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 800;
}

.project-task-due {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.project-task-due.overdue > span {
  color: #9f1d1d;
  font-weight: 800;
}

.project-task-status-select,
.project-task-check .compact-select {
  width: 100%;
  min-width: 0;
  font-size: 0.82rem;
}

.project-task-status {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.project-subtask-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef1f3;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.project-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.25);
}

.project-task-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 81;
  display: flex;
  flex-direction: column;
  width: clamp(560px, 50vw, 780px);
  max-width: 96vw;
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.22);
}

.project-task-drawer header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.project-task-drawer header h2 {
  margin: 4px 0 0;
}

.project-read-only-label {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef1f3;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.project-drawer-body {
  display: grid;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 20px 24px;
  overflow-y: auto;
}

.project-drawer-body h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.project-drawer-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}

.project-drawer-form label,
.project-drawer-form .project-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.project-drawer-form input,
.project-drawer-form select,
.project-drawer-form textarea {
  width: 100%;
  max-width: 100%;
}

.project-task-drawer .project-drawer-form input,
.project-task-drawer .project-drawer-form select {
  min-height: 40px;
}

.project-task-drawer .project-drawer-form select[multiple] {
  min-height: 126px;
  max-height: 154px;
}

.project-task-drawer .project-drawer-form textarea {
  min-height: 92px;
  resize: vertical;
}

.project-task-drawer .project-form-actions {
  justify-content: flex-end;
}

.project-task-drawer-footer {
  flex: 0 0 auto;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06);
}

.project-drawer-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.project-drawer-meta div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-surface);
}

.project-drawer-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-drawer-meta dd {
  margin: 3px 0 0;
}

.project-subtasks-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfd;
}

.project-subtasks-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-subtasks-header h3 {
  margin: 0 0 6px;
}

.project-subtask-progress {
  display: grid;
  gap: 6px;
  min-width: min(260px, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.project-subtask-list {
  display: grid;
  gap: 8px;
}

.project-subtask-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.project-subtask-row.completed .project-subtask-main strong {
  text-decoration: line-through;
  color: var(--muted);
}

.project-subtask-row input[type="checkbox"],
.project-subtask-readonly-check,
.project-subtask-checkbox-spacer {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.project-subtask-readonly-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #17633b;
  background: #fff;
}

.project-subtask-readonly-check.checked {
  border-color: #2f7d4f;
  background: #e1f5ea;
}

.project-subtask-main {
  min-width: 0;
}

.project-subtask-main strong,
.project-subtask-main span,
.project-subtask-main small {
  display: block;
}

.project-subtask-main span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: break-word;
}

.project-subtask-main small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.project-subtask-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.project-subtask-actions .mini-action {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
}

.project-subtask-actions .mini-action.danger {
  color: #9f1d1d;
}

.project-subtask-row.editing {
  align-items: stretch;
}

.project-subtask-edit-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-subtask-edit-fields input,
.project-subtask-edit-fields textarea,
.project-subtask-add-form input,
.project-subtask-add-form textarea {
  width: 100%;
}

.project-subtask-add-form {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.project-subtask-add-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.project-supporter-list {
  display: grid;
  gap: 8px;
}

.project-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.project-form-grid label,
.project-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.project-form-grid input,
.project-form-grid select,
.project-form-grid textarea {
  width: 100%;
}

.project-inline-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-inline-control select {
  min-width: 0;
  flex: 1 1 auto;
}

.project-inline-control .compact-button {
  flex: 0 0 auto;
  padding-inline: 10px;
  white-space: nowrap;
}

.project-inline-category-creator {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft-surface);
}

.project-inline-category-creator[hidden] {
  display: none;
}

.project-category-message {
  min-height: 1.2em;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.project-settings-category-list {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
}

.project-settings-category-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.2fr) minmax(180px, 1.6fr) 90px auto auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft-surface);
}

.project-settings-active {
  align-self: center;
}

.project-form-wide,
.project-form-actions {
  grid-column: 1 / -1;
}

.project-dialog {
  width: min(92vw, 820px);
  border: 0;
  padding: 0;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(14, 31, 39, 0.24);
}

.project-dialog::backdrop {
  background: rgba(17, 24, 39, 0.46);
}

.project-dialog-panel {
  position: relative;
  padding: 22px;
  background: var(--surface);
  border-radius: inherit;
}

.project-history-list {
  display: grid;
  gap: 8px;
}

.project-history-list.compact {
  gap: 6px;
}

.project-history-list div {
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-surface);
}

.project-task-link-row td {
  background: #fbfdff;
}

.settings-field-group {
  display: grid;
  gap: 8px;
}

.settings-field-label {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
}

.settings-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-surface);
}

.settings-checkbox-grid .checkbox-field {
  min-height: 32px;
  margin: 0;
}

@media (max-width: 1200px) {
  .project-summary-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-summary-primary {
    grid-column: 1 / -1;
  }

  .project-task-row {
    grid-template-columns: 28px minmax(100px, 130px) minmax(200px, 1fr) minmax(130px, 170px) minmax(110px, 130px);
  }

  .project-task-status {
    display: none;
  }
}

@media (max-width: 900px) {
  .project-task-drawer {
    width: min(92vw, 680px);
  }
}

@media (max-width: 720px) {
  .project-card-grid,
  .project-summary-layout,
  .project-form-grid {
    grid-template-columns: 1fr;
  }

  .project-detail-header,
  .project-task-row,
  .project-drawer-form {
    grid-template-columns: 1fr;
  }

  .project-header-actions {
    justify-content: flex-start;
  }

  .project-task-drawer {
    width: 100vw;
    max-width: 100vw;
  }

  .project-dialog {
    width: 96vw;
  }

  .project-dialog-panel {
    padding: 18px;
  }

  .project-info-strip {
    display: grid;
  }

  .project-inline-control,
  .project-settings-category-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}
