/* IDOKIA PAY — sistema visual unificado (vibrante e interactivo) */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy-950: #060f2a;
  --navy-900: #0a1a3f;
  --navy-800: #0f2457;
  --navy-700: #163073;
  --blue-600: #1f52e0;
  --blue-500: #2f6bff;
  --blue-400: #5b8bff;
  --cyan-400: #22d3ee;
  --cyan-300: #67e8f9;
  --violet-500: #7c5cff;
  --violet-400: #9a7dff;
  --aqua: #16e0b5;
  --blue-50: #eef3ff;
  --blue-100: #dbe6ff;
  --ink: #0b1733;
  --gray-50: #f4f7fe;
  --gray-100: #eceffb;
  --gray-200: #dfe4f2;
  --gray-300: #c6cde3;
  --gray-400: #949cbb;
  --gray-500: #6b7398;
  --gray-700: #3a4266;
  --white: #fff;
  --green-500: #12b76a;
  --green-100: #d6f6e5;
  --amber-500: #f59e0b;
  --amber-100: #fdeecd;
  --red-500: #f0453f;
  --red-100: #fde3e2;

  --grad-brand: linear-gradient(135deg, #2f6bff 0%, #7c5cff 55%, #22d3ee 120%);
  --grad-brand-soft: linear-gradient(135deg, #2f6bff 0%, #5b8bff 100%);
  --grad-deep: linear-gradient(160deg, #0a1a3f 0%, #0f2457 45%, #163073 100%);
  --grad-aqua: linear-gradient(135deg, #16e0b5, #22d3ee);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(10,26,63,.06), 0 1px 1px rgba(10,26,63,.05);
  --shadow: 0 10px 30px -12px rgba(10,26,63,.22), 0 2px 8px rgba(10,26,63,.06);
  --shadow-lg: 0 30px 60px -24px rgba(6,15,42,.45);
  --shadow-glow: 0 10px 30px -8px rgba(47,107,255,.55);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Sora', var(--font);
  --focus: 0 0 0 4px rgba(47,107,255,.3);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--gray-50); -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-family: var(--font-display); font-weight: 700; }
p { margin: 0; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.muted { color: var(--gray-500); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 10px; }
.ico { width: 22px; height: 22px; flex: none; }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; }
.logo-mark { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 6px 14px rgba(47,107,255,.4)); }
.logo-word { font-size: 20px; color: var(--navy-900); }
.logo-word b { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: 5px; }
.logo--light .logo-word { color: #fff; }
.logo--light .logo-word b { background: linear-gradient(135deg,#8fb4ff,#67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Botones */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 14px; border: 1px solid transparent; font-family: var(--font); font-weight: 650; font-size: 15px; cursor: pointer; text-decoration: none !important; transition: transform .12s cubic-bezier(.2,.8,.3,1.2), box-shadow .2s, background .2s, opacity .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn .ico { width: 18px; height: 18px; }
.btn--primary { background: var(--grad-brand-soft); color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover { box-shadow: 0 14px 34px -8px rgba(47,107,255,.7); }
.btn--brand { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-glow); background-size: 150% 150%; animation: gradientShift 6s ease infinite; }
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.btn--navy { background: var(--navy-800); color: #fff; }
.btn--ghost { background: #fff; border-color: var(--gray-200); color: var(--navy-800); }
.btn--ghost:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn--soft { background: var(--blue-100); color: var(--blue-600); }
.btn--soft:hover { background: #cfddff; }
.btn--danger { background: var(--red-500); color: #fff; }
.btn--sm { min-height: 36px; padding: 0 13px; font-size: 13px; border-radius: 11px; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 16px; border-radius: 16px; }
.btn--block { width: 100%; }
.btn.is-loading { color: transparent !important; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn--ghost.is-loading::after, .btn--soft.is-loading::after { border-color: var(--gray-300); border-top-color: var(--blue-600); }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; border: 0; background: transparent; color: var(--navy-800); cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: var(--gray-100); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; min-width: 10px; height: 10px; border-radius: 99px; background: var(--red-500); border: 2px solid #fff; }

/* Tarjetas */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(10,26,63,.05); }
.card-pad { padding: 22px; }
.card--glass { background: rgba(255,255,255,.72); backdrop-filter: blur(16px) saturate(1.4); border: 1px solid rgba(255,255,255,.6); }
.card--grad { position: relative; overflow: hidden; color: #fff; background: var(--grad-deep); }
.card-hover { transition: transform .18s, box-shadow .18s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Campos */
.field { display: grid; gap: 6px; margin-bottom: 15px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.field-control { position: relative; display: flex; align-items: center; }
.field-control .field-ico { position: absolute; left: 14px; width: 19px; height: 19px; color: var(--gray-400); pointer-events: none; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 13px 15px; border-radius: 14px; border: 1.5px solid var(--gray-200); background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 100px; resize: vertical; }
.field-control.has-icon input { padding-left: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: var(--focus); }
.field .is-invalid { border-color: var(--red-500); }
.field-hint { font-size: 12px; color: var(--gray-500); }
.field-error { font-size: 12.5px; color: var(--red-500); font-weight: 550; }
.form-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 15px; border-radius: 13px; background: var(--red-100); color: #b42318; font-size: 14px; font-weight: 550; }
.form-alert .ico { width: 19px; height: 19px; margin-top: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--gray-700); margin: 6px 0 14px; }
.check input { width: 19px; height: 19px; margin-top: 1px; accent-color: var(--blue-600); flex: none; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 25px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--ok { background: var(--green-100); color: #087443; }
.pill--warn { background: var(--amber-100); color: #a35908; }
.pill--info { background: var(--blue-100); color: var(--blue-600); }
.pill--off { background: var(--gray-100); color: var(--gray-500); }

/* Toast */
.toast-host { position: fixed; z-index: 1000; left: 50%; top: 16px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); }
.toast { display: flex; gap: 10px; align-items: center; padding: 13px 16px; border-radius: 15px; background: var(--navy-800); color: #fff; box-shadow: var(--shadow-lg); font-weight: 550; font-size: 14px; animation: toastIn .25s cubic-bezier(.2,.8,.3,1.2); transition: opacity .3s, transform .3s; }
.toast .ico { width: 19px; height: 19px; color: var(--cyan-300); }
.toast--error { background: #8f1d1a; }
.toast--error .ico { color: #ffb4b4; }
.toast.is-out { opacity: 0; transform: translateY(-8px); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; z-index: 900; display: grid; place-items: end center; background: rgba(6,15,42,.5); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal-backdrop.is-in { opacity: 1; }
.modal-backdrop.is-out { opacity: 0; }
.modal { width: 100%; max-height: 92vh; overflow: auto; background: #fff; border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg); transform: translateY(26px); transition: transform .22s cubic-bezier(.2,.8,.3,1.1); }
.is-in .modal { transform: none; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px 6px; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 10px 22px 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px 22px; border-top: 1px solid var(--gray-100); }
@media (min-width: 640px) { .modal-backdrop { place-items: center; } .modal { width: min(92vw, 540px); border-radius: 26px; } .modal--sm { width: min(92vw, 420px); } .modal--lg { width: min(94vw, 820px); } }

/* Estados vacíos / carga */
.empty { text-align: center; padding: 38px 16px; color: var(--gray-500); }
.empty .ico { width: 42px; height: 42px; color: var(--gray-300); margin-bottom: 10px; }
.empty h3 { color: var(--navy-800); font-size: 16px; margin-bottom: 4px; }
.skeleton { display: grid; gap: 10px; padding: 8px 0; }
.skeleton span { height: 16px; border-radius: 9px; background: linear-gradient(90deg, var(--gray-100), var(--gray-200), var(--gray-100)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skeleton span:nth-child(2n) { width: 70%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Utilidades */
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 12px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.gradient-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
