/* ===== CALCULATOR MODES ===== */
.calc-mode-switch {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}
.calc-mode-btn {
  flex: 1;
  padding: 16px 20px;
  background: #faf8f5;
  border: 2px solid #e8e4df;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: 'Inter', sans-serif;
}
.calc-mode-btn:hover { border-color: #c4b8a5; }
.calc-mode-btn.active { border-color: #8a7d6b; background: #f5f0eb; }
.calc-mode-btn h4 { font-size: 15px; font-weight: 700; color: #2c2c2c; margin-bottom: 4px; }
.calc-mode-btn p { font-size: 12px; color: #888; margin: 0; }
.calc-mode-panel { display: none; }
.calc-mode-panel.active { display: block; }

/* ===== SPREADSHEET LAYOUT ===== */
.ss-section {
  margin-bottom: 32px;
  background: #fff;
  border: 1px solid #e8e4df;
  border-radius: 10px;
  overflow: hidden;
}
.ss-header {
  background: #3d3a36;
  color: #f5f0eb;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ss-body { padding: 20px; }
.ss-row {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
  align-items: center;
}
.ss-row-2 { grid-template-columns: 1fr 1fr; }
.ss-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.ss-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.ss-row-5 { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; }
.ss-row-23 { grid-template-columns: 2fr 3fr; }
.ss-row-32 { grid-template-columns: 3fr 2fr; }

.ss-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}
.ss-value {
  font-size: 14px;
  font-weight: 700;
  color: #2c2c2c;
  padding: 8px 12px;
  background: #faf8f5;
  border-radius: 6px;
  text-align: right;
}
.ss-value.highlight {
  background: #f0ece6;
  color: #8a7d6b;
  font-size: 16px;
}
.ss-value.green { color: #067647; background: #ecfdf3; }
.ss-value.red { color: #b42318; background: #fef3f2; }
.ss-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  text-align: right;
  outline: none;
  transition: border-color 0.2s;
}
.ss-input:focus { border-color: #8a7d6b; }
.ss-input-sm { max-width: 120px; }
.ss-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  resize: vertical;
  min-height: 60px;
  outline: none;
}
.ss-textarea:focus { border-color: #8a7d6b; }
.ss-divider {
  border: none;
  border-top: 1px solid #f0ece6;
  margin: 16px 0;
}
.ss-note {
  font-size: 12px;
  color: #999;
  font-style: italic;
}
.ss-sub-header {
  font-size: 13px;
  font-weight: 700;
  color: #8a7d6b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 16px 0 10px;
}
.ss-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ss-table th {
  text-align: left;
  padding: 8px 10px;
  background: #faf8f5;
  font-weight: 600;
  color: #555;
  border-bottom: 1px solid #e8e4df;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ss-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f5f0eb;
  color: #2c2c2c;
}
.ss-table td:not(:first-child) { text-align: right; }
.ss-table .ss-total td {
  font-weight: 700;
  border-top: 2px solid #e8e4df;
  background: #faf8f5;
}
.ss-table input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  text-align: right;
  outline: none;
}
.ss-table input:focus { border-color: #8a7d6b; }

/* Score display */
.calc-score-box {
  background: #2c2a27;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin: 24px 0;
}
.calc-score-big {
  font-size: 56px;
  font-weight: 800;
  color: #c4b8a5;
}
.calc-score-label {
  font-size: 14px;
  color: rgba(245,240,235,0.5);
  margin-top: 4px;
}
.calc-score-verdict {
  font-size: 18px;
  font-weight: 700;
  margin-top: 12px;
}
.calc-score-verdict.strong { color: #32d583; }
.calc-score-verdict.moderate { color: #fdb022; }
.calc-score-verdict.weak { color: #f97066; }

/* Artistic / Festival score box */
.calc-score-box-artistic {
  background: linear-gradient(135deg, #1e1b2e, #2a2640);
  border: 1px solid rgba(124,58,237,0.3);
}
.calc-score-box-artistic .calc-score-big { color: #c4b0e0; }
.calc-score-box-artistic .calc-score-label { color: rgba(196,176,224,0.5); }
.calc-score-verdict.art-strong { color: #a78bfa; }
.calc-score-verdict.art-moderate { color: #c084fc; }
.calc-score-verdict.art-weak { color: #f97066; }
.calc-score-verdict.art-auto { color: #818cf8; }

/* Score range confidence note */
.calc-score-range-note {
  font-size: 11px;
  color: rgba(245,240,235,0.35);
  margin-top: 6px;
  font-style: italic;
}

/* Market Risk Flag radio rows */
.mr-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.mr-label {
  flex: 1;
  font-size: 13px;
  color: #2c2c2c;
  line-height: 1.4;
}
.mr-radios {
  display: flex;
  gap: 4px;
  min-width: 280px;
}
.mr-radio {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 6px;
  border: 2px solid #e8e4df;
  transition: all 0.15s;
}
.mr-radio input { display: none; }
.mr-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ccc;
  transition: all 0.15s;
}
.mr-none .mr-dot { border-color: #ccc; }
.mr-low .mr-dot { border-color: #16a34a; }
.mr-moderate .mr-dot { border-color: #d97706; }
.mr-high .mr-dot { border-color: #dc2626; }
/* Checked state */
.mr-radio:has(input:checked) { border-color: transparent; }
.mr-none:has(input:checked) { background: #f0ede8; border-color: #ccc; }
.mr-none:has(input:checked) .mr-dot { background: #999; border-color: #999; }
.mr-low:has(input:checked) { background: #ecfdf3; border-color: #16a34a; }
.mr-low:has(input:checked) .mr-dot { background: #16a34a; border-color: #16a34a; }
.mr-moderate:has(input:checked) { background: #fffbeb; border-color: #d97706; }
.mr-moderate:has(input:checked) .mr-dot { background: #d97706; border-color: #d97706; }
.mr-high:has(input:checked) { background: #fef2f2; border-color: #dc2626; }
.mr-high:has(input:checked) .mr-dot { background: #dc2626; border-color: #dc2626; }
/* Legend labels */
.mr-legend-label {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #888;
  font-weight: 600;
}

/* Benchmark indicator dot (GIGO detection) */
.benchmark-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}

/* Pathway recommendation banner */
.calc-pathway-banner {
  background: #f9f7f4;
  border: 1px solid #e8e4df;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
  margin: 0 0 24px;
  color: #2c2c2c;
}
.calc-pathway-banner.pathway-studio { border-left: 4px solid #32d583; }
.calc-pathway-banner.pathway-festival { border-left: 4px solid #a78bfa; }
.calc-pathway-banner.pathway-dual { border-left: 4px solid #fdb022; }
.calc-pathway-banner.pathway-develop { border-left: 4px solid #f97066; }

/* Comparative row */
.comp-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  margin-bottom: 6px;
}

/* Hover tooltips */
[data-tooltip] {
  position: relative;
  cursor: help;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 100;
  background: #2c2a27;
  color: #f5f0eb;
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: normal;
  width: max-content;
  max-width: 420px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
[data-tooltip]:hover::after {
  opacity: 1;
}
.ss-header[data-tooltip]::after {
  left: 20px;
  top: calc(100% + 2px);
}
.ss-table td[data-tooltip]::after,
.ss-table th[data-tooltip]::after {
  left: 0;
  top: calc(100% + 2px);
}

/* Copyright */
.ss-copyright {
  text-align: right;
  font-size: 11px;
  color: #bbb;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0ece6;
}

/* ===== RECOUPMENT WATERFALL ===== */
.wf-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.wf-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wf-bar-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  min-width: 140px;
  text-align: right;
  flex-shrink: 0;
}
.wf-bar-track {
  flex: 1;
  height: 24px;
  background: #f0ece7;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.wf-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  transition: width 0.5s ease;
  min-width: fit-content;
}
.wf-bar-amount {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  min-width: 70px;
  flex-shrink: 0;
}
.wf-priority { font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; font-weight: 700; }
.wf-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}
.wf-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  border-bottom: 2px solid #e8e4df;
}
.wf-table td {
  padding: 8px 8px;
  border-bottom: 1px solid #f0ece7;
  color: #444;
}
.wf-table tr:last-child td { border-bottom: none; font-weight: 700; color: #2c2c2c; }
.wf-table .wf-pos { font-size: 11px; color: #999; font-weight: 600; }
.wf-table .wf-amount { text-align: right; font-weight: 600; }
.wf-table .wf-pct { text-align: right; color: #8a7d6b; font-size: 12px; }
.wf-empty { text-align: center; color: #999; padding: 32px; font-size: 14px; }

@media (max-width: 768px) {
  .calc-mode-switch { flex-direction: column; }
  .ss-row-4, .ss-row-5 { grid-template-columns: 1fr 1fr; }
  .ss-row-3 { grid-template-columns: 1fr; }
  .wf-bar-label { min-width: 100px; font-size: 11px; }
}

/* ===== Confidence Tier Selects ===== */
.ss-conf-select {
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: center;
  min-width: 90px;
  transition: all 0.2s;
}
.ss-conf-select[data-conf="confirmed"] {
  background: #ecfdf3;
  color: #067647;
  border-color: #a6f4c5;
}
.ss-conf-select[data-conf="soft"] {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.ss-conf-select[data-conf="assumed"] {
  background: #f5f0eb;
  color: #999;
  border-color: #e8e4df;
}
.ss-conf-select:focus { box-shadow: 0 0 0 2px rgba(138,125,107,0.2); }

/* Financing Confidence Summary */
.fin-conf-summary {
  display: flex;
  gap: 12px;
  margin: 12px 0;
  font-size: 12px;
}
.fin-conf-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.fin-conf-pill.confirmed { background: #ecfdf3; color: #067647; }
.fin-conf-pill.soft { background: #fffbeb; color: #b45309; }
.fin-conf-pill.assumed { background: #f5f0eb; color: #999; }
.fin-conf-pill .pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.fin-conf-pill.confirmed .pill-dot { background: #16a34a; }
.fin-conf-pill.soft .pill-dot { background: #f59e0b; }
.fin-conf-pill.assumed .pill-dot { background: #ccc; }

/* ===== Financing Readiness Panel ===== */
.fin-ready-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0ece6;
}
.fin-ready-row:last-child { border-bottom: none; }
.fin-ready-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.fin-ready-icon.pass { background: #ecfdf3; color: #16a34a; }
.fin-ready-icon.fail { background: #fef2f2; color: #dc2626; }
.fin-ready-label { flex: 1; font-size: 13px; font-weight: 600; color: #2c2c2c; }
.fin-ready-value { font-size: 12px; font-weight: 600; text-align: right; min-width: 100px; }
.fin-ready-banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.fin-ready-banner.ready { background: #ecfdf3; color: #16a34a; border: 1px solid #a6f4c5; }
.fin-ready-banner.conditional { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.fin-ready-banner.not-ready { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ===== Cashflow Timeline ===== */
.cf-timeline {
  position: relative;
  margin: 8px 0 16px;
}
.cf-phase-bar {
  display: flex;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}
.cf-phase-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  padding: 2px 4px;
  min-width: 40px;
  transition: width 0.3s;
}
.cf-phase-seg .cf-phase-label { font-size: 9px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }
.cf-phase-seg .cf-phase-amount { font-size: 12px; font-weight: 700; }
.cf-gap-row {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}
.cf-gap-seg { transition: width 0.3s; }
.cf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 11px;
  color: #555;
}
.cf-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== Proof Upload System ===== */
.proof-upload-area {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 100px;
}
.proof-upload-area.proof-has-files {
  flex-direction: column;
  align-items: flex-start;
}
.proof-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  color: #4a5acd;
  background: #eef0ff;
  border: 1px solid #d5d9f0;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.proof-upload-btn:hover { background: #dde1f7; }
.proof-file-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}
.proof-file-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  background: #faf8f5;
  border-radius: 4px;
  font-size: 11px;
}
.proof-file-icon { font-size: 12px; flex-shrink: 0; }
.proof-file-name {
  color: #4a5acd;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.proof-file-name:hover { text-decoration: underline; }
.proof-file-size { color: #aaa; font-size: 10px; white-space: nowrap; }
.proof-file-delete {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
  line-height: 1;
  margin-left: auto;
}
.proof-file-delete:hover { color: #b42318; }
.proof-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: #ecfdf3;
  color: #067647;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.proof-badge-empty {
  display: inline-flex;
  padding: 2px 8px;
  background: #f5f0eb;
  color: #aaa;
  border-radius: 10px;
  font-size: 10px;
  white-space: nowrap;
}
/* Greenlight proof styling */
.gl-proof-area {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #e8e4df;
}
