:root {
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
  background-color: #f1f5f9;
  line-height: 1.5;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #f1f5f9;
}

#root {
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.app-header__nav {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.app-header__nav-link {
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.app-header__nav-link:hover {
  color: #0f172a;
}

.app-header__nav-link--active {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #dc2626;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
}

.brand-logo img {
  max-height: 100%;
  width: auto;
  display: block;
}

.brand-title {
  letter-spacing: 0.01em;
}

.app-main {
  flex: 1;
  padding: 2rem;
  padding-bottom: 5.5rem;
  display: flex;
  justify-content: center;
  background: #ffffff;
}

.project-board {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-board--fill {
  max-height: calc(100dvh - 8rem);
  overflow: hidden;
}

.board-controls {
  background: #ffffff;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.board-controls__sold-active-toggle {
  display: inline-flex;
  align-items: center;
}

.board-controls__toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.board-controls__toggle-label:hover {
  background: #f8fafc;
}

/* Hide the default checkbox */
.board-controls__toggle-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Custom toggle switch track */
.board-controls__toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

/* Toggle switch knob */
.board-controls__toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

/* Checked state */
.board-controls__toggle-label input:checked+.board-controls__toggle-switch {
  background: #dc2626;
}

.board-controls__toggle-label input:checked+.board-controls__toggle-switch::after {
  transform: translateX(16px);
}

/* Focus state for accessibility */
.board-controls__toggle-label input:focus-visible+.board-controls__toggle-switch {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

.board-controls__search {
  display: flex;
  align-items: center;
  width: 100%;
  flex: 1;
}

.board-controls__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.board-controls__add-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #dc2626;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.board-controls__add-link:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.down-caret,
.up-caret {
  display: inline-block;
  margin-left: 1em;
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
}

.down-caret {
  transform: rotate(-90deg);
}

.up-caret {
  transform: rotate(90deg);
}

.filter-chips__container {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 0.50rem;
}

.filter-chips__label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #334155;
  transition: all 0.2s ease;
}

.chip:hover {
  border-color: #cbd5f5;
  background: #ffffff;
}

.chip--selected {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.4);
  color: #b91c1c;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  font: inherit;
  border-radius: 0.75rem;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-button.small-button,
.primary-button.small-button,
.ghost-button.small-button,
.danger-button.small-button {
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  font-size: small;
  font-weight: normal;
}

.primary-button {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}

.primary-button:hover {
  background: #6d28d9;
  border-color: #6d28d9;
}

.primary-button:disabled {
  background: #c4b5fd;
  border-color: #c4b5fd;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.6;
}

.secondary-button {
  background: #ffffff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.secondary-button:hover {
  background: #eef2ff;
}

.ghost-button {
  background: transparent;
  border-color: transparent;
  color: #475569;
}

.danger-button {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

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

.danger-button:disabled {
  background: #fca5a5;
  border-color: #fca5a5;
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.6;
}

.ghost-button:hover {
  color: #111827;
}

.office-filter {
  position: relative;
  width: 225px;
}

.office-filter__button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #fca5a5;
  border-radius: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: #fbf6f6;
  color: #dc2626;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.office-filter__button:hover {
  color: #b91c1c;
}

.office-filter__dropdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.office-filter__dropdown {
  position: absolute;
  width: 100%;
  padding-top: 8px;
  padding-bottom: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  overflow-y: auto;
  z-index: 1000;
}

.office-filter__option {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.25rem;
  gap: 0.5rem;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
}

.office-filter__clear-button {
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  width: 100%;
}

.office-filter__clear-button:disabled {
  color: #94a3b8;
  cursor: pointer;
}

.office-filter__option:hover,
.office-filter__clear-button:hover {
  background: #fbf6f6;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #475569;
}

.checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #dc2626;
}

.search-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.95rem;
  background: #f8fafc;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #94a3b8;
  background: #ffffff;
}

.board-loading {
  padding: 2rem;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
}

.board-content {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.board-content--fill {
  flex: 1;
  min-height: 0;
}

.project-section {
  background: #ffffff;
  padding: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-section__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
}

.project-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-group__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.project-section__empty {
  font-size: 0.9rem;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1rem;
}

.project-section__projects {
  display: flex;
  flex-direction: column;
}

.project-card {
  border: 1px solid #e2e8f0;
  margin-top: -1px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.08);
}

.project-card__summary {
  display: flex;
  gap: 0;
  padding: 0.75rem 1rem;
  align-items: stretch;
}

.project-card__fixed {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
}

.project-card__toggle {
  width: 24px;
  height: 24px;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.project-card__toggle::before,
.project-card__toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 55%;
  height: 2px;
  background: #475569;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.project-card__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.project-card__toggle--open::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.project-card__info {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.project-card__name-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.project-card__name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

/* Inline editing styles */
.project-card__editable {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  padding: 0.375rem 0.625rem;
  margin: -0.375rem -0.625rem;
  min-height: 1.75rem;
  display: inline-flex;
  align-items: center;
}

.assignment-row__title .project-card__editable {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  /* ← Allow name to shrink */
}

.project-card__editable:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.project-card__inline-input,
.project-card__inline-select {
  font-size: inherit;
  font-family: inherit;
  color: inherit;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: all 0.2s ease;
  min-height: 1.75rem;
}

/* Deal stage / role dropdown: normal = light gray bg, hover = white, focus = white + light blue border */
.project-card__inline-select {
  background: #F0F3F7;
  color: #1A202C;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.project-card__inline-select:hover {
  background: #ffffff;
}

.project-card__inline-input:focus,
.project-card__inline-select:focus {
  outline: none;
}

.project-card__inline-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.project-card__inline-select:focus {
  background: #ffffff;
  border-color: #80b4ff;
  box-shadow: 0 0 0 2px rgba(128, 180, 255, 0.2);
}

.project-card__inline-input--small,
.project-card__inline-select--small {
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  min-height: 1.75rem;
}

.project-card__inline-input {
  min-width: 150px;
}

.project-card__inline-select {
  min-width: 150px;
}

/* Role in assignment row: clickable value (same look as deal stage) until user clicks, then dropdown */
.assignment-row__role-value {
  font-size: 0.75rem;
  color: #64748b;
  background: #ffffff03;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  min-height: 1.5rem;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.assignment-row__role-value:hover {
  background: #F0F3F7;
}

/* Role dropdown in assignment row: match row scale when open */
.assignment-row .project-card__inline-select,
.assignment-row__subtitle .project-card__inline-select {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  min-height: 1.5rem;
  min-width: 6.5rem;
}

.project-card__meta {
  flex-grow: 1;
  font-size: 0.95rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  line-height: 1.5;
  align-items: center;
}

.project-card__meta-label {
  margin-right: 0.25rem;
}

.divider {
  color: #cbd5f5;
  margin: 0 0.25rem;
}

.timeline-grid {
  display: grid;
  gap: 0.15rem;
  align-items: center;
  min-width: max-content;
  width: max-content;
  /* border-right: 1px solid #000;
  border-bottom: 1px solid #000; */
}

.timeline-cell {
  min-height: 32px;
  border-radius: 0.2rem;
  background: #ffffff;
  border: none;
  /* border-top: 1px solid #000;
  border-left: 1px solid #000; */
  border: 1px solid #a5a7ab;
  display: flex;
  align-items: flex-end;
  padding: 0.25rem 0.4rem;
  position: relative;
  overflow: hidden;
}

.timeline-cell--empty {
  background: #ffffff;
}

.timeline-cell__fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.6), rgba(248, 113, 113, 0.45));
  z-index: 0;
}

.timeline-cell__fill--unconfirmed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent, transparent 3px,
    rgba(255, 255, 255, 0.35) 3px, rgba(255, 255, 255, 0.35) 6px
  );
  pointer-events: none;
}

.timeline-cell__label {
  font-size: 0.7rem;
  color: #000;
  position: relative;
  z-index: 1;
}

.timeline-cell--active .timeline-cell__label {
  color: #000;
}

.project-assignments {
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0rem;
  background: rgba(248, 250, 252, 0.7);
}

.project-assignments__table-scroll {
  display: flex;
  width: 100%;
}

.project-assignments__body {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.project-assignments__meta-column {
  flex-shrink: 0;
  width: 300px;
  padding: 0.5rem 0.75rem;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  box-sizing: border-box;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  left: 0;
  z-index: 12;
}

.project-meta-cell__row-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.5rem;
}

.project-meta-cell__row-group .project-meta-cell__row {
  min-width: 0;
  overflow: hidden;
}

.project-meta-cell__toggle-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.project-meta-cell__toggle-row .project-card__toggle {
  flex-shrink: 0;
}

.project-meta-cell__project-name {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.project-meta-cell__project-name-input {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.project-assignments__table {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  user-select: none;
}

/* Hide scrollbar but keep scroll functionality */
.project-assignments__table {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.project-assignments__table::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.project-meta-cell__row {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.project-meta-cell__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  line-height: 1.2;
}

.project-meta-cell__value {
  font-size: 0.8rem;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.project-meta-cell__input {
  font-size: 0.8rem;
  font-family: inherit;
  padding: 0.25rem 0.375rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background: #fff;
  color: #0f172a;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Deal stage dropdown in summary column: normal / hover / focus to match screens */
select.project-meta-cell__input {
  background: #F0F3F7;
  color: #1A202C;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

select.project-meta-cell__input:hover {
  background: #ffffff;
}

select.project-meta-cell__input:focus {
  outline: none;
  background: #ffffff;
  border-color: #80b4ff;
  box-shadow: 0 0 0 2px rgba(128, 180, 255, 0.2);
}

.project-meta-cell__input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.project-assignments__empty {
  width: 100%;
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.assignment-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  margin-top: -1px;
  min-width: 100%;
  width: max-content;
}

.assignment-row__fixed {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 300px;
  padding: 0 1rem;
  border-right: 1px solid rgba(226, 232, 240, 0.6);
  position: sticky;
  left: 0;
  z-index: 10;
  background: #ffffff;
}

.project-assignments .assignment-row__fixed {
  z-index: 20;
}

.assignment-row__fixed-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.assignment-row--warning {
  border-color: rgba(251, 191, 36, 0.4);
  border-top: 1px solid rgba(251, 191, 36, 0.4);
  border-bottom-color: rgba(251, 191, 36, 0.4);
  background: #fef3c7;
  z-index: 1;
}

.assignment-row--warning .assignment-row__fixed {
  border-right-color: rgba(251, 191, 36, 0.4);
  background-color: #fef3c7;
}

.assignment-row__role {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  overflow: hidden;
}

.assignment-row__role>div {
  min-width: 0;
  flex: 1;
}

.assignment-row__details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
  min-width: 0;
}

.assignment-row__detail-rows {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.assignment-row__title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  /* word-break: break-word; */
  /* overflow-wrap: break-word; */
  line-height: 1.3;
  flex-wrap: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.assignment-row__confirm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.assignment-row__confirm:hover {
  color: #475569;
}

.assignment-row__subtitle {
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1.3;
}

.assignment-row__subtitle .divider {
  color: #94a3b8;
}

.assignment-row__timeline {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: max-content;
}

.assignment-row__timeline-scroll {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.assignment-row>.assignment-row__timeline-scroll {
  padding: 0.5rem 0 0 0;
}

.assignment-row--main {
  min-height: 60px;
}

.assignment-row__action {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
}

.assignment-block {
  border-radius: 0.5rem;
  min-height: 28px;
}

.assignment-block--active {
  background: #ef4444;
}

.assignment-block--planned {
  background: #7c3aed;
}

.error-banner {
  background: rgba(254, 202, 202, 0.4);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #991b1b;
  padding: 1rem 1.5rem;
  border-radius: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.error-banner__message {
  font-size: 0.85rem;
  color: #b91c1c;
}

/* Modal Styles */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.15s ease-out;
}

.modal-content {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeInScale 0.15s ease-out;
}

.modal-content--small {
  width: 50vw;
}

.modal-content--medium {
  width: 75vw;
}

.modal-content--large {
  width: 100%;
}

.modal-content--fullscreen {
  width: 100%;
}

.modal-body {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}

.modal-header-content {
  flex: 1;
  display: flex;
  justify-content: center;
}

.modal-header-content .office-filter__dropdown {
  z-index: 1000;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: transparent;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

.modal-form-divider {
  border-bottom: 1px solid #e2e8f0;
}

/* For Firefox */
.hide-scrollbar {
  scrollbar-width: none;
  overflow: hidden;
}

/* For Chrome, Safari, Edge, Opera, and other WebKit browsers */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #475569;
}

.required {
  color: #dc2626;
}

.form-input,
.form-select,
.form-textarea {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #7c3aed;
  background: #faf5ff;
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.modal-actions--space-between {
  justify-content: space-between;
}

@media (max-width: 480px) {
  .project-card__summary {
    grid-template-columns: auto;
    grid-template-rows: repeat(3, auto);
  }

  .assignment-row {
    grid-template-columns: 1fr;
  }

  .assignment-row__action {
    justify-self: start;
  }

  .modal-header {
    padding: 1.25rem;
  }

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

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions button {
    width: 100%;
  }
}



.assignment-editor {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.assignment-editor__error {
  background: rgba(254, 202, 202, 0.4);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.assignment-editor__warning {
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #92400e;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.assignment-editor__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.project-editor__fields {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.assignment-editor__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.assignment-editor__label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
}

.assignment-editor__input,
.assignment-editor__select {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.assignment-editor__input:focus,
.assignment-editor__select:focus {
  outline: none;
  border-color: #7c3aed;
}

.assignment-editor__input:disabled,
.assignment-editor__select:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.assignment-editor__employee-select {
  position: relative;
}

.assignment-editor__selected-employees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.assignment-editor__employee-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.assignment-editor__employee-tag .assignment-editor__remove-employee {
  width: 18px;
  height: 18px;
  font-size: 1rem;
}

.assignment-editor__remove-employee {
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: all 0.2s ease;
}

.assignment-editor__remove-employee:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.assignment-editor__employee-search-container {
  position: relative;
}

.assignment-editor__search-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.assignment-editor__search-input:focus {
  outline: none;
  border-color: #7c3aed;
}

.assignment-editor__employee-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.assignment-editor__dropdown-empty {
  padding: 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
}

.assignment-editor__dropdown-item {
  width: 100%;
  padding: 0.75rem;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.9rem;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.2s ease;
}

.assignment-editor__dropdown-item:hover {
  background: #f1f5f9;
}

.assignment-editor__dropdown-item:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

.assignment-editor__dropdown-item:last-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

.assignment-editor__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 0.5rem;
}

.assignment-editor__delete {
  color: #dc2626;
}

.assignment-editor__delete:hover {
  color: #991b1b;
  background: rgba(220, 38, 38, 0.1);
}

.assignment-editor__hint {
  color: #475569;
  font-size: 0.7rem;
}

/* Makers Board Styles */
.makers-table {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.makers-table__header {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 10;
}

.makers-table__fixed-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.50rem;
  width: 380px;
  padding: 0.5rem 0.75rem;
  border-right: 1px solid #e2e8f0;
}

.makers-table__sort-button {
  border: none;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.makers-table__sort-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.makers-table__sort-indicator {
  font-size: 0.75rem;
  color: inherit;
}

.makers-table__timeline-header {
  flex: 1;
  min-width: 0;
  display: flex;
  padding: 0.5rem 0.75rem;
  position: relative;
}


.makers-table__timeline-header .search-input {
  flex: 0 1 auto;
  min-width: 300px;
  max-width: 500px;
}

.makers-table__timeline-header .employee-search {
  flex: 1;
  max-width: 500px;
}

.makers-table__body-scroll {
  overflow: auto;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.makers-table__body {
  display: flex;
  flex-direction: column;
}

.makers-table__empty {
  padding: 3rem 2rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
  width: 100%;
}

.employee-row__fixed {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0rem 1.25rem;
}

.employee-row-container__fixed .employee-row__fixed {
  width: 100%;
}

.employee-row__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.employee-row__details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
  min-width: 0;
}

.employee-row__detail-rows {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.employee-row__name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.employee-row__project-row {
  font-size: 0.95rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.employee-row__meta {
  position: relative;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  line-height: 1.3;
}

.employee-row__toggle {
  width: 24px;
  height: 24px;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.employee-row__toggle:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.employee-row__toggle::before,
.employee-row__toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 55%;
  height: 2px;
  background: #475569;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.employee-row__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.employee-row__toggle--open::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.employee-row--main {
  min-height: 60px;
}

.employee-row--sub {
  min-height: 35px;
}

.employee-row-container__fixed .employee-row--sub {
  padding-left: 3.5rem;
  align-items: center;
}

.employee-row-container__timeline .employee-row--sub:last-child {
  border-bottom: none;
  margin-bottom: 16px;
}

.employee-row__indent {
  color: #94a3b8;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.employee-row-container {
  display: flex;
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.2s ease;
  min-width: fit-content;
  background: #ffffff;
}

.employee-row-container:hover {
  background: #f8fafc;
}

.employee-row-container--clickable {
  cursor: pointer;
}

.employee-row-container--clickable:hover {
  background: #f1f5f9;
}

.employee-row-container--selected {
  background: #eef2ff;
}

.employee-row-container--selected:hover {
  background: #e0e7ff;
}

.employee-row-container:last-child {
  border-bottom: none;
}

.employee-row-container__fixed {
  width: 380px;
  flex-shrink: 0;
  border-right: 1px solid #e2e8f0;
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 10;
}

.employee-row-container:hover .employee-row-container__fixed {
  background: #f8fafc;
}

.employee-row-container--selected .employee-row-container__fixed {
  background: #eef2ff;
  border-left: 3px solid #4338ca;
}

.employee-row-container--selected:hover .employee-row-container__fixed {
  background: #e0e7ff;
}

/* Over-allocated employee row - light red background */
.employee-row-container--over-allocated {
  background-color: #fef2f2;
}

.employee-row-container--over-allocated .employee-row-container__fixed {
  background-color: #fef2f2;
}

.employee-row-container--over-allocated:hover {
  background-color: #fee2e2;
}

.employee-row-container--over-allocated:hover .employee-row-container__fixed {
  background-color: #fee2e2;
}

.employee-row-container__timeline {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: max-content;
}

.employee-row__timeline-content {
  flex: 1;
  padding: 0rem 0.375rem;
  display: flex;
  align-items: center;
  min-width: max-content;
}

.employee-row-container__timeline .employee-row__timeline-content {
  width: 100%;
}

.timeline-cell--header {
  background: none;
  border: none;
  justify-content: center;
}

.timeline-cell--header .timeline-cell__label {
  color: #475569;
}

.week-header-row {
  display: flex;
  gap: 0;
  align-items: stretch;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.week-header-row__fixed {
  flex-shrink: 0;
  border-right: 1px solid #e2e8f0;
}

.week-header-row__timeline-scroll {
  flex: 1;
  min-width: 0;
}

.week-header-row__timeline {
  padding: 0rem 0.375rem;
  display: flex;
  align-items: center;
  min-width: max-content;
}

.week-header-row--makers {
  width: 100%;
  border-bottom: 2px solid #e2e8f0;
}

.week-header-row--project {
  min-width: 100%;
  width: max-content;
}

.week-header-row--makers .week-header-row__fixed {
  width: 380px;
  background: #f8fafc;
}

.week-header-row--makers .week-header-row__timeline {
  overflow: hidden;
  background: #f8fafc;
  flex: 1;
  min-width: 0;
}

.week-header-row--project .week-header-row__fixed {
  width: 300px;
  position: sticky;
  left: 0;
  z-index: 11;
  background: #f8fafc;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
}

.week-header-row__add-role-select {
  font-size: 0.75rem;
  font-family: inherit;
  padding: 0.25rem 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  min-width: 6rem;
}

.week-header-row__add-role-select:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.week-header-row__add-role-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.week-header-row__add-role-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.timeline-cell__hours {
  position: absolute;
  z-index: 1;
  font-size: 0.7rem;
  font-weight: 600;
  color: #000;
  top: 0.15rem;
  left: 0.25rem;
  line-height: 1;
}

.timeline-cell--editable {
  cursor: pointer;
}

.timeline-cell__hours--empty {
  min-width: 1rem;
  min-height: 1rem;
}

.timeline-cell__hours--empty:hover::after {
  content: "+";
  opacity: 0.4;
}

.timeline-cell__hours-input {
  position: absolute;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 600;
  color: #0f172a;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0.25rem 0.4rem;
  border: 2px solid #3b82f6;
  border-radius: 0.2rem;
  outline: none;
  background: #ffffff;
  line-height: 1;
}

.assignment-editor__employee-dropdown {
  z-index: 1000;
  /* Higher than other elements */
}

.assignment-row__unassigned {
  color: #dc2626;
}

/* Toast styles - aligned with app design */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 380px;
}

.toast {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  animation: slideIn 0.2s ease-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.toast--error {
  background: rgba(254, 202, 202, 0.95);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #991b1b;
}

.toast--warning {
  background: rgba(251, 191, 36, 0.25);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #92400e;
}

.toast--success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #065f46;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.employee-row__capacity-editable {
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  margin: -0.125rem -0.25rem;
  border-radius: 0.25rem;
  transition: background-color 0.15s ease;
}

.employee-row__capacity-editable:hover {
  background-color: #f1f5f9;
}

.employee-row__capacity-input {
  font-size: inherit;
  font-family: inherit;
  color: inherit;
  width: 45px;
  padding: 0.125rem 0.25rem;
  border: 1px solid #3b82f6;
  border-radius: 0.25rem;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.employee-row__role-editable {
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  margin: -0.125rem -0.25rem;
  border-radius: 0.25rem;
  transition: background-color 0.15s ease;
}

.employee-row__role-editable:hover {
  background-color: #f1f5f9;
}

.employee-row__role-dropdown {
  position: absolute;
  z-index: 10;
  margin-top: 0.25rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 10rem;
  font-size: 0.8125rem;
}

/* Portal-rendered dropdown: above table and scroll containers */
.employee-row__role-dropdown--portal {
  z-index: 1000;
  margin-top: 0.25rem;
}

.employee-row__role-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.employee-row__role-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.employee-row__role-option:hover {
  background-color: #f1f5f9;
}

.employee-row__role-done {
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.8125rem;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
}

.employee-row__role-done:hover:not(:disabled) {
  background: #2563eb;
}

.employee-row__role-done:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.project-card--over-allocated {
  border-color: rgba(251, 191, 36, 0.4);
}

.project-card--over-allocated .project-card__summary {
  background-color: rgba(251, 191, 36, 0.2);
}

.project-card--over-allocated:hover {
  border-color: #fbbf24;
  box-shadow: 0 12px 28px rgba(251, 191, 36, 0.2);
}

.project-card--over-allocated:hover .project-card__summary {
  background-color: rgba(251, 191, 36, 0.25);
}


.assignment-row__role-badge {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #64748b;
}

/* Role dropdown uses .project-card__inline-select .project-card__inline-select--small to match deal stage */

/* .assignment-row__role-badge::before {
  content: "•";
  margin-right: 0.25rem;
} */

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  background: transparent;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s ease;
}

.icon-button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== ComboBox Styles ===== */
.combobox {
  position: relative;
  width: 100%;
}

.combobox__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.combobox__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  font-size: 0.85rem;
  color: #334155;
}

.combobox__tag button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  color: #94a3b8;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.15s ease;
}

.combobox__tag button:hover {
  background: #e2e8f0;
  color: #475569;
}

.combobox__input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.combobox__input:focus {
  outline: none;
  border-color: #7c3aed;
  background: #faf5ff;
}

.combobox__input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.combobox__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.combobox__option {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  cursor: pointer;
  transition: background 0.15s ease;
}

.combobox__option:hover {
  background: #f8fafc;
}

.combobox__option:first-child {
  border-radius: 0.75rem 0.75rem 0 0;
}

.combobox__option:last-child {
  border-radius: 0 0 0.75rem 0.75rem;
}

.combobox__option--create {
  color: #7c3aed;
  font-weight: 500;
}

.combobox__option--create:hover {
  background: #faf5ff;
}

.combobox__divider {
  margin: 0.25rem 0;
  border: none;
  border-top: 1px solid #e5e7eb;
}

.combobox__empty {
  padding: 0.75rem 0.85rem;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: center;
}

.timeline-date-selector {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 100;
  font-size: 0.95rem;
}

.timeline-date-selector__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.timeline-date-selector__label {
  color: #64748b;
  font-weight: 500;
}


.timeline-date-selector__today-button {
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.timeline-date-selector__today-button:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.timeline-date-selector__today-button:active {
  background: #cbd5e1;
}

/* Employee Search with Pills */
.employee-search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.employee-search__input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  min-height: 2.5rem;
  cursor: text;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.employee-search__input-container:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.employee-search__input {
  flex: 1;
  min-width: 120px;
  border: none;
  outline: none;
  font-size: 0.875rem;
  background: transparent;
  padding: 0.125rem 0;
}

.employee-search__input::placeholder {
  color: #94a3b8;
}

.employee-search__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  color: #b91c1c;
  white-space: nowrap;
}

.employee-search__pill-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-search__pill-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #b91c1c;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.employee-search__pill-remove:hover {
  background: rgba(220, 38, 38, 0.15);
}

.employee-search__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}

.employee-search__option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background-color 0.15s ease;
}

.employee-search__option:hover,
.employee-search__option--highlighted {
  background: #f1f5f9;
}

.employee-search__option-name {
  flex: 1;
  color: #0f172a;
  font-weight: 400;
}

.employee-search__highlight {
  font-weight: 600;
  color: #b91c1c;
}

.employee-search__option-role {
  color: #64748b;
  font-size: 0.8rem;
}

.employee-search__option-office {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* Makers Board Search Container */
.makers-board__search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #ffffff;
}

.makers-board__search-row .employee-search {
  flex: 1;
}

.makers-board__clear-filter {
  padding: 0.5rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.makers-board__clear-filter:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.makers-board__toggle {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #64748b;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.employee-row__projects-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

/* ============================================================================
   WeekStepper Component
   A week-based date input with prev/next buttons and dropdown list.
   ============================================================================ */

/* CSS Variables for WeekStepper theming */
:root {
  --ws-border: #cbd5e1;
  --ws-hover-bg: #f1f5f9;
  --ws-selected-bg: #e0f2fe;
  --ws-highlight-bg: #dbeafe;
  --ws-focus: #3b82f6;
  --ws-invalid-bg: #fef2f2;
  --ws-invalid-color: #dc2626;
  --ws-color-muted: #64748b;
}

.week-stepper {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  font-size: 0.875rem;
}

.week-stepper--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.week-stepper__input-row {
  display: flex;
  border: 1px solid var(--ws-border);
  border-radius: 0.375rem;
  overflow: hidden;
  background: #ffffff;
}

.week-stepper__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.875em;
  padding: 0;
  background: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 1.25em;
  color: #64748b;
  transition: background-color 0.15s ease;
}

.week-stepper__nav--prev {
  border-right: 1px solid var(--ws-border);
}

.week-stepper__nav--next {
  border-left: 1px solid var(--ws-border);
}

.week-stepper__nav:hover:not(:disabled) {
  background: var(--ws-hover-bg);
}

.week-stepper__nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.week-stepper__input {
  flex: 1;
  min-width: 5em;
  padding: 0.375em 0.5em;
  border: none;
  font-size: 1em;
  text-align: center;
  background: #ffffff;
}

.week-stepper__input:focus {
  outline: none;
  background: #fffef0;
}

.week-stepper__input:disabled {
  background: var(--ws-hover-bg);
  color: var(--ws-color-muted);
}

/* Invalid state for the input */
.week-stepper__input--invalid {
  background: var(--ws-invalid-bg);
  color: var(--ws-invalid-color);
}

.week-stepper__list-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  background: #ffffff;
  border: 1px solid var(--ws-border);
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
}

/* Portal variant - rendered at document.body level */
.week-stepper__list-container--portal {
  position: absolute;
  margin-top: 2px;
  background: #ffffff;
  border: 1px solid var(--ws-border);
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 9999;
  max-height: 200px;
  overflow-y: auto;
}

.week-stepper__list-container--upward {
  margin-top: 0;
  margin-bottom: 2px;
  box-shadow: 0 -4px 15px -3px rgba(0, 0, 0, 0.1), 0 -2px 6px -2px rgba(0, 0, 0, 0.05);
}

.week-stepper__list {
  display: flex;
  flex-direction: column;
}

.week-stepper__option {
  position: relative;
  display: block;
  width: 100%;
  padding: 0.375em 0.5em 0.375em 2.5em;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.15s ease;
}

.week-stepper__option:hover {
  background: var(--ws-hover-bg);
}

.week-stepper__option--selected {
  background: var(--ws-selected-bg);
  font-weight: 500;
}

.week-stepper__option--highlighted {
  background: var(--ws-highlight-bg);
  outline: 1px solid var(--ws-focus);
  outline-offset: -1px;
}

.week-stepper__option--selected.week-stepper__option--highlighted {
  background: var(--ws-selected-bg);
}

.week-stepper__delta {
  position: absolute;
  left: 0.25em;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75em;
  color: var(--ws-color-muted);
  width: 2em;
  text-align: right;
}

/* ============================================================================
   Bulk Selection & Input
   Styles for drag-to-select and bulk hour editing across timeline cells.
   ============================================================================ */

/* Selected cell highlight for drag selection */
.timeline-cell--selected {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  background-color: rgba(59, 130, 246, 0.15);
  z-index: 1;
  position: relative;
}

.timeline-cell--selected .timeline-cell__fill {
  opacity: 0.7;
}

/* Batch update bar - fixed at bottom when multiple cells selected */
.batch-update-bar-wrapper {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0;
}

.batch-update-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.batch-update-bar__label {
  font-size: 0.75rem;
  color: #475569;
  white-space: nowrap;
}

.batch-update-bar__input {
  width: 50px;
  padding: 0.25rem 0.35rem;
  border: 1px solid #3b82f6;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
  line-height: 1.2;
  -webkit-appearance: auto;
  -moz-appearance: spinner-textfield;
  appearance: auto;
}

/* Ensure spinner arrows are always visible */
.batch-update-bar__input::-webkit-inner-spin-button,
.batch-update-bar__input::-webkit-outer-spin-button {
  -webkit-appearance: inner-spin-button;
  opacity: 1;
  margin: 0;
}

.batch-update-bar__input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Single-cell edit mode indicator (Alt/Option held) */
.timeline-cell--single-edit {
  outline: 2px dashed #f59e0b;
  outline-offset: -2px;
}

.timeline-cell--single-edit .timeline-cell__hours-input {
  border-color: #f59e0b;
  border-style: dashed;
}

/* ============================================================================
   WeekStepper Inline Variants
   Styles for WeekStepper when used inline in project cards and meta columns.
   ============================================================================ */

/* Meta column WeekStepper styling */
.project-meta-cell__week-stepper {
  display: inline-flex;
  max-width: 100px;
}

.project-meta-cell__week-stepper .week-stepper__input-row {
  background: #f8fafc;
}

.project-meta-cell__week-stepper .week-stepper__input {
  min-width: 4.5em;
}

/* Ensure dropdown appears above other content */
.project-meta-cell__week-stepper .week-stepper__list-container {
  z-index: 200;
}

/* Form-style WeekStepper - matches .form-input styling */
.week-stepper.form-input {
  width: 100%;
  padding: 0;
  font-size: 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #ffffff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.week-stepper.form-input:focus-within {
  border-color: #7c3aed;
  background: #faf5ff;
}

.week-stepper.form-input .week-stepper__input-row {
  border: none;
  border-radius: 0;
  height: 2.5rem;
  background: transparent;
}

.week-stepper.form-input .week-stepper__nav {
  width: 1.25rem;
  font-size: 1rem;
  background: transparent;
}

.week-stepper.form-input .week-stepper__nav--prev {
  border-right: 1px solid #e2e8f0;
}

.week-stepper.form-input .week-stepper__nav--next {
  border-left: 1px solid #e2e8f0;
}

.week-stepper.form-input .week-stepper__input {
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  background: transparent;
}

.week-stepper.form-input .week-stepper__list-container {
  border-radius: 0.75rem;
}

/* Assignment editor WeekStepper - matches .assignment-editor__input styling */
.week-stepper.assignment-editor__input {
  width: 100%;
  padding: 0;
  font-size: 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #ffffff;
  transition: border-color 0.2s ease;
}

.week-stepper.assignment-editor__input:focus-within {
  border-color: #7c3aed;
}

.week-stepper.assignment-editor__input .week-stepper__input-row {
  border: none;
  border-radius: 0;
  height: 2.25rem;
  background: transparent;
}

.week-stepper.assignment-editor__input .week-stepper__nav {
  width: 1rem;
  font-size: 0.9rem;
  background: transparent;
}

.week-stepper.assignment-editor__input .week-stepper__nav--prev {
  border-right: 1px solid #e2e8f0;
}

.week-stepper.assignment-editor__input .week-stepper__nav--next {
  border-left: 1px solid #e2e8f0;
}

.week-stepper.assignment-editor__input .week-stepper__input {
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  background: transparent;
}

.week-stepper.assignment-editor__input .week-stepper__list-container {
  border-radius: 0.5rem;
}

/* ============================================================
   Role Colors
   ============================================================ */

.role-color--developer  { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
.role-color--designer   { background: rgba(168, 85, 247, 0.12); color: #7c3aed; }
.role-color--qa         { background: rgba(234, 179, 8, 0.12);  color: #a16207; }
.role-color--delivery-lead { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.role-color--tech-lead  { background: rgba(14, 165, 233, 0.12); color: #0369a1; }
.role-color--dev-support { background: rgba(20, 184, 166, 0.12); color: #0f766e; }
.role-color--atom       { background: rgba(100, 116, 139, 0.1); color: #475569; }

.role-badge {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.role-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

/* ============================================================
   Availability Board
   ============================================================ */

.availability-board {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}

.availability-controls {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.availability-controls__field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

.availability-controls__label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.availability-controls__input {
  max-width: 80px;
  min-height: 21px;
  padding: 0.35rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  color: #0f172a;
  background: #ffffff;
}

.availability-controls .week-stepper__input {
  min-width: 4.25em;
  max-width: 7rem;
}

.availability-controls__toggle {
  flex-direction: row;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8rem;
  color: #64748b;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  padding-bottom: 0.25rem;
}

.availability-controls__roles {
  display: flex;
  align-items: flex-end;
}

.availability-controls__input:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

/* ============================================================
   Availability Timeline
   ============================================================ */

.availability-timeline {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.availability-timeline__header {
  flex-shrink: 0;
  overflow: hidden;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
}

.availability-timeline__header-cell {
  padding: 0.5rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #475569;
  text-align: center;
  white-space: nowrap;
}

.availability-timeline__body {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

.availability-timeline__grid {
  display: grid;
  min-width: max-content;
}

.availability-timeline__column {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.25rem 0.2rem;
  border-right: 1px solid #f1f5f9;
  min-height: 200px;
}

.availability-timeline__count {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #475569;
  padding: 0.25rem 0;
  flex-shrink: 0;
}

.availability-timeline__bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 0.25rem;
  padding: 2px;
  min-height: 0;
}

.availability-chip {
  display: block;
  padding: 0.15rem 0.35rem;
  font-size: 0.65rem;
  line-height: 1.3;
  border-radius: 0.2rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: filter 0.15s ease;
}

.availability-chip:hover {
  filter: brightness(0.88);
}

/* Cross-column employee highlight — dimmed state */
.availability-timeline__body.has-highlight .availability-chip {
  opacity: 0.3;
  transition: opacity 0.1s ease;
}

.availability-timeline__body.has-highlight .availability-chip.availability-chip--highlighted {
  opacity: 1;
  outline: 2px solid currentColor;
  outline-offset: -1px;
}
