/* ==========================================================================
   Cinemata Remover · panel de addons de Stremio
   Liquid Glass UI con tema claro y oscuro.
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #05060d;
  --ink: #f4f6ff;
  --muted: rgba(226, 232, 255, 0.6);
  --faint: rgba(226, 232, 255, 0.4);

  --violet: #a78bfa;
  --violet-deep: #7c3aed;
  --cyan: #22d3ee;
  --cyan-soft: #67e8f9;
  --pink: #f472b6;
  --mint: #34d399;
  --amber: #fbbf24;
  --rose: #fb7185;

  --stroke: rgba(255, 255, 255, 0.14);
  --stroke-strong: rgba(255, 255, 255, 0.24);
  --stroke-soft: rgba(255, 255, 255, 0.08);
  --glass-tint: rgba(255, 255, 255, 0.06);

  --radius: 26px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

code,
kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

::selection {
  background: rgba(244, 114, 182, 0.32);
  color: #fff;
}

:focus-visible {
  outline: 2px solid rgba(103, 232, 249, 0.85);
  outline-offset: 3px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.26);
  background-clip: content-box;
}

/* Icons ------------------------------------------------------------------ */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  display: inline-block;
  vertical-align: -0.18em;
}

/* Background ------------------------------------------------------------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(76, 29, 149, 0.35), transparent 70%),
    linear-gradient(180deg, #05060d 0%, #060713 45%, #04050b 100%);
}

.orb {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}

.orb-a {
  width: 52vw;
  height: 52vw;
  min-width: 420px;
  min-height: 420px;
  left: -14vw;
  top: -18vw;
  background: radial-gradient(circle at 35% 35%, rgba(124, 58, 237, 0.8), transparent 66%);
  animation: float-a 22s ease-in-out infinite alternate;
}

.orb-b {
  width: 46vw;
  height: 46vw;
  min-width: 360px;
  min-height: 360px;
  right: -12vw;
  top: 4vh;
  background: radial-gradient(circle at 55% 45%, rgba(34, 211, 238, 0.55), transparent 66%);
  animation: float-b 26s ease-in-out infinite alternate;
}

.orb-c {
  width: 42vw;
  height: 42vw;
  min-width: 320px;
  min-height: 320px;
  left: 32vw;
  bottom: -22vw;
  background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.38), transparent 66%);
  animation: float-c 30s ease-in-out infinite alternate;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 0%, transparent 78%);
  opacity: 0.55;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 45%, transparent 30%, rgba(3, 4, 10, 0.7) 100%);
}

/* Top bar ---------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem clamp(1rem, 4vw, 2.5rem);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(5, 6, 15, 0.92) 0%, rgba(5, 6, 15, 0.55) 60%, transparent 100%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%);
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.42rem 0.95rem 0.42rem 0.45rem;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025));
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    0 16px 36px -20px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-decoration: none;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}

.brand:hover {
  transform: translateY(-1px);
  border-color: var(--stroke-strong);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: linear-gradient(140deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  box-shadow:
    0 10px 24px -10px rgba(99, 102, 241, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #fff;
}

.brand-mark .icon {
  width: 21px;
  height: 21px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-text strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.48);
}

.brand-text small {
  margin-top: 0.32rem;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.36);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  color: var(--muted);
  transition: transform 0.2s var(--ease-out), background 0.2s, border-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--stroke-strong);
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
}

.theme-toggle .icon {
  width: 17px;
  height: 17px;
}

.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.8rem;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.conn-pill .dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
  transition: background 0.3s, box-shadow 0.3s;
}

.conn-pill[data-state="ok"] {
  color: rgba(167, 243, 208, 0.9);
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.07);
}
.conn-pill[data-state="ok"] .dot {
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14), 0 0 10px rgba(52, 211, 153, 0.8);
}
.conn-pill[data-state="warn"] {
  color: rgba(253, 230, 138, 0.9);
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.07);
}
.conn-pill[data-state="warn"] .dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.14), 0 0 10px rgba(251, 191, 36, 0.8);
}

/* Shell / hero ----------------------------------------------------------- */
.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0 2.5rem;
}

.hero {
  max-width: 820px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.08);
  color: rgba(221, 214, 254, 0.85);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan-soft);
  box-shadow: 0 0 8px var(--cyan);
  animation: soft-pulse 2.4s ease-in-out infinite;
}

.hero h1 {
  margin: 1rem 0 0.9rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.15rem, 5.6vw, 4.15rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(100deg, #c4b5fd 0%, #67e8f9 48%, #f9a8d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(0.86rem, 1.5vw, 1rem);
  line-height: 1.7;
  text-wrap: pretty;
}

/* Layout ----------------------------------------------------------------- */
.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.side {
  display: grid;
  gap: 1rem;
  align-items: start;
}

/* Cards ------------------------------------------------------------------ */
.card {
  position: relative;
  padding: clamp(1.05rem, 2.2vw, 1.45rem);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.028) 45%, rgba(255, 255, 255, 0.02) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow:
    0 34px 80px -34px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.35), transparent 38%, transparent 64%, rgba(103, 232, 249, 0.16));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.step {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #c4b5fd 0%, #67e8f9 100%);
  color: #0b1020;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  box-shadow:
    0 10px 22px -10px rgba(103, 232, 249, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.card-head h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-head p {
  margin: 0.2rem 0 0;
  color: var(--faint);
  font-size: 0.7rem;
  line-height: 1.5;
}

/* Note under the connect card -------------------------------------------- */
.fine {
  margin: 0.9rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(226, 232, 255, 0.28);
  font-size: 0.6rem;
  line-height: 1.55;
}

/* Auth ------------------------------------------------------------------- */
.auth-form {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.auth-form > label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1rem 0.35rem 0.1rem 0.65rem;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  background: rgba(2, 6, 23, 0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
  border-color: rgba(103, 232, 249, 0.55);
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.08);
}

.input-wrap > .icon {
  width: 15px;
  height: 15px;
  color: rgba(196, 181, 253, 0.7);
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  padding: 0.62rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.75rem;
  outline: none;
}

.input-wrap input::placeholder {
  color: rgba(226, 232, 255, 0.25);
}

.input-eye {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(226, 232, 255, 0.4);
  transition: background 0.2s, color 0.2s;
}
.input-eye:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}
.input-eye .icon {
  width: 15px;
  height: 15px;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--faint);
  font-size: 0.66rem;
  cursor: pointer;
}

.check input {
  width: 14px;
  height: 14px;
  accent-color: var(--violet);
}

.account-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.65rem;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 13px;
  background: rgba(52, 211, 153, 0.06);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
  color: #fff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.account-info {
  flex: 1;
  min-width: 0;
}

.account-info strong,
.account-info span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-info strong {
  font-size: 0.72rem;
  font-weight: 650;
}

.account-info span {
  margin-top: 0.12rem;
  color: var(--faint);
  font-size: 0.62rem;
}

.help {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.help summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  color: rgba(226, 232, 255, 0.55);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.help summary::-webkit-details-marker {
  display: none;
}

.help summary::after {
  content: "+";
  margin-left: auto;
  color: rgba(103, 232, 249, 0.7);
  font-size: 0.9rem;
  line-height: 1;
}

.help[open] summary::after {
  content: "−";
}

.help ol {
  margin: 0.6rem 0 0;
  padding-left: 1.05rem;
  color: var(--faint);
  font-size: 0.64rem;
  line-height: 1.7;
}

.help a {
  color: #a5f3fc;
  text-decoration: underline;
  text-decoration-color: rgba(165, 243, 252, 0.35);
  text-underline-offset: 2px;
}

.help p {
  margin: 0.55rem 0 0;
  color: rgba(226, 232, 255, 0.3);
  font-size: 0.6rem;
  line-height: 1.55;
}

.help p code {
  color: rgba(226, 232, 255, 0.5);
}

.code-line {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding: 0.42rem 0.42rem 0.42rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
}

.code-line code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  color: rgba(226, 232, 255, 0.7);
  font-size: 0.56rem;
  white-space: nowrap;
}

.code-line .icon-btn {
  width: 26px;
  height: 26px;
}

.code-line .icon-btn .icon {
  width: 13px;
  height: 13px;
}

/* Addons ----------------------------------------------------------------- */
.addons-card {
  display: flex;
  flex-direction: column;
  min-height: 540px;
}

.addons-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.addons-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 0.45rem;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
}

.addon-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.addon-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 15px;
  background: rgba(8, 11, 25, 0.5);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.addon-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.045);
}

.addon-row.is-cinemata {
  border-color: rgba(244, 63, 94, 0.3);
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.09), rgba(8, 11, 25, 0.5) 70%);
}

.addon-row.is-own {
  border-color: rgba(103, 232, 249, 0.22);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.07), rgba(8, 11, 25, 0.5) 70%);
}

.addon-row.is-dragging {
  opacity: 0.35;
}

.addon-row.drop-before {
  box-shadow: 0 -2px 0 0 var(--cyan-soft);
}

.addon-row.drop-after {
  box-shadow: 0 2px 0 0 var(--cyan-soft);
}

.grip {
  display: grid;
  place-items: center;
  width: 22px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.2);
  cursor: grab;
}

.grip:active {
  cursor: grabbing;
}

.grip .icon {
  width: 16px;
  height: 16px;
}

.addon-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.addon-logo-fallback {
  color: rgba(226, 232, 255, 0.6);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  transition: opacity 0.2s;
}

.addon-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.2s;
}

.addon-logo.has-img img {
  opacity: 1;
}

.addon-logo.has-img .addon-logo-fallback {
  opacity: 0;
}

.addon-info {
  flex: 1;
  min-width: 0;
}

.addon-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.addon-title h3 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: rgba(244, 246, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 255, 0.45);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.badge-danger {
  border-color: rgba(244, 63, 94, 0.3);
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
}

.badge-own {
  border-color: rgba(103, 232, 249, 0.3);
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
}

.addon-id {
  margin: 0.16rem 0 0;
  overflow: hidden;
  color: rgba(226, 232, 255, 0.32);
  font-size: 0.59rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.addon-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  margin-top: 0.3rem;
}

.type-chip {
  padding: 0.13rem 0.3rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 255, 0.42);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.addon-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: none;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(226, 232, 255, 0.38);
  transition: background 0.2s, border-color 0.2s, color 0.2s, opacity 0.2s;
}

.icon-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.icon-btn.danger:hover:not(:disabled) {
  border-color: rgba(244, 63, 94, 0.25);
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
}

.icon-btn:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.icon-btn .icon {
  width: 15px;
  height: 15px;
}

/* Empty / loading -------------------------------------------------------- */
.empty-state {
  margin-top: 1rem;
  padding: 2.4rem 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.018);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 15px;
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
}

.empty-icon .icon {
  width: 22px;
  height: 22px;
}

.empty-state h3 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.empty-state p {
  max-width: 330px;
  margin: 0.35rem auto 0;
  color: var(--faint);
  font-size: 0.7rem;
  line-height: 1.6;
}

.empty-state .btn {
  margin-top: 0.9rem;
}

.skeleton-row {
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 15px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* Footer of addons ------------------------------------------------------- */
.list-foot {
  display: grid;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(244, 63, 94, 0.16);
  border-radius: 13px;
  background: rgba(244, 63, 94, 0.045);
}

.danger-zone strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
}

.danger-zone span {
  display: block;
  margin-top: 0.12rem;
  color: rgba(226, 232, 255, 0.32);
  font-size: 0.62rem;
}

.save-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.65rem;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 13px;
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.09), rgba(139, 92, 246, 0.09));
  animation: save-in 0.3s var(--ease-out);
}

.dirty-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan-soft);
  box-shadow: 0 0 10px var(--cyan);
  animation: soft-pulse 1.6s ease-in-out infinite;
}

#saveText {
  flex: 1;
  color: rgba(226, 232, 255, 0.7);
  font-size: 0.66rem;
  line-height: 1.4;
}

.save-bar .btn {
  flex: none;
}

.btn.is-pulse {
  animation: btn-pulse 0.8s ease-in-out 2;
}

/* Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.66rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 650;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), background 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.995);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 46%, #22d3ee 100%);
  color: #fff;
  box-shadow:
    0 12px 30px -12px rgba(99, 102, 241, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 18px 38px -14px rgba(34, 211, 238, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-glass {
  border-color: var(--stroke);
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-glass:hover:not(:disabled) {
  border-color: var(--stroke-strong);
  background: rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.btn-danger {
  border-color: rgba(244, 63, 94, 0.28);
  background: rgba(244, 63, 94, 0.11);
  color: #fda4af;
}

.btn-danger:hover:not(:disabled) {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.18);
  color: #ffe4e6;
}

.btn-sm {
  padding: 0.5rem 0.68rem;
  border-radius: 10px;
  font-size: 0.68rem;
}

.btn-sm .icon {
  width: 14px;
  height: 14px;
}

.w-full {
  width: 100%;
}

/* Footer ----------------------------------------------------------------- */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem 0 2.5rem;
  color: rgba(226, 232, 255, 0.28);
  font-size: 0.62rem;
  line-height: 1.5;
}

.footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer .icon {
  width: 14px;
  height: 14px;
  color: rgba(52, 211, 153, 0.55);
}

.footer-links {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(148, 163, 184, 0.45);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.link-btn:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

/* Modals ----------------------------------------------------------------- */
body.no-scroll {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 10, 0.74);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade-in 0.25s ease;
}

.modal-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  max-height: calc(100vh - 2rem);
  padding: clamp(1.2rem, 3vw, 1.6rem);
  border: 1px solid var(--stroke-strong);
  border-radius: 22px;
  background: linear-gradient(160deg, #10142a 0%, #080b16 100%);
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: modal-in 0.38s var(--ease-out);
}

.modal-card-lg {
  width: min(620px, 100%);
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(103, 232, 249, 0.25);
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
}

.modal-icon .icon {
  width: 22px;
  height: 22px;
}

.modal-card h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.modal-card > p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.modal-card > p strong {
  color: var(--ink);
}

.modal-card > .btn {
  margin-top: 1.2rem;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-sub {
  margin: 0.3rem 0 0;
  color: var(--faint);
  font-size: 0.72rem;
  line-height: 1.5;
}

.modal-badge {
  flex: none;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--faint);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.terms-scroll {
  overflow-y: auto;
  margin: 1rem 0;
  padding-right: 0.45rem;
  overscroll-behavior: contain;
}

.terms-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.65;
}

.terms-list li::marker {
  color: rgba(103, 232, 249, 0.7);
  font-weight: 700;
}

.terms-list strong {
  color: var(--ink);
  font-weight: 650;
}

.terms-list code {
  padding: 0.08rem 0.3rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(196, 181, 253, 0.9);
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--stroke-soft);
}

/* Locked screen ---------------------------------------------------------- */
.locked {
  display: grid;
  place-items: center;
  min-height: 78vh;
  padding: 2.5rem 1rem;
}

.locked-card {
  width: min(440px, 100%);
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow:
    0 34px 80px -34px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-align: center;
}

.locked-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 1rem;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 16px;
  background: rgba(251, 113, 133, 0.1);
  color: #fda4af;
}

.locked-icon .icon {
  width: 26px;
  height: 26px;
}

.locked-card h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.locked-card p {
  margin: 0.5rem 0 1.1rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.65;
}

.locked-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

/* Report card / form ----------------------------------------------------- */
.report-card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.05rem;
}

.report-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.report-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 11px;
  background: rgba(167, 139, 250, 0.12);
  color: #c4b5fd;
}

.report-badge .icon {
  width: 17px;
  height: 17px;
}

.report-card h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.report-card p {
  margin: 0.16rem 0 0;
  color: var(--faint);
  font-size: 0.66rem;
  line-height: 1.5;
}

.report-form {
  display: grid;
  gap: 0.75rem;
  min-height: 0;
  margin-top: 1rem;
  padding-right: 0.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.report-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.field > label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
}

.field-hint {
  color: var(--faint);
  font-size: 0.58rem;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--ink);
  font-size: 0.74rem;
  line-height: 1.55;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(226, 232, 255, 0.25);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(103, 232, 249, 0.55);
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.08);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding-right: 2rem;
  cursor: pointer;
}

.select-wrap > .icon {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  width: 15px;
  height: 15px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.field-count {
  justify-self: end;
  color: var(--faint);
  font-size: 0.56rem;
}

.field-count.is-near {
  color: var(--amber);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.report-status {
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.55;
}

.report-status[data-type="error"] {
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.1);
  color: #fda4af;
}

.report-status[data-type="warn"] {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
}

.report-status[data-type="success"] {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.report-fallback {
  display: grid;
  gap: 0.5rem;
  padding: 0.7rem;
  border: 1px dashed rgba(251, 191, 36, 0.35);
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.06);
}

.report-fallback p {
  margin: 0;
  color: rgba(253, 230, 138, 0.85);
  font-size: 0.66rem;
  line-height: 1.55;
}

.report-fallback-text {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.55);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.6rem;
  line-height: 1.55;
  resize: vertical;
}

.report-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* Toasts ----------------------------------------------------------------- */
.toast-stack {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(350px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(9, 12, 26, 0.92);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    0 22px 46px -14px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: rgba(244, 246, 255, 0.84);
  font-size: 0.72rem;
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 0.38s var(--ease-out);
}

.toast.is-out {
  animation: toast-out 0.3s ease forwards;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(196, 181, 253, 0.9);
}

.toast-icon .icon {
  width: 14px;
  height: 14px;
}

.toast[data-type="success"] .toast-icon {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.toast[data-type="warn"] .toast-icon {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.1);
  color: #fde68a;
}

.toast[data-type="error"] .toast-icon {
  border-color: rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.1);
  color: #fda4af;
}

.toast-text {
  padding-top: 0.18rem;
}

/* Animations ------------------------------------------------------------- */
@keyframes float-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, 3vh, 0) scale(1.08); }
}
@keyframes float-b {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to { transform: translate3d(-3vw, 4vh, 0) scale(0.96); }
}
@keyframes float-c {
  from { transform: translate3d(0, 0, 0) scale(0.98); }
  to { transform: translate3d(3vw, -4vh, 0) scale(1.1); }
}
@keyframes soft-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@keyframes save-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 12px 30px -12px rgba(99, 102, 241, 0.9); }
  50% { box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.25), 0 12px 30px -12px rgba(34, 211, 238, 0.9); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(-8px) scale(0.98); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .addons-card {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 0.8rem 1rem;
  }

  .brand-text small {
    display: none;
  }

  .side {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    letter-spacing: -0.045em;
  }

  .addon-types {
    display: none;
  }

  .danger-zone {
    flex-direction: column;
    align-items: stretch;
  }

  .danger-zone .btn {
    width: 100%;
  }

  .save-bar {
    flex-wrap: wrap;
  }

  #saveText {
    flex: 1 1 calc(100% - 1.5rem);
  }

  .save-bar .btn {
    flex: 1;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .shell {
    width: calc(100% - 1.25rem);
  }

  .brand {
    padding-right: 0.65rem;
  }

  .brand-text strong {
    font-size: 0.82rem;
  }

  .conn-pill {
    padding: 0.45rem 0.6rem;
    font-size: 0.6rem;
  }

  .conn-pill span:last-child {
    display: none;
  }

  .conn-pill::after {
    content: "Sin conectar";
    font-size: 0.6rem;
  }

  .conn-pill[data-state="ok"]::after {
    content: "Conectada";
  }

  .conn-pill[data-state="warn"]::after {
    content: "Instalado";
  }

  .addon-row {
    gap: 0.5rem;
    padding: 0.55rem;
  }

  .addon-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .addon-actions .icon-btn {
    width: 27px;
    height: 27px;
  }

  .addon-title .badge:not(.badge-danger):not(.badge-own) {
    display: none;
  }

  .toast-stack {
    top: 4.4rem;
    right: 0.6rem;
    width: calc(100vw - 1.2rem);
  }
}

@media (pointer: coarse) {
  .grip {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Light theme
   ========================================================================== */
[data-theme="light"] {
  --bg: #eef1f8;
  --ink: #141a2c;
  --muted: rgba(20, 26, 44, 0.66);
  --faint: rgba(20, 26, 44, 0.5);

  --stroke: rgba(20, 26, 44, 0.12);
  --stroke-strong: rgba(20, 26, 44, 0.22);
  --stroke-soft: rgba(20, 26, 44, 0.07);
  --glass-tint: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] ::selection {
  background: rgba(139, 92, 246, 0.22);
  color: #141a2c;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(20, 26, 44, 0.22);
  background-clip: content-box;
}
[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 26, 44, 0.34);
  background-clip: content-box;
}

[data-theme="light"] .bg {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(167, 139, 250, 0.32), transparent 70%),
    linear-gradient(180deg, #f7f8fd 0%, #eef1f8 45%, #e7ebf5 100%);
}
[data-theme="light"] .orb {
  opacity: 0.34;
  filter: blur(100px);
}
[data-theme="light"] .orb-a {
  background: radial-gradient(circle at 35% 35%, rgba(139, 92, 246, 0.55), transparent 66%);
}
[data-theme="light"] .orb-b {
  background: radial-gradient(circle at 55% 45%, rgba(34, 211, 238, 0.45), transparent 66%);
}
[data-theme="light"] .orb-c {
  background: radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.32), transparent 66%);
}
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(20, 26, 44, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 26, 44, 0.055) 1px, transparent 1px);
  opacity: 0.5;
}
[data-theme="light"] .bg-vignette {
  background: radial-gradient(ellipse 90% 70% at 50% 45%, transparent 35%, rgba(211, 217, 232, 0.7) 100%);
}

/* Top bar */
[data-theme="light"] .topbar::before {
  background: linear-gradient(180deg, rgba(247, 248, 253, 0.95) 0%, rgba(247, 248, 253, 0.6) 60%, transparent 100%);
}
[data-theme="light"] .brand {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.6));
  box-shadow:
    0 16px 36px -26px rgba(20, 26, 44, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
[data-theme="light"] .brand-text em {
  color: rgba(20, 26, 44, 0.5);
}
[data-theme="light"] .brand-text small {
  color: rgba(20, 26, 44, 0.45);
}
[data-theme="light"] .theme-toggle {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
  color: rgba(20, 26, 44, 0.6);
}
[data-theme="light"] .theme-toggle:hover {
  background: #fff;
  color: #141a2c;
}
[data-theme="light"] .conn-pill {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
[data-theme="light"] .conn-pill[data-state="ok"] {
  color: #047857;
  border-color: rgba(5, 150, 105, 0.28);
  background: rgba(16, 185, 129, 0.12);
}
[data-theme="light"] .conn-pill[data-state="ok"] .dot {
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14), 0 0 10px rgba(5, 150, 105, 0.55);
}
[data-theme="light"] .conn-pill[data-state="warn"] {
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(245, 158, 11, 0.14);
}

/* Hero */
[data-theme="light"] .eyebrow {
  border-color: rgba(124, 58, 237, 0.22);
  background: rgba(139, 92, 246, 0.1);
  color: #6d28d9;
}
[data-theme="light"] .grad {
  background: linear-gradient(100deg, #7c3aed 0%, #0891b2 48%, #db2777 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Cards */
[data-theme="light"] .card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.76) 45%, rgba(255, 255, 255, 0.64) 100%);
  box-shadow:
    0 30px 70px -42px rgba(20, 26, 44, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
[data-theme="light"] .card::before {
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), transparent 38%, transparent 64%, rgba(34, 211, 238, 0.4));
}

/* Auth */
[data-theme="light"] .input-wrap {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 2px rgba(20, 26, 44, 0.05);
}
[data-theme="light"] .input-wrap input {
  color: var(--ink);
}
[data-theme="light"] .input-wrap input::placeholder {
  color: rgba(20, 26, 44, 0.34);
}
[data-theme="light"] .input-eye {
  color: rgba(20, 26, 44, 0.45);
}
[data-theme="light"] .input-eye:hover {
  background: rgba(20, 26, 44, 0.06);
  color: #141a2c;
}
[data-theme="light"] .account-box {
  border-color: rgba(5, 150, 105, 0.24);
  background: rgba(16, 185, 129, 0.1);
}
[data-theme="light"] .help {
  border-top-color: rgba(20, 26, 44, 0.08);
}
[data-theme="light"] .help summary {
  color: rgba(20, 26, 44, 0.6);
}
[data-theme="light"] .help a {
  color: #0e7490;
  text-decoration-color: rgba(14, 116, 144, 0.35);
}
[data-theme="light"] .help p {
  color: rgba(20, 26, 44, 0.45);
}
[data-theme="light"] .help p code {
  color: rgba(20, 26, 44, 0.6);
}
[data-theme="light"] .code-line {
  border-color: rgba(20, 26, 44, 0.1);
  background: rgba(20, 26, 44, 0.06);
}
[data-theme="light"] .code-line code {
  color: rgba(20, 26, 44, 0.75);
}
[data-theme="light"] .fine {
  border-top-color: rgba(20, 26, 44, 0.08);
  color: rgba(20, 26, 44, 0.52);
}

/* Addons */
[data-theme="light"] .count {
  background: rgba(255, 255, 255, 0.7);
}
[data-theme="light"] .addon-row {
  border-color: rgba(20, 26, 44, 0.09);
  background: rgba(255, 255, 255, 0.74);
}
[data-theme="light"] .addon-row:hover {
  border-color: rgba(20, 26, 44, 0.18);
  background: #fff;
}
[data-theme="light"] .addon-row.is-cinemata {
  border-color: rgba(225, 29, 72, 0.3);
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.12), rgba(255, 255, 255, 0.82) 70%);
}
[data-theme="light"] .addon-row.is-own {
  border-color: rgba(8, 145, 178, 0.28);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.15), rgba(255, 255, 255, 0.82) 70%);
}
[data-theme="light"] .grip {
  color: rgba(20, 26, 44, 0.25);
}
[data-theme="light"] .addon-logo {
  border-color: rgba(20, 26, 44, 0.1);
  background: rgba(20, 26, 44, 0.04);
}
[data-theme="light"] .addon-logo-fallback {
  color: rgba(20, 26, 44, 0.6);
}
[data-theme="light"] .addon-title h3 {
  color: #141a2c;
}
[data-theme="light"] .badge {
  border-color: rgba(20, 26, 44, 0.12);
  background: rgba(20, 26, 44, 0.05);
  color: rgba(20, 26, 44, 0.55);
}
[data-theme="light"] .badge-danger {
  border-color: rgba(225, 29, 72, 0.3);
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}
[data-theme="light"] .badge-own {
  border-color: rgba(8, 145, 178, 0.3);
  background: rgba(34, 211, 238, 0.16);
  color: #0e7490;
}
[data-theme="light"] .addon-id {
  color: rgba(20, 26, 44, 0.45);
}
[data-theme="light"] .type-chip {
  background: rgba(20, 26, 44, 0.05);
  color: rgba(20, 26, 44, 0.5);
}
[data-theme="light"] .icon-btn {
  color: rgba(20, 26, 44, 0.45);
}
[data-theme="light"] .icon-btn:hover:not(:disabled) {
  border-color: rgba(20, 26, 44, 0.12);
  background: rgba(20, 26, 44, 0.06);
  color: #141a2c;
}
[data-theme="light"] .icon-btn.danger:hover:not(:disabled) {
  border-color: rgba(225, 29, 72, 0.3);
  background: rgba(244, 63, 94, 0.12);
  color: #be123c;
}
[data-theme="light"] .empty-state {
  border-color: rgba(20, 26, 44, 0.14);
  background: rgba(255, 255, 255, 0.55);
}
[data-theme="light"] .empty-icon {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
}
[data-theme="light"] .skeleton-row {
  border-color: rgba(20, 26, 44, 0.06);
  background: linear-gradient(90deg, rgba(20, 26, 44, 0.04), rgba(20, 26, 44, 0.1), rgba(20, 26, 44, 0.04));
  background-size: 200% 100%;
}
[data-theme="light"] .danger-zone {
  border-color: rgba(225, 29, 72, 0.2);
  background: rgba(244, 63, 94, 0.06);
}
[data-theme="light"] .danger-zone span {
  color: rgba(20, 26, 44, 0.52);
}
[data-theme="light"] .save-bar {
  border-color: rgba(8, 145, 178, 0.26);
  background: linear-gradient(120deg, rgba(34, 211, 238, 0.15), rgba(139, 92, 246, 0.13));
}
[data-theme="light"] #saveText {
  color: rgba(20, 26, 44, 0.7);
}

/* Buttons */
[data-theme="light"] .btn-ghost {
  border-color: rgba(20, 26, 44, 0.14);
}
[data-theme="light"] .btn-ghost:hover:not(:disabled) {
  border-color: rgba(20, 26, 44, 0.24);
  background: rgba(20, 26, 44, 0.05);
  color: #141a2c;
}
[data-theme="light"] .btn-glass {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 #fff;
}
[data-theme="light"] .btn-danger {
  border-color: rgba(225, 29, 72, 0.3);
  background: rgba(244, 63, 94, 0.1);
  color: #be123c;
}
[data-theme="light"] .btn-danger:hover:not(:disabled) {
  border-color: rgba(225, 29, 72, 0.45);
  background: rgba(244, 63, 94, 0.18);
  color: #9f1239;
}

/* Footer */
[data-theme="light"] .footer {
  color: rgba(20, 26, 44, 0.52);
}
[data-theme="light"] .footer .icon {
  color: rgba(5, 150, 105, 0.8);
}
[data-theme="light"] .link-btn {
  color: rgba(20, 26, 44, 0.62);
}
[data-theme="light"] .link-btn:hover {
  color: #141a2c;
}

/* Toasts */
[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 22px 46px -20px rgba(20, 26, 44, 0.45),
    inset 0 1px 0 #fff;
  color: #141a2c;
}
[data-theme="light"] .toast-icon {
  border-color: rgba(20, 26, 44, 0.12);
  background: rgba(20, 26, 44, 0.05);
  color: #6d28d9;
}

/* Modals */
[data-theme="light"] .modal-backdrop {
  background: rgba(20, 26, 44, 0.42);
}
[data-theme="light"] .modal-card {
  border-color: rgba(20, 26, 44, 0.14);
  background: linear-gradient(160deg, #ffffff 0%, #f2f4fb 100%);
  box-shadow:
    0 40px 90px -40px rgba(20, 26, 44, 0.65),
    inset 0 1px 0 #fff;
}
[data-theme="light"] .modal-icon {
  border-color: rgba(8, 145, 178, 0.24);
  background: rgba(34, 211, 238, 0.14);
  color: #0e7490;
}
[data-theme="light"] .modal-badge {
  background: rgba(20, 26, 44, 0.06);
  color: rgba(20, 26, 44, 0.6);
}
[data-theme="light"] .terms-list {
  color: rgba(20, 26, 44, 0.72);
}
[data-theme="light"] .terms-list strong {
  color: #141a2c;
}
[data-theme="light"] .terms-list li::marker {
  color: #0891b2;
}
[data-theme="light"] .terms-list code {
  background: rgba(20, 26, 44, 0.07);
  color: #5b21b6;
}
[data-theme="light"] .locked-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.68));
  box-shadow:
    0 34px 80px -44px rgba(20, 26, 44, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
[data-theme="light"] .locked-icon {
  border-color: rgba(225, 29, 72, 0.28);
  background: rgba(244, 63, 94, 0.1);
  color: #be123c;
}

/* Report card / form */
[data-theme="light"] .report-badge {
  border-color: rgba(124, 58, 237, 0.2);
  background: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
}
[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .field textarea {
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 2px rgba(20, 26, 44, 0.05);
}
[data-theme="light"] .field input::placeholder,
[data-theme="light"] .field textarea::placeholder {
  color: rgba(20, 26, 44, 0.34);
}
[data-theme="light"] .report-status {
  background: rgba(20, 26, 44, 0.04);
}
[data-theme="light"] .report-status[data-type="error"] {
  border-color: rgba(225, 29, 72, 0.3);
  background: rgba(244, 63, 94, 0.1);
  color: #be123c;
}
[data-theme="light"] .report-status[data-type="warn"] {
  border-color: rgba(180, 83, 9, 0.3);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}
[data-theme="light"] .report-status[data-type="success"] {
  border-color: rgba(5, 150, 105, 0.3);
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
[data-theme="light"] .report-fallback {
  border-color: rgba(180, 83, 9, 0.3);
  background: rgba(245, 158, 11, 0.1);
}
[data-theme="light"] .report-fallback p {
  color: #b45309;
}
[data-theme="light"] .report-fallback-text {
  background: rgba(255, 255, 255, 0.9);
}

/* Modal on small screens -------------------------------------------------- */
@media (max-width: 560px) {
  .modal {
    padding: 0.6rem;
  }

  .modal-card {
    max-height: calc(100vh - 1.2rem);
    padding: 1.05rem;
    border-radius: 18px;
  }

  .terms-scroll {
    max-height: none;
    flex: 1;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .report-form {
    padding-right: 0;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }
}
