@import url("/design-tokens.css?v=20260401-01");

:root {
  --ds-hero-text: #f7f0e4;
  --ds-hero-border: rgba(242, 196, 132, 0.22);
  --ds-hero-surface: rgba(255, 255, 255, 0.08);
  --ds-hero-surface-strong: rgba(255, 255, 255, 0.1);
  --ds-hero-text-muted: rgba(255, 244, 230, 0.72);
  --ds-hero-text-soft: rgba(255, 244, 230, 0.56);
  --ds-hero-line: rgba(242, 196, 132, 0.18);
  --ds-danger-soft: rgba(169, 72, 50, 0.1);
  --ds-danger-line: rgba(169, 72, 50, 0.22);
  --ds-success-soft: rgba(47, 153, 115, 0.14);
  --ds-success-line: rgba(47, 153, 115, 0.24);
  --ds-brand-soft-surface: rgba(15, 58, 47, 0.1);
  --ds-brand-soft-line: rgba(15, 58, 47, 0.18);
  --ds-accent-soft-surface: rgba(242, 196, 132, 0.18);
  --ds-accent-soft-line: rgba(214, 138, 58, 0.24);
}

.ds-panel,
.payment-panel {
  background: rgba(255, 250, 243, 0.96);
  border: 1px solid var(--ds-line-soft);
  box-shadow: var(--ds-shadow-soft);
}

.ds-panel-head,
.payment-panel-head {
  background: rgba(255, 250, 243, 0.92);
  border-bottom: 1px solid var(--ds-line-soft);
}

.ds-kpi-card,
.payment-kpi-card {
  border: 1px solid var(--ds-line-soft);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.96) 0%, rgba(248, 242, 232, 0.96) 100%);
  box-shadow: var(--ds-shadow-soft);
  color: var(--ds-ink);
}

.ds-kpi-inverse,
.payment-kpi-inverse {
  color: #fffaf3;
}

.ds-kpi-people,
.payment-kpi-people {
  background: linear-gradient(135deg, var(--ds-brand) 0%, var(--ds-brand-soft) 100%);
  border-color: rgba(15, 58, 47, 0.2);
}

.ds-subhead,
.payment-subhead {
  color: var(--ds-text-muted);
}

.ds-empty,
.payment-empty {
  color: #9b937f;
}

.ds-tooltip,
.payment-tooltip {
  background: var(--ds-brand-deep);
  color: #fffaf3;
}

.ds-filter-surface,
.payment-filter-bar {
  background: rgba(246, 237, 221, 0.8);
  border: 1px solid var(--ds-line);
}

.ds-filter-toggle,
.payment-filter-toggle {
  background: var(--ds-brand);
  border-color: rgba(15, 58, 47, 0.28);
  color: #fffaf3;
}

.ds-reset-button,
.payment-reset-btn {
  background: rgba(255, 250, 243, 0.96);
  border: 1px solid var(--ds-line);
  color: var(--ds-text-muted);
}

.ds-reset-button:hover,
.payment-reset-btn:hover {
  color: var(--ds-brand-soft);
  background: rgba(255, 255, 255, 0.98);
}

.ds-table-head,
.payment-table-head {
  background: rgba(246, 237, 221, 0.82);
}

.ds-table-head-row,
.payment-table-head-row {
  color: var(--ds-brand-deep);
  border-bottom: 1px solid var(--ds-line);
}

.ds-table-row,
.payment-data-row {
  border-color: #f0e5d2;
}

.ds-table-row:hover,
.payment-data-row:hover {
  background: #f6eddd;
}

.ds-axis-cell,
.payment-axis-cell {
  border-right: 1px solid var(--ds-line-soft);
}

.ds-axis-cell-idle,
.payment-axis-cell-idle {
  background: rgba(255, 250, 243, 0.96);
  color: var(--ds-ink);
}

.ds-axis-cell-idle:hover,
.payment-axis-cell-idle:hover {
  background: rgba(234, 220, 196, 0.52);
  color: var(--ds-brand-deep);
}

.ds-axis-cell-active,
.payment-axis-cell-active {
  background: rgba(234, 220, 196, 0.78);
  color: var(--ds-brand-deep);
}

.ds-project-cell,
.payment-project-cell {
  color: var(--ds-brand-deep);
  font-weight: 800;
}

.ds-project-cell:hover,
.payment-project-cell:hover {
  background: #efe2ca;
  color: #214634;
}

.ds-income,
.payment-income {
  color: var(--ds-status-success);
}

.ds-expense,
.payment-expense {
  color: var(--ds-status-danger);
}

.ds-progress-track,
.payment-progress-track {
  background: rgba(217, 197, 168, 0.45);
}

.ds-progress-track-grand,
.payment-progress-track-grand {
  background: rgba(75, 135, 179, 0.24);
}

.ds-progress-track-mid,
.payment-progress-track-mid {
  background: rgba(214, 138, 58, 0.22);
}

.ds-mode-chip,
.payment-mode-chip {
  color: var(--ds-brand-soft);
  background: rgba(242, 196, 132, 0.22);
  border: 1px solid rgba(214, 138, 58, 0.28);
}

.ds-name-chip,
.payment-name-chip {
  background: rgba(246, 237, 221, 0.76);
  border: 1px solid var(--ds-line-soft);
  color: var(--ds-text-soft);
}

.ds-divider-top,
.payment-divider-top {
  border-top: 1px solid var(--ds-line-soft);
}

.ds-divider-left,
.payment-divider-left {
  border-left: 1px solid var(--ds-line-soft);
}

.ds-divider-mark,
.payment-divider-mark {
  color: rgba(183, 170, 147, 0.92);
}

.ds-mini-table-shell,
.payment-mini-table-shell {
  border: 1px solid var(--ds-line-soft);
}

.ds-mini-table-head,
.payment-mini-table-head {
  background: rgba(246, 237, 221, 0.68);
  color: var(--ds-text-muted);
}

.ds-mini-table-row,
.payment-mini-table-row {
  border-top: 1px solid rgba(217, 197, 168, 0.36);
  color: var(--ds-text-soft);
}

.ds-group-title,
.payment-group-title {
  background: var(--ds-brand);
  color: #fffaf3;
}

.ds-strong,
.payment-strong {
  color: var(--ds-ink);
}

.ds-muted,
.payment-muted {
  color: var(--ds-text-soft);
}

.ds-accent-text,
.payment-icon-accent {
  color: var(--ds-brand-soft);
}

.ds-position-chip,
.position-chip {
  background: rgba(246, 237, 221, 0.76);
}

.ds-position-text,
.position-text {
  color: var(--ds-text-soft);
}

.ds-position-border,
.position-border {
  border-color: rgba(217, 197, 168, 0.46);
}

.ds-position-dot,
.position-dot {
  box-shadow: 0 0 0 2px rgba(255, 250, 243, 0.9);
}

.position-executive.position-chip { background: rgba(15, 58, 47, 0.1); }
.position-executive.position-text { color: var(--ds-brand); }
.position-executive.position-border { border-color: rgba(15, 58, 47, 0.22); }
.position-executive.position-dot { background: var(--ds-brand); }

.position-principal.position-chip { background: rgba(26, 86, 69, 0.1); }
.position-principal.position-text { color: var(--ds-brand-soft); }
.position-principal.position-border { border-color: rgba(26, 86, 69, 0.22); }
.position-principal.position-dot { background: var(--ds-brand-soft); }

.position-senior.position-chip { background: rgba(47, 153, 115, 0.12); }
.position-senior.position-text { color: var(--ds-mint); }
.position-senior.position-border { border-color: rgba(47, 153, 115, 0.26); }
.position-senior.position-dot { background: var(--ds-mint); }

.position-associate.position-chip { background: rgba(75, 135, 179, 0.12); }
.position-associate.position-text { color: var(--ds-info); }
.position-associate.position-border { border-color: rgba(75, 135, 179, 0.22); }
.position-associate.position-dot { background: var(--ds-info); }

.position-staff.position-chip { background: rgba(214, 138, 58, 0.12); }
.position-staff.position-text { color: var(--ds-status-warning); }
.position-staff.position-border { border-color: rgba(214, 138, 58, 0.24); }
.position-staff.position-dot { background: var(--ds-status-warning); }

.position-member.position-chip { background: rgba(102, 117, 109, 0.12); }
.position-member.position-text { color: var(--ds-text-soft); }
.position-member.position-border { border-color: rgba(102, 117, 109, 0.24); }
.position-member.position-dot { background: var(--ds-text-soft); }

.position-unset.position-chip { background: rgba(183, 170, 147, 0.18); }
.position-unset.position-text { color: #8b7e69; }
.position-unset.position-border { border-color: rgba(183, 170, 147, 0.3); }
.position-unset.position-dot { background: #b7aa93; }

.popup-wrap {
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px;
}

.popup-head {
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(217, 197, 168, 0.62);
  border-radius: 24px;
  background: linear-gradient(180deg, #fff8ee 0%, #f4e9d7 100%);
  box-shadow: 0 18px 36px rgba(15, 58, 47, 0.08);
}

.popup-title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--ds-ink);
}

.popup-sub {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ds-text-muted);
}

.inline-panel {
  padding: 0;
  display: grid;
  gap: 14px;
}

.project-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(280px, 0.72fr);
  gap: 10px;
  align-items: start;
}

.project-head-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.project-contact-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
}

.inline-card,
.ledger-block,
.popup-wrap .ledger-block.collect {
  background: rgba(255, 250, 243, 0.98) !important;
  border: 1px solid rgba(217, 197, 168, 0.56) !important;
  border-radius: 24px !important;
  box-shadow: 0 16px 32px rgba(15, 58, 47, 0.08) !important;
}

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

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

.kv {
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8 0%, #f4e9d7 100%);
  border: 1px solid rgba(217, 197, 168, 0.46);
}

.kvk,
.summary-label {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6b3d;
}

.kvv {
  font-size: 15px;
  font-weight: 900;
  color: var(--ds-ink);
  line-height: 1.35;
  word-break: keep-all;
}

.summary-note {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ds-text-muted);
  line-height: 1.45;
}

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

.summary-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdf8 0%, #f4e9d7 100%);
  border: 1px solid rgba(217, 197, 168, 0.46);
  box-shadow: none;
}

.summary-card.receivable {
  background: linear-gradient(180deg, var(--ds-danger-soft) 0%, rgba(255, 248, 238, 0.98) 100%);
  border-color: var(--ds-danger-line);
}

.summary-value {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 900;
  color: var(--ds-ink);
  line-height: 1.15;
}

.summary-card.receivable .summary-value {
  color: var(--ds-status-danger);
}

.project-progress {
  margin-top: 10px;
  height: 12px;
  border-radius: var(--ds-radius-pill);
  overflow: hidden;
  background: rgba(217, 197, 168, 0.48);
  box-shadow: inset 0 1px 2px rgba(15, 58, 47, 0.08);
}

.progress .bar {
  height: 100%;
  border-radius: var(--ds-radius-pill);
  background: linear-gradient(90deg, var(--ds-brand-soft) 0%, var(--ds-mint) 100%);
  box-shadow: 0 8px 18px rgba(47, 153, 115, 0.18);
}

.ledger-stack {
  display: grid;
  gap: 12px;
}

.ledger-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(217, 197, 168, 0.38) !important;
  background: linear-gradient(180deg, #fffdf8 0%, #f4e9d7 100%) !important;
}

.ledger-head-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.ledger-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff8ee 0%, #f2dec0 100%) !important;
  color: var(--ds-accent-strong) !important;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.ledger-name {
  font-size: 16px;
  font-weight: 900;
  color: var(--ds-ink) !important;
  line-height: 1.2;
}

.ledger-sub {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ds-text-muted) !important;
  line-height: 1.45;
}

.ledger-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: var(--ds-radius-pill);
  background: var(--ds-brand-soft-surface) !important;
  border: 1px solid var(--ds-brand-soft-line) !important;
  color: var(--ds-brand-soft) !important;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.ledger-table-wrap {
  padding: 0 16px 16px;
  background: transparent !important;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent !important;
}

.ledger-table thead th {
  padding: 12px 10px;
  background: var(--ds-brand) !important;
  color: #fff5e6 !important;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  border-right: 1px solid rgba(242, 196, 132, 0.18) !important;
}

.ledger-table thead th:last-child {
  border-right: 0;
}

.ledger-table tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(217, 197, 168, 0.34) !important;
  vertical-align: top;
  font-size: 13px;
  font-weight: 800;
  color: var(--ds-ink) !important;
  background: rgba(255, 250, 243, 0.72) !important;
}

.ledger-table tbody tr:last-child td {
  border-bottom: 0;
}

.ledger-main {
  display: block;
  color: var(--ds-ink) !important;
  font-weight: 900;
}

.ledger-muted,
.ledger-note {
  display: block;
  margin-top: 4px;
  color: var(--ds-text-muted) !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.ledger-amount {
  font-weight: 900;
  text-align: right;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid rgba(217, 197, 168, 0.5);
  background: rgba(255, 250, 243, 0.96);
  color: #17392f;
  font-size: 12px;
  font-weight: 900;
}

.badge.badge-baron {
  background: var(--ds-brand-soft-surface);
  border-color: var(--ds-brand-soft-line);
  color: var(--ds-brand-soft);
}

.badge.badge-family {
  background: var(--ds-accent-soft-surface);
  border-color: var(--ds-accent-soft-line);
  color: var(--ds-status-warning);
}

.badge.ok {
  background: var(--ds-success-soft);
  border-color: var(--ds-success-line);
  color: var(--ds-brand-soft);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #17392f;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.project-link:hover {
  color: #0f6a55;
}

.member-form-label {
  color: var(--ds-text-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.member-form-input,
.member-form-select,
.member-form-time {
  border: 1px solid var(--ds-line-soft);
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.92);
  color: var(--ds-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.member-form-input:focus,
.member-form-select:focus,
.member-form-time:focus {
  border-color: rgba(47, 153, 115, 0.45);
  box-shadow: 0 0 0 4px rgba(47, 153, 115, 0.1);
}

.modal-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--ds-radius-pill);
  font-size: 12px;
  font-weight: 900;
  border: 1px solid transparent;
}

.modal-btn-cancel {
  background: rgba(255, 250, 243, 0.96);
  border-color: var(--ds-line);
  color: var(--ds-text-soft);
}

.modal-btn-save {
  background: var(--ds-brand-soft);
  border-color: rgba(15, 58, 47, 0.22);
  color: #fffaf3;
}

.modal-btn-delete {
  background: rgba(169, 72, 50, 0.12);
  border-color: rgba(169, 72, 50, 0.24);
  color: var(--ds-status-danger);
}

.modal-btn-close {
  background: rgba(242, 196, 132, 0.18);
  border-color: rgba(214, 138, 58, 0.24);
  color: var(--ds-status-warning);
}

.seatmap-actions .ghost-button {
  min-height: 40px;
  padding: 0 16px;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--ds-radius-pill);
  font-size: 12px;
  letter-spacing: -0.01em;
  box-shadow: var(--ds-shadow-soft);
}

.ds-type-page-title {
  margin: 0;
  color: var(--ds-ink);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-type-page-title);
  font-weight: var(--ds-font-weight-strong);
  line-height: var(--ds-line-height-tight);
  letter-spacing: var(--ds-letter-spacing);
}

.ds-type-section-title {
  margin: 0;
  color: var(--ds-ink);
  font-family: var(--ds-font-sans);
  font-size: var(--ds-type-section-title);
  font-weight: var(--ds-font-weight-strong);
  line-height: var(--ds-line-height-tight);
  letter-spacing: var(--ds-letter-spacing);
}

.ds-type-card-title,
.ds-type-modal-title {
  margin: 0;
  color: var(--ds-ink);
  font-family: var(--ds-font-sans);
  font-weight: var(--ds-font-weight-strong);
  line-height: var(--ds-line-height-tight);
  letter-spacing: var(--ds-letter-spacing);
}

.ds-type-card-title {
  font-size: var(--ds-type-card-title);
}

.ds-type-modal-title {
  font-size: var(--ds-type-modal-title);
}

.ds-type-body {
  color: var(--ds-text-soft);
  font-size: var(--ds-type-body);
  font-weight: var(--ds-font-weight-medium);
  line-height: var(--ds-line-height-body);
  letter-spacing: var(--ds-letter-spacing);
}

.ds-type-caption {
  color: var(--ds-text-muted);
  font-size: var(--ds-type-caption);
  font-weight: var(--ds-font-weight-bold);
  line-height: var(--ds-line-height-body);
  letter-spacing: var(--ds-letter-spacing);
}

.ds-type-micro {
  color: var(--ds-text-muted);
  font-size: var(--ds-type-micro);
  font-weight: var(--ds-font-weight-strong);
  line-height: var(--ds-line-height-body);
  letter-spacing: var(--ds-letter-spacing);
}

.ds-section-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  color: var(--ds-text-soft);
  font-size: var(--ds-type-caption);
  font-weight: var(--ds-font-weight-strong);
  line-height: 1;
  letter-spacing: var(--ds-letter-spacing);
  text-transform: uppercase;
}

.ds-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-2);
  min-height: var(--ds-control-height-md);
  padding: 0 var(--ds-space-4);
  border: 1px solid transparent;
  border-radius: var(--ds-radius-sm);
  font: inherit;
  font-size: var(--ds-type-caption);
  font-weight: var(--ds-font-weight-strong);
  letter-spacing: var(--ds-letter-spacing);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ds-action--primary {
  border-color: rgba(15, 58, 47, 0.24);
  background: var(--ds-brand);
  color: #fffaf3;
}

.ds-action--secondary {
  border-color: var(--ds-line-soft);
  background: var(--ds-surface-tint-strong);
  color: var(--ds-brand-deep);
}

.ds-action--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ds-text-muted);
}

.ds-action--danger {
  border-color: var(--ds-danger-line);
  background: var(--ds-danger-soft);
  color: var(--ds-status-danger);
}

.ds-action:hover:not(:disabled) {
  box-shadow: var(--ds-shadow-soft);
}

.ds-action:focus-visible {
  outline: 0;
  box-shadow: var(--ds-focus-ring);
}

.ds-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.ds-state {
  display: grid;
  place-items: center;
  min-height: 72px;
  padding: var(--ds-space-5);
  border: 1px solid var(--ds-state-line);
  border-radius: var(--ds-radius-md);
  background: var(--ds-state-surface);
  color: var(--ds-state-text);
  font-size: var(--ds-type-body);
  font-weight: var(--ds-font-weight-bold);
  line-height: var(--ds-line-height-body);
  text-align: center;
}

.ds-state--inline {
  min-height: 0;
  padding: var(--ds-space-3) var(--ds-space-4);
  border-radius: var(--ds-radius-sm);
}

.ds-state--loading {
  color: var(--ds-text-soft);
}

.ds-state--empty {
  color: var(--ds-text-muted);
}

.ds-state--error {
  border-color: var(--ds-danger-line);
  background: var(--ds-danger-soft);
  color: var(--ds-status-danger);
}

.ds-modal-backdrop {
  background: var(--ds-overlay);
  backdrop-filter: var(--ds-backdrop-blur);
  -webkit-backdrop-filter: var(--ds-backdrop-blur);
}

.ds-modal-surface {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ds-line-soft);
  border-radius: var(--ds-radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(246, 237, 221, 0.96));
  color: var(--ds-ink);
  box-shadow: var(--ds-shadow-hero);
}

.ds-modal-surface::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--ds-brand), var(--ds-mint), var(--ds-accent));
}

.ds-modal-head {
  display: grid;
  gap: var(--ds-space-2);
  padding: var(--ds-space-6) 28px var(--ds-space-4);
  border-bottom: 1px solid var(--ds-line-soft);
}

.ds-modal-body {
  padding: var(--ds-space-5) 28px;
}

.ds-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--ds-space-2);
  padding: var(--ds-space-4) 28px var(--ds-space-5);
  border-top: 1px solid var(--ds-line-soft);
}

@media (max-width: 1180px) {
  .project-head-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .popup-wrap {
    padding: 14px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .ledger-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .ledger-pill {
    white-space: normal;
  }

  .ledger-table-wrap {
    padding: 0 10px 12px;
    overflow-x: auto;
  }
}
