/* Proje bazlı maliyet: fatura giriş ekranı canlandırması + 3B proje sütunları + rapor */
.pc { --p0: #0B7A75; --p1: #B26A00; }
.pc__grid { position: relative; margin-top: clamp(28px, 5vh, 48px); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }

.inv { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-2); padding: 14px 16px 16px; box-shadow: 0 24px 50px -36px rgba(20, 23, 28, .5); font-size: 13.5px; }
.inv__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.inv__bar strong { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: -.01em; }
.inv__save { padding: 6px 12px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 600; transition: background-color .25s, transform .2s; }
.inv__save.is-pressed { background: var(--teal-deep); transform: scale(.95); }
.inv__sec { margin: 14px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }

.inv__head { display: grid; grid-template-columns: 1fr .8fr 1.1fr 1.9fr 1.2fr; gap: 8px; }
.inv__head dt, .f small, .inv__tot dt { display: block; font-size: 10.5px; color: var(--ink-3); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv__head dd, .f b {
  display: block; margin-top: 2px; padding: 5px 7px; min-height: 28px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--paper);
  font-weight: 500; font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.inv__lines { display: grid; gap: 6px; }
.inv__line {
  display: grid; gap: 6px; padding: 6px; border-radius: 8px; border: 1px solid transparent;
  grid-template-columns: minmax(0, 1.55fr) .8fr .95fr 1.3fr minmax(0, 1.5fr) minmax(0, 1.2fr);
  transition: background-color .3s, border-color .3s, opacity .3s;
}
.f { min-width: 0; }
.f--qty b, .f--price b, .f--base b { text-align: right; }
.f--prj b { font-weight: 700; color: var(--card); border-color: transparent; }
.f--p0 b { background: var(--p0); }
.f--p1 b { background: var(--p1); }
.pc.is-live .inv__line { opacity: .38; }
.pc.is-live .inv__line.is-on { opacity: 1; background: color-mix(in srgb, var(--teal) 10%, transparent); border-color: color-mix(in srgb, var(--teal-deep) 45%, transparent); }
.pc.is-live .inv__line.is-done { opacity: 1; }

.inv__tot { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
.inv__tot div { min-width: 104px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; text-align: right; }
.inv__tot dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.inv__tot div:last-child { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.inv__tot div:last-child dt { color: inherit; opacity: .72; }

.inv__done { margin-top: 12px; display: grid; gap: 6px; }
.inv__done li { position: relative; padding-left: 24px; font-size: 13.5px; font-weight: 600; color: var(--teal-deep); transition: opacity .35s, transform .4s var(--ease); }
.inv__done li::before { content: ''; position: absolute; left: 2px; top: 3px; width: 12px; height: 7px; border-left: 2.4px solid currentColor; border-bottom: 2.4px solid currentColor; transform: rotate(-45deg); }
.pc.is-live .inv__done li { opacity: 0; transform: translateY(6px); }
.pc.is-live .inv__done li.is-on { opacity: 1; transform: none; }

/* --- 3B görünüm + rapor --- */
.pc__view { position: relative; height: clamp(260px, 36vw, 400px); }
.pc__view canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.no-webgl .pc__view { display: none; }
.pc__tag { position: absolute; left: 0; top: 0; padding: 3px 9px; border-radius: 6px; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; opacity: 0; will-change: transform; }
.pc__tag--0 { background: var(--p0); }
.pc__tag--1 { background: var(--p1); }

.rep { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.rep caption { text-align: left; padding-bottom: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.rep caption small { margin-left: 6px; font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--ink-3); }
.rep th, .rep td { padding: 9px 6px; border-top: 1px solid var(--line); text-align: right; white-space: nowrap; }
.rep thead th { font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.rep th:first-child { text-align: left; }
.rep tbody th { font-weight: 700; }
.rep__dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 2px; }
.rep__dot--0 { background: var(--p0); }
.rep__dot--1 { background: var(--p1); }
.rep td[data-k="pl"], .rep td[data-k="rate"] { font-weight: 700; color: var(--teal-deep); }
.rep td.is-bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { background: color-mix(in srgb, var(--teal) 28%, transparent); } }

.pc__replay { margin-top: 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-1); background: none; font-weight: 600; font-size: 14px; cursor: pointer; }
.pc__replay:hover { border-color: var(--ink); }
.pc__chips { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pc-chip { position: absolute; left: 0; top: 0; padding: 3px 8px; border-radius: 6px; color: #fff; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; opacity: 0; }

.pc__note { margin-top: 14px; font-size: 12.5px; color: var(--ink-3); }
.pc__h3 { margin: clamp(36px, 7vh, 64px) 0 16px; }
.pc__extra { margin-top: 20px; }
.pc__waai { margin-top: 22px; max-width: 46em; font-size: 16px; }
.wa-chip { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 6px 6px 6px 1px; background: var(--wa-out); color: var(--wa-ink); font-weight: 700; font-size: 13px; }

@media (max-width: 1000px) {
  .pc__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .inv { padding: 12px; }
  /* Dar ekranda fatura ve proje sütunları aynı anda görünsün diye ekran sadeleşir. */
  .inv__head, .inv__bar + .inv__sec { display: none; }
  .inv__lines { gap: 4px; }
  .inv__line { grid-template-columns: minmax(0, 1fr) minmax(0, .82fr) minmax(0, 1.12fr); gap: 5px; border-color: var(--line); padding: 5px; }
  .inv__line small { display: none; }
  .inv__line .f b { margin-top: 0; padding: 5px 6px; font-size: 12px; }
  .f--qty, .f--price, .f--cc { display: none; }
  .f--prj b { font-size: 10px; padding-inline: 4px; letter-spacing: -.01em; }
  .inv__tot { margin-top: 8px; }
  .inv__tot div { min-width: 0; flex: 1; padding: 5px 8px; }
  .inv__done { margin-top: 8px; gap: 3px; }
  .inv__done li { font-size: 12.5px; }
  .pc__view { height: 230px; }
  .rep { font-size: 12px; }
  .rep th, .rep td { padding: 7px 2px; }
  .rep th:first-child { white-space: normal; min-width: 5.5em; }
  .rep thead th { font-size: 9.5px; letter-spacing: 0; }
  .rep__dot { margin-right: 4px; }
  .rep caption small { display: block; margin: 2px 0 0; }
}
