:root {
  --navy: #102a43;
  --navy-2: #173f63;
  --navy-3: #0b1f33;
  --red: #a92735;
  --red-dark: #871c28;
  --red-soft: #fff3f4;
  --ink: #162536;
  --muted: #64748b;
  --line: #e4eaf0;
  --surface: #ffffff;
  --surface-2: #f5f8fb;
  --success: #17663a;
  --success-bg: #edf9f1;
  --error: #9b1c2d;
  --error-bg: #fff0f2;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(16, 42, 67, .10);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-2); }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--surface-2); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header, .panel-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(22px, 5vw, 72px);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 900; letter-spacing: -.025em; }
.brand-name { font-size: 17px; color: var(--navy); }
.brand-name-red { color: var(--red); }
.brand-separator { width: 1px; height: 25px; background: #cad5df; }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-separator { background: rgba(255,255,255,.35); }
.header-caption, .panel-header-label { color: var(--muted); font-size: 13px; font-weight: 700; }

.register-shell {
  width: min(1180px, calc(100% - 40px));
  margin: clamp(42px, 7vw, 84px) auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(460px, 1.1fr);
  gap: clamp(44px, 7vw, 92px);
  align-items: center;
}

.register-intro { max-width: 530px; }
.eyebrow { display: inline-block; color: var(--red); font-weight: 900; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.eyebrow-light { color: #ffdfe3; }
.register-intro h1, .panel-title-row h1, .login-brand-copy h1 { margin: 0; color: var(--navy); font-size: clamp(40px, 5vw, 66px); line-height: .98; letter-spacing: -.055em; }
.register-intro > p { margin: 24px 0 34px; color: var(--muted); font-size: 18px; line-height: 1.7; }

.intro-points { display: grid; gap: 4px; }
.intro-point { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.intro-point:last-child { border-bottom: 1px solid var(--line); }
.point-number { font-weight: 900; font-size: 12px; color: var(--red); padding-top: 3px; }
.intro-point strong { display: block; margin-bottom: 4px; color: var(--navy); }
.intro-point small { display: block; color: var(--muted); line-height: 1.5; }

.form-card, .login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.form-card { padding: clamp(26px, 4vw, 44px); }
.form-card-heading { margin-bottom: 30px; }
.form-step { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-weight: 900; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; }
.form-card h2, .login-card h2 { color: var(--navy); margin: 12px 0 8px; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.035em; }
.form-card-heading p, .login-subtitle { color: var(--muted); margin: 0; }

.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .contact-choice legend { color: var(--navy); font-size: 13px; font-weight: 800; }
.optional { color: var(--muted); font-weight: 500; margin-left: 4px; }
input, textarea, select { width: 100%; border: 1px solid #d6e0e8; background: #fbfcfd; color: var(--ink); border-radius: 12px; outline: none; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
input, select { min-height: 50px; padding: 0 14px; }
textarea { resize: vertical; min-height: 120px; padding: 13px 14px; line-height: 1.55; }
input:focus, textarea:focus, select:focus { border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(23,63,99,.09); background: #fff; }

.contact-choice { border: 0; padding: 0; margin: 2px 0 20px; }
.contact-choice legend { margin-bottom: 10px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; min-height: 78px; padding: 15px; border: 1px solid #dbe4eb; border-radius: 14px; background: #fff; cursor: pointer; transition: .18s ease; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-dot { width: 17px; height: 17px; border-radius: 50%; border: 2px solid #b9c6d2; margin-top: 2px; box-shadow: inset 0 0 0 3px #fff; }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { color: var(--navy); font-size: 14px; }
.choice-card small { color: var(--muted); margin-top: 3px; line-height: 1.35; }
.choice-card:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.choice-card:has(input:checked) .choice-dot { border-color: var(--red); background: var(--red); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent; font-weight: 850; font-size: 13px; cursor: pointer; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .58; cursor: not-allowed; transform: none; }
.btn-primary { color: #fff; background: var(--red); box-shadow: 0 10px 24px rgba(169,39,53,.18); }
.btn-primary:hover { background: var(--red-dark); }
.btn-full { width: 100%; min-height: 54px; }
.btn-outline { background: #fff; color: var(--navy); border-color: #d5e0e8; }
.btn-ghost { background: transparent; color: var(--navy); border-color: #d8e2e9; }

.form-message { min-height: 0; margin: 0 0 14px; border-radius: 11px; font-size: 13px; font-weight: 700; line-height: 1.45; }
.form-message:not(:empty) { padding: 12px 14px; }
.form-message.success { color: var(--success); background: var(--success-bg); }
.form-message.error { color: var(--error); background: var(--error-bg); }
.privacy-note { margin: 14px 0 0; color: #8190a0; font-size: 11px; line-height: 1.5; text-align: center; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.minimal-footer { display: flex; justify-content: space-between; gap: 20px; padding: 25px clamp(22px, 5vw, 72px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; background: #fff; }

.admin-login-page { background: #fff; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .85fr) 1.15fr; }
.login-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(34px, 6vw, 74px); overflow: hidden; background: linear-gradient(145deg, var(--navy-3), var(--navy-2)); color: #fff; }
.login-brand-panel::after { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -290px; bottom: -230px; border: 100px solid rgba(255,255,255,.035); }
.login-brand-copy { position: relative; z-index: 1; max-width: 520px; }
.login-brand-copy h1 { color: #fff; font-size: clamp(44px, 5vw, 70px); }
.login-brand-copy p { margin: 24px 0 0; color: #c8d7e5; font-size: 17px; line-height: 1.7; }
.secure-note { position: relative; z-index: 1; color: #9fb4c7; font-size: 12px; font-weight: 700; }
.login-card-wrap { display: grid; place-items: center; padding: 38px; background: #f7f9fb; }
.login-card { width: min(440px, 100%); padding: clamp(28px, 5vw, 44px); }
.back-link { display: inline-block; margin-top: 22px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }

.panel-page { background: #f5f7fa; }
.panel-header { position: sticky; top: 0; z-index: 20; box-shadow: 0 5px 16px rgba(16,42,67,.035); }
.panel-header > div { display: flex; align-items: center; gap: 18px; }
.panel-account { color: var(--muted); font-size: 13px; font-weight: 700; }
.panel-main { width: min(1440px, calc(100% - 44px)); margin: 42px auto 70px; }
.panel-title-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.panel-title-row h1 { font-size: clamp(36px, 4.5vw, 58px); }
.panel-title-row p { max-width: 680px; color: var(--muted); line-height: 1.6; margin: 14px 0 0; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { min-height: 132px; display: flex; flex-direction: column; justify-content: center; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.stat-card > span { color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stat-card strong { color: var(--navy); font-size: 34px; letter-spacing: -.04em; margin: 4px 0; }
.stat-card small { color: #8a98a6; }

.records-section { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.records-toolbar { display: grid; grid-template-columns: 1fr 220px; gap: 12px; padding: 18px; border-bottom: 1px solid var(--line); }
.records-status { padding: 12px 18px; color: var(--muted); font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; min-width: 1050px; }
.records-table th { padding: 13px 16px; text-align: left; color: #708091; background: #f8fafc; border-bottom: 1px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .075em; }
.records-table td { padding: 16px; vertical-align: top; border-bottom: 1px solid #edf1f4; color: #425466; font-size: 13px; }
.records-table tbody tr:last-child td { border-bottom: 0; }
.records-table td strong { color: var(--navy); font-size: 14px; }
.records-table td small { display: block; color: #8996a4; margin-top: 4px; }
.message-cell { max-width: 340px; white-space: normal; line-height: 1.55; }
.date-cell { white-space: nowrap; color: #788898 !important; }
.action-cell { white-space: nowrap; }
.contact-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.contact-badge.whatsapp { color: #17663a; background: #eaf8ef; }
.contact-badge.correo { color: #234d76; background: #eef5fb; }
.action-link { color: var(--red); font-weight: 900; font-size: 12px; text-decoration: none; }
.action-link:hover { text-decoration: underline; }
.mobile-records { display: none; }
.record-card { padding: 18px; border-bottom: 1px solid var(--line); }
.record-card:last-child { border-bottom: 0; }
.record-card-top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.record-card-top > strong { color: var(--navy); }
.record-card-meta { display: grid; gap: 4px; margin: 12px 0; color: var(--muted); font-size: 12px; }
.record-card p { color: #435467; line-height: 1.5; font-size: 13px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 980px) {
  .register-shell { grid-template-columns: 1fr; max-width: 720px; }
  .register-intro { max-width: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { min-height: 360px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .panel-title-row { align-items: start; flex-direction: column; }
}

@media (max-width: 720px) {
  .site-header, .panel-header { padding: 0 18px; min-height: 68px; }
  .header-caption, .panel-header-label, .panel-account > span { display: none; }
  .register-shell { width: min(100% - 28px, 640px); margin: 34px auto 48px; gap: 34px; }
  .register-intro h1 { font-size: 44px; }
  .register-intro > p { font-size: 16px; }
  .field-grid, .choice-grid { grid-template-columns: 1fr; }
  .form-card { border-radius: 20px; padding: 24px 18px; }
  .minimal-footer { flex-direction: column; }
  .login-card-wrap { padding: 22px 14px; }
  .login-brand-panel { min-height: 330px; padding: 30px 22px; }
  .login-brand-copy h1 { font-size: 42px; }
  .panel-main { width: min(100% - 24px, 1000px); margin-top: 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 112px; padding: 17px; }
  .stat-card strong { font-size: 28px; }
  .records-toolbar { grid-template-columns: 1fr; }
  .table-wrap { display: none; }
  .mobile-records { display: block; }
}

@media (max-width: 430px) {
  .brand { gap: 8px; }
  .brand-name { font-size: 15px; }
  .brand-separator { height: 21px; }
  .register-intro h1, .login-brand-copy h1 { font-size: 38px; }
  .stats-grid { grid-template-columns: 1fr; }
}
