:root {
  --background: 30 17% 97%;
  --foreground: 310 20% 20%;
  --primary: 309 25% 28%;
  --primary-foreground: 0 0% 100%;
  --border: 310 12% 87%;
  --radius: .7rem;
  --muted: 310 10% 94%;
  --muted-foreground: 310 7% 43%;
  --card: 0 0% 100%;
  --card-foreground: 310 20% 20%;
  --accent: 16 33% 75%;
  --accent-foreground: 310 20% 20%;
  --blush: #f0e2e4;
  --copper: #ac795e;
  --ink: #493548;
  --line: #e7e1e5;
  --quiet: #786e79;
  --ok-bg: #e8f5ee;
  --ok-fg: #1d6b42;
  --warn-bg: #fff5e6;
  --warn-fg: #9a5b00;
  --wa-green: #25D366;
  --wa-dark: #1da851;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: hsl(var(--background));
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  overflow-x: clip;
}
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: white;
  padding: 14px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform .2s, opacity .2s;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }

.test-banner {
  background: var(--warn-bg);
  color: var(--warn-fg);
  border-bottom: 1px solid #f0d7b0;
  text-align: center;
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 600;
}

.header {
  height: 96px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(5%, calc((100vw - 1200px)/2));
  background: white;
}
.brand { display: flex; gap: 12px; align-items: center; font-size: 20px; font-weight: 800; }
.brand > span { background: var(--ink); color: white; padding: 11px 13px; border-radius: 10px; display: inline-flex; align-items: center; }
.brand small { display: block; font-size: 9px; letter-spacing: 1.6px; margin-top: 4px; font-weight: 500; color: var(--quiet); }
nav { display: flex; align-items: center; gap: 30px; font-size: 12px; font-weight: 600; }
nav .private { border: 1px solid var(--line); padding: 11px 15px; border-radius: 6px; display: flex; gap: 8px; align-items: center; }

.page { max-width: 1200px; margin: auto; padding: 60px 24px; }
.intro { display: grid; grid-template-columns: 1fr 270px; align-items: center; gap: 80px; margin-bottom: 55px; }
.eyebrow { font-family: monospace; font-size: 10px; letter-spacing: 2px; color: var(--copper); text-transform: uppercase; }
h1 { font-family: 'Libre Caslon Display', Georgia, serif; font-size: 58px; line-height: 1.08; font-weight: 400; margin: 20px 0; }
h1 em { color: var(--copper); font-style: normal; }
p { color: var(--quiet); line-height: 1.8; }
.intro p { max-width: 510px; font-size: 15px; }
.paper {
  background: var(--blush);
  min-height: 220px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transform: rotate(3deg);
  box-shadow: 7px 7px 0 #e8dde1;
  text-align: center;
}
.paper span { font-family: 'Libre Caslon Display', serif; font-size: 25px; }
.paper small { font-size: 11px; color: var(--quiet); }

.form-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 30px; align-items: start; }
.form-paper { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 32px; }
.section-title { display: flex; align-items: center; gap: 18px; }
.number { font-family: 'Libre Caslon Display', serif; font-size: 42px; color: var(--copper); opacity: .7; line-height: 1; }
h2 { font-size: 21px; margin: 0; font-weight: 700; }
.section-title p { font-size: 12px; margin: 6px 0 0; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 46px;
  padding: 12px;
  color: var(--ink);
  outline: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--copper); box-shadow: 0 0 0 2px var(--blush); }
input[type=checkbox] { min-height: 18px; width: 18px; accent-color: var(--ink); cursor: pointer; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
.second { border-top: 1px solid var(--line); padding-top: 25px; margin-top: 30px; }
.notice { font-size: 12px; line-height: 1.7; margin: 14px 0; }
.error-msg { background: #fdecec; color: #9c1c1c; border: 1px solid #f5c2c2; padding: 12px 14px; border-radius: 8px; font-size: 12px; margin-top: 14px; }
.ok-msg { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid #b9e4cb; padding: 12px 14px; border-radius: 8px; font-size: 12px; margin-top: 14px; }

.concepts { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.concept {
  flex-direction: row;
  align-items: center;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  gap: 14px;
  font-weight: 400;
  transition: background .15s, border-color .15s;
}
.concept:hover { border-color: #c8b3c2; }
.concept.chosen { background: #faf3f5; border-color: var(--ink); }
.concept strong { font-size: 14px; display: block; }
.concept small { display: block; font-size: 11px; color: var(--quiet); margin-top: 4px; }
.concept b { margin-left: auto; font-size: 14px; white-space: nowrap; }
.mini-index { font-family: monospace; color: var(--copper); font-size: 11px; }

.summary {
  background: white;
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink);
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 8px 20px #49354808;
}
.summary h2 { margin: 12px 0 20px; }
.summary > p { font-size: 12px; }
.sum-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.total { border-top: 1px solid var(--line); margin-top: 20px; padding: 20px 0; display: flex; flex-direction: column; gap: 6px; }
.total span { font-size: 12px; }
.total strong { font-size: 34px; letter-spacing: -1px; }
.total small { font-size: 11px; color: var(--quiet); }
.summary button { width: 100%; font-size: 13px; font-weight: 700; }
.secure { font-size: 11px; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; color: var(--quiet); }

.help { padding: 24px 20px; background: var(--blush); border-radius: 8px; margin-top: 22px; }
.help h3 { font-size: 15px; margin: 0 0 8px; }
.help p { font-size: 12px; margin: 0; }

/* Pantalla final de confirmación (flujo tipo lafotoescolar.com.ar) */
.confirm-card {
  background: white;
  border: 1px solid var(--line);
  border-top: 5px solid var(--ok-fg);
  border-radius: 12px;
  padding: 36px;
  max-width: 720px;
  margin: 0 auto 40px;
  box-shadow: 0 12px 30px #49354810;
}
.confirm-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ok-bg);
  color: var(--ok-fg);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 99px;
}
.confirm-card h2 { font-family: 'Libre Caslon Display', serif; font-size: 36px; font-weight: 400; margin: 16px 0 8px; }
.transfer-box {
  background: #faf6f7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin: 22px 0;
}
.transfer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.transfer-row:last-child { border-bottom: 0; }
.transfer-row small { color: var(--quiet); display: block; font-size: 11px; }
.transfer-row strong { font-size: 16px; }
.copy-btn {
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
}
.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--wa-green);
  color: white;
  font-weight: 700;
  font-size: 15px;
  padding: 16px 22px;
  border-radius: 8px;
  margin-top: 18px;
  transition: background .15s;
}
.wa-btn:hover { background: var(--wa-dark); }
.secondary-btn {
  background: var(--blush);
  color: var(--ink);
  width: 100%;
  margin-top: 12px;
  font-weight: 600;
}

.news { margin-top: 70px; padding-top: 35px; border-top: 1px solid var(--line); }
.news h2 { margin: 12px 0 18px; }
.news article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.news article h3 { margin: 0 0 6px; font-size: 17px; }
.news article small { color: var(--copper); font-family: monospace; font-size: 11px; }

footer {
  border-top: 1px solid var(--line);
  padding: 35px 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  background: white;
  gap: 20px;
}
footer p { font-size: 12px; margin: 4px 0 0; }
.text-button { background: none; color: var(--quiet); padding: 8px; font-size: 12px; }

/* Admin */
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.tabs button { font-size: 12px; font-weight: 600; padding: 10px 16px; background: var(--blush); color: var(--ink); }
.tabs button.active { background: var(--ink); color: white; }
.login { max-width: 460px; margin: 40px auto; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 36px; }
.login h1 { font-size: 38px; margin: 12px 0 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 26px; }
.kpi-card { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.kpi-card small { font-size: 11px; color: var(--quiet); display: block; }
.kpi-card strong { font-size: 24px; display: block; margin-top: 6px; }
.records article { padding: 18px 0; border-bottom: 1px solid var(--line); }
.record-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok-fg); }
.badge-warn { background: var(--warn-bg); color: var(--warn-fg); }
.badge-muted { background: var(--blush); color: var(--ink); }
.inline-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.inline-actions button { padding: 8px 12px; font-size: 12px; }
.inline-actions select { width: auto; min-height: 36px; padding: 6px 10px; font-size: 12px; }
.admin-form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.filter-bar input { flex: 1; min-width: 180px; }
.filter-bar select { width: auto; min-width: 140px; }
aside { position: sticky; top: 24px; }
.hidden { display: none !important; }

@media (max-width: 820px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .header { height: auto; min-height: 86px; padding: 18px 20px; gap: 15px; flex-wrap: wrap; }
  nav { gap: 16px; width: 100%; justify-content: space-between; font-size: 12px; }
  .page { padding: 32px 18px; }
  .intro { grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
  h1 { font-size: 42px; }
  .paper { display: none; }
  .form-layout { grid-template-columns: 1fr; gap: 20px; }
  .form-paper { padding: 24px 18px; }
  .fields { grid-template-columns: 1fr; gap: 16px; }
  aside { position: static; }
  footer { flex-wrap: wrap; padding: 28px 20px; }
  .confirm-card { padding: 24px 18px; }
}
