/* Nix Identity Provider — estética Nix (coherente con portal/NCC/tools) */
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg-0: #07090f; --bg-1: #0b0f1a; --bg-2: #101627; --bg-3: #172036;
  --text-1: #e9edf6; --text-2: #a4b0ca; --text-3: #626f8c;
  --orange: #ff6f2c; --orange-soft: #ff8c42; --violet: #8b5cf6; --cyan: #22d3ee;
  --green: #34d399; --red: #f87171;
  --radius: 16px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font); background: var(--bg-0); color: var(--text-1); min-height: 100vh; line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: rgba(255,111,44,.35); color: #fff; }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg-0); }
.bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%); }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .45; animation: drift 18s ease-in-out infinite alternate; }
.glow-a { width: 460px; height: 460px; background: rgba(255,111,44,.26); top: -140px; left: -100px; }
.glow-b { width: 420px; height: 420px; background: rgba(139,92,246,.22); top: 10%; right: -120px; animation-delay: -8s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(50px,35px) scale(1.12); } }

/* login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: linear-gradient(160deg, rgba(23,32,54,.92), rgba(16,22,39,.96)); border: 1px solid rgba(148,163,184,.14); border-radius: 22px; padding: 38px 32px; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.5); animation: rise .5s ease both; }
.login-logo { font-size: 50px; margin-bottom: 8px; filter: drop-shadow(0 6px 16px rgba(255,111,44,.4)); }
.login-card h1 { font-size: 24px; font-weight: 800; }
.login-sub { color: var(--text-3); font-size: 13.5px; margin: 6px 0 22px; }
.login-error { color: var(--red); font-size: 13.5px; margin-bottom: 14px; }
.login-foot { color: var(--text-3); font-size: 12px; margin-top: 18px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.field { margin-bottom: 14px; text-align: left; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--text-2); }
.field input { width: 100%; background: var(--bg-0); border: 1px solid rgba(148,163,184,.2); color: var(--text-1); padding: 12px 14px; border-radius: 11px; font-size: 15px; outline: none; transition: border-color .2s; font-family: inherit; }
.field input:focus { border-color: var(--orange); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 14.5px; border: none; cursor: pointer; text-decoration: none; transition: transform .18s, box-shadow .18s, background .18s; font-family: inherit; }
.btn-primary { background: linear-gradient(135deg, var(--orange), var(--orange-soft)); color: #1a0e05; box-shadow: 0 6px 20px rgba(255,111,44,.32); width: 100%; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(255,111,44,.42); }
.btn-ghost { background: var(--bg-2); color: var(--text-1); border: 1px solid rgba(148,163,184,.2); }
.btn-ghost:hover { border-color: rgba(148,163,184,.45); }
.btn-danger { background: rgba(248,113,113,.14); color: var(--red); border: 1px solid rgba(248,113,113,.35); }
.btn-danger:hover { background: rgba(248,113,113,.24); }
.btn-block { width: 100%; }

/* cuenta */
.acct-wrap { max-width: 980px; margin: 0 auto; padding: 34px 20px 70px; }
.acct-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.acct-logo { font-size: 44px; filter: drop-shadow(0 5px 14px rgba(255,111,44,.4)); }
.acct-head h1 { font-size: 26px; font-weight: 800; }
.acct-head p { color: var(--text-3); font-size: 13.5px; }
.acct-head .btn { margin-left: auto; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.card { background: linear-gradient(160deg, rgba(23,32,54,.88), rgba(16,22,39,.95)); border: 1px solid rgba(148,163,184,.12); border-radius: var(--radius); padding: 22px; }
.card-wide { grid-column: 1 / -1; }
.card h2 { font-size: 15.5px; font-weight: 800; margin-bottom: 14px; }
.kv { display: grid; grid-template-columns: 1fr 2fr; gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text-1); font-weight: 600; word-break: break-word; }
.msg { font-size: 13px; margin-left: 10px; }
.msg.ok { color: var(--green); }
.msg.err { color: var(--red); }
.session-row { display: flex; align-items: center; gap: 12px; background: var(--bg-0); border: 1px solid rgba(148,163,184,.12); border-radius: 11px; padding: 10px 14px; margin-bottom: 8px; font-size: 13.5px; flex-wrap: wrap; }
.session-row .sr-icon { font-size: 20px; }
.session-row .sr-info { flex: 1; min-width: 180px; }
.session-row .sr-info b { font-size: 13.5px; }
.session-row .sr-meta { color: var(--text-3); font-size: 12px; }
.session-row .cur { color: var(--green); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; }
.audit-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(148,163,184,.07); font-size: 13px; }
.audit-row .ar-time { color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 90px; }
.audit-row .ar-event { font-weight: 700; }
.audit-row .ar-detail { color: var(--text-3); }
#sessions { margin-bottom: 14px; }
#logout-all { margin-top: 4px; }
@media (max-width: 720px) { .acct-grid { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
