:root {
  --bg: #0f1419;
  --panel: #1a1f2e;
  --panel-2: #232938;
  --text: #e6edf3;
  --muted: #8b95a7;
  --accent: #f0b90b;
  --green: #0ecb81;
  --border: #2a3142;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 32px 40px;
  max-width: 100%;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

h1 {
  margin: 0 0 4px 0;
  font-size: 28px;
  font-weight: 600;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.meta strong {
  color: var(--text);
  font-weight: 500;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.15s;
}

.btn:hover { opacity: 0.85; }

.btn-secondary {
  display: inline-block;
  padding: 8px 16px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  margin-right: 8px;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-small-danger {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.btn-small-danger:hover {
  border-color: #f6465d;
  color: #f6465d;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 24px 0;
}

.empty-state h2 {
  margin: 0 0 12px 0;
  color: var(--text);
}

.empty-state p {
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto 12px auto;
  line-height: 1.6;
}

.returns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.return-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.return-card .label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.return-card .value {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.return-card .sub {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.return-card.positive .value { color: var(--green); }
.return-card.negative .value { color: #f6465d; }
.return-card.positive { border-color: rgba(14, 203, 129, 0.4); }
.return-card.negative { border-color: rgba(246, 70, 93, 0.4); }

.badge-auto {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(74, 158, 255, 0.15);
  color: #4a9eff;
  border: 1px solid rgba(74, 158, 255, 0.4);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-manual {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(139, 149, 167, 0.15);
  color: var(--muted);
  border: 1px solid rgba(139, 149, 167, 0.4);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.filters {
  margin-bottom: 16px;
}

.filter-form {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}

.filter-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-form select {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
}

.filter-form select:focus {
  outline: none;
  border-color: var(--accent);
}

/* Filtros dentro del <th> de la tabla principal */
.header-filter {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: inherit;
  cursor: pointer;
  max-width: 100%;
}

.header-filter:focus {
  outline: none;
  border-color: var(--accent);
}

.header-filter option {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}

.inner-table {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.inner-table th, .inner-table td {
  padding: 8px 12px;
  font-size: 13px;
}

.inner-table th {
  background: var(--panel-2);
}

/* Dashboard charts: layout flexbox con cards de ancho fijo y canvas de tamaño fijo.
   Esto elimina por completo los loops de resize que tenía con responsive:true. */
.charts-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 24px 0;
}

.chart-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  width: 420px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.chart-card h3 {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  text-align: center;
}

.chart-canvas-box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.chart-canvas-box canvas {
  /* Tamaño fijo del canvas en HTML; aquí forzamos que NO escale.
     !important para ganarle a cualquier CSS de Chart.js. */
  display: block !important;
  width: 320px !important;
  height: 320px !important;
}

/* ──────────────────────────────────────────────────────────
   MOBILE FIRST — @media (max-width: 768px)
   Transformaciones clave para iPhone / pantallas chicas
   ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    padding: 12px 10px;
  }

  h1 { font-size: 22px; margin: 0 0 4px 0; }
  h2 { font-size: 17px; }
  h3 { font-size: 13px; }

  /* Header (título + actions) → apilar vertical */
  body > header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
  }

  /* Acciones: wrap a 2 por fila */
  .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .actions .btn,
  .actions .btn-secondary {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    margin-right: 0;
  }
  .actions form { flex: 1 1 calc(50% - 3px); display: flex; }
  .actions form .btn,
  .actions form .btn-secondary { flex: 1; }

  /* Tablas → cards apiladas */
  table {
    border: none;
    background: transparent;
    border-radius: 0;
  }
  table thead { display: none; }
  table tbody tr {
    display: block;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  table tbody tr:hover { background: var(--panel); }
  table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: none;
    font-size: 13px;
    text-align: right;
    gap: 12px;
  }
  table td.num { text-align: right; }
  /* Primera celda (asset name) destacada arriba */
  table tbody tr > td:first-child {
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    justify-content: flex-start;
    text-align: left;
  }
  /* Label inline desde data-label="..." */
  table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    text-align: left;
  }

  /* Pct bar más compacta */
  .pct-wrap { width: 100px; height: 18px; }

  /* Totals: stack a 1 columna */
  .totals,
  .totals-4,
  .totals-2 { grid-template-columns: 1fr !important; gap: 10px; }

  .card .value { font-size: 22px; }
  .hero-value { font-size: 18px; }
  .hero-value.big { font-size: 24px; }

  /* Hero grid (detalle de activo) → 1 columna */
  .hero-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .hero { padding: 18px; }
  .hero-formula { font-size: 11px; }

  /* Paneles dobles a 1 columna */
  .grid-2 { grid-template-columns: 1fr !important; gap: 12px; }

  /* Filtros: stack vertical */
  .filter-form {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filter-form label { flex-direction: column; align-items: stretch; gap: 4px; }
  .filter-form select { width: 100%; }

  /* Home cards */
  .modules { grid-template-columns: 1fr; gap: 12px; }
  .module-card { padding: 16px; gap: 12px; }
  .module-icon { font-size: 28px; width: 48px; height: 48px; }
  .module-content h2 { font-size: 17px; }
  .module-desc { font-size: 12px; }
  .module-stats { gap: 14px; }
  .module-stats .stat-value { font-size: 15px; }
  .home-header { padding: 24px 0 16px 0; margin-bottom: 24px; }
  .home-header h1 { font-size: 32px; }

  /* Dashboard charts: 1 por fila, full width */
  .charts-row { flex-direction: column; align-items: stretch; }
  .chart-card { width: auto !important; }

  /* Leyenda más compacta */
  .legend { font-size: 11px; padding: 12px; line-height: 1.7; }

  /* Marcadores P&L: inline alineado a la derecha */
  .pnl-pct { display: block; margin-left: 0; }

  /* Code/mono más chico */
  .mono { font-size: 12px; }
  .small { font-size: 11px; }

  /* Asset detail header back links: smaller */
  .back { font-size: 12px; }

  /* Inner tables (en panels): mantener formato horizontal */
  .inner-table { font-size: 12px; }
  .inner-table th, .inner-table td { padding: 6px 8px; }
  .inner-table td { display: table-cell; border-bottom: 1px solid var(--border); }
  .inner-table tbody tr { display: table-row; background: transparent; border: none; padding: 0; margin: 0; }
  .inner-table thead { display: table-header-group; }
  .inner-table td::before { display: none; }
  .inner-table td:first-child { font-size: 12px; padding-bottom: 6px; margin-bottom: 0; border-bottom: 1px solid var(--border); }
}

.totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card .label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card .value {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: var(--panel-2); }

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.pct-wrap {
  position: relative;
  display: inline-block;
  width: 140px;
  height: 20px;
  background: var(--panel-2);
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
}

.pct-bar {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: linear-gradient(90deg, var(--accent), #d99e07);
  opacity: 0.35;
}

.pct-wrap span {
  position: relative;
  z-index: 1;
  line-height: 20px;
  font-size: 12px;
  font-weight: 500;
}

footer {
  margin-top: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.asset-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--border);
  transition: border-color 0.15s, color 0.15s;
}

.asset-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.back {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  margin-bottom: 8px;
}

.back:hover { color: var(--accent); }

.warnings { margin-bottom: 24px; }

.warning {
  background: rgba(240, 185, 11, 0.1);
  border: 1px solid rgba(240, 185, 11, 0.3);
  color: #fbe28a;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.card.positive { border-color: rgba(14, 203, 129, 0.4); }
.card.negative { border-color: rgba(246, 70, 93, 0.4); }
.card.positive .value { color: var(--green); }
.card.negative .value { color: #f6465d; }
.card .sub {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.panel h3 {
  margin: 0 0 8px 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.panel .big {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.panel .muted {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

h2 {
  margin: 32px 0 12px 0;
  font-size: 18px;
  font-weight: 600;
}

.buy { color: var(--green); font-weight: 600; }
.sell { color: #f6465d; font-weight: 600; }
.small { font-size: 12px; }

.hero {
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}

.hero.positive::before { background: var(--green); }
.hero.negative::before { background: #f6465d; }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.hero-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-grid .label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-value {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hero-value.big { font-size: 30px; }

.hero-pnl .hero-value {
  color: var(--accent);
}

.hero.positive .hero-pnl .hero-value { color: var(--green); }
.hero.negative .hero-pnl .hero-value { color: #f6465d; }

.hero-formula {
  margin: 20px 0 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.chart-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 24px;
}

.chart-section h2 {
  margin: 0 0 16px 0;
}

.chart-legend {
  margin: 16px 0 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.dot.blue { background: #4a9eff; }
.dot.yellow { background: var(--accent); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: repeat(2, 1fr); }
}

.totals-4 { grid-template-columns: repeat(4, 1fr); }
.totals-5 { grid-template-columns: repeat(5, 1fr); }
.totals-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 1400px) {
  .totals-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .totals-4 { grid-template-columns: repeat(2, 1fr); }
  .totals-5 { grid-template-columns: repeat(2, 1fr); }
}

.pnl-pos { color: var(--green); font-weight: 600; }
.pnl-neg { color: #f6465d; font-weight: 600; }
.pnl-pct {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 4px;
}

.marker {
  display: inline-block;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 4px;
  cursor: help;
}

.marker.approx {
  background: rgba(240, 185, 11, 0.15);
  color: var(--accent);
  border: 1px solid rgba(240, 185, 11, 0.4);
}

.marker.unknown {
  background: rgba(139, 149, 167, 0.15);
  color: var(--muted);
  border: 1px solid rgba(139, 149, 167, 0.4);
}

.marker.error {
  background: rgba(246, 70, 93, 0.15);
  color: #f6465d;
  border: 1px solid rgba(246, 70, 93, 0.4);
}

.marker.earn {
  background: rgba(14, 203, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(14, 203, 129, 0.4);
}

.source-earn {
  background: rgba(14, 203, 129, 0.15);
  color: var(--green);
  border: 1px solid rgba(14, 203, 129, 0.4);
}

.muted { color: var(--muted); }

.legend {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.legend strong { color: var(--text); }
.legend em { color: var(--muted); }
.legend .marker { margin-left: 0; margin-right: 6px; }

.sub-inline {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Logos de empresas en grilla de stocks */
.stock-symbol-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stock-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: white;
  padding: 2px;
  flex-shrink: 0;
}

.stock-logo-placeholder {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--panel-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.source-binance {
  background: rgba(240, 185, 11, 0.15);
  color: var(--accent);
  border: 1px solid rgba(240, 185, 11, 0.4);
}

.source-wallet {
  background: rgba(74, 158, 255, 0.15);
  color: #4a9eff;
  border: 1px solid rgba(74, 158, 255, 0.4);
}

.row-error {
  color: #f6465d;
  font-size: 11px;
  margin-top: 2px;
  cursor: help;
}

/* ── Home / modules ───────────────────────────────────── */

.home-header {
  text-align: center;
  padding: 40px 0 32px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
  display: block;
}

.home-header h1 {
  font-size: 42px;
  margin: 0 0 8px 0;
  /* Amarillo Binance — degradado del accent al tono más oscuro */
  background: linear-gradient(135deg, #f0b90b, #d99e07);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-header .meta {
  font-size: 15px;
}

.modules {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.module-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  position: relative;
}

.module-card.active:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--panel-2);
}

.module-card.active:hover .module-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.module-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.module-icon {
  font-size: 36px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  border-radius: 12px;
  flex-shrink: 0;
}

.module-content {
  flex: 1;
  min-width: 0;
}

.module-content h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 600;
}

.module-desc {
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.module-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.module-stats > div {
  display: flex;
  flex-direction: column;
}

.module-stats .stat-label {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.module-stats .stat-value {
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.module-stats .stat-sub {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.module-stats-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}

.module-arrow {
  font-size: 24px;
  color: var(--muted);
  transition: transform 0.15s, color 0.15s;
}

@media (max-width: 800px) {
  .modules { grid-template-columns: 1fr; }
}

/* ── Auth pages (login, 2fa, perfil, forgot, reset) ────────────────────── */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}
.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 32px 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.auth-box-wide { max-width: 560px; }
.auth-title {
  font-size: 32px;
  margin: 0 0 4px 0;
  background: linear-gradient(135deg, #f0b90b, #d99e07);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}
.auth-box h2 {
  font-size: 18px;
  margin: 16px 0 8px 0;
  color: var(--text);
}
.auth-box form { margin-top: 20px; }
.auth-box label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}
.auth-box input[type="text"],
.auth-box input[type="password"],
.auth-box input[type="email"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  box-sizing: border-box;
}
.auth-box .btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  margin-top: 6px;
}
.auth-error {
  background: rgba(240, 80, 80, 0.1);
  border: 1px solid rgba(240, 80, 80, 0.3);
  padding: 10px 12px;
  border-radius: 6px;
  color: #ff8888;
  font-size: 13px;
  margin: 12px 0;
}
.auth-info {
  background: rgba(11, 240, 102, 0.08);
  border: 1px solid rgba(11, 240, 102, 0.3);
  padding: 10px 12px;
  border-radius: 6px;
  color: #88ffaa;
  font-size: 13px;
  margin: 12px 0;
}
.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.auth-links a {
  color: var(--accent);
  text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }
.qr-block {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 20px 0;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
}
.qr-img {
  width: 180px;
  height: 180px;
  border-radius: 6px;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}
.qr-meta { font-size: 13px; color: var(--muted); }
.qr-meta p { margin: 4px 0; }
.qr-secret {
  display: inline-block;
  font-family: monospace;
  background: var(--panel);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
  margin-top: 6px;
}
@media (max-width: 500px) {
  .qr-block { flex-direction: column; }
  .qr-img { width: 100%; max-width: 220px; height: auto; }
}
