/* Proremote — sistema de diseño compartido (web, panel, visor) */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,800&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  color-scheme: dark;
  --ink: #0a0c10;
  --ink-2: #10131a;
  --ink-3: #171b24;
  --line: #242936;
  --line-2: #343a4a;
  --paper: #f3f0e9;
  --muted: #9ba3b4;
  --dim: #667086;
  --signal: #ff8a2a;
  --signal-2: #ffb469;
  --signal-ink: #2a1300;
  --ok: #3ddc97;
  --danger: #ff5c5c;
  --font-display: 'Bricolage Grotesque', 'Instrument Sans', sans-serif;
  --font-body: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--ink); color: var(--paper);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
::selection { background: var(--signal); color: var(--signal-ink); }

/* Fondo: rejilla fina + grano, el "mosaico" de la pantalla remota */
.grid-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 0%, transparent 70%);
  opacity: .35;
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wordmark {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.04em; font-size: 22px;
  display: inline-flex; align-items: center; gap: 10px;
}
.wordmark i {
  width: 14px; height: 14px; border-radius: 3px; background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255,138,42,.18), 0 0 24px rgba(255,138,42,.55);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--ink-3); color: var(--paper); font-weight: 600; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { background: #1e2330; border-color: #47506a; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.btn-primary:hover { background: var(--signal-2); border-color: var(--signal-2); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 8px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--ink-2); color: var(--paper); font-size: 16px; outline: none;
  transition: border-color .15s;
}
.field input:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(255,138,42,.15); }

.card {
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.error { color: var(--danger); font-size: 14px; min-height: 20px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--muted);
}
.badge.pro { border-color: rgba(61,220,151,.4); color: var(--ok); }
.badge.trial { border-color: rgba(255,138,42,.4); color: var(--signal); }

.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 10px rgba(61,220,151,.7); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--paper); color: var(--ink); padding: 12px 18px; border-radius: 10px;
  font-weight: 600; box-shadow: 0 10px 40px rgba(0,0,0,.5); z-index: 50;
  animation: toast .25s ease;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Layout de autenticación */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: min(420px, 100%); padding: 32px; }
.auth h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: 30px; margin: 18px 0 6px; }
.auth p.lead { margin: 0 0 22px; color: var(--muted); }
.auth form { display: flex; flex-direction: column; gap: 14px; }
.auth .btn { margin-top: 6px; }
.auth .alt { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }
.auth .alt a { color: var(--signal); font-weight: 600; }
