:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #63706d;
  --line: #dfe7e2;
  --surface: #ffffff;
  --canvas: #f4f8f5;
  --teal: #0b6b5b;
  --teal-dark: #075346;
  --teal-soft: #e2f2ed;
  --amber: #a55d00;
  --amber-soft: #fff1dc;
  --red: #a73535;
  --red-soft: #fdeaea;
  --shadow: 0 14px 36px rgb(18 43 35 / 7%);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .56; }
:focus-visible { outline: 3px solid #e29916; outline-offset: 3px; }
.shell { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.skip-link { position: fixed; inset-inline-start: 1rem; top: -4rem; z-index: 10; background: #fff; color: var(--teal-dark); padding: .7rem 1rem; border-radius: .7rem; font-weight: 700; }
.skip-link:focus { top: 1rem; }

.site-header { padding: 1rem 0; background: #fff; border-bottom: 1px solid var(--line); }
.header-content { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-content p { margin: 0; color: var(--muted); font-size: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-size: 1.25rem; font-weight: 800; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .65rem; background: var(--teal); color: #fff; }

.page-grid { padding-block: 1.5rem 3rem; }
.notice { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; border: 1px solid #f0c58b; border-radius: .8rem; background: var(--amber-soft); color: #714100; }
.notice p { margin: 0; font-size: .92rem; font-weight: 700; }
.notice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: #bb700e; color: #fff; font-weight: 800; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 2rem; padding-block: 2.8rem 2.2rem; }
.eyebrow { margin: 0 0 .35rem; color: var(--teal); font-size: .8rem; font-weight: 800; letter-spacing: .04em; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { max-width: 16ch; margin: 0; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.18; letter-spacing: -.035em; }
h2 { margin: 0; font-size: 1.18rem; line-height: 1.3; }
.hero-copy { max-width: 47ch; margin: .75rem 0 0; color: var(--muted); }
.save-state { flex: 0 0 auto; max-width: 15rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; color: var(--muted); font-size: .8rem; }
.save-state.is-error { border-color: #e9a7a7; background: var(--red-soft); color: var(--red); }

.workspace { display: grid; grid-template-columns: minmax(19rem, .9fr) minmax(20rem, 1.1fr); gap: 1.2rem; }
.panel { border: 1px solid var(--line); border-radius: 1.1rem; background: var(--surface); box-shadow: var(--shadow); }
.setup-panel { grid-row: span 2; padding: 1.35rem; }
.send-panel { padding: 1.35rem; }
.list-panel { padding: 1.2rem; }
.section-heading { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.3rem; }
.section-heading p, .tools-panel p { margin: .25rem 0 0; color: var(--muted); font-size: .88rem; }
.step-number { display: grid; place-items: center; flex: 0 0 auto; width: 1.85rem; height: 1.85rem; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-weight: 800; }
.field { margin-top: 1rem; }
.field label, legend { display: block; margin-bottom: .4rem; font-weight: 800; font-size: .9rem; }
textarea, select, input[type="text"] { width: 100%; min-height: 48px; padding: .7rem .75rem; border: 1px solid #b9c7c1; border-radius: .7rem; background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 7rem; line-height: 1.65; }
textarea:focus, select:focus, input[type="text"]:focus { border-color: var(--teal); }
.field-help, .field-error { min-height: 1.25rem; margin: .28rem 0 0; font-size: .78rem; }
.field-help { color: var(--muted); }
.field-error { color: var(--red); font-weight: 700; }
.excel-import { margin-top: 1rem; padding: .9rem; border: 1px solid #c9ddd5; border-radius: .8rem; background: #f7fbf9; }
.excel-import h3 { margin: 0; font-size: .92rem; }
.excel-import p { margin: .2rem 0 .7rem; color: var(--muted); font-size: .78rem; }
.import-status { min-height: 1.2rem; margin-bottom: 0; color: var(--teal-dark); font-weight: 700; }
.import-status.is-error { color: var(--red); }
.excel-column-picker { display: grid; gap: .45rem; margin-top: .8rem; padding-top: .8rem; border-top: 1px solid #dce9e3; }
.excel-column-picker label { margin: 0; font-size: .8rem; font-weight: 800; }
.excel-column-picker .button { width: 100%; }
.country-field { display: grid; grid-template-columns: 1fr; gap: .35rem; }
.country-field label { margin: 0; }
.mode-fieldset { margin: 1.2rem 0; padding: 0; border: 0; }
.mode-fieldset legend { margin-bottom: .6rem; }
.radio-choice { display: flex; gap: .65rem; align-items: flex-start; padding: .65rem; border: 1px solid transparent; border-radius: .7rem; cursor: pointer; }
.radio-choice:has(input:checked) { border-color: #a4d0c5; background: #f2faf7; }
.radio-choice input { width: 1.1rem; height: 1.1rem; margin-top: .18rem; accent-color: var(--teal); }
.radio-choice strong, .radio-choice small { display: block; }
.radio-choice small { color: var(--muted); font-size: .77rem; }

.button { min-height: 48px; padding: .7rem 1rem; border: 1px solid transparent; border-radius: .7rem; font-weight: 800; transition: background-color .15s ease, border-color .15s ease, transform .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { background: var(--teal); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--teal-dark); }
.button-secondary { border-color: #b5c5be; background: #fff; color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: var(--teal); background: #f3faf7; }
.button-whatsapp { background: #1c9a65; color: #fff; }
.button-whatsapp:hover:not(:disabled) { background: #13784e; }
.button-full { width: 100%; }
.text-button { padding: .45rem; border: 0; background: transparent; color: var(--teal-dark); font-weight: 800; text-decoration: underline; text-underline-offset: .15em; }

.progress-row, .list-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.progress-count { padding: .35rem .6rem; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: .85rem; font-weight: 800; direction: rtl; }
.progress-track { height: .4rem; margin: 1rem 0; overflow: hidden; border-radius: 999px; background: #edf2ef; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width .2s ease; }
.current-card { display: grid; min-height: 13rem; place-items: center; padding: 1.25rem; border: 1px dashed #c5d2cc; border-radius: .9rem; background: #fbfdfc; text-align: center; }
.current-card-empty { max-width: 22rem; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin: 0 auto .65rem; border-radius: 50%; background: var(--teal-soft); color: var(--teal-dark); font-size: 1.35rem; font-weight: 800; }
.current-number { margin: .3rem 0 .45rem; direction: ltr; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(1.55rem, 4vw, 2rem); font-weight: 800; }
.current-meta { display: flex; justify-content: center; gap: .5rem; color: var(--muted); font-size: .86rem; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 1.7rem; padding: .18rem .55rem; border-radius: 999px; background: #edf2ef; color: #53615d; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.status-sent { background: var(--teal-soft); color: var(--teal-dark); }
.status-opened { background: var(--amber-soft); color: var(--amber); }
.status-skipped { background: #edf0f2; color: #53616a; }
.action-stack { display: grid; gap: .7rem; margin-top: 1rem; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: 1.25rem; }
.summary div { padding: .6rem .3rem; border-radius: .65rem; background: #f4f8f5; text-align: center; }
.summary span, .summary small { display: block; }
.summary span { color: var(--teal-dark); font-size: 1.15rem; font-weight: 800; }
.summary small { color: var(--muted); font-size: .7rem; }

.filter-button { min-height: 40px; padding: .45rem .7rem; border: 1px solid #b5c5be; border-radius: .6rem; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 800; }
.numbers-list { display: grid; gap: .45rem; max-height: 24rem; margin: 1rem 0 0; padding: 0; overflow: auto; list-style: none; }
.number-select { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; align-items: center; width: 100%; min-height: 52px; gap: .5rem; padding: .45rem; border: 1px solid var(--line); border-radius: .7rem; background: #fff; color: var(--ink); text-align: right; }
.number-select:hover { border-color: #9bbdb2; background: #fbfdfc; }
.number-item.is-current .number-select { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.number-position { display: grid; place-items: center; width: 1.65rem; height: 1.65rem; border-radius: 50%; background: #eef3f0; color: var(--muted); font-size: .76rem; font-weight: 800; }
.number-phone { overflow: hidden; direction: ltr; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.list-empty { margin: 2rem 0; color: var(--muted); text-align: center; }

.tools-panel { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.2rem; padding: 1.1rem 1.3rem; }
.tools-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .55rem; }
.file-button { display: inline-flex; align-items: center; }
.danger-button { color: var(--red); }

@media (max-width: 850px) {
  .workspace { grid-template-columns: 1fr; }
  .setup-panel { grid-row: auto; }
  .numbers-list { max-height: 18rem; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 1rem, 1180px); }
  .header-content p { display: none; }
  .hero { display: block; padding-block: 2rem 1.4rem; }
  .save-state { max-width: none; margin-top: 1rem; }
  .setup-panel, .send-panel { padding: 1rem; }
  .tools-panel { display: block; padding: 1rem; }
  .tools-actions { justify-content: flex-start; margin-top: 1rem; }
  .summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 390px) {
  .action-row { grid-template-columns: 1fr; }
  .tools-actions .button { width: 100%; }
}
