@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/manrope-500.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/manrope-700.woff2") format("woff2");
}

:root {
  /* Dark is the default look (matches the original design); light is
     available via the theme toggle in the header. */
  --bg: #0a0f1c;
  --bg-alt: #0d1424;
  --surface: #131b2e;
  --surface-alt: #1a2338;
  --border: #29334c;
  --text: #eef1f8;
  --muted: #93a0bd;
  --accent: #3ea6ff;
  --accent-strong: #1c7ed6;
  --accent-ink: #04101f;
  --accent-rgb: 62, 166, 255;
  --success: #4ade80;
  --success-rgb: 74, 222, 128;
  --warning: #fbbf24;
  --warning-rgb: 251, 191, 36;
  --danger: #f87171;
  --danger-rgb: 248, 113, 113;
  --danger-ink: #2a0a0a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.6);
}

:root[data-theme="light"] {
  --bg: #f3f5fb;
  --bg-alt: #eaeef8;
  --surface: #ffffff;
  --surface-alt: #f1f3f9;
  --border: #dde2ef;
  --text: #121826;
  --muted: #5c6579;
  --accent: #1a63d8;
  --accent-strong: #0f4fb0;
  --accent-ink: #ffffff;
  --accent-rgb: 26, 99, 216;
  --success: #15803d;
  --success-rgb: 21, 128, 61;
  --warning: #a05a00;
  --warning-rgb: 160, 90, 0;
  --danger: #c22929;
  --danger-rgb: 194, 41, 41;
  --danger-ink: #ffffff;
  --shadow: 0 1px 2px rgba(20, 30, 60, 0.06), 0 16px 36px -20px rgba(20, 30, 60, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace;
}

h1, h2, h3, .brand, .auth-hero .lockup span {
  font-family: "Manrope", -apple-system, sans-serif;
  font-weight: 700;
  text-wrap: balance;
}

/* ---------------------------------------------------------------- topbar */

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

header.topbar .brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  flex: none;
  letter-spacing: -0.01em;
}
header.topbar .brand:hover { text-decoration: none; color: var(--text); }
header.topbar .brand img { border-radius: 7px; box-shadow: var(--shadow); }
header.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.15rem; }
header.topbar nav a {
  padding: 0.4rem 0.65rem;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}
header.topbar nav a:hover { color: var(--text); background: var(--surface-alt); text-decoration: none; }
header.topbar .userbox { display: flex; align-items: center; font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0.75rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .icon { font-size: 0.95rem; }

/* ------------------------------------------------------------------ main */

main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem 4.5rem; }
main.auth-main { max-width: none; margin: 0; padding: 0; }

h1 { font-size: 1.65rem; margin: 0 0 1.4rem; letter-spacing: -0.015em; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.85rem; letter-spacing: -0.01em; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem;
  margin-bottom: 1.4rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.65rem 0.7rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-alt); }

label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--muted); margin: 0.85rem 0 0.35rem; }
input, select, textarea {
  width: 100%;
  padding: 0.62rem 0.75rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.94rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.7; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
textarea { resize: vertical; min-height: 5.5rem; }

button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  padding: 0.62rem 1.2rem;
  border-radius: 7px;
  border: none;
  background: var(--accent-strong);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
button:hover, .btn:hover { background: var(--accent); text-decoration: none; }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.secondary { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { background: var(--surface); border-color: var(--accent); }
.btn.danger { background: var(--danger); color: var(--danger-ink); }

.badge {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge.stable { background: rgba(var(--success-rgb), 0.15); color: var(--success); }
.badge.beta { background: rgba(var(--warning-rgb), 0.15); color: var(--warning); }
.badge.deprecated { background: rgba(148, 163, 184, 0.15); color: var(--muted); }
.badge.open { background: rgba(var(--danger-rgb), 0.15); color: var(--danger); }
.badge.resolved { background: rgba(var(--success-rgb), 0.15); color: var(--success); }

.alert { padding: 0.8rem 1.05rem; border-radius: var(--radius); margin-bottom: 1.1rem; font-size: 0.9rem; }
.alert.error { background: rgba(var(--danger-rgb), 0.12); color: var(--danger); border: 1px solid rgba(var(--danger-rgb), 0.3); }
.alert.success { background: rgba(var(--success-rgb), 0.12); color: var(--success); border: 1px solid rgba(var(--success-rgb), 0.3); }
.alert.warning { background: rgba(var(--warning-rgb), 0.12); color: var(--warning); border: 1px solid rgba(var(--warning-rgb), 0.3); }

.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.token-value { font-family: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace; background: var(--surface-alt); padding: 0.6rem 0.7rem; border-radius: 7px; word-break: break-all; display: block; margin-top: 0.4rem; border: 1px solid var(--border); }
.actions form { display: inline; }
.comment { border-bottom: 1px solid var(--border); padding: 0.85rem 0; }
.comment:last-child { border-bottom: none; }

/* ------------------------------------------------------- paginas de auth */

.auth-shell {
  min-height: calc(100vh - 62px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: stretch;
}
@media (max-width: 940px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
}

.auth-hero {
  position: relative;
  padding: 3.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  color: #eef4ff;
  background:
    radial-gradient(60% 80% at 15% 12%, rgba(62, 166, 255, 0.35), transparent 60%),
    radial-gradient(70% 70% at 90% 90%, rgba(28, 126, 214, 0.28), transparent 60%),
    linear-gradient(160deg, #071022 0%, #0c1830 55%, #0a1220 100%);
  overflow: hidden;
}
.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 30% 20%, black, transparent 75%);
  pointer-events: none;
}

.auth-hero .lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
}
.auth-hero .lockup img { border-radius: 9px; box-shadow: 0 8px 24px -8px rgba(62, 166, 255, 0.55); }
.auth-hero .lockup span { font-size: 1.3rem; color: #ffffff; }

.auth-hero .eyebrow {
  position: relative;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fc7ff;
}

.auth-hero h1 {
  position: relative;
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.2;
  margin: 0;
  color: #ffffff;
}
.auth-hero h1 em { font-style: normal; color: #7cc4ff; }

.auth-hero p.lede {
  position: relative;
  max-width: 46ch;
  color: #c3d3ec;
  font-size: 1rem;
  margin: 0;
}

.auth-hero ul.features {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.auth-hero ul.features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.92rem;
  color: #dbe6f7;
}
.auth-hero ul.features .mark {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(62, 166, 255, 0.16);
  border: 1px solid rgba(124, 196, 255, 0.35);
  color: #7cc4ff;
  font-size: 0.85rem;
  font-weight: 700;
}
.auth-hero ul.features strong { color: #fff; }

.auth-hero .pill-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.auth-hero .pill {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cfe4ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--bg);
}
.auth-panel .panel-inner { width: 100%; max-width: 380px; }
.auth-panel h1 { font-size: 1.4rem; margin-bottom: 0.35rem; }
.auth-panel .subtitle { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.5rem; }
.auth-panel .card { margin-bottom: 1rem; }
.auth-panel .switch-link { text-align: center; color: var(--muted); font-size: 0.88rem; }
