/*
 * TPV DoscbGrup IT — mismo sistema "liquid glass" que Backup Control
 * Paleta del logo: #77b832 verde · #393085 azul
 * Tipografías: Space Grotesk (títulos) · DM Sans (texto)
 */
:root {
  --radius: 1.1rem;
  --brand-green: #77b832;
  --brand-blue: #393085;
  --brand-blue-soft: #8178c9;
  --brand-navy-deep: #1b1647;
  --brand-sky: color-mix(in srgb, var(--brand-green) 78%, white);

  --background: color-mix(in srgb, var(--brand-sky) 13%, white);
  --foreground: var(--brand-navy-deep);
  --muted-foreground: color-mix(in srgb, var(--brand-navy-deep) 70%, white);
  --accent: color-mix(in srgb, var(--brand-sky) 42%, white);
  --success: color-mix(in srgb, var(--brand-green) 80%, black);
  --border: rgba(255, 255, 255, .55);
  --input: rgba(255, 255, 255, .6);

  --gradient-hero:
    radial-gradient(1100px 520px at 8% -12%, color-mix(in oklab, var(--brand-sky) 85%, transparent), transparent 68%),
    radial-gradient(900px 460px at 96% -6%, color-mix(in oklab, var(--brand-blue) 22%, transparent), transparent 66%),
    radial-gradient(760px 520px at 78% 108%, color-mix(in oklab, var(--brand-green) 26%, transparent), transparent 70%);
  --gradient-brand: linear-gradient(120deg, var(--brand-blue), color-mix(in oklab, var(--brand-green) 80%, var(--brand-blue)));
  --shadow-elevated: 0 30px 70px -34px color-mix(in srgb, var(--brand-blue) 45%, transparent), inset 0 1px 0 0 rgba(255, 255, 255, .65);
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif; letter-spacing: -.02em; margin: 0; }
::selection { background: color-mix(in oklab, var(--brand-green) 35%, transparent); }
.muted { color: var(--muted-foreground); }
.mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace; font-size: .92em; }
.brand-text { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Escenario ---------- */
.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 40px 16px;
  overflow: hidden;
  background-image: var(--gradient-hero);
  background-attachment: fixed;
}

.orb { position: absolute; border-radius: 999px; filter: blur(64px); pointer-events: none; }
.orb-1 { left: -8rem; top: -8rem; width: 28rem; height: 28rem; background: color-mix(in srgb, var(--brand-sky) 70%, transparent); animation: float 16s ease-in-out infinite; }
.orb-2 { right: -6rem; bottom: -10rem; width: 32rem; height: 32rem; background: color-mix(in srgb, var(--brand-green) 30%, transparent); animation: float 24s ease-in-out infinite reverse; }
.orb-3 { left: 50%; top: 33%; width: 22rem; height: 22rem; margin-left: -11rem; background: color-mix(in srgb, var(--brand-blue) 20%, transparent); animation: float 24s ease-in-out infinite reverse; }

@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(3%, -4%, 0) scale(1.08); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.env-badge {
  position: relative; z-index: 2;
  padding: 6px 14px;
  font-size: 12px; font-weight: 600;
  color: var(--brand-navy-deep);
  background: color-mix(in srgb, var(--brand-blue-soft) 28%, white);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

/* ---------- Tarjeta de cristal ---------- */
.glass-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 56rem;
  display: grid;
  overflow: hidden;
  background: linear-gradient(150deg, color-mix(in oklab, white 62%, transparent), color-mix(in oklab, white 26%, transparent));
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: calc(var(--radius) + 12px);
  box-shadow: var(--shadow-elevated);
  -webkit-backdrop-filter: blur(34px) saturate(190%);
  backdrop-filter: blur(34px) saturate(190%);
}
.glass-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(130deg, rgba(255, 255, 255, .55) 0%, transparent 38%, transparent 62%, rgba(255, 255, 255, .28) 100%);
}
.rise { animation: rise .8s cubic-bezier(.22, 1, .36, 1) both; }

.brand-side { display: none; }
.content { position: relative; padding: 28px 22px; }
.mobile-brand { display: flex; justify-content: center; margin-bottom: 22px; }
.mobile-brand img { height: 28px; width: auto; }

@media (min-width: 768px) {
  .glass-card { grid-template-columns: 1.05fr 1fr; }
  .brand-side {
    position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-blue) 12%, transparent), transparent 55%, color-mix(in srgb, var(--brand-green) 16%, transparent));
  }
  .content { padding: 40px; border-left: 1px solid rgba(255, 255, 255, .5); display: flex; flex-direction: column; justify-content: center; }
  .mobile-brand { display: none; }
}

.logo { height: 44px; width: auto; display: block; }
.brand-side h1 { margin-top: 40px; font-size: 2.25rem; line-height: 1.08; font-weight: 600; }
.brand-side p { margin: 16px 0 0; max-width: 20rem; font-size: 14px; line-height: 1.6; }

.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.highlights li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; font-size: 14px;
  background: rgba(255, 255, 255, .4);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 1rem;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  transition: transform .3s;
}
.highlights li:hover { transform: translateX(4px); }
.ico { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: .75rem; background: color-mix(in srgb, var(--brand-green) 18%, transparent); color: var(--success); }
.ico svg { width: 18px; height: 18px; }
.ico svg, .btn svg, .badge svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Formulario ---------- */
.form { display: grid; gap: 20px; position: relative; }
.form h2, .center h2 { font-size: 1.5rem; font-weight: 600; }
.form header p { margin: 4px 0 0; font-size: 14px; }

.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; }
.row { display: grid; gap: 20px; }

input[type="text"], input[type="email"] {
  width: 100%; height: 44px; padding: 0 14px;
  font: inherit; font-size: 16px; color: var(--foreground);
  background: var(--input);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: .85rem;
  box-shadow: 0 1px 2px rgba(27, 22, 71, .06), inset 0 1px 0 rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder { color: color-mix(in srgb, var(--brand-navy-deep) 45%, white); }
input:focus { outline: none; border-color: var(--brand-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 28%, transparent); }

.amount { position: relative; }
.amount input { padding-right: 40px; font-family: "Space Grotesk", sans-serif; font-size: 20px; font-weight: 600; height: 52px; }
.amount b { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-family: "Space Grotesk", sans-serif; color: var(--brand-blue); }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.alert {
  padding: 12px 14px; font-size: 14px;
  color: var(--brand-navy-deep);
  background: color-mix(in srgb, var(--brand-blue-soft) 22%, white);
  border: 1px solid color-mix(in srgb, var(--brand-blue-soft) 55%, white);
  border-radius: .85rem;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 28px; width: 100%;
  font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  color: #fff; background: var(--brand-blue);
  border: 0; border-radius: .9rem;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--brand-blue) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { background: color-mix(in srgb, var(--brand-blue) 90%, white); transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-green) 45%, transparent); }
.btn svg { width: 18px; height: 18px; }
.btn.ghost { color: var(--brand-blue); background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .8); box-shadow: none; }
.btn.ghost:hover { background: var(--accent); }
.tiny { margin: 0; font-size: 12px; text-align: center; color: var(--muted-foreground); }

/* ---------- Estados / resultado ---------- */
.center { display: grid; justify-items: center; gap: 14px; text-align: center; }
.center p { margin: 0; max-width: 26rem; font-size: 14px; }
.center .btn { width: auto; min-width: 220px; margin-top: 6px; }

.badge { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 999px; }
.badge svg { width: 30px; height: 30px; stroke-width: 2.4; }
.badge.ok { color: #fff; background: var(--success); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-green) 20%, transparent); }
.badge.warn { color: var(--brand-navy-deep); background: color-mix(in srgb, var(--brand-blue-soft) 35%, white); box-shadow: 0 0 0 8px color-mix(in srgb, var(--brand-blue-soft) 18%, transparent); }

.spinner { width: 44px; height: 44px; border-radius: 999px; border: 4px solid color-mix(in srgb, var(--brand-green) 25%, transparent); border-top-color: var(--brand-green); animation: spin .9s linear infinite; }

.receipt { width: 100%; max-width: 26rem; margin: 8px 0 0; padding: 6px 16px; text-align: left; background: rgba(255, 255, 255, .45); border: 1px solid rgba(255, 255, 255, .7); border-radius: 1rem; }
.receipt div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; font-size: 14px; }
.receipt div + div { border-top: 1px solid rgba(27, 22, 71, .08); }
.receipt dt { color: var(--muted-foreground); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.foot { position: relative; z-index: 1; margin: 0; font-size: 12px; color: var(--muted-foreground); text-align: center; }

@media print {
  .orb, .env-badge, .brand-side, .btn, .foot { display: none !important; }
  .stage { background: #fff; padding: 0; }
  .glass-card { box-shadow: none; border: 0; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .rise, .spinner { animation: none; }
}
