/* ========================================================================
   Atelier Payroll — product page (product 1)
   "Financial Atelier" vibe: editorial, deep indigo, asymmetry
   ======================================================================== */

.p1-page {
  --accent: var(--p1-primary);
  --accent-2: var(--p1-primary-2);
  --ink: var(--p1-ink);
}
[data-theme="dark"] .p1-page { --ink: #e5ecf8; }

/* Chrome override — darker tint for product identity */
.chrome-p1 {
  background: color-mix(in oklab, var(--ubs-bg) 72%, transparent);
}
.mark-p1 {
  background: linear-gradient(135deg, var(--p1-primary), var(--p1-primary-2)) !important;
}
.chrome-p1 .brand em {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--p1-primary);
  margin-left: 2px;
}

.btn-p1 {
  background: linear-gradient(135deg, var(--p1-primary), var(--p1-primary-2)) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 8px 22px rgba(0,195,137,.28) !important;
}
.p1-title {
  color: var(--p1-ink);
}
[data-theme="dark"] .p1-title { color: #f0f4fc; }

/* Editorial serif italic inline in the big title */
.p1-title em {
  font-family: var(--font-display);
  font-style: normal; font-weight: 700;
  color: var(--p1-primary);
}

/* ── Hero ── */
.p1-hero {
  padding: 80px 0 120px;
  background:
    radial-gradient(1100px 520px at 85% -20%, rgba(0,195,137,.09), transparent 70%),
    var(--ubs-bg);
}
.p1-hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: end;
}

.p1-hero-aside { padding-bottom: 12px; }
.p1-edit-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 36px 36px 32px;
  box-shadow: var(--shadow-ambient);
  transform: rotate(-1deg);
  position: relative;
}
[data-theme="dark"] .p1-edit-card { background: #121926; }
.p1-edit-top {
  display: flex; justify-content: space-between; align-items: center;
}
.p1-edit-top .mono { font-size: 10px; letter-spacing: .18em; color: var(--ubs-ink-3); }
.p1-chip {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em;
  background: rgba(0,61,155,.08); color: var(--p1-primary);
  padding: 4px 10px; border-radius: 999px;
}
.p1-edit-title {
  margin-top: 32px;
  font-family: var(--font-display); font-style: normal;
  font-weight: 700; font-size: 22px; letter-spacing: -.02em; color: var(--p1-primary);
}
.p1-edit-amount {
  font-family: var(--font-display); font-weight: 600;
  font-size: 72px; line-height: 1;
  letter-spacing: -0.04em; color: var(--p1-ink);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 28px;
}
[data-theme="dark"] .p1-edit-amount { color: #f0f4fc; }
.p1-edit-amount sup { font-size: 24px; color: var(--ubs-ink-3); font-weight: 500; }
.p1-edit-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.p1-edit-meta div { display: grid; gap: 2px; }
.p1-edit-meta .mono { font-size: 9px; letter-spacing: .16em; color: var(--ubs-ink-3); }
.p1-edit-meta strong { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }

/* ── Features ── */
.p1-feat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 40px 48px; margin-top: 40px;
}
.p1-feat {
  position: relative;
  padding-top: 28px;
}
.p1-feat-n {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .15em; color: var(--p1-primary);
  display: block; margin-bottom: 16px;
}
.p1-feat .title { margin: 0 0 10px; color: var(--p1-ink); }
[data-theme="dark"] .p1-feat .title { color: #f0f4fc; }

/* ── Console Mockup ── */
.mock-label-row { margin-bottom: 20px; }

.p1-console {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 720px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--ubs-surface-low);
  box-shadow: var(--shadow-ambient);
}
[data-theme="dark"] .p1-console { background: #0c1220; }

.p1-side {
  background: #f2f4f6;
  padding: 24px 18px;
  display: flex; flex-direction: column; gap: 24px;
}
[data-theme="dark"] .p1-side { background: #0e1524; }
.p1-side-brand {
  display:flex; align-items:center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  padding: 4px 8px;
}
.p1-side-brand .mark { width: 26px; height: 26px; border-radius: 7px; display:grid; place-items:center; color:#fff; font-size:13px; font-weight:700;}
.p1-side-section { display: grid; gap: 2px; }
.p1-side-section .mono {
  font-size: 9px; letter-spacing: .18em; color: var(--ubs-ink-3);
  text-transform: uppercase; padding: 6px 10px;
}
.p1-nav {
  font-size: 13px; color: var(--ubs-ink-2);
  padding: 8px 10px; border-radius: 6px;
  cursor: pointer;
}
.p1-nav:hover { background: rgba(0,61,155,.05); color: var(--p1-primary); }
.p1-nav.active { background: #fff; color: var(--p1-primary); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
[data-theme="dark"] .p1-nav.active { background: #1b2538; }
.p1-side-foot { margin-top: auto; }
.p1-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: #fff; }
[data-theme="dark"] .p1-user { background: #1a2136; }
.p1-av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--p1-primary), var(--p1-primary-2));
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}
.p1-av.xs { width: 22px; height: 22px; font-size: 9px; }
.p1-user strong { display:block; font-size: 13px; }
.p1-user em { display:block; font-style: normal; font-size: 11px; color: var(--ubs-ink-3); }

.p1-stage {
  background: #ffffff;
  padding: 36px 40px 40px;
  overflow: hidden;
}
[data-theme="dark"] .p1-stage { background: #121926; }

.p1-stage-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 28px;
}
.p1-crumb {
  display: flex; gap: 8px; align-items: center;
  font-size: 12px; color: var(--ubs-ink-3);
}
.p1-crumb span:last-child { color: var(--p1-primary); }
.p1-stage-actions { display: flex; gap: 10px; }

.p1-kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.p1-kpi {
  background: var(--ubs-surface-low);
  border-radius: 12px;
  padding: 18px 20px;
}
[data-theme="dark"] .p1-kpi { background: #1a2136; }
.p1-kpi .mono { font-size: 9px; letter-spacing: .18em; color: var(--ubs-ink-3); }
.p1-kpi strong {
  display: block; margin: 6px 0 4px;
  font-family: var(--font-display); font-weight: 600;
  font-size: 24px; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--p1-ink);
}
[data-theme="dark"] .p1-kpi strong { color: #f0f4fc; }
.p1-kpi strong em { color: var(--ubs-ink-3); font-style: normal; font-weight: 500; }
.p1-kpi-delta { font-size: 11px; color: #16a34a; font-family: var(--font-mono); letter-spacing: .04em; }
.p1-kpi-delta.dim { color: var(--ubs-ink-3); }
.p1-kpi-delta.pos { color: #16a34a; }

.p1-panel { }
.p1-tabs {
  display: flex; gap: 4px;
  margin-bottom: 12px;
}
.p1-tab {
  padding: 10px 14px;
  font-size: 13px; color: var(--ubs-ink-3);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  display: inline-flex; gap: 8px; align-items: center;
}
.p1-tab span {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--ubs-surface-high); padding: 2px 6px; border-radius: 4px;
}
.p1-tab.active { color: var(--p1-primary); font-weight: 600; }
.p1-tab.active::after {
  content: ""; display: block;
}

.p1-tablewrap {
  background: var(--ubs-surface-low);
  border-radius: 12px;
  padding: 8px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.p1-tablewrap:focus-visible { outline: 2px solid var(--ubs-accent-2); outline-offset: 2px; }
[data-theme="dark"] .p1-tablewrap { background: #0e1524; }

.p1-ctrow {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr .7fr .9fr .9fr .9fr .9fr .9fr;
  gap: 12px;
  padding: 12px 12px;
  align-items: center;
  font-size: 13px;
  color: var(--p1-ink);
}
[data-theme="dark"] .p1-ctrow { color: #dee4f2; }
.p1-ctrow.alt { background: #ffffff; border-radius: 8px; }
[data-theme="dark"] .p1-ctrow.alt { background: #151d30; }
.p1-ctrow.p1-cthead { padding-top: 8px; padding-bottom: 8px; }
.p1-ctrow.p1-cthead span {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: .15em; color: var(--ubs-ink-3);
  text-transform: uppercase;
}
.p1-person { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.p1-ctrow .num { text-align: right; font-variant-numeric: tabular-nums; }
.p1-ctrow .dim { color: var(--ubs-ink-3); }
.p1-ctrow strong { font-weight: 600; color: var(--p1-ink); }
[data-theme="dark"] .p1-ctrow strong { color: #f0f4fc; }

.p1-pill {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .08em;
  padding: 3px 10px; border-radius: 999px;
  display: inline-block;
}
.p1-pill.ok { background: rgba(22,163,74,.1); color: #16a34a; }
.p1-pill.warn { background: rgba(234,179,8,.12); color: #b07a07; }

.p1-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 20px; padding: 0 12px;
}
.p1-foot .mono { font-size: 11px; color: var(--ubs-ink-3); }
.p1-foot-total { display: flex; gap: 14px; align-items: baseline; }
.p1-foot-total strong {
  font-family: var(--font-display); font-weight: 600;
  font-size: 22px; letter-spacing: -0.02em;
  color: var(--p1-primary);
  font-variant-numeric: tabular-nums;
}

/* CTA strip */
.p1-cta-strip {
  margin-top: 0;
  padding: 96px 0;
  background: linear-gradient(135deg, var(--p1-primary), var(--p1-ink));
  color: #fff;
}
.p1-cta-strip .btn-cta {
  background: #fff; color: var(--p1-primary);
  height: 52px; padding: 0 28px; font-size: 15px;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 12px 30px rgba(0,0,0,.2);
}

/* Responsive */
@media (max-width: 1080px) {
  .p1-hero-grid { grid-template-columns: 1fr; }
  .p1-edit-card { transform: none; }
  .p1-feat-grid { grid-template-columns: repeat(2, 1fr); }
  .p1-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .p1-console { grid-template-columns: 1fr; }
  .p1-side { display: none; }
  .p1-ctrow { min-width: 780px; }
}
@media (max-width: 680px) {
  .p1-feat-grid { grid-template-columns: 1fr; }
  .p1-kpi-row { grid-template-columns: 1fr; }
  .p1-stage-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .p1-edit-amount { font-size: 48px; }
  .chrome nav { display: none; }
}

/* ==========================================================================
   Bloques propios del outsourcing contable
   Reutilizan la tarjeta editorial y la rejilla de funciones de esta hoja.
   ========================================================================== */

.p0-tasks { list-style: none; margin: 18px 0 22px; padding: 0; display: grid; gap: 10px; }
.p0-tasks li {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-bottom: 10px; border-bottom: 1px solid var(--ubs-line);
  font-size: 13.5px; color: var(--ubs-ink-2);
}
.p0-tasks li:last-child { border-bottom: 0; padding-bottom: 0; }
.p0-tasks em {
  font-style: normal; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--p1-primary);
  white-space: nowrap;
}

.p0-team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.p0-person {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: 14px;
  background: var(--ubs-surface); border: 1px solid var(--ubs-line);
}
.p0-person > span:last-child { display: grid; gap: 2px; min-width: 0; }
.p0-person strong {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: -.01em;
}
.p0-person em { font-style: normal; font-size: 13px; color: var(--ubs-ink-3); }

@media (max-width: 760px) {
  .p0-team { grid-template-columns: 1fr; }
}
