.projects-page {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 16px 76px 76px 18px;
  color: var(--lf-text);
}

.projects-page-head,
.projects-page-actions,
.projects-title-group,
.projects-toolbar,
.projects-toolbar-actions,
.project-search,
.project-pagination,
.project-pagination-controls,
.project-page-size {
  display: flex;
  align-items: center;
}

.projects-page-head,
.projects-toolbar,
.project-pagination {
  justify-content: space-between;
}

.projects-page-head { gap: 20px; margin: 2px 0 22px; }
.projects-title-group { gap: 12px; min-width: 0; }
.projects-title-group h1 { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 700; color: var(--lf-text); }
.projects-total { display: inline-flex; min-width: 28px; height: 24px; justify-content: center; align-items: center; padding: 0 8px; border-radius: 12px; background: var(--lf-surface-3); color: var(--lf-text-2); font-size: 12px; font-weight: 600; }
.projects-page-actions { gap: 10px; flex: 0 0 auto; }
.project-primary-action,
.project-secondary-action,
.project-refresh-action,
.project-pagination-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--lf-border);
  border-radius: 7px;
  padding: 0 14px;
  background: var(--lf-surface);
  color: var(--lf-text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.project-primary-action { border-color: var(--lf-primary); background: var(--lf-primary); color: #fff; }
.project-primary-action:hover { border-color: var(--lf-primary-hover); background: var(--lf-primary-hover); }
.project-primary-action > span { font-size: 19px; line-height: 1; font-weight: 400; }
.project-secondary-action:hover,
.project-refresh-action:hover,
.project-pagination-controls > button:not(:disabled):hover { border-color: var(--lf-primary-light); color: var(--lf-primary); background: var(--lf-surface-2); }
.project-people-icon { position: relative; width: 14px; height: 14px; }
.project-people-icon::before { content: ""; position: absolute; left: 4px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.project-people-icon::after { content: ""; position: absolute; left: 1px; bottom: 0; width: 12px; height: 7px; border-radius: 7px 7px 3px 3px; background: currentColor; }

.project-status-tabs { display: flex; gap: 26px; align-items: stretch; min-height: 45px; border-bottom: 1px solid var(--lf-border); overflow-x: auto; scrollbar-width: none; }
.project-status-tabs::-webkit-scrollbar { display: none; }
.project-status-tabs button { position: relative; display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto; border: 0; border-bottom: 2px solid transparent; padding: 0 2px 12px; background: transparent; color: var(--lf-text-2); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.project-status-tabs button:hover { color: var(--lf-primary); }
.project-status-tabs button[aria-pressed="true"] { border-bottom-color: var(--lf-primary); color: var(--lf-primary); font-weight: 650; }
.project-status-tabs button > span { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0 5px; border-radius: 10px; background: var(--lf-surface-3); color: var(--lf-text-3); font-size: 11px; line-height: 1; }
.project-status-tabs button[aria-pressed="true"] > span { background: var(--lf-primary-light); color: var(--lf-primary); }

.projects-toolbar { gap: 16px; padding: 17px 0; }
.project-search { width: min(100%, 390px); min-height: 38px; gap: 9px; padding: 0 10px 0 12px; border: 1px solid var(--lf-border); border-radius: 7px; background: var(--lf-surface); transition: border-color .15s ease, box-shadow .15s ease; }
.project-search:focus-within { border-color: var(--lf-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lf-primary) 12%, transparent); }
.project-search-glyph { position: relative; flex: 0 0 14px; width: 14px; height: 14px; border: 1.6px solid var(--lf-text-3); border-radius: 50%; }
.project-search-glyph::after { content: ""; position: absolute; right: -4px; bottom: -2px; width: 6px; height: 1.6px; transform: rotate(45deg); transform-origin: left center; background: var(--lf-text-3); }
.project-search input { flex: 1 1 auto; min-width: 0; height: 36px; border: 0; outline: 0; background: transparent; color: var(--lf-text); font: inherit; font-size: 13px; }
.project-search input::placeholder { color: var(--lf-text-4); }
.project-search input::-webkit-search-cancel-button { cursor: pointer; }
.project-search button { flex: 0 0 auto; border: 0; padding: 4px 6px; background: transparent; color: var(--lf-primary); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.projects-toolbar-actions { gap: 10px; }
.project-sort-control,
.project-page-size { display: inline-flex; align-items: center; gap: 8px; color: var(--lf-text-3); font-size: 12px; white-space: nowrap; }
.project-sort-control select,
.project-page-size select { height: 36px; max-width: 205px; border: 1px solid var(--lf-border); border-radius: 6px; padding: 0 28px 0 10px; background: var(--lf-surface); color: var(--lf-text-2); font: inherit; font-size: 12px; cursor: pointer; }
.project-refresh-action { width: 38px; min-width: 38px; padding: 0; font-size: 20px; line-height: 1; }
.project-refresh-action > span { display: block; transform: translateY(-1px); }

.project-table-surface { overflow: visible; border: 1px solid var(--lf-border); border-radius: 8px; background: var(--lf-surface); }
.project-table-scroll { overflow-x: auto; border-radius: 8px 8px 0 0; }
.project-list-table { width: 100%; min-width: 900px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.project-list-table th { height: 46px; border-bottom: 1px solid var(--lf-border); padding: 0 18px; background: var(--lf-surface-2); color: var(--lf-text-3); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.project-list-table th:first-child { width: 29%; padding-left: 22px; }
.project-list-table th:nth-child(2) { width: 19%; }
.project-list-table th:nth-child(3) { width: 14%; }
.project-list-table th:nth-child(4) { width: 11%; }
.project-list-table th:nth-child(5) { width: 15%; }
.project-list-table th:last-child { width: 12%; }
.project-list-table .project-number-heading,
.project-list-table .project-action-heading { text-align: right; }
.project-list-table td { height: 74px; border-bottom: 1px solid var(--lf-border); padding: 12px 18px; color: var(--lf-text-2); font-size: 13px; vertical-align: middle; }
.project-list-table tbody tr:last-child td { border-bottom: 0; }
.project-list-table tbody tr:hover td { background: var(--lf-surface-2); }
.project-list-table td:first-child { padding-left: 22px; }
.project-name-button { display: block; max-width: 100%; overflow: hidden; border: 0; padding: 0; background: transparent; color: var(--lf-text); font: inherit; font-size: 14px; font-weight: 650; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.project-name-button:hover { color: var(--lf-primary); }
.project-name-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; color: var(--lf-text-4); font-size: 11px; line-height: 1.4; }
.project-language-pair { color: var(--lf-text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-language-pair > span { margin: 0 5px; color: var(--lf-text-4); }
.project-status-chip { display: inline-flex; align-items: center; min-height: 24px; border-radius: 12px; padding: 0 9px; background: var(--lf-surface-3); color: var(--lf-text-2); font-size: 11px; font-weight: 600; white-space: nowrap; }
.project-status-chip.is-draft { background: var(--lf-surface-3); color: var(--lf-text-2); }
.project-status-chip.is-in_progress { background: #eaf2ff; color: #2862c5; }
.project-status-chip.is-review { background: #fff4df; color: #996000; }
.project-status-chip.is-done { background: #e8f6ef; color: #24764a; }
.project-number-cell { color: var(--lf-text); font-variant-numeric: tabular-nums; text-align: right; }
.project-date-cell { color: var(--lf-text-3) !important; font-size: 12px !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.project-actions-cell { text-align: right; white-space: nowrap; }
.project-view-action { border: 0; padding: 5px 0; background: transparent; color: var(--lf-primary); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.project-view-action:hover { color: var(--lf-primary-hover); }
.project-row-menu { position: relative; display: inline-block; margin-left: 10px; vertical-align: middle; }
.project-row-menu > summary { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid transparent; border-radius: 6px; color: var(--lf-text-3); font-size: 20px; line-height: 1; list-style: none; cursor: pointer; }
.project-row-menu > summary::-webkit-details-marker { display: none; }
.project-row-menu > summary:hover { border-color: var(--lf-border); background: var(--lf-surface); color: var(--lf-text); }
.project-row-menu-panel { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 112px; padding: 4px; border: 1px solid var(--lf-border); border-radius: 7px; background: var(--lf-surface); box-shadow: 0 8px 22px rgba(15, 23, 42, .12); }
.project-row-menu-panel button { width: 100%; border: 0; border-radius: 4px; padding: 8px 10px; background: transparent; color: var(--lf-danger); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.project-row-menu-panel button:hover { background: var(--lf-surface-2); }

.project-pagination { min-height: 58px; gap: 16px; padding: 0 18px; }
.project-pagination-summary { color: var(--lf-text-3); font-size: 12px; }
.project-pagination-controls { gap: 10px; margin-right: 52px; }
.project-page-size select { min-width: 60px; height: 30px; padding-left: 8px; }
.project-page-indicator { min-width: 45px; color: var(--lf-text-2); font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.project-pagination-controls > button { width: 30px; min-width: 30px; min-height: 30px; padding: 0; font-size: 15px; }
.project-pagination-controls > button:disabled { color: var(--lf-text-4); cursor: not-allowed; opacity: .55; }
.projects-empty { display: flex; min-height: 270px; flex-direction: column; align-items: center; justify-content: center; gap: 16px; border: 1px dashed var(--lf-border); border-radius: 8px; background: var(--lf-surface); text-align: center; }
.projects-empty h2 { max-width: min(520px, 90%); margin: 0; color: var(--lf-text-2); font-size: 14px; font-weight: 500; line-height: 1.6; }
.projects-empty-mark { position: relative; width: 42px; height: 34px; border: 1px solid var(--lf-border-strong); border-radius: 5px; background: var(--lf-surface-2); }
.projects-empty-mark::before { content: ""; position: absolute; top: -6px; left: 4px; width: 15px; height: 7px; border: 1px solid var(--lf-border-strong); border-bottom: 0; border-radius: 4px 4px 0 0; background: var(--lf-surface-2); }
.projects-empty-mark span { position: absolute; top: 16px; left: 11px; width: 18px; height: 1px; background: var(--lf-border-strong); }

[data-theme="dark"] .project-status-chip.is-in_progress { background: rgba(59, 130, 246, .18); color: #9cc1ff; }
[data-theme="dark"] .project-status-chip.is-review { background: rgba(217, 146, 39, .18); color: #f0c675; }
[data-theme="dark"] .project-status-chip.is-done { background: rgba(47, 153, 98, .18); color: #8ad5a9; }
[data-theme="sepia"] .project-status-chip.is-in_progress { background: #e9e5d8; color: #455c80; }
[data-theme="sepia"] .project-status-chip.is-review { background: #f2e4c8; color: #805a20; }
[data-theme="sepia"] .project-status-chip.is-done { background: #e2eadb; color: #41623b; }

@media (max-width: 900px) {
  .project-list-table { min-width: 820px; }
  .project-list-table th:first-child { width: 27%; }
  .project-list-table th:nth-child(2) { width: 18%; }
  .project-list-table th:nth-child(3) { width: 14%; }
  .project-list-table th:nth-child(4) { width: 11%; }
  .project-list-table th:nth-child(5) { width: 16%; }
  .project-list-table th:last-child { width: 14%; }
}

@media (max-width: 680px) {
  .projects-page { padding: 12px 12px 76px 14px; }
  .projects-page-head { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
  .projects-page-actions { width: 100%; }
  .projects-page-actions > button { flex: 1 1 auto; }
  .project-status-tabs { flex-wrap: wrap; gap: 4px 18px; overflow: visible; }
  .projects-toolbar { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px 0; }
  .project-search { width: 100%; }
  .projects-toolbar-actions { justify-content: space-between; }
  .project-sort-control { flex: 1; justify-content: flex-start; }
  .project-sort-control select { flex: 1; max-width: none; }
  .project-list-table { display: block; min-width: 0; }
  .project-list-table thead { display: none; }
  .project-list-table tbody { display: grid; gap: 10px; padding: 10px; }
  .project-list-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, auto); gap: 9px 12px; border: 1px solid var(--lf-border); border-radius: 7px; padding: 13px 64px 13px 13px; background: var(--lf-surface); }
  .project-list-table tbody tr:hover td { background: transparent; }
  .project-list-table td,
  .project-list-table td:first-child { display: flex; min-width: 0; height: auto; align-items: center; justify-content: space-between; gap: 10px; border: 0; padding: 0; font-size: 12px !important; text-align: right; }
  .project-list-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--lf-text-4); font-size: 11px; text-align: left; }
  .project-list-table .project-name-cell { display: block; grid-column: 1 / -1; padding-bottom: 4px; text-align: left; }
  .project-name-cell::before { display: block; margin-bottom: 7px; }
  .project-name-button { white-space: normal; overflow-wrap: anywhere; }
  .project-name-meta { font-size: 11px; }
  .project-language-cell { grid-column: 1 / -1; }
  .project-status-cell { justify-content: flex-start !important; }
  .project-number-cell { justify-content: flex-end !important; }
  .project-date-cell { grid-column: 1 / -1; }
  .project-actions-cell { grid-column: 1 / -1; justify-content: flex-end !important; border-top: 1px solid var(--lf-border) !important; padding-top: 8px !important; }
  .project-pagination { align-items: flex-start; flex-direction: column; padding: 12px; }
  .project-pagination-controls { width: calc(100% - 52px); justify-content: space-between; gap: 7px; margin-right: 52px; }
  .project-pagination-summary { font-size: 11px; }
  .project-page-size { gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .project-primary-action,
  .project-secondary-action,
  .project-refresh-action,
  .project-pagination-controls > button,
  .project-search { transition: none; }
}

.project-dialog-overlay {
  box-sizing: border-box;
  padding: 24px;
  background: rgba(15, 23, 42, .55);
}

.project-dialog {
  display: flex;
  width: min(960px, calc(100vw - 48px));
  max-width: none;
  max-height: min(88dvh, 860px);
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--lf-border);
  border-radius: 10px;
  background: var(--lf-surface);
  color: var(--lf-text);
}

.project-create-dialog { width: min(760px, calc(100vw - 48px)); }
.project-dialog:focus { outline: none; }
.project-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 26px 18px; border-bottom: 1px solid var(--lf-border); }
.project-dialog-kicker { display: block; margin-bottom: 4px; color: var(--lf-text-4); font-size: 11px; font-weight: 600; }
.project-dialog-header h2 { margin: 0; color: var(--lf-text); font-size: 19px; line-height: 1.35; font-weight: 700; }
.project-dialog-header p { margin: 6px 0 0; color: var(--lf-text-3); font-size: 12px; line-height: 1.5; }
.project-dialog-close { display: grid; width: 34px; min-width: 34px; height: 34px; place-items: center; border: 1px solid var(--lf-border); border-radius: 6px; background: var(--lf-surface); color: var(--lf-text-3); font: inherit; font-size: 14px; cursor: pointer; }
.project-dialog-close:hover { border-color: var(--lf-primary-light); background: var(--lf-surface-2); color: var(--lf-primary); }
.project-dialog-close:focus-visible,
.project-dialog button:focus-visible,
.project-dialog input:focus-visible,
.project-dialog select:focus-visible,
.project-dialog textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--lf-primary) 28%, transparent); outline-offset: 2px; }
.project-dialog-form { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.project-dialog-body { min-height: 0; flex: 1; overflow-y: auto; padding: 20px 26px 24px; }
.project-form-section { padding: 0 0 20px; margin: 0 0 18px; border-bottom: 1px solid var(--lf-border); }
.project-form-section:last-of-type { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.project-form-section h3,
.client-section-heading h3,
.client-form-heading h3 { margin: 0; color: var(--lf-text-2); font-size: 13px; line-height: 1.4; font-weight: 700; }
.project-form-section > h3 { margin-bottom: 14px; }
.project-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.project-field { display: grid; min-width: 0; gap: 7px; align-content: start; }
.project-field--wide { grid-column: 1 / -1; }
.project-field > label { color: var(--lf-text-2); font-size: 12px; line-height: 1.4; font-weight: 600; }
.project-required-mark { color: var(--lf-danger); }
.project-field .native-input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 40px; margin: 0; padding: 8px 11px; border-color: var(--lf-border-strong); border-radius: 6px; background-color: var(--lf-surface); color: var(--lf-text); font: inherit; font-size: 13px; }
.project-field textarea.native-input { min-height: 82px; resize: vertical; }
.project-field .native-input[aria-invalid="true"] { border-color: var(--lf-danger); }
.project-field-error { margin: -2px 0 0; color: var(--lf-danger); font-size: 11px; line-height: 1.45; }
.project-form-error { margin: 14px 0 0; border-left: 3px solid var(--lf-danger); padding: 9px 11px; background: var(--lf-surface-2); color: var(--lf-danger); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.project-language-fields { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: end; gap: 13px; }
.project-language-swap { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--lf-border); border-radius: 50%; background: var(--lf-surface); color: var(--lf-primary); font: inherit; font-size: 18px; cursor: pointer; }
.project-language-swap:hover { border-color: var(--lf-primary-light); background: var(--lf-surface-2); }
.project-dialog-footer { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex: 0 0 auto; border-top: 1px solid var(--lf-border); padding: 13px 26px; background: var(--lf-surface); }
.project-dialog-secondary { min-height: 38px; border: 1px solid var(--lf-border); border-radius: 6px; padding: 0 14px; background: var(--lf-surface); color: var(--lf-text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.project-dialog-secondary:hover { background: var(--lf-surface-2); }
.project-dialog .project-primary-action:disabled { cursor: wait; opacity: .65; }

.client-manager-layout { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1.3fr) minmax(330px, .9fr); overflow: hidden; }
.client-list-panel { min-width: 0; overflow-y: auto; padding: 22px 24px; }
.client-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.client-section-heading > span { color: var(--lf-text-4); font-size: 11px; white-space: nowrap; }
.client-list { border-top: 1px solid var(--lf-border); }
.client-list-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, auto); align-items: center; gap: 14px; border-bottom: 1px solid var(--lf-border); padding: 13px 0; }
.client-list-identity { display: grid; min-width: 0; gap: 3px; }
.client-list-identity strong { color: var(--lf-text); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.client-list-identity > span { color: var(--lf-text-3); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.client-list-identity small { color: var(--lf-text-4); font-size: 10px; line-height: 1.35; }
.client-list-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.client-row-action { min-height: 30px; border: 1px solid var(--lf-border); border-radius: 5px; padding: 0 8px; background: var(--lf-surface); color: var(--lf-text-2); font: inherit; font-size: 10px; line-height: 1.35; cursor: pointer; }
.client-row-action:hover { border-color: var(--lf-primary-light); color: var(--lf-primary); background: var(--lf-surface-2); }
.client-row-menu { position: relative; flex: 0 0 auto; }
.client-row-menu > summary { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid transparent; border-radius: 5px; color: var(--lf-text-3); font-size: 19px; line-height: 1; list-style: none; cursor: pointer; }
.client-row-menu > summary::-webkit-details-marker { display: none; }
.client-row-menu > summary:hover { border-color: var(--lf-border); background: var(--lf-surface-2); }
.client-row-menu-panel { position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 110px; padding: 4px; border: 1px solid var(--lf-border); border-radius: 6px; background: var(--lf-surface); box-shadow: 0 8px 22px rgba(15, 23, 42, .12); }
.client-row-menu-panel button { width: 100%; border: 0; border-radius: 4px; padding: 8px 10px; background: transparent; color: var(--lf-danger); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.client-row-menu-panel button:hover { background: var(--lf-surface-2); }
.client-list-empty { display: grid; min-height: 230px; align-content: center; justify-items: center; gap: 9px; border-top: 1px solid var(--lf-border); padding: 20px; text-align: center; }
.client-empty-mark { position: relative; width: 34px; height: 26px; margin-bottom: 5px; border: 1px solid var(--lf-border-strong); border-radius: 4px; background: var(--lf-surface-2); }
.client-empty-mark::before { position: absolute; top: -5px; left: 4px; width: 12px; height: 6px; border: 1px solid var(--lf-border-strong); border-bottom: 0; border-radius: 3px 3px 0 0; background: var(--lf-surface-2); content: ""; }
.client-list-empty strong { color: var(--lf-text-2); font-size: 13px; }
.client-list-empty p { max-width: 280px; margin: 0; color: var(--lf-text-4); font-size: 11px; line-height: 1.55; }
.client-form-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border-left: 1px solid var(--lf-border); background: var(--lf-surface-2); }
.client-form-heading { flex: 0 0 auto; padding: 22px 24px 14px; }
.client-form-heading p { margin: 5px 0 0; color: var(--lf-text-4); font-size: 11px; line-height: 1.5; }
.client-form-scroll { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 0 24px 16px; }
.project-form-stack { display: grid; gap: 13px; }
.client-form-footer { display: flex; flex: 0 0 auto; justify-content: flex-end; border-top: 1px solid var(--lf-border); padding: 12px 24px 16px; background: var(--lf-surface-2); }
.client-form-footer .project-primary-action { min-width: 118px; }

@media (max-width: 680px) {
  .project-dialog-overlay { align-items: center; padding: 10px; }
  .project-dialog,
  .project-create-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 9px; }
  .project-dialog-header { gap: 12px; padding: 17px 17px 14px; }
  .project-dialog-header h2 { font-size: 17px; }
  .project-dialog-body { padding: 16px 17px 20px; }
  .project-dialog-footer { padding: 11px 17px; }
  .project-form-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .project-field--wide { grid-column: auto; }
  .project-language-fields { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .project-language-swap { justify-self: center; transform: rotate(90deg); }
  .client-manager-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "form" "list"; overflow-y: auto; }
  .client-form-panel { grid-area: form; min-height: 500px; overflow: hidden; border-left: 0; border-bottom: 1px solid var(--lf-border); }
  .client-form-heading { padding: 16px 17px 12px; }
  .client-form-scroll { padding: 0 17px 14px; }
  .client-form-footer { padding: 10px 17px 14px; }
  .client-list-panel { grid-area: list; overflow: visible; padding: 16px 17px 20px; }
  .client-list { max-height: 35dvh; overflow-y: auto; }
  .client-list-empty { min-height: 150px; }
  .client-list-row { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .client-list-actions { justify-content: flex-start; flex-wrap: wrap; }
  .client-row-action { min-height: 34px; font-size: 11px; }
}

.project-detail-layout { display: grid; gap: 12px; min-width: 0; }
.project-detail-layout > .card { margin: 0; }
.project-detail-header { display: grid; gap: 15px; padding: 18px 20px; overflow: visible; }
.project-detail-header-top,
.project-detail-header-actions,
.project-detail-title-row,
.project-detail-progress-heading,
.project-detail-documents-heading,
.project-detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-detail-header-actions { justify-content: flex-end; }
.project-detail-header-top,
.project-detail-header-actions { flex-wrap: wrap; }
.project-detail-back { border: 0; padding: 5px 0; background: transparent; color: var(--lf-text-3); font: inherit; font-size: 12px; cursor: pointer; }
.project-detail-back:hover { color: var(--lf-primary); }
.project-detail-title-row { align-items: flex-start; }
.project-detail-title-copy { min-width: 0; }
.project-detail-title-copy h2 { margin: 0; color: var(--lf-text); font-size: 21px; line-height: 1.35; font-weight: 700; overflow-wrap: anywhere; }
.project-detail-language-pair { margin-top: 5px; color: var(--lf-text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.project-detail-language-pair span { margin: 0 6px; color: var(--lf-primary); }
.project-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid var(--lf-border); padding-top: 12px; color: var(--lf-text-3); font-size: 11px; line-height: 1.5; }
.project-detail-meta strong { margin-left: 4px; color: var(--lf-text-2); font-weight: 600; }
.project-detail-manager-actions { position: relative; }
.project-detail-manager-actions > summary { display: inline-flex; min-height: 34px; align-items: center; gap: 5px; border: 1px solid var(--lf-border); border-radius: 6px; padding: 0 10px; background: var(--lf-surface); color: var(--lf-text-2); font-size: 12px; font-weight: 600; list-style: none; cursor: pointer; }
.project-detail-manager-actions > summary::-webkit-details-marker { display: none; }
.project-detail-manager-actions > summary:hover,
.project-detail-manager-actions[open] > summary { border-color: var(--lf-primary-light); color: var(--lf-primary); }
.project-detail-manager-menu { position: absolute; z-index: 30; top: calc(100% + 5px); right: 0; display: grid; min-width: 172px; gap: 2px; border: 1px solid var(--lf-border); border-radius: 7px; padding: 5px; background: var(--lf-surface); box-shadow: 0 10px 25px rgba(15, 23, 42, .14); }
.project-detail-manager-menu button { width: 100%; border: 0; border-radius: 4px; padding: 9px 10px; background: transparent; color: var(--lf-text-2); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.project-detail-manager-menu button:hover { background: var(--lf-surface-2); color: var(--lf-primary); }
.project-detail-progress { min-height: 92px; padding: 15px 18px; }
.project-detail-progress-heading { margin-bottom: 8px; color: var(--lf-text-2); font-size: 12px; }
.project-detail-progress-heading strong { color: var(--lf-text); font-size: 13px; }
.project-detail-progress-heading > span { color: var(--lf-text-3); }
.project-detail-progress-heading b,
.project-detail-progress-counts b { color: var(--lf-text-2); font-variant-numeric: tabular-nums; }
.project-detail-progress-main { display: grid; grid-template-columns: minmax(0, 1fr) 52px; align-items: center; gap: 14px; }
.project-detail-progress-bar { min-width: 0; }
.project-detail-progress-bar .el-progress-bar__outer { background: var(--lf-surface-3); }
.project-detail-progress-percent { color: var(--lf-primary); font-size: 17px; text-align: right; font-variant-numeric: tabular-nums; }
.project-detail-progress-counts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 9px; color: var(--lf-text-3); font-size: 11px; }
.project-detail-progress-counts span:first-child b { color: #238457; }
.project-detail-progress-message { color: var(--lf-text-3); font-size: 12px; }
.project-detail-progress-message.is-error { color: var(--lf-danger); }
.project-detail-tabs { display: flex; min-width: 0; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--lf-border); scrollbar-width: none; }
.project-detail-tabs::-webkit-scrollbar { display: none; }
.project-detail-tab { position: relative; display: inline-flex; min-height: 42px; flex: 0 0 auto; align-items: center; gap: 7px; border: 0; border-bottom: 2px solid transparent; padding: 0 3px; background: transparent; color: var(--lf-text-3); font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap; }
.project-detail-tab:hover { color: var(--lf-primary); }
.project-detail-tab[aria-selected="true"] { border-bottom-color: var(--lf-primary); color: var(--lf-primary); font-weight: 650; }
.project-detail-tab > span { display: inline-grid; min-width: 19px; height: 19px; place-items: center; border-radius: 10px; padding: 0 5px; background: var(--lf-surface-3); color: var(--lf-text-3); font-size: 10px; }
.project-detail-tab:focus-visible,
.project-detail-manager-actions > summary:focus-visible,
.project-detail-manager-menu button:focus-visible,
.project-detail-cycle-filter button:focus-visible { outline: 3px solid color-mix(in srgb, var(--lf-primary) 30%, transparent); outline-offset: 2px; }
.project-detail-documents,
.project-detail-information,
.project-detail-activity,
.project-detail-assignment-history { min-width: 0; padding: 18px 20px; }
.project-detail-documents-heading { align-items: flex-start; margin-bottom: 14px; }
.project-detail-documents-heading h3,
.project-detail-section-heading h3 { margin: 0; color: var(--lf-text); font-size: 15px; line-height: 1.4; }
.project-detail-documents-heading p,
.project-detail-section-heading p { margin: 4px 0 0; color: var(--lf-text-3); font-size: 11px; line-height: 1.5; }
.project-detail-document-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.project-detail-document-search { display: flex; width: min(100%, 360px); min-height: 36px; align-items: center; gap: 8px; border: 1px solid var(--lf-border); border-radius: 6px; padding: 0 10px; background: var(--lf-surface); }
.project-detail-document-search:focus-within { border-color: var(--lf-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lf-primary) 12%, transparent); }
.project-detail-document-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--lf-text); font: inherit; font-size: 12px; }
.project-detail-document-search input::placeholder { color: var(--lf-text-4); }
.project-detail-cycle-filter { display: inline-flex; max-width: 100%; gap: 2px; border: 1px solid var(--lf-border); border-radius: 6px; padding: 3px; background: var(--lf-surface-2); }
.project-detail-cycle-filter button { min-height: 27px; border: 0; border-radius: 4px; padding: 0 9px; background: transparent; color: var(--lf-text-3); font: inherit; font-size: 11px; cursor: pointer; white-space: nowrap; }
.project-detail-cycle-filter button[aria-pressed="true"] { background: var(--lf-surface); color: var(--lf-primary); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); font-weight: 600; }
.project-detail-document-scroll { min-width: 0; overflow-x: auto; }
.project-detail-document-table { width: 100%; min-width: 650px; border-collapse: separate; border-spacing: 0; }
.project-detail-document-table th { height: 40px; border-bottom: 1px solid var(--lf-border); padding: 0 12px; background: var(--lf-surface-2); color: var(--lf-text-3); font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; }
.project-detail-document-table td { min-height: 56px; border-bottom: 1px solid var(--lf-border); padding: 10px 12px; color: var(--lf-text-2); font-size: 12px; vertical-align: middle; }
.project-detail-document-table tbody tr:last-child td { border-bottom: 0; }
.project-detail-document-table td:first-child strong { display: inline-block; max-width: min(480px, 100%); color: var(--lf-text); font-size: 12px; overflow-wrap: anywhere; }
.project-document-cycle-badge { display: inline-flex; margin-left: 8px; border-radius: 10px; padding: 2px 7px; background: var(--lf-surface-3); color: var(--lf-text-3); font-size: 10px; white-space: nowrap; }
.project-detail-document-actions { display: flex; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.project-detail-document-actions .native-btn { width: auto; min-height: 30px; padding: 0 8px; font-size: 11px; }
.project-detail-document-actions .is-danger { color: var(--lf-danger); }
.project-detail-documents-empty { border: 1px dashed var(--lf-border); border-radius: 6px; padding: 28px 16px; color: var(--lf-text-3); font-size: 12px; text-align: center; }
.project-detail-information { display: grid; gap: 16px; }
.project-detail-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.project-detail-info-grid > div { min-width: 0; }
.project-detail-info-grid dt { margin-bottom: 4px; color: var(--lf-text-4); font-size: 10px; }
.project-detail-info-grid dd { margin: 0; color: var(--lf-text-2); font-size: 12px; overflow-wrap: anywhere; }
.project-detail-info-grid .project-detail-description { grid-column: 1 / -1; }
.project-detail-description dd { white-space: pre-wrap; }
.project-detail-language-asset { display: grid; gap: 7px; border-top: 1px solid var(--lf-border); padding-top: 14px; }
.project-detail-language-asset > label { color: var(--lf-text-2); font-size: 12px; font-weight: 600; }
.project-detail-language-asset-controls { display: flex; gap: 8px; }
.project-detail-language-asset-controls select { flex: 1; min-width: 0; }
.project-detail-language-asset p,
.project-detail-language-asset-readonly { margin: 0; color: var(--lf-text-3); font-size: 11px; }
.project-detail-manager-section { border-top: 1px solid var(--lf-border); padding-top: 16px; margin-top: 2px; }
.project-detail-notifications { padding: 2px 0; }
.project-detail-activity .card-title { color: var(--lf-text); font-size: 14px; }
.project-detail-dialog { width: min(700px, calc(100vw - 48px)); }
.project-assignment-dialog { width: min(640px, calc(100vw - 48px)); }
.project-edit-dialog { width: min(760px, calc(100vw - 48px)); }
.project-detail-dialog .project-dialog-body { padding-top: 18px; }
.project-detail-dialog .project-form-section > h3 { margin-bottom: 13px; }
.project-detail-dialog .project-form-section:last-child { margin-bottom: 0; }
.project-detail-dialog .project-field > span { color: var(--lf-text-2); font-size: 12px; line-height: 1.4; font-weight: 600; }
.project-detail-dialog .project-primary-action { min-width: 110px; min-height: 38px; }
.project-detail-dialog .project-dialog-secondary { min-width: 64px; flex: 0 0 auto; white-space: nowrap; }
.project-detail-edit-assets { margin-top: 16px; }
.project-detail-edit-assets > label { color: var(--lf-text-2); font-size: 12px; font-weight: 600; }
.project-detail-edit-assets p,
.project-detail-dialog-status,
.project-detail-dialog-note,
.project-field-hint { margin: 0; color: var(--lf-text-3); font-size: 11px; line-height: 1.55; }
.project-detail-dialog-note { margin-bottom: 14px; border-left: 3px solid var(--lf-primary-light); padding: 8px 10px; background: var(--lf-surface-2); }
.project-field-hint { margin-top: 10px; }
.project-detail-dialog input[type="file"] { min-height: 42px; padding: 7px 9px; }
.project-detail-dialog:focus { outline: none; }
.project-detail-dialog button:focus-visible,
.project-detail-dialog input:focus-visible,
.project-detail-dialog select:focus-visible,
.project-detail-dialog textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--lf-primary) 28%, transparent); outline-offset: 2px; }

@media (max-width: 680px) {
  .project-detail-layout { gap: 9px; }
  .project-detail-header,
  .project-detail-documents,
  .project-detail-information,
  .project-detail-activity,
  .project-detail-assignment-history { padding: 14px; }
  .project-detail-header { gap: 12px; }
  .project-detail-header-top { align-items: flex-start; }
  .project-detail-header-actions { gap: 6px; }
  .project-detail-title-copy h2 { font-size: 18px; }
  .project-detail-meta { gap: 6px 13px; }
  .project-detail-manager-menu { position: absolute; top: calc(100% + 5px); right: 0; min-width: min(220px, calc(100vw - 24px)); }
  .project-detail-progress { min-height: 0; padding: 13px 14px; }
  .project-detail-tabs { gap: 18px; }
  .project-detail-document-filters { align-items: stretch; flex-direction: column; }
  .project-detail-document-search { width: auto; }
  .project-detail-cycle-filter { width: 100%; }
  .project-detail-cycle-filter button { flex: 1; padding: 0 5px; }
  .project-detail-document-table { display: block; min-width: 0; }
  .project-detail-document-table thead { display: none; }
  .project-detail-document-table tbody { display: grid; gap: 8px; }
  .project-detail-document-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; border: 1px solid var(--lf-border); border-radius: 6px; padding: 12px; background: var(--lf-surface); }
  .project-detail-document-table td { display: flex; min-width: 0; min-height: 0; align-items: center; justify-content: space-between; gap: 8px; border: 0; padding: 0; font-size: 11px; }
  .project-detail-document-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--lf-text-4); font-size: 10px; }
  .project-detail-document-table td:first-child { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .project-detail-document-table td:first-child::before { flex-basis: 100%; }
  .project-detail-document-actions { grid-column: 1 / -1; justify-content: flex-end !important; border-top: 1px solid var(--lf-border) !important; padding-top: 8px !important; }
  .project-detail-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .project-detail-dialog,
  .project-assignment-dialog,
  .project-edit-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .project-detail-dialog .project-dialog-header { padding: 16px 17px 13px; }
  .project-detail-dialog .project-dialog-body { padding: 15px 17px 18px; }
  .project-detail-dialog .project-dialog-footer { padding: 10px 17px; }
  .project-detail-language-asset-controls { align-items: stretch; flex-direction: column; }
  .project-detail-language-asset-controls .native-btn { width: auto; align-self: flex-start; }
}
