:root {
  --bg: #e8edf3;
  --bg-subtle: #f4f7fa;
  --panel: #ffffff;
  --panel-wash: #fbfcfd;
  --text: #162231;
  --muted: #5f6f85;
  --muted-strong: #435269;
  --line: #dce3eb;
  --line-strong: #c7d1de;
  --brand: #43b985;
  --brand-hover: #3aa876;
  --brand-dark: #217554;
  --brand-soft: #e9f7f1;
  --brand-surface: #f4fbf7;
  --nav: #212529;
  --nav-hover: #2a3140;
  --danger: #dc3545;
  --danger-dark: #b42318;
  --warning: #b7791f;
  --warning-soft: #fff8e6;
  --success: #157347;
  --info: #0f5f87;
  --info-soft: #edfaff;
  --shadow-xs: 0 1px 1px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 1px rgba(16, 24, 40, .04);
  --shadow: 0 8px 18px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, .16);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --focus-ring: 0 0 0 3px rgba(67, 185, 133, .2);
}

.nav-dashboard-link {
  position: relative;
}

.nav-notification-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: .35rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}

.request-review-panel {
  margin-bottom: 1rem;
  border-left: 5px solid var(--danger);
  background: #fff6f7;
}

.my-requests-panel {
  margin-top: 1rem;
}

.request-list {
  display: grid;
  gap: .75rem;
}

.request-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.request-item-main,
.request-item-main > span {
  display: grid;
  gap: .3rem;
}

.request-item p {
  margin: .35rem 0 0;
}

.request-review-actions {
  display: grid;
  gap: .5rem;
  min-width: min(24rem, 45%);
}

.request-review-actions form {
  display: flex;
  gap: .45rem;
  align-items: center;
}

.request-review-actions input[type="text"] {
  min-width: 12rem;
}

.badge-request-pending { background: var(--warning-soft); color: var(--warning); }
.badge-request-approved { background: var(--brand-soft); color: var(--success); }
.badge-request-rejected { background: #fff0f1; color: var(--danger-dark); }

.project-picker-row.is-unavailable {
  display: grid;
  opacity: .62;
  cursor: not-allowed;
}

.project-picker-unavailable-reason {
  grid-column: 1 / -1;
  color: var(--danger-dark);
  font-size: .75rem;
  font-weight: 700;
}

#project-reopening-modal textarea {
  min-height: 8rem;
  resize: vertical;
}

@media (max-width: 760px) {
  .request-item,
  .request-review-actions form {
    align-items: stretch;
    flex-direction: column;
  }
  .request-review-actions {
    min-width: 0;
  }
  .request-review-actions input[type="text"] {
    min-width: 0;
    width: 100%;
  }
}

.duration-value-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(8rem, auto);
  gap: .5rem;
}

.catalog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  padding: 0 1rem 1rem;
}

.multi-select-filter {
  position: relative;
  min-width: 11rem;
}

.multi-select-filter > summary {
  cursor: pointer;
  display: grid;
  gap: .1rem;
  padding: .55rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: .45rem;
  background: var(--panel);
  list-style: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.multi-select-filter > summary:hover,
.multi-select-filter[open] > summary {
  border-color: #9eacbd;
  background: var(--panel-wash);
}

.multi-select-filter > summary:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.multi-select-filter.has-selection > summary {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.multi-select-filter.has-selection > summary [data-multi-select-count] {
  color: var(--brand-dark);
  font-weight: 700;
}

.multi-select-menu {
  position: absolute;
  z-index: 20;
  display: grid;
  gap: .45rem;
  min-width: 16rem;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.multi-select-actions {
  display: flex;
  gap: .4rem;
}

.multi-select-search {
  width: 100%;
  min-height: 36px;
}

.multi-select-options {
  display: grid;
  gap: .45rem;
  max-height: 14rem;
  overflow-y: auto;
  padding-right: .2rem;
}

.multi-select-empty {
  margin: 0;
  padding: .5rem;
  text-align: center;
}

[data-lock-override-fields] {
  display: grid;
  gap: .6rem;
}

[data-lock-override-fields].hidden {
  display: none;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f3f6f9 0, var(--bg) 260px, var(--bg) 100%);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

body.is-partial-loading {
  cursor: progress;
}

body.is-partial-loading main.page {
  opacity: .86;
  transition: opacity .12s ease;
}

::selection {
  background: rgba(67, 185, 133, .22);
}

a {
  color: var(--brand-hover);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .18);
}

.topbar-inner {
  width: 100%;
  max-width: 1360px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  color: #fff;
  font-weight: 700;
}

.brand:hover {
  color: #fff;
  text-decoration: none;
}

.brand img,
.login-brand img {
  width: 120px;
  height: 38px;
  object-fit: contain;
  filter: brightness(1.08);
}

.brand-product {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .22);
  color: #f8f9fa;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span[aria-hidden="true"] {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, .1);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-link,
.nav-logout {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.nav-link:hover,
.nav-logout:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  text-decoration: none;
}

.nav-link.is-active {
  background: rgba(67, 185, 133, .2);
  color: #63dba4;
}

.nav-divider {
  width: 1px;
  height: 26px;
  margin: 0 6px;
  background: rgba(255, 255, 255, .16);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  list-style: none;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.nav-dropdown[open] summary {
  background: rgba(255, 255, 255, .1);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  min-width: 190px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(16, 24, 40, .2);
}

.nav-dropdown-menu .nav-link {
  width: 100%;
  justify-content: flex-start;
  color: #344054;
}

.nav-dropdown-menu .nav-link:hover,
.nav-dropdown-menu .nav-link.is-active {
  background: var(--brand-soft);
  color: #217554;
}

.nav-user {
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, .16);
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-utility-link {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: rgb(222, 169, 86);
  transition: color .16s ease;
}

.help-utility-link:hover,
.help-utility-link:focus-visible {
  color: #8cc8ff;
  text-decoration: none;
}

.help-utility-link.is-active {
  color: #f0c77f;
}

.help-utility-link:focus-visible {
  outline: none;
}

.help-utility-link:focus-visible .help-utility-icon {
  box-shadow: 0 0 0 3px rgba(140, 200, 255, .2);
}

.help-utility-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  transition: box-shadow .16s ease;
}

.account-chip {
  display: inline-flex;
  min-height: 40px;
  padding: 6px 10px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  color: #fff;
  line-height: 1.15;
}

.account-chip:hover,
.account-chip.is-active {
  background: rgba(67, 185, 133, .14);
  border-color: rgba(67, 185, 133, .44);
  color: #fff;
  text-decoration: none;
}

.account-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.account-role {
  margin-top: 2px;
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
}

.page {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 28px 24px 42px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
  padding: 24px 24px;
  background: linear-gradient(180deg, #fff 0%, var(--panel-wash) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: var(--radius) 0 0 var(--radius);
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
}

.page-header.admin-hero {
  align-items: center;
  padding: 28px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 38%),
    linear-gradient(135deg, #276f57 0%, var(--brand) 100%);
  border: 0;
}

.page-header.admin-hero::before {
  display: none;
}

.page-header.admin-hero .muted {
  color: rgba(255, 255, 255, .86);
}

.page-header.admin-hero .btn {
  border-color: rgba(255, 255, 255, .78);
  background: #fff;
  color: #217554;
}

.page-header.admin-hero .btn:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .92);
}

h1 {
  margin: 0;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
}

h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
}

p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, .9fr);
  gap: 18px;
  align-items: start;
}

.admin-grid > * {
  min-width: 0;
}

.side-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel {
  min-width: 0;
  background: linear-gradient(180deg, #fff 0%, var(--panel-wash) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-header h2 {
  font-size: 16px;
}

.panel-header h2,
.panel-header p {
  margin-bottom: 0;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.narrow-panel {
  max-width: 560px;
}

.stack {
  display: grid;
  gap: 14px;
}

.help-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.code-block {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  background: #101828;
  color: #f2f4f7;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.55;
}

.stat {
  min-height: 96px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.stat:hover {
  border-color: rgba(67, 185, 133, .38);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.stat::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-hover) 100%);
  opacity: .85;
}

.stat strong {
  display: block;
  margin-bottom: 2px;
  color: var(--brand-dark);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.stat .stat-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.report-chart-panel {
  min-width: 0;
}

.report-chart-panel .panel-header {
  align-items: flex-start;
  gap: 14px;
}

.chart-timeline-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.chart-timeline-toggle a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  min-width: 72px;
  padding: 6px 11px;
  border-radius: 6px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.chart-timeline-toggle a:hover,
.chart-timeline-toggle a:focus-visible {
  outline: 0;
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 0 0 2px rgba(67, 185, 133, .16);
}

.chart-timeline-toggle a.is-active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.report-chart-wrap {
  position: relative;
  min-height: 320px;
  height: clamp(320px, 42vw, 460px);
}

.report-chart-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.report-hero {
  display: grid;
  align-items: stretch;
  gap: 16px;
}

.report-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
}

.report-filter-shell {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-strong);
}

.report-filter-primary {
  display: grid;
  grid-template-columns: minmax(160px, .9fr) repeat(2, minmax(180px, 1fr)) minmax(145px, .75fr);
  gap: 10px;
  align-items: start;
}

.report-filter-primary--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-filter-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.report-filter-secondary .multi-select-filter {
  min-width: 0;
}

.report-filter-secondary .multi-select-filter > summary {
  min-height: 54px;
  padding: .42rem .62rem;
}

.report-filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.report-filter-actions > .checkbox {
  min-height: 38px;
  padding: 0 .65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel-wash);
}

.report-shortcuts-label {
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.report-hero .report-shortcuts {
  margin-top: -8px;
  padding-top: 0;
  border-top: 0;
}

.report-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.report-shortcuts a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.report-shortcuts a:hover,
.report-shortcuts a:focus-visible,
.report-shortcuts a.is-active {
  outline: 0;
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.report-shortcuts a.report-shortcut-function {
  border-color: #78aeb8;
  background: #e8f4f6;
  color: #185b68;
}

.report-shortcuts a.report-shortcut-function:hover,
.report-shortcuts a.report-shortcut-function:focus-visible,
.report-shortcuts a.report-shortcut-function.is-active {
  border-color: #236f7c;
  background: #cfe9ed;
  color: #104b56;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--muted-strong);
  font-size: 12.5px;
}

.label-hint {
  color: var(--muted);
  font-weight: 400;
  font-size: 11px;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.field-error {
  position: absolute;
  z-index: 25;
  top: calc(100% + 6px);
  left: 0;
  max-width: min(280px, calc(100vw - 48px));
  margin: 0;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--danger-dark);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
  box-shadow: 0 10px 24px rgba(16, 24, 40, .18);
  pointer-events: none;
}

.field-error::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 14px;
  width: 8px;
  height: 8px;
  background: inherit;
  transform: rotate(45deg);
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

input::placeholder,
textarea::placeholder {
  color: #98a2b3;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

input[readonly],
input:disabled,
select:disabled,
textarea:disabled {
  background-color: #eef2f6;
  color: #5f6f85;
  cursor: not-allowed;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, .12);
}

.form-row,
.form-row-3 {
  display: grid;
  gap: 12px;
  align-items: end;
}

.form-row {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.compliance-filter-row .week-picker {
  min-width: 0;
}

.form-row-3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form-row > div:only-child,
.form-row-3 > div:only-child {
  max-width: 360px;
}

.time-entry-form .form-row > div:only-child,
.time-entry-form .form-row-3 > div:only-child {
  max-width: none;
}

.form-spacer {
  margin-top: 12px;
}

.team-multi-select {
  position: relative;
}

.team-multi-select summary {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.team-multi-select summary::-webkit-details-marker {
  display: none;
}

.team-multi-select summary::after {
  content: "";
  position: absolute;
  right: 14px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted-strong);
  border-bottom: 2px solid var(--muted-strong);
  transform: rotate(45deg) translateY(-2px);
}

.team-multi-select[open] summary {
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.team-multi-options {
  position: absolute;
  z-index: 35;
  top: calc(100% + 6px);
  left: 0;
  width: max(100%, 280px);
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.team-multi-option {
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.team-multi-option:hover {
  background: var(--brand-soft);
}

.hidden {
  display: none !important;
}

.form-notice {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
}

.form-notice.warning {
  border-color: #ffecb5;
  background: #fff8e6;
  color: #664d03;
}

.form-notice.info {
  border-color: #b6effb;
  background: #edfaff;
  color: #055160;
}

.week-picker {
  position: relative;
  width: 100%;
  min-width: 300px;
}

.week-picker-trigger {
  width: 100%;
  min-height: 46px;
  padding: 10px 44px 10px 14px;
  border: 1px solid #98a2b3;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
  position: relative;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.week-picker-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #667085;
  transform: translateY(-40%);
}

.week-picker-trigger:hover,
.week-picker-trigger:focus-visible {
  outline: 0;
  border-color: var(--brand);
  background: #fff;
  box-shadow: var(--focus-ring), 0 8px 20px rgba(16, 24, 40, .10);
}

.week-picker-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 90;
  width: min(430px, calc(100vw - 32px));
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 46px rgba(16, 24, 40, .22);
}

.time-header-actions .week-picker-popover {
  left: auto;
  right: 0;
}

.week-picker-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.week-picker-header strong {
  text-align: center;
}

.week-picker-nav {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.week-picker-nav:hover,
.week-picker-nav:focus-visible {
  outline: 0;
  border-color: var(--brand);
  background: var(--brand-soft);
}

.week-picker-weekdays,
.week-row {
  display: grid;
  grid-template-columns: minmax(54px, .95fr) repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.week-picker-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.week-picker-grid {
  display: grid;
  gap: 4px;
}

.week-row {
  width: 100%;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.week-row:hover,
.week-row:focus-visible {
  outline: 0;
  border-color: var(--brand);
  background: var(--brand-soft);
}

.week-row.is-selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.week-day {
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 12px;
}

.week-number {
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.week-day.is-muted {
  color: #98a2b3;
}

.week-row.is-selected .week-number,
.week-row.is-selected .week-day.is-muted {
  color: rgba(255, 255, 255, .82);
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-hover) 100%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease, transform .05s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn:hover {
  border-color: var(--brand-hover);
  background: linear-gradient(180deg, #48c28c 0%, var(--brand-hover) 100%);
  color: #fff;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  border-color: var(--line-strong);
  background: #eef2f6;
  color: #7a8798;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn.secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: #344054;
}

.btn.secondary:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: #217554;
}

.btn.danger {
  border-color: var(--danger);
  background: var(--danger);
}

.btn.danger:hover {
  border-color: var(--danger-dark);
  background: var(--danger-dark);
}

.btn.small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.table-actions input {
  width: 160px;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid rgba(220, 53, 69, 0.28);
  border-radius: var(--radius);
  background: #fff6f6;
}

.danger-zone h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.danger-zone .muted {
  margin: 0;
}

.project-admin-toggle {
  align-self: start;
  max-width: 240px;
}

[data-admin-project-dependent] {
  transition: opacity .15s ease, filter .15s ease;
}

[data-admin-project-dependent].is-disabled {
  opacity: .58;
  filter: grayscale(.12);
}

.cell-strong {
  font-weight: 700;
}

.cell-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: #f1f4f8;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

tbody tr:nth-child(even) td {
  background: #fcfdff;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: var(--brand-surface);
}

.is-clickable-row {
  cursor: pointer;
}

.row-link {
  color: inherit;
  font-weight: inherit;
}

.row-link:hover {
  color: var(--brand-hover);
}

.modal-layer,
.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
}

.modal-layer[hidden] {
  display: none !important;
}

.modal-scrim,
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(16, 24, 40, .56);
  backdrop-filter: blur(2px);
}

.modal-layer {
  place-items: center;
  padding: 18px;
}

.modal-dialog,
.drawer-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  background: linear-gradient(180deg, #fff 0%, var(--panel-wash) 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(16, 24, 40, .28);
  scrollbar-gutter: stable;
}

.modal-dialog {
  padding: 22px;
}

.modal-dialog-narrow {
  width: min(480px, 100%);
}

.modal-header,
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2,
.drawer-header h2 {
  margin-bottom: 0;
}

.drawer-layer {
  justify-items: end;
}

.drawer-panel {
  width: min(620px, 100%);
  max-height: 100vh;
  min-height: 100vh;
  padding: 22px;
  border-radius: 8px 0 0 8px;
  border-top: 0;
  border-bottom: 0;
}

.drawer-panel-narrow {
  width: min(480px, 100%);
}

.drawer-primary-action {
  margin-bottom: 18px;
}

.modal-dialog form.grid,
.drawer-panel form.grid {
  gap: 16px;
}

.team-leader-control {
  border: 1px solid #d9e2dc;
  border-radius: 10px;
  background: #f7faf8;
  padding: .85rem;
}

.team-leader-toggle {
  font-weight: 700;
}

.team-leader-teams {
  border: 0;
  border-top: 1px solid #d9e2dc;
  margin: .75rem 0 0;
  padding: .75rem 0 0;
}

.team-leader-teams legend {
  color: #1f4030;
  font-size: .9rem;
  font-weight: 700;
  padding: 0;
}

.team-leader-team-grid {
  display: grid;
  gap: .45rem .8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: .6rem;
  max-height: 12rem;
  overflow-y: auto;
}

.leadership-team-list {
  display: block;
  font-size: .78rem;
  line-height: 1.35;
  margin-top: .3rem;
  max-width: 16rem;
}

.users-filter-search {
  flex: 1 1 13rem;
  max-width: 15rem;
  min-width: 13rem;
}

.users-table th,
.users-table td {
  padding: 9px 10px;
}

.users-table .cell-sub {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-table .leadership-team-list {
  margin-top: .25rem;
  max-width: 14rem;
}

.users-actions-col {
  width: 116px;
  min-width: 116px;
  text-align: right;
  white-space: nowrap;
}

.users-table-actions {
  flex-wrap: nowrap;
}

.table-icon-button {
  width: 30px;
  height: 30px;
  padding: 6px;
}

.table-icon-button svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.table-icon-button.is-danger:hover,
.table-icon-button.is-danger:focus-visible {
  border-color: var(--danger);
  background: #fff1f2;
  color: var(--danger);
}

.table-icon-button.is-success:hover,
.table-icon-button.is-success:focus-visible {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: #217554;
}

@media (max-width: 640px) {
  .team-leader-team-grid {
    grid-template-columns: 1fr;
  }
}

.modal-dialog .form-row,
.drawer-panel .form-row,
.modal-dialog .form-row-3,
.drawer-panel .form-row-3 {
  align-items: start;
}

.password-reset-summary,
.generated-password-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.password-reset-summary strong {
  font-size: 16px;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.copy-field input {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
}

.modal-layer:not([hidden]) .modal-dialog,
.drawer-layer .drawer-panel {
  animation: surface-enter .16s ease-out;
}

@keyframes surface-enter {
  from {
    transform: translateY(8px);
  }

  to {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
  outline: 0;
  border-color: var(--brand);
  background: var(--brand-soft);
  color: #217554;
  text-decoration: none;
}

code {
  color: #344054;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.flash-stack {
  position: fixed;
  top: 78px;
  right: 16px;
  z-index: 140;
  display: grid;
  width: min(420px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.flash-stack-guest {
  top: 24px;
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .98);
  color: var(--text);
  line-height: 1.35;
  overflow-wrap: anywhere;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.flash::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(67, 185, 133, .14);
}

.flash.is-dismissing {
  opacity: 0;
  transform: translateX(16px);
}

.flash-message {
  flex: 1 1 auto;
  min-width: 0;
}

.flash-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: -5px -6px -4px 4px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 650;
  line-height: 1;
  opacity: .72;
  pointer-events: auto;
}

.flash-dismiss:hover,
.flash-dismiss:focus-visible {
  outline: 0;
  background: rgba(16, 24, 40, .08);
  opacity: 1;
}

.flash.success {
  background: #f0fbf5;
  color: #0f5132;
  border-color: #bfead2;
  border-left-color: #43b985;
}

.flash.success::before {
  background: #43b985;
}

.flash.danger {
  background: #fff5f5;
  color: #842029;
  border-color: #f3c6ca;
  border-left-color: #dc3545;
}

.flash.danger::before {
  background: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, .12);
}

.flash.warning {
  background: #fff9eb;
  color: #664d03;
  border-color: #ffe2a8;
  border-left-color: #ffc107;
}

.flash.warning::before {
  background: #ffc107;
  box-shadow: 0 0 0 4px rgba(255, 193, 7, .16);
}

.status-pill {
  display: inline-block;
  min-width: 72px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
}

.status-green {
  background: #d1e7dd;
  color: #0f5132;
}

.status-yellow {
  background: #fff3cd;
  color: #664d03;
}

.status-red {
  background: #f8d7da;
  color: #842029;
}

.status-ooo {
  background: #cff4fc;
  color: #055160;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.badge-success {
  background: #d1e7dd;
  color: #0f5132;
}

.badge-warning {
  background: #fff3cd;
  color: #664d03;
}

.badge-danger {
  background: #f8d7da;
  color: #842029;
}

.badge-info {
  background: #cff4fc;
  color: #055160;
}

.badge-muted {
  background: #eef2f6;
  color: #475467;
}

.security-note {
  background: #fff8f8;
  border-color: #f5c2c7;
}

.security-note h2,
.security-note h3 {
  color: #842029;
}

.policy-list {
  margin: 0;
  padding-left: 18px;
  color: #475467;
}

.policy-list li + li {
  margin-top: 8px;
}

.settings-summary {
  margin-bottom: 16px;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}

.metric-chip strong {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 700;
}

.metric-chip-label {
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-chip .muted {
  font-size: 12px;
}

.time-header-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.time-week-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.time-lock-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid rgba(199, 126, 23, .24);
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 13px;
  line-height: 1;
}

.time-week-lock {
  margin-inline: 1px;
}

.time-header-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.time-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  align-self: flex-end;
}

.time-header-actions .week-picker {
  min-width: min(390px, 100%);
}

.week-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.week-navigation-today {
  min-width: 0;
}

.week-navigation-current-label {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.week-navigation-step {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.week-navigation-today-button,
.week-navigation-today-button:hover {
  border-color: var(--brand-hover);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-hover) 100%);
  color: #fff;
}

.week-navigation-step-button {
  border-color: #2457a7;
  background: linear-gradient(180deg, #3269ba 0%, #2457a7 100%);
  color: #fff;
}

.week-navigation-step-button:hover {
  border-color: #1d478a;
  background: linear-gradient(180deg, #2b5da8 0%, #1d478a 100%);
  color: #fff;
}

.form-section {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.form-section + .form-section {
  margin-top: 14px;
}

.form-section-title {
  padding: 0 6px;
  margin-left: -2px;
  color: var(--muted-strong);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.time-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.time-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.time-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-hover) 100%);
  transition: width .3s ease;
}

.time-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-strong);
  font-weight: 600;
}

.time-page-header {
  align-items: flex-start;
  flex-wrap: wrap;
}

.dashboard-hero {
  align-items: center;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.dashboard-week-panel {
  margin-bottom: 0;
}

.dashboard-week-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-week-value {
  display: block;
  color: var(--brand-dark);
  font-size: 44px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dashboard-week-unit {
  margin-left: 3px;
  font-size: 20px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
}

.dashboard-week-label {
  display: block;
  margin-top: 4px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-week-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.dashboard-week-meta > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

.dashboard-week-meta strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.dashboard-week-meta span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-week-panel .time-progress {
  margin-bottom: 18px;
}

.dashboard-week-actions {
  margin-top: 4px;
}

.dashboard-side-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-side-stat {
  min-height: 0;
  padding: 14px 16px;
}

.dashboard-side-stat strong {
  font-size: 22px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Role-aware field guide */
.help-hero {
  align-items: center;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(115deg, rgba(47, 154, 111, .1), transparent 44%),
    linear-gradient(180deg, #fff 0%, #f4f8f6 100%);
}

.help-hero::after {
  content: "?";
  position: absolute;
  right: 150px;
  bottom: -44px;
  color: rgba(31, 128, 91, .07);
  font-size: 150px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.help-kicker {
  margin: 0 0 7px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.help-hero .muted {
  max-width: 650px;
  margin: 8px 0 0;
}

.help-role-card {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 180px;
  gap: 2px;
  padding: 13px 16px;
  color: #fff;
  background: #163c32;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(13, 50, 39, .18);
}

.help-role-card span,
.help-role-card small {
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
}

.help-role-card strong {
  font-size: 15px;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.help-index {
  position: sticky;
  top: 84px;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.help-index-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 17px 18px;
  color: #fff;
  background: #163c32;
}

.help-index-heading h2,
.help-index-heading p {
  margin: 0;
}

.help-index-heading p {
  margin-top: 2px;
  color: rgba(255, 255, 255, .65);
  font-size: 12px;
}

.help-index-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #173b31;
  background: #8fe1bd;
  border-radius: 50%;
  font-weight: 800;
}

.help-index-links {
  display: grid;
  padding: 8px;
}

.help-index-links a {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 9px 8px;
  color: var(--ink);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.help-index-links a span {
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.help-index-links a:hover,
.help-index-links a:focus-visible {
  color: var(--brand-dark);
  background: rgba(47, 154, 111, .09);
  outline: none;
}

.help-mobile-index {
  display: none;
}

.help-guides {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.help-guide {
  margin: 0;
  padding: 0;
  scroll-margin-top: 88px;
  overflow: clip;
}

.help-guide > summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 26px;
  gap: 13px;
  align-items: center;
  padding: 17px 19px;
  cursor: pointer;
  list-style: none;
}

.help-guide > summary::-webkit-details-marker {
  display: none;
}

.help-guide > summary:hover {
  background: rgba(47, 154, 111, .045);
}

.help-guide > summary:focus-visible {
  outline: 3px solid rgba(47, 154, 111, .3);
  outline-offset: -3px;
}

.help-guide[open] > summary {
  background: linear-gradient(90deg, rgba(47, 154, 111, .095), transparent 70%);
  border-bottom: 1px solid var(--line);
}

.help-guide-sequence {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--brand-dark);
  background: rgba(47, 154, 111, .12);
  border: 1px solid rgba(47, 154, 111, .22);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.help-guide-heading {
  display: grid;
  gap: 4px;
}

.help-guide-heading strong {
  font-size: 15px;
}

.help-guide-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
  line-height: 1.4;
}

.help-guide-toggle {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand-dark);
  border-bottom: 2px solid var(--brand-dark);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .16s ease;
}

.help-guide[open] .help-guide-toggle {
  transform: rotate(225deg) translate(-2px, -2px);
}

.help-guide-body {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr);
  gap: 22px;
  padding: 20px;
  background: #fff;
}

.help-steps h2 {
  margin-bottom: 13px;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.help-steps ol {
  display: grid;
  gap: 11px;
  margin: 0 0 18px;
  padding-left: 25px;
}

.help-steps li {
  padding-left: 3px;
  color: #344840;
  font-size: 13px;
  line-height: 1.55;
}

.help-steps li::marker {
  color: var(--brand-dark);
  font-weight: 800;
}

.help-figure {
  min-width: 0;
  margin: 0;
}

.help-screenshot-frame {
  position: relative;
  min-height: 180px;
  padding: 9px;
  overflow: hidden;
  background: #e8efec;
  border: 1px solid #cbdad4;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(18, 59, 48, .1);
}

.help-screenshot-label {
  position: absolute;
  z-index: 1;
  top: 16px;
  left: 16px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(16, 48, 39, .88);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.help-screenshot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.help-figure figcaption {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .help-hero {
    align-items: stretch;
  }

  .help-role-card {
    min-width: 0;
  }

  .help-layout,
  .help-guide-body {
    grid-template-columns: 1fr;
  }

  .help-index {
    position: static;
  }

  .help-index-links {
    display: none;
  }

  .help-mobile-index {
    display: block;
    padding: 10px;
  }

  .help-mobile-index > summary {
    padding: 10px 12px;
    color: var(--brand-dark);
    background: rgba(47, 154, 111, .09);
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
  }

  .help-mobile-index > summary:focus-visible {
    outline: 3px solid rgba(47, 154, 111, .3);
  }

  .help-mobile-index-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 2px 2px;
  }

  .help-mobile-index-links a {
    padding: 8px 9px;
    color: var(--ink);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
  }

  .help-mobile-index-links a:hover,
  .help-mobile-index-links a:focus-visible {
    color: var(--brand-dark);
    background: rgba(47, 154, 111, .09);
    outline: none;
  }
}

@media (max-width: 520px) {
  .help-hero::after {
    display: none;
  }

  .help-mobile-index-links {
    grid-template-columns: 1fr;
  }

  .help-guide > summary {
    grid-template-columns: 34px minmax(0, 1fr) 18px;
    gap: 10px;
    padding: 14px;
  }

  .help-guide-sequence {
    width: 34px;
    height: 34px;
  }

  .help-guide-body {
    gap: 18px;
    padding: 16px;
  }
}

.time-workspace {
  display: grid;
  grid-template-columns: minmax(520px, 1.14fr) minmax(320px, .86fr);
  grid-template-areas: "log summary";
  gap: 16px;
  align-items: start;
}

.time-summary-rail {
  grid-area: summary;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.time-summary-rail .panel,
.time-log-panel {
  margin-bottom: 0;
}

.time-log-panel {
  grid-area: log;
  position: sticky;
  top: 88px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(244, 251, 247, .98) 100%),
    #fff;
  border-color: rgba(67, 185, 133, .42);
  border-top: 4px solid var(--brand);
  box-shadow: var(--shadow-lg);
}

.time-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.time-stat {
  min-height: 96px;
  padding: 14px;
  box-shadow: none;
}

.time-focus-panel .panel-header {
  align-items: center;
}

.time-focus-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.time-focus-summary span {
  display: block;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.today-entry-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.today-entry-table {
  width: 100%;
  min-width: 330px;
  table-layout: fixed;
  border-collapse: collapse;
  background: #fff;
  font-size: 11px;
}

.today-entry-table th,
.today-entry-table td {
  padding: 7px 5px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-entry-table th {
  color: var(--muted-strong);
  background: var(--bg-subtle);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.today-entry-table th:nth-child(n + 3),
.today-entry-table td:nth-child(n + 3) {
  text-align: right;
}

.today-entry-table th:nth-child(1) { width: 19%; }
.today-entry-table th:nth-child(2) { width: 28%; }
.today-entry-table th:nth-child(3),
.today-entry-table th:nth-child(4) { width: 15%; }
.today-entry-table th:nth-child(5) { width: 23%; }

.today-entry-table tbody tr:last-child td {
  border-bottom: 0;
}

.today-entry-empty {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  text-align: center;
}

.time-focus-meta {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.time-focus-meta span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 600;
}

.time-focus-meta span::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--brand);
}

.time-empty-state {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
}

.time-entry-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-entry-form .form-row > div,
.time-entry-form .form-row-3 > div,
.time-entry-form fieldset > div,
.time-entry-form .duration-input {
  position: relative;
}

.time-log-panel .form-section {
  background: #fff;
  border-color: rgba(67, 185, 133, .22);
}

.native-project-select,
.searchable-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.project-picker {
  position: relative;
}

.project-picker-button {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 34px 9px 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.project-picker-button::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.project-picker-button:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.project-picker-selected-label {
  min-width: 0;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-picker-code {
  color: var(--brand-dark);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.project-picker-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: none;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, .2);
}

.project-picker-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  width: 100%;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(208, 215, 222, .8);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.project-picker-row:nth-child(even) {
  background: #f4f8fb;
}

.project-picker-row:hover,
.project-picker-row[aria-selected="true"] {
  background: var(--brand-surface);
}

.project-picker-code,
.project-picker-name {
  display: block;
  min-width: 0;
  padding: 8px 10px;
  white-space: nowrap;
}

.project-picker-code {
  overflow: hidden;
  border-right: 1px solid rgba(67, 185, 133, .18);
  text-overflow: ellipsis;
}

.project-picker-code-system {
  border-right-color: rgba(29, 78, 216, .22);
  color: #1d4ed8;
}

.project-picker-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
}

.entry-mode-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.entry-mode-card {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}

.entry-mode-card > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.searchable-select {
  position: relative;
}

.searchable-select [hidden] {
  display: none;
}

.searchable-select-trigger {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 9px 34px 9px 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.searchable-select-trigger::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.searchable-select-trigger:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: var(--focus-ring);
}

.searchable-select-trigger:disabled {
  background: var(--bg-subtle);
  color: var(--muted);
  cursor: not-allowed;
}

.searchable-select-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-select-menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, .2);
}

.searchable-select-menu.project-picker-menu {
  right: auto;
  width: min(620px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

.project-picker-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.project-picker-group-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: 12px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.project-picker-group-toggle[aria-expanded="false"]::after {
  transform: rotate(-45deg);
}

.project-picker-group-count {
  margin-left: auto;
  padding-left: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.project-picker-group + .project-picker-group {
  border-top: 1px solid var(--line-strong);
}

.project-picker-group .project-picker-row:nth-child(odd) {
  background: #f4f8fb;
}

.project-picker-group .project-picker-row:hover,
.project-picker-group .project-picker-row[aria-selected="true"] {
  background: var(--brand-surface);
}

.searchable-select-input {
  width: calc(100% - 16px);
  min-height: 36px;
  margin: 0 8px 8px;
}

.searchable-select-options {
  max-height: 258px;
  overflow-y: auto;
}

.searchable-select-option {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid rgba(208, 215, 222, .8);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option[aria-selected="true"] {
  background: var(--brand-surface);
}

.searchable-select-option.project-picker-row:not([hidden]) {
  display: grid;
  padding: 0;
}

.searchable-select-empty {
  margin: 0;
  padding: 12px;
  text-align: center;
}

@media (max-width: 640px) {
  .searchable-select-menu.project-picker-menu {
    width: min(100%, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
  }
}

.entry-mode-card-body {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .05s ease;
}

.entry-mode-card:hover .entry-mode-card-body {
  border-color: var(--brand);
  background: var(--brand-surface);
}

.entry-mode-card input:checked + .entry-mode-card-body {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 2px rgba(67, 185, 133, .18), var(--shadow-sm);
}

.entry-mode-card input:focus-visible + .entry-mode-card-body {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(67, 185, 133, .24), var(--shadow-sm);
}

.entry-mode-card input:active + .entry-mode-card-body {
  transform: translateY(1px);
}

.entry-mode-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.entry-mode-copy {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.time-entry-form .form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.time-entry-form .time-date-row {
  grid-template-columns: minmax(220px, .84fr) minmax(320px, 1.16fr);
  align-items: start;
}

.time-entry-form .form-row-3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.time-entry-form .form-row-3 > div {
  grid-column: 1 / -1;
}

.time-checkbox {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.time-checkbox:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.checkbox:not(.time-checkbox) {
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted-strong);
  font-weight: 600;
}

.checkbox:not(.time-checkbox):hover {
  border-color: rgba(67, 185, 133, .45);
  background: var(--brand-surface);
}

.time-flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.time-flag-row .time-checkbox {
  flex: 1 1 140px;
}

.time-form-actions {
  margin-top: 14px;
}

.time-form-actions .btn {
  min-height: 40px;
  padding: 10px 18px;
  font-size: 14px;
}

.duration-field {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.time-range-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.time-range-duration-pill {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(67, 185, 133, .35);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.time-range-duration-pill.is-unavailable {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--muted);
}

.calendar-page-header {
  align-items: center;
  padding-block: 18px;
}

.calendar-week-controls {
  display: grid;
  gap: 6px;
  width: min(390px, 100%);
  margin-left: auto;
}

.calendar-week-controls.has-calendar-owner {
  width: min(720px, 100%);
}

.calendar-primary-controls {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.calendar-week-column {
  display: grid;
  gap: 6px;
  flex: 1 1 390px;
  min-width: 300px;
}

.calendar-week-column .week-picker-popover {
  max-width: 100%;
}

.calendar-week-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-week-picker input {
  min-width: 158px;
}

.calendar-board {
  --calendar-unscheduled-height: 102px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
}

.calendar-time-gutter {
  display: grid;
  grid-template-rows: calc(64px + var(--calendar-unscheduled-height)) 780px 39px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.calendar-time-gutter-track,
.calendar-mobile-gutter {
  position: relative;
  height: 780px;
}

.calendar-time-gutter-track span,
.calendar-mobile-gutter span {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  white-space: nowrap;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--line);
  box-shadow: var(--shadow);
  gap: 1px;
}

.calendar-day {
  display: grid;
  grid-template-rows: 64px var(--calendar-unscheduled-height) 780px 39px;
  min-width: 0;
  background: #fff;
}

.calendar-day.is-today {
  box-shadow: inset 0 4px 0 var(--brand);
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-muted);
}

.calendar-day.is-today .calendar-day-header {
  background: var(--brand-soft);
}

.calendar-day-header > div {
  display: grid;
  gap: 1px;
}

.calendar-day-name {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.calendar-day-date {
  font-size: 16px;
  font-weight: 800;
}

.calendar-day-total {
  padding: 4px 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.calendar-unscheduled {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
  overflow: visible;
}

.calendar-section-label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.calendar-empty,
.calendar-no-schedule {
  color: var(--muted);
  font-size: 10px;
}

.calendar-selection-preview {
  position: absolute;
  inset-inline: 4px;
  z-index: 10;
  padding: 1px 4px;
  border: 1px solid var(--brand);
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  pointer-events: none;
  font-size: 10px;
  font-weight: 700;
  line-height: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-selection-preview.is-invalid {
  border-color: var(--danger);
  color: var(--danger-dark);
}

.calendar-schedule.is-selecting {
  cursor: crosshair;
  user-select: none;
}

.calendar-entry {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border-radius: 6px;
  text-decoration: none;
}

.calendar-entry-open {
  display: grid;
  min-width: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-entry-open:disabled {
  cursor: not-allowed;
}

.calendar-entry:has(.calendar-drag-handle) .calendar-entry-open {
  padding-right: 38px;
}

.calendar-drag-handle {
  position: absolute;
  top: 50%;
  right: 2px;
  z-index: 4;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: currentColor;
  cursor: grab;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  touch-action: none;
  transform: translateY(-50%);
}

.calendar-drag-handle:active {
  cursor: grabbing;
}

.calendar-drag-handle:focus-visible {
  border-radius: 5px;
  outline: 2px solid var(--brand-dark);
  outline-offset: -4px;
}

.calendar-entry.is-drag-source {
  opacity: .55;
}

.calendar-drop-target.is-valid-drop {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}

.calendar-drop-target.is-invalid-drop {
  outline: 3px dashed var(--danger);
  outline-offset: -3px;
}

.calendar-drag-ghost {
  position: fixed;
  z-index: 2000;
  width: min(220px, 45vw);
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}

.calendar-entry.calendar-drag-ghost {
  position: fixed;
  display: block;
  min-height: 48px;
  padding: 9px 46px 9px 10px;
  overflow: hidden;
  border: 1px solid var(--brand-dark);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  opacity: .94;
}

.calendar-entry.calendar-drag-ghost.is-scheduled-preview {
  display: grid;
  min-height: 31px;
  padding: 7px 46px 7px 7px;
  border-color: var(--brand-dark);
  background: linear-gradient(135deg, #dff7ec, #eefaf5);
  color: #145c41;
}

.calendar-entry strong,
.calendar-entry span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-entry strong {
  font-size: 10px;
  line-height: 1.25;
}

.calendar-entry span {
  font-size: 9px;
  line-height: 1.3;
}

.calendar-entry.is-unscheduled {
  position: relative;
  flex: 0 0 auto;
  padding: 7px;
  border: 1px solid rgba(71, 85, 105, .17);
  background: #fff;
  color: var(--muted-strong);
}

.calendar-entry.is-unscheduled:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.calendar-schedule {
  position: relative;
  height: 780px;
  min-height: 780px;
  overflow: hidden;
  cursor: crosshair;
  background:
    repeating-linear-gradient(to bottom, transparent 0, transparent 14px, rgba(148, 163, 184, .18) 15px),
    repeating-linear-gradient(to bottom, #fff 0, #fff 59px, #dbe3e8 60px);
}

.calendar-day-timeline {
  min-width: 0;
}

.calendar-mobile-gutter {
  display: none;
}

.calendar-day.is-locked .calendar-schedule {
  cursor: not-allowed;
  background:
    repeating-linear-gradient(135deg, rgba(148, 163, 184, .08) 0, rgba(148, 163, 184, .08) 7px, transparent 7px, transparent 14px),
    repeating-linear-gradient(to bottom, #f8fafc 0, #f8fafc 59px, #dbe3e8 60px);
}

.calendar-hour-line {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}

.calendar-entry.is-scheduled {
  position: absolute;
  right: 6px;
  left: 6px;
  z-index: 1;
  min-height: 31px;
  padding: 7px;
  border: 1px solid rgba(29, 120, 83, .2);
  background: linear-gradient(135deg, #dff7ec, #eefaf5);
  color: #145c41;
  box-shadow: 0 2px 8px rgba(27, 93, 68, .08);
}

.calendar-entry.is-scheduled:hover {
  border-color: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(27, 93, 68, .15);
}

.calendar-resize-handle,
.calendar-entry-lock-edge {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 5;
  height: 10px;
  opacity: 0;
  transition: opacity .12s ease;
}

.calendar-resize-handle {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.calendar-resize-handle::after {
  position: absolute;
  top: 50%;
  right: 18%;
  left: 18%;
  height: 3px;
  border-radius: 999px;
  background: var(--brand-dark);
  content: '';
  transform: translateY(-50%);
}

.calendar-entry-lock-edge {
  display: grid;
  place-items: center;
  color: #475569;
  font-size: 10px;
  pointer-events: none;
}

.calendar-resize-handle.is-start,
.calendar-entry-lock-edge.is-start {
  top: 0;
}

.calendar-resize-handle.is-end,
.calendar-entry-lock-edge.is-end {
  bottom: 0;
}

.calendar-entry.is-scheduled:hover .calendar-resize-handle,
.calendar-entry.is-scheduled:hover .calendar-entry-lock-edge,
.calendar-resize-handle:focus-visible {
  opacity: 1;
}

.calendar-entry.is-resizing {
  z-index: 6;
  box-shadow: 0 8px 18px rgba(27, 93, 68, .22);
}

@media (prefers-reduced-motion: reduce) {
  .calendar-drag-ghost {
    transition: none;
  }
}

.calendar-no-schedule {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 90%;
  transform: translateX(-50%);
  text-align: center;
}

.calendar-add-day {
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.calendar-add-day:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.calendar-time-fields {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.calendar-time-fields .is-duration-only {
  opacity: .55;
}

.calendar-modal-actions [data-calendar-duplicate] {
  margin-right: auto;
}

.calendar-add-day:hover {
  background: var(--brand-soft);
}

.detailed-filter-primary {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.detailed-report-table {
  min-width: 1120px;
}

.detailed-report-table .detailed-description {
  min-width: 250px;
  max-width: 420px;
  white-space: normal;
}

.detailed-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

@media (max-width: 1000px) {
  .calendar-board {
    display: block;
  }

  .calendar-time-gutter {
    display: none;
  }

  .week-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
    gap: 12px;
  }

  .calendar-day {
    grid-template-rows: auto auto 520px auto;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .calendar-schedule {
    height: 520px;
    min-height: 520px;
    background:
      repeating-linear-gradient(to bottom, transparent 0, transparent 9px, rgba(148, 163, 184, .18) 10px),
      repeating-linear-gradient(to bottom, #fff 0, #fff 39px, #dbe3e8 40px);
  }

  .calendar-day-timeline {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .calendar-mobile-gutter {
    display: block;
    height: 520px;
    border-right: 1px solid var(--line);
    background: var(--surface-muted);
  }
}

@media (max-width: 900px) {
  .calendar-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-week-controls,
  .calendar-week-controls.has-calendar-owner {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .calendar-page-header {
    align-items: stretch;
  }

  .calendar-week-controls {
    width: 100%;
    min-width: 0;
  }

  .calendar-primary-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-primary-controls > .calendar-owner-control {
    flex: 0 0 auto;
    width: 100%;
  }

  .calendar-week-column {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }

  .calendar-week-picker {
    flex: 1;
  }

  .calendar-week-picker input {
    width: 100%;
    min-width: 0;
  }

  .week-calendar {
    grid-template-columns: minmax(0, 1fr);
  }

  .calendar-day {
    grid-template-rows: auto auto 520px auto;
  }

  .calendar-schedule {
    min-height: 520px;
  }

  .calendar-time-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .time-range-field {
    grid-template-columns: minmax(0, 1fr);
  }
}

.duration-input input {
  text-align: right;
}

.duration-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 27px;
}

.duration-preset {
  min-height: 34px;
  padding: 7px 9px;
  border-color: rgba(67, 185, 133, .32);
  background: #fff;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.duration-preset:hover,
.duration-preset:focus-visible {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.time-log-header {
  align-items: center;
}

.time-weekly-detail {
  margin-top: 16px;
}

.week-detail-grid {
  display: grid;
  gap: 14px;
}

.week-detail-day {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  scroll-margin-top: 88px;
  box-shadow: var(--shadow-sm);
}

.week-detail-day-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-subtle);
  cursor: pointer;
  list-style: none;
  transition: background .15s ease;
}

.week-detail-day-header::-webkit-details-marker {
  display: none;
}

.week-detail-day-header::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted-strong);
  border-bottom: 2px solid var(--muted-strong);
  transform: rotate(-45deg);
  transition: transform .15s ease;
}

.week-detail-day[open] .week-detail-day-header {
  border-bottom: 1px solid var(--line);
}

.week-detail-day[open] .week-detail-day-header::before {
  transform: rotate(45deg);
}

.week-detail-day-header:hover,
.week-detail-day-header:focus-visible {
  background: var(--brand-surface);
  outline: 0;
}

.week-detail-day-body {
  background: #fff;
}

.week-detail-day-title h3 {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 15px;
}

.week-detail-day-title {
  flex: 1 1 auto;
  min-width: 0;
}

.week-detail-day-title p {
  margin-bottom: 0;
  font-size: 12px;
}

.week-detail-day-aside {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.week-detail-day.is-locked .week-detail-day-header {
  background: var(--warning-soft);
}

.day-lock-icon {
  width: 30px;
  height: 30px;
  background: #fff8e6;
}

.week-detail-day.is-today {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow);
}

.week-detail-day.is-today .week-detail-day-header {
  background: var(--brand-soft);
}

.week-detail-day .table-wrap {
  border: 0;
  border-radius: 0;
}

.entry-table-wrap table {
  font-size: 13px;
}

.entry-table-wrap th {
  background: #fafbfc;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.entry-table-wrap tbody tr:nth-child(odd) td {
  background: #fff;
}

.entry-table-wrap tbody tr:nth-child(even) td {
  background: #e6eef7;
}

.entry-table-wrap tr:hover td {
  background: var(--brand-surface);
}

.cell-sub {
  display: block;
  font-size: 11.5px;
  margin-top: 2px;
}

.entry-description {
  max-width: 320px;
  color: var(--muted-strong);
}

.entry-actions-col {
  width: 112px;
  min-width: 112px;
  white-space: nowrap;
  text-align: right;
}

.entry-actions-col .table-actions {
  flex-wrap: nowrap;
}

.entry-actions-col .inline-form {
  display: inline-flex;
}

.compact-table-wrap th,
.compact-table-wrap td {
  padding: 9px 12px;
}

.backup-log {
  max-height: 320px;
  overflow: auto;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(67, 185, 133, .18) 0%, rgba(67, 185, 133, 0) 42%),
    linear-gradient(180deg, #1f2429 0%, #151a1f 100%);
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 28px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-lg);
  box-shadow: 0 26px 70px rgba(0, 0, 0, .36);
}

.login-card h1 {
  font-size: 22px;
}

.login-card .muted {
  margin-bottom: 16px;
}

.login-card .grid {
  gap: 14px;
}

.login-card .btn {
  min-height: 42px;
  font-size: 14px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-strong);
  font-weight: 700;
}

.inline-form {
  display: inline;
}

.checkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 0;
}

.checkbox input {
  width: auto;
  min-height: auto;
}

@media (max-width: 1180px) {
  .topbar-inner {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .has-js .nav {
    display: none;
  }

  .has-js .nav.is-open {
    display: flex;
  }

  .nav {
    width: 100%;
    margin-left: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    justify-content: flex-start;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-link,
  .nav-logout,
  .account-chip,
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 4px;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
    box-shadow: none;
  }

  .nav-dropdown-menu .nav-link {
    color: #fff;
  }

  .nav-dropdown-menu .nav-link:hover,
  .nav-dropdown-menu .nav-link.is-active {
    background: rgba(67, 185, 133, .18);
    color: var(--brand);
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 4px 0;
  }

  .nav-user {
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: stretch;
  }

  .nav-user .account-chip {
    grid-column: 1 / -1;
  }

  .nav-user .inline-form {
    grid-column: 1;
  }

  .nav-user .help-utility-link {
    grid-column: 2;
  }

  .account-name {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .admin-grid,
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 16px;
  }

  .page-header,
  .page-header.admin-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .modal-layer {
    align-items: end;
    padding: 10px;
  }

  .modal-dialog {
    max-height: calc(100vh - 20px);
  }

  .drawer-panel,
  .drawer-panel-narrow {
    width: 100%;
    border-radius: 0;
  }

  .report-hero-top {
    align-items: stretch;
    flex-direction: column;
  }

  .report-filter-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-chart-panel .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .chart-timeline-toggle {
    align-self: flex-start;
  }
}

@media (max-width: 520px) {
  .report-filter-primary,
  .report-filter-secondary {
    grid-template-columns: 1fr;
  }

  .report-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .report-filter-actions > .actions {
    width: 100%;
  }

  .report-filter-actions > .actions > * {
    flex: 1;
  }

  .brand-product {
    display: none;
  }

  .topbar-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .login-card {
    padding: 20px;
  }

  .chart-timeline-toggle {
    width: 100%;
  }

  .chart-timeline-toggle a {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media (max-width: 1160px) {
  .time-workspace {
    grid-template-columns: minmax(460px, 1.12fr) minmax(280px, .88fr);
  }

  .time-stat-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 900px) {
  .time-workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "log"
      "summary";
  }

  .time-log-panel {
    position: static;
  }

  .time-stat-grid,
  .entry-mode-cards,
  .time-entry-form .form-row,
  .time-entry-form .form-row-3,
  .time-entry-form .time-date-row {
    grid-template-columns: 1fr;
  }

  .duration-field {
    grid-template-columns: 1fr;
  }

  .duration-presets {
    padding-top: 0;
  }

  .time-entry-form .form-row-3 > div {
    grid-column: auto;
  }

  .week-detail-day-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .week-detail-day-aside {
    width: 100%;
    justify-content: flex-start;
  }

  .time-header-chips {
    width: 100%;
  }

  .time-header-actions {
    width: 100%;
    align-self: stretch;
  }

  .time-header-actions .week-picker,
  .week-picker {
    min-width: 0;
  }

  .entry-description {
    max-width: none;
  }
}
.multi-select-filter .checkbox.is-disabled { opacity: .48; cursor: not-allowed; }
.estimate-fields { border: 1px solid var(--border); border-radius: 10px; padding: 1rem; }
.estimate-fields legend { font-weight: 700; padding: 0 .35rem; }
.function-metrics { margin-bottom: 1rem; }

.calendar-owner-control {
  flex: 0 1 310px;
  min-width: 0;
}

.calendar-owner-control .searchable-select {
  width: 100%;
}

.calendar-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem 1.25rem;
  margin: 0 0 1.25rem;
}

.calendar-detail-list div { min-width: 0; }

.calendar-detail-list dt {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.calendar-detail-list dd {
  margin: .2rem 0 0;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .calendar-detail-list { grid-template-columns: 1fr; }
}
