/* ============================================================
   Caila Dev — Pricing pages (public + dashboard) shared bits
   ============================================================ */

.pp-body { background: var(--bg-0); min-height: 100vh; }
.pp-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 40% at 50% -5%, rgba(123,140,255,.1), transparent 60%); }
.pp-page { position: relative; z-index: 1; }

/* header reuse from landing .header */
.pp-hero { padding: clamp(40px,6vw,72px) 0 24px; }
.pp-hero .eyebrow { display: inline-block; margin-bottom: 14px; }
.pp-hero h1 { font-size: clamp(30px,4vw,46px); letter-spacing: -0.03em; margin-bottom: 12px; }
.pp-hero .lead { max-width: 60ch; }

/* notice bar (public limitations) */
.pp-notice { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r-card);
  background: linear-gradient(135deg, rgba(91,184,255,.07), var(--surface-0)); box-shadow: inset 0 0 0 1px var(--border-glow);
  margin: 18px 0 24px; flex-wrap: wrap; }
.pp-notice .pn-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--jay-gradient); display: grid; place-items: center; color: #0A0B12; flex: 0 0 auto; }
.pp-notice .pn-t { font-size: 13.5px; color: var(--text-1); flex: 1; min-width: 240px; }
.pp-notice .pn-t b { color: var(--text-0); }

/* toolbar: filters */
.pp-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pp-search { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-radius: var(--r-ctrl);
  background: var(--surface-0); box-shadow: inset 0 0 0 1px var(--border-0); color: var(--text-3); font-size: 13.5px; min-width: 240px; flex: 1; max-width: 360px; }
.pp-search input { background: none; border: none; outline: none; color: var(--text-0); font-size: 13.5px; flex: 1; font-family: var(--font-ui); }
.pp-search input::placeholder { color: var(--text-3); }
.pp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pp-chip { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); padding: 7px 12px; border-radius: var(--r-pill);
  background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-0); transition: all var(--dur-2); white-space: nowrap; }
.pp-chip:hover { color: var(--text-0); }
.pp-chip.on { color: var(--text-0); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-glow); }
.pp-count { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-3); }
.pp-export { display: inline-flex; align-items: center; gap: 7px; }

/* export button (locked on public) */
.btn-locked { position: relative; }
.btn-locked .lock { opacity: .7; }

/* price table */
.pp-tablewrap { border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--border-0); overflow: hidden; background: var(--surface-0); }
.pp-scroll { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; min-width: 900px; }
.ptable th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--border-0); font-weight: 500; white-space: nowrap; position: sticky; top: 0; background: var(--surface-0); z-index: 2; }
.ptable th.sortable { cursor: pointer; user-select: none; }
.ptable th.sortable:hover { color: var(--text-1); }
.ptable th .sort-ar { color: var(--jay-from); margin-left: 3px; }
.ptable th.right, .ptable td.right { text-align: right; }
.ptable th.center, .ptable td.center { text-align: center; }
.ptable td { padding: 11px 14px; border-bottom: 1px solid var(--border-0); font-size: 13px; color: var(--text-1); white-space: nowrap; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable tbody tr { transition: background var(--dur-1); }
.ptable tbody tr:hover td { background: rgba(255,255,255,.015); }
.ptable .p-prov { display: inline-flex; align-items: center; gap: 8px; }
.ptable .p-pl { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #0A0B12; flex: 0 0 auto; }
.ptable .p-id { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-0); }
.ptable .p-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ptable .p-num .d { color: var(--text-3); }
.ptable .p-num.out { color: var(--text-2); }
.ptable .p-num.dim { color: var(--text-3); }
.ptable .p-cap { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; }
.ptable .p-cap.yes { color: var(--success); }
.ptable .p-cap.no { color: var(--text-3); opacity: .4; }
.ptable .p-mod { font-family: var(--font-mono); font-size: 10.5px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-0); }
.ptable .p-act { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); padding: 4px 9px; border-radius: var(--r-ctrl); transition: all var(--dur-1); }
.ptable .p-act:hover { color: var(--jay-from); background: var(--surface-2); }
.st-dot { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; }
.st-dot .d { width: 7px; height: 7px; border-radius: 50%; }
.st-ok { color: var(--success); } .st-ok .d { background: var(--success); }
.st-warn { color: var(--warning); } .st-warn .d { background: var(--warning); }

/* dashboard pricing view toggle */
.pricing-views { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-ctrl); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-0); }
.pricing-views button { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-2); padding: 7px 16px; border-radius: 5px; transition: all var(--dur-2); display: inline-flex; align-items: center; gap: 7px; }
.pricing-views button.on { color: var(--text-0); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-1); }

/* export menu */
.export-wrap { position: relative; }
.export-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; background: var(--surface-1); border-radius: var(--r-ctrl); box-shadow: var(--shadow-pop); padding: 4px; min-width: 180px; display: none; }
.export-menu.open { display: block; }
.export-menu button { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 6px; font-size: 13px; color: var(--text-1); transition: background var(--dur-1); }
.export-menu button:hover { background: var(--surface-2); }
.export-menu button .ext { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }

/* ---------------- CALCULATOR ---------------- */
.calc { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
.calc-form { background: var(--surface-0); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--border-0); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.calc-field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.calc-select, .calc-input { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-ctrl); background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--border-1); font-family: var(--font-mono); font-size: 13px; color: var(--text-0); }
.calc-input input { background: none; border: none; outline: none; color: var(--text-0); font-family: var(--font-mono); font-size: 13px; width: 100%; text-align: right; }
.calc-select .p-pl { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #0A0B12; }
.calc-select .chev { margin-left: auto; color: var(--text-3); }
.calc-result { background: linear-gradient(180deg, var(--surface-1), var(--surface-0)); border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--border-0); padding: 22px; }
.calc-big { display: flex; align-items: baseline; gap: 18px; margin-bottom: 8px; flex-wrap: wrap; line-height: 1.05; }
.calc-big .cb-rub { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 38px; font-weight: 600; color: var(--text-0); letter-spacing: -0.02em; white-space: nowrap; line-height: 1; }
.calc-big .cb-jt { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 20px; color: var(--warm); white-space: nowrap; line-height: 1; }
.calc-sub { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }
.calc-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.calc-bar-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; }
.calc-bar-row .cbl { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calc-bar-row .cbl.cur { color: var(--text-0); }
.calc-track { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.calc-fill { height: 100%; border-radius: var(--r-pill); background: var(--surface-3); transition: width var(--dur-3) var(--ease-out); }
.calc-fill.cur { background: var(--jay-gradient); }
.calc-bar-row .cbv { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-1); text-align: right; }
.calc-discount { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-card); background: linear-gradient(135deg, var(--warm-soft), transparent); box-shadow: inset 0 0 0 1px rgba(255,182,114,.3); margin-top: 16px; }
.calc-discount .cd-ic { color: var(--warm); flex: 0 0 auto; }
.calc-discount .cd-t { font-size: 13px; color: var(--text-1); flex: 1; }
.calc-discount .cd-t b { color: var(--warm); }
.calc-share { margin-top: 16px; display: flex; gap: 10px; align-items: center; }
.calc-share .share-link { flex: 1; font-family: var(--font-mono); font-size: 12px; color: var(--text-3); padding: 9px 12px; border-radius: var(--r-ctrl); background: var(--bg-0); box-shadow: inset 0 0 0 1px var(--border-0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; }
  .calc-bar-row { grid-template-columns: 110px 1fr 70px; }
}

.pricing-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 80;
  background: var(--surface-2); color: var(--text-0); font-family: var(--font-mono); font-size: 13px;
  padding: 11px 18px; border-radius: var(--r-ctrl); box-shadow: var(--shadow-pop);
  animation: toastIn .25s var(--ease-out); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
