:root {
  --bg: #f7f5f3;
  --bg-gradient:
    radial-gradient(at 0% 0%, rgba(243, 239, 234, 0.85) 0, transparent 55%),
    radial-gradient(at 100% 0%, rgba(235, 229, 223, 0.7) 0, transparent 55%),
    radial-gradient(at 50% 100%, rgba(247, 245, 243, 0.95) 0, transparent 55%);
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.75);
  --surface-warm: #ebe5df;
  --text: #2a2421;
  --text-secondary: #574f4a;
  --muted: #8c827a;
  --border: #e4ddd6;
  --border-subtle: #ede7e1;
  --border-glass: rgba(255, 255, 255, 0.65);
  --accent: #b96d49;
  --accent-hover: #a85a37;
  --accent-soft: rgba(185, 109, 73, 0.1);
  --sidebar: 250px;
  --link-color: #b96d49;
  --link-hover-color: #8f4829;
  font-family:
    "Plus Jakarta Sans",
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  color-scheme: light;
}
.theme-canvas {
  background-color: var(--bg);
  background-image: var(--bg-gradient, none);
  color: var(--text);
  min-height: 100vh;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
a {
  color: var(--link-color, #cbd5e1);
  text-decoration: none;
}
a:hover {
  color: var(--link-hover-color, #ffffff);
  text-decoration: underline;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 19px;
  height: 19px;
  flex: none;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 750;
  color: var(--accent);
  margin: 0 0 8px;
  text-transform: uppercase;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.8px;
  margin-bottom: 9px;
  font-weight: 750;
  color: var(--text);
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
  margin-bottom: 14px;
  font-weight: 700;
  color: var(--text);
}
h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
p {
  margin-bottom: 14px;
  color: var(--text-secondary);
}
strong {
  font-weight: 650;
  color: var(--text);
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
  background: transparent;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
  background: var(--surface-glass, rgba(255, 255, 255, 0.78));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-glass, rgba(226, 232, 240, 0.8));
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.02);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.6px;
  padding: 4px 6px;
  border-radius: 12px;
  margin-bottom: 22px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer--left .brand {
  display: none;
}
.brand:hover {
  text-decoration: none;
  transform: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #b96d49 0%, #a85a37 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(185, 109, 73, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand:hover .brand-mark {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 18px rgba(185, 109, 73, 0.5);
  transform: scale(1.05);
}
.brand-mark .icon {
  width: 20px;
  height: 20px;
  transition: transform 0.25s ease;
}
.brand:hover .brand-mark .icon {
  transform: scale(1.1);
}
.brand-name {
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.5px;
}
.nav-section {
  margin: 24px 8px 10px;
}
.nav-caption {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}
.main-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  white-space: nowrap;
}
.nav-link::before {
  display: none;
}
.nav-link:hover {
  background: rgba(235, 229, 223, 0.6);
  color: var(--text);
  transform: none;
  text-decoration: none;
}
.nav-link .icon {
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}
.nav-link:hover .icon {
  transform: scale(1.1);
  color: var(--accent);
}
.nav-link.is-active {
  background: #ebe5df;
  border-color: #dfd7ce;
  color: #2a2421;
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(42, 36, 33, 0.04);
}
.nav-link.is-active::before {
  display: none;
}
.nav-link.is-active .icon {
  color: #ea580c;
  filter: drop-shadow(0 0 5px rgba(234, 88, 12, 0.3));
}
.sidebar-user-container {
  position: relative;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.sidebar-user-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.sidebar-user-card:hover {
  background: #f7f5f3;
  border-color: #d8d0c7;
  transform: none;
  box-shadow: 0 4px 12px rgba(42, 36, 33, 0.06);
  text-decoration: none;
}
.user-card-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, #b96d49 0%, #a85a37 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(185, 109, 73, 0.25);
  transition: transform 0.2s ease;
}
.sidebar-user-card:hover .user-card-avatar {
  transform: scale(1.05);
}
.user-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}
.user-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.user-card-name {
  display: block;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}
.user-card-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  width: fit-content;
}
.user-card-tag--role {
  background: #f3efea;
  color: #b96d49;
  border: 1px solid rgba(185, 109, 73, 0.2);
  text-transform: capitalize;
}
.sidebar-user-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.12);
  z-index: 50;
}
.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: #b96d49;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}
.panel-user-heading {
  flex: 1;
  min-width: 0;
}
.panel-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.panel-role-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  padding: 1px 6px;
  border-radius: 6px;
  margin-top: 2px;
}
.panel-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}
.panel-details-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}
.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}
.detail-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  margin: 0;
}
.detail-label .icon {
  width: 13px;
  height: 13px;
  color: #64748b;
}
.detail-value {
  color: var(--text);
  font-weight: 600;
  margin: 0;
  text-align: right;
}
.id-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.2);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 650;
}
.panel-footer {
  margin-top: 2px;
}
.signout-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #e11d48;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.signout-btn:hover {
  background: #ffe4e6;
  border-color: #fda4af;
  color: #be123c;
  transform: none;
  box-shadow: 0 4px 10px rgba(225, 29, 72, 0.15);
}
.signout-btn .icon {
  width: 14px;
  height: 14px;
}
.workspace {
  min-width: 0;
  background: transparent;
}
.topbar {
  height: 70px;
  border-bottom: 1px solid var(--border-glass, rgba(226, 232, 240, 0.8));
  background: var(--surface-glass, rgba(255, 255, 255, 0.78));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 60;
}
.topbar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar-brand {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.topbar-title {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #b96d49 0%, #a85a37 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(185, 109, 73, 0.25);
}
main {
  padding: 32px;
  max-width: 1280px;
  margin: auto;
  width: 100%;
  min-width: 0;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.page-header p:last-child {
  margin-bottom: 0;
  font-size: 13px;
}
.page-header > .actions:only-child,
.page-header > .button:only-child {
  margin-left: auto;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.button,
button[type="submit"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #b96d49;
  border: 1px solid #a85a37;
  border-radius: 12px;
  min-height: 40px;
  padding: 9px 16px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    0 1px 3px rgba(185, 109, 73, 0.25),
    0 2px 6px rgba(185, 109, 73, 0.15);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  background: #a85a37;
  border-color: #974e2d;
  transform: none;
  box-shadow: 0 4px 14px rgba(185, 109, 73, 0.32);
  text-decoration: none;
  color: #ffffff;
}
/* Explicit primary variant. Kept unlayered/unimportant so that scoped brand
   variants (e.g. .project-btn-primary in projects.css) can still override it. */
.button--primary {
  background: #b96d49;
  color: #ffffff;
  border: 1px solid #a85a37;
  border-radius: 12px;
  box-shadow:
    0 1px 3px rgba(185, 109, 73, 0.25),
    0 2px 6px rgba(185, 109, 73, 0.15);
}
.button--primary:hover {
  background: #a85a37;
  border-color: #974e2d;
  box-shadow: 0 4px 14px rgba(185, 109, 73, 0.32);
}
.button--secondary {
  background: #ffffff !important;
  color: #2a2421 !important;
  border: 1px solid #e4ddd6 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(42, 36, 33, 0.03) !important;
}
.button--secondary:hover {
  background: #f7f5f3 !important;
  color: #2a2421 !important;
  border-color: #d8d0c7 !important;
  box-shadow: 0 2px 8px rgba(42, 36, 33, 0.05) !important;
}
.button--small {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 12px;
  border-radius: 10px;
}
.button--danger {
  background: #fdf2f2 !important;
  color: #a83a3a !important;
  border: 1px solid #f8d7d7 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(168, 58, 58, 0.05) !important;
}
.button--danger:hover {
  background: #fbe6e6 !important;
  color: #8e2b2b !important;
  border-color: #f3bebe !important;
}
.button--ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent !important;
  border: 1px solid var(--border) !important;
  color: var(--text-secondary) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  min-height: 38px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.button--ghost:hover {
  background: var(--surface-warm) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e4ddd6;
  border-radius: 12px;
  color: #574f4a;
  flex: none;
  box-shadow: 0 1px 3px rgba(42, 36, 33, 0.03);
  transition: all 0.15s ease;
}
.icon-button:hover {
  background: #f7f5f3;
  border-color: #d8d0c7;
  color: #2a2421;
  transform: none;
}
.card {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(42, 36, 33, 0.04);
  margin-bottom: 24px;
  padding: 24px;
  color: var(--text);
}
.card--table {
  padding: 0;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(42, 36, 33, 0.04);
  overflow: hidden;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #ede7e1;
}
.card-heading h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.count-pill {
  font-size: 11px;
  background: #ede7e1;
  border: 1px solid #e4ddd6;
  border-radius: 20px;
  padding: 3px 10px;
  color: #574f4a;
  font-weight: 600;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.metric {
  margin: 0;
  padding: 20px;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow:
    0 1px 3px 0 rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(15, 23, 42, 0.02);
  color: var(--text);
}
.metric-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.metric-label .icon {
  color: var(--accent);
}
.metric-value {
  display: block;
  font-size: 28px;
  letter-spacing: -0.8px;
  margin: 10px 0 4px;
  font-weight: 750;
  color: var(--text);
}
.metric-note {
  font-size: 11px;
  color: var(--muted);
}
.counts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 11px;
}
.counts strong {
  color: #ffffff;
  margin-left: 5px;
}
.filter-bar {
  position: relative;
  z-index: 40;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  margin-bottom: 22px;
}
.filter-bar:has(.standard-filter-disclosure[open]) {
  z-index: 50;
}
.filter-field {
  min-width: 150px;
  flex: 1;
  max-width: 240px;
}
.filter-field--search {
  flex: 2;
  max-width: none;
}
.filter-bar label {
  font-size: 10px;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 650;
}
.filter-bar label.sr-only,
.standard-filter-bar label.sr-only {
  margin: 0;
}
.filter-bar input:not([type="checkbox"]):not([type="radio"]),
.filter-bar select {
  margin: 0;
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}
.filter-bar .button {
  height: 40px;
  min-height: 40px;
  box-sizing: border-box;
}
.filter-bar .standard-filter-reset {
  height: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.field {
  margin-bottom: 17px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-secondary);
  margin: 0 0 7px;
}
input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  color: #0f172a;
  background: #ffffff;
  font-size: 13px;
  min-height: 40px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}
input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
select option {
  background-color: #ffffff;
  color: #0f172a;
}
textarea {
  resize: vertical;
  min-height: 106px;
  line-height: 1.6;
}
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}
.field-help {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 0;
}
.legacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.table-scroll::-webkit-scrollbar {
  height: 8px;
}
.table-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.table-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}
.data-table th {
  background: rgba(247, 245, 243, 0.85);
  color: #8c827a;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 650;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0eae4;
  color: #2a2421;
  vertical-align: middle;
}
.data-table tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr {
  transition: background-color 0.15s ease;
}
.data-table tbody tr:hover {
  background: rgba(247, 245, 243, 0.6);
}
.data-table th.sticky-actions,
.data-table td.sticky-actions {
  position: static;
  border-left: none;
  box-shadow: none;
}
.data-table th.sticky-actions {
  z-index: auto;
  background: transparent;
}
.data-table td.sticky-actions {
  z-index: auto;
  background: transparent;
}
.data-table tbody tr:hover > td.sticky-actions {
  background: transparent;
}

.person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.person .avatar {
  width: 32px;
  height: 32px;
  background: #ede7e1;
  border: 1px solid #e4ddd6;
  color: #574f4a;
}
.person strong {
  display: block;
  color: var(--text);
}
.subline {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  padding: 4px 11px;
  line-height: 1.3;
  font-size: 11.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.15s ease;
}
.badge .icon {
  width: 12px;
  height: 12px;
  flex: none;
}
.badge--emerald {
  background: rgba(229, 240, 234, 0.85);
  border-color: #c5dfc3;
  color: #2d5a43;
}
.badge--amber {
  background: rgba(251, 241, 228, 0.85);
  border-color: #f6dcba;
  color: #8a5818;
}
.badge--rose {
  background: rgba(250, 234, 234, 0.85);
  border-color: #f5c6c6;
  color: #8e3838;
}
.badge--sky {
  background: rgba(233, 239, 245, 0.85);
  border-color: #c9d6e2;
  color: #3d5467;
}
.badge--error {
  background: rgba(250, 234, 234, 0.85);
  border-color: #f5c6c6;
  color: #8e3838;
}
.badge--slate {
  background: rgba(241, 237, 232, 0.85);
  border-color: #d8d0c7;
  color: #5e5650;
}
.badge--outline {
  background: rgba(255, 255, 255, 0.85);
  border-color: #e4ddd6;
  color: #5e5650;
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
}
.pagination-pages {
  color: var(--muted);
  font-size: 11px;
}
.empty {
  padding: 42px 20px;
  text-align: center;
}
.empty p {
  max-width: 450px;
  margin: 0 auto 17px;
  font-size: 12px;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #d4a373;
  background: rgba(255, 255, 255, 0.03);
}
.flash {
  border: 1px solid #a7f3d0;
  color: #065f46;
  background: #ecfdf5;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.flash a {
  color: #047857;
  font-weight: 600;
  text-decoration: underline;
}
.flash.alert {
  color: #9f1239;
  border-color: #fecdd3;
  background: #fff1f2;
}
.notice {
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 18px;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.tabs a,
.tab {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
}
.tabs a:hover,
.tab:hover {
  background: #f8fafc;
  color: var(--text);
  border-color: #cbd5e1;
  text-decoration: none;
}
.tabs a.is-active,
.tab.is-active {
  background: #4f46e5;
  border-color: #4338ca;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.dashboard-tab.is-active,
.dashboard-tab.is-active:hover,
.dashboard-tab.is-active:focus {
  background-color: #b96d49 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
.dashboard-tab:hover {
  text-decoration: none !important;
}
.legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 18px 0 24px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  font-size: 12px;
}
/* Vertical Monthly Calendar Layout */
.monthly-calendars-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}
.calendar-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.03),
    0 4px 12px rgba(15, 23, 42, 0.02);
}
.calendar-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.calendar-person-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.calendar-counts-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.calendar-counts-summary strong {
  color: var(--text);
}
.count-divider {
  color: #cbd5e1;
}
.calendar-compliance-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.compliance-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.compliance-value {
  font-size: 17px;
  font-weight: 750;
  color: #059669;
}
.calendar-month-view {
  width: 100%;
}
.calendar-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 6px;
}
.weekday-header {
  padding: 8px 0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  background: transparent;
  border: 0;
}
.weekday-header--weekend {
  color: #94a3b8;
}
.calendar-day-header {
  padding: 0;
  text-align: center;
  font-weight: normal;
  border: 0;
  background: transparent;
}
.calendar-cell-empty {
  padding: 0;
  background: transparent;
  border: 0;
}
.calendar-day-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.15s ease;
}
.calendar-day-box:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}
.matrix th,
.matrix td {
  padding: 6px 2px;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  min-width: 34px;
}
.matrix thead th {
  background: rgba(247, 245, 243, 0.85);
  color: var(--muted);
  font-weight: 600;
  padding: 8px 2px;
  position: relative;
  z-index: 10;
}
.matrix tbody td {
  position: relative;
  z-index: 1;
}
.matrix th small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: #8c827a;
}
.matrix .sticky-person {
  position: sticky;
  left: 0;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
  text-align: left;
  padding: 12px 14px;
  background: #ffffff;
  border-right: 1px solid var(--border);
  z-index: 20;
}
.matrix thead .sticky-person {
  background: #f7f5f3;
  z-index: 30;
}
.matrix .sticky-compliance {
  position: sticky;
  left: 240px;
  width: 75px;
  min-width: 75px;
  max-width: 75px;
  text-align: center;
  background: #ffffff;
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 8px -2px rgba(42, 36, 33, 0.08);
  z-index: 20;
}
.matrix thead .sticky-compliance {
  background: #f7f5f3;
  box-shadow: 4px 0 8px -2px rgba(42, 36, 33, 0.08);
  z-index: 30;
}
.matrix .compliance-cell {
  width: 75px;
  min-width: 75px;
  max-width: 75px;
  font-weight: 650;
}
.matrix .compliance-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.matrix .compliance-badge--high {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.matrix .compliance-badge--medium {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.matrix .compliance-badge--low {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.matrix .compliance-badge--na {
  background-color: #f5f5f4;
  color: #78716c;
  border: 1px solid #e7e5e4;
  font-weight: 550;
  font-size: 10.5px;
}
.matrix th.weekend,
.matrix th.is-saturday {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border-left: 1px solid rgba(245, 158, 11, 0.25) !important;
  border-right: 1px solid rgba(245, 158, 11, 0.25) !important;
}
.matrix th.is-sunday {
  background-color: #ffedd5 !important;
  color: #9a3412 !important;
  border-left: 1px solid rgba(234, 88, 12, 0.2) !important;
  border-right: 1px solid rgba(234, 88, 12, 0.2) !important;
}
.matrix td.weekend,
.matrix td.is-saturday {
  background-color: #fffbeb !important;
  border-left: 1px solid rgba(245, 158, 11, 0.2) !important;
  border-right: 1px solid rgba(245, 158, 11, 0.2) !important;
}
.matrix td.is-sunday {
  background-color: #fff7ed !important;
  border-left: 1px solid rgba(234, 88, 12, 0.15) !important;
  border-right: 1px solid rgba(234, 88, 12, 0.15) !important;
}
.matrix th.is-weekday {
  background-color: #f8fafc;
  color: #334155;
}
.matrix th.is-past {
  color: #a8a29e;
}
.matrix th.is-today {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  font-weight: 700 !important;
  border-left: 1px solid #7dd3fc !important;
  border-right: 1px solid #7dd3fc !important;
  border-top: 2px solid #0284c7 !important;
  box-shadow: none !important;
}
.matrix td.is-today {
  background-color: #f0f9ff !important;
  border-left: 1px solid #bae6fd !important;
  border-right: 1px solid #bae6fd !important;
  box-shadow: none !important;
}
.standard-filter-today {
  cursor: pointer;
}
.calendar-cell {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: auto;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.calendar-cell .icon {
  width: 14px;
  height: 14px;
}
.calendar-cell:hover {
  transform: scale(1.12);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}
.calendar-cell:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}
.calendar-cell--emerald {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.calendar-cell--amber {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.calendar-cell--rose {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.calendar-cell--sky {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}
.calendar-cell--error {
  background: #faf5ff;
  color: #7e22ce;
  border-color: #e9d5ff;
}
.calendar-cell--slate {
  background: #f8fafc;
  color: #94a3b8;
  border-color: #f1f5f9;
}
.calendar-cell--indigo {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.calendar-cell--outline {
  background: #ffffff;
  color: #cbd5e1;
  border-color: #f1f5f9;
}
.matrix-caption {
  font-size: 11px;
  color: var(--muted);
  padding: 15px 20px;
  margin: 0;
}
html.overlay-open,
html.overlay-open body,
body.overlay-open {
  overflow: hidden !important;
  height: 100% !important;
  overscroll-behavior: none !important;
}
dialog {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
dialog:not([open]) {
  display: none !important;
}
dialog::backdrop {
  background: rgba(28, 25, 23, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity 0.2s ease-out;
}
.modal {
  width: min(560px, calc(100vw - 28px));
  max-height: min(85vh, calc(100dvh - 40px));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal .dialog-header {
  flex-shrink: 0;
}
.modal .dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.modal[open] {
  animation: modal-enter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal--calendar-inspection,
#monthly-calendar-modal {
  width: min(880px, calc(100vw - 32px));
  max-width: 880px;
  max-height: calc(100dvh - 32px);
}
.drawer {
  margin: 0 0 0 auto;
  width: min(576px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  max-width: 100vw;
  border-radius: 24px 0 0 24px;
  border: 0;
  border-left: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}
.drawer--left {
  margin: 0 auto 0 0;
  width: min(320px, 85vw);
  height: 100dvh;
  max-height: 100dvh;
  max-width: 85vw;
  border-radius: 0 24px 24px 0;
  border: 0;
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 16px 0 48px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.drawer--left .dialog-header {
  flex-shrink: 0;
}
.drawer--left .dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.drawer--left[open] {
  animation: drawer-left-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes drawer-left-enter {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.drawer .dialog-body {
  height: calc(100dvh - 73px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.drawer #report_drawer,
.drawer .drawer-content,
.drawer .drawer-shell {
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer .drawer-scrollable {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer .drawer-actions,
.drawer .drawer-actions--sticky {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 10;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}
.drawer[open] {
  animation: drawer-enter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes drawer-enter {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.modal form input[type="text"],
.modal form input[type="email"],
.modal form input[type="date"],
.modal form input[type="search"],
.modal form input[type="number"],
.modal form select,
.modal form textarea,
.drawer form input[type="text"],
.drawer form input[type="email"],
.drawer form input[type="date"],
.drawer form input[type="search"],
.drawer form input[type="number"],
.drawer form select,
.drawer form textarea,
.dialog-body form input[type="text"],
.dialog-body form input[type="date"],
.dialog-body form select,
.dialog-body form textarea,
.project-form input[type="text"],
.project-form select,
.project-form textarea {
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.modal form input[type="text"]:focus,
.modal form input[type="email"]:focus,
.modal form input[type="date"]:focus,
.modal form input[type="search"]:focus,
.modal form input[type="number"]:focus,
.modal form select:focus,
.modal form textarea:focus,
.drawer form input[type="text"]:focus,
.drawer form input[type="email"]:focus,
.drawer form input[type="date"]:focus,
.drawer form input[type="search"]:focus,
.drawer form input[type="number"]:focus,
.drawer form select:focus,
.drawer form textarea:focus,
.dialog-body form input[type="text"]:focus,
.dialog-body form input[type="date"]:focus,
.dialog-body form select:focus,
.dialog-body form textarea:focus,
.project-form input[type="text"]:focus,
.project-form select:focus,
.project-form textarea:focus {
  border-color: #c2410c !important;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2) !important;
  outline: none !important;
}
.modal form label,
.drawer form label,
.dialog-body form label {
  margin-bottom: 0.375rem;
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: #57534e;
}
.field_with_errors input,
.field_with_errors select,
.field_with_errors textarea {
  border-color: #f87171 !important;
}
.field-error,
.form-field-error {
  color: #e11d48;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 2;
  color: var(--text);
}
.dialog-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.dialog-body {
  display: block;
  padding: 28px;
}
.drawer-loading {
  padding: 28px;
  color: var(--muted);
  font-size: 13px;
}
.report-header {
  margin-bottom: 20px;
}
.report-header h1 {
  font-size: 24px;
  color: var(--text);
}
.report-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 20px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.report-section .actions {
  margin-bottom: 12px;
}
.report-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 15px;
}
.report-text {
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.project-entry {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.project-entry:last-child {
  border: 0;
}
.assessment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.assessment-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: #1e293b;
}
.assessment-item strong {
  display: block;
  margin-bottom: 7px;
}
.history-entry {
  border-left: 2px solid rgba(92, 53, 32, 0.8);
  padding: 0 0 16px 13px;
  margin-left: 4px;
}
.history-entry p {
  font-size: 12px;
  margin-bottom: 6px;
}
details {
  margin: 16px 0;
}
summary {
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  padding: 8px 0;
  color: #f8fafc;
}
blockquote {
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid #5c3520;
  margin: 12px 0;
  font-size: 12px;
  color: #cbd5e1;
}
.unavailable {
  font-size: 11px;
  color: var(--muted);
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  margin-top: 12px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 21px;
}
fieldset {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 18px;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.015);
}
legend {
  font-size: 12px;
  font-weight: 700;
  padding: 0 7px;
  color: #f8fafc;
}
.radio-options {
  display: grid;
  gap: 10px;
}
.radio-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin: 0;
  cursor: pointer;
  font-weight: 400;
  background: rgba(255, 255, 255, 0.02);
}
.radio-option:has(input:checked) {
  border-color: rgba(92, 53, 32, 0.8);
  background: rgba(58, 31, 19, 0.4);
}
.radio-option input {
  margin-top: 4px;
  accent-color: var(--accent);
}
.radio-option strong {
  display: block;
  margin-bottom: 4px;
}
.definition-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}
.definition-list dt {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}
.definition-list dd {
  margin: 0;
  font-size: 13px;
}
.integration-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.integration-card h3 {
  margin-bottom: 5px;
}
.auth-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  padding: 0;
  margin: 0;
  background-color: var(--bg);
}
.auth-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]) {
  background-color: #faf8f5;
  color: #2a2421;
  border: 1px solid #e4ddd6;
  border-radius: 12px;
  font-size: 13px;
}
.auth-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"])::placeholder {
  color: #a89f97;
}
.auth-shell input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]):focus {
  border-color: #b96d49;
  outline: none;
  box-shadow: 0 0 0 2px rgba(185, 109, 73, 0.2);
}
.auth-shell .flash {
  background-color: #e6efe9 !important;
  border: 1px solid #c8ded0 !important;
  color: #2d5a43 !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  font-size: 12px !important;
  margin-bottom: 14px !important;
}
.auth-shell .flash.alert {
  background-color: #fbeeed !important;
  border-color: #f4d0cd !important;
  color: #8e3838 !important;
}
.google-sso-btn {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  color: #2a2421 !important;
  border: 1px solid #e4ddd6 !important;
  box-shadow: 0 1px 3px rgba(42, 36, 33, 0.05) !important;
}
.google-sso-btn:hover {
  background: #faf8f5 !important;
  color: #2a2421 !important;
  border-color: #d8cfc6 !important;
}
form:has(> .google-sso-btn),
form.button_to:has(> .google-sso-btn) {
  display: block !important;
  width: 100% !important;
}
.login {
  padding: 30px;
}
.login h1 {
  font-size: 27px;
}
.login .button,
.login input[type="submit"] {
  width: 100%;
}
.auth-brand {
  margin-bottom: 35px;
  justify-content: center;
}
.mobile-menu {
  display: none;
}
.skip-link {
  position: absolute;
  top: -70px;
  left: 20px;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  padding: 10px 20px;
  z-index: 100;
}
.skip-link:focus {
  top: 10px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.form-busy {
  opacity: 0.65;
}
form[aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}
@media (max-width: 1100px) {
  :root {
    --sidebar: 210px;
  }
  main {
    padding: 32px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .data-table td,
  .data-table th {
    padding-left: 14px;
    padding-right: 14px;
  }
  .metrics {
    gap: 12px;
  }
  .metric {
    padding: 16px;
  }
}
@media (max-width: 1023px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
  .mobile-menu {
    display: inline-grid;
  }
  .topbar {
    padding: 0 16px;
    height: 60px;
  }
}
@media (max-width: 760px) {
  .topbar-meta > span:first-child {
    display: none;
  }
  main {
    padding: 32px 16px;
  }
  .page-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
  }
  h1 {
    font-size: 25px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-field,
  .filter-field--search {
    min-width: 125px;
    max-width: none;
  }
  .filter-bar {
    padding: 15px;
    gap: 12px;
  }
  .legacy-grid,
  .assessment-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .card--table {
    padding: 0;
  }
  .counts {
    gap: 12px;
  }
  .drawer {
    width: 100%;
    max-width: 100vw;
    border-radius: 0;
  }
  .dialog-body {
    padding: 18px;
  }
  .dialog-header {
    padding: 16px 18px;
  }
  .matrix .sticky-person {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
  }
  .matrix .sticky-compliance {
    left: 150px;
    width: 75px;
    min-width: 75px;
    max-width: 75px;
  }
  .pagination {
    flex-wrap: wrap;
  }
  .page-header .actions {
    width: 100%;
  }
  .auth-shell {
    padding-top: 35px;
  }
  .sidebar-note {
    margin-top: 24px;
  }
  .identity {
    margin-top: 20px;
  }
  .definition-list {
    grid-template-columns: 1fr;
  }
  .data-table .wrap-cell {
    white-space: normal;
    min-width: 170px;
  }
}
@media (max-width: 639px) {
  .standard-filter-search {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
  .standard-filter-field {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
  .standard-filter-field select,
  .standard-filter-field input,
  .standard-filter-field button {
    width: 100% !important;
  }
  .standard-filter-disclosure,
  .standard-filter-reset {
    flex: 1 1 auto;
  }
  .data-table th {
    white-space: nowrap;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  .nav-link {
    transition: background-color 0.15s ease;
  }
  dialog[open] {
    animation: appear 0.15s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0.4;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
/* Bound every shared icon even when the surrounding layout changes. */
svg.icon {
  display: inline-block;
  width: 19px;
  height: 19px;
  max-width: 32px;
  max-height: 32px;
  vertical-align: middle;
  flex-shrink: 0;
}
.brand-mark {
  flex: none;
  overflow: hidden;
}
.brand svg {
  width: 22px;
  height: 22px;
  max-height: 32px;
}
.form-grid,
.settings-grid,
.integration-grid,
.leave-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.integration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.integration {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.03);
}
.leave-card .card-heading {
  padding: 0;
  border: 0;
  align-items: flex-start;
}
.leave-card .card-heading p {
  margin-bottom: 0;
}
.leave-card .report-text {
  min-height: 50px;
}
.modern-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.modern-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.modern-toggle-pill--active {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.modern-toggle-pill--inactive {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.modern-toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.modern-toggle-pill--active .modern-toggle-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}
.modern-toggle-pill--inactive .modern-toggle-dot {
  background: #94a3b8;
}

form.button_to {
  display: inline-flex;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
}

button[type="submit"].toggle-btn,
button[type="submit"].modern-toggle,
button.toggle-btn,
button.modern-toggle,
.modern-toggle,
.toggle-btn {
  all: unset;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 9999px !important;
  padding: 2px !important;
  margin: 0 !important;
  min-height: 0 !important;
  min-width: 0 !important;
  height: auto !important;
  width: auto !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  line-height: normal !important;
}

button[type="submit"].toggle-btn:hover,
button[type="submit"].modern-toggle:hover,
button.toggle-btn:hover,
button.modern-toggle:hover,
.modern-toggle:hover,
.toggle-btn:hover {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  opacity: 0.9;
}

button[type="submit"].toggle-btn:focus,
button[type="submit"].modern-toggle:focus,
button[type="submit"].toggle-btn:focus-visible,
button[type="submit"].modern-toggle:focus-visible,
button.toggle-btn:focus-visible,
button.modern-toggle:focus-visible {
  outline: none !important;
}

button.toggle-btn:focus-visible .modern-toggle-track,
button.modern-toggle:focus-visible .modern-toggle-track {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}

.modern-toggle-track,
.toggle-btn-track {
  position: relative;
  width: 48px;
  height: 26px;
  border-radius: 9999px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  padding: 2px;
  box-sizing: border-box;
}

.modern-toggle.is-enabled .modern-toggle-track,
.toggle-btn--on .toggle-btn-track {
  background: #ea580c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.modern-toggle.is-disabled .modern-toggle-track,
.toggle-btn--off .toggle-btn-track {
  background: #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modern-toggle-thumb,
.toggle-btn-thumb {
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 1px 2px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-toggle.is-enabled .modern-toggle-thumb,
.toggle-btn--on .toggle-btn-thumb {
  transform: translateX(22px);
}

.modern-toggle.is-disabled .modern-toggle-thumb,
.toggle-btn--off .toggle-btn-thumb {
  transform: translateX(0);
}

.modern-toggle-icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
}

.modern-toggle.is-enabled .modern-toggle-icon {
  color: #ea580c;
}

.modern-toggle.is-disabled .modern-toggle-icon {
  color: #94a3b8;
}

.settings-field-label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
  margin-bottom: 6px;
}

.settings-field-hint {
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
  margin-top: 5px;
  margin-bottom: 0;
}

.settings-field-input {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #94a3b8;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  background-color: #ffffff;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  box-sizing: border-box;
}

.settings-field-input:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.delivery-mode-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delivery-option-row {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
  transition: all 0.2s ease;
}

.delivery-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.delivery-option-title {
  font-size: 14px;
  font-weight: 650;
  color: #0f172a;
}

.delivery-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.delivery-radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.delivery-switch-track {
  background-color: #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.delivery-switch-thumb {
  transform: translateX(0);
}

.delivery-option-row .toggle-icon--check {
  display: none;
}

.delivery-option-row .toggle-icon--cross {
  display: block;
  color: #94a3b8;
}

.delivery-option-body {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

form:has(#daily_status_reminders_frequency option[value="custom_weekdays"]:checked)
  #custom-weekdays-picker {
  display: block !important;
}

/* Checked state transitions via container :has() when main toggle is ON */
.delivery-mode-container:not(.is-disabled):has(#delivery_target_group:checked)
  .delivery-option-row--group {
  border-color: #fdba74;
  background-color: #fffaf5;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_group:checked)
  .delivery-option-row--group
  .delivery-switch-track {
  background-color: #ea580c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_group:checked)
  .delivery-option-row--group
  .delivery-switch-thumb {
  transform: translateX(22px);
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_group:checked)
  .delivery-option-row--group
  .toggle-icon--check {
  display: block;
  color: #ea580c;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_group:checked)
  .delivery-option-row--group
  .toggle-icon--cross {
  display: none;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_group:checked)
  .delivery-option-row--group
  #group-email-field {
  display: block;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_group:checked)
  .delivery-option-row--individual
  #individual-email-info {
  display: none;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_individual:checked)
  .delivery-option-row--individual {
  border-color: #fdba74;
  background-color: #fffaf5;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_individual:checked)
  .delivery-option-row--individual
  .delivery-switch-track {
  background-color: #ea580c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_individual:checked)
  .delivery-option-row--individual
  .delivery-switch-thumb {
  transform: translateX(22px);
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_individual:checked)
  .delivery-option-row--individual
  .toggle-icon--check {
  display: block;
  color: #ea580c;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_individual:checked)
  .delivery-option-row--individual
  .toggle-icon--cross {
  display: none;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_individual:checked)
  .delivery-option-row--individual
  #individual-email-info {
  display: block;
}

.delivery-mode-container:not(.is-disabled):has(#delivery_target_individual:checked)
  .delivery-option-row--group
  #group-email-field {
  display: none;
}

/* Disabled state when main toggle is OFF / closed */
.delivery-mode-container.is-disabled {
  cursor: default;
}

.delivery-mode-container.is-disabled .delivery-option-header,
.delivery-mode-container.is-disabled .delivery-switch {
  opacity: 0.55;
  cursor: not-allowed !important;
  pointer-events: none !important;
  user-select: none !important;
}

.delivery-mode-container.is-disabled .delivery-option-row {
  background-color: #f8fafc;
  border-color: #e2e8f0;
}

.delivery-mode-container.is-disabled .delivery-switch-track {
  background-color: #cbd5e1 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.delivery-mode-container.is-disabled .delivery-switch-thumb {
  transform: translateX(0) !important;
}

.delivery-mode-container.is-disabled .toggle-icon--check {
  display: none !important;
}

.delivery-mode-container.is-disabled .toggle-icon--cross {
  display: block !important;
  color: #94a3b8 !important;
}

.delivery-mode-container.is-disabled .delivery-option-body {
  display: none !important;
}

.delivery-mode-container.is-disabled #group-email-field.is-editable-while-disabled {
  display: block !important;
  cursor: auto;
  pointer-events: auto;
  user-select: auto;
}

/* Focus ring for accessibility */
.delivery-switch:has(.delivery-radio-input:focus-visible) .delivery-switch-track {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
.mode-options {
  border: 0;
  padding: 0;
}
.mode-option {
  display: flex;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
}
.mode-option input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 4px 0;
  accent-color: var(--accent);
}
.mode-option:has(input:checked) {
  background: rgba(58, 31, 19, 0.4);
  border-color: rgba(92, 53, 32, 0.8);
}
.details-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  font-size: 13px;
  margin: 20px 0 28px;
}
.details-list dt {
  color: var(--muted);
}
.details-list dd {
  margin: 0;
}
.detail-summary {
  margin-bottom: 20px;
}
.work-entry {
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
  margin-bottom: 15px;
}
.assessment-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  margin: 20px 0;
}
.assessment-panel ul {
  list-style: disc;
  padding-left: 20px;
}
.history-item {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.history-item p {
  margin: 6px 0;
}
.report-detail h1 {
  font-size: 24px;
}
.report-detail .card {
  box-shadow: none;
}
.auth-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}
.login .brand {
  margin-bottom: 28px;
}
.login label {
  display: block;
}
.form-grid label {
  margin-top: 8px;
}
label input[type="radio"] {
  display: inline-block;
}
dialog {
  overflow-y: auto;
}
.mobile-navigation .brand {
  font-size: 20px;
}
@media (max-width: 760px) {
  .form-grid,
  .settings-grid,
  .integration-grid,
  .leave-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .details-list {
    grid-template-columns: 100px minmax(0, 1fr);
  }
  .calendar-cell {
    width: 32px;
    height: 32px;
  }
  .auth-shell {
    padding: 0;
  }
  .login {
    padding: 24px;
  }
  .dialog-body .page-header h1 {
    font-size: 22px;
  }
}
.modal {
  margin: auto;
}
.button--approve {
  background: #15803d !important;
  border-color: #15803d !important;
}
.button--approve:hover {
  background: #166534 !important;
}
.report-revision > .card-heading {
  padding: 0 0 16px;
}
.mode-options label {
  font-weight: 400;
}

#mobile-navigation {
  margin: 0 auto 0 0;
  width: min(330px, 92vw);
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0 12px 12px 0;
}

@media (min-width: 640px) and (max-width: 760px) {
  main {
    padding: 32px 24px;
  }
}

.data-table .wrap-cell {
  white-space: normal;
  min-width: 90px;
  max-width: 220px;
  overflow-wrap: anywhere;
}

.calendar-popover {
  position: fixed;
  margin: 0;
  width: min(340px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #121826;
  color: #f8fafc;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
}
.calendar-popover p {
  margin: 10px 0;
}
.calendar-popover .button {
  margin-top: 8px;
}
.calendar-cell:focus-visible {
  outline: 3px solid #5c3520;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .drawer,
  .modal,
  .calendar-popover {
    animation: none;
    transition: none;
  }
}

Historical Imports & Metric Card Components .metric-card {
  border: 1px solid var(--border);
  background: white;
  border-radius: 11px;
  box-shadow: 0 2px 4px #18293a03;
  margin: 0;
  padding: 16px 18px;
}

.metrics--compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric--compact {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.metric--compact .metric-label {
  gap: 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric--compact .metric-value {
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin: 6px 0 2px;
}

.metric--compact .metric-note {
  font-size: 10px;
  color: #8190a1;
}

.metric-value--success {
  color: #0f766e;
}

.metric-value--warning {
  color: #b45309;
}

.metric-value--danger {
  color: #be123c;
}

.workflow-card {
  margin-bottom: 22px;
}

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

.workflow-header h2 {
  margin: 0;
  font-size: 15px;
}

.workflow-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  margin-bottom: 14px;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.confirm-box {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.confirm-box.is-ready {
  background: #f0fdfa;
  border-color: #a7d7ca;
}

.mode-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 12px 0 16px;
}

@media (max-width: 820px) {
  .mode-cards-grid {
    grid-template-columns: 1fr;
  }
}

.mode-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.mode-card:hover {
  border-color: #94a3b8;
}

.mode-card:has(input:checked) {
  border-color: var(--accent);
  background: #f0fdfa;
  box-shadow: 0 0 0 1px var(--accent);
}

.mode-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.mode-card-radio {
  margin-top: 2px;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  flex: none;
}

.mode-card-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.mode-mapping-table {
  width: 100%;
  font-size: 11px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0;
}

.mode-mapping-table th,
.mode-mapping-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.mode-mapping-table tr:last-child th,
.mode-mapping-table tr:last-child td {
  border-bottom: 0;
}

.mode-mapping-table th {
  color: var(--muted);
  font-weight: 600;
  width: 40%;
  background: rgba(248, 250, 252, 0.6);
}

.mode-mapping-table td {
  color: var(--text);
  font-weight: 550;
}

.mode-example-box {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.choice-card:hover {
  border-color: #94a3b8;
}

.choice-card:has(input:checked) {
  background: #f0fdfa;
  border-color: #5baca1;
}

.choice-card input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
}

.safety-help-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  margin-top: 14px;
  overflow: hidden;
}

.safety-help-details summary {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 650;
  color: #475569;
  background: #f1f5f9;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.safety-help-details summary:hover {
  background: #e2e8f0;
}

.safety-help-content {
  padding: 14px 16px;
  font-size: 12px;
  color: #475569;
  line-height: 1.6;
}

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

.format-guide-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11px;
}

.format-guide-item strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

.table-select {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 32px;
  height: 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  width: 100%;
}

.table-select--mapping {
  max-width: 320px;
}

.table-select--decision {
  max-width: 220px;
}

.row--attention {
  background: #fffdf5 !important;
}

.row--invalid {
  background: #fef2f2 !important;
}

.text-danger {
  color: #be123c !important;
}

.text-warning {
  color: #b45309 !important;
}

.text-success {
  color: #0f766e !important;
}

.raw-details {
  margin: 3px 0 0;
}

.raw-details summary {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  padding: 2px 0;
  cursor: pointer;
}

.raw-details-box {
  margin: 6px 0 0;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  max-height: 180px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 10px;
  font-size: 11px;
}

.raw-details-box dt {
  color: var(--muted);
  font-weight: 600;
}

.raw-details-box dd {
  margin: 0;
  word-break: break-word;
}

@media (max-width: 1100px) {
  .metrics--compact {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 760px) {
  .metrics--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 500px) {
  .metrics--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
  align-items: stretch;
}
.team-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: visible;
}
.team-card > .card-heading,
.team-card-body,
.team-card-footer {
  padding: 20px;
}
.team-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  border-block: 1px solid var(--border, #e2e8f0);
}
.team-card-footer {
  margin-top: auto;
}
.team-card-footer,
.member-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.person-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-block: 12px;
  overflow-wrap: anywhere;
}
.person-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #eef2ff;
  color: #4338ca;
  font-weight: 700;
}
.member-pill {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
}
.actions-menu {
  position: relative;
  min-width: 100px;
}
.actions-menu summary {
  cursor: pointer;
  padding: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.actions-menu[open] {
  background: white;
  z-index: 2;
}
.actions-menu a,
.actions-menu button {
  display: block;
  padding: 10px;
  width: 100%;
  text-align: left;
}
.reporting-matrix {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) minmax(250px, 1.2fr) minmax(250px, 1fr);
  gap: 20px;
  align-items: start;
}
.responsibility-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-block: 16px;
  border-bottom: 1px solid #e2e8f0;
  overflow-wrap: anywhere;
}
@media (max-width: 1000px) {
  .reporting-matrix {
    grid-template-columns: 1fr;
  }
  .responsibility-row {
    flex-wrap: wrap;
  }
}

/* Unified daily status directory */
.status-filters {
  gap: 12px;
  flex-wrap: wrap;
}
.status-filters .filter-field {
  flex: 1 1 140px;
  min-width: 0;
}
.status-filters .status-search {
  flex-basis: 240px;
}
.status-task-preview {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.status-markdown p {
  margin: 0.25rem 0;
}
.status-markdown p:first-child {
  margin-top: 0;
}
.status-markdown p:last-child {
  margin-bottom: 0;
}
.status-markdown ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin: 0.25rem 0;
}
.status-markdown ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin: 0.25rem 0;
}
.status-markdown li {
  margin: 0.125rem 0;
}
.status-markdown strong {
  font-weight: 600;
  color: var(--text, #1c1917);
}
.status-markdown em {
  font-style: italic;
}
.status-markdown del {
  text-decoration: line-through;
  opacity: 0.75;
}
.status-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background-color: rgba(42, 36, 33, 0.06);
  color: #b96d49;
}
.status-markdown pre {
  margin: 0.5rem 0;
  padding: 0.75rem;
  border-radius: 8px;
  background-color: #292524;
  color: #f5f5f4;
  overflow-x: auto;
  font-size: 0.85em;
}
.status-markdown pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}
.status-markdown a {
  color: #b96d49;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.status-markdown a:hover {
  color: #8f4829;
}
.status-task-preview.status-markdown * {
  display: inline;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
.status-task-preview.status-markdown p {
  display: inline;
  margin: 0;
}
.status-task-preview.status-markdown ul,
.status-task-preview.status-markdown ol {
  display: inline;
  list-style: none;
  padding: 0;
  margin: 0;
}
.status-task-preview.status-markdown li {
  display: inline;
  margin: 0;
}
.status-task-preview.status-markdown li + li::before {
  content: " · ";
  color: var(--muted, #78716c);
}
.status-task-preview.status-markdown pre,
.status-task-preview.status-markdown code {
  white-space: nowrap;
  display: inline;
}
.rich-editor-content {
  min-height: 90px;
  width: 100%;
  padding: 0.875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #1c1917;
  outline: none;
}
.rich-editor-content:empty::before,
.rich-editor-content[data-empty="true"]::before {
  content: attr(data-placeholder);
  color: #a8a29e;
  pointer-events: none;
  display: block;
}
.rich-editor-content p {
  margin: 0.25rem 0;
}
.rich-editor-content p:first-child {
  margin-top: 0;
}
.rich-editor-content p:last-child {
  margin-bottom: 0;
}
.rich-editor-content ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin: 0.25rem 0;
}
.rich-editor-content ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin: 0.25rem 0;
}
.rich-editor-content li {
  margin: 0.125rem 0;
}
.rich-editor-content strong,
.rich-editor-content b {
  font-weight: 600;
  color: #1c1917;
}
.rich-editor-content em,
.rich-editor-content i {
  font-style: italic;
}
.rich-editor-content del,
.rich-editor-content s,
.rich-editor-content strike {
  text-decoration: line-through;
  opacity: 0.75;
}
.rich-editor-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.35em;
  border-radius: 4px;
  background-color: #faf6f1;
  color: #b96d49;
}
.rich-editor-content a {
  color: #b96d49;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.status-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.sp-icon-action,
.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  text-decoration: none;
  transition:
    background-color 150ms ease,
    color 150ms ease,
    border-color 150ms ease;
}
.sp-icon-action svg,
.icon-action svg {
  display: block;
  width: 18px;
  height: 18px;
}
.sp-icon-action:hover,
.icon-action:hover {
  border-color: #e0e7ff;
  background: #eef2ff;
  color: #4338ca;
}
.sp-icon-action:focus-visible,
.icon-action:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}
.status-row-actions .sp-icon-action,
.status-row-actions .sp-icon-action.button--danger,
.status-row-actions .sp-icon-action.project-delete-action,
.sp-icon-action--danger,
.icon-action--danger {
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}
.sp-icon-action--danger,
.icon-action--danger {
  color: #ef4444 !important;
}
.status-row-actions .sp-icon-action:hover {
  border-color: #e0e7ff !important;
  background: #eef2ff !important;
  color: #4338ca !important;
}
.status-row-actions .sp-icon-action--danger:hover,
.status-row-actions .sp-icon-action.button--danger:hover,
.status-row-actions .sp-icon-action.project-delete-action:hover,
.sp-icon-action--danger:hover,
.icon-action--danger:hover {
  border-color: #fee2e2 !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
}
.status-table-hint {
  margin: 0;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 12px;
}
.status-archive-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.status-archive-form input[type="submit"],
.status-archive-form .button {
  min-height: 44px;
}
.status-table-scroll:focus-visible,
.project-table-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
@media (max-width: 768px) {
  .status-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .status-filters .filter-field {
    flex-basis: auto;
    width: 100%;
  }
  .status-archive-form input:not([type="hidden"]),
  .status-archive-form select,
  .status-archive-form textarea {
    font-size: 16px;
  }
  .status-row-actions .button {
    min-height: 44px;
  }
}
.status-archive-form {
  display: flex;
  flex-direction: column;
  height: 100%;
}
:is(#main-content, #report_drawer)
  :is(.status-filters, .status-archive-form)
  input:not([type="hidden"]),
:is(#main-content, #report_drawer) :is(.status-filters, .status-archive-form) select {
  min-height: 44px;
  max-width: 100%;
}
.status-header-actions {
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  :is(#main-content, #report_drawer)
    :is(.status-filters, .status-archive-form)
    input:not([type="hidden"]),
  :is(#main-content, #report_drawer) :is(.status-filters, .status-archive-form) select,
  :is(#main-content, #report_drawer) .status-archive-form textarea {
    font-size: 16px;
  }
}
.status-directory-table {
  width: 100%;
  min-width: 740px;
  table-layout: auto;
  white-space: normal;
}
.leaves-directory-table {
  width: 100%;
  min-width: 620px;
  table-layout: auto;
  white-space: normal;
}
.status-directory-table th,
.status-directory-table td,
.project-data-table th,
.project-data-table td,
.teams-directory-table th,
.teams-directory-table td,
.leaves-directory-table th,
.leaves-directory-table td {
  padding-left: 10px;
  padding-right: 10px;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.status-directory-table th,
.project-data-table th,
.teams-directory-table th,
.leaves-directory-table th {
  white-space: normal;
  overflow-wrap: normal;
}
.status-directory-table th:nth-child(1) {
  width: 18%;
  min-width: 130px;
}
.status-directory-table th:nth-child(2) {
  width: 13%;
  min-width: 105px;
}
.status-directory-table th:nth-child(3) {
  width: 26%;
  min-width: 150px;
}
.status-directory-table th:nth-child(4) {
  width: 7%;
  min-width: 55px;
}
.status-directory-table th:nth-child(5) {
  width: 8%;
  min-width: 70px;
}
.status-directory-table th:nth-child(6) {
  width: 14%;
  min-width: 105px;
}
.status-directory-table th:nth-child(7) {
  width: 14%;
  min-width: 85px;
}
.status-row-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.status-header-actions :focus-visible,
.status-filters :focus-visible,
.status-archive-form :focus-visible,
.status-directory-table :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.status-directory-table .badge {
  max-width: 100%;
  white-space: nowrap;
}
.status-directory-table .badge svg {
  flex-shrink: 0;
}
.status-table-hint {
  display: none;
}
@media (max-width: 1400px) {
  .status-table-hint {
    display: block;
  }
}
.status-filters .filter-field:has(input[type="date"]) {
  flex-basis: 170px;
  min-width: 170px;
}
@media (max-width: 768px) {
  .status-filters .filter-field:has(input[type="date"]) {
    flex-basis: auto;
    min-width: 0;
  }
}

/* Shared compact filter toolbar and disclosure panel. */
.standard-filter-bar {
  display: block;
  position: relative;
}
.standard-filter-primary {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.standard-filter-primary .filter-field {
  max-width: none;
}
.standard-filter-primary .standard-filter-search {
  flex: 1 1 260px;
  min-width: 240px;
  max-width: none;
  width: auto;
  height: 40px;
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.standard-filter-primary .standard-filter-field {
  flex: 0 0 auto;
  flex-shrink: 0;
  width: auto;
  min-width: 10rem;
  max-width: none;
  height: 40px;
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.standard-filter-search input[type="search"] {
  padding-left: 2.25rem !important;
}
.standard-filter-disclosure {
  position: relative;
  flex: 0 0 auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
}
.standard-filter-disclosure[open] {
  position: relative;
  z-index: 50;
  height: auto;
}
.standard-filter-disclosure summary {
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
  height: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  box-sizing: border-box;
}
.standard-filter-disclosure summary::-webkit-details-marker {
  display: none;
}
.standard-filter-count {
  border-radius: 50%;
  padding: 2px 7px;
  background: var(--accent);
  color: white;
  font-size: 12px;
}
.standard-filter-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  width: 24rem;
  min-width: 320px;
  max-width: calc(100vw - 2rem);
  padding: 20px;
  background-color: #ffffff;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}
.standard-filter-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.standard-filter-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  flex: 0 0 auto;
  flex-shrink: 0;
  margin: 0;
  padding: 0 14px;
  color: #574f4a;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #e4ddd6;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}
.standard-filter-reset:hover {
  background: #ffffff;
  color: #2a2421;
}
.standard-filter-dates {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
}
.standard-filter-dates[hidden] {
  display: none !important;
}
.standard-filter-dates .filter-field {
  flex: 1 1 auto;
  width: 100%;
}
.standard-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.standard-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  min-height: 36px;
  max-width: 100%;
  overflow-wrap: anywhere;
  border-radius: 20px;
  background: #edf5f3;
  border: 1px solid #cfe2dc;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 900px) {
  .standard-filter-disclosure,
  .standard-filter-disclosure[open] {
    position: static;
  }
  .standard-filter-panel {
    width: min(24rem, 100%);
    min-width: 0;
    max-width: 100%;
  }
  .standard-filter-primary {
    flex-wrap: wrap;
  }
  .standard-filter-primary .standard-filter-search {
    flex-basis: 100%;
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 520px) {
  .standard-filter-grid {
    grid-template-columns: 1fr;
  }
  .standard-filter-primary .standard-filter-field {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
  .standard-filter-dates {
    flex-wrap: wrap;
  }
  .standard-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(22rem, calc(100vw - 2rem));
    min-width: 280px;
    margin-top: 0;
  }
  .standard-filter-disclosure[open] {
    flex-basis: auto;
  }
  .standard-filter-chip {
    min-height: 44px;
  }
}

.standard-filter-bar .filter-field:not(.standard-filter-search) {
  min-width: 0;
}
.standard-filter-bar
  input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
.standard-filter-bar select {
  height: 40px;
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
  line-height: 20px;
}
.standard-filter-bar select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-left: 14px;
  padding-right: 36px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238C827A' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center !important;
  background-size: 16px 16px;
}
.standard-filter-bar :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.standard-filter-panel .filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  text-align: left;
  max-width: none;
  min-width: 0;
  width: 100%;
  margin: 0;
}
.leaves-filters .standard-filter-primary {
  gap: 16px;
}
.leaves-filters .standard-filter-primary .filter-field {
  margin-right: 6px;
}
.leaves-filters .standard-filter-dates .filter-field {
  margin-bottom: 8px;
}
.standard-filter-panel label {
  display: block;
  text-align: left;
  align-self: flex-start;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: #574f4a;
  margin: 0;
  padding: 0;
}
.standard-filter-panel select,
.standard-filter-panel input {
  width: 100%;
}
.standard-filter-panel select {
  padding-right: 36px !important;
  background-position: right 12px center !important;
}
@media (max-width: 768px) {
  .standard-filter-bar
    input:not([type="hidden"]):not([type="submit"]):not([type="radio"]):not([type="checkbox"]),
  .standard-filter-bar select {
    font-size: 16px;
  }
}

.dialog-body .standard-filter-primary {
  flex-wrap: wrap;
}
.dialog-body .standard-filter-primary .standard-filter-search {
  flex-basis: 100%;
  min-width: 0;
}

.status-reminder-toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  width: min(24rem, calc(100vw - 2rem));
  box-shadow: 0 8px 30px rgb(0 0 0 / 25%);
}
.status-reminder-toast a,
.status-reminder-toast button {
  margin-right: 1rem;
}

/* ==========================================================================
   Premium HR SaaS Dashboard, Welcome Panel & Modern Metric Cards
   ========================================================================== */

.welcome-banner {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  padding: 26px 30px;
  margin-bottom: 24px;
  box-shadow: 0 8px 30px rgba(42, 36, 33, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.welcome-greeting-title {
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.6px;
  color: var(--text);
  margin: 0 0 6px;
}

.welcome-greeting-subtitle {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.welcome-deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: #ede7e1;
  border: 1px solid #e4ddd6;
  color: #574f4a;
}

.welcome-deadline-badge.is-open {
  background: rgba(229, 240, 234, 0.85);
  border-color: #c5dfc3;
  color: #2d5a43;
}

.welcome-deadline-badge.is-closed {
  background: rgba(250, 234, 234, 0.85);
  border-color: #f5c6c6;
  color: #8e3838;
}

/* Overview stats grid: 6 modern cards for expected, submitted, missing, etc. */
.overview-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.overview-stat-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 8px 30px rgba(42, 36, 33, 0.035);
  display: flex;
  flex-direction: column;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.overview-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(42, 36, 33, 0.06);
  border-color: #e4ddd6;
}

.overview-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.overview-stat-label {
  font-size: 11.5px;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.overview-stat-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.overview-stat-icon-wrap .icon {
  width: 16px;
  height: 16px;
}

.overview-stat-value {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.8px;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.overview-stat-meta {
  font-size: 11.5px;
  color: var(--muted);
}

.overview-stat-icon-wrap--indigo {
  background: #faece5;
  color: #b96d49;
  border: 1px solid #f3d7c9;
}

.overview-stat-icon-wrap--emerald {
  background: #e5f0ea;
  color: #2d5a43;
  border: 1px solid #cce2d6;
}

.overview-stat-icon-wrap--rose {
  background: #faeaea;
  color: #8e3838;
  border: 1px solid #f5cfcf;
}

.overview-stat-icon-wrap--amber {
  background: #fbf1e4;
  color: #8a5818;
  border: 1px solid #f6ddbe;
}

.overview-stat-icon-wrap--sky {
  background: #e9eff5;
  color: #3d5467;
  border: 1px solid #cfdbe6;
}

.overview-stat-icon-wrap--violet {
  background: #f1ede8;
  color: #6e5f56;
  border: 1px solid #dfd8cf;
}

/* Dashboard supplementary cards (Recent Blockers, Activity, Holidays) */
.dashboard-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-panel-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 8px 30px rgba(42, 36, 33, 0.035);
}

.dashboard-panel-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(247, 245, 243, 0.8);
  border: 1px solid #ede7e1;
  font-size: 12.5px;
}

/* Projects use the shared page layout with four proportioned table columns. */
.project-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.project-data-table {
  width: 100%;
  min-width: 520px;
  table-layout: auto;
}
.project-column-name {
  width: 35%;
  min-width: 150px;
}
.project-column-owner {
  width: 30%;
  min-width: 140px;
}
.project-column-status {
  width: 15%;
  min-width: 90px;
}
.project-column-actions {
  width: 20%;
  min-width: 100px;
}
.project-cell-name,
.project-cell-creator {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Teams directory table layout and card grid */
.teams-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.teams-directory-table {
  width: 100%;
  min-width: 680px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.teams-column-name {
  width: 26%;
  min-width: 160px;
}
.teams-column-lead {
  width: 24%;
  min-width: 150px;
}
.teams-column-manager {
  width: 18%;
  min-width: 120px;
}
.teams-column-members {
  width: 14%;
  min-width: 90px;
}
.teams-column-actions {
  width: 18%;
  min-width: 140px;
}

.teams-directory-table th.sticky-team,
.teams-directory-table td.sticky-team {
  position: sticky;
  left: 0;
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 8px -2px rgba(42, 36, 33, 0.08);
}
.teams-directory-table th.sticky-team {
  z-index: 2;
  background: #f7f5f3;
}
.teams-directory-table td.sticky-team {
  z-index: 1;
  background: #ffffff;
}
.teams-directory-table tbody tr:hover > td.sticky-team {
  background: #fbf9f7;
}

.team-card {
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.team-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: var(--accent);
}

.teams-summary-card {
  background: var(--surface-glass);
  border-color: var(--border-glass);
  backdrop-filter: blur(16px);
}
.teams-directory-table td {
  padding: 0.875rem 1rem;
}
.team-profile {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.team-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.form-feedback {
  white-space: pre-line;
}

.team-delete-button {
  background: #c94a4a;
  border-color: #c94a4a;
  color: white;
}
.team-delete-button:hover {
  background: #a53636;
  border-color: #a53636;
}
.feedback-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: min(28rem, calc(100vw - 3rem));
  background: var(--surface-glass);
  border: 1px solid var(--border-glass);
  box-shadow: 0 8px 30px rgb(0 0 0 / 12%);
  backdrop-filter: blur(16px);
}

#main-content:has(.status-form-page) {
  max-width: 100%;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.status-form-page .status-blocker-option:has(input:checked) {
  color: #fff;
}

.status-form-page .status-blocker-option--none:has(input:checked) {
  background: #2a2421;
}

.status-form-page .status-blocker-option--present:has(input:checked) {
  background: #c94a4a;
}

.status-form-page .status-blocker-option:has(input:focus-visible) {
  outline: 2px solid #b96d49;
  outline-offset: 3px;
}

.status-form-page .status-form-actions .status-submit-button {
  background: #b96d49;
  border-color: #b96d49;
  color: #fff;
}

.status-form-page .status-form-actions .status-submit-button:hover {
  background: #9e5b3c;
  border-color: #9e5b3c;
}

.status-form-page fieldset {
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

.notifications-popover {
  position: fixed;
  margin: 0;
  width: min(360px, calc(100vw - 16px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface, #ffffff);
  color: var(--text);
  box-shadow:
    0 16px 36px -4px rgba(42, 36, 33, 0.12),
    0 4px 12px rgba(42, 36, 33, 0.06);
  z-index: 70;
}

.notifications-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.notifications-popover-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
  margin: 0;
}

.notifications-popover-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(185, 109, 73, 0.1);
  color: var(--accent);
  border: 1px solid rgba(185, 109, 73, 0.2);
}

.notifications-popover-badge--neutral {
  background: #f3efea;
  color: #78716c;
  border-color: #e7e5e4;
}

.notifications-popover-body {
  padding: 18px 8px;
  text-align: center;
}

.notifications-popover-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #f3efea;
  color: #8c827a;
  margin: 0 auto 10px;
}

.notifications-popover-empty {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.notifications-popover-subtext {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
}

.notification-item {
  position: relative;
  border-radius: 10px;
}

.notification-item + .notification-item {
  border-top: 1px solid #f5f5f4;
}

/* --------------------------------------------------------------------------
   Team Drawer
   -------------------------------------------------------------------------- */
.team-drawer {
  display: flex;
  flex-direction: column;
}

.team-details-drawer {
  height: 100%;
}

.team-drawer-scrollable {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer .team-drawer-header h1 {
  display: none;
}

.team-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.team-details-drawer .team-drawer-header {
  border-bottom: none;
  padding-bottom: 0;
}

.team-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.team-health-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.team-health-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-warm);
  border: 1px solid var(--border-subtle);
}

.team-meta-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.team-meta-value {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.team-drawer-actions--sticky {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 10;
  margin-top: auto;
}

/* Theme Popover & Preference Controls */

/* Light Theme Overrides */
html[data-theme="light"] {
  --bg: #f7f5f3;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.7);
  --surface-warm: #faf8f5;
  --text: #2a2421;
  --text-secondary: #574f4a;
  --muted: #8c827a;
  --border: #e4ddd6;
  --border-glass: rgba(228, 221, 214, 0.5);
  --border-subtle: #ede9e3;
  --accent: #b96d49;
  --accent-soft: #f5ede6;
  color-scheme: light;
}

html[data-theme="light"] .data-table th,
html[data-theme="light"] .data-table td {
  background: #ffffff;
  color: #2a2421;
  border-color: #e4ddd6;
}

html[data-theme="light"] .matrix th,
html[data-theme="light"] .matrix td {
  background: #ffffff;
  color: #2a2421;
  border-color: #e4ddd6;
}

html[data-theme="light"] .matrix th.weekend,
html[data-theme="light"] .matrix th.is-saturday {
  background-color: #fef3c7 !important;
  color: #92400e !important;
}

html[data-theme="light"] .matrix th.is-sunday {
  background-color: #ffedd5 !important;
  color: #9a3412 !important;
}

html[data-theme="light"] .matrix td.weekend,
html[data-theme="light"] .matrix td.is-saturday {
  background-color: #fffbeb !important;
}

html[data-theme="light"] .matrix td.is-sunday {
  background-color: #fff7ed !important;
}

html[data-theme="light"] .matrix th.is-today {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
  border-left: 1px solid #7dd3fc !important;
  border-right: 1px solid #7dd3fc !important;
  border-top: 2px solid #0284c7 !important;
}

html[data-theme="light"] .matrix td.is-today {
  background-color: #f0f9ff !important;
  border-left: 1px solid #bae6fd !important;
  border-right: 1px solid #bae6fd !important;
}

html[data-theme="light"] dialog,
html[data-theme="light"] .drawer {
  background: #ffffff;
  color: #2a2421;
  border-color: #e4ddd6;
}

html[data-theme="light"] .theme-popover {
  background: #ffffff;
  border-color: #e4ddd6;
  box-shadow: 0 10px 24px rgba(42, 36, 33, 0.08);
}

html[data-theme="light"] input[type="text"],
html[data-theme="light"] input[type="email"],
html[data-theme="light"] input[type="number"],
html[data-theme="light"] input[type="search"],
html[data-theme="light"] input[type="date"],
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  background: #ffffff;
  color: #2a2421;
  border-color: #e4ddd6;
}

html[data-theme="light"] .flash.alert {
  background: #fee2e2;
  color: #7f1d1d;
  border-color: #fecaca;
}

html[data-theme="light"] .badge--emerald {
  background: #dcfce7;
  color: #166534;
}

html[data-theme="light"] .badge--amber {
  background: #fef3c7;
  color: #92400e;
}

html[data-theme="light"] .badge--rose {
  background: #ffe4e6;
  color: #880e4f;
}

html[data-theme="light"] .teams-directory-table th.sticky-team {
  background: #f7f5f3;
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .teams-directory-table td.sticky-team {
  background: #ffffff;
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .teams-directory-table tbody tr:hover > td.sticky-team {
  background: #fbf9f7;
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.06);
}

/* Dark Theme Overrides */
html[data-theme="dark"] {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-glass: rgba(22, 27, 34, 0.7);
  --surface-warm: #1c2128;
  --text: #e6edf3;
  --text-secondary: #c9d1d9;
  --muted: #8b949e;
  --border: #30363d;
  --border-glass: rgba(48, 54, 61, 0.5);
  --border-subtle: #21262d;
  --accent: #58a6ff;
  --accent-soft: #0d47a1;
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #0d1117;
  color: #e6edf3;
}

html[data-theme="dark"] .theme-canvas {
  background: #0d1117;
}

html[data-theme="dark"] .data-table th,
html[data-theme="dark"] .data-table td {
  background: #161b22;
  color: #e6edf3;
  border-color: #30363d;
}

html[data-theme="dark"] .matrix th,
html[data-theme="dark"] .matrix td {
  background: #161b22;
  color: #e6edf3;
  border-color: #30363d;
}

html[data-theme="dark"] .matrix th.weekend {
  background-color: rgba(217, 119, 6, 0.16) !important;
  color: #fbbf24 !important;
}

html[data-theme="dark"] .matrix td.weekend {
  background-color: rgba(217, 119, 6, 0.08) !important;
}

html[data-theme="dark"] .matrix th.is-today {
  background-color: rgba(2, 132, 199, 0.35) !important;
  box-shadow: inset 0 0 0 2px #38bdf8 !important;
  color: #e0f2fe !important;
}

html[data-theme="dark"] .matrix td.is-today {
  background-color: rgba(2, 132, 199, 0.2) !important;
  box-shadow:
    inset 1.5px 0 0 #38bdf8,
    inset -1.5px 0 0 #38bdf8 !important;
}

html[data-theme="dark"] dialog,
html[data-theme="dark"] .drawer {
  background: #161b22;
  color: #e6edf3;
  border-color: #30363d;
}

html[data-theme="dark"] .theme-popover {
  background: #161b22;
  border-color: #30363d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #0d1117;
  color: #e6edf3;
  border-color: #30363d;
}

html[data-theme="dark"] .flash.alert {
  background: #3d2424;
  color: #f87171;
  border-color: #7f2d2d;
}

html[data-theme="dark"] .badge--emerald {
  background: #0f3922;
  color: #56d364;
}

html[data-theme="dark"] .badge--amber {
  background: #3d2d0c;
  color: #d29922;
}

html[data-theme="dark"] .badge--rose {
  background: #3d1f2d;
  color: #f85149;
}

html[data-theme="dark"] .teams-directory-table th.sticky-team {
  background: #0d1117;
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .teams-directory-table td.sticky-team {
  background: #161b22;
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .teams-directory-table tbody tr:hover > td.sticky-team {
  background: #21262d;
  box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.3);
}

.year-cell {
  user-select: none;
}

.year-cell:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Keep controls steady and readable across viewport sizes. */
a:is(
    .button,
    .nav-link,
    .brand,
    .sidebar-user-card,
    .standard-filter-reset,
    .standard-filter-chip
  ):hover {
  text-decoration: none;
}
.profile-email {
  overflow-wrap: anywhere;
}
.standard-filter-heading {
  margin: 0;
  font-weight: 650;
  color: var(--text);
}
.topbar-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
turbo-frame#monthly_summary {
  display: block;
  min-width: 0;
}
.monthly-search-loading {
  display: none;
}
#monthly_summary[busy] .monthly-search-loading {
  display: block;
}
@media (max-width: 520px) {
  .standard-filter-bar {
    padding: 12px;
  }
  .standard-filter-disclosure {
    position: static;
  }
  .standard-filter-disclosure[open] {
    position: static;
  }
  .standard-filter-panel {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 65vh;
    overflow-y: auto;
  }
}

/* Responsive Grid Layouts (CSP-safe, replacing inline styles) */
.calendar-grid-7cols {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
}

.calendar-grid-4cols {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.calendar-scroll-wrapper {
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

/* Calendar cell links and badges: prevent awkward underlines or color drift on hover */
.calendar-interactive-cell,
.calendar-interactive-cell:hover,
.calendar-cell-link,
.calendar-cell-link:hover,
.calendar-badge-link,
.calendar-badge-link:hover {
  text-decoration: none !important;
  color: inherit;
}

.calendar-interactive-cell {
  color: inherit;
  cursor: pointer;
}

.calendar-badge-link.calendar-btn-primary,
.calendar-badge-link.calendar-btn-primary:hover,
.calendar-badge-link.calendar-btn-primary:focus,
.calendar-badge-link.calendar-btn-primary:visited,
.calendar-btn-primary,
.calendar-btn-primary:hover,
.calendar-btn-primary:focus,
.calendar-btn-primary:visited {
  color: #ffffff !important;
  background-color: #b96d49 !important;
  border: 1px solid #a85a37 !important;
}

.calendar-badge-link.calendar-btn-primary:hover,
.calendar-btn-primary:hover {
  background-color: #a85a37 !important;
  color: #ffffff !important;
}

.calendar-btn-primary * {
  color: #ffffff !important;
}

/* Status form drawer layout & scroll stability */
.status-form-drawer.drawer-shell {
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.status-form-drawer .drawer-scrollable {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Ensure clean 20px gap between consecutive project cards */
.status-form-drawer [data-entries-target="list"] > fieldset + fieldset,
[data-entries-target="list"] > fieldset + fieldset,
fieldset.status-entry-item + fieldset.status-entry-item {
  margin-top: 1.25rem !important;
}

/* Polished Work Date capsule pill */
.status-work-date-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #faf6f1;
  border: 1px solid #ede5da;
  border-radius: 9999px;
  padding: 0.375rem 0.875rem;
  user-select: none;
}

.drawer form .status-work-date-pill label,
.dialog-body form .status-work-date-pill label,
.modal form .status-work-date-pill label,
.status-work-date-pill label {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  color: #a8a29e !important;
  line-height: 1 !important;
  cursor: default !important;
}

.status-work-date-pill .status-work-date-text {
  font-size: 12px;
  font-weight: 700;
  color: #292524;
  line-height: 1;
}

/* Bulk toolbar action controls */
.bulk-toolbar-actions button,
.bulk-toolbar-actions select,
.bulk-toolbar-actions input {
  min-height: 32px !important;
  height: 32px !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.bulk-toolbar-actions select {
  width: auto !important;
  max-width: 180px !important;
  min-width: 140px !important;
  padding: 6px 28px 6px 10px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.bulk-toolbar-actions input[type="text"] {
  width: auto !important;
  max-width: 200px !important;
  min-width: 150px !important;
  padding: 6px 10px !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* ==========================================================================
   StatusPulse AI Assistant Chat Workspace
   ========================================================================== */

/* 1. Layout & Workspace Height */
.chat-workspace {
  min-height: 480px;
}

@media (min-width: 768px) {
  .chat-workspace {
    /* Fallback height when status reminder banner is absent */
    height: calc(100dvh - 140px);
  }

  /* When status reminder banner is present, deduct ~64px to prevent body overflow */
  #status-reminder-banner:has(.flash) ~ .chat-workspace {
    height: calc(100dvh - 204px);
  }
}

/* Ensure Rails button_to forms don't stretch or push layout */
.chat-workspace form.button_to {
  margin: 0 !important;
  display: inline-flex !important;
  flex-shrink: 0 !important;
}

/* 2. Conversations Sidebar Header & "+ New chat" Button */
.chat-sidebar-heading,
.chat-workspace .chat-sidebar h2 {
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--muted, #8c827a) !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.chat-new-chat-btn,
.chat-sidebar .chat-new-chat-btn,
.chat-sidebar .chat-sidebar-header button[type="submit"] {
  min-height: 32px !important;
  height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  gap: 6px !important;
  white-space: nowrap !important;
  background: var(--accent, #b96d49) !important;
  border: 1px solid var(--accent-hover, #a85a37) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(185, 109, 73, 0.2) !important;
  line-height: normal !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.chat-new-chat-btn:hover,
.chat-sidebar .chat-new-chat-btn:hover,
.chat-sidebar .chat-sidebar-header button[type="submit"]:hover {
  background: var(--accent-hover, #a85a37) !important;
  border-color: #974e2d !important;
  box-shadow: 0 2px 6px rgba(185, 109, 73, 0.3) !important;
}

/* 3. Sidebar Conversation List Item Delete Button */
.chat-item-delete-btn,
.chat-sidebar .conversation-list button[type="submit"] {
  min-height: 0 !important;
  width: 28px !important;
  height: 28px !important;
  padding: 4px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--muted, #8c827a) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
}

.chat-item-delete-btn:hover,
.chat-item-delete-btn:focus,
.chat-sidebar .conversation-list button[type="submit"]:hover,
.chat-sidebar .conversation-list button[type="submit"]:focus {
  background: #fff1f2 !important;
  color: #e11d48 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 4. Chat Header Title & "Delete conversation" Button */
#active-conversation-heading,
.chat-workspace .chat-header h2 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text, #2a2421) !important;
  margin: 0 0 2px 0 !important;
  line-height: 1.3 !important;
}

.chat-header p,
.chat-workspace .chat-header p {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.chat-header-delete-btn,
.chat-header button[type="submit"] {
  background: #fdf2f2 !important;
  color: #a83a3a !important;
  border: 1px solid #f8d7d7 !important;
  min-height: 32px !important;
  height: 32px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.chat-header-delete-btn:hover,
.chat-header button[type="submit"]:hover {
  background: #fbe6e6 !important;
  color: #8e2b2b !important;
  border-color: #f3bebe !important;
  box-shadow: 0 1px 3px rgba(168, 58, 58, 0.1) !important;
}

/* 5. Message Bubbles, Typography & Contrast */
.chat-bubble {
  min-width: 3rem;
  padding: 10px 16px !important;
  font-size: 13.5px;
  line-height: 1.5;
  text-align: left;
  box-sizing: border-box;
}

.chat-bubble--user {
  background: var(--accent, #b96d49) !important;
  border: 1px solid var(--accent-hover, #a85a37) !important;
  color: #ffffff !important;
}

.chat-bubble--user,
.chat-bubble--user p,
.chat-bubble--user * {
  color: #ffffff !important;
}

.chat-bubble--assistant {
  background: #ffffff !important;
  border: 1px solid var(--border, #e4ddd6) !important;
  color: var(--text, #2a2421) !important;
}

.chat-bubble--error {
  background: #fff1f2 !important;
  border: 1px solid #fecdd3 !important;
  color: #9f1239 !important;
}

.chat-message-content p {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

.chat-message-content p:last-child {
  margin-bottom: 0 !important;
}

.chat-message-timestamp {
  font-size: 11px !important;
  color: var(--muted, #8c827a) !important;
  margin-top: 4px !important;
  line-height: 1.2 !important;
}

/* 6. Chat Input Footer, Textarea & Focus State */
#chat-input-field {
  display: block !important;
  width: 100% !important;
  min-height: 42px !important;
  height: 42px;
  max-height: 140px !important;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  line-height: 20px !important;
  color: var(--text, #2a2421) !important;
  background: #ffffff !important;
  border: 1px solid var(--border, #e4ddd6) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02) !important;
  outline: none !important;
  outline-offset: 0 !important;
  box-sizing: border-box !important;
  resize: none !important;
  overflow-y: hidden !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  scrollbar-width: thin !important;
  scrollbar-color: #d1c7bd transparent !important;
}

#chat-input-field:focus {
  outline: none !important;
  outline-offset: 0 !important;
  border-color: var(--accent, #b96d49) !important;
  box-shadow: 0 0 0 3px rgba(185, 109, 73, 0.18) !important;
}

#chat-input-field::placeholder {
  color: #8c827a !important;
  font-size: 13px !important;
  line-height: 20px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

#chat-input-field::-webkit-scrollbar {
  width: 4px !important;
}

#chat-input-field::-webkit-scrollbar-track {
  background: transparent !important;
}

#chat-input-field::-webkit-scrollbar-thumb {
  background: #d1c7bd !important;
  border-radius: 9999px !important;
}

#chat-input-field::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#chat-submit-button {
  min-height: 42px !important;
  height: 42px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  background: var(--accent, #b96d49) !important;
  border: 1px solid var(--accent-hover, #a85a37) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(185, 109, 73, 0.25) !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  align-self: flex-end !important;
  line-height: 1 !important;
}

#chat-submit-button:hover:not(:disabled) {
  background: var(--accent-hover, #a85a37) !important;
  border-color: #974e2d !important;
  box-shadow: 0 3px 10px rgba(185, 109, 73, 0.3) !important;
}

#chat-submit-button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* ==========================================================================
   Floating AI Chatbot Widget
   ========================================================================== */

.floating-chat-trigger {
  box-shadow: 0 4px 14px rgba(185, 109, 73, 0.35), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background-color 0.15s ease !important;
}

.floating-chat-trigger:hover {
  transform: translateY(-2px) scale(1.04) !important;
  box-shadow: 0 6px 20px rgba(185, 109, 73, 0.45), 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.floating-chat-trigger:active {
  transform: scale(0.96) !important;
}

.floating-chat-panel {
  box-shadow: 0 12px 36px -4px rgba(42, 36, 33, 0.18), 0 4px 16px -2px rgba(42, 36, 33, 0.1) !important;
  animation: floatingChatEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-chat-panel.hidden {
  display: none !important;
}

.floating-chat-panel.flex {
  display: flex !important;
}

@keyframes floatingChatEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.prompt-chip {
  background: #ffffff;
  transition: all 0.15s ease;
}

.prompt-chip:hover {
  border-color: #b96d49 !important;
  background: #faf8f5 !important;
}

