.sidebar .nav-list {
  gap: 2px;
}

.sidebar .nav-item {
  height: 36px;
}

.sidebar .nav-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.6;
  margin: 18px 11px 4px;
}

.sidebar .workspace-switcher {
  display: grid;
  margin-top: 10px;
  width: 210px;
  margin-right: 0;
  margin-left: 0;
  grid-template-columns: 14px minmax(0, 1fr) 14px;
  align-items: center;
  gap: 6px;
}

.sidebar .workspace-name {
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.sidebar .workspace-name strong,
.sidebar .workspace-name small {
  display: block;
  width: 100%;
  text-align: center;
}

.sidebar .workspace-name strong {
  letter-spacing: 3.32px;
}

#overviewView > .section-head h2,
#overviewView .activity-panel .section-head h2 {
  font-size: 16px;
  line-height: 1.5;
}

.sidebar .brand-name {
  font-size: 18px;
  line-height: 26px;
}

.sidebar .brand-sub {
  font-size: 12px;
  line-height: 1.35;
}

.sidebar .workspace-name strong {
  font-size: 16px;
  line-height: 1.35;
}

.sidebar .workspace-name small {
  font-size: 12px;
}

.sidebar .workspace-switcher .status-dot:last-child {
  justify-self: end;
}

.sidebar #outsourceNavBtn .nav-external {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  opacity: 1;
}

.sidebar-management-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  align-items: center;
}

.sidebar .settings-nav {
  width: 100%;
  min-width: 0;
}

.sidebar .settings-nav span {
  font-size: 14px;
}

.sidebar .settings-nav svg {
  width: 15px;
  height: 15px;
}

.sidebar .trash-nav {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 14px;
  gap: 12px;
  justify-content: flex-start;
  border: 0;
  border-radius: 10px;
}

.sidebar .trash-nav span {
  font-size: 14px;
}

.sidebar .trash-nav svg {
  width: 15px;
  height: 15px;
}

.brand-lockup.logo-only {
  display: block;
  padding: 0 10px;
}

.sidebar .brand-lockup.logo-only {
  padding: 0;
}

.sidebar-wordmark {
  display: block;
  width: 210px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.login-wordmark {
  display: block;
  width: 245px;
  max-width: 62vw;
  height: auto;
}

.user-avatar {
  color: #ffffff;
  background: var(--accent-dark);
  border: 1px solid #ffffff;
}

.empty-state {
  display: flex;
  min-height: 178px;
  padding: 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: #000000;
  background: #ffffff;
  border: 1px dashed #9dcbd3;
  border-radius: 10px;
  text-align: center;
}

.project-grid > .empty-state {
  grid-column: 1 / -1;
}

.empty-state i,
.empty-state svg {
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  color: var(--accent-dark);
}

.empty-state strong {
  font-size: 14px;
}

.empty-state span {
  color: #000000;
  font-size: 12px;
}

.table-empty-cell {
  padding: 42px 20px !important;
  color: #000000 !important;
  text-align: center;
}

.table-empty-cell strong,
.table-empty-cell small {
  display: block;
}

.table-empty-cell small {
  margin-top: 6px;
  color: #000000 !important;
}

.budget-edit-row input,
.budget-edit-row select {
  width: 100%;
  min-width: 88px;
  height: 34px;
  padding: 0 9px;
  color: #000000;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
}

.budget-edit-row input:focus,
.budget-edit-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #1bb1c81f;
}

.budget-edit-row .field-subject {
  min-width: 150px;
}

.budget-edit-row .field-vendor {
  min-width: 135px;
}

.budget-edit-row .field-qty,
.budget-edit-row .field-price {
  min-width: 78px;
}

.activity-panel .inline-empty {
  min-height: 188px;
  border: 0;
}

.project-form-note {
  margin: 0;
  padding: 0 28px 20px;
  color: #000000;
  font-size: 12px;
}

.project-model-field > span {
  display: block;
  color: #70767c;
  font-size: 12px;
}

.project-model-rows {
  display: grid;
  gap: 8px;
}

.project-model-row {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  min-width: 0;
}

.project-model-row input {
  flex: 1;
  min-width: 0;
}

.project-model-remove {
  width: 44px;
  height: 42px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #dfe8ea;
  border-radius: 10px;
  background: #ffffff;
  color: #78878a;
}

.project-model-remove:hover,
.project-model-remove:focus-visible {
  border-color: #d75a4a;
  color: #c74435;
  outline: 0;
}

.project-model-remove svg {
  width: 16px;
  height: 16px;
}

.project-model-add {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.project-model-add:hover,
.project-model-add:focus-visible {
  color: #117f90;
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-model-add svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 1100px) {
  .sidebar .brand-name {
    font-size: 18px;
  }

  .sidebar .brand-sub {
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  .login-wordmark {
    width: 210px;
  }
}

/* Production workflow fields from the current studio forms. */
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.outline-btn.compact {
  height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}

.project-card.project-edit-trigger,
.project-row.project-edit-trigger {
  cursor: pointer;
}

.project-card.project-edit-trigger {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card.project-edit-trigger:hover,
.project-card.project-edit-trigger:focus-visible {
  border-color: rgba(27, 177, 203, .46);
  box-shadow: 0 8px 24px rgba(27, 177, 203, .10);
  outline: 0;
  transform: translateY(-1px);
}

.project-row.project-edit-trigger:hover td,
.project-row.project-edit-trigger:focus-visible td {
  background: #f7fcfd;
}

.project-row.project-edit-trigger:focus-visible {
  outline: 2px solid #1bb1cb;
  outline-offset: -2px;
}

.project-name-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.project-name-button:hover strong,
.project-name-button:focus-visible strong {
  color: #1bb1cb;
}

.project-name-button:focus-visible {
  outline: 0;
}

.project-select {
  min-width: 190px;
  height: 38px;
  padding: 0 34px 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(27, 177, 200, .22);
  border-radius: 10px;
  outline: 0;
}

.project-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 177, 200, .12);
}

.budget-summary-v2 {
  grid-template-columns: repeat(4, 1fr);
}

.budget-category-scroll {
  width: 100%;
  margin-bottom: 22px;
  overflow-x: auto;
}

.budget-category-tabs {
  display: flex;
  gap: 8px;
  width: max-content;
  margin: 0 auto;
  padding-bottom: 4px;
}

.budget-category-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.budget-category-tabs button:hover,
.budget-category-tabs button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.budget-section-head {
  margin-bottom: 12px;
}

.budget-section-head > strong {
  color: var(--accent-dark);
  font-size: 14px;
}

.budget-ledger table {
  min-width: 1120px;
}

.budget-ledger th,
.budget-ledger td {
  padding: 12px 10px;
}

.budget-ledger th {
  font-size: 12px;
  line-height: 17px;
  padding-left: 12px;
  text-align: left;
  vertical-align: middle;
}

.main-content svg.lucide-trash-2 {
  width: 14px !important;
  height: 14px !important;
  stroke-width: 2;
}

.budget-ledger .budget-edit-row input,
.budget-ledger .budget-edit-row select {
  min-width: 112px;
}

.budget-ledger .budget-edit-row input[type="number"] {
  min-width: 82px;
}

.budget-ledger-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 14px;
}

.department-purchase-section {
  margin-top: 42px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.department-purchase-section .section-head {
  margin-bottom: 17px;
}

.department-purchase-section .section-head h2 {
  font-size: 18px;
}

.budget-ledger-actions > button {
  height: 36px;
  min-height: 36px;
}

#exportPropsInvoices {
  height: 36px;
  min-height: 36px;
  padding: 0 18px;
  font-size: 12px !important;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
}

#exportPropsInvoices svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke-width: 2.2;
}

#budgetLedger[data-category="道具费用"] {
  table-layout: fixed;
  min-width: 1068px;
}

#budgetLedger[data-category="道具费用"] th:nth-child(1) { width: 180px; }
#budgetLedger[data-category="道具费用"] th:nth-child(2) { width: 82px; }
#budgetLedger[data-category="道具费用"] th:nth-child(3) { width: 120px; }
#budgetLedger[data-category="道具费用"] th:nth-child(4) { width: 100px; }
#budgetLedger[data-category="道具费用"] th:nth-child(5) { width: 128px; }
#budgetLedger[data-category="道具费用"] th:nth-child(6) { width: 94px; }
#budgetLedger[data-category="道具费用"] th:nth-child(7) { width: 110px; }
#budgetLedger[data-category="道具费用"] th:nth-child(8) { width: 90px; }
#budgetLedger[data-category="道具费用"] th:nth-child(9) { width: 108px; }
#budgetLedger[data-category="道具费用"] th:nth-child(10) { width: 48px; }

#budgetLedger[data-category="道具费用"] .budget-edit-row input,
#budgetLedger[data-category="道具费用"] .budget-edit-row select,
#budgetLedger[data-category="道具费用"] .attachment-cell {
  width: 100%;
  min-width: 0;
}

#departmentPurchaseLedger {
  table-layout: fixed;
  min-width: 1068px;
}

#departmentPurchaseLedger th:nth-child(1) { width: 180px; }
#departmentPurchaseLedger th:nth-child(2) { width: 82px; }
#departmentPurchaseLedger th:nth-child(3) { width: 120px; }
#departmentPurchaseLedger th:nth-child(4) { width: 100px; }
#departmentPurchaseLedger th:nth-child(5) { width: 128px; }
#departmentPurchaseLedger th:nth-child(6) { width: 94px; }
#departmentPurchaseLedger th:nth-child(7) { width: 110px; }
#departmentPurchaseLedger th:nth-child(8) { width: 90px; }
#departmentPurchaseLedger th:nth-child(9) { width: 108px; }
#departmentPurchaseLedger th:nth-child(10) { width: 48px; }

#departmentPurchaseLedger .budget-edit-row input,
#departmentPurchaseLedger .budget-edit-row select,
#departmentPurchaseLedger .attachment-cell {
  width: 100%;
  min-width: 0;
}

#regularPurchaseLedger {
  table-layout: fixed;
  min-width: 1195px;
}

#regularPurchaseLedger th:nth-child(1) { width: 130px; }
#regularPurchaseLedger th:nth-child(2) { width: 250px; }
#regularPurchaseLedger th:nth-child(3) { width: 70px; }
#regularPurchaseLedger th:nth-child(4) { width: 105px; }
#regularPurchaseLedger th:nth-child(5) { width: 95px; }
#regularPurchaseLedger th:nth-child(6) { width: 135px; }
#regularPurchaseLedger th:nth-child(7) { width: 100px; }
#regularPurchaseLedger th:nth-child(8) { width: 110px; }
#regularPurchaseLedger th:nth-child(9) { width: 70px; }
#regularPurchaseLedger th:nth-child(10) { width: 90px; }
#regularPurchaseLedger th:nth-child(11) { width: 40px; }

#regularPurchaseLedger .budget-edit-row input,
#regularPurchaseLedger .budget-edit-row select,
#regularPurchaseLedger .attachment-cell {
  width: 100%;
  min-width: 0;
}

.main-content #addBudgetRow {
  height: 36px;
  min-height: 36px;
  gap: 6px;
  padding: 0 13px;
  color: #1a2426;
  background: #fff;
  border: 1px solid rgba(27, 177, 200, .24);
  font-size: 12px;
  line-height: 16px;
  align-items: center;
  justify-content: center;
}

.main-content #addBudgetRow span {
  display: block;
  color: #1a2426;
  font-size: 12px;
  line-height: 16px;
}

.main-content #addBudgetRow svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #1a2426;
  stroke: currentColor;
  stroke-width: 2.2;
}

.main-content .budget-ledger-actions .primary-btn {
  color: #1a2426;
  background: #fff;
  border: 1px solid rgba(27, 177, 200, .24);
}

.main-content .budget-ledger-actions .primary-btn:hover {
  color: #1a2426;
  background: #f7fcfd;
  border-color: rgba(27, 177, 200, .5);
}

.main-content .budget-ledger-actions .primary-btn svg {
  color: #1a2426;
  stroke: currentColor;
}

.main-content .budget-ledger-actions .purchase-batch-btn {
  color: #1a2426;
  background: #fff;
  border: 1px solid rgba(27, 177, 200, .24);
  font-size: 12px;
  line-height: 16px;
}

.main-content .budget-ledger-actions .purchase-batch-btn:hover {
  background: #f7fcfd;
  border-color: rgba(27, 177, 200, .5);
}

.main-content .budget-ledger-actions .purchase-batch-btn svg {
  width: 14px;
  height: 14px;
  color: #1a2426;
  stroke: currentColor;
}

.main-content .budget-ledger-actions button svg.lucide-plus,
.main-content .budget-ledger-actions button i[data-lucide="plus"] {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #1a2426 !important;
  stroke: #1a2426 !important;
}

.budget-empty-add {
  width: 100%;
  min-height: 112px;
  color: #1a2426;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.budget-empty-add strong,
.budget-empty-add small {
  display: block;
}

.budget-empty-add small {
  margin-top: 7px;
  color: var(--accent-dark) !important;
  font-weight: 700;
}

.budget-empty-add:hover strong,
.budget-empty-add:focus-visible strong {
  color: var(--accent-dark);
}

.studio-sync-panel {
  margin: 22px 0;
}

.studio-sync-head {
  align-items: end;
  margin-bottom: 12px;
}

.studio-sync-head h2 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.studio-sync-head span {
  color: var(--muted);
  font-size: 12px;
}

.studio-sync-table table {
  min-width: 980px;
}

.studio-sync-table td > strong,
.studio-sync-table td > small,
.sync-readonly strong,
.sync-readonly small {
  display: block;
}

.studio-sync-table td > small,
.sync-readonly small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.studio-link-editor {
  display: flex;
  min-width: 250px;
  gap: 8px;
  align-items: center;
}

.studio-link-editor[hidden] {
  display: none;
}

.studio-project-select {
  min-width: 170px;
  height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.studio-linked-project {
  display: flex;
  min-width: 220px;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.studio-sync-state {
  display: inline-flex;
  min-height: 30px;
  padding: 0 10px;
  align-items: center;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.studio-sync-state.is-linked {
  color: #147946;
  background: rgba(25, 135, 84, .1);
}

.studio-sync-state.is-pending {
  color: #9b6a00;
  background: rgba(178, 123, 0, .12);
}

.sync-readonly {
  display: block;
  min-width: 110px;
}

.sync-readonly strong {
  color: var(--ink);
  font-size: 12px;
}

.studio-row-lock {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--accent-dark);
  background: rgba(27, 177, 200, .1);
  border-radius: 10px;
}

.studio-row-lock svg {
  width: 15px;
  height: 15px;
}

.attachment-cell {
  display: grid;
  min-width: 142px;
  gap: 6px;
}

.attachment-links {
  display: grid;
  gap: 4px;
}

.attachment-link,
.attachment-legacy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: #1677ff !important;
  font-size: 12px;
  line-height: 18px;
  text-decoration: underline;
}

.attachment-link svg,
.attachment-legacy svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.attachment-link span,
.attachment-legacy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-link:hover { color: #0958d9 !important; }

.attachment-legacy {
  color: #88999c !important;
  text-decoration-style: dashed;
  cursor: help;
}

.attachment-add {
  position: relative;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  padding: 0 9px;
  align-items: center;
  gap: 5px;
  color: var(--accent-dark) !important;
  background: rgba(27, 177, 200, .08);
  border: 1px dashed rgba(27, 177, 200, .35);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.attachment-add:hover { background: rgba(27, 177, 200, .14); }

.attachment-add svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.attachment-add input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-width: 100% !important;
  opacity: 0;
  cursor: pointer;
}

.attachment-add > i,
.attachment-add > span {
  pointer-events: none;
}

.call-sheet-modal {
  width: min(1080px, 100%);
  max-height: 94vh;
  overflow: auto;
}

.call-sheet-fields {
  grid-template-columns: repeat(3, 1fr);
}

.call-sheet-fields .wide {
  grid-column: 1 / -1;
}

.call-block {
  padding: 0 28px 24px;
}

.call-block .section-head {
  margin-bottom: 10px;
}

.call-rows {
  display: grid;
  gap: 8px;
}

.call-row {
  display: grid;
  grid-template-columns: 1fr 160px 2fr 40px;
  gap: 8px;
  align-items: center;
}

.call-row input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(27, 177, 200, .16);
  border-radius: 10px;
  outline: 0;
}

.call-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 177, 200, .12);
}

@media (max-width: 900px) {
  .budget-summary-v2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .call-sheet-fields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  #budgetView {
    overflow-x: hidden;
  }

  .intro-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .project-select {
    flex: 1;
    min-width: 0;
  }

  .budget-summary-v2,
  .call-sheet-fields {
    grid-template-columns: 1fr;
  }

  .call-sheet-fields .wide {
    grid-column: auto;
  }

  .call-block {
    padding: 0 18px 20px;
  }

  .call-row {
    grid-template-columns: 1fr 110px 40px;
  }

  .call-row input[data-key="location"] {
    grid-column: 1 / 3;
  }
}
/* Projects heading and status filters share the same readable hierarchy. */
#projectsView .projects-heading-text,
#projectsView .projects-segmented button {
  font-family: Outfit, "LXGW Neo XiHei", SimHei, "Heiti SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

#projectsView .projects-heading-text,
#projectsView .projects-segmented button.active {
  font-weight: 700;
}

#projectsView .projects-segmented button:not(.active) {
  font-weight: 500;
}
