:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #172126;
  --muted: #65737c;
  --line: #d8e0e4;
  --accent: #1b7f83;
  --accent-dark: #0f5e62;
  --table-head: #17677f;
  --table-head-text: #ffffff;
  --row-a: #cbd2d7;
  --row-b: #e2e6e9;
  --sidebar-bg: #10211c;
  --sidebar-text: #ffffff;
  --sidebar-muted: #c4e6da;
  --amber: #d68a1f;
  --green: #3f8f51;
  --rose: #b95d68;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15191c;
  --panel: #23292d;
  --text: #edf3f5;
  --muted: #a9b4bb;
  --line: #3a444b;
  --accent: #6eb7bd;
  --accent-dark: #93d1d5;
  --table-head: #303a40;
  --table-head-text: #f4f8f9;
  --row-a: #2d353a;
  --row-b: #242b30;
  --sidebar-bg: #0c0e10;
  --sidebar-text: #f4f8f9;
  --sidebar-muted: #aeb8bf;
}

body[data-theme="celeste"] {
  --bg: #eef8fc;
  --panel: #ffffff;
  --text: #132733;
  --muted: #5b7482;
  --line: #c7dfe9;
  --accent: #1687b5;
  --accent-dark: #0f658d;
  --table-head: #156d92;
  --table-head-text: #ffffff;
  --row-a: #d4e8f1;
  --row-b: #edf6fa;
  --sidebar-bg: #0e3448;
  --sidebar-text: #ffffff;
  --sidebar-muted: #b9e4f4;
}

body[data-theme="warm"] {
  --bg: #fff7f0;
  --panel: #ffffff;
  --text: #2a211a;
  --muted: #756657;
  --line: #ead9c9;
  --accent: #c46425;
  --accent-dark: #904416;
  --table-head: #9d4f1e;
  --table-head-text: #ffffff;
  --row-a: #efd8c5;
  --row-b: #faeee4;
  --sidebar-bg: #3a2416;
  --sidebar-text: #fff7f0;
  --sidebar-muted: #f2c49d;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 24px;
}

.topbar {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 1260px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.page-title {
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
  margin: 0;
  text-transform: none;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
  margin: 0;
}

.tabs {
  background: #e6ecef;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  padding: 4px;
}

.module-nav {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.module-nav a {
  background: #e6ecef;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  min-height: 38px;
  padding: 9px 12px;
  text-decoration: none;
}

.module-nav a.active {
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(21, 35, 42, 0.12);
}

.tab {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  min-width: 92px;
  padding: 10px 14px;
}

.tab.active {
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(21, 35, 42, 0.12);
}

.toolbar {
  margin: 0 auto 18px;
  max-width: 1260px;
}

.primary-action,
.secondary-action,
.icon-action {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 0 14px;
}

.primary-action {
  background: var(--accent);
  color: white;
}

.icon-primary-action {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 1.7rem;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  line-height: 1;
  min-width: 44px;
  padding: 0;
  width: 44px;
}

.secondary-action {
  background: #e6ecef;
  color: var(--text);
}

.icon-action {
  align-items: center;
  background: #e6ecef;
  color: var(--text);
  display: inline-flex;
  font-size: 1rem;
  justify-content: center;
  min-width: 42px;
  padding: 0;
}

.circle-action {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 600;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.circle-action:disabled {
  background: #c8d2d7;
  cursor: not-allowed;
}

.task-form,
.filter-form {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1.4fr 0.9fr 150px 150px 150px 90px 160px;
  padding: 12px;
}

.task-form input,
.task-form select,
.filter-form input,
.filter-form select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
  width: 100%;
}

.task-form select,
.filter-form select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 18px,
    calc(100% - 12px) 18px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
  cursor: pointer;
  padding-right: 34px;
}

.task-form select:focus,
.filter-form select:focus,
.task-form input:focus,
.filter-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
  outline: none;
}

.task-form button,
.filter-form button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 0 14px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(18, 31, 38, 0.45);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 10;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: var(--panel);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 31, 39, 0.28);
  --modal-pad: 18px;
  max-height: calc(100vh - 48px);
  max-width: 980px;
  overflow: auto;
  width: min(980px, 100%);
}

.modal-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: var(--modal-pad);
}

.modal-header h2 {
  font-size: 1.35rem;
  margin: 0;
}

.proposal-form {
  padding: var(--modal-pad);
}

.proposal-tab-modal {
  max-width: min(980px, calc(100vw - 24px));
  width: min(980px, calc(100vw - 24px));
}

.proposal-tab-form {
  display: grid;
  gap: 14px;
}

.proposal-tabs {
  background: #eef3f5;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px;
}

.proposal-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  min-height: 38px;
  padding: 0 10px;
  text-transform: uppercase;
}

.proposal-tab.active {
  background: white;
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(15, 31, 39, 0.06);
  color: var(--ink);
}

.proposal-tab-panel {
  display: none;
}

.proposal-tab-panel.active {
  display: block;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid label {
  display: grid;
  gap: 6px;
}

.form-grid .wide {
  grid-column: span 3;
}

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

.mirror-top-grid {
  margin-bottom: 12px;
}

.proposal-cost-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: min(52vh, 520px);
  overflow: auto;
}

.proposal-cost-table {
  border-collapse: collapse;
  width: 100%;
}

.proposal-cost-table th,
.proposal-cost-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 0.84rem;
  padding: 7px 8px;
  text-align: left;
}

.proposal-cost-table th {
  background: #dfe8ec;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.proposal-cost-table th:nth-child(2),
.proposal-cost-table th:nth-child(3),
.proposal-cost-table td:nth-child(2),
.proposal-cost-table td:nth-child(3) {
  text-align: right;
  width: 150px;
}

.proposal-cost-table th:last-child,
.proposal-cost-table td:last-child {
  border-right: 0;
}

.proposal-cost-summary td {
  background: #a9cbe9;
  color: #061724;
  font-weight: 900;
  text-transform: uppercase;
}

.proposal-cost-summary.strong td,
.proposal-cost-summary.final td {
  background: #5c9bd8;
}

.proposal-cost-spacer td {
  background: white;
  height: 14px;
  padding: 0;
}

.proposal-cost-input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 32px;
  padding: 0 8px;
  text-align: right;
  width: 100%;
}

.form-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  min-width: 0;
  padding: 9px 11px;
  resize: vertical;
  width: 100%;
}

.person-select-preview {
  align-items: center;
  background: color-mix(in srgb, var(--bg) 78%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 9px;
  min-height: 42px;
  padding: 7px 10px;
}

.person-select-preview img {
  border-radius: 999px;
  height: 30px;
  object-fit: cover;
  width: 30px;
}

.person-select-preview span {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.person-select-preview small {
  color: var(--muted);
  margin-left: auto;
}

.customer-modal {
  max-width: 1188px;
  padding: 0;
  width: min(1188px, calc(100vw - 48px));
}

.customer-form {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 0;
}

.customer-logo-panel {
  background: var(--table-head);
  color: var(--table-head-text);
  min-height: 560px;
  padding: 12px;
  position: relative;
}

.customer-logo-frame {
  align-items: center;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(11, 31, 41, 0.25);
  display: flex;
  height: 146px;
  justify-content: center;
  overflow: hidden;
}

.customer-logo-frame img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.customer-logo-upload {
  align-items: center;
  background: #1c9bd0;
  border: 2px solid #0d5065;
  border-radius: 999px;
  box-shadow: 0 7px 14px rgba(11, 31, 41, 0.25);
  color: white;
  cursor: pointer;
  display: inline-flex;
  height: 48px;
  justify-content: center;
  position: absolute;
  right: 26px;
  top: 128px;
  width: 48px;
}

.customer-logo-upload input {
  display: none;
}

.customer-logo-upload svg {
  fill: none;
  height: 24px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
  width: 24px;
}

.customer-logo-panel strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.25;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.customer-logo-contact {
  color: rgba(255, 255, 255, 0.86);
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.customer-modal-main {
  min-width: 0;
}

.customer-modal-main .modal-header {
  padding: 18px 20px;
}

.customer-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 20px;
}

.customer-form-grid .customer-trade-field {
  grid-column: span 1;
}

.customer-form-grid .customer-legal-field {
  grid-column: span 2;
}

.customer-partners-field {
  grid-column: span 1;
}

.customer-notes-field {
  grid-column: span 2;
}

.customer-partners-field textarea,
.customer-notes-field textarea {
  min-height: 68px;
}

.customer-form .modal-actions {
  border-top: 1px solid var(--line);
  padding: 14px 8px 8px;
}

.prospect-form .customer-modal-main .modal-header {
  padding: 10px 12px;
}

.prospect-form-grid {
  gap: 10px;
  padding: 8px;
}

.prospect-form {
  height: min(700px, calc(100vh - 48px));
  max-height: calc(100vh - 48px);
  min-height: 0;
}

.prospect-section-title {
  color: var(--table-head);
  font-size: 0.78rem;
  font-weight: 900;
  margin: 2px 0 -4px;
  text-transform: uppercase;
}

.prospect-form .modal-actions {
  margin: 0 8px 8px;
  padding: 10px 0 0;
}

.prospect-form .customer-logo-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.prospect-form .customer-modal-main {
  min-height: 0;
  overflow: auto;
}

.prospect-image-gallery {
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr);
  margin-top: 12px;
  min-height: 0;
  overflow: hidden;
  padding: 8px;
}

.prospect-image-gallery-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.prospect-image-gallery-header strong {
  font-size: 0.86rem;
  margin: 0;
}

.prospect-image-add {
  align-items: center;
  background: #1c9bd0;
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.prospect-image-add input {
  display: none;
}

.prospect-image-add svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
  width: 19px;
}

.prospect-image-list {
  align-content: start;
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 3px;
}

.prospect-image-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  cursor: zoom-in;
  min-height: 116px;
  overflow: hidden;
  position: relative;
}

.prospect-image-card img {
  display: block;
  height: 128px;
  object-fit: cover;
  width: 100%;
}

.prospect-image-card .icon-button {
  background: rgba(255, 255, 255, 0.94);
  position: absolute;
  right: 7px;
  top: 7px;
}

.prospect-image-empty {
  align-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  justify-content: center;
  min-height: 110px;
  padding: 14px;
  text-align: center;
}

.reference-box {
  align-items: stretch;
  background: #f3f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 280px minmax(0, 1fr);
  min-width: 0;
  padding: 12px;
  width: 100%;
}

.reference-panel {
  align-content: start;
  display: grid;
  gap: 10px;
}

.reference-box p {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

.reference-actions {
  display: flex;
  gap: 8px;
}

.color-picker-wrap {
  align-items: center;
  background: color-mix(in srgb, var(--bg) 70%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 8px;
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.color-swatch-button {
  background: var(--swatch);
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  height: 24px;
  width: 24px;
}

.color-swatch-button.active {
  border-color: var(--text);
  box-shadow: 0 0 0 2px var(--panel);
}

.custom-color-field {
  align-items: center;
  display: inline-flex !important;
  gap: 6px !important;
  margin-left: auto;
}

.custom-color-field span {
  font-size: 0.72rem;
}

.custom-color-field input {
  border: 0;
  cursor: pointer;
  height: 28px;
  min-height: 28px;
  padding: 0;
  width: 36px;
}

.reference-grid {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 128px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
}

.reference-grid-head,
.reference-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 88px;
}

.reference-grid-head {
  background: #e6ecef;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.reference-grid-head span,
.reference-row > span {
  align-items: center;
  border-right: 1px solid var(--line);
  display: flex;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
}

.reference-grid-head span:last-child,
.reference-row > span:last-child {
  border-right: 0;
}

.reference-list {
  display: grid;
}

.reference-row {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.reference-row small {
  display: block;
  font-size: 0.72rem;
}

.reference-row > span:nth-child(2) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-row-actions {
  gap: 6px;
  justify-content: center;
}

.reference-empty {
  color: var(--muted);
  font-size: 0.84rem;
  padding: 14px;
}

.modal-actions {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
  padding: 14px 8px 8px;
}

.progress-modal {
  max-width: 860px;
}

.progress-editor {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.progress-item-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 120px 120px;
}

.progress-item-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
}

.progress-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.progress-grid-head,
.progress-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 96px 96px;
}

.progress-grid-head {
  background: #e6ecef;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.progress-grid-head span,
.progress-row > span {
  align-items: center;
  border-right: 1px solid var(--line);
  display: flex;
  min-width: 0;
  overflow: hidden;
  padding: 8px;
}

.progress-grid-head span:last-child,
.progress-row > span:last-child {
  border-right: 0;
}

.progress-row {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-row > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-row-actions {
  gap: 6px;
  justify-content: center;
}

.progress-empty {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 14px;
}

.progress-summary {
  align-items: center;
  background: #f3f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px;
}

.progress-summary span {
  color: var(--muted);
  font-weight: 800;
}

.progress-summary strong {
  color: var(--accent-dark);
  font-size: 1.4rem;
}

.deliverables-modal {
  max-width: min(900px, calc(100vw - 24px));
  width: min(900px, calc(100vw - 24px));
}

.deliverables-editor,
.sheet-workspace {
  padding: var(--modal-pad);
}

.deliverables-toolbar,
.sheet-search-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  margin-bottom: 12px;
}

.deliverables-toolbar input,
.sheet-search-form input,
.sheet-search-form select,
.simple-grid input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.simple-grid-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.simple-grid {
  border-collapse: collapse;
  width: 100%;
}

.simple-grid th,
.simple-grid td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-size: 0.84rem;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.simple-grid th {
  background: #dfe8ec;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.simple-grid td:last-child,
.simple-grid th:last-child {
  border-right: 0;
}

.simple-grid tr:last-child td {
  border-bottom: 0;
}

.simple-grid tbody tr.selected-row td {
  background: #fff2d6;
}

.sheet-backdrop {
  padding: 8px;
}

.sheet-modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 16px);
  max-height: calc(100vh - 16px);
  max-width: calc(100vw - 16px);
  overflow: hidden;
  width: calc(100vw - 16px);
}

.sheet-modal .modal-header {
  gap: 16px;
}

.sheet-total-summary {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 12px;
  justify-content: flex-end;
  min-width: 0;
}

.sheet-total-summary span {
  background: #f3f6f7;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  padding: 8px 10px;
  white-space: nowrap;
}

.sheet-total-summary strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.sheet-workspace {
  display: grid;
  grid-template-rows: minmax(260px, 0.95fr) minmax(260px, 1.05fr);
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.sheet-upper,
.sheet-lower {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sheet-upper {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.sheet-detail-grid {
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

.sheet-grid-wrap {
  height: 100%;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
}

.sheet-grid-wrap .simple-grid {
  min-width: 1280px;
}

.sheet-grid-wrap .simple-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.sheet-entry-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 90px 90px minmax(320px, 1fr) 96px 120px 130px 130px minmax(145px, auto);
}

.sheet-entry-form label {
  color: var(--ink);
  display: grid;
  font-size: 0.76rem;
  font-weight: 900;
  gap: 4px;
  text-transform: uppercase;
}

.sheet-entry-form input,
.sheet-entry-form select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.sheet-entry-form input:disabled,
.sheet-entry-form input[readonly] {
  background: #f3f6f7;
  color: var(--muted);
}

.sheet-entry-form .primary-action {
  min-height: 38px;
  min-width: 145px;
  white-space: nowrap;
}

.sheet-row-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  min-width: 74px;
}

.sheet-service-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  min-width: 76px;
}

.sheet-service-actions .icon-button {
  font-size: 0.72rem;
  font-weight: 900;
  width: 34px;
}

.sheet-entry-service {
  min-width: 0;
}

.sheet-stage-row td {
  font-weight: 900;
}

.sheet-tabs {
  margin-bottom: 0;
}

.sheet-search-form {
  grid-template-columns: minmax(260px, 1fr) 150px 110px 210px;
  margin: 12px 0;
}

.composition-grid th:nth-child(3),
.composition-grid td:nth-child(3) {
  min-width: 320px;
}

.view {
  display: none;
  margin: 0 auto;
  max-width: 1260px;
}

.view.active {
  display: block;
}

.budget-sheets-view {
  max-width: 1320px;
}

.budget-sheets-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.budget-sheets-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.budget-sheets-header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.budget-sheets-header h2 {
  margin: 2px 0 0;
}

.budget-sheet-filter-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 0.9fr) 180px auto;
}

.budget-sheet-filter-form input,
.budget-sheet-filter-form select,
.budget-sheet-transfer-form input,
.budget-sheet-transfer-form select,
.sheet-meta-modal input,
.sheet-meta-modal select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  width: 100%;
}

.budget-sheet-manager-grid {
  max-height: calc(100vh - 250px);
  overflow: auto;
}

.budget-sheet-manager-grid .simple-grid {
  min-width: 1180px;
}

.budget-sheet-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.budget-sheet-actions .icon-button {
  padding: 0 8px;
  width: auto;
}

.status-chip {
  background: #edf3f5;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 4px 8px;
}

.sheet-meta-modal {
  max-width: 760px;
}

.budget-sheet-transfer-modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 24px);
  max-width: min(1280px, calc(100vw - 32px));
  overflow: hidden;
  width: min(1280px, calc(100vw - 32px));
}

.budget-sheet-transfer-form {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: var(--modal-pad);
}

.transfer-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.transfer-section h3 {
  margin: 2px 0 0;
}

.transfer-column-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.transfer-line-grid.compact {
  align-items: end;
  grid-template-columns: minmax(220px, 0.8fr) minmax(150px, 190px) minmax(150px, 200px) minmax(260px, 1fr) auto;
}

.transfer-line-grid label,
.transfer-column-grid label {
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 6px;
}

.transfer-column-grid label.is-disabled {
  opacity: 0.55;
}

.transfer-line-grid label.wide {
  grid-column: span 1;
}

.transfer-preview-section {
  min-height: 260px;
}

.budget-sheet-import-preview-wrap {
  max-height: 320px;
  min-height: 220px;
  overflow: auto;
}

.budget-sheet-import-preview-grid {
  min-width: 1180px;
}

.grid-sort-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.toggle-inline {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 38px;
}

.toggle-inline input {
  width: auto;
}

.workspace-shell .view {
  max-width: none;
}

.embedded-module {
  background: transparent;
  height: 100vh;
  max-width: 100vw;
  overflow: hidden;
  width: 100vw;
}

.embedded-module .app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 100vw;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  width: 100vw;
}

.embedded-module .topbar {
  display: none;
}

.embedded-module .toolbar {
  box-sizing: border-box;
  flex: 0 0 auto;
  margin: 0 0 18px;
  max-width: none;
  width: 100%;
}

.embedded-module.budget-sheets-active .toolbar {
  display: none;
}

.embedded-module .view {
  box-sizing: border-box;
  max-width: none;
  width: 100%;
}

.embedded-module #kanban-view.active {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  width: 100%;
}

.embedded-module .kanban-board {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: hidden;
}

.embedded-module .kanban-scroll-area {
  flex: 1 1 auto;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.embedded-module .gantt-wrap {
  height: calc(100vh - 84px);
  overflow: auto;
}

.kanban-board {
  display: flex;
  gap: 14px;
  min-width: max-content;
}

.kanban-scroll-area {
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: 8px;
  width: 100%;
}

.column {
  background: #ebeff1;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex: 0 0 350px;
  flex-direction: column;
  min-height: 520px;
  overflow: hidden;
  padding: 12px;
}

.column-header {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  justify-content: space-between;
  margin-bottom: 12px;
}

.column-card-list {
  align-content: start;
  align-items: start;
  display: grid;
  gap: 10px;
  grid-auto-rows: max-content;
}

.column-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.count {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8rem;
  min-width: 30px;
  padding: 4px 8px;
  text-align: center;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(33, 48, 56, 0.08);
  cursor: grab;
  padding: 12px;
  align-self: start;
}

.card.proposal-type-public {
  border-left-color: #d94c4c;
}

.card.proposal-type-private {
  border-left-color: #2f80d9;
}

.card.proposal-type-corporate {
  border-left-color: #e0b526;
}

.card.proposal-type-internal {
  border-left-color: #3f9b58;
}

.card.dragging {
  opacity: 0.5;
}

.card h3 {
  font-size: 1rem;
  line-height: 1.25;
  margin: 0 0 8px;
}

.meta {
  color: var(--muted);
  display: grid;
  font-size: 0.86rem;
  gap: 4px;
}

.date-flow {
  color: var(--ink);
  font-weight: 700;
}

.card-metrics {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.progress {
  background: #e6ecef;
  border-radius: 999px;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.progress span {
  background: var(--green);
  display: block;
  height: 100%;
}

.schedule {
  align-items: center;
  background: #f3f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
  padding: 8px 9px;
}

.schedule div {
  align-items: center;
  display: flex;
}

.schedule span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.schedule strong {
  font-size: 0.9rem;
}

.schedule-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  padding: 5px 8px;
  text-align: center;
}

.schedule-pill.ok {
  background: #e2f2e5;
  color: #2e6e3e;
}

.schedule.late {
  background: #fff4e5;
  border-color: #edc079;
}

.schedule-pill.late {
  background: #f7d9ac;
  color: #7a4a05;
}

.progress-control {
  margin-top: 12px;
}

.progress-control input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-width: 0;
  padding: 8px;
  width: 100%;
}

.card-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 10px;
}

.card-actions .icon-button {
  height: 39px;
  width: 39px;
}

.card-audit-line {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions .schedule-pill {
  margin-right: auto;
}

.icon-button {
  align-items: center;
  background: #eef3f4;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.icon-button svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.icon-button:hover {
  background: #e3ebed;
  color: var(--text);
}

.delete-action {
  color: var(--rose);
}

.gantt-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.gantt-header,
.gantt-row {
  display: grid;
  grid-template-columns: 240px minmax(680px, 1fr);
}

.gantt-header {
  background: #e6ecef;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

.gantt-header span,
.gantt-label {
  border-right: 1px solid var(--line);
  padding: 12px;
}

.gantt-row {
  border-top: 1px solid var(--line);
  min-height: 58px;
}

.gantt-label strong {
  display: block;
  font-size: 0.93rem;
  margin-bottom: 4px;
}

.gantt-label span {
  color: var(--muted);
  font-size: 0.8rem;
}

.timeline {
  min-width: 680px;
  padding: 14px 12px;
  position: relative;
}

.bar {
  align-items: center;
  background: #cfe7e5;
  border: 1px solid #9bc9c6;
  border-radius: 6px;
  color: #0d4c50;
  display: flex;
  font-size: 0.78rem;
  font-weight: 800;
  height: 30px;
  min-width: 34px;
  overflow: hidden;
  position: absolute;
  top: 14px;
}

.bar-progress {
  background: rgba(27, 127, 131, 0.35);
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
}

.bar span {
  padding-left: 8px;
  position: relative;
  white-space: nowrap;
}

.contract-toolbar {
  display: grid;
  gap: 10px;
  max-width: none;
}

.contracts-page {
  height: 100vh;
  overflow: hidden;
}

.master-layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr) 360px;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  transition: grid-template-columns 0.2s ease;
}

.master-layout.left-collapsed {
  grid-template-columns: 64px minmax(0, 1fr) 360px;
}

.master-layout.right-collapsed {
  grid-template-columns: 276px minmax(0, 1fr) 56px;
}

.master-layout.left-collapsed.right-collapsed {
  grid-template-columns: 64px minmax(0, 1fr) 56px;
}

.master-layout.communication-disabled,
.master-layout.communication-disabled.right-collapsed {
  grid-template-columns: 276px minmax(0, 1fr);
}

.master-layout.communication-disabled.left-collapsed,
.master-layout.communication-disabled.left-collapsed.right-collapsed {
  grid-template-columns: 64px minmax(0, 1fr);
}

.master-layout.communication-disabled .communication-sidebar,
.communication-sidebar[hidden],
[hidden].communication-sidebar {
  display: none !important;
}

.master-sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 16px;
  position: relative;
}

.collapse-action {
  align-items: center;
  background: #e8eef1;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.6rem;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: -17px;
  top: 18px;
  width: 34px;
  z-index: 8;
}

.collapse-action.right {
  left: -17px;
  right: auto;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  min-height: 48px;
}

.brand-mark {
  align-items: center;
  background: #f4f2e8;
  border-radius: 8px;
  color: var(--sidebar-bg);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.brand-block strong,
.brand-block small {
  display: block;
}

.brand-block small {
  color: var(--sidebar-muted);
  font-size: 0.85rem;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav-item,
.side-exit {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--sidebar-text);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  width: 100%;
}

.side-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.side-nav-item.active {
  background: rgba(255, 255, 255, 0.12);
}

.menu-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 28px;
}

.document-menu-icon::before {
  border: 2px solid currentColor;
  border-radius: 3px;
  box-sizing: border-box;
  content: "";
  display: block;
  height: 17px;
  width: 14px;
}

.document-menu-icon::after {
  background: currentColor;
  box-shadow: 0 4px 0 currentColor, 0 8px 0 currentColor;
  content: "";
  display: block;
  height: 2px;
  margin-left: -10px;
  width: 7px;
}

.disabled-menu-item {
  cursor: not-allowed;
  opacity: 0.58;
}

.disabled-menu-item .accordion-arrow {
  visibility: hidden;
}

.menu-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accordion-arrow {
  color: var(--sidebar-muted);
  font-size: 1rem;
  transition: transform 0.22s ease;
}

.side-accordion.open .accordion-arrow {
  transform: rotate(180deg);
}

.submenu {
  display: grid;
  gap: 4px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-left: 14px;
  transition: max-height 0.25s ease, opacity 0.2s ease, padding-top 0.25s ease;
}

.side-accordion.open .submenu {
  max-height: 320px;
  opacity: 1;
  padding-top: 6px;
}

.submenu-item {
  color: var(--sidebar-muted);
  font-size: 0.94rem;
  min-height: 38px;
}

.submenu-item .menu-icon {
  font-size: 0.78rem;
}

.side-exit {
  margin-top: auto;
}

.master-layout.left-collapsed .brand-block div,
.master-layout.left-collapsed .menu-label,
.master-layout.left-collapsed .accordion-arrow,
.master-layout.left-collapsed .submenu,
.master-layout.left-collapsed .side-exit {
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.master-layout.left-collapsed .side-nav-item {
  gap: 0;
  grid-template-columns: 28px 0 0;
  justify-content: center;
  padding-left: 9px;
  padding-right: 9px;
}

.master-layout.left-collapsed .master-sidebar {
  padding-left: 9px;
  padding-right: 9px;
}

.workspace-shell {
  background: var(--bg);
  display: block;
  min-height: 0;
  overflow: hidden;
  padding: 28px 24px;
}

.workspace-heading {
  margin-bottom: 24px;
}

.workspace-heading h1 {
  font-size: 1.9rem;
}

.compact-heading {
  margin-bottom: 14px;
}

.embedded-module-view {
  height: 100%;
}

.workspace-frame {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  height: calc(100vh - 132px);
  overflow: hidden;
  width: 100%;
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.metric-card,
.dashboard-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.metric-card span,
.dashboard-list span {
  color: var(--muted);
}

.metric-card strong {
  font-size: 2rem;
}

.dashboard-panels {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-executive-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.dashboard-financial-board {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dashboard-side-panels {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.dashboard-panel {
  padding: 18px;
}

.financial-chart-panel {
  min-height: 270px;
}

.compact-dashboard-panel {
  min-height: 0;
}

.chart-panel-heading {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chart-panel-heading h2 {
  margin-bottom: 0;
}

.chart-note {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
}

.dashboard-panel h2,
.notification-panel h2,
.chat-panel h2 {
  font-size: 1.05rem;
  margin: 0 0 14px;
}

.dashboard-list {
  display: grid;
  gap: 10px;
}

.dashboard-list div {
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.proposal-flow-config-form {
  align-items: end;
  background: color-mix(in srgb, var(--bg) 78%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  margin: 14px 0;
  padding: 12px;
}

.proposal-flow-config-form label {
  display: grid;
  gap: 6px;
}

.proposal-flow-config-form span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.proposal-flow-config-form select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  min-width: 0;
  padding: 9px 11px;
  width: 100%;
}

.compact-dashboard-list div {
  padding: 9px 10px;
}

.dashboard-bar-chart {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 2.25fr) minmax(260px, 1fr);
  min-height: 190px;
}

.dashboard-chart-bars-panel {
  display: grid;
  gap: 10px;
  grid-template-columns: 56px minmax(0, 1fr);
  min-width: 0;
}

.dashboard-chart-scale {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  font-weight: 700;
  justify-content: space-between;
  padding: 8px 0 26px;
  text-align: right;
}

.dashboard-chart-bars {
  align-items: end;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(12, minmax(38px, 1fr));
  min-height: 156px;
  padding: 8px 8px 0;
}

.dashboard-chart-month {
  align-items: stretch;
  display: grid;
  gap: 6px;
  grid-template-rows: minmax(118px, 1fr) 20px;
  height: 100%;
  min-width: 0;
}

.dashboard-chart-column {
  align-self: end;
  border-radius: 6px 6px 0 0;
  display: flex;
  justify-content: center;
  min-height: 4px;
  position: relative;
}

.dashboard-chart-column span {
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  color: #1b4c5f;
  font-size: 0.72rem;
  font-weight: 800;
  left: 50%;
  line-height: 1;
  padding: 2px 5px;
  position: absolute;
  text-shadow: none;
  top: -16px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.dashboard-chart-month.realized .dashboard-chart-column {
  background: #4f9a60;
}

.dashboard-chart-month.current .dashboard-chart-column {
  background: #2f8eb8;
}

.dashboard-chart-month.future .dashboard-chart-column {
  background: #fff;
  border: 2px solid #2f8eb8;
}

.dashboard-chart-month.future .dashboard-chart-column span {
  color: #2f6173;
  text-shadow: none;
}

.dashboard-chart-month strong {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.dashboard-chart-legend {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8rem;
  font-weight: 700;
  gap: 12px;
  grid-column: 2;
}

.dashboard-pie-panel {
  align-content: start;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-left: 14px;
}

.dashboard-pie-panel > strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.dashboard-pie {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 152px;
  position: relative;
  width: min(152px, 100%);
}

.dashboard-pie::after {
  background: var(--panel);
  border-radius: 50%;
  content: "";
  inset: 30%;
  position: absolute;
}

.dashboard-pie span {
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 900;
  position: relative;
  text-align: center;
  z-index: 1;
}

.dashboard-pie-list {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.dashboard-pie-list div {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.dashboard-pie-list i {
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.dashboard-pie-list span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-pie-list strong {
  color: var(--text);
  font-size: 0.75rem;
}

.dashboard-pie-empty {
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  min-height: 118px;
  justify-content: center;
}

.dashboard-chart-legend span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
}

.dashboard-chart-legend i {
  border-radius: 3px;
  display: inline-block;
  height: 10px;
  width: 16px;
}

.dashboard-chart-legend .realized {
  background: #4f9a60;
}

.dashboard-chart-legend .current {
  background: #2f8eb8;
}

.dashboard-chart-legend .future {
  background: #fff;
  border: 2px solid #2f8eb8;
}

.empty-chart {
  align-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-weight: 700;
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 170px;
}

.finance-manager {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  min-height: calc(100vh - 142px);
  overflow: hidden;
  padding: 12px;
}

.finance-filter-form {
  grid-template-columns: minmax(240px, 1.5fr) minmax(150px, 0.8fr) minmax(180px, 1fr) auto 44px;
  margin-bottom: 12px;
  max-width: none;
  width: 100%;
}

.finance-grid-wrap {
  max-height: calc(100vh - 270px);
  overflow: auto;
}

.attachment-summary {
  background: #eef4f6;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
}

.settings-manager {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: calc(100vh - 142px);
  overflow: hidden;
}

.settings-tabs {
  background: color-mix(in srgb, var(--bg) 82%, var(--panel));
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 4px;
  padding: 10px;
}

.settings-tab {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 0 16px;
}

.settings-tab.active {
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(21, 35, 42, 0.1);
  color: var(--text);
}

.settings-tab-panel {
  display: none;
  padding: 18px;
}

.settings-tab-panel.active {
  display: block;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.area-settings-manager {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100vh - 230px);
}

.area-filter-form {
  align-items: center;
  grid-template-columns: minmax(260px, 1fr) 96px 46px;
}

.area-grid-wrap {
  flex: 1 1 48%;
}

.area-users-panel {
  display: flex;
  flex: 1 1 42%;
  flex-direction: column;
  min-height: 220px;
}

.area-user-grid-wrap {
  flex: 1 1 auto;
}

.area-color-cell {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.area-color-dot {
  background: var(--area-color);
  border: 1px solid color-mix(in srgb, var(--area-color) 75%, #000);
  border-radius: 999px;
  display: inline-flex;
  height: 22px;
  width: 22px;
}

.area-color-editor {
  align-items: center;
  background: color-mix(in srgb, var(--bg) 70%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 8px;
}

.settings-card h2 {
  font-size: 1.1rem;
  margin: 0 0 6px;
}

.settings-card p {
  color: var(--muted);
  margin: 0;
}

.muted-card {
  background: color-mix(in srgb, var(--bg) 74%, var(--panel));
}

.theme-options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.theme-option {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 122px;
  padding: 12px;
  text-align: left;
}

.theme-option.active {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.theme-option strong,
.theme-option small {
  display: block;
}

.theme-option small {
  color: var(--muted);
}

.theme-swatch {
  border: 1px solid var(--line);
  border-radius: 7px;
  display: block;
  height: 42px;
}

.theme-swatch.light {
  background: linear-gradient(135deg, #ffffff 0 52%, #d8e0e4 52%);
}

.theme-swatch.dark {
  background: linear-gradient(135deg, #0c0e10 0 52%, #303a40 52%);
}

.theme-swatch.celeste {
  background: linear-gradient(135deg, #ffffff 0 52%, #1687b5 52%);
}

.theme-swatch.warm {
  background: linear-gradient(135deg, #fff7f0 0 52%, #c46425 52%);
}

.customer-manager {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 142px);
  min-height: 0;
}

.supplier-manager {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 142px);
  min-height: 0;
}

.supplier-grid-wrap {
  flex: 1 1 44%;
}

.supplier-detail-panel {
  display: flex;
  flex: 1 1 50%;
  flex-direction: column;
  min-height: 250px;
}

.supplier-tab-actions {
  display: flex;
  gap: 8px;
}

.supplier-panel-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 0 8px;
}

.detail-tabs {
  background: color-mix(in srgb, var(--bg) 84%, var(--panel));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  display: flex;
  gap: 4px;
  padding: 8px;
}

.detail-tab {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 36px;
  padding: 0 14px;
}

.detail-tab.active {
  background: var(--panel);
  box-shadow: 0 2px 8px rgba(21, 35, 42, 0.1);
  color: var(--text);
}

.detail-panel {
  display: none;
  min-height: 0;
}

.detail-panel.active {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.supplier-contract-measurements {
  background: #f07f34;
  border-color: #a9541f;
  color: #fff;
}

.supplier-modal-grid {
  border-top: 1px solid var(--line);
  margin: 0 var(--modal-pad) var(--modal-pad);
  padding-top: var(--modal-pad);
}

.supplier-modal-grid h3 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.supplier-measurement-form {
  padding-bottom: var(--modal-pad);
}

.supplier-measurement-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.supplier-measurement-grid label {
  display: grid;
  gap: 6px;
}

.supplier-measurement-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.supplier-measurement-grid input,
.supplier-measurement-grid select,
.supplier-measurement-grid textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  min-width: 0;
  padding: 10px 12px;
  pointer-events: auto;
  width: 100%;
}

#supplier-contract-form input,
#supplier-contract-form select,
#supplier-contract-form textarea {
  pointer-events: auto;
}

.supplier-contract-link-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 0.45fr) minmax(260px, 1fr);
}

.form-toggle-field {
  display: grid;
  gap: 6px;
}

.form-toggle-field > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.supplier-linked-contract {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 4px;
}

#supplier-measurement-contract-label {
  background: color-mix(in srgb, var(--bg) 62%, var(--panel));
  color: var(--muted);
}

.measurement-contract-field {
  grid-column: span 9;
}

.measurement-status-field {
  grid-column: span 3;
}

.measurement-bm-field,
.measurement-period-field {
  grid-column: span 2;
}

.measurement-date-field {
  grid-column: span 2;
}

.measurement-value-field {
  grid-column: span 3;
}

.measurement-notes-field {
  grid-column: span 12;
}

.measurement-inline-actions {
  align-self: stretch;
  border-top: 0;
  grid-column: span 12;
  justify-content: flex-start;
  margin-top: 0;
  padding-top: 0;
}

.supplier-modal-close-actions {
  margin-top: 12px;
  padding-bottom: 0;
}

.customer-filter-form {
  align-items: center;
  grid-template-columns: minmax(240px, 1.4fr) minmax(160px, 0.9fr) 150px 96px 46px;
}

.security-manager {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 142px);
  min-height: 0;
}

.security-filter-form {
  align-items: center;
  grid-template-columns: minmax(260px, 1.35fr) minmax(190px, 0.85fr) minmax(150px, 0.65fr) 96px 46px;
}

.security-card-list {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  min-height: 0;
  overflow: auto;
  padding: 2px 4px 10px 2px;
}

.security-user-card,
.security-empty-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(22, 34, 45, 0.06);
  min-width: 0;
  padding: 14px;
}

.security-user-card {
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr auto;
}

.security-card-identity {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
}

.security-card-identity strong,
.security-card-identity small,
.security-card-details span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.security-card-identity small,
.security-card-details small {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
}

.security-card-code {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 6px;
  color: var(--accent-strong);
  display: inline-flex;
  font-weight: 900;
  min-height: 34px;
  padding: 0 10px;
}

.security-card-details {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.security-card-details span {
  background: color-mix(in srgb, var(--bg) 62%, var(--panel));
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 3px;
  padding: 9px;
}

.security-card-status {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-top: 12px;
}

.lock-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.lock-status svg {
  fill: none;
  height: 22px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 22px;
}

.lock-status.unlocked {
  background: #d9efd6;
  color: #26713d;
}

.lock-status.locked {
  background: #ece2e2;
  color: #8f3f47;
}

.user-lock-field {
  align-content: start;
}

.lock-toggle {
  background: #e9eef1;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.lock-toggle-option {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 44px;
}

.lock-toggle-option svg {
  fill: none;
  height: 21px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  width: 21px;
}

.lock-toggle-option.active {
  background: white;
  box-shadow: 0 4px 10px rgba(36, 52, 63, 0.14);
  color: var(--accent);
}

.lock-toggle-option[data-blocked-value="true"].active {
  color: #8f3f47;
}

.text-toggle {
  background: #e9eef1;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.text-toggle-option {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 34px;
  min-width: 62px;
  padding: 0 14px;
}

.text-toggle-option.active {
  background: var(--panel);
  box-shadow: 0 4px 10px rgba(36, 52, 63, 0.14);
  color: var(--accent);
}

.user-modal {
  max-width: 1120px;
  padding: 0;
  width: min(1120px, calc(100vw - 48px));
}

.user-form {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 0;
}

.user-photo-panel {
  background: var(--table-head);
  color: var(--table-head-text);
  min-height: 520px;
  padding: 18px 14px;
  position: relative;
}

.user-photo-frame {
  align-items: center;
  background: var(--panel);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(11, 31, 41, 0.25);
  display: flex;
  height: 138px;
  justify-content: center;
  margin: 4px auto 14px;
  overflow: hidden;
  width: 138px;
}

.user-photo-frame img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.user-photo-upload {
  align-items: center;
  background: var(--accent);
  border: 3px solid var(--table-head);
  border-radius: 999px;
  bottom: auto;
  color: white;
  cursor: pointer;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  left: 146px;
  position: absolute;
  top: 112px;
  width: 38px;
}

.user-photo-upload input {
  display: none;
}

.user-photo-upload svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  width: 20px;
}

.user-photo-panel strong,
.user-photo-panel small {
  display: block;
  text-align: center;
}

.user-photo-panel strong {
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.user-photo-panel small {
  color: rgba(255, 255, 255, 0.78);
  margin-top: 5px;
}

.user-modal-main {
  min-width: 0;
}

.user-form-grid {
  padding: 20px;
}

.user-form .modal-actions {
  border-top: 1px solid var(--line);
  padding: 14px 8px 0;
}

.checkbox-label {
  align-items: center;
  align-self: end;
  display: inline-flex;
  gap: 9px;
  min-height: 42px;
}

.checkbox-label input {
  height: 18px;
  width: 18px;
}

.select-with-help {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 38px;
}

.select-with-help select {
  min-width: 0;
}

.service-help-button {
  font-weight: 900;
  height: 42px;
  width: 38px;
}

.detail-placeholder {
  padding: var(--modal-pad);
}

.muted-detail-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 14px 0 0;
}

.bdi-composition-grid-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 14px;
  max-height: 52vh;
  overflow: auto;
}

.bdi-composition-grid th,
.bdi-composition-grid td {
  font-size: 0.86rem;
}

.bdi-detail-tabs {
  margin-top: 14px;
}

.bdi-composition-grid .bdi-total-row td {
  background: #eef4f6;
  font-weight: 800;
}

.bdi-composition-grid .charges-header-row td,
.bdi-composition-grid .charges-final-row td {
  background: #4d86d9;
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.bdi-percent-cell {
  min-width: 130px;
  text-align: right;
}

.bdi-percent-cell input {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 7px 8px;
  text-align: right;
  width: 110px;
}

.charges-grid .bdi-percent-cell {
  min-width: 120px;
}

.non-applicable-charge {
  color: var(--muted);
  font-weight: 800;
}

.permission-grid-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 55vh;
  overflow: auto;
}

.permission-grid {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.permission-grid th {
  background: var(--table-head);
  color: var(--table-head-text);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  position: sticky;
  text-align: center;
  top: 0;
  z-index: 1;
}

.permission-grid th:first-child {
  text-align: left;
}

.permission-grid th,
.permission-grid td {
  border: 1px solid white;
  padding: 10px 12px;
}

.permission-grid tbody tr:nth-child(odd) {
  background: var(--row-a);
}

.permission-grid tbody tr:nth-child(even) {
  background: var(--row-b);
}

.permission-grid td:not(:first-child) {
  text-align: center;
}

.permission-grid strong,
.permission-grid small {
  display: block;
}

.permission-grid small {
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 3px;
}

.permission-check {
  display: inline-grid;
  height: 24px;
  place-items: center;
  position: relative;
  width: 24px;
}

.permission-check input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.permission-check span {
  background: #f8fbfc;
  border: 1px solid #b8c8d1;
  border-radius: 6px;
  height: 22px;
  width: 22px;
}

.permission-check input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 4px #f8fbfc;
}

.customer-grid-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 1 1 52%;
  min-height: 0;
  overflow: auto;
}

.customer-grid {
  border-collapse: collapse;
  min-width: 960px;
  width: 100%;
}

.customer-grid th {
  background: var(--table-head);
  color: var(--table-head-text);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-align: left;
}

.customer-grid th,
.customer-grid td {
  border: 1px solid white;
  padding: 11px 12px;
}

.customer-grid tbody tr:nth-child(odd) {
  background: var(--row-a);
}

.customer-grid tbody tr:nth-child(even) {
  background: var(--row-b);
}

.customer-grid tbody tr.selected td {
  background: #d6eef0;
  box-shadow: inset 3px 0 0 var(--accent);
}

.sortable-header {
  cursor: pointer;
  padding-right: 24px !important;
  position: relative;
  user-select: none;
}

.sortable-header::after {
  color: rgba(255, 255, 255, 0.72);
  content: "↕";
  font-size: 0.86rem;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

.sortable-header[data-sort-direction="asc"]::after {
  content: "↑";
}

.sortable-header[data-sort-direction="desc"]::after {
  content: "↓";
}

.customer-grid strong,
.customer-grid small {
  display: block;
}

.customer-grid small {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 3px;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 9px;
}

.status-pill.active {
  background: #d9efd6;
  color: #26713d;
}

.status-pill.inactive {
  background: #ece2e2;
  color: #8f3f47;
}

.document-actions-cell {
  min-width: 188px;
  white-space: nowrap;
}

.document-actions-cell .icon-button {
  margin-right: 6px;
}

.customer-contacts-panel {
  display: flex;
  flex: 1 1 42%;
  flex-direction: column;
  min-height: 220px;
}

.prospecting-manager {
  display: grid;
  gap: 14px;
  grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  height: calc(100vh - 176px);
  min-height: 0;
}

.prospecting-filter-form {
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, 0.6fr) 90px auto 42px;
}

.view-toggle {
  background: #e8eef2;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.view-toggle-option {
  background: transparent;
  color: var(--muted);
  min-width: 72px;
}

.view-toggle-option.active {
  background: var(--panel);
  box-shadow: 0 2px 7px rgba(21, 35, 42, 0.12);
  color: var(--text);
}

.prospecting-kanban {
  display: grid;
  gap: 12px;
  grid-auto-columns: minmax(230px, 230px);
  grid-auto-flow: column;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.prospecting-kanban:has(+ .prospecting-grid-wrap[hidden]) {
  grid-row: 2 / -1;
}

.prospecting-kanban[hidden] + .prospecting-grid-wrap {
  grid-row: 2 / -1;
}

.prospecting-column {
  background: #eaf0f3;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 210px;
  overflow: hidden;
  padding: 10px;
}

.prospecting-column.drop-target {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent);
}

.prospecting-column header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.prospecting-column header span {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 800;
  min-width: 26px;
  padding: 3px 8px;
  text-align: center;
}

.prospecting-column-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.prospecting-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.prospecting-card.dragging {
  opacity: 0.55;
}

.prospecting-card.selected {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 42%, transparent);
}

.prospecting-card strong,
.prospecting-card small {
  display: block;
}

.prospecting-card small,
.prospecting-card-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.prospecting-card-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.prospecting-detail-panel {
  min-height: 250px;
}

.employee-manager {
  display: grid;
  gap: 10px;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 176px);
  min-height: 0;
}

.employee-filter-form {
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr) auto auto;
}

.employee-modal-tabs {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.employee-tab {
  background: #ffffff;
  border: 3px solid #15647d;
  border-radius: 8px;
  color: #1d2830;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  min-height: 40px;
  padding: 7px 14px;
}

.employee-tab.active {
  background: #edf4f7;
  box-shadow: inset 0 0 0 1px rgba(21, 100, 125, 0.18);
}

.employee-tab-panel {
  min-height: 0;
}

.employee-general-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.employee-general-grid .span-3 {
  grid-column: 1 / -1;
}

.employee-kanban {
  display: grid;
  gap: 10px;
  grid-auto-columns: minmax(250px, 1fr);
  grid-auto-flow: column;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.employee-column {
  background: #e8eef1;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 250px;
  padding: 10px;
}

.employee-column header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.employee-column header div {
  display: grid;
  gap: 2px;
}

.employee-column header small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.employee-column header span {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 850;
  min-width: 26px;
  padding: 3px 8px;
  text-align: center;
}

.employee-column-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  justify-items: center;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.employee-badge-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  padding: 10px;
}

.employee-badge-top {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr);
}

.employee-badge-top img {
  aspect-ratio: 1;
  background: #d9e3e7;
  border-radius: 50%;
  object-fit: cover;
  width: 58px;
}

.employee-badge-top div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.employee-badge-top strong,
.employee-badge-top small,
.employee-badge-top span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-badge-top small,
.employee-badge-top span,
.employee-badge-meta small {
  color: var(--muted);
  font-size: 0.78rem;
}

.employee-badge-meta {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.employee-badge-meta span {
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  min-width: 0;
}

.contact-panel-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.contact-search {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 38px;
  min-width: 230px;
  padding: 0 10px;
}

.compact-row {
  margin-bottom: 10px;
}

.contact-grid-wrap {
  flex: 1 1 auto;
}

.contact-badge-list {
  align-content: start;
  display: grid;
  flex: 1 1 auto;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 188px));
  max-height: 430px;
  overflow: auto;
  padding: 10px 8px 14px;
}

.contact-empty {
  align-items: center;
  background: #f7fafb;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-weight: 800;
  min-height: 120px;
  padding: 18px;
}

.contact-badge-card {
  height: 292px;
  perspective: 1200px;
  width: 178px;
}

.contact-badge-inner {
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
  width: 100%;
}

.contact-badge-card.is-flipped .contact-badge-inner {
  transform: rotateY(180deg);
}

.contact-badge-face {
  backface-visibility: hidden;
  border: 1px solid #d8c99f;
  border-radius: 10px;
  box-shadow: 0 16px 28px rgba(18, 31, 41, 0.18);
  display: flex;
  flex-direction: column;
  height: 100%;
  left: 0;
  overflow: hidden;
  position: absolute;
  top: 0;
  width: 100%;
}

.contact-badge-front {
  align-items: center;
  background: linear-gradient(180deg, #071c42 0%, #071c42 62%, #efe6ca 62%, #efe6ca 100%);
  color: white;
  padding: 18px 12px 12px;
  text-align: center;
}

.contact-badge-back {
  background: #d5bc7e;
  color: #122232;
  padding: 20px 14px 14px;
  transform: rotateY(180deg);
}

.contact-badge-lanyard {
  background: #111827;
  border-radius: 0 0 6px 6px;
  height: 24px;
  left: 50%;
  position: absolute;
  top: -1px;
  transform: translateX(-50%);
  width: 34px;
}

.contact-badge-lanyard::after {
  background: #f7fafb;
  border-radius: 0 0 8px 8px;
  content: "";
  height: 12px;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  width: 18px;
}

.contact-badge-lanyard.dark {
  background: #2d3748;
}

.contact-badge-flip {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 999px;
  color: #0d3a69;
  cursor: pointer;
  display: inline-flex;
  height: 26px;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  z-index: 2;
}

.contact-badge-flip svg {
  fill: none;
  height: 15px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 15px;
}

.contact-badge-greeting {
  color: #d9c484;
  font-size: 10px;
  font-weight: 900;
  margin: 18px 0 2px;
  text-transform: uppercase;
}

.contact-badge-nickname {
  color: white;
  display: block;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  max-width: 100%;
  min-height: 36px;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.contact-badge-photo {
  background: #d8e2e9;
  border: 3px solid #d9c484;
  border-radius: 999px;
  height: 86px;
  margin: 12px 0 13px;
  object-fit: cover;
  width: 86px;
}

.contact-badge-strip {
  align-items: center;
  background: #d7bd78;
  color: #071c42;
  display: grid;
  gap: 2px;
  margin: 0 -12px;
  min-height: 54px;
  padding: 8px 10px;
  width: calc(100% + 24px);
}

.contact-badge-phone {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.contact-badge-email {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.contact-badge-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: auto;
  padding: 10px 8px 8px;
}

.contact-badge-actions .icon-button {
  background: rgba(255, 255, 255, 0.9);
  height: 28px;
  width: 28px;
}

.contact-badge-label {
  color: #0d3a69;
  font-size: 10px;
  font-weight: 900;
  margin: 10px 0 2px;
  text-transform: uppercase;
}

.contact-badge-fullname,
.contact-badge-role {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 4px;
  display: block;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  min-height: 24px;
  overflow-wrap: anywhere;
  padding: 4px 6px;
}

.contact-badge-qr {
  align-self: center;
  background: white;
  border: 6px solid white;
  border-radius: 6px;
  height: 112px;
  margin-top: 14px;
  width: 112px;
}

.contact-badge-company {
  color: #18324d;
  display: block;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: auto;
  text-align: center;
}

.employee-badge-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: block;
  height: 330px;
  padding: 0;
  width: 190px;
}

.employee-badge-front {
  background: linear-gradient(180deg, #071c42 0%, #071c42 63%, #d7bd78 63%, #d7bd78 84%, #f8fbfc 84%, #f8fbfc 100%);
  padding: 46px 12px 10px;
}

.employee-badge-front .contact-badge-photo {
  border-color: #d7bd78;
  height: 136px;
  margin: 0 0 16px;
  width: 136px;
}

.employee-badge-strip {
  background: transparent;
  color: #ffffff;
  gap: 3px;
  margin: 0 -12px;
  min-height: 70px;
  padding: 10px 12px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.employee-badge-strip strong,
.employee-badge-strip span,
.employee-badge-strip small {
  display: block;
  overflow-wrap: anywhere;
}

.employee-badge-strip strong {
  font-size: 22px;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}

.employee-badge-strip span {
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
}

.employee-badge-strip small {
  font-size: 15px;
  font-weight: 850;
  line-height: 1.1;
}

.employee-badge-front .contact-badge-actions {
  align-items: center;
  margin-top: 6px;
  padding: 0 8px 8px;
  width: 100%;
}

.employee-badge-front .employee-status-lock {
  background: #dff4e2;
  color: #248348;
  margin-right: auto;
  opacity: 1;
}

.employee-badge-back {
  background: #d5bc7e;
  padding: 26px 14px 14px;
}

.employee-badge-back .contact-badge-fullname,
.employee-badge-back .contact-badge-role {
  font-size: 12px;
  min-height: 30px;
}

.employee-badge-back .contact-badge-qr {
  height: 126px;
  width: 126px;
}

.employee-badge-company {
  color: #18324d;
  display: block;
  font-size: 8px;
  font-weight: 850;
  line-height: 1.15;
  margin-top: 5px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-badge-front .card-audit-line {
  color: #18324d;
  font-size: 8px;
  margin-top: 4px;
  max-width: 100%;
  text-align: center;
}

.contact-profile-box {
  align-items: center;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 18px;
  margin-bottom: 16px;
  padding: 16px;
}

.contact-photo-wrap {
  flex: 0 0 auto;
  height: 92px;
  position: relative;
  width: 92px;
}

.contact-photo-preview {
  background: #e7eef2;
  border: 3px solid white;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #c9d5dd, 0 8px 18px rgba(42, 55, 68, 0.16);
  height: 92px;
  object-fit: cover;
  width: 92px;
}

.contact-photo-upload {
  align-items: center;
  background: var(--accent);
  border: 3px solid #f7fafb;
  border-radius: 999px;
  bottom: 4px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  position: absolute;
  right: 2px;
  width: 28px;
}

.contact-photo-upload input {
  display: none;
}

.contact-photo-upload svg {
  fill: none;
  height: 16px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
  width: 16px;
}

.contact-profile-summary {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.contact-profile-summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.contact-profile-summary strong {
  color: var(--ink);
  font-size: 1.08rem;
}

.contact-profile-summary small {
  color: var(--muted);
}

.contact-name-cell {
  align-items: center;
  display: inline-flex;
  gap: 9px;
}

.contact-mini-photo {
  background: #e7eef2;
  border-radius: 999px;
  height: 28px;
  object-fit: cover;
  width: 28px;
}

.phone-line {
  display: block;
  line-height: 1.35;
  white-space: nowrap;
}

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

.communication-sidebar {
  background: #f2f5f7;
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-rows: minmax(220px, 42%) minmax(0, 1fr);
  min-height: 0;
  position: relative;
}

.communication-sidebar.notifications-only {
  grid-template-rows: minmax(0, 1fr);
}

.notification-panel,
.chat-panel {
  min-height: 0;
  overflow: auto;
  padding: 24px 16px;
}

.notification-panel {
  border-bottom: 1px solid var(--line);
}

.notification-panel header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.notification-panel header strong,
.user-chip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 10px;
}

.notification-list,
.chat-list {
  display: grid;
  gap: 10px;
}

.notification-list article {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.notification-list article.unread {
  border-left: 3px solid var(--accent);
}

.notification-list article.read {
  opacity: 0.76;
}

.notification-list article.notification-empty {
  opacity: 1;
}

.notification-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.notification-list small {
  color: var(--muted);
  font-size: 0.78rem;
}

.notification-list .text-button {
  justify-self: start;
  min-height: 0;
  padding: 0;
}

.chat-list {
  margin-bottom: 14px;
}

.chat-message {
  border-radius: 8px;
  max-width: 88%;
  padding: 10px;
}

.chat-message.incoming {
  background: var(--panel);
  border: 1px solid var(--line);
}

.chat-message.outgoing {
  background: #d7eef0;
  justify-self: end;
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form input {
  min-width: 0;
  width: 100%;
}

.chat-form button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: 800;
  padding: 0 12px;
}

.master-layout.right-collapsed .notification-panel,
.master-layout.right-collapsed .chat-panel {
  opacity: 0;
  pointer-events: none;
}

.contracts-shell {
  display: block;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

.contracts-shell .topbar,
.contracts-shell .toolbar {
  flex: 0 0 auto;
}

.contracts-shell .view {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}

.contracts-shell .view.active {
  display: block;
}

#legal-documents-view.active,
#technical-documents-view.active,
#managerial-documents-view.active {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

#legal-documents-view .tender-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#legal-documents-view .customer-grid-wrap {
  flex: 1 1 auto;
  max-height: calc(100vh - 330px);
  min-height: 260px;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
}

#legal-documents-grid {
  min-width: 1720px;
}

.services-manager-panel,
.services-import-panel {
  display: grid;
  gap: 18px;
}

.services-manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.services-manager-filter {
  grid-template-columns: minmax(280px, 1fr) 130px 90px 180px auto auto;
}

.services-manager-grid-wrap {
  min-height: 340px;
  max-height: 320px;
  overflow-y: auto;
}

.services-manager-grid tbody tr {
  cursor: pointer;
}

.services-manager-grid tbody tr.selected-row {
  background: #fff2cf;
}

.source-pill {
  background: #edf4f6;
  border-radius: 5px;
  color: var(--accent-dark);
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-width: 46px;
  padding: 7px 9px;
}

.source-pill.cpu-source {
  background: #0eb3e6;
  color: #052735;
}

.service-command-cell {
  display: flex;
  gap: 7px;
}

.service-command {
  border: 0;
  border-radius: 5px;
  color: transparent;
  cursor: pointer;
  height: 24px;
  min-width: 24px;
}

.clone-service {
  background: #f6e700;
}

.edit-service {
  background: #1b9b3d;
}

.delete-service {
  background: #f01717;
}

.services-composition-panel {
  display: grid;
  gap: 0;
}

.services-composition-title {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 900;
  justify-self: start;
  padding: 12px 24px;
}

.services-composition-grid-wrap {
  border-top-left-radius: 0;
  max-height: 220px;
  min-height: 180px;
  overflow-y: auto;
}

.service-editor-modal {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 24px);
  max-height: none;
  max-width: none;
  overflow: hidden;
  width: calc(100vw - 24px);
}

.service-source-form {
  display: grid;
  gap: 12px;
  flex: 1;
  grid-template-rows: auto minmax(0, 1fr) auto auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: var(--modal-pad);
}

.service-editor-head {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 1fr) 110px 150px 150px;
}

.service-editor-head label,
.service-editor-add-row label {
  color: var(--text);
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 4px;
}

.service-editor-head label.wide {
  grid-column: span 1;
}

.service-editor-head input,
.service-editor-add-row input,
.service-editor-insumos input {
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 34px;
  padding: 0 10px;
}

.service-editor-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 0;
  overflow: auto;
}

.service-editor-table-wrap.small {
  min-height: 0;
}

.service-editor-total {
  align-items: center;
  display: flex;
  font-weight: 900;
  gap: 12px;
  justify-content: flex-end;
}

.service-editor-total strong {
  border: 1px solid var(--line);
  border-radius: 5px;
  min-width: 100px;
  padding: 6px 12px;
  text-align: right;
}

.service-editor-add-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 1fr) 110px auto;
}

.service-editor-insumos {
  display: grid;
  gap: 8px;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 0;
}

.service-editor-composition-grid,
.service-editor-insumo-grid {
  min-width: 980px;
}

.cpu-service-form {
  grid-template-rows: auto minmax(170px, 1fr) auto minmax(190px, 1fr) auto;
}

.cpu-editor-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.cpu-editor-head-section {
  display: grid;
  gap: 10px;
}

.cpu-editor-head-section label,
.cpu-search-row label {
  color: var(--text);
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 4px;
}

.cpu-editor-head-section select,
.cpu-editor-head-section input,
.cpu-search-row input,
.cpu-intermediate-row input {
  border: 1px solid var(--line);
  border-radius: 5px;
  min-height: 34px;
  padding: 0 10px;
}

.cpu-editor-head {
  display: grid;
  gap: 10px;
  grid-template-columns: 130px minmax(280px, 1fr) 110px 140px;
}

.cpu-composition-section {
  display: grid;
  gap: 8px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.cpu-tabs {
  border: 0;
  gap: 8px;
  padding: 0;
}

.cpu-tabs .detail-tab {
  border: 1px solid #1a6b7d;
  min-width: 130px;
}

.cpu-tabs .detail-tab.active {
  background: #1a6b7d;
  color: #fff;
}

.cpu-composition-wrap {
  min-height: 0;
}

.cpu-composition-grid {
  min-width: 920px;
}

.cpu-composition-grid th {
  background: #fffca0;
  color: #17242c;
}

.cpu-intermediate-row {
  grid-template-columns: 100px minmax(260px, 1fr) 90px 120px 120px auto;
  padding: 8px;
}

.cpu-search-row {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(280px, 1fr) auto;
}

.cpu-total-input,
.service-editor-item-price {
  text-align: right;
}

.cpu-editor-modal .service-editor-insumos {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.services-import-modal {
  display: flex;
  flex-direction: column;
  height: min(92vh, 900px);
  max-width: 1420px;
  overflow: hidden;
  width: min(96vw, 1420px);
}

.services-import-modal-body {
  display: grid;
  flex: 1;
  gap: 14px;
  overflow-y: auto;
  padding: var(--modal-pad);
  scrollbar-gutter: stable;
}

.services-import-modal .services-import-panel {
  margin: 0;
}

.services-import-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.services-import-form label {
  color: var(--muted);
  display: grid;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 6px;
}

.services-import-form label.wide {
  grid-column: span 2;
}

.services-import-form input,
.services-import-form select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
}

.services-import-actions {
  align-items: end;
  display: flex;
  justify-content: flex-end;
}

.services-import-status {
  background: #f5f8f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  padding: 14px;
}

.services-import-status.is-loading {
  border-color: #b7d7df;
  color: var(--accent-dark);
}

.services-import-status.is-success {
  background: #effaf4;
  border-color: #bde4c8;
  color: #226b37;
}

.services-import-status.is-error {
  background: #fff1f1;
  border-color: #f0b7b7;
  color: #9f2b2b;
}

.services-import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.services-import-summary span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 10px;
}

#contracts-view.active {
  display: flex;
  flex-direction: column;
}

#contracts-view .workspace-heading,
#contracts-view .contract-toolbar {
  flex: 0 0 auto;
  width: 100%;
}

#contract-filter-form {
  grid-template-columns: minmax(280px, 2fr) minmax(170px, 1fr) 130px 130px minmax(140px, 0.8fr) auto 52px;
  width: 100%;
}

.contract-context {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 10px 12px;
}

.contract-context span {
  color: var(--muted);
  font-weight: 800;
  margin-right: auto;
}

.contract-gantt-sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow-x: scroll;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.contract-gantt-table {
  min-width: calc(1138px + (var(--month-count, 12) * 63px));
  width: max-content;
}

.contract-gantt-head,
.contract-gantt-row {
  display: grid;
  grid-template-columns: 68px 250px repeat(4, 112px) 112px 92px 72px 96px repeat(var(--month-count, 12), 63px);
  grid-template-rows: 48px;
  position: relative;
}

.contract-gantt-head {
  background: var(--table-head);
  color: var(--table-head-text);
  font-weight: 800;
  letter-spacing: 0.03em;
  position: sticky;
  top: 0;
  text-align: center;
  z-index: 4;
}

.contract-gantt-head > span,
.contract-gantt-row > span {
  align-items: center;
  border-right: 2px solid white;
  display: flex;
  grid-row: 1;
  justify-content: center;
  height: 48px;
  padding: 6px;
}

.contract-gantt-head > span {
  background: var(--table-head);
}

.sort-header {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  gap: 6px;
  justify-content: center;
  letter-spacing: 0;
  min-height: 36px;
  padding: 0 4px;
  width: 100%;
}

.sort-header small {
  color: #d4edf2;
  font-size: 0.72rem;
}

.sort-header.active small {
  color: #fff7a8;
}

.contract-gantt-head > span:nth-child(1),
.contract-gantt-row > span:nth-child(1) {
  left: 0;
  position: sticky;
  z-index: 2;
}

.contract-gantt-head > span:nth-child(2),
.contract-gantt-row > span:nth-child(2) {
  left: 68px;
  position: sticky;
  z-index: 2;
}

.contract-gantt-head > span:nth-child(3),
.contract-gantt-row > span:nth-child(3) {
  left: 318px;
  position: sticky;
  z-index: 2;
}

.contract-gantt-head > span:nth-child(-n+3) {
  z-index: 6;
}

.contract-gantt-row.total-row > span:nth-child(-n+3) {
  z-index: 5;
}

.contract-gantt-row:nth-child(odd) > span {
  background: #cbd2d7;
}

.contract-gantt-row:nth-child(even) > span {
  background: #e2e6e9;
}

.contract-gantt-row > span:nth-child(n+11) {
  background: transparent;
}

.contract-gantt-row.selected > span {
  background: #d9eef0;
}

.contract-gantt-row.selected > span:nth-child(n+11) {
  background: transparent;
}

.contract-gantt-row.total-row > span {
  background: #dbe7ea;
  color: var(--text);
  font-weight: 800;
}

.contract-gantt-row.total-row {
  bottom: 0;
  position: sticky;
  z-index: 3;
}

.contract-gantt-row.total-row > span {
  border-top: 2px solid #17677f;
  box-shadow: 0 -4px 10px rgba(23, 33, 38, 0.08);
}

.contract-gantt-row.total-row > span:nth-child(n+11) {
  background: transparent;
}

.contract-gantt-row > .contract-cell {
  align-items: center;
  display: grid;
  gap: 2px;
  justify-items: center;
  line-height: 1.1;
}

.contract-row-actions {
  gap: 6px;
}

.contract-row-actions .icon-button {
  height: 32px;
  min-height: 32px;
  padding: 0;
  width: 32px;
}

.contract-gantt-row:not(.empty-row):not(.total-row) {
  cursor: pointer;
}

.contract-gantt-row:not(.empty-row):not(.total-row):focus-visible > span {
  outline: 2px solid #2e8fa0;
  outline-offset: -2px;
}

.contract-info {
  font-size: 1.25rem;
  font-weight: 800;
}

.contract-info.active {
  color: #176f25;
}

.contract-info.paused {
  color: #a86c00;
}

.contract-info.finished {
  color: #4b6570;
}

.contract-info.not-started {
  color: #66737b;
}

.contract-info.starting {
  color: #17677f;
}

.contract-cell strong {
  font-size: 0.9rem;
  font-weight: 400;
}

.contract-cell small {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-gantt-row.empty-row > span {
  height: 48px;
}

.contract-month-bar {
  align-self: center;
  background: #8ccfdc;
  border: 1px solid rgba(38, 75, 84, 0.75);
  border-radius: 5px;
  color: #fff9a8;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  grid-row: 1;
  height: 32px;
  justify-self: stretch;
  margin: 8px 1px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.contract-bar-content {
  align-items: center;
  inset: 0;
  padding: 0 8px;
  position: absolute;
  z-index: 1;
}

.contract-bar-date {
  color: white;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1;
  min-width: 0;
  overflow: hidden;
  position: absolute;
  text-overflow: clip;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

.contract-bar-date.start {
  left: 8px;
  text-align: left;
}

.contract-bar-date.end {
  right: 8px;
  text-align: right;
}

.contract-progress-fill {
  background: #4f9a60;
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
}

.contract-month-bar strong {
  color: #fff9a8;
  font-size: 0.88rem;
  font-weight: 600;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

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

.section-title-row h2 {
  margin: 0;
}

.compact-kanban .column {
  background: #d7dde5;
  box-sizing: border-box;
  flex: 0 0 240px;
  min-height: 500px;
  min-width: 240px;
  padding: 8px;
}

#pendencies-view.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.pendencies-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 10px;
  scrollbar-gutter: stable;
  width: 100%;
}

.pendency-filter-bar {
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  grid-template-columns: minmax(220px, 1fr) 190px 230px 180px 170px auto;
  margin: 12px 0;
}

.pendency-lanes-board {
  align-items: stretch;
  display: grid;
  gap: 12px;
  min-width: max-content;
  padding-right: 10px;
}

.pendency-lane {
  display: grid;
  gap: 6px;
  min-width: max-content;
}

.pendency-lane-header {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(240px, 1fr) auto;
  min-height: 42px;
  padding: 6px 10px;
  text-align: left;
}

.pendency-lane-header small {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pendency-lane-header strong {
  display: block;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.pendency-lane-header em,
.lane-toggle {
  align-items: center;
  background: #edf4f7;
  border: 1px solid #d1dde4;
  border-radius: 999px;
  display: inline-flex;
  font-style: normal;
  font-weight: 800;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
}

.pendency-lane-columns {
  align-items: stretch;
  display: flex;
  gap: 10px;
  min-width: max-content;
}

.pendency-lane.collapsed .pendency-lane-columns {
  display: none;
}

.pendency-column {
  max-height: 100%;
  min-height: 280px;
  overflow: hidden;
}

.pendency-lane .pendency-column {
  flex: 0 0 240px;
  min-height: 280px;
}

.pendency-card-list {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  width: 100%;
}

.pendency-card {
  box-sizing: border-box;
  border-left-color: var(--area-color, #6c7788);
  cursor: pointer;
  min-height: 148px;
  max-width: 100%;
  padding: 9px;
  padding-right: 46px;
  position: relative;
  width: 100%;
}

.pendency-card-head {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.pendency-card h3 {
  font-size: 0.86rem;
  margin-right: 4px;
  overflow-wrap: anywhere;
}

.pendency-card .meta {
  min-width: 0;
}

.pendency-card .schedule {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
}

.pendency-card .schedule div {
  align-items: start;
  display: grid;
  min-width: 0;
}

.pendency-card .schedule strong {
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.postponement-badge {
  align-items: center;
  background: #eef3f6;
  border: 1px solid #cad5dd;
  border-radius: 999px;
  color: #536170;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  height: 22px;
  justify-content: center;
  min-width: 22px;
  padding: 0 6px;
}

.owner-avatar {
  background: #eef3f6;
  border: 2px solid #ffffff;
  border-radius: 999px;
  bottom: 10px;
  box-shadow: 0 0 0 1px #c7d2da, 0 5px 10px rgba(42, 55, 68, 0.2);
  height: 34px;
  object-fit: cover;
  position: absolute;
  right: 9px;
  width: 34px;
}

.measurement-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 1 1 44%;
  min-height: 0;
  overflow: auto;
}

#measurements-view.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 0;
}

#measurements-view .section-title-row {
  flex: 0 0 auto;
}

.measurement-grid {
  border-collapse: collapse;
  min-width: 1380px;
  width: 100%;
}

.measurement-grid th {
  background: var(--table-head);
  color: var(--table-head-text);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-align: left;
}

.measurement-grid th,
.measurement-grid td {
  border: 1px solid white;
  padding: 12px;
}

.measurement-grid tbody tr:nth-child(odd) {
  background: var(--row-a);
}

.measurement-grid tbody tr:nth-child(even) {
  background: var(--row-b);
}

.grid-actions {
  display: flex;
  gap: 8px;
}

.measurement-grid th:last-child,
.measurement-grid td:last-child {
  width: 96px;
}

.measurement-chart-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex: 1 1 48%;
  flex-direction: column;
  min-height: 280px;
  overflow: hidden;
  padding: 14px 16px 12px;
}

.measurement-chart-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.measurement-chart-header h3 {
  font-size: 1rem;
  margin: 0;
}

.measurement-chart {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.measurement-chart svg {
  display: block;
  height: 100%;
  min-height: 230px;
  width: 100%;
}

.chart-axis {
  stroke: #8796a1;
  stroke-width: 1;
}

.chart-grid-line {
  stroke: #dbe3e8;
  stroke-width: 1;
}

.chart-bar-planned {
  fill: #48a866;
}

.chart-bar-realized {
  fill: #2d8eb6;
}

.chart-line {
  fill: none;
  stroke: #20895d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-line-realized {
  stroke: #1d5f9f;
}

.chart-dot {
  fill: #20895d;
}

.chart-dot-realized {
  fill: #1d5f9f;
}

.chart-label,
.chart-value {
  fill: #536371;
  font-size: 12px;
}

.chart-value {
  font-weight: 700;
}

.chart-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: 230px;
}

.wide-modal {
  max-width: 860px;
}

.service-source-modal {
  padding: 12px;
}

.service-source-modal .service-editor-modal {
  box-sizing: border-box;
  height: calc(100vh - 24px);
  max-height: none;
  max-width: none;
  width: calc(100vw - 24px);
}

.bdi-detail-modal {
  max-width: min(1120px, calc(100vw - 24px));
  width: min(1120px, calc(100vw - 24px));
}

.bdi-detail-modal .tender-summary-grid {
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
}

.bdi-detail-modal .metric-card {
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
}

.bdi-detail-modal .metric-card span {
  font-size: 0.82rem;
}

.bdi-detail-modal .metric-card strong {
  font-size: 1.23rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.plan-grid-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.plan-grid {
  border-collapse: collapse;
  width: 100%;
}

.plan-grid th {
  background: var(--table-head);
  color: var(--table-head-text);
  font-size: 0.82rem;
  text-align: left;
}

.plan-grid th,
.plan-grid td {
  border: 1px solid white;
  padding: 8px;
}

.plan-grid tbody tr:nth-child(odd) {
  background: var(--row-a);
}

.plan-grid tbody tr:nth-child(even) {
  background: var(--row-b);
}

.plan-grid input {
  width: 100%;
}

.split-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
}

.login-page {
  min-height: 100vh;
  overflow: auto;
}

.login-shell {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(360px, 520px);
  min-height: 100vh;
}

.login-brand-panel {
  background-image: linear-gradient(90deg, rgba(8, 24, 33, 0.58), rgba(8, 24, 33, 0.08)), var(--login-bg-image, none);
  background-color: var(--sidebar-bg);
  background-position: center;
  background-size: cover;
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: space-between;
  padding: 48px;
  position: relative;
}

.login-brand-panel::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.14));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.login-brand-panel > * {
  position: relative;
  z-index: 1;
}

.login-brand-panel.no-bg {
  background: var(--sidebar-bg);
}

.login-brand-content {
  display: grid;
  gap: 22px;
  margin: 0;
}

.login-brand-panel .eyebrow {
  color: var(--sidebar-muted);
}

.login-brand-panel h1 {
  color: var(--sidebar-text);
  font-size: 4.35rem;
  line-height: 0.95;
  margin: 0;
  max-width: 780px;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.login-brand-mark {
  align-items: center;
  background: #f4f2e8;
  border-radius: 8px;
  color: var(--sidebar-bg);
  display: inline-flex;
  font-size: 1.2rem;
  font-weight: 900;
  height: 66px;
  justify-content: center;
  padding: 10px 16px;
  width: 142px;
}

.login-brand-mark img {
  display: block;
  height: 44px;
  object-fit: contain;
  width: 110px;
}

.login-lead {
  color: #ffffff;
  font-size: 2.12rem;
  font-weight: 500;
  line-height: 1.05;
  margin: 8px 0 0;
  max-width: 560px;
  text-transform: uppercase;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.login-signal-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 150px));
  margin-top: 8px;
  max-width: 315px;
}

.login-signal-grid span {
  align-items: center;
  background: #e8702f;
  border: 2px solid #ffffff;
  border-radius: 7px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  justify-content: center;
  min-height: 34px;
  padding: 8px 10px;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
}

.login-copyright {
  color: #ffffff;
  display: grid;
  font-size: 0.86rem;
  font-weight: 800;
  gap: 2px;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.44);
}

.login-copyright strong {
  font-size: 1.18rem;
}

.login-copyright span {
  font-size: 1.12rem;
}

.login-copyright small {
  font-size: 0.78rem;
  font-weight: 700;
}

.login-card {
  align-self: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(20, 34, 42, 0.12);
  margin: 40px;
  padding: 32px;
}

.login-card-head {
  margin-bottom: 22px;
}

.login-card h2 {
  font-size: 2rem;
  line-height: 1;
  margin: 0;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.login-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 46px;
  padding: 0 12px;
}

.password-control {
  display: block;
  position: relative;
}

.password-control input {
  padding-right: 44px;
  width: 100%;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
}

.password-toggle:hover,
.password-toggle.active {
  color: var(--accent);
}

.password-toggle svg {
  fill: none;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 19px;
}

.login-form .primary-action {
  margin-top: 4px;
}

.forgot-password-link {
  background: transparent;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
  justify-self: start;
  padding: 0;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.login-error {
  background: #fff0f2;
  border: 1px solid #efb8c0;
  border-radius: 6px;
  color: #8f1f32;
  font-size: 0.9rem;
  font-weight: 800;
  margin: 0;
  padding: 10px 12px;
}

.license-panel {
  background: #fff7e8;
  border: 1px solid #edc987;
  border-radius: 8px;
  color: #6f4a05;
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
}

.license-panel[hidden] {
  display: none;
}

.license-panel strong {
  color: #4c3100;
}

.license-panel p {
  margin: 0;
}

.forgot-password-form {
  display: grid;
  gap: 10px;
}

.forgot-password-form input {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  padding: 0 12px;
}

.forgot-password-message {
  color: #6f4a05;
  font-size: 0.86rem;
  font-weight: 800;
  margin: 0;
}

.forgot-password-message.error {
  color: #8f1f32;
}

.success-message {
  background: #eaf7ee;
  border-color: #a4d8b5;
  color: #246b3a;
}

.password-reset-shell {
  display: block;
  max-width: 520px;
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: 360px;
    padding: 30px 22px;
  }

  .login-brand-panel h1 {
    font-size: 2rem;
  }

  .login-card {
    margin: 18px;
    padding: 22px;
  }

  .login-signal-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .proposal-flow-config-form {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: stretch;
    padding: 10px;
  }

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

  .form-grid .wide {
    grid-column: auto;
  }

  .form-grid .span-2 {
    grid-column: auto;
  }

  .customer-form-grid .customer-trade-field,
  .customer-form-grid .customer-legal-field {
    grid-column: auto;
  }

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

  .customer-logo-panel {
    min-height: 220px;
  }

  .customer-logo-frame {
    height: 132px;
    max-width: 260px;
  }

  .customer-logo-upload {
    left: 208px;
    right: auto;
    top: 116px;
  }

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

  .user-photo-panel {
    min-height: 220px;
  }

  .theme-options {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
  }

  .reference-box {
    grid-template-columns: 1fr;
  }

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

  .progress-grid-head,
  .progress-row {
    grid-template-columns: 48px minmax(0, 1fr) 72px 88px;
  }

  .kanban-board {
    display: grid;
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .column {
    flex-basis: auto;
    min-height: 240px;
  }

  .dashboard-grid,
  .dashboard-executive-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-bar-chart {
    grid-template-columns: 1fr;
    overflow-x: auto;
  }

  .dashboard-chart-bars-panel {
    min-width: 780px;
  }

  .dashboard-chart-bars {
    min-width: 720px;
  }

  .dashboard-pie-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 12px;
  }

  .chart-panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-note {
    text-align: left;
  }
}

.embedded-module .filter-form {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(190px, 1.35fr) minmax(130px, 0.8fr) 138px 138px minmax(128px, 0.7fr) 92px 46px;
}

.embedded-module #open-proposal-modal {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0;
  height: 46px;
  justify-content: center;
  min-height: 46px;
  min-width: 46px;
  padding: 0;
  width: 46px;
}

.embedded-module #open-proposal-modal::before {
  content: "+";
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

.embedded-module .kanban-board {
  display: flex;
  gap: 14px;
  flex: 0 0 auto;
  height: calc(100% - 18px);
  max-width: none;
  min-height: 0;
  min-width: 0;
  overflow-x: visible;
  overflow-y: hidden;
  padding-bottom: 0;
}

.embedded-module .kanban-scroll-area {
  box-sizing: border-box;
  display: block;
  height: 100%;
  min-height: 0;
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: 0;
  scrollbar-gutter: stable;
  width: 100%;
}

.embedded-module .column {
  box-sizing: border-box;
  flex: 0 0 280px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  min-width: 280px;
}

.embedded-module .column-card-list {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  width: 100%;
}

.embedded-module .card {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
