:root {
  --bg: #f2f5f9;
  --panel: #ffffff;
  --ink: #1c2331;
  --muted: #6c7a90;
  --accent: #1c7ed6;
  --accent-strong: #0b5fa8;
  --line: #e2e9f2;
  --nav: #f7fbff;
  --nav-border: #d8e6f7;
  --shadow: 0 18px 45px rgba(25, 46, 88, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Calibri", "Tahoma", sans-serif;
  background: linear-gradient(180deg, #edf4ff 0%, var(--bg) 50%, #f6f8fb 100%);
  color: var(--ink);
}

.topbar {
  background: #0a63b4;
  color: white;
  padding: 12px 26px 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 30px rgba(10, 99, 180, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: block;
  width: 132px;
  max-width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-inbox-link {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
}

.top-inbox-link:hover,
.top-inbox-link:focus,
.top-inbox-link:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  color: #ffffff;
  text-decoration: none;
}

.top-inbox-link svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.top-inbox-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #c63030;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  border: 1px solid #0a63b4;
  pointer-events: none;
}

.top-search {
  border-radius: 999px;
  border: none;
  padding: 8px 16px;
  width: 240px;
  font-size: 13px;
}

.top-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #0a63b4;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  border: none;
  cursor: pointer;
}

.user-menu {
  position: relative;
}

.top-avatar-wrap {
  position: relative;
  display: inline-flex;
}

.top-avatar-notify {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #c63030;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
  border: 1px solid #0a63b4;
  box-sizing: border-box;
  pointer-events: none;
}

.notification-archive-card {
  margin-top: 14px;
}

.inbox-overview-grid {
  margin-bottom: 14px;
}

.inbox-row-unread td {
  background: #f5faff;
}

.inbox-row-unread-outgoing td {
  background: #fff9ec;
}

.inbox-title-cell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.inbox-title-cell .pill {
  flex: 0 0 auto;
  white-space: nowrap;
}

.inbox-title-cell strong {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inbox-status-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inbox-compose-feedback {
  margin-bottom: 10px;
  color: #b54708;
}

.inbox-actions-inline {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.inbox-actions-inline .btn-secondary,
.inbox-actions-inline .icon-button {
  flex: 0 0 auto;
}

.inbox-actions-inline .btn-secondary {
  white-space: nowrap;
}

.inbox-complete-form {
  display: inline-flex;
}

.inbox-complete-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.inbox-complete-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #1d6d3f;
}

.inbox-sent-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.inbox-sent-copy strong,
.inbox-sent-copy .helper {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inbox-compose-grid {
  margin-bottom: 8px;
}

#inboxComposeModal textarea,
.inbox-page textarea {
  min-height: 140px;
  max-width: 100%;
  resize: vertical;
}

#allocationModal textarea,
#editAllocationModal textarea,
#projectPurchaseEditModal textarea {
  resize: vertical;
}

.inbox-page .table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inbox-page .table {
  width: 100%;
  table-layout: fixed;
}

.inbox-page .table th,
.inbox-page .table td {
  min-width: 0;
}

.inbox-page .table .table-actions-col {
  width: 110px;
}

.inbox-page .table .table-actions-col:last-child {
  white-space: nowrap;
}

.inbox-page .table .table-actions-col .table-actions-inline {
  justify-content: flex-end;
}

.inbox-table-tasks th:nth-child(1),
.inbox-table-outgoing th:nth-child(1),
.inbox-table-sent th:nth-child(1),
.inbox-table-archive th:nth-child(1) {
  width: 110px;
}

.inbox-table-tasks th:nth-child(2),
.inbox-table-messages th:nth-child(2) {
  width: 110px;
}

.inbox-table-outgoing th:nth-child(2),
.inbox-table-sent th:nth-child(2),
.inbox-table-archive th:nth-child(2) {
  width: 140px;
}

.inbox-table-tasks th:nth-child(5) {
  width: 150px;
}

.inbox-table-outgoing th:nth-child(5),
.inbox-table-sent th:nth-child(5),
.inbox-table-archive th:nth-child(5) {
  width: 170px;
}

.inbox-table-outgoing th:nth-child(6) {
  width: 150px;
}

.inbox-table-tasks th:nth-child(6) {
  width: 138px;
}

.inbox-table-outgoing th:nth-child(7) {
  width: 118px;
}

.inbox-table-messages th:nth-child(5),
.inbox-table-sent th:nth-child(6),
.inbox-table-archive th:nth-child(6) {
  width: 92px;
}

.inbox-status-stack .pill {
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.notification-archive-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  margin-bottom: 12px;
}

.notification-archive-summary h2 {
  margin: 0;
  font-size: 20px;
}

.notification-archive-summary-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notification-archive-summary-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.notification-archive-chevron {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0c355d;
  flex: 0 0 auto;
}

.notification-archive-chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease-in-out;
  display: block;
}

.notification-archive-card[open] .notification-archive-chevron {
  transform: none;
}

.notification-archive-card[open] .notification-archive-chevron::before {
  transform: rotate(45deg);
}

.notification-archive-summary::-webkit-details-marker {
  display: none;
}

.notification-archive-body {
  margin-top: 10px;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: white;
  border: 1px solid #d8e6f7;
  border-radius: 14px;
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 14px 28px rgba(10, 34, 73, 0.18);
  display: none;
  z-index: 1200;
}

.user-dropdown-name {
  padding: 8px 12px 10px;
  margin-bottom: 4px;
  color: #0c355d;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #e4edf8;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #0c355d;
  font-size: 14px;
}

.user-dropdown a:hover {
  background: #eef4fc;
}

.user-logout-form {
  margin: 0;
}

.user-logout-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #0c355d;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.user-logout-button:hover,
.user-logout-button:focus-visible {
  background: #eef4fc;
  color: #0c355d;
}

.user-dropdown.is-open {
  display: block;
}

.shell {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: calc(100vh - 64px);
}

.plan-fullscreen .shell {
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.plan-fullscreen .sidebar {
  display: none;
}

.plan-fullscreen .topbar {
  display: none;
}

.sidebar {
  background: var(--nav);
  border-right: 1px solid var(--nav-border);
  padding: 18px 10px;
}

.side-nav {
  display: grid;
  gap: 0;
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overflow-x: hidden;
}

.side-nav a {
  text-decoration: none;
  color: #0c355d;
  display: block;
  margin: 0 -10px;
  padding: 8px 16px;
  border-radius: 0;
  font-size: 14px;
}

.side-nav a:hover {
  background: #e2f0ff;
  color: #0c355d;
}

.side-nav-parent-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}

.side-nav-chevron {
  width: 10px;
  height: 10px;
  display: none;
  flex: 0 0 auto;
  color: #0c355d;
  margin-left: 8px;
}

.side-nav-chevron::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  display: block;
}

.side-nav-parent-link.has-recent-item .side-nav-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.side-nav a.side-nav-recent-link {
  background: transparent;
  color: #0a3157;
  font-size: 14px;
  margin: 2px 0 4px;
  padding: 6px 8px 6px 3ch;
  border-radius: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-nav-recent-link[hidden] {
  display: none !important;
}

.side-nav-recent-link:hover {
  background: #e9eef5;
  color: #0a3157;
}

.page {
  padding: 26px 32px 60px;
  max-width: 1200px;
}

.page.page-wide {
  max-width: none;
}

.page.plan-fullscreen {
  padding: 16px 20px 24px;
}

.page.plan-fullscreen .card {
  margin-bottom: 0;
}

.settings-card {
  max-width: 30%;
}

@media (max-width: 980px) {
  .settings-card {
    max-width: 100%;
  }
}

.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.page-status-badge-danger {
  background: #ffebeb;
  border: 1px solid #efb0b0;
  color: #b12222;
}

.page-subtitle {
  color: var(--muted);
  font-size: 13px;
}

.page-actions {
  margin-left: auto;
}

.kpi-card {
  background: #f7fbff;
  border: 1px solid #d6e6f8;
}

.kpi-header {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.kpi {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 12px 14px;
}

.kpi-label {
  font-size: 12px;
  color: var(--muted);
}

.kpi-value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 4px;
}

.tab-card {
  padding: 0;
  margin-bottom: 18px;
}

.tab-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-bottom: 1px solid var(--line);
}

.tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 18px;
  min-height: 58px;
  font-size: 14px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  background: #f7fbff;
  text-decoration: none;
}

.tab .pill {
  margin-left: 0;
  padding: 2px 8px;
  min-height: 22px;
  font-size: 11px;
  line-height: 1;
}

.tab:last-child {
  border-right: none;
}

.tab.active,
.tab.is-active {
  background: #0a63b4;
  color: white;
  font-weight: 600;
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #bb1e1e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
}

.tab-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding: 18px;
  background: #f7fbff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--panel);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.card-grid-auto {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.card-grid-auto > .card {
  margin-bottom: 0;
}

.invoice-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
}

.invoice-context-grid .kpi {
  min-width: 0;
}

.invoice-context-grid .kpi-value {
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
}

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

.invoice-header-info-column {
  display: grid;
  grid-template-rows: auto auto;
  gap: 12px;
}

.invoice-header-info-column .kpi {
  min-width: 0;
}

.invoice-header-info-column .kpi-value {
  font-size: 16px;
  line-height: 1.4;
  word-break: break-word;
}

.invoice-header-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.invoice-header-date-grid.compact {
  margin-top: 10px;
}

.invoice-header-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 14px 0 10px;
  align-items: stretch;
}

.invoice-header-details-column {
  min-width: 0;
  display: grid;
  gap: 10px;
  align-content: start;
}

.invoice-header-panel {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
  height: 100%;
}

.invoice-header-details-single {
  grid-template-columns: minmax(0, 1fr);
}

.invoice-header-stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.invoice-header-meta-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.invoice-header-meta-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.invoice-header-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 44px 44px minmax(86px, auto);
    row-gap: 12px;
}

.invoice-header-split-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
    height: 100%;
    padding: 0;
}

.invoice-header-stack-grid-single {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: initial;
}

.invoice-header-stack-grid-customer,
.invoice-header-split-grid-meta {
  gap: 0;
}

.invoice-header-stack-grid-customer > .invoice-header-stack-item,
.invoice-header-split-grid-meta > .invoice-header-split-row {
    border: 0;
}

.invoice-header-stack-grid-customer > .invoice-header-stack-item:not(:last-child),
.invoice-header-split-grid-meta > .invoice-header-split-row:not(:last-child) {
    border-bottom: 1px solid transparent;
}

.invoice-header-stack-grid-customer > .invoice-header-stack-item:not(.invoice-header-stack-item-address),
.invoice-header-split-row-compact {
    min-height: 0;
}

.invoice-header-stack-item-address,
.invoice-header-split-row-tall {
    min-height: 0;
}

.invoice-header-stack-grid-dates {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invoice-header-stack-item {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 2px;
  line-height: 1.4;
}

.invoice-header-stack-item-wide {
  grid-column: 1 / -1;
}

.invoice-header-inline-label {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.invoice-header-inline-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.invoice-header-inline-label {
  margin-bottom: 0;
  display: block;
}

.invoice-header-inline-value {
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.invoice-header-static-select {
  width: 100%;
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  color: #0b1f3b;
  font-size: 14px;
  line-height: 1.35;
  display: flex;
  align-items: center;
}

.invoice-header-inline-input {
  width: 100%;
  min-width: 0;
  min-height: 20px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0b1f3b;
  font: inherit;
  line-height: 1.4;
  outline: none;
  box-shadow: none !important;
  display: block;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

#invoiceHeaderEditorForm input.invoice-header-inline-input {
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.invoice-header-inline-input:focus,
.invoice-header-inline-input:hover,
.invoice-header-inline-input:active {
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
}

.invoice-header-inline-input.is-saving {
  opacity: 0.65;
}

.invoice-header-inline-row.wide {
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
}

.invoice-header-stack-item-meta .invoice-header-inline-label,
.invoice-header-stack-item-meta .invoice-header-inline-value {
    white-space: nowrap;
}

.invoice-header-stack-item-empty {
    visibility: hidden;
}

.invoice-header-inline-input::placeholder {
  color: #6f84a3;
  opacity: 1;
}

.invoice-header-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 900px) {
  .invoice-header-info-grid,
  .invoice-header-date-grid,
  .invoice-header-details {
    grid-template-columns: 1fr;
  }

  .invoice-header-stack-grid {
    grid-template-columns: 1fr;
  }

  .invoice-header-meta-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .invoice-header-split-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .invoice-header-stack-grid-dates {
    grid-template-columns: 1fr;
  }

  .invoice-header-inline-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.invoice-phase-card {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.invoice-phase-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 0 10px;
  cursor: pointer;
}

.invoice-phase-summary::-webkit-details-marker {
  display: none;
}

.invoice-phase-summary:hover {
  color: #0e223d;
}

.invoice-phase-summary-left,
.invoice-phase-summary-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-phase-summary-left {
  min-width: 0;
  flex: 1 1 auto;
}

.invoice-phase-summary-left > input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}

.invoice-phase-summary-left > span:last-child {
  min-width: 0;
}

.invoice-phase-summary-left strong {
  display: block;
  color: #0e223d;
  line-height: 1.2;
}

.invoice-phase-summary-left .helper {
  display: block;
  margin-top: 4px;
}

.invoice-phase-summary-right {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.invoice-phase-chevron {
  width: 18px;
  height: 18px;
  position: relative;
  flex: 0 0 auto;
}

.invoice-phase-chevron::before {
  content: "";
  position: absolute;
  inset: 4px 5px 5px 4px;
  border-right: 2px solid #0c355d;
  border-bottom: 2px solid #0c355d;
  transform: rotate(45deg);
  transition: transform 0.15s ease-in-out;
}

details.invoice-phase-card:not([open]) .invoice-phase-chevron::before,
details.invoice-nonbillable-card:not([open]) .invoice-phase-chevron::before {
    transform: rotate(-45deg);
}

.invoice-phase-body {
  padding: 0 0 6px;
}

.invoice-phase-body-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 12px;
}

.invoice-phase-body-header .helper {
  margin: 0;
}

.invoice-candidate-table td {
  vertical-align: middle;
}

.invoice-phase-selection-form {
  margin: 0;
}

.invoice-candidate-table .table-checkbox-col {
  width: 44px;
  text-align: center;
}

.invoice-candidate-table td:nth-child(5) {
  min-width: 260px;
}

.invoice-line-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.invoice-bulkbar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d8e5f4;
  border-radius: 10px;
  background: #e6f0ff;
}

.invoice-bulkbar.is-active {
  display: inline-flex;
}

.invoice-bulkbar-floating {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 32px));
  z-index: 220;
  box-shadow: 0 10px 24px rgba(19, 37, 66, 0.15);
  justify-content: space-between;
}

.invoice-bulkbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.invoice-bulkbar-actions [hidden] {
  display: none !important;
}

.invoice-line-card {
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.invoice-line-details {
  margin: 0;
}

.invoice-line-details summary {
  list-style: none;
}

.invoice-line-details summary::-webkit-details-marker {
  display: none;
}

.invoice-line-summary-grid {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 68px 46px 88px 66px 96px 44px;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.3;
}

.invoice-line-details summary:hover,
.invoice-line-details summary:focus-visible {
  background: transparent;
}

.invoice-line-summary-static {
  cursor: default;
}

.invoice-line-summary-static .invoice-line-cell {
  min-width: 0;
}

.invoice-line-input {
  display: block;
  width: 100%;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  font: inherit;
  font-family: inherit;
  font-size: inherit !important;
  font-weight: inherit;
  line-height: inherit !important;
  letter-spacing: inherit;
  color: inherit;
}

.invoice-line-input-text {
  resize: none;
  overflow: hidden;
}

.invoice-line-cell-numeric .invoice-line-input-number {
  text-align: right;
}

.invoice-line-cell-center .invoice-line-input-unit {
  text-align: center;
}

.invoice-line-cell-numeric,
.invoice-line-cell-center,
.invoice-line-input-number,
[data-line-vat-rate],
[data-line-total] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.invoice-decimal {
  display: inline-grid;
  grid-template-columns: auto min-content 2ch;
  align-items: baseline;
  justify-content: end;
  width: max-content;
  max-width: 100%;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.invoice-decimal-whole {
  text-align: right;
}

.invoice-decimal-separator,
.invoice-decimal-fraction {
  text-align: left;
}

.invoice-line-header {
  padding: 0 16px 10px;
  color: #597094;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.offer-estimate-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.offer-estimate-col-select {
  width: 32px;
}

.offer-estimate-col-cost {
  width: 104px;
}

.offer-estimate-col-factor {
  width: 96px;
}

.offer-estimate-col-sales {
  width: 112px;
}

.offer-estimate-col-margin {
  width: 112px;
}

.offer-estimate-col-actions {
  width: 44px;
}

.offer-estimate-table th {
  padding: 0 0 10px;
  color: #597094;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.offer-estimate-table .offer-estimate-head-item {
  text-align: left;
  padding-left: 16px;
}

.offer-estimate-table .offer-estimate-head-numeric {
  text-align: right;
  padding-right: 16px;
}

.offer-estimate-table td {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.offer-estimate-table .offer-estimate-select-col {
  width: 32px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.offer-estimate-table td:nth-child(3),
.offer-estimate-table td:nth-child(4),
.offer-estimate-table td:nth-child(5),
.offer-estimate-table td:nth-child(6),
.offer-estimate-table tfoot td:nth-child(3),
.offer-estimate-table tfoot td:nth-child(5),
.offer-estimate-table tfoot td:nth-child(6) {
  text-align: right;
}

.offer-estimate-table td:nth-child(3),
.offer-estimate-table td:nth-child(4),
.offer-estimate-table td:nth-child(5),
.offer-estimate-table td:nth-child(6),
.offer-estimate-table tfoot td:nth-child(3),
.offer-estimate-table tfoot td:nth-child(5),
.offer-estimate-table tfoot td:nth-child(6) {
  white-space: nowrap;
}

.offer-estimate-table th:last-child,
.offer-estimate-table td:last-child {
  width: 44px;
  text-align: center;
}

.offer-estimate-table .offer-estimate-actions-col {
  width: 44px;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.offer-estimate-table [data-offer-estimate-sales],
.offer-estimate-table [data-offer-estimate-margin],
.offer-estimate-table [data-offer-estimate-cost-total],
.offer-estimate-table [data-offer-estimate-sales-total],
.offer-estimate-table [data-offer-estimate-margin-total] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.offer-estimate-table td:nth-child(3) .invoice-line-input-number {
  text-align: right;
}

.offer-estimate-table td:nth-child(4) .invoice-line-input-number {
  text-align: right;
}

.offer-estimate-table .invoice-line-input {
  font-size: inherit !important;
  font-weight: inherit;
  line-height: inherit !important;
}

.offer-estimate-table tbody td,
.offer-estimate-table tbody td .invoice-line-input,
.offer-estimate-table tbody td .invoice-decimal,
.offer-estimate-table tfoot td,
.offer-estimate-table tfoot td .invoice-decimal,
.offer-estimate-table tfoot td span {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
}

.offer-estimate-table tfoot td {
  border-top: 1px solid var(--line);
}

.offer-estimate-table .icon-button-plain {
  margin-inline: auto;
}

.offer-estimate-table .table-total td,
.offer-estimate-table .table-total td span {
  font-weight: 400;
}

.offer-estimate-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.offer-estimate-metrics {
  margin-top: 6px;
}

.offer-estimate-metric {
  border: 1px solid #d6e6f8;
  border-radius: 10px;
  padding: 12px 14px;
  background: transparent;
}

.offer-estimate-metric .kpi-value {
  margin-top: 2px;
}

.invoice-line-cell {
  min-width: 0;
}

.invoice-line-description {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.invoice-line-selector {
  display: inline-flex;
  justify-content: center;
}

.invoice-line-drag-handle {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #7b8ca7;
  cursor: grab;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.invoice-line-drag-handle svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.invoice-line-drag-handle:hover,
.invoice-line-drag-handle:focus-visible {
  background: transparent;
  color: #7b8ca7;
  box-shadow: none;
  border: 0;
}

.invoice-line-drag-handle:active {
  cursor: grabbing;
}

.invoice-line-card.is-dragging {
  opacity: 0.7;
}

.invoice-line-cell-numeric {
    text-align: right;
    white-space: nowrap;
}

.invoice-line-cell-center {
    text-align: center;
    white-space: nowrap;
}

.invoice-source-table th:nth-child(4),
.invoice-source-table td:nth-child(4),
.invoice-source-table th:nth-child(6),
.invoice-source-table td:nth-child(6) {
    text-align: left;
}

.invoice-nonbillable-table {
    table-layout: fixed;
    width: 100%;
}

.invoice-nonbillable-table th:nth-child(1),
.invoice-nonbillable-table td:nth-child(1) {
    width: 40px;
}

.invoice-nonbillable-table th:nth-child(2),
.invoice-nonbillable-table td:nth-child(2) {
    width: 120px;
}

.invoice-nonbillable-table th:nth-child(3),
.invoice-nonbillable-table td:nth-child(3) {
    width: 110px;
}

.invoice-nonbillable-table th:nth-child(4),
.invoice-nonbillable-table td:nth-child(4) {
    width: 120px;
}

.invoice-nonbillable-table th:nth-child(5),
.invoice-nonbillable-table td:nth-child(5) {
    width: 110px;
}

.invoice-nonbillable-table th:nth-child(7),
.invoice-nonbillable-table td:nth-child(7) {
    width: 80px;
}

.invoice-nonbillable-table th:nth-child(8),
.invoice-nonbillable-table td:nth-child(8) {
    width: 70px;
}

.invoice-nonbillable-table th:nth-child(9),
.invoice-nonbillable-table td:nth-child(9) {
    width: 90px;
}

.invoice-nonbillable-table th:nth-child(10),
.invoice-nonbillable-table td:nth-child(10) {
    width: 95px;
}

.invoice-nonbillable-table th:nth-child(6),
.invoice-nonbillable-table td:nth-child(6) {
    width: auto;
}

.invoice-nonbillable-table td:nth-child(5),
.invoice-nonbillable-table td:nth-child(6) {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.invoice-line-description {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #0e223d;
}

.invoice-line-description span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-line-chevron {
  width: 14px;
  height: 14px;
  position: relative;
  flex: 0 0 auto;
}

.invoice-line-chevron::before {
  content: "";
  position: absolute;
  inset: 3px 3px 4px 4px;
  border-right: 2px solid #0c355d;
  border-bottom: 2px solid #0c355d;
  transform: rotate(45deg);
  transition: transform 0.15s ease-in-out;
}

.invoice-line-details:not([open]) .invoice-line-chevron::before {
  transform: rotate(-45deg);
}

.invoice-line-actions {
  display: inline-flex;
  justify-content: flex-end;
}

.invoice-line-sources {
  padding: 0 16px 8px;
}

.card .invoice-source-table .invoice-source-input {
    width: auto;
    max-width: 100%;
    min-width: 0;
    border: 0 !important;
    border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #0b1f3b;
  font: inherit;
  line-height: 1.2;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none !important;
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-underline-offset: 0 !important;
  border-image: none !important;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.card .invoice-source-table .invoice-source-input:focus,
.card .invoice-source-table .invoice-source-input:hover,
.card .invoice-source-table .invoice-source-input:active {
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
  text-decoration: none !important;
}

.card .invoice-source-table .invoice-source-input::-webkit-outer-spin-button,
.card .invoice-source-table .invoice-source-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.card .invoice-source-table .invoice-source-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 0;
  margin: 0;
  pointer-events: none;
}

.invoice-source-input-date {
  min-width: 112px;
}

.invoice-source-input-number {
    text-align: left;
    display: inline-block;
    width: auto !important;
}

.invoice-source-input-text {
  min-width: 180px;
}

.invoice-source-table [data-invoice-source-row].is-saving {
  opacity: 0.65;
}

.invoice-total-grid {
  display: grid;
  grid-template-columns: 32px minmax(0, 2.6fr) 90px 72px 100px 82px 110px 44px;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  padding: 14px 16px 0;
  border-top: 1px solid var(--line);
}

.invoice-total-label,
.invoice-total-value {
  font-size: 14px;
}

.invoice-total-add-action {
  grid-column: 1 / span 2;
  grid-row: 1 / span 3;
  justify-self: start;
  align-self: center;
}

.invoice-total-label-subtotal {
  grid-column: 6;
  grid-row: 1;
}

.invoice-total-value-subtotal {
  grid-column: 7;
  grid-row: 1;
}

.invoice-total-label-vat {
  grid-column: 6;
  grid-row: 2;
}

.invoice-total-value-vat {
  grid-column: 7;
  grid-row: 2;
}

.invoice-total-label-grand {
  grid-column: 6;
  grid-row: 3;
}

.invoice-total-value-grand {
  grid-column: 7;
  grid-row: 3;
}

.invoice-total-label {
  color: #4a6388;
  text-align: right;
  justify-self: end;
}

.invoice-total-value {
  font-weight: 600;
  color: #0e223d;
  text-align: right;
  justify-self: end;
}

.invoice-total-label-strong,
.invoice-total-value-strong {
  font-size: 16px;
  font-weight: 700;
  color: #0e223d;
}

.invoice-nonbillable-card {
  margin-top: 8px;
}

.invoice-compose-stack {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.invoice-header-card {
  order: 1;
}

.offer-estimate-card {
  order: 2;
}

.invoice-rules-card {
  order: 2;
}

.invoice-billable-card {
  order: 3;
}

.invoice-manual-card {
  order: 4;
}

.invoice-nonbillable-card {
  order: 5;
}

.invoice-rules-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 16px;
}

.invoice-overview-content {
  padding: 18px 20px;
}

.invoice-overview-table .table-checkbox-col {
  width: 44px;
  text-align: center;
}

.invoice-overview-row.is-selected td {
  background: #f3f8ff;
}

.invoice-overview-row.is-overdue td {
  background: #fff1f1;
}

.invoice-overview-row.is-overdue:hover td,
.invoice-overview-row.is-overdue:focus-within td {
  background: #ffe4e4;
}

.invoice-status-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.invoice-status-actions form {
  margin: 0;
}

.invoice-status-actions .btn-primary,
.invoice-status-actions .btn-secondary,
.invoice-status-actions .btn-danger {
  width: 100%;
  justify-content: center;
}

.invoice-credit-summary {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid #f1c7c7;
  border-radius: 14px;
  background: #fff7f7;
}

.invoice-credit-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.invoice-credit-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: #8a1c1c;
}

.invoice-credit-summary-total {
  margin-bottom: 10px;
  color: #8a1c1c;
  font-size: 13px;
  font-weight: 600;
}

.invoice-credit-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.invoice-credit-summary-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  color: #1f2937;
  text-decoration: none;
}

.invoice-credit-summary-link:hover {
  background: #fff1f1;
  text-decoration: none;
}

.invoice-credit-summary-link span {
  color: var(--muted);
  font-size: 12px;
}

.invoice-credit-summary-link strong {
  color: #8a1c1c;
  font-size: 13px;
}

.invoice-manual-line-modal .modal {
  max-width: 760px;
}

.invoice-manual-line-tabs {
  margin-top: 0;
  margin-bottom: 14px;
}

.invoice-manual-line-tab {
  text-align: left;
}

.invoice-manual-line-row {
  display: grid;
  gap: 6px;
}

.invoice-manual-line-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.invoice-manual-line-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.invoice-manual-line-placeholder {
  margin-top: 4px;
}

.invoice-manual-line-fields[hidden],
.invoice-manual-line-placeholder[hidden] {
  display: none !important;
}

.invoice-manual-line-control {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  color: #0f172a;
  box-shadow: none;
}

.invoice-manual-line-control:focus,
.invoice-manual-line-control:focus-visible {
  outline: none;
  border-color: #cbd5e1;
  box-shadow: none;
}

.invoice-nonbillable-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 2px 0 12px;
}

.invoice-nonbillable-summary::-webkit-details-marker {
    display: none;
}

.invoice-candidate-table input[type="checkbox"],
.invoice-source-table input[type="checkbox"],
.invoice-line-selector input[type="checkbox"] {
  accent-color: #1f7ae0;
}

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

.invoice-source-table {
    width: 100%;
    table-layout: fixed;
}

.invoice-source-table th:nth-child(1),
.invoice-source-table td:nth-child(1) {
    width: 40px;
}

.invoice-source-table th:nth-child(2),
.invoice-source-table td:nth-child(2) {
    width: 140px;
}

.invoice-source-table th:nth-child(4),
.invoice-source-table td:nth-child(4) {
    width: 120px;
}

.invoice-source-table th:nth-child(5),
.invoice-source-table td:nth-child(5) {
    width: 72px;
}

.invoice-source-table th:nth-child(6),
.invoice-source-table td:nth-child(6) {
    width: 120px;
}

.invoice-source-table th:nth-child(7),
.invoice-source-table td:nth-child(7) {
    width: 120px;
}

.invoice-rules-card {
  --invoice-rule-select-col: 32px;
  --invoice-rule-qty-col: 84px;
  --invoice-rule-unit-col: 76px;
  --invoice-rule-price-col: 92px;
  --invoice-rule-vat-col: 74px;
  --invoice-rule-total-col: 104px;
  --invoice-rule-actions-col: 44px;
  --invoice-rule-child-indent: 28px;
}

.invoice-rules-card .invoice-line-summary-grid {
  grid-template-columns: var(--invoice-rule-select-col) minmax(0, 1fr) var(--invoice-rule-qty-col) var(--invoice-rule-unit-col) var(--invoice-rule-price-col) var(--invoice-rule-vat-col) var(--invoice-rule-total-col) var(--invoice-rule-actions-col);
}

.invoice-rules-card .invoice-line-description {
  gap: 6px;
}

.invoice-rules-card .invoice-line-cell-numeric,
.invoice-rules-card .invoice-line-cell-center,
.invoice-rules-card [data-line-vat-rate],
.invoice-rules-card [data-line-total] {
  text-align: right;
  justify-self: end;
}

.invoice-rules-card .invoice-line-cell-center .invoice-line-input-unit,
.invoice-rules-card .invoice-line-cell-numeric .invoice-line-input-number,
.invoice-rules-card .invoice-source-input-number {
  width: 100% !important;
  text-align: right;
}

.invoice-rules-card .invoice-line-sources {
  padding: 0 16px 8px;
}

.invoice-rules-card .invoice-source-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}

.invoice-rules-card .invoice-source-table th,
.invoice-rules-card .invoice-source-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}

.invoice-rules-card .invoice-source-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: #f5f8fc;
}
.invoice-rules-card .invoice-source-table th:nth-child(1),
.invoice-rules-card .invoice-source-table td:nth-child(1) {
  width: calc(var(--invoice-rule-select-col) + var(--invoice-rule-child-indent));
}

.invoice-rules-card .invoice-source-table th:nth-child(2),
.invoice-rules-card .invoice-source-table td:nth-child(2) {
  width: 140px;
}

.invoice-rules-card .invoice-source-table th:nth-child(4),
.invoice-rules-card .invoice-source-table td:nth-child(4) {
  width: var(--invoice-rule-qty-col);
  text-align: right;
}

.invoice-rules-card .invoice-source-table th:nth-child(5),
.invoice-rules-card .invoice-source-table td:nth-child(5) {
  width: var(--invoice-rule-unit-col);
  text-align: right;
}

.invoice-rules-card .invoice-source-table th:nth-child(6),
.invoice-rules-card .invoice-source-table td:nth-child(6) {
  width: var(--invoice-rule-price-col);
  text-align: right;
}

.invoice-rules-card .invoice-source-table th:nth-child(7),
.invoice-rules-card .invoice-source-table td:nth-child(7) {
  width: var(--invoice-rule-vat-col);
  text-align: right;
}

.invoice-rules-card .invoice-source-table thead th.invoice-source-head {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.invoice-rules-card .invoice-source-table thead th.invoice-source-head > span {
  display: flex;
  width: 100%;
}

.invoice-rules-card .invoice-source-table thead th.invoice-source-head-numeric > span,
.invoice-rules-card .invoice-source-table thead th.invoice-source-head-unit > span {
  justify-content: flex-end;
  text-align: right;
  padding-right: 10px;
}

.invoice-rules-card .invoice-source-table thead th.invoice-source-head:not(.invoice-source-head-numeric):not(.invoice-source-head-unit) > span {
  justify-content: flex-start;
  text-align: left;
  padding-left: 10px;
}

.invoice-rules-card .invoice-source-table thead th:nth-child(6) > span,
.invoice-rules-card .invoice-source-table thead th:nth-child(7) > span,
.invoice-rules-card .invoice-source-table thead th:nth-child(8) > span {
  padding-right: 0;
}

.invoice-rules-card .invoice-source-table td:nth-child(6),
.invoice-rules-card .invoice-source-table td:nth-child(7),
.invoice-rules-card .invoice-source-table td:nth-child(8) {
  padding-right: 0;
}

.invoice-rules-card .invoice-source-table .invoice-source-input,
.invoice-rules-card .invoice-source-table .invoice-source-input:focus,
.invoice-rules-card .invoice-source-table .invoice-source-input:hover,
.invoice-rules-card .invoice-source-table .invoice-source-input:active {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.invoice-rules-card .invoice-source-table .invoice-source-input-number {
  padding-right: 0 !important;
}

.invoice-rules-card .invoice-source-vat-col {
  color: #597094;
}

.invoice-rules-card .invoice-source-table th:nth-child(8),
.invoice-rules-card .invoice-source-table td:nth-child(8) {
  width: var(--invoice-rule-total-col);
  text-align: right;
}

.invoice-rules-card .invoice-source-table th:nth-child(9),
.invoice-rules-card .invoice-source-table td:nth-child(9),
.invoice-rules-card .invoice-source-actions-col {
  width: var(--invoice-rule-actions-col);
  padding-left: 0;
  padding-right: 0;
}

#invoicePageShell.is-loading {
  opacity: 0.72;
  transition: opacity 0.12s ease;
}

.card.card-compact {
  padding: 16px 18px;
}

.card-span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .card-grid-auto {
    grid-template-columns: 1fr;
  }

  .invoice-phase-summary,
  .invoice-phase-body-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .invoice-phase-summary-right {
    justify-content: flex-start;
  }

  .invoice-line-summary-grid {
    grid-template-columns: 28px minmax(0, 1fr) 62px 44px 82px 62px 90px 40px;
    gap: 8px;
  }
}

.card.has-plus {
  position: relative;
  padding-bottom: 64px;
}

.card-plus {
  position: absolute;
  right: 16px;
  bottom: 16px;
  box-shadow: none;
}

.card h2 {
  margin-top: 0;
  font-size: 20px;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}

.wb-timeline-card .section-title {
  position: relative;
  z-index: 90;
}

.section-title.plan-header-row {
  align-items: center;
}

.plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.plan-unlinked-link {
  color: #bb1e1e;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.plan-unlinked-link:hover {
  text-decoration: underline;
}

.plan-unlinked-link.is-hidden {
  display: none;
}

.wb-inline {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: inherit;
  background: #ffffff;
  font-family: inherit;
  color: inherit;
}

.wb-inline-title {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.wb-task-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wb-task-cell .wb-inline-title {
  flex: 1 1 auto;
  min-width: 0;
}

.wb-member-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e9eef5;
  color: #2f3d4f;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.wb-member-pill.is-unlinked {
  background: #ffe3e3;
  color: #a41313;
  font-weight: 600;
}

.wb-inline:focus {
  border-color: #93b9e6;
  outline: none;
  background: #f3f8ff;
}

.wb-inline-hours {
  max-width: 70px;
  text-align: left;
}

.wb-inline-hours::-webkit-outer-spin-button,
.wb-inline-hours::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wb-inline-hours {
  -moz-appearance: textfield;
}

.wb-planning {
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  color: #2c3a4b;
  font-family: inherit;
  font-size: inherit;
}

.wb-planning:hover,
.wb-planning:focus {
  background: transparent;
}

.wb-planning-range {
  color: #2c3a4b;
}

.wb-timeline-card {
  margin-top: 18px;
}

.wb-plan-layout {
  --plan-row-height: 20px;
  --axis-height: 69px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 12px;
}

.wb-plan-left {
  --plan-row-height: 20px;
  --axis-height: 69px;
  --plan-metrics-width: 80px;
  --plan-actions-width: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: visible;
  background: #f7fbff;
  position: relative;
}

.wb-plan-right {
  position: relative;
  overflow: visible;
}

.wb-plan-scale {
  position: absolute;
  top: 0;
  right: -26px;
  bottom: 0;
  height: 100%;
  width: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(var(--axis-height) + 24px);
  padding-bottom: 12px;
  box-sizing: border-box;
  pointer-events: auto;
  z-index: 35;
}

.wb-plan-scale-input {
  width: 220px;
  height: 18px;
  transform: rotate(-90deg);
  transform-origin: top center;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.wb-plan-scale-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: #d7e2ef;
  border-radius: 999px;
}

.wb-plan-scale-input::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #d7e2ef;
  border-radius: 999px;
}

.wb-plan-scale-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0a63b4;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(8, 35, 64, 0.12);
  margin-top: -4px;
}

.wb-plan-scale-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0a63b4;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(8, 35, 64, 0.12);
}

.wb-plan-right-overlay {
  position: sticky;
  top: 0;
  height: 0;
  z-index: 40;
  pointer-events: none;
}

.wb-plan-right-overlay .wb-hidden-trigger-floating {
  position: absolute;
  top: 76px;
  right: 12px;
  z-index: 41;
  pointer-events: auto;
}

.wb-hidden-menu {
  position: absolute;
  top: 112px;
  right: 12px;
  width: 320px;
  max-height: 360px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  z-index: 40;
  pointer-events: auto;
}

.wb-hidden-menu.is-open {
  display: flex;
}

.wb-hidden-menu-body {
  padding: 12px;
  overflow: auto;
}

.wb-hidden-menu-actions {
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: #f8fafc;
}

.wb-plan-right-overlay .wb-hidden-trigger-floating.btn-secondary {
  background: #0b5fa8;
  border-color: #0a4f8a;
  color: #ffffff;
}

.wb-plan-right-overlay .wb-hidden-trigger-floating.btn-secondary:hover {
  background: #0a5394;
  border-color: #09457a;
}

.wb-row-highlight {
  position: absolute;
  left: 0;
  right: 0;
  background: rgba(255, 214, 85, 0.28);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  z-index: 2;
}

.wb-row-highlight.is-active {
  opacity: 1;
}

.wb-plan-row.is-active {
  background: #e8f1ff;
}

.wb-plan-row.wb-plan-item.is-active {
  background: #ffffff;
}

.wb-range-highlight {
  position: absolute;
  background: rgba(255, 214, 85, 0.28);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
  z-index: 1;
}

.wb-range-highlight.is-active {
  opacity: 1;
}

.wb-plan-right-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #ffffff;
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--line);
  border-bottom: none;
  overflow: hidden;
  pointer-events: none;
  height: var(--axis-height);
  margin-bottom: calc(var(--axis-height) * -1);
  --axis-day-top: 46px;
  box-sizing: border-box;
}

.wb-plan-right-header-inner {
  position: relative;
  height: 100%;
  will-change: transform;
}

.wb-plan-right-header .timeline-month-row {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 22px;
  pointer-events: none;
  z-index: 7;
}

.wb-plan-right-header .timeline-month-block {
  position: absolute;
  top: 0;
  height: 20px;
  background: transparent;
  color: #2c3a4b;
  border-radius: 0;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-plan-right-header .timeline-week-row {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  height: 22px;
  pointer-events: none;
  z-index: 7;
}

.wb-plan-right-header .timeline-week-block {
  position: absolute;
  top: 0;
  height: 20px;
  background: #6f7784;
  color: #ffffff;
  border-radius: 0;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-plan-right-header .timeline-day-row {
  position: absolute;
  top: var(--axis-day-top);
  left: 0;
  right: 0;
  height: calc(var(--axis-height) - var(--axis-day-top));
  pointer-events: none;
  z-index: 5;
  background: transparent;
  overflow: visible;
}

.wb-plan-right-header .timeline-day-block {
  position: absolute;
  top: 0;
  height: 100%;
  background: transparent;
  color: #2c3a4b;
  border-radius: 0;
  padding: 0;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  line-height: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}

.wb-plan-right-header .timeline-day-block.is-weekend {
  background: #eef1f4;
}

.wb-plan-right-header .timeline-day-block.is-holiday {
  background: repeating-linear-gradient(
    45deg,
    rgba(190, 198, 210, 0.55),
    rgba(190, 198, 210, 0.55) 6px,
    rgba(255, 255, 255, 0) 6px,
    rgba(255, 255, 255, 0) 12px
  );
}

.wb-plan-right-header .timeline-month-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.wb-plan-right-header .timeline-month-overlay-axis {
  top: 0;
  left: 0;
  right: 0;
  height: var(--axis-height);
  z-index: 6;
}

.wb-plan-right-header .timeline-month-overlay-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(90, 100, 115, 0.85);
}

#workBreakdownTimeline.gantt-canvas {
  --plan-row-height: 20px;
  overflow: hidden;
  max-width: 100%;
}

#workBreakdownTimeline .vis-item.wb-member-day,
#workBreakdownTimeline .vis-item.wb-department-day {
  border: none;
  background: #e5e9ef;
  border-radius: 3px;
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
}

#workBreakdownTimeline .vis-item.wb-member-day .vis-item-content,
#workBreakdownTimeline .vis-item.wb-department-day .vis-item-content {
  padding: 0 !important;
  display: none;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 9px;
  line-height: 1;
  font-weight: 600;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  pointer-events: none;
}

#workBreakdownTimeline .vis-item.wb-member-day .wb-member-day-pct,
#workBreakdownTimeline .vis-item.wb-department-day .wb-member-day-pct {
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
  display: inline-block;
}

#workBreakdownTimeline[data-range="week"] .vis-item.wb-member-day .vis-item-content,
#workBreakdownTimeline[data-range="day"] .vis-item.wb-member-day .vis-item-content,
#workBreakdownTimeline[data-range="week"] .vis-item.wb-department-day .vis-item-content,
#workBreakdownTimeline[data-range="day"] .vis-item.wb-department-day .vis-item-content {
  display: flex;
}

#workBreakdownTimeline .vis-item.wb-member-day.is-absence,
#workBreakdownTimeline .vis-item.wb-department-day.is-absence {
  background: #6d28d9;
}

#workBreakdownTimeline .vis-item.wb-member-day.is-low,
#workBreakdownTimeline .vis-item.wb-department-day.is-low {
  background: #111111;
}


#workBreakdownTimeline.gantt-canvas .wb-range-highlight {
  height: 100% !important;
  top: 0 !important;
}

#workBreakdownTimeline.gantt-canvas .vis-panel.vis-background,
#workBreakdownTimeline.gantt-canvas .vis-panel.vis-background .vis-content {
  overflow: visible;
}

#workBreakdownTimeline.gantt-canvas.range-far .vis-grid.vis-minor,
#workBreakdownTimeline.gantt-canvas.range-far .vis-grid.vis-minor > div {
  opacity: 0;
}

.wb-plan-right .vis-panel.vis-top {
  border-radius: 12px 12px 0 0;
  background: #ffffff;
  visibility: hidden;
  pointer-events: none;
}



.wb-plan-header {
  height: calc(var(--axis-height) + 1px);
  padding: 0;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f7fbff;
  border-radius: 12px 12px 0 0;
  gap: 10px;
}

#workBreakdownSection .section-title-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

#workBreakdownSection .wb-section-toggle {
  margin: 0;
}

.wb-plan-header-row {
  display: grid;
  grid-template-columns: 4px 20px 20px 1fr var(--plan-metrics-width) var(--plan-actions-width);
  column-gap: 0;
  align-items: center;
  margin-top: 0;
  height: calc(var(--axis-height) + 1px);
  width: 100%;
  flex: 1 1 auto;
  position: relative;
  position: sticky;
  top: 0;
  z-index: 6;
  background: #f7fbff;
}

.wb-plan-header-row .wb-plan-label {
  grid-column: 2 / span 3;
  margin-left: 0;
  padding-left: 0;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}

.wb-plan-header-label {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.wb-plan-header-label .wb-plan-label-text {
  flex: 0 0 auto;
}

.wb-plan-header-label .wb-plan-view-toggle {
  flex: 0 0 auto;
}

.wb-plan-header-controls {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  position: absolute;
  right: calc(var(--plan-actions-width) + var(--plan-metrics-width) + 50px);
  top: 50%;
  transform: translateY(-50%);
}

.wb-plan-header-row .wb-plan-accent-slot {
  grid-column: 1;
  width: 4px;
  height: 18px;
  display: block;
}

.wb-plan-header-row .wb-plan-checkbox-slot,
.wb-plan-header-row .wb-plan-toggle-slot {
  display: none;
}


.wb-plan-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  width: var(--plan-actions-width);
  justify-self: end;
}

.wb-plan-header-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 2000;
}

.wb-plan-header-menu-trigger {
  color: #2c3a4b;
  width: 20px;
  height: 20px;
}

.wb-plan-header-menu-trigger:hover {
  background: transparent;
}

.wb-plan-header-menu-trigger svg {
  width: 16px;
  height: 16px;
}

.wb-plan-header-menu-body {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  z-index: 2000;
}

.wb-plan-header-menu-body.is-open {
  display: flex;
}

.wb-plan-header-menu-item {
  border: none;
  background: #f8fafc;
  color: #1f2a37;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.wb-plan-header-menu-item:hover {
  background: #e2e8f0;
}

.wb-plan-departments-toggle {
  border: 1px solid var(--line);
  background: #ffffff;
  color: #264060;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wb-plan-departments-toggle.is-active {
  background: #e3efff;
  border-color: #8dbbff;
  color: #1b4f9c;
}

.wb-plan-departments-toggle:hover {
  border-color: #9fc1f2;
}

.wb-plan-header-metrics {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  text-transform: none;
  grid-column: 5;
  justify-self: end;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-plan-rows {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}

.wb-plan-row {
  display: grid;
  grid-template-columns: 4px 20px 20px 1fr var(--plan-metrics-width) var(--plan-actions-width);
  align-items: center;
  column-gap: 0;
  padding: 0;
  height: var(--plan-row-height, 44px);
  box-sizing: border-box;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  font-size: 10px;
  position: relative;
}

.wb-plan-row.wb-plan-phase {
  font-weight: 600;
  background: #eaf2ff;
  color: #0f172a;
  cursor: default;
}

.wb-plan-row.wb-plan-phase .wb-plan-accent-slot {
  background: #2563eb;
}

.wb-plan-row.wb-plan-phase {
  cursor: grab;
}

.wb-plan-row.wb-plan-phase.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.wb-plan-row.wb-plan-milestone {
  background: #fdf2f8;
  font-weight: 600;
}

.wb-plan-row.wb-plan-milestone .wb-plan-accent-slot {
  background: var(--milestone-color, #9d174d);
}

.wb-plan-row.wb-plan-milestone .wb-plan-label-text {
  color: #9d174d;
}

.wb-plan-row.wb-plan-department {
  background: #faf7f2;
  font-weight: 600;
  color: #3f2a1d;
}

.wb-plan-row.wb-plan-department .wb-plan-accent-slot {
  background: #92400e;
}

.wb-plan-row.wb-plan-member {
  background: #dcfce7;
  color: #166534;
}

.wb-plan-row.wb-plan-member .wb-plan-accent-slot {
  background: #166534;
}

.wb-plan-row.wb-plan-person {
  background: #dcfce7;
  color: #166534;
  font-weight: 600;
}

.wb-plan-row.wb-plan-person .wb-plan-accent-slot {
  background: #166534;
}

.wb-plan-row.wb-plan-department .wb-plan-metrics {
  color: #3f2a1d;
}

.wb-plan-row.wb-plan-department .wb-plan-metrics.is-over,
.wb-plan-row.wb-plan-phase .wb-plan-metrics.is-over {
  color: #c0392b !important;
}

.wb-plan-row.wb-plan-person.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.wb-plan-row.wb-plan-item {
  font-weight: 500;
}

.wb-plan-row.wb-plan-item .wb-plan-accent-slot {
  background: transparent;
}


.wb-plan-row .wb-plan-accent-slot {
  width: 4px;
  height: 100%;
  display: block;
  grid-column: 1;
}

.wb-plan-row .wb-plan-checkbox-slot,
.wb-plan-row .wb-plan-toggle-slot {
  width: 20px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wb-plan-row .wb-plan-checkbox-slot {
  grid-column: 2;
}

.wb-plan-row .wb-plan-toggle-slot {
  grid-column: 3;
}

.wb-plan-row .wb-plan-toggle {
  margin-left: -2px;
}

.wb-plan-row.wb-plan-department .wb-plan-toggle-slot,
.wb-plan-row.wb-plan-department .wb-plan-label {
  margin-left: 20px;
}

.wb-plan-select,
.wb-plan-phase-select,
.wb-plan-department-select {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

.wb-plan-row .wb-plan-label {
  grid-column: 4;
  position: relative;
}

.wb-plan-row .wb-plan-metrics {
  grid-column: 5;
}

.wb-plan-row .wb-plan-actions {
  grid-column: 6;
}

.wb-plan-toggle {
  flex: 0 0 auto;
}

.wb-plan-toggle {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  color: #0c355d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;
  overflow: hidden;
  position: relative;
}

.wb-plan-toggle:hover {
  background: transparent;
}

.wb-plan-toggle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  display: block;
  transition: transform 0.15s ease-in-out;
}

.wb-plan-toggle.is-collapsed::before {
  transform: rotate(-45deg);
}


.wb-plan-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wb-plan-view-toggle {
  border: none;
  background: #eef5ff;
  color: #0c355d;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.wb-plan-view-toggle:hover {
  background: #dbe9fb;
}

.wb-plan-view-toggle svg {
  width: 14px;
  height: 14px;
}

.wb-plan-label-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-plan-metrics {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  white-space: nowrap;
  width: 100%;
  display: block;
  justify-self: end;
  text-transform: none;
}

#workBreakdownTimeline .wb-timeline-item .vis-item-content {
  font-size: 10px;
  padding: 0 6px !important;
}

#workBreakdownTimeline .vis-item {
  overflow: hidden;
}

#workBreakdownTimeline .vis-group,
#workBreakdownTimeline .vis-group .vis-group-content {
  height: var(--plan-row-height, 20px) !important;
}

#workBreakdownTimeline .vis-item.wb-timeline-item {
  position: absolute;
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
}

#workBreakdownTimeline .vis-item.wb-timeline-item.is-complete {
  background: #d7ebff !important;
  border-color: #9cc3ff !important;
}

#workBreakdownTimeline .vis-item.wb-timeline-item.is-overdue {
  background: #dc2626 !important;
  border-color: #b91c1c !important;
}

#workBreakdownTimeline .vis-item.wb-timeline-item .vis-item-overflow {
  position: relative;
}

#workBreakdownTimeline .vis-item.wb-milestone-item {
  background: #fdf2f8;
  border: 1px solid #9d174d;
  border-radius: 4px;
  min-width: 0;
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
  padding: 0;
  z-index: 90;
  box-shadow: none;
}

.gantt-canvas .vis-panel.vis-center {
  z-index: 20;
}

#workBreakdownTimeline .vis-item.wb-milestone-item .wb-milestone-label {
  display: none;
}

.wb-milestone-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.wb-milestone-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

#workBreakdownTimeline .vis-item.wb-timeline-item.wb-unlinked-start::before,
#workBreakdownTimeline .vis-item.wb-timeline-item.wb-unlinked-end::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: repeating-linear-gradient(
    45deg,
    rgba(245, 158, 11, 0.95) 0,
    rgba(245, 158, 11, 0.95) 3px,
    rgba(255, 255, 255, 0.95) 3px,
    rgba(255, 255, 255, 0.95) 6px
  );
  opacity: 0.95;
  pointer-events: none;
}

#workBreakdownTimeline .vis-item.wb-timeline-item.wb-unlinked-start::before {
  left: 0;
  border-radius: 8px 0 0 8px;
}

#workBreakdownTimeline .vis-item.wb-timeline-item.wb-unlinked-end::after {
  right: 0;
  border-radius: 0 8px 8px 0;
}

#workBreakdownTimeline .vis-item .vis-item-overflow {
  overflow: hidden;
}

.wb-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.wb-plan-right-header .wb-milestone-popup {
  pointer-events: auto;
}

.wb-milestone-popup {
  position: absolute;
  min-width: 160px;
  max-width: 260px;
  background: #ffffff;
  border: 1px solid #9d174d;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.18);
  color: #1f2937;
  display: none;
  z-index: 2000;
  pointer-events: auto;
}

.wb-milestone-popup.is-open {
  display: block;
}

.wb-milestone-popup-title {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
}

.wb-milestone-popup-date {
  font-size: 11px;
  color: #6b7280;
}

.wb-popup-section {
  display: grid;
  gap: 6px;
}

.wb-popup-section + .wb-popup-section {
  margin-top: 10px;
}

.wb-popup-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.wb-label-pill {
  position: absolute;
  white-space: nowrap;
  color: #1d2e46;
  font-size: 10px;
  line-height: 16px;
  height: 18px;
  pointer-events: none;
  background: #ffffff;
  border: 1px solid rgba(180, 191, 206, 0.7);
  border-radius: 999px;
  padding: 0 6px;
  box-shadow: 0 1px 2px rgba(12, 34, 64, 0.18);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wb-label-pill.wb-label-pill-member {
  background: #eef5ff;
}

.wb-label-pill.wb-label-pill-member.is-unlinked {
  background: #ffe3e3;
  color: #a41313;
  border-color: rgba(164, 19, 19, 0.35);
}

.wb-label-text {
  white-space: nowrap;
}

.wb-label-pill.is-complete .wb-label-text {
  text-decoration: line-through;
  color: #64748b;
}

.wb-label-pill.wb-label-pill-member.is-complete {
  color: #64748b;
}

.wb-label-pill .wb-member-pill {
  font-size: 9px;
  padding: 1px 5px;
}

.wb-plan-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  width: var(--plan-actions-width);
  position: relative;
}

.wb-plan-row.wb-plan-person .wb-plan-actions {
  justify-content: flex-start;
}

.wb-plan-row {
  position: relative;
}

.wb-plan-row.is-complete .wb-plan-label-text,
.wb-plan-row.is-complete .wb-plan-metrics {
  text-decoration: line-through;
  color: #64748b;
}

.wb-plan-metrics.is-over,
.wb-plan-header-metrics.is-over {
  color: #c0392b !important;
  font-weight: 600;
}

.wb-plan-add-item {
  border: none;
  background: transparent;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 0;
  color: #2c3a4b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wb-plan-add-item svg {
  width: 12px;
  height: 12px;
  display: block;
}

.wb-plan-add-item:hover {
  color: #0a63b4;
  background: transparent;
}

.wb-plan-more {
  border: none;
  background: transparent;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 0;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.wb-plan-more svg {
  width: 12px;
  height: 12px;
  display: block;
}

.wb-plan-more:hover {
  background: transparent;
  color: #64748b;
}

.wb-plan-hide {
  border: none;
  background: transparent;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 0;
  color: #2c3a4b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wb-plan-hide svg {
  width: 16px;
  height: 16px;
  display: block;
}

.wb-plan-hide:hover {
  color: #0a63b4;
  background: transparent;
}

.wb-plan-remove-member {
  border: none;
  background: transparent;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 0;
  color: #b91c1c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.wb-plan-remove-member svg {
  width: 16px;
  height: 16px;
  display: block;
}

.wb-plan-remove-member:hover {
  color: #dc2626;
  background: transparent;
}

.wb-plan-alert {
  border: none;
  background: transparent;
  color: #b91c1c;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  cursor: pointer;
  position: relative;
}

.wb-plan-alert-float {
  position: absolute;
  z-index: 20;
}

body.wb-header-menu-open .wb-plan-alert-float {
  opacity: 0;
  pointer-events: none;
}

.wb-plan-alert-count {
  position: absolute;
  top: -5px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: transparent;
  color: #b91c1c;
  font-size: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.wb-plan-alert svg {
  width: 16px;
  height: 16px;
  display: block;
}

.wb-plan-alert:hover {
  background: transparent;
}

.wb-section-body.is-hidden {
  display: none;
}

.wb-hidden-trigger.is-hidden {
  display: none;
}

.alert.is-hidden {
  display: none;
}

.wb-hidden-section {
  display: grid;
  gap: 6px;
}

.wb-hidden-title {
  font-size: 12px;
  font-weight: 600;
  color: #2c3a4b;
  margin-top: 4px;
}

.wb-hidden-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: #2c3a4b;
}

.wb-hidden-phase {
  font-size: 12px;
  font-weight: 600;
  color: #0c355d;
  margin-top: 6px;
}

.wb-timeline-empty.is-hidden {
  display: none;
}

.wb-phase-card-section .section-left button {
  white-space: nowrap;
}

.wb-phase-cards {
  display: grid;
  gap: 24px;
  margin-top: 12px;
}

.wb-phase-card {
  border: 1px solid #e3eaf5;
  border-radius: 12px;
  padding: 12px 14px;
  background: #ffffff;
  display: grid;
  gap: 8px;
  cursor: grab;
}

.wb-phase-card.is-collapsed .wb-table,
.wb-phase-card.is-collapsed .wb-phase-card-footer {
  display: none;
}

.wb-phase-toggle {
  margin-right: 6px;
}

.wb-phase-card.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
}

.wb-phase-card.is-drag-over {
  border-color: #0a63b4;
  box-shadow: 0 0 0 2px rgba(10, 99, 180, 0.15);
}

.wb-phase-card-actions {
  display: flex;
  justify-content: flex-start;
}

.wb-phase-card-title {
  font-weight: 600;
  font-size: 14px;
}

.wb-phase-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wb-phase-card-badges {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wb-phase-badge {
  white-space: nowrap;
}

.wb-phase-card-totals {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.wb-phase-card-member-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 2px;
  font-size: 11px;
  color: #2c3a4b;
}

.wb-phase-card-member-totals.is-hidden {
  display: none;
}

.wb-member-total-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e9eef5;
  color: #2c3a4b;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.wb-member-total-pill.is-unlinked {
  background: #ffe3e3;
  color: #a41313;
  font-weight: 600;
}

.pill-danger {
  background: #ffe7e7;
  color: #b62525;
  border: 1px solid #f2b9b9;
}

.invoice-error-details {
  margin-top: 6px;
}

.invoice-error-details summary {
  list-style: none;
  cursor: pointer;
}

.invoice-error-details summary::-webkit-details-marker {
  display: none;
}

.invoice-error-message {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #f2b9b9;
  border-radius: 10px;
  background: #fff4f4;
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  word-break: break-word;
}

.invoice-page-error {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #ef9a9a;
  border-left: 5px solid #c62828;
  border-radius: 12px;
  background: #fff1f1;
  color: #8a1c1c;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(198, 40, 40, 0.08);
}

.wb-phase-card-footer {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.wb-parent-totals {
  margin-top: 16px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.wb-phase-card-footer-left {
  display: grid;
  gap: 6px;
}

.wb-phase-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wb-bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #9ec3ee;
  border-radius: 10px;
  background: #e6f0ff;
}

.wb-bulk-bar.is-active {
  display: flex;
}

#wbBulkBar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(900px, calc(100% - 32px));
  z-index: 200;
  box-shadow: 0 10px 24px rgba(19, 37, 66, 0.15);
}

.wb-bulk-bar-floating {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(900px, calc(100% - 32px));
  z-index: 220;
  box-shadow: 0 10px 24px rgba(19, 37, 66, 0.15);
}


.wb-bulk-bar .btn-secondary {
  background: var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  height: 30px;
}

.wb-bulk-bar .wb-bulk-icon {
  padding: 6px 12px;
  white-space: nowrap;
}

.wb-bulk-bar .wb-bulk-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.wb-bulk-link {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wb-bulk-link-trigger svg {
  width: 14px;
  height: 14px;
}

.wb-bulk-status {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wb-bulk-status-trigger svg {
  width: 14px;
  height: 14px;
}

.wb-bulk-link-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(19, 37, 66, 0.18);
  display: none;
  z-index: 240;
}

.wb-bulk-link-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wb-bulk-status-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(19, 37, 66, 0.18);
  display: none;
  z-index: 240;
}

.wb-bulk-status-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wb-bulk-link-item {
  border: none;
  background: #f3f6fb;
  color: #1f2d3d;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.wb-bulk-link-item:hover {
  background: #e7eef8;
}

.wb-plan-import-item {
  border: none;
  background: #f3f6fb;
  color: #1f2d3d;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.wb-plan-import-item:hover {
  background: #e7eef8;
}

.wb-plan-import {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 5;
  pointer-events: auto;
}

.wb-plan-import-trigger svg {
  width: 14px;
  height: 14px;
}

.wb-plan-import-trigger {
  pointer-events: auto;
}

.wb-plan-import-menu {
  pointer-events: auto;
}

.wb-plan-import-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 10px 24px rgba(19, 37, 66, 0.18);
  display: none;
  z-index: 120;
}

.wb-plan-import-menu.is-open {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wb-bulk-status-item {
  border: none;
  background: #f3f6fb;
  color: #1f2d3d;
  padding: 6px 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}

.wb-bulk-status-item:hover {
  background: #e7eef8;
}

.wb-bulk-bar .btn-secondary:hover {
  background: var(--accent-strong);
}

.wb-bulk-count {
  font-size: 12px;
  color: #2c3a4b;
}

.wb-bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wb-batch-section.is-hidden {
  display: none;
}

.wb-import-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.wb-import-preview {
  margin-top: 8px;
}

.wb-import-table th,
.wb-import-table td {
  font-size: 12px;
}

.wb-phase-range-trigger {
  border: none;
  background: transparent;
  color: #1c2331;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  padding: 0;
  margin: 0;
  text-decoration: none;
  cursor: pointer;
}

.wb-phase-range-trigger:hover {
  color: #1c2331;
  text-decoration: underline;
  background: transparent;
  outline: none;
}

.modal-row.modal-phase-range-row {
  padding-top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.modal-phase-range-row .wb-phase-range-trigger.is-disabled,
.modal-phase-range-row .wb-phase-range-trigger:disabled {
  opacity: 0.45;
  pointer-events: none;
  text-decoration: none;
}

.wb-phase-picker-create .modal-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wb-phase-picker-create .btn-secondary {
  align-self: flex-start;
}

.btn-danger {
  background: #b62525;
  color: #ffffff;
}

.btn-danger:hover {
  background: #9b1e1e;
}

.wb-phase-add-row {
  color: #0a63b4;
  background: transparent;
  border-color: transparent;
}

.wb-phase-add-row:hover {
  color: #0a63b4;
  background: transparent;
  border-color: transparent;
}

.wb-phase-add-row svg {
  width: 18px;
  height: 18px;
}

.wb-phase-empty.is-hidden {
  display: none;
}

.wb-complete-cell {
  text-align: left;
}

.wb-complete-cell .inline-form {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.wb-complete-cell input[type="checkbox"] {
  margin-left: 0;
}

.wb-complete-col {
  width: 60px;
}

.wb-select-col {
  width: 36px;
}

.wb-select-col input[type="checkbox"] {
  margin: 0;
}

.wb-hours-col {
  width: 140px;
  white-space: nowrap;
}

.wb-phase-col {
  width: 200px;
}

.wb-planning-col {
  width: 190px;
}

.wb-table {
  table-layout: fixed;
}

.wb-table th,
.wb-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.wb-table th {
  text-transform: none;
  letter-spacing: 0;
}

.wb-unlinked-badge {
  align-self: flex-start;
  padding: 2px 6px;
  border-radius: 999px;
  background: #bb1e1e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.wb-unlinked-badge.is-hidden {
  display: none;
}

.wb-row.is-overdue .wb-planning-range {
  color: #bb1e1e;
  font-weight: 600;
}

.wb-row.is-complete .wb-inline-title,
.wb-row.is-complete .wb-member-pill,
.wb-row.is-complete .wb-planning-range {
  text-decoration: line-through;
  color: #64748b;
}

.wb-row.is-selected {
  background: #f0f7ff;
}

.wb-plan-row.wb-plan-item.is-overdue {
  background: #fee2e2;
}

.wb-overdue-badge {
  align-self: flex-start;
  padding: 2px 6px;
  border-radius: 999px;
  background: #bb1e1e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.section-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.plan-window-card {
  margin-bottom: 16px;
}

.plan-window-heading {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.plan-window-heading .helper {
  margin-top: 4px;
}

.plan-window-helper {
  margin-top: 8px;
}

.plan-window-summary-pill {
  white-space: nowrap;
  max-width: 100%;
}

.plan-window-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px 16px;
}

.plan-window-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 152px;
}

.plan-window-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.plan-window-select {
  width: 132px;
  min-width: 132px;
}

.plan-window-input {
  min-height: 40px;
  width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #1c2331;
  font-size: 14px;
  box-sizing: border-box;
  appearance: textfield;
  -moz-appearance: textfield;
}

.plan-window-input::-webkit-outer-spin-button,
.plan-window-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.plan-window-input:hover,
.plan-window-input:focus,
.plan-window-input:focus-visible,
.plan-window-input:active {
  border-color: var(--line);
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.12);
}

.plan-window-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 900px) {
  .plan-window-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .plan-window-summary-pill {
    white-space: normal;
  }

  .plan-window-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
}

.project-member-summary {
  display: none;
}

#projectMemberModal.is-plan .project-member-summary {
  display: block;
}

.project-member-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow: auto;
  padding: 6px 8px;
  border: 1px solid #e3eaf5;
  border-radius: 8px;
  background: #f8fbff;
}

.project-member-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #2c3a4b;
}

.project-member-role {
  color: var(--muted);
}

.member-alloc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.member-alloc-item {
  padding: 8px 10px;
  border: 1px solid #e3eaf5;
  border-radius: 8px;
  background: #f8fbff;
}

.member-alloc-range {
  font-size: 12px;
  color: #2c3a4b;
}

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

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

.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: #f5f8fc;
}

.table th[data-sortable] {
  padding: 0;
}

.table-sort-trigger {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  text-decoration: none;
  text-align: left;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.table-sort-trigger:visited {
  color: inherit;
  text-decoration: none;
}

.table-sort-trigger:hover,
.table-sort-trigger:focus,
.table-sort-trigger:focus-visible,
.table-sort-trigger:active {
  background: transparent;
  color: inherit;
  outline: none;
  box-shadow: none;
  text-decoration: none;
}

.table-sort-indicator {
  width: 10px;
  height: 10px;
  display: inline-block;
  visibility: hidden;
  opacity: 0.5;
  transition: transform 0.12s ease;
}

.table-sort-indicator::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #5a6b83;
}

.table th[data-sort-state="asc"] .table-sort-indicator {
  visibility: visible;
  transform: rotate(180deg);
}

.table th[data-sort-state="desc"] .table-sort-indicator {
  visibility: visible;
}

.table-group-row td {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.table-totals-row td {
  background: #f5f8fc;
}

#timeEntryBookedTotalHours,
#timeEntryBookedTotalKm {
  font-weight: 700;
}

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

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

.form-grid-span-2 {
  grid-column: 1 / -1;
}

.project-settings-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-settings-top-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.project-settings-right-stack {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 0;
  padding: 0;
  margin: 0;
  min-inline-size: 0;
  align-items: stretch;
}

.project-settings-top-layout > .card,
.project-settings-right-stack > .card {
  height: 100%;
  margin-bottom: 0;
}

.project-core-card {
  margin-top: 16px !important;
}

@media (max-width: 1100px) {
  .project-settings-top-layout {
    grid-template-columns: 1fr;
  }

  .project-settings-right-stack {
    grid-template-columns: 1fr;
  }

  .project-settings-grid {
    grid-template-columns: 1fr;
  }
}

.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: #fff7ef;
  border-radius: 12px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
}

.card-link:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

label {
  font-size: 13px;
  color: var(--muted);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
select,
textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  font-size: 14px;
}

#wbImportText {
  resize: vertical;
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-family: "Segoe UI", "Calibri", "Tahoma", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-family: "Segoe UI", "Calibri", "Tahoma", sans-serif;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
}

.button-link:hover {
  background: var(--accent-strong);
}

.top-avatar,
.top-avatar:hover,
.top-avatar:focus,
.top-avatar:focus-visible,
.top-avatar:active {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: #0a63b4;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  box-shadow: none;
  text-decoration: none;
}

.alert {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #eef5ff;
  border: 1px solid #bfd8f4;
  color: #1b4d7a;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 27, 40, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.timeentry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

.timeentry-tabs-sticky {
  position: static;
  top: auto;
  z-index: auto;
}

.timeentry-no-boxes input,
.timeentry-no-boxes select,
.timeentry-no-boxes .smart-select-trigger {
  border: none !important;
  border-bottom: 1px solid #c7d5e7 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.timeentry-no-boxes .smart-select {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Keep pagination "Per pagina" dropdown in standard boxed style (same as projects/customers). */
.timeentry-no-boxes .customers-pagination .pagination-tools .smart-select,
.timeentry-no-boxes .customers-pagination .pagination-tools .smart-select-trigger {
  border: 1px solid #d8e6f7 !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.timeentry-no-boxes .customers-pagination .pagination-tools .smart-select-trigger {
  border-bottom: 1px solid #d8e6f7 !important;
}

.timeentry-no-boxes .customers-pagination .pagination-tools .smart-select-trigger:hover,
.timeentry-no-boxes .customers-pagination .pagination-tools .smart-select-trigger:focus,
.timeentry-no-boxes .customers-pagination .pagination-tools .smart-select-trigger:focus-visible,
.timeentry-no-boxes .customers-pagination .pagination-tools .smart-select-trigger:active {
  border-color: #d8e6f7 !important;
  border-bottom-color: #d8e6f7 !important;
  box-shadow: none !important;
  outline: none !important;
}

.timeentry-no-boxes input:focus,
.timeentry-no-boxes select:focus,
.timeentry-no-boxes .smart-select-trigger:focus,
.timeentry-no-boxes .smart-select-trigger:focus-visible {
  outline: none;
  border-bottom-color: #1c7ed6 !important;
}

.timeentry-left,
.timeentry-right {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.timeentry-hours-card {
  order: 1;
}

.timeentry-planned-card {
  order: 2;
}

.timeentry-user-picker {
  min-width: 260px;
}

.timeentry-user-picker .smart-select {
  min-width: 260px;
}

.timeentry-title-sticky {
  position: static;
  top: auto;
  z-index: auto;
  background: linear-gradient(180deg, #edf4ff 0%, #eef3fb 100%);
  padding: 10px 0 12px;
  margin-bottom: 8px;
}

.timeentry-right > .card {
  position: static;
  top: auto;
}

.timeentry-bulkbar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #d8e5f4;
  border-radius: 10px;
  background: #e6f0ff;
}

.timeentry-bulkbar.is-active {
  display: inline-flex;
}

.timeentry-bulkbar-floating {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(900px, calc(100% - 32px));
  z-index: 220;
  box-shadow: 0 10px 24px rgba(19, 37, 66, 0.15);
  justify-content: space-between;
}

.timeentry-bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.timeentry-planned-overdue-row td {
  background: #fee2e2 !important;
  color: #bb1e1e;
}


.monthstate-row.is-selected td {
  background: #f3f8ff;
}

.monthstatement-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.monthstatement-status-badge.is-draft {
  color: #8a5a00;
  background: #fff1cc;
}

.monthstatement-status-badge.is-submitted {
  color: #b54708;
  background: #ffedd5;
}

.monthstatement-status-badge.is-approved {
  color: #1d7f49;
  background: #ecfdf3;
}

.monthstatement-summary-card {
  margin-bottom: 16px;
}

.monthstatement-overnight-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.monthstatement-overnight-title {
  margin-bottom: 0;
  flex: 0 1 auto;
}

.monthstatement-overnight-title h2 {
  margin: 0;
  font-size: 14px;
}

.monthstatement-overnight-toggle {
  flex: 0 0 auto;
}

.monthstatement-overnight-card-header .monthstatement-week-meta {
  margin-left: auto;
}

.monthstatement-overnight-body.is-collapsed {
  display: none;
}

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

.monthstatement-summary-table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}

.monthstatement-summary-table th,
.monthstatement-summary-table td {
  text-align: center;
  white-space: nowrap;
}

.monthstatement-summary-table tbody td {
  font-weight: 700;
  color: #0c1f3f;
}

.monthstatement-overnight-table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}

.monthstatement-overnight-table th {
  min-width: 0;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: middle;
  background: #fbfcfe;
  color: #6a7f99;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.monthstatement-overnight-table td {
  vertical-align: top;
}

.monthstatement-overnight-table tfoot th {
  background: #eef4fb;
  border-top: 1px solid #d7e3f1;
  color: #0c1f3f;
  font-weight: 700;
  vertical-align: middle;
}

.monthstatement-overnight-table .monthstatement-overnight-center-col {
  text-align: center;
}

.monthstatement-overnight-table .monthstatement-overnight-text-col {
  text-align: center;
}

.monthstatement-overnight-table td:nth-child(5) {
  white-space: normal;
}

.monthstatement-overnight-text-cell {
  display: inline-block;
  max-width: 100%;
  text-align: left;
}

.monthstatement-note-row {
  margin-top: 16px;
}

.monthstatement-note-row-in-card {
  margin-top: 14px;
}

.monthstatement-note-row > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.monthstatement-note-row textarea {
  resize: vertical;
}

.monthstatement-empty-state {
  padding: 18px;
  border: 1px dashed #c8d7ea;
  border-radius: 14px;
  background: #f8fbff;
  color: #5a6f8b;
}

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

.monthstatement-week-summary-table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
  margin-bottom: 8px;
}

.monthstatement-week-summary-table th {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.monthstatement-day-rule {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
}

.monthstatement-source-table {
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
}

.monthstatement-source-table th,
.monthstatement-source-table td {
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding-top: 6px;
  padding-bottom: 6px;
}

.monthstatement-main-table th:nth-child(1),
.monthstatement-main-table td:nth-child(1) {
  width: 92px;
}

.monthstatement-main-table th:nth-child(2),
.monthstatement-main-table td:nth-child(2) {
  width: 150px;
}

.monthstatement-main-table th:nth-child(3),
.monthstatement-main-table td:nth-child(3) {
  width: 170px;
  text-align: left;
}

.monthstatement-main-table th:nth-child(4),
.monthstatement-main-table td:nth-child(4),
.monthstatement-main-table th:nth-child(5),
.monthstatement-main-table td:nth-child(5),
.monthstatement-main-table th:nth-child(6),
.monthstatement-main-table td:nth-child(6),
.monthstatement-main-table th:nth-child(7),
.monthstatement-main-table td:nth-child(7) {
  width: 52px;
  text-align: center;
}

.monthstatement-main-table th:nth-child(n+8),
.monthstatement-main-table td:nth-child(n+8) {
  width: 54px;
  text-align: center;
}

.monthstatement-source-project {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.monthstatement-source-phase {
  font-size: 11px;
  color: #5a6f8b;
}

.monthstatement-inline-edit[type="number"]::-webkit-outer-spin-button,
.monthstatement-inline-edit[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.monthstatement-inline-edit[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.monthstatement-total-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.monthstatement-total-value {
  color: #5a6f8b;
  font-weight: 700;
}

.monthstatement-inline-edit {
  display: inline-block;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  height: 1.2em;
  text-align: center;
  font-size: 12px;
  color: #0c1f3f;
}

.monthstatement-inline-edit:not([readonly]) {
  background: rgba(225, 236, 248, 0.65) !important;
  box-shadow: none;
  border-radius: 0;
  padding: 2px 6px;
  min-width: 4.5ch;
  min-height: 22px;
  cursor: text;
}

.monthstatement-inline-edit:not([readonly]):hover {
  background: rgba(214, 229, 244, 0.85) !important;
  box-shadow: none;
}

.monthstatement-inline-edit:not([readonly]):focus,
.monthstatement-inline-edit:not([readonly]):focus-visible,
.monthstatement-inline-edit:not([readonly]):active {
  background: rgba(205, 223, 242, 0.95) !important;
  box-shadow: none;
}

.monthstatement-inline-edit::placeholder {
  color: #9aaec7;
  opacity: 1;
}

.monthstatement-allocation-edit {
  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-align: right;
}

.monthstatement-day-divider th {
  position: relative;
  padding: 8px 10px;
  background: transparent;
  border-top: 1px solid #dbe5f0;
  border-bottom: 1px solid #e8eef6;
}

.monthstatement-day-divider th::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 0;
  top: 0;
  bottom: 0;
  background: #f8fbff;
  box-shadow: inset 4px 0 0 #d7e6f4;
  pointer-events: none;
  z-index: 1;
}

.monthstatement-day-divider th::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 20px;
  background: #fff;
  pointer-events: none;
  z-index: 2;
}

.monthstatement-week-header th {
  padding: 10px 10px 6px;
  background: #eaf1f8;
  border-top: 1px solid #d1deec;
  color: #274261;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: inset 0 -1px 0 #d8e4f1;
}

.monthstatement-week-header.is-overridden th {
  background: #fff1f3;
  color: #b42318;
}

.monthstatement-week-header.is-unbalanced th {
  background: #fff1f3;
  color: #b42318;
}

.monthstatement-week-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.monthstatement-week-title {
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.15;
  color: #0c1f3f;
}

.monthstatement-week-meta {
  margin-left: 12px;
  color: #5a6f8b;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.monthstatement-week-meta strong {
  color: #0c1f3f;
  font-weight: 700;
}

.monthstatement-week-header.is-overridden .monthstatement-week-meta,
.monthstatement-week-header.is-overridden .monthstatement-week-meta strong,
.monthstatement-week-header.is-unbalanced .monthstatement-week-meta,
.monthstatement-week-header.is-unbalanced .monthstatement-week-meta strong {
  color: #b42318;
}

.monthstatement-month-meta {
  margin-left: 12px;
  color: #5a6f8b;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.monthstatement-month-meta strong {
  color: #0c1f3f;
  font-weight: 700;
}

.monthstatement-week-header th:first-child {
  text-align: left;
}

.monthstatement-week-total-row th,
.monthstatement-week-total-row td {
  background: #f6faff;
  border-top: 1px solid #dbe5f0;
  font-weight: 700;
  color: #274261;
  padding-top: 7px;
  padding-bottom: 7px;
}

.monthstatement-week-total-row th:first-child,
.monthstatement-week-total-row td:first-child {
  padding-left: 34px;
}

.monthstatement-week-total-row th:not(:first-child),
.monthstatement-week-total-row td {
  text-align: center;
}

.monthstatement-month-total-row th,
.monthstatement-month-total-row td {
  background: #edf3fa;
  border-top: 1px solid #dbe5f0;
  font-weight: 700;
  color: #274261;
  padding-top: 8px;
  padding-bottom: 8px;
}

.monthstatement-month-total-row th:first-child {
  text-align: left;
}

.monthstatement-month-total-row th:not(:first-child),
.monthstatement-month-total-row td {
  text-align: center;
}

.monthstatement-week-gap td {
  padding: 32px 0;
  border: 0;
  background: transparent;
}

.monthstatement-week-gap.is-week-collapsed td {
  padding: 12px 0;
}

.monthstatement-day-gap td {
  padding: 8px 0;
  border: 0;
  background: transparent;
}

.monthstatement-day-gap.is-day-expanded td {
  padding: 36px 0;
}

.monthstatement-repeat-header th {
  background: #fcfdff;
  color: #6a7f99;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.monthstatement-week-summary-header th {
  background: #fbfcfe;
  color: #6a7f99;
  font-size: 11px;
  letter-spacing: 0.02em;
  text-align: center;
}

.monthstatement-week-summary-header th:first-child {
  text-align: left;
}

.monthstatement-week-header th[data-week-total-role] {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.monthstatement-day-divider.is-overridden th,
.monthstatement-day-divider.is-unbalanced th {
  background: transparent;
}

.monthstatement-day-divider.is-overridden th::before,
.monthstatement-day-divider.is-unbalanced th::before {
  background: #fff1f3;
  box-shadow: inset 4px 0 0 #f3c7ce;
}

.monthstatement-day-divider-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
}

.monthstatement-day-divider-title {
  font-family: "Segoe UI", "Calibri", "Tahoma", sans-serif;
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.15;
  color: #0c1f3f;
}

.monthstatement-day-divider-rule {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf3fa;
  border: 1px solid #d8e3ef;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
}

.monthstatement-day-divider-rule.is-weekday {
  background: #ecf4ff;
  border-color: #cddff5;
  color: #47627f;
}

.monthstatement-day-divider-rule.is-weekend {
  background: #fff4df;
  border-color: #f0d8a8;
  color: #8a5a00;
}

.monthstatement-day-divider.is-overridden .monthstatement-day-divider-title,
.monthstatement-day-divider.is-overridden .monthstatement-day-divider-rule,
.monthstatement-day-divider.is-unbalanced .monthstatement-day-divider-title,
.monthstatement-day-divider.is-unbalanced .monthstatement-day-divider-rule {
  color: #b42318;
}

.monthstatement-day-toggle {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 4px;
  margin-right: 4px;
  cursor: pointer;
  box-shadow: none;
  appearance: none;
}

.monthstatement-day-toggle:hover,
.monthstatement-day-toggle:focus,
.monthstatement-day-toggle:focus-visible,
.monthstatement-day-toggle:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.monthstatement-day-toggle-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #4e6788;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.12s ease;
}

.monthstatement-week-header.is-overridden .monthstatement-day-toggle-icon,
.monthstatement-week-header.is-unbalanced .monthstatement-day-toggle-icon,
.monthstatement-day-divider.is-overridden .monthstatement-day-toggle-icon,
.monthstatement-day-divider.is-unbalanced .monthstatement-day-toggle-icon {
  stroke: #b42318;
}

.monthstatement-day-toggle[aria-expanded="true"] .monthstatement-day-toggle-icon {
  transform: rotate(90deg);
}

.monthstatement-week-toggle {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  appearance: none;
}

.monthstatement-week-toggle:hover,
.monthstatement-week-toggle:focus,
.monthstatement-week-toggle:focus-visible,
.monthstatement-week-toggle:active {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.monthstatement-week-toggle[aria-expanded="true"] .monthstatement-day-toggle-icon {
  transform: rotate(90deg);
}

.monthstatement-source-row.is-collapsed {
  display: none;
}

.monthstatement-week-row.is-week-collapsed {
  display: none;
}

.monthstatement-week-gap.is-week-collapsed {
  display: table-row;
}

.monthstatement-day-total-row th,
.monthstatement-day-total-row td {
  background: #fbfdff;
  font-weight: 600;
  border-top: 1px solid #e4edf7;
  padding-top: 6px;
  padding-bottom: 6px;
}

.monthstatement-day-total-row th:not(:first-child),
.monthstatement-day-correction-row th:not(:first-child) {
  text-align: center;
}

.monthstatement-day-correction-row th,
.monthstatement-day-correction-row td {
  background: #fdfefe;
  border-top: 1px solid #eef3f8;
  border-bottom: 1px solid #d7e4f1;
  box-shadow: inset 0 -1px 0 #d9e6f3;
  padding-top: 6px;
  padding-bottom: 6px;
  vertical-align: middle;
}

.monthstatement-day-correction-row th {
  color: #4f6786;
  font-weight: 400;
}

.monthstatement-day-correction-row.is-balanced th,
.monthstatement-day-correction-row.is-balanced td,
.monthstatement-day-correction-row.is-balanced .monthstatement-inline-edit {
  color: #1d7f49;
}

.monthstatement-day-correction-row.is-unbalanced th,
.monthstatement-day-correction-row.is-unbalanced td,
.monthstatement-day-correction-row.is-unbalanced .monthstatement-inline-edit {
  color: #b42318;
}

.monthstatement-day-correction-row.is-unbalanced th,
.monthstatement-day-correction-row.is-unbalanced td {
  border-bottom-color: #f0c7cf;
  box-shadow: inset 0 -1px 0 #f6d6dc;
}

.monthstatement-changed-cell,
.monthstatement-day-correction-row .monthstatement-inline-edit.is-changed {
  color: #b42318;
}

.monthstatement-day-correction-row .monthstatement-total-cell {
  gap: 0;
}

.monthstatement-day-correction-row .timeentry-inline-edit.monthstatement-inline-edit:not([readonly]) {
  display: inline-block;
  width: 7ch;
  min-width: 7ch;
  max-width: 7ch;
  padding: 2px 6px !important;
  margin: 0 auto !important;
  text-align: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: rgba(225, 236, 248, 0.65) !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.monthstatement-day-correction-row .timeentry-inline-edit.monthstatement-inline-edit:not([readonly]):hover {
  background: rgba(214, 229, 244, 0.85) !important;
}

.monthstatement-day-correction-row .timeentry-inline-edit.monthstatement-inline-edit:not([readonly]):focus,
.monthstatement-day-correction-row .timeentry-inline-edit.monthstatement-inline-edit:not([readonly]):focus-visible,
.monthstatement-day-correction-row .timeentry-inline-edit.monthstatement-inline-edit:not([readonly]):active {
  background: rgba(205, 223, 242, 0.95) !important;
}

.monthstatement-correction-label {
  white-space: nowrap;
}

.monthstatement-repeat-header th:first-child,
.monthstatement-source-row td:first-child,
.monthstatement-day-total-row th:first-child,
.monthstatement-day-correction-row th:first-child {
  position: relative;
  padding-left: 34px;
}

.monthstatement-repeat-header th:first-child::before,
.monthstatement-source-row td:first-child::before,
.monthstatement-day-total-row th:first-child::before,
.monthstatement-day-correction-row th:first-child::before {
  content: none;
}

.monthstatement-repeat-header th:first-child::after,
.monthstatement-source-row td:first-child::after,
.monthstatement-day-total-row th:first-child::after,
.monthstatement-day-correction-row th:first-child::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 20px;
  z-index: 1;
}

.monthstatement-repeat-header th:first-child::after {
  background: #fcfdff;
  width: 34px;
}

.monthstatement-source-row td:first-child::after {
  background: #fff;
  width: 34px;
}

.monthstatement-day-total-row th:first-child::after {
  background: #fbfdff;
}

.monthstatement-day-correction-row th:first-child::after {
  background: #fdfefe;
  width: 34px;
  bottom: -4px;
}

.monthstatement-allocation-section {
  margin-top: 18px;
}

.monthstatement-breakdown-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.monthstatement-breakdown-card {
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 12px 14px 14px;
}

.monthstatement-breakdown-card .section-title {
  margin-bottom: 8px;
}

.monthstatement-breakdown-card .section-title h2 {
  margin: 0;
  font-size: 14px;
}

.monthstatement-breakdown-table {
  margin-bottom: 0;
}

.monthstatement-breakdown-table th,
.monthstatement-breakdown-table td {
  padding: 6px 8px;
}

.monthstatement-breakdown-table tbody th {
  font-weight: 500;
  text-align: left;
}

.monthstatement-breakdown-table td {
  width: 92px;
  text-align: right;
  white-space: nowrap;
}

.monthstatement-breakdown-edit-cell {
  padding-right: 8px;
}

.monthstatement-breakdown-table td.monthstatement-breakdown-edit-cell {
  text-align: right;
}

.monthstatement-breakdown-table td.monthstatement-breakdown-edit-cell .timeentry-inline-edit.monthstatement-inline-edit.monthstatement-allocation-edit {
  display: inline-block;
  width: 7ch;
  min-width: 7ch;
  max-width: none;
  text-align: right !important;
  padding: 2px 0 !important;
  margin: 0 !important;
  font: inherit;
  color: inherit;
  vertical-align: middle;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(225, 236, 248, 0.65) !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

.monthstatement-breakdown-table td.monthstatement-breakdown-edit-cell .timeentry-inline-edit.monthstatement-inline-edit.monthstatement-allocation-edit[data-monthstatement-breakdown-balance][readonly] {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.monthstatement-breakdown-subtotal th,
.monthstatement-breakdown-subtotal td,
.monthstatement-breakdown-total th,
.monthstatement-breakdown-total td {
  font-weight: 700;
}

.monthstatement-breakdown-subtotal th,
.monthstatement-breakdown-subtotal td {
  border-top: 1px solid #dbe5f0;
}

.monthstatement-breakdown-total th,
.monthstatement-breakdown-total td {
  border-top: 1px solid #cbd8e6;
  color: #0c1f3f;
}

.monthstatement-breakdown-allocation-row.is-active th,
.monthstatement-breakdown-allocation-row.is-active td,
.monthstatement-breakdown-allocation-row.is-active .monthstatement-inline-edit {
  color: #b54708;
}

.monthstatement-breakdown-table tr.monthstatement-review-source-row th,
.monthstatement-breakdown-table tr.monthstatement-review-source-row td,
.monthstatement-breakdown-table tr.monthstatement-review-source-row .monthstatement-inline-edit {
  color: #1f5fae !important;
}

.monthstatement-breakdown-table tr.monthstatement-review-allocation-row th,
.monthstatement-breakdown-table tr.monthstatement-review-allocation-row td,
.monthstatement-breakdown-table tr.monthstatement-review-allocation-row .monthstatement-inline-edit {
  color: #b42318 !important;
}

.monthstatement-breakdown-total.is-balanced th,
.monthstatement-breakdown-total.is-balanced td {
  color: #1d7f49;
}

.monthstatement-breakdown-total.is-unbalanced th,
.monthstatement-breakdown-total.is-unbalanced td {
  color: #b42318;
}

.monthstatement-allocation-table input {
  width: 120px;
  min-width: 120px;
}

.monthstatement-bucket-summary-table {
  table-layout: fixed;
  width: 100%;
}

.monthstatement-bucket-summary-table col.monthstatement-bucket-col {
  width: calc(100% / 7);
}

.monthstatement-bucket-summary-table thead th,
.monthstatement-allocation-table thead th {
  white-space: nowrap;
}

.monthstatement-bucket-summary-table tbody th,
.monthstatement-allocation-table tbody td:first-child {
  white-space: nowrap;
}

.monthstatement-bucket-summary-table thead th {
  text-align: center !important;
  white-space: nowrap;
  padding-left: 0;
  padding-right: 0;
}

.monthstatement-bucket-summary-table th[data-sortable] .table-sort-trigger {
  justify-content: center;
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.monthstatement-bucket-summary-table tbody th,
.monthstatement-bucket-summary-table td {
  text-align: center;
  white-space: nowrap;
  padding-left: 0;
  padding-right: 0;
}

.monthstatement-bucket-summary-table td,
.monthstatement-bucket-summary-table th {
  font-variant-numeric: tabular-nums;
}

.monthstatement-bucket-summary-table td .monthstatement-allocation-edit {
  display: inline-block;
  width: 7ch;
  min-width: 7ch;
  max-width: 7ch;
  padding: 2px 0 !important;
  margin: 0 auto !important;
  text-align: center !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.monthstatement-bucket-summary-table tr.is-balanced th,
.monthstatement-bucket-summary-table tr.is-balanced td,
.monthstatement-bucket-summary-table tr.is-balanced .monthstatement-inline-edit {
  color: #1d7f49;
}

.monthstatement-bucket-summary-table tr.is-changed th,
.monthstatement-bucket-summary-table tr.is-changed td,
.monthstatement-bucket-summary-table tr.is-changed .monthstatement-inline-edit {
  color: #b42318;
}

.monthstatement-bucket-summary-table tr.is-unbalanced th,
.monthstatement-bucket-summary-table tr.is-unbalanced td,
.monthstatement-bucket-summary-table tr.is-unbalanced .monthstatement-inline-edit {
  color: #b42318;
}

.monthstatement-bucket-summary-table td.monthstatement-review-source-cell,
.monthstatement-bucket-summary-table th.monthstatement-review-source-cell,
.monthstatement-bucket-summary-table .monthstatement-inline-edit.is-review-source-changed {
  color: #1f5fae !important;
}

.monthstatement-bucket-summary-table td.monthstatement-review-allocation-cell,
.monthstatement-bucket-summary-table th.monthstatement-review-allocation-cell,
.monthstatement-bucket-summary-table .monthstatement-inline-edit.is-review-allocation-changed {
  color: #b42318 !important;
}

.monthstatement-allocation-table td {
  text-align: right;
  white-space: nowrap;
}

.monthstatement-allocation-table thead th:not(:first-child) {
  text-align: right;
}

.monthstatement-allocation-table td input.monthstatement-allocation-edit {
  text-align: right !important;
}

.monthstatement-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.monthstatement-actions.is-hidden {
  display: none;
}

.monthstatement-actions .is-hidden,
[data-monthstatement-save-actions].is-hidden {
  display: none;
}

@media (max-width: 1200px) {
  .monthstatement-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

#addHoursModal #addHoursStartTime,
#addHoursModal #addHoursEndTime,
#addHoursModal #addHoursOutboundStartTime,
#addHoursModal #addHoursOutboundEndTime,
#addHoursModal #addHoursReturnStartTime,
#addHoursModal #addHoursReturnEndTime {
  width: 112px;
  min-width: 112px;
}

#addHoursModal #addHoursHours,
#addHoursModal #addHoursPauseMinutes,
#addHoursModal input[name="AddHours.Kilometers"] {
  width: 120px;
  min-width: 120px;
}

#addHoursModal .form-grid > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

#addHoursModal .form-grid > div > .modal-label {
  display: block;
  margin: 0;
}

@media (max-width: 900px) {
  .monthstatement-source-table {
    min-width: 1080px;
  }

  .monthstatement-summary-table {
    min-width: 760px;
  }

  .monthstatement-allocation-table input {
    width: 84px;
    min-width: 84px;
  }
}

#addHoursModal .modal {
  width: min(536px, 90vw) !important;
  max-width: 536px !important;
  min-width: 0;
}

#addHoursModal .modal-body {
  gap: 8px;
  padding: 12px 16px 14px;
}

#addHoursModal .form-grid {
  margin-top: 4px;
  gap: 8px;
}

#addHoursModal .form-grid-4 {
  grid-template-columns: repeat(4, max-content);
  justify-content: flex-start;
  column-gap: 12px;
  width: max-content;
  max-width: 100%;
}

#addHoursModal .form-grid-2 {
  grid-template-columns: minmax(140px, max-content) minmax(280px, 1fr);
  column-gap: 12px;
  width: min(100%, 720px);
}

#addHoursModal .form-grid-3 {
  grid-template-columns: repeat(3, max-content);
  justify-content: flex-start;
  column-gap: 12px;
}

#addHoursModal .addhours-travel-pairs {
  grid-template-columns: repeat(2, max-content);
  justify-content: flex-start;
  column-gap: 12px;
  width: max-content;
  max-width: 100%;
}

#addHoursModal .addhours-travel-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#addHoursModal .addhours-travel-times {
  width: max-content;
  margin-top: 0;
  grid-template-columns: repeat(2, max-content);
  column-gap: 12px;
}

#addHoursModal .addhours-description-row {
  margin-top: 2px;
}

#addHoursModal textarea {
  min-height: 88px;
  resize: vertical;
}

#addHoursItemRow .smart-select,
#addHoursItemRow .smart-select-trigger,
#addHoursItemRow select {
  width: 100%;
}

#addHoursModal .modal-row-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 4px;
  width: 100%;
}

#addHoursModal .modal-row-header .modal-label {
  margin-bottom: 0;
}

#addHoursModal .modal-row-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#addHoursModal .modal-row-actions .calendar-inline-link {
  margin-left: 0;
}

#addHoursModal .modal-row-header > .calendar-inline-link {
  margin-left: auto;
}

#addHoursModal .form-grid:not(.form-grid-4):not(.form-grid-3):not(.form-grid-2) > div {
  width: 100%;
}

#addHoursModal .modal-actions {
  justify-content: space-between;
  align-items: center;
}

#addHoursModal .modal-actions-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* TimeEntries nested create modals must render above add-hours modal */
#teCreateProjectModal,
#teCreatePhaseModal,
#teJoinProjectModal,
#teJoinPhaseModal {
  position: fixed;
  inset: 0;
  z-index: 2300;
}

#teCreateProjectModal .calendar-edit-card,
#teCreatePhaseModal .calendar-edit-card,
#teJoinProjectModal .calendar-edit-card,
#teJoinPhaseModal .calendar-edit-card {
  overflow: visible;
}

#teCreateProjectModal .calendar-edit-body,
#teCreatePhaseModal .calendar-edit-body,
#teJoinProjectModal .calendar-edit-body,
#teJoinPhaseModal .calendar-edit-body {
  overflow: visible;
}

#teCreateProjectModal .smart-select.is-open,
#teCreatePhaseModal .smart-select.is-open,
#teJoinProjectModal .smart-select.is-open,
#teJoinPhaseModal .smart-select.is-open {
  z-index: 2400;
}

#teCreateProjectModal .smart-select-panel,
#teCreatePhaseModal .smart-select-panel,
#teJoinProjectModal .smart-select-panel,
#teJoinPhaseModal .smart-select-panel {
  z-index: 2401;
}

#addHoursModal .settings-checkbox-row {
  margin-top: 2px;
}

#addHoursModal .settings-checkbox-row span {
  font-weight: 600;
  color: #0e223d;
}

#addHoursModal .modal-actions {
  margin-top: 8px;
  padding-top: 8px;
  padding-bottom: 12px;
  padding-left: 16px;
  padding-right: 16px;
}

.timeentry-week-card {
  margin: 0;
}

.timeentry-week-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  margin-bottom: 12px;
}

.timeentry-week-summary::-webkit-details-marker {
  display: none;
}

.timeentry-week-summary h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #0e223d;
}

.timeentry-week-chevron {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0c355d;
  flex: 0 0 auto;
}

.timeentry-week-chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease-in-out;
  display: block;
}

.timeentry-week-card[open] .timeentry-week-chevron {
  transform: none;
}

.timeentry-week-card[open] .timeentry-week-chevron::before {
  transform: rotate(45deg);
}

.timeentry-week-body {
  padding-bottom: 4px;
}

.timeentry-week-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.timeentry-week-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px 0;
}

.timeentry-week-nav-label {
  font-size: 12px;
  font-weight: 700;
  color: #0e223d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#timeEntryTodayBtn {
  margin-left: 4px;
}

.timeentry-today-issues-badge {
  margin-left: -2px;
}

.timeentry-week-nav-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5a6f90;
  text-decoration: none;
}

.timeentry-week-nav-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeentry-week-total {
  margin-left: auto;
  font-size: 12px;
  color: #5a6f90;
}

.timeentry-hours-note {
  font-size: 10px;
}

.timeentry-day-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.timeentry-week-tabs .tab {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0 !important;
  margin: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.timeentry-week-tabs .tab:last-child {
  border-right: 0;
}

.timeentry-week-tab {
  min-width: 0;
}

.timeentry-day-panel .section-title {
  margin-bottom: 8px;
}

.timeentry-assigned-issues-table {
  table-layout: fixed;
}

.timeentry-assigned-issues-table th:nth-child(1) {
  width: 64px;
}

.timeentry-assigned-issues-table th:nth-child(2) {
  width: 24%;
}

.timeentry-assigned-issues-table th:nth-child(4) {
  width: 132px;
}

.timeentry-assigned-issues-table td {
  vertical-align: middle;
}

.timeentry-assigned-issues-table td:nth-child(2),
.timeentry-assigned-issues-table td:nth-child(3) {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.timeentry-assigned-issues-table th.col-done,
.timeentry-assigned-issues-table td.col-done {
  width: 76px;
  text-align: center;
  vertical-align: middle;
}

.timeentry-assigned-issue-check {
  width: 18px;
  height: 18px;
  margin: 0;
}

.timeentry-assigned-issue-row {
  cursor: pointer;
}

.timeentry-assigned-issue-overdue td:nth-child(3),
.timeentry-assigned-issue-overdue td:nth-child(4) {
  color: #bb1e1e;
}

.timeentry-assigned-issue-done td {
  color: #6c7a90;
}

#timeEntryBookedTable th.col-type,
#timeEntryBookedTable td.col-type {
  width: 72px;
  white-space: nowrap;
}

#timeEntryBookedTable th.col-booktype,
#timeEntryBookedTable td.col-booktype {
  width: 116px;
  vertical-align: middle;
}

#timeEntryBookedTable th.col-project-phase,
#timeEntryBookedTable td.col-project-phase {
  width: 230px;
}

#timeEntryBookedTable th.col-time,
#timeEntryBookedTable td.col-time,
#timeEntryBookedTable th.col-pause,
#timeEntryBookedTable td.col-pause,
#timeEntryBookedTable th.col-hours,
#timeEntryBookedTable td.col-hours,
#timeEntryBookedTable th.col-km,
#timeEntryBookedTable td.col-km {
  width: 74px;
  white-space: nowrap;
}

.timeentry-project-phase {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeentry-phase-sub {
  font-size: 12px;
  color: #5f7393;
}

.timeentry-phase-closed-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e7edf5;
  color: #4f6481;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

#timeEntryBookedTable td:last-child {
  text-align: right;
  width: 52px;
}

.timeentry-no-boxes .timeentry-inline-edit {
  border: none !important;
  border-bottom: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.timeentry-inline-edit {
  width: 100%;
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-decoration: none !important;
  text-decoration-line: none !important;
  text-underline-offset: 0 !important;
  border-image: none !important;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
  box-shadow: none;
}

.timeentry-inline-edit:focus,
.timeentry-inline-edit:hover,
.timeentry-inline-edit:active {
  border: 0;
  border-bottom: 0 !important;
  background: transparent;
  outline: none;
  box-shadow: none;
  text-decoration: none !important;
}

#timeEntryBookedTable td {
  text-decoration: none;
  vertical-align: middle;
}

#timeEntryBookedTable .timeentry-inline-edit::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 0;
  margin: 0;
  pointer-events: none;
}

.timeentry-inline-km {
  width: 90px;
  max-width: 90px;
  appearance: textfield;
  -moz-appearance: textfield;
}

#timeEntryBookedTable .timeentry-row-check {
  display: block;
  margin: 0 auto;
}

.timeentry-inline-km::-webkit-outer-spin-button,
.timeentry-inline-km::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.timeentry-hours-value {
  display: inline-block;
  min-width: 32px;
}

.timeentry-inline-description {
  min-width: 180px;
  width: 100%;
  max-width: 100%;
  min-height: 20px;
  resize: none;
  overflow: hidden !important;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.timeentry-description-cell {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.timeentry-inline-pause {
  width: 52px;
  max-width: 52px;
  appearance: textfield;
  -moz-appearance: textfield;
}

.timeentry-inline-pause::-webkit-outer-spin-button,
.timeentry-inline-pause::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.timeentry-quick-form .form-grid {
  margin-bottom: 10px;
}

.timeentry-quick-actions {
  display: flex;
  justify-content: flex-end;
}

.timeentry-mini-calendar .drp-toolbar {
  padding: 8px 8px 0;
}

.timeentry-mini-calendar .drp-day {
  min-height: 30px;
  padding: 6px 8px 0;
  font-size: 12px;
}

.timeentry-mini-calendar .drp-day.is-today {
  font-weight: 700;
}

.timeentry-mini-calendar .drp-week-row {
  min-height: 30px;
}

.timeentry-mini-calendar .drp-days-layer {
  min-height: 30px;
}

.timeentry-mini-calendar .drp-week-number {
  padding-top: 6px;
  font-size: 11px;
}

.timeentry-mini-calendar .timeentry-complete-day {
  background: rgba(38, 164, 79, 0.16);
  color: #0e5131;
  font-weight: 600;
}

.timeentry-mini-calendar .timeentry-complete-day:hover,
.timeentry-mini-calendar .timeentry-complete-day:focus,
.timeentry-mini-calendar .timeentry-complete-day:focus-visible,
.timeentry-mini-calendar .timeentry-complete-day:active {
  background: rgba(38, 164, 79, 0.16);
  color: #0e5131;
}

.timeentry-mini-calendar .timeentry-pending-day {
  background: rgba(242, 132, 38, 0.18);
  color: #82440f;
  font-weight: 600;
}

.timeentry-mini-calendar .timeentry-pending-day:hover,
.timeentry-mini-calendar .timeentry-pending-day:focus,
.timeentry-mini-calendar .timeentry-pending-day:focus-visible,
.timeentry-mini-calendar .timeentry-pending-day:active {
  background: rgba(242, 132, 38, 0.18);
  color: #82440f;
}

.timeentry-monthstate-action {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.timeentry-expense-files {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeentry-expense-files a {
  color: #0c355d;
  text-decoration: none;
  font-size: 12px;
}

.timeentry-expense-files a:hover,
.timeentry-expense-files a:focus-visible {
  color: #0c355d;
  text-decoration: underline;
}

.smart-select.timeentry-expense-status {
  min-width: 240px;
  max-width: 280px;
}

#addExpenseModal .modal {
  width: min(1120px, 96vw);
  max-width: 1120px;
  overflow: visible;
}

#addExpenseModal .modal .modal-body {
  overflow: visible;
}

#addExpenseModal .modal.smart-select-open .modal-body {
  overflow: visible;
}

#addExpenseModal .settings-checkbox-row {
  margin-top: 2px;
}

#addExpenseModal textarea {
  min-height: 88px;
  resize: vertical;
}

#editExpenseModal .modal {
  width: min(1120px, 96vw);
  max-width: 1120px;
  overflow: visible;
}

#editExpenseModal .modal .modal-body {
  overflow: visible;
}

#editExpenseModal .modal.smart-select-open .modal-body {
  overflow: visible;
}

#editExpenseModal .settings-checkbox-row {
  margin-top: 2px;
}

#editExpenseModal textarea {
  min-height: 88px;
  resize: vertical;
}

#addOvernightAllowanceModal textarea,
#editOvernightAllowanceModal textarea {
  min-height: 88px;
  resize: vertical;
}

.expense-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  gap: 18px;
  align-items: start;
}

.expense-modal-form {
  display: grid;
  gap: 14px;
}

.expense-modal-preview {
  border-left: 1px solid var(--line);
  padding-left: 16px;
  min-width: 0;
  min-height: 420px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.expense-preview-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7fbff;
  height: min(58vh, 520px);
  min-height: 380px;
  overflow: hidden;
  touch-action: none;
}

.expense-preview-stage.is-dragover {
  border-color: #0a63b4;
  box-shadow: 0 0 0 2px rgba(10, 99, 180, 0.15) inset;
}

.expense-preview-toolbar {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.expense-preview-nav,
.expense-preview-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px;
}

.expense-preview-nav span {
  font-size: 12px;
  color: #3f5c7f;
  min-width: 54px;
  text-align: center;
}

.expense-preview-controls .btn-sm,
.expense-preview-nav .btn-sm {
  min-width: 34px;
  padding: 6px 10px;
}

.expense-preview-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
  z-index: 1;
  pointer-events: auto;
}

.expense-preview-empty[hidden] {
  display: none !important;
}

.expense-preview-empty svg {
  width: 34px;
  height: 34px;
  fill: #0a63b4;
}

.expense-preview-empty p {
  margin: 0;
}

.expense-preview-empty-browse {
  border: 0;
  background: transparent;
  color: #0a63b4;
  text-decoration: underline;
  padding: 0;
  font-size: 12px;
}

.expense-preview-empty-browse:hover,
.expense-preview-empty-browse:focus-visible {
  background: transparent;
  color: #08518f;
}

.expense-preview-canvas {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.expense-preview-media {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  pointer-events: none;
}

.expense-preview-canvas iframe.expense-preview-media {
  width: 100%;
  height: 100%;
  border: 0;
}

.expense-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.expense-preview-attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: #0a63b4;
  text-decoration: none;
  padding: 0;
  font-size: 13px;
}

.expense-preview-attach svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.expense-preview-attach:hover,
.expense-preview-attach:focus-visible {
  background: transparent;
  color: #08518f;
}

@media (max-width: 980px) {
  .expense-modal-layout {
    grid-template-columns: 1fr;
  }

  .expense-modal-preview {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
    min-height: 300px;
  }
}

.modal > form:not(.modal-body) > .modal-actions {
  margin-top: 0;
  padding: 10px 18px 16px;
  border-top: 1px solid var(--line);
}

.project-quick-add-modal .modal {
  display: flex;
  flex-direction: column;
  width: min(536px, 90vw) !important;
  max-width: 536px !important;
  min-width: 0;
  max-height: min(92vh, 940px);
  overflow: visible;
}

.project-quick-add-modal .modal > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.project-quick-add-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  gap: 8px;
  padding: 12px 16px 14px;
}

.project-quick-add-modal .modal.smart-select-open .modal-body {
  overflow: visible;
}

.project-quick-add-modal .form-grid {
  margin-top: 4px;
  gap: 8px;
}

.project-quick-add-modal .form-grid > * {
  position: relative;
}

.project-quick-add-modal .form-grid > div {
  width: 100%;
}

.project-quick-add-modal .modal .smart-select.is-open {
  z-index: 220;
}

.project-quick-add-modal .modal .form-grid > *:has(.smart-select.is-open) {
  z-index: 219;
}

.project-quick-add-modal .modal .smart-select-panel {
  z-index: 221;
}

.project-quick-add-modal .smart-select {
  background: #fff !important;
}

.project-quick-add-modal .smart-select-trigger,
.project-quick-add-modal .smart-select-trigger:hover,
.project-quick-add-modal .smart-select-trigger:focus,
.project-quick-add-modal .smart-select-trigger:focus-visible,
.project-quick-add-modal .smart-select-trigger:active {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  color: #1c2331 !important;
  box-shadow: none !important;
}

.project-quick-add-modal .smart-select-panel,
.project-quick-add-modal .smart-select-search {
  background: #fff !important;
}

.project-quick-add-modal textarea {
  min-height: 88px;
  max-width: 100%;
  resize: vertical;
}

.timeentry-expense-filter-select {
  width: 176px;
  min-width: 176px;
}

#timeEntryRowsTable input[type="time"],
#timeEntryRowsTable input[type="number"] {
  min-width: 92px;
  padding: 6px 8px;
}

.table-link {
  color: inherit;
  text-decoration: none;
  font-weight: 400;
}

.table-link:visited {
  color: inherit;
}

.table-link:hover,
.table-link:focus-visible {
  text-decoration: underline;
  color: inherit;
}

#customersListRegion .table tbody td,
#customersListRegion .table tbody td .table-link,
#customersListRegion .table tbody td .table-link:visited {
  font-family: "Segoe UI", "Calibri", "Tahoma", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

#timeEntryBookedTable td.col-time input.timeentry-inline-edit,
#timeEntryBookedTable td.col-pause input.timeentry-inline-edit {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
}

#timeEntryBookedTable td.col-km input.timeentry-inline-edit {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

#timeEntryBookedTable td.col-booktype select.timeentry-inline-edit:not(.timeentry-inline-description) {
  width: 100%;
  min-width: 0;
  max-width: none;
}

#timeEntryBookedTable .timeentry-inline-worktype {
  width: 100%;
}

.timeentry-booktype-cell {
  display: block;
  min-width: 0;
}

#timeEntryBookedTable td.col-booktype .timeentry-booktype-static {
  display: block;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
  color: inherit;
}

#timeEntryBookedTable td.col-booktype .smart-select {
  width: 100%;
  min-width: 108px;
}

#timeEntryBookedTable td.col-booktype .smart-select-trigger {
  min-height: 34px;
  padding: 6px 8px;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#timeEntryBookedTable td.col-booktype .smart-select-trigger:hover,
#timeEntryBookedTable td.col-booktype .smart-select-trigger:focus,
#timeEntryBookedTable td.col-booktype .smart-select-trigger:focus-visible,
#timeEntryBookedTable td.col-booktype .smart-select-trigger:active {
  border: none !important;
  background: transparent !important;
}

#timeEntryBookedTable td.col-booktype .smart-select-trigger-text {
  font-size: 12px;
  line-height: 1.2;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

#timeEntryBookedTable td.col-booktype .smart-select-panel {
  left: 0;
  right: auto;
  width: max-content;
  min-width: 100%;
  max-width: 360px;
  z-index: 160;
}

#timeEntryBookedTable td.col-booktype .smart-select-list {
  max-height: 260px;
}

#timeEntryBookedTable td.col-booktype .smart-select-option {
  white-space: nowrap;
  font-size: 12px;
}

#timeEntryBookedTable .timeentry-inline-description {
  width: 100%;
  min-width: 260px;
}

.btn-success {
  background: #1f9d55;
  color: #ffffff;
  border: 1px solid #1f9d55;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:focus-visible,
.btn-success:active {
  background: #188047;
  border-color: #188047;
  color: #ffffff;
}

@media (max-width: 1200px) {
  .timeentry-layout {
    grid-template-columns: 1fr;
  }
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  background: white;
  border-radius: 14px;
  width: min(520px, 92vw);
  box-shadow: 0 20px 40px rgba(16, 27, 40, 0.25);
  border: 1px solid #dce7f5;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-wide {
  width: min(960px, 96vw);
  max-width: 960px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--muted);
}

.modal-close:hover,
.modal-close:focus,
.modal-close:focus-visible,
.modal-close:active {
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  outline: none;
}

.modal-body {
  padding: 16px 18px 18px;
  display: grid;
  gap: 14px;
}

.modal-body.modal-form-spaced .modal-actions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.modal.smart-select-open {
  overflow: visible;
}

.modal.smart-select-open .modal-body {
  overflow: visible;
}

.modal.smart-select-open .smart-select.is-open {
  z-index: 260;
}

.modal.smart-select-open .smart-select-panel {
  z-index: 261;
}

#projectRateSetModal .modal {
  overflow: visible;
}

#projectRateSetModal .modal .modal-body {
  overflow: visible;
}

#projectRateSetModal .modal.smart-select-open .modal-body {
  overflow: visible;
}

#projectRateSetModal .modal .smart-select.is-open {
  z-index: 260;
}

#projectRateSetModal .modal .smart-select-panel {
  z-index: 261;
}

.modal-row {
  display: grid;
  gap: 6px;
}

#calendarConnectionModal .calendar-connect-panel {
  display: grid;
  gap: 8px;
}

#calendarConnectionModal .calendar-connect-panel .helper {
  overflow-wrap: anywhere;
}

#calendarConnectionModal #connectGoogleCalendarButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

#calendarConnectionModal #connectGoogleCalendarButton.is-disabled {
  pointer-events: none;
}

#calendarConnectionModal .modal-flags-row {
  display: grid;
  gap: 8px;
}

#findResourceModal .modal {
  width: min(1200px, 96vw);
  max-width: 1200px;
}

#findResourceModal {
  z-index: 7000;
}

#findResourceModal .modal-body {
  display: grid;
  gap: 12px;
}

#findResourceModal .find-resource-department-row {
  grid-column: 1 / -1;
}

#findResourceModal .find-resource-toolbar {
  display: flex;
  justify-content: flex-end;
}

#findResourceModal .find-resource-results {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

#findResourceModal .find-resource-results .table {
  margin: 0;
  width: 100%;
  table-layout: fixed;
}

#findResourceModal .find-resource-results .table th,
#findResourceModal .find-resource-results .table td {
  vertical-align: middle;
}

#findResourceModal .find-resource-row {
  cursor: pointer;
}

#findResourceModal .find-resource-placeholder {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

#findResourceModal .find-resource-col-user {
  width: 22%;
}

#findResourceModal .find-resource-col-department {
  width: 16%;
}

#findResourceModal .find-resource-num {
  text-align: left;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.project-price-rules-card {
  width: 100%;
  max-width: none;
}

.project-rate-meta {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-bottom: 10px;
}

.project-financial-metrics-card {
  margin-top: 18px;
}

.project-financial-negative {
  color: #bb1e1e;
}

.project-financial-positive {
  color: #1f7a3f;
}

.project-price-rules-card .table input.project-rate-inline-input,
.card .table input.rateset-inline-price {
  width: 110px;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #0b1f3b;
  font: inherit;
  line-height: 1.2;
  padding: 0;
  margin: 0;
  outline: none;
  box-shadow: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.project-price-rules-card .table input.project-rate-inline-input:focus,
.card .table input.rateset-inline-price:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.project-price-rules-card .table input.project-rate-inline-input::-webkit-outer-spin-button,
.project-price-rules-card .table input.project-rate-inline-input::-webkit-inner-spin-button,
.card .table input.rateset-inline-price::-webkit-outer-spin-button,
.card .table input.rateset-inline-price::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 1200px) {
  .project-price-rules-card {
    width: 100%;
    max-width: 100%;
  }

  .project-rate-meta {
    display: grid;
    gap: 8px;
  }
}

.checkbox-row {
  display: grid;
  grid-template-columns: 140px auto;
  align-items: center;
  gap: 12px;
}

.settings-checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #0c355d;
}

.settings-checkbox-row input[type="checkbox"] {
  margin: 0;
  width: 16px;
  min-width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.settings-checkbox-row span {
  color: var(--muted);
  font-size: 14px;
}

.modal-flags-row .settings-checkbox-row {
  font-size: 12px;
}

.modal-flags-row .settings-checkbox-row span {
  font-size: 12px;
}

.modal-label {
  font-size: 12px;
  color: #3f5c7f;
  font-weight: 600;
}

.modal-body label {
  font-size: 12px;
  color: #3f5c7f;
  font-weight: 600;
}

.project-quick-add-modal .settings-checkbox-row label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.modal-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0;
}

.modal-checklist.is-inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.schedule-day-hours-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.schedule-day-hours-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.schedule-day-hours-item span {
  font-size: 12px;
  color: var(--muted);
}

.schedule-day-hours-item input {
  min-width: 0;
}

@media (max-width: 980px) {
  .schedule-day-hours-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.modal-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #1f2a37;
}

.modal-checklist .helper {
  font-size: 11px;
  color: var(--muted);
}

.modal-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f7fbff;
}

.modal-section summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #0c355d;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.modal-actions-start {
  justify-content: flex-start;
}

/* Planning modal parity (project + year + department + resource) */
.plan-modal-backdrop .modal {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 940px);
  overflow: visible;
}

.plan-modal-backdrop .modal .modal-body {
  overflow: auto;
  scrollbar-gutter: stable;
  padding-bottom: 16px;
}

.plan-modal-backdrop .modal.smart-select-open .modal-body {
  overflow: visible;
}

.plan-modal-backdrop .modal .form-grid > * {
  position: relative;
}

.plan-modal-backdrop .modal .smart-select.is-open {
  z-index: 220;
}

.plan-modal-backdrop .modal .form-grid > *:has(.smart-select.is-open) {
  z-index: 219;
}

.plan-modal-backdrop .modal .smart-select-panel {
  z-index: 221;
}

/* Users/Schedule - Profiel koppelen modal: dropdown must render above form/actions */
#assignProfileModal .modal {
  overflow: visible;
}

#assignProfileModal .modal .modal-body {
  overflow: visible;
}

#assignProfileModal .modal .smart-select-panel {
  z-index: 260;
}

.plan-modal-backdrop .modal .modal-actions {
  position: static;
  background: #fff;
  padding-bottom: 12px;
  margin-bottom: 0;
  justify-content: flex-end;
}

.plan-modal-backdrop .modal > .modal-actions {
  padding-left: 18px;
  padding-right: 18px;
  margin-top: 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.form-actions {
  margin-top: 12px;
}

.checkbox-grid-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 8px;
}

.checkbox-grid-days label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-family: "Segoe UI", "Calibri", "Tahoma", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
}

a.btn-primary:visited {
  color: #fff;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: #fff;
  text-decoration: none;
}

.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active {
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: none;
  background: #eef2f7;
  color: #2b3a4b;
  text-decoration: none;
  font-family: "Segoe UI", "Calibri", "Tahoma", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  cursor: pointer;
}

a.btn-secondary:visited {
  color: #2b3a4b;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #dce6f3;
  color: #2b3a4b;
  text-decoration: none;
}

.btn-secondary:focus,
.btn-secondary:focus-visible,
.btn-secondary:active {
  color: #2b3a4b;
  text-decoration: none;
}

.helper {
  font-size: 13px;
  color: var(--muted);
}

.project-managers-helper {
  margin-top: 12px;
  margin-bottom: 8px;
}

.project-settings-fieldset {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

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

.search-input {
  width: 240px;
}

/* Shared smart select (must match UI Components baseline) */
.smart-select {
  position: relative;
  width: 100%;
}

.smart-select-trigger {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #1c2331;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 14px;
  text-align: left;
}

.smart-select-trigger:hover,
.smart-select-trigger:focus,
.smart-select-trigger:focus-visible,
.smart-select-trigger:active {
  border-color: var(--line);
  background: #fff;
  color: #1c2331;
  box-shadow: none;
  outline: none;
}

.smart-select-trigger-arrow {
  color: #6c7a90;
  font-size: 11px;
}

.smart-select-panel {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(16, 27, 40, 0.18);
  padding: 6px;
  display: none;
  max-height: 260px;
}

.smart-select.is-open .smart-select-panel {
  display: block;
}

.smart-select-search-wrap {
  padding: 2px;
}

.smart-select-search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
}

.smart-select-list {
  margin-top: 6px;
  max-height: 200px;
  overflow: auto;
  display: grid;
  gap: 2px;
}

.smart-select-option {
  width: 100%;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: #1c2331;
  padding: 7px 9px;
  text-align: left;
  font-size: 13px;
}

.smart-select-option:hover,
.smart-select-option:focus,
.smart-select-option:focus-visible,
.smart-select-option:active {
  background: #edf4ff;
  color: #0c355d;
  box-shadow: none;
  outline: none;
}

.smart-select-option.is-active {
  background: #edf4ff;
  color: #0c355d;
}

.smart-select-option.is-selected {
  font-weight: 600;
}

.smart-select-option.is-completed {
  color: #2f6f3b;
  background: #eef8f0;
}

.smart-select-option.is-overdue {
  color: #bb1e1e;
  background: #fee2e2;
}

.smart-select-option.is-overdue:hover,
.smart-select-option.is-overdue:focus,
.smart-select-option.is-overdue:focus-visible,
.smart-select-option.is-overdue:active {
  color: #bb1e1e;
  background: #fee2e2;
}

/* AddHours item dropdown: only completed/overdue get status color */
#addHoursItemRow .smart-select-option:not(.is-completed):not(.is-overdue),
#addHoursItemRow .smart-select-option:not(.is-completed):not(.is-overdue):hover,
#addHoursItemRow .smart-select-option:not(.is-completed):not(.is-overdue):focus,
#addHoursItemRow .smart-select-option:not(.is-completed):not(.is-overdue):focus-visible,
#addHoursItemRow .smart-select-option:not(.is-completed):not(.is-overdue):active {
  color: #1c2331;
  background: transparent;
}

#addHoursItemRow .smart-select-option.is-completed,
#addHoursItemRow .smart-select-option.is-overdue,
#addHoursItemRow .smart-select-option.is-completed:hover,
#addHoursItemRow .smart-select-option.is-overdue:hover,
#addHoursItemRow .smart-select-option.is-completed:focus,
#addHoursItemRow .smart-select-option.is-overdue:focus,
#addHoursItemRow .smart-select-option.is-completed:focus-visible,
#addHoursItemRow .smart-select-option.is-overdue:focus-visible,
#addHoursItemRow .smart-select-option.is-completed:active,
#addHoursItemRow .smart-select-option.is-overdue:active {
  border-radius: 0;
}

.smart-select-empty {
  padding: 8px 9px;
  font-size: 12px;
  color: #6c7a90;
}

.filter-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.search-left {
  width: 220px;
}

.filter-select {
  width: 110px;
}

.select-search {
  position: relative;
}

.select-hidden {
  display: none;
}

.select-list {
  position: absolute;
  top: 38px;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #d8e6f7;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  max-height: 220px;
  overflow: auto;
  display: none;
  z-index: 20;
}

.select-list.is-open {
  display: block;
}

.select-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #0c355d;
}

.select-item:hover {
  background: #eef5ff;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: #eef5ff;
  color: #1b4d7a;
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  align-items: start;
}

.wide-split {
  grid-template-columns: 2.5fr 1fr;
}

.inline-form .form-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

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

.schedule-top-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1100px) {
  .schedule-top-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
  }
}

@media (max-width: 720px) {
  .top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .top-search {
    width: 100%;
    max-width: 220px;
  }

  .split {
    grid-template-columns: 1fr;
  }
}
.table-actions-col {
  width: 90px;
  text-align: right;
}

.table-select-col {
  width: 34px;
  text-align: center;
}

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px 0;
}

.table-actions-inline {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

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

.table-actions-inline .inline-form {
  display: inline-flex;
  margin: 0;
}

.table-actions-col .inline-form {
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.table-actions-col.table-actions-col-start .inline-form {
  justify-content: flex-start;
}

.icon-button {
  border: 1px solid #c9d8ea;
  background: #f2f6fb;
  color: #1d2e46;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 6px;
  cursor: pointer;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor !important;
  stroke: currentColor !important;
  display: block;
}

.icon-button.danger {
  border-color: #e08f8f;
  background: #fff1f1;
  color: #b62525;
}

.icon-button-plain {
  border-color: transparent;
  background: transparent;
}

.icon-button-plain:hover,
.icon-button-plain:focus,
.icon-button-plain:focus-visible,
.icon-button-plain:active {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.icon-button.danger.icon-button-plain {
  border-color: transparent;
  background: transparent;
}

.inline-actions {
  display: inline-flex;
  align-items: center;
}

.project-products-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
  margin-top: 14px;
}

.project-products-actions .inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.project-products-kpi-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.project-members-table .project-members-actions-col {
  vertical-align: middle;
}

.project-members-table .project-members-actions {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.project-members-table .project-members-actions .icon-button {
  margin-left: 0;
}

.subtabs {
  display: inline-flex;
  gap: 8px;
  margin: 12px 0;
  background: #f3f7fd;
  border-radius: 999px;
  padding: 4px;
}

.subtab {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  color: #28527a;
  cursor: pointer;
}

.subtab.is-active {
  background: #0a63b4;
  color: white;
  font-weight: 600;
}

.subtab-panel {
  display: none;
}

.subtab-panel.is-active {
  display: block;
}

.prj-phase-range-subtabs {
  margin-top: 0;
  margin-bottom: 12px;
  display: flex;
  gap: 0;
  width: 100%;
  background: transparent;
  border: 1px solid #d6e2f0;
  border-radius: 0;
  overflow: hidden;
  padding: 0;
}

.prj-phase-range-subtabs .subtab {
  flex: 1 1 auto;
  border-radius: 0;
  padding: 10px 14px;
  text-align: left;
  background: #f3f7fd;
  color: #28527a;
  border-right: 1px solid #d6e2f0;
  border-radius: 0 !important;
}

.prj-phase-range-subtabs .subtab:last-child {
  border-right: 0;
}

.prj-phase-range-subtabs .subtab.is-active {
  background: #0a63b4;
  color: #fff;
  font-weight: 600;
}

#prjPhaseRangePanelGeneral .form-grid + .modal-row {
  margin-top: 10px;
}

.prj-phase-booking-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #d6e2f0;
}

.prj-phase-booking-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.prj-phase-booking-row .helper {
  margin-top: 6px;
}

.prj-phase-members-list {
  max-height: 280px;
  overflow: auto;
}

.prj-phase-members-list-wrap {
  overflow: visible;
}

.prj-phase-members-table {
  margin-top: 0;
}

.prj-phase-members-table .helper {
  padding: 12px 10px;
}

.prj-phase-members-helper {
  margin-bottom: 10px;
}

.prj-phase-member-name {
  font-size: 14px;
  font-weight: 400;
  color: #111c2e;
}

.prj-phase-member-department {
  font-size: 14px;
  color: #111c2e;
}

.prj-phase-members-actions {
  width: 56px;
  text-align: right;
}

.prj-phase-members-table th.prj-phase-members-actions {
  text-align: right;
}
.is-hidden {
  display: none;
}

.is-visible {
  display: grid;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 14px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #d6e2f0;
  background: transparent;
  color: #0c355d;
  text-decoration: none;
  font-size: 13px;
}

.customer-subtabs {
  margin-bottom: 12px;
}

.page-btn:hover,
.page-btn:focus,
.page-btn:focus-visible,
.page-btn:active {
  background: transparent;
  text-decoration: none;
  box-shadow: none;
}

.page-btn-nav,
.page-btn-nav:hover,
.page-btn-nav:focus,
.page-btn-nav:focus-visible,
.page-btn-nav:active {
  background: transparent;
  border-color: transparent;
}

.page-btn.is-active {
  background: transparent;
  color: #0a63b4;
  border-color: #0a63b4;
  font-weight: 600;
}

.customers-pagination .page-btn {
  background: transparent;
  border-color: var(--line);
  color: #0c355d;
}

.customers-pagination .page-btn-nav,
.customers-pagination .page-btn-nav:hover,
.customers-pagination .page-btn-nav:focus,
.customers-pagination .page-btn-nav:focus-visible,
.customers-pagination .page-btn-nav:active {
  border: none;
  box-shadow: none;
  min-width: 20px;
  width: 20px;
  padding: 0;
}

.customers-pagination .page-btn.is-active {
  background: transparent;
  color: #0a63b4;
  border-color: transparent;
  font-weight: 600;
}

.customers-pagination .page-btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.customers-pagination {
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customers-pagination.has-tools {
  justify-content: space-between;
}

.customers-pagination:not(.has-tools) {
  justify-content: flex-end;
}

.customers-pagination .pagination-pages {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.customers-pagination .pagination-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.customers-pagination .pagination-tools label {
  font-size: 12px;
  color: var(--muted);
}

.customers-pagination .pagination-tools .filter-select {
  width: 90px;
}

.page-btn-ellipsis {
  border-color: transparent;
  pointer-events: none;
}

.section-toolbar .filter-row {
  flex: 1 1 520px;
  min-width: 320px;
}

.section-toolbar .filter-row input.search-input {
  flex: 1 1 520px;
  width: 100%;
  min-width: 320px;
  max-width: 520px;
}

.customers-search-input {
  width: 520px;
  max-width: 520px;
}

.customers-status-form {
  margin: 0;
}

.customers-status-select {
  width: 96px;
  min-width: 96px;
}

.draggable-row {
  cursor: default;
}

.draggable-row.is-dragging {
  opacity: 0.6;
}

.draggable-row.drag-over {
  outline: 2px dashed #a4c2f4;
  outline-offset: -4px;
}

.drag-handle {
  cursor: grab;
}

.draggable-row.is-dragging .drag-handle {
  cursor: grabbing;
}

.table-total td {
  font-weight: 600;
  background: #f7fbff;
}

.overview-financial-total {
  margin-top: 10px;
  text-align: left;
  font-size: 14px;
  color: #102a4d;
}

.timeline {
  display: grid;
  gap: 12px;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.dashboard-grid > .card {
  margin-bottom: 0;
}

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.dashboard-workload {
  display: grid;
  gap: 8px;
}

.dashboard-workload-row {
  display: grid;
  grid-template-columns: 48px 1fr 68px;
  align-items: center;
  gap: 10px;
}

.dashboard-workload-month {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.dashboard-workload-track {
  min-height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eef6;
  display: flex;
  align-items: stretch;
}

.dashboard-workload-segment {
  height: 16px;
  display: inline-block;
}

.dashboard-workload-empty {
  padding-left: 8px;
  font-size: 11px;
  line-height: 16px;
  color: var(--muted);
}

.dashboard-workload-total {
  text-align: right;
  font-size: 12px;
  color: var(--ink);
}

.dashboard-workload-legend {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.dashboard-workload-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.dashboard-workload-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

.dashboard-line-chart {
  width: 100%;
  min-height: 260px;
}

.dashboard-line-chart-wrap {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: stretch;
}

.dashboard-line-main {
  display: grid;
  grid-template-rows: 260px auto;
  gap: 8px;
}

.dashboard-line-y-axis {
  height: 260px;
  position: relative;
}

.dashboard-line-y-axis span {
  font-size: 11px;
  color: #5d6f87;
  line-height: 1;
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  text-align: right;
}

.dashboard-line-chart svg {
  width: 100%;
  height: 260px;
  display: block;
}

.dashboard-line-x-axis {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 20px;
}

.dashboard-line-x-axis span {
  font-size: 10px;
  color: #5d6f87;
  white-space: nowrap;
  bottom: 0;
  text-align: center;
}

.chart-axis {
  stroke: #8ea0b6;
  stroke-width: 1.1;
}

.chart-grid {
  stroke: #d9e3ef;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: #0a63b4;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: #0a63b4;
}

.chart-x-label {
  font-size: 11px;
  fill: #5d6f87;
}

.chart-y-label {
  font-size: 11px;
  fill: #5d6f87;
  dominant-baseline: middle;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.timeline-title {
  font-weight: 600;
  font-size: 14px;
  color: #0c355d;
}

.timeline-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.timeline-zoom {
  display: inline-flex;
  background: #eef5ff;
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.wb-plan-person-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.wb-plan-person-spacer {
  width: 0;
  height: 1px;
}

.wb-plan-rows[data-view="person"] .wb-plan-row.wb-plan-phase.is-person-phase .wb-plan-toggle-slot,
.wb-plan-rows[data-view="person"] .wb-plan-row.wb-plan-phase.is-person-phase .wb-plan-label {
  margin-left: 20px;
}

.zoom-btn {
  border: none;
  background: transparent;
  color: #0c355d;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.zoom-btn.is-active {
  background: #0a63b4;
  color: white;
}

.timeline-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.timeline-left {
  background: #f7fbff;
  border-right: 1px solid var(--line);
}

.timeline-left-header {
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.timeline-left-row {
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.timeline-left-row.is-allocation {
  color: #1d2e46;
}

.timeline-right {
  position: relative;
}

.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  padding-bottom: 8px;
}

.timeline-months {
  display: flex;
  position: sticky;
  top: 0;
  background: #f5f8fc;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}

.timeline-month {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  text-transform: capitalize;
}

.timeline-grid {
  position: relative;
  min-width: calc(var(--day-width) * var(--day-count));
  background-image: linear-gradient(to right, rgba(214, 226, 240, 0.6) 1px, transparent 1px);
  background-size: calc(var(--day-width) * 7) 100%;
}

.timeline-row {
  position: relative;
  height: 44px;
  border-bottom: 1px solid var(--line);
}

.timeline-block {
  position: absolute;
  top: 8px;
  height: 28px;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-block.is-phase {
  background: #d06464;
  color: white;
}

.timeline-block.is-allocation {
  background: #1c7ed6;
  color: white;
  height: 18px;
  top: 12px;
  font-size: 11px;
}

.gantt-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.gantt-title {
  font-weight: 600;
  font-size: 14px;
  color: #0c355d;
}

.gantt-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.gantt-canvas {
  --plan-row-height: 46px;
  --axis-height: 69px;
  --axis-day-top: 46px;
  --phase-bar-height: clamp(26px, calc(var(--plan-row-height) - 10px), 120px);
  --allocation-bar-height: clamp(14px, calc(var(--plan-row-height) - 14px), 110px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  height: calc(var(--rows, 6) * var(--plan-row-height) + var(--axis-height) + 18px);
  position: relative;
}

.gantt-canvas .vis-timeline {
  border: none;
  font-family: inherit;
}

.gantt-canvas .vis-labelset {
  display: none;
}

.gantt-canvas .vis-panel.vis-left {
  width: 0 !important;
}

.gantt-canvas .vis-panel.vis-center {
  left: 0 !important;
  top: var(--axis-height) !important;
  height: calc(var(--rows, 1) * var(--plan-row-height, 46px) + 18px) !important;
  z-index: 1;
  overflow: visible;
}


.gantt-canvas .vis-grid {
  z-index: 1;
}

.gantt-canvas .vis-background {
  z-index: 0;
}

.gantt-canvas .vis-foreground {
  z-index: 1;
}

.gantt-canvas .vis-itemset {
  z-index: 2;
  position: relative;
}

.gantt-canvas .vis-item {
  z-index: 3;
  position: absolute;
}

.gantt-canvas .vis-time-axis {
  z-index: 6;
}

.gantt-canvas .vis-content {
  top: 0;
}

.gantt-canvas .vis-panel.vis-center .vis-content,
.gantt-canvas .vis-itemset {
  overflow: hidden;
}

.gantt-canvas .vis-labelset .vis-label {
  background: #f7fbff;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: #1d2e46;
}

.gantt-canvas .vis-labelset .vis-inner {
  padding: 10px 12px;
}

.gantt-canvas .vis-time-axis .vis-grid.vis-minor {
  border-color: rgba(170, 182, 196, 0.6);
}

.gantt-canvas .vis-time-axis .vis-grid.vis-major {
  border-color: transparent;
  border-left-width: 0;
}

.gantt-canvas .vis-time-axis {
  position: relative;
  height: var(--axis-height);
  padding-top: 49px;
  overflow: visible;
}

.gantt-canvas .vis-time-axis.vis-foreground {
  height: var(--axis-height) !important;
}

.gantt-canvas .vis-current-time {
  z-index: 2;
  pointer-events: none;
}

.gantt-canvas .vis-panel.vis-background .vis-current-time {
  z-index: 3;
}

.gantt-canvas .vis-time-axis .vis-text.vis-major {
  display: none;
}

.gantt-canvas .vis-time-axis .vis-text.vis-minor {
  display: none;
}

.gantt-canvas .vis-item.item-phase {
    background: #5f6b7a;
    border-color: #4c5562;
    color: #ffffff;
  border-radius: 6px;
  height: var(--phase-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--phase-bar-height)) / 2) !important;
  font-size: 12px;
}

.gantt-canvas .vis-item.item-phase .vis-item-content {
  position: relative;
  padding: 0 !important;
  height: 100%;
  display: flex;
  align-items: center;
}

.gantt-canvas .vis-item.item-phase .phase-label {
  position: relative;
  z-index: 2;
  padding: 0 6px;
  line-height: 1;
  pointer-events: none;
}

.gantt-canvas .vis-item.item-phase .phase-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: #3f4854;
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

.gantt-canvas .vis-item.item-phase .phase-over {
  position: absolute;
  inset: 0 0 0 auto;
  height: 100%;
  background: rgb(199, 40, 40);
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

.gantt-canvas .vis-item.item-allocation {
  background: #1c7ed6;
  border-color: #0b5fa8;
  color: #ffffff;
  border-radius: 6px;
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
  font-size: 11px;
  overflow: visible;
}

.gantt-canvas .vis-item.item-allocation .vis-item-content {
  position: relative;
  padding: 0 !important;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

#projectTimeline .alloc-label {
  padding: 0 6px;
}

.gantt-canvas .vis-item.item-allocation .alloc-fill {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: #07497f;
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

.gantt-canvas .vis-item.item-allocation .alloc-over {
  position: absolute;
  inset: 0 0 0 auto;
  height: 100%;
  background: rgb(199, 40, 40);
  border-radius: 6px;
  z-index: 1;
  pointer-events: none;
}

.gantt-canvas .vis-group {
    box-sizing: border-box;
    border-bottom: 1px solid var(--line);
    height: var(--plan-row-height, 44px) !important;
  }

.gantt-canvas .vis-itemset {
  position: relative;
}

.gantt-canvas .vis-item {
  margin: 0;
}

.gantt-canvas .vis-item {
  overflow: visible;
}

.gantt-canvas .vis-item.item-allocation .vis-item-content {
  position: relative;
  z-index: 3;
}

.gantt-canvas .vis-item.item-allocation .vis-drag-center,
.gantt-canvas .vis-item.item-allocation .vis-drag-left,
.gantt-canvas .vis-item.item-allocation .vis-drag-right {
  z-index: 6;
}

.gantt-canvas .vis-item.vis-selected {
  z-index: 10;
}

.gantt-canvas .vis-item .vis-delete {
  z-index: 20;
}

.gantt-canvas .vis-item .vis-delete,
.gantt-canvas .vis-item .vis-delete * {
  pointer-events: auto;
}

.gantt-canvas .vis-itemset,
.gantt-canvas .vis-content {
  min-height: calc(var(--rows, 1) * var(--plan-row-height, 46px) + 18px);
}

.gantt-canvas .vis-item-content {
  padding: 0 6px !important;
  line-height: 1 !important;
}

.plan-layout {
  --plan-row-height: 46px;
  --axis-height: 69px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 12px;
}

.plan-left {
  --plan-row-height: 46px;
  --axis-height: 69px;
  --plan-metrics-width: 56px;
  --plan-actions-width: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #f7fbff;
}

.plan-right {
  position: relative;
}

.plan-scale {
  position: absolute;
  top: 0;
  right: -26px;
  bottom: 0;
  height: 100%;
  width: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(var(--axis-height) + 24px);
  padding-bottom: 12px;
  box-sizing: border-box;
  pointer-events: auto;
  z-index: 5;
}

.plan-scale-input {
  width: 220px;
  height: 18px;
  transform: rotate(-90deg);
  transform-origin: top center;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.plan-scale-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: #d7e2ef;
  border-radius: 999px;
}

.plan-scale-input::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #d7e2ef;
  border-radius: 999px;
}

.plan-scale-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0a63b4;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(12, 34, 64, 0.2);
  cursor: pointer;
}

.plan-scale-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0a63b4;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(12, 34, 64, 0.2);
  cursor: pointer;
}

.plan-header {
  height: calc(var(--axis-height) + 1px);
  padding: 0 12px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.plan-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.plan-left .plan-header-row {
  display: grid;
  grid-template-columns: 18px 1fr var(--plan-metrics-width) var(--plan-actions-width);
  justify-content: initial;
  column-gap: 10px;
  align-items: center;
}

.plan-header-metrics {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.plan-add-all {
  border: none;
  background: transparent;
  color: #0a63b4;
  border-radius: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  justify-self: start;
  align-self: center;
  margin-left: 0;
}

.plan-add-all:hover {
  background: transparent;
}

.plan-add-all svg {
  width: 16px;
  height: 16px;
  display: block;
  transform: translateX(-4px);
}

.plan-header-adds {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  width: var(--plan-actions-width);
  overflow: visible;
}

.plan-add-member {
  border: none;
  background: transparent;
  color: #f08c24;
  border-radius: 0;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.plan-add-member:hover {
  background: transparent;
}

.plan-add-member svg {
  width: 16px;
  height: 16px;
  display: block;
  transform: translateX(-3px);
}

.plan-rows {
  display: flex;
  flex-direction: column;
}

.plan-row {
  display: grid;
  grid-template-columns: 18px 1fr var(--plan-metrics-width) var(--plan-actions-width);
  align-items: center;
  column-gap: 10px;
  padding: 0 12px;
  height: var(--plan-row-height, 44px);
  box-sizing: border-box;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  font-size: 13px;
}

.plan-row.plan-phase {
  font-weight: 600;
  background: #eef5ff;
  cursor: grab;
}

.plan-row.plan-phase.is-dragging {
  opacity: 0.6;
}

.plan-row.plan-member {
  padding-left: 0;
  font-weight: 500;
}

.plan-row.plan-member .plan-label {
  padding-left: 0;
}

.plan-toggle-spacer {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.plan-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  width: var(--plan-actions-width);
  position: relative;
  overflow: visible;
}

.plan-actions .inline-form {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
}

.plan-metrics {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: right;
  white-space: nowrap;
  width: 100%;
  display: block;
  justify-self: end;
}

.plan-metrics-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  position: relative;
  padding-left: 14px;
  margin-right: 6px;
  padding-right: 0;
  width: 100%;
  box-sizing: border-box;
}

.plan-metrics.is-over,
.plan-header-metrics.is-over {
  color: #c0392b;
  font-weight: 600;
}

.overview-metrics.is-over,
.overview-total-metrics.is-over {
  color: #c0392b;
  font-weight: 600;
}

.plan-action-spacer {
  width: 22px;
  height: 22px;
}

.plan-actions .plan-remove {
  margin-left: 0;
}

.plan-phase.is-closed .plan-label {
  color: #8f2d2d;
}

.plan-closed-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: #bb1e1e;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  position: absolute;
  top: -18px;
  left: 0;
  pointer-events: none;
}

.plan-phase:not(.is-closed) .plan-closed-badge {
  display: none;
}

.plan-more {
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  width: 20px;
  height: 20px;
  color: #2c3a4b;
  cursor: pointer;
}

.plan-more svg {
  width: 16px;
  height: 16px;
  display: block;
}

.plan-menu {
  position: absolute;
  right: -6px;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #d8e6f7;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(12, 34, 64, 0.18);
  padding: 6px;
  display: none;
  z-index: 20;
}

.plan-menu.is-open {
  display: block;
}

.plan-menu-item {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #1d2e46;
  cursor: pointer;
}

.plan-menu-item:hover {
  background: #eef5ff;
  color: #0a63b4;
}

.plan-edit {
  background: transparent;
  border: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2c3a4b;
}

.plan-edit svg {
  width: 16px;
  height: 16px;
  display: block;
}

.plan-remove {
  margin-left: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #bb1e1e;
  padding: 0;
}

.plan-edit:hover,
.plan-remove:hover {
  color: #0a63b4;
}

.plan-remove:hover,
.plan-remove:focus {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.plan-remove svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: currentColor;
  display: block;
}

.gantt-canvas .vis-item.item-placeholder,
.gantt-canvas .vis-item.vis-background.item-placeholder,
.gantt-canvas .vis-item.item-placeholder .vis-item-content {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.gantt-canvas .vis-item.item-weekend {
  background: #eef1f4 !important;
  border: none !important;
}

.gantt-canvas .vis-item.item-holiday {
  background: transparent !important;
  border: none !important;
}

.gantt-canvas .weekend-overlay,
.gantt-canvas .holiday-overlay {
  position: absolute;
  top: var(--axis-height);
  left: 0;
  right: 0;
  height: calc(100% - var(--axis-height));
  pointer-events: none;
  z-index: 1;
}

.gantt-canvas .weekend-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  background: #eef1f4;
  border: none;
  box-sizing: border-box;
}

.gantt-canvas .holiday-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(190, 198, 210, 0.55),
    rgba(190, 198, 210, 0.55) 6px,
    rgba(255, 255, 255, 0) 6px,
    rgba(255, 255, 255, 0) 12px
  );
}

.gantt-canvas .timeline-month-row {
  position: absolute;
  top: 4px;
  left: 0;
  right: 0;
  height: 22px;
  display: block;
  pointer-events: none;
  z-index: 7;
}

.gantt-canvas .timeline-month-block {
  position: absolute;
  top: 0;
  height: 20px;
  background: transparent;
  color: #2c3a4b;
  border-radius: 0;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-canvas .timeline-week-row {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  height: 22px;
  display: block;
  pointer-events: none;
  z-index: 7;
}

.gantt-canvas .timeline-week-block {
  position: absolute;
  top: 0;
  height: 20px;
  background: #6f7784;
  color: #ffffff;
  border-radius: 0;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gantt-canvas .vis-time-axis {
  position: relative;
}

.gantt-canvas .timeline-day-row {
  position: absolute;
  top: var(--axis-day-top);
  left: 0;
  right: 0;
  height: calc(var(--axis-height) - var(--axis-day-top));
  display: block;
  pointer-events: none;
  z-index: 5;
  background: transparent;
  overflow: visible;
}

.gantt-canvas .vis-panel.vis-top,
.gantt-canvas .vis-panel.vis-top .vis-content {
  overflow: visible;
}

.gantt-canvas .timeline-day-block {
  position: absolute;
  top: 0;
  height: 100%;
  background: transparent;
  color: #2c3a4b;
  border-radius: 0;
  padding: 0;
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  line-height: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}

.gantt-canvas .timeline-day-block.is-weekend {
  background: #eef1f4;
}

.gantt-canvas .timeline-day-block.is-holiday {
  background: repeating-linear-gradient(
    45deg,
    rgba(190, 198, 210, 0.55),
    rgba(190, 198, 210, 0.55) 6px,
    rgba(255, 255, 255, 0) 6px,
    rgba(255, 255, 255, 0) 12px
  );
}

.gantt-canvas .timeline-month-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.gantt-canvas .timeline-month-overlay-grid {
  z-index: 0;
}

.gantt-canvas .timeline-month-overlay-axis {
  top: 0;
  left: 0;
  right: 0;
  height: var(--axis-height);
  z-index: 6;
}

.gantt-canvas .timeline-month-overlay-line {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(90, 100, 115, 0.85);
  z-index: 0;
}

.gantt-canvas .vis-panel.vis-top .vis-content,
.gantt-canvas .vis-panel.vis-center .vis-content,
.gantt-canvas .vis-panel.vis-background .vis-background,
.gantt-canvas .vis-panel.vis-top .vis-background {
  position: relative;
}

.plan-row.plan-member-form {
  padding-left: 28px;
  background: #ffffff;
}

.plan-inline-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.plan-input {
  height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}

.plan-user {
  min-width: 130px;
}

.plan-date {
  width: 110px;
}

.plan-hours {
  width: 70px;
}

.plan-save {
  padding: 6px 12px;
  font-size: 12px;
}

.plan-label {
  flex: 1;
  min-width: 0;
}

.plan-phase-label {
  cursor: text;
  position: relative;
}

.plan-label-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  width: 100%;
  max-width: 100%;
}

.plan-phase-label.is-editing {
  background: #fff6d4;
  border-radius: 4px;
  padding: 2px 4px;
  outline: 1px solid #f0c56d;
}

.plan-toggle {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  color: #0c355d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
  text-indent: -9999px;
  overflow: hidden;
  position: relative;
}

#splitPhaseMemberButton {
  display: none;
}

.plan-toggle:hover {
  background: #dbe9fb;
}

.plan-toggle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  display: block;
  transition: transform 0.15s ease-in-out;
}

.plan-toggle svg {
  display: none;
}

.plan-toggle.is-collapsed svg {
  transform: rotate(-90deg);
}

.plan-toggle.is-collapsed::before {
  transform: rotate(-45deg);
}

.plan-add {
  background: transparent;
  color: #0a63b4;
  border: none;
  border-radius: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.plan-add svg {
  width: 16px;
  height: 16px;
  display: block;
}

.plan-alert {
  position: absolute;
  left: -8px;
  top: -19px;
  border: none;
  background: transparent;
  color: #bb1e1e;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.plan-alert:hover {
  background: #fdeaea;
}

.plan-alert svg {
  width: 16px;
  height: 16px;
  display: block;
}

.plan-alert-count {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #bb1e1e;
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.plan-alert.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.plan-add:hover,
.plan-add:focus {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.plan-footer {
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.plan-member.is-hidden {
  display: none;
}

.phase-add {
  position: relative;
}

.phase-add summary {
  list-style: none;
  cursor: pointer;
}

.phase-add summary::-webkit-details-marker {
  display: none;
}

.phase-form {
  margin-top: 10px;
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  min-width: 260px;
}

.phase-actions {
  display: flex;
  justify-content: flex-end;
}

.field-error {
  color: #a83a3a;
  font-size: 12px;
}

.phase-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.phase-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  background: #f9fbff;
}

.phase-item summary {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  list-style: none;
  font-weight: 600;
}

.phase-item summary::-webkit-details-marker {
  display: none;
}

.phase-name {
  font-size: 14px;
  color: #0c355d;
}

.phase-range {
  font-size: 12px;
  color: var(--muted);
}

.phase-content {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

.phase-members-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.phase-member-form {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.pill-warning {
  background: #fff3cd;
  color: #7a4a00;
  border: 1px solid #f0d8a8;
}

.wb-row.is-unlinked {
  background: transparent;
}

.wb-linked {
  color: #1f7a3a;
  font-weight: 600;
}

.wb-unlinked {
  color: #b65c1a;
  font-weight: 600;
}

.wb-title {
  font-weight: 600;
}

.wb-popup-list {
  display: grid;
  gap: 10px;
}

.wb-popup-item {
  border-radius: 12px;
  border: 1px solid #e1e7f0;
  background: #f8fbff;
  padding: 12px 14px;
}

.wb-popup-item.is-overdue {
  background: #fdeaea;
  border-color: #f2b6b6;
  color: #a52a2a;
}

.wb-popup-item.is-complete {
  background: #e9f7ec;
  border-color: #b7e2c1;
  color: #1f7a3a;
}

.wb-popup-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.wb-popup-range {
  font-size: 12px;
  color: var(--muted);
}

.wb-popup-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.wb-popup-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.wb-popup-tag-unlinked {
  background: #ffe9cc;
  color: #8a4a00;
  border: 1px solid #f0c99a;
}

.wb-popup-tag-overdue {
  background: #fdeaea;
  color: #a52a2a;
  border: 1px solid #f2b6b6;
}

.flatpickr-calendar {
  z-index: 3000;
}

.wb-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #f7fbff;
  max-height: 180px;
  overflow: auto;
}

.wb-day {
  border: 1px solid #d6e2f0;
  background: #ffffff;
  color: #0c355d;
  border-radius: 6px;
  height: 28px;
  padding: 0;
  font-size: 11px;
  cursor: pointer;
}

.wb-day.is-disabled {
  background: #eef2f7;
  color: #9aa7b8;
  cursor: not-allowed;
}

.wb-day.is-selected {
  background: #0a63b4;
  color: #ffffff;
  border-color: #0a63b4;
}

.gantt-canvas .vis-item.item-allocation .alloc-more {
  display: none;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0;
  padding: 0;
  width: 14px;
  height: 18px;
  border-radius: 7px;
  cursor: pointer;
  z-index: 3;
  pointer-events: auto;
  place-content: center;
  gap: 2px;
}

.gantt-canvas .vis-item.item-allocation .alloc-more * {
  pointer-events: none;
}

.gantt-canvas .vis-item.item-allocation .alloc-more span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  display: block;
}

.gantt-canvas[data-range="year"] .alloc-more,
.gantt-canvas[data-range="month"] .alloc-more {
  display: none;
}

.gantt-canvas.range-wide .alloc-more {
  display: none !important;
}

.gantt-canvas .vis-item.item-allocation .vis-item-overflow {
  overflow: hidden;
}

#workBreakdownTimeline .vis-item.item-allocation .vis-item-overflow {
  overflow: visible;
}

.gantt-canvas .alloc-more-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.gantt-canvas .alloc-more-layer .alloc-more {
  display: grid;
  position: absolute;
  width: 14px;
  height: 18px;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 7px;
  cursor: pointer;
  place-content: center;
  gap: 2px;
  pointer-events: auto;
  padding: 0;
}

.gantt-canvas .alloc-more-layer .alloc-more span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffffff;
  display: block;
}

.gantt-canvas .vis-item.item-allocation .alloc-popup {
  position: absolute;
  right: 6px;
  top: calc(100% + 6px);
  min-width: 220px;
  max-width: 300px;
  max-height: 60vh;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #d8e6f7;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(12, 34, 64, 0.18);
  padding: 8px;
  z-index: 999;
  display: none;
  color: #1d2e46;
}

.gantt-canvas .alloc-popup-float {
  position: absolute;
  right: auto;
  top: auto;
  left: 0;
  z-index: 9999;
}

.gantt-canvas .vis-item.item-allocation .alloc-popup.is-open {
  display: block;
}

.alloc-popup-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.alloc-task {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid #eef2f7;
  background: #f8fbff;
  margin-bottom: 6px;
}

.alloc-task:last-child {
  margin-bottom: 0;
}

.alloc-task.is-done {
  opacity: 0.7;
}

.alloc-task-title {
  font-size: 12px;
  font-weight: 600;
}

.alloc-task-range {
  font-size: 11px;
  color: var(--muted);
}
#workBreakdownTimeline .vis-item.item-phase,
#workBreakdownTimeline .vis-item.item-allocation,
#workBreakdownTimeline .vis-item.item-phase .phase-fill,
#workBreakdownTimeline .vis-item.item-phase .phase-over,
#workBreakdownTimeline .vis-item.item-allocation .alloc-fill,
#workBreakdownTimeline .vis-item.item-allocation .alloc-over {
  border-radius: 4px;
}

#workBreakdownTimeline .vis-item.item-phase {
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
  font-size: 10px;
}

#workBreakdownTimeline .vis-item.item-allocation {
  position: absolute;
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
}

#workBreakdownTimeline .vis-item.wb-timeline-item {
  position: absolute;
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
}

#workBreakdownTimeline .vis-item.item-phase .vis-item-content {
  font-size: 10px;
  padding: 0 6px !important;
  display: flex;
  align-items: center;
  line-height: 1;
}

#workBreakdownTimeline .vis-item.item-allocation .vis-item-content {
  position: relative;
  height: 100%;
  overflow: hidden;
}

#workBreakdownTimeline .wb-weekend-item-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

#workBreakdownTimeline .wb-weekend-item-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(
      45deg,
      rgba(220, 38, 38, 0.85),
      rgba(220, 38, 38, 0.85) 6px,
      rgba(238, 241, 244, 0.95) 6px,
      rgba(238, 241, 244, 0.95) 12px
    );
  pointer-events: none;
}

#workBreakdownTimeline .vis-item.wb-start-overlay {
  background: rgba(245, 158, 11, 0.9);
  border: none;
  border-radius: 4px;
  pointer-events: none;
  opacity: 1;
  height: var(--allocation-bar-height) !important;
  top: calc((var(--plan-row-height, 46px) - var(--allocation-bar-height)) / 2) !important;
  z-index: 26;
}

#workBreakdownTimeline .vis-item.wb-start-overlay .vis-item-content {
  display: none;
}

.schedule-preview {
  display: grid;
  gap: 16px;
}

.schedule-preview-week {
  border: 1px solid #e5e9f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.schedule-preview-title {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

.schedule-preview-range {
  color: #6b7280;
  font-weight: 500;
}

.schedule-preview-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.schedule-preview-day {
  background: #f3f5f8;
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  color: #374151;
}

.schedule-preview-day.is-override {
  background: #dbeafe;
  color: #0f2f66;
  font-weight: 600;
}

.schedule-preview-day-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #6b7280;
}

.schedule-preview-day-value {
  margin-top: 2px;
  font-size: 12px;
}

.schedule-preview-overrides {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-preview-badge {
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

.schedule-preview-empty {
  margin-top: 8px;
  font-size: 11px;
  color: #6b7280;
}

.modal-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #1f2937;
  font-size: 13px;
}

.profile-actions {
  text-align: right;
}

body.planning-readonly-user:not(.planning-admin-user) .yrp-plan-metrics,
body.planning-readonly-user:not(.planning-admin-user) .afdp-plan-metrics,
body.planning-readonly-user:not(.planning-admin-user) .resp-plan-metrics,
body.planning-readonly-user:not(.planning-admin-user) .plan-metrics,
body.planning-readonly-user:not(.planning-admin-user) #yrpPlanHeaderTotals,
body.planning-readonly-user:not(.planning-admin-user) #afdpPlanHeaderTotals,
body.planning-readonly-user:not(.planning-admin-user) #respPlanHeaderTotals {
  display: none !important;
}

body.planning-readonly-user:not(.planning-admin-user) #yrpMetricModePercent,
body.planning-readonly-user:not(.planning-admin-user) #yrpMetricModeRemaining,
body.planning-readonly-user:not(.planning-admin-user) #yrpMetricModeOff,
body.planning-readonly-user:not(.planning-admin-user) #afdpMetricModePercent,
body.planning-readonly-user:not(.planning-admin-user) #afdpMetricModeRemaining,
body.planning-readonly-user:not(.planning-admin-user) #afdpMetricModeOff,
body.planning-readonly-user:not(.planning-admin-user) #respMetricModePercent,
body.planning-readonly-user:not(.planning-admin-user) #respMetricModeRemaining,
body.planning-readonly-user:not(.planning-admin-user) #respMetricModeOff,
body.planning-readonly-user:not(.planning-admin-user) #yrpPlanHeaderMenu .yrp-plan-header-menu-label,
body.planning-readonly-user:not(.planning-admin-user) #afdpPlanHeaderMenu .afdp-plan-header-menu-label,
body.planning-readonly-user:not(.planning-admin-user) #respPlanHeaderMenu .resp-plan-header-menu-label {
  display: none !important;
}

body.planning-readonly-user #openyrpPhasePickerTimeline,
body.planning-readonly-user #openyrpDepartmentPicker,
body.planning-readonly-user #openyrpMemberPicker,
body.planning-readonly-user #openyrpMilestoneModal,
body.planning-readonly-user #openafdpPhasePickerTimeline,
body.planning-readonly-user #openafdpMilestoneModal,
body.planning-readonly-user #openrespPhasePickerTimeline,
body.planning-readonly-user #openrespMilestoneModal,
body.planning-readonly-user .yrp-plan-more,
body.planning-readonly-user .afdp-plan-more,
body.planning-readonly-user .resp-plan-more,
body.planning-readonly-user .yrp-plan-add-item,
body.planning-readonly-user .afdp-plan-add-item,
body.planning-readonly-user .resp-plan-add-item,
body.planning-readonly-user .yrp-phase-add-row,
body.planning-readonly-user .afdp-phase-add-row,
body.planning-readonly-user .resp-phase-add-row,
body.planning-readonly-user #yrpBulkBarTimeline,
body.planning-readonly-user #afdpBulkBarTimeline,
body.planning-readonly-user #respBulkBarTimeline,
body.planning-readonly-user .plan-modal-backdrop .btn-primary {
  display: none !important;
}

.issue-board-title {
  min-width: 0;
}

#projectIssuesSection {
  gap: 18px;
}

#projectIssuesSection.is-visible {
  display: grid;
}

#projectIssuesSection.is-hidden {
  display: none;
}

#projectIssuesSection .card {
  margin-bottom: 0;
}

.issue-section-summary {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  outline: none;
  font: inherit;
  color: inherit;
  text-align: left;
}

.issue-section-label {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #0e223d;
}

.issue-section-chevron {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0c355d;
  flex: 0 0 auto;
}

.issue-section-chevron::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease-in-out;
  display: block;
}

.issue-section-summary.is-collapsed .issue-section-chevron::before {
  transform: rotate(-45deg);
}

.issue-section-summary:hover,
.issue-section-summary:focus,
.issue-section-summary:focus-visible,
.issue-section-summary:active {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.project-pinned-notes-card {
  border-color: #d8e6f7;
  background:
    linear-gradient(180deg, #f9fbff 0%, #ffffff 42%),
    #ffffff;
  box-shadow: 0 14px 28px rgba(12, 53, 93, 0.08);
}

.project-pinned-notes-table {
  table-layout: fixed;
}

.project-pinned-notes-table th {
  background: #edf4ff;
}

.project-pinned-notes-table th:nth-child(2),
.project-pinned-notes-table td:nth-child(2) {
  width: 180px;
  white-space: nowrap;
}

.project-pinned-notes-table td {
  vertical-align: middle;
}

.project-pinned-notes-table tbody tr {
  background: rgba(255, 255, 255, 0.7);
}

.project-pinned-notes-table tbody td:first-child {
  font-weight: 600;
  color: #c96a12;
  line-height: 1.45;
}

.project-pinned-notes-table tbody td:last-child {
  color: #4e6888;
  font-weight: 500;
}

.project-issues-table,
.project-notes-table {
  table-layout: fixed;
}

.project-issues-table td,
.project-notes-table td {
  vertical-align: top;
}

.project-notes-table td {
  vertical-align: middle;
}

.project-issues-table th:nth-child(1) { width: 60px; }
.project-issues-table th:nth-child(2) { width: 24%; }
.project-issues-table th:nth-child(3) { width: 120px; }
.project-issues-table th:nth-child(4) { width: 90px; }
.project-issues-table th:nth-child(5) { width: 160px; }
.project-issues-table th:nth-child(6) { width: 140px; }
.project-issues-table th:nth-child(7) { width: 70px; text-align: center; }
.project-issues-table th:nth-child(8) { width: 22%; }
.project-notes-table th:nth-child(1) { width: auto; }
.project-notes-table th:nth-child(2),
.project-notes-table td:nth-child(2) { width: 86px; text-align: center; }
.project-notes-table th:nth-child(3) { width: 160px; }
.project-notes-table td:nth-child(2),
.project-notes-table td:nth-child(3) { vertical-align: middle; }
.project-notes-table td:nth-child(4) { vertical-align: middle; }

.project-issues-table td:nth-child(7) {
  text-align: center;
}

.project-issues-table th[data-sortable] .table-sort-trigger {
  padding: 10px 12px;
}

.project-notes-table th[data-sortable] .table-sort-trigger {
  padding: 10px;
}

.project-issues-table td:nth-child(1),
.project-issues-table td:nth-child(2),
.project-issues-table td:nth-child(3),
.project-issues-table td:nth-child(4),
.project-issues-table td:nth-child(5),
.project-issues-table td:nth-child(6),
.project-issues-table td:nth-child(7),
.project-issues-table td:nth-child(8) {
  vertical-align: middle;
}

.project-issues-table .issue-inline-edit:not(.issue-inline-checkbox),
.project-notes-table .project-note-inline-edit,
.issue-type-inline-edit,
.issue-note-create-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0;
  min-height: 24px;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  box-shadow: none !important;
  outline: none;
}

.project-issues-table input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.project-issues-table input[type="number"]::-webkit-outer-spin-button,
.project-issues-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.project-issues-table input.issue-inline-edit:not(.issue-inline-checkbox) {
  position: relative;
  top: -1px;
}

.project-issues-table .smart-select {
  position: relative;
  top: -1px;
}

.project-issues-table .issue-inline-edit:not(.issue-inline-checkbox):focus,
.project-issues-table .issue-inline-edit:not(.issue-inline-checkbox):hover,
.project-issues-table .issue-inline-edit:not(.issue-inline-checkbox):active,
.project-notes-table .project-note-inline-edit:focus,
.project-notes-table .project-note-inline-edit:hover,
.project-notes-table .project-note-inline-edit:active,
.issue-type-inline-edit:focus,
.issue-type-inline-edit:hover,
.issue-type-inline-edit:active,
.issue-note-create-form textarea:focus,
.issue-note-create-form textarea:hover,
.issue-note-create-form textarea:active {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  outline: none;
}

.project-issues-table .smart-select-trigger {
  min-height: 24px;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0;
  background: transparent !important;
  padding: 0;
  box-shadow: none !important;
}

.project-issues-table .smart-select-trigger:hover,
.project-issues-table .smart-select-trigger:focus,
.project-issues-table .smart-select-trigger:focus-visible,
.project-issues-table .smart-select-trigger:active {
  border: 0 !important;
  border-bottom: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
}

.project-issues-table .issue-inline-edit[disabled],
.project-notes-table .project-note-inline-edit[disabled],
.issue-type-inline-edit[disabled] {
  color: inherit;
  opacity: 1;
}

.project-issues-table .issue-inline-checkbox,
.project-notes-table .issue-inline-checkbox {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin: 0;
  vertical-align: middle;
}

.project-issues-table .issue-description-input,
.project-issues-table .issue-remarks-input,
.project-notes-table .project-note-inline-edit {
  min-height: 20px;
  resize: none;
  overflow: hidden !important;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.project-issues-table .issue-row-priority-1 td:nth-child(2),
.project-issues-table .issue-row-priority-1 .issue-description-input {
  color: #bb1e1e !important;
}

.project-issues-table .issue-row-priority-2 td:nth-child(2),
.project-issues-table .issue-row-priority-2 .issue-description-input {
  color: #c96a12 !important;
}

.issue-row-done td {
  color: #6c7a90;
}

.issue-row-done .issue-inline-edit:not(.issue-inline-checkbox),
.issue-row-done .smart-select-trigger {
  color: #6c7a90 !important;
  opacity: 1;
}

.issue-type-create-form {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.issue-type-create-form input[type="text"] {
  width: 280px;
  max-width: 100%;
}

.issue-types-table .issue-type-inline-input {
  min-height: 22px;
}

.issue-note-create-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.issue-note-create-form textarea {
  min-height: 42px;
}

.issue-note-create-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.invoice-header-inline-textarea {
    min-height: 112px;
    resize: vertical;
}

.offer-notes-text {
    white-space: pre-wrap;
    line-height: 1.5;
    font-weight: 700;
    color: #c96a00;
}

.offer-internal-notes-label,
.offer-internal-notes-title,
.offer-internal-notes-helper {
    color: #c96a00;
}

.offer-internal-notes-label,
.offer-internal-notes-title {
    font-weight: 700;
}

.offer-notes-card .offer-notes-content {
    border-left: 4px solid rgba(201, 106, 0, 0.28);
    padding-left: 12px;
}

.filter-inline-label {
    display: inline-grid;
    gap: 6px;
    align-items: center;
}

.filter-inline-label span {
    font-size: 13px;
    font-weight: 600;
    color: #35507a;
}

.purchase-invoice-filter-row {
    align-items: center;
}

.purchase-invoice-filter-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.purchase-invoice-filter-date span {
    font-size: 13px;
    font-weight: 600;
    color: #35507a;
}

.purchase-invoice-filter-date input[type="date"] {
    width: 132px;
}

.purchase-invoice-status-select {
    width: 176px;
    min-width: 176px;
}

.table-row-secondary td {
    background: #f8fbff;
}

