/* Paleta Oficial Academia "SU ESPOSO, TRADER" — Azul Marino Imperial + Dorado Champagne */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background: radial-gradient(125% 58% at 50% 0%, #12284A 0%, #091629 54%, #06101E 100%);
  color: #F6F9FD;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 18px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(28, 52, 86, 0.85);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.crest-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(180deg, #132847 0%, #0C1B31 100%);
  border: 1px solid rgba(221, 184, 96, 0.44);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #F6F9FD;
}

.brand-sub {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #DFBC68;
}

.conn-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: #102542;
  border: 1px solid rgba(217, 179, 89, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #E7ECF5;
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
}

.conn-dot.warn {
  background: #FBBF24;
}

.alert-box {
  margin: 12px 20px 0;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.42);
  color: #FECACA;
  font-size: 12px;
  line-height: 1.45;
}

.view-section {
  padding: 18px 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.navy-card {
  background: linear-gradient(180deg, #0F213B 0%, #0B192E 100%);
  border: 1px solid #1C3456;
  border-radius: 18px;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.onboard-hero {
  text-align: center;
  padding: 6px 4px 2px;
}

.gold-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #112542;
  border: 1px solid rgba(217, 179, 89, 0.38);
  color: #E5C470;
  font-size: 12px;
  font-weight: 600;
}

.onboard-title {
  font-size: 21px;
  font-weight: 700;
  margin-top: 10px;
}

.onboard-desc {
  font-size: 13px;
  color: #95AAC9;
  margin-top: 6px;
  line-height: 1.48;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.field-group label {
  display: block;
  font-size: 12px;
  color: #95AAC9;
  margin-bottom: 6px;
}

.field-group input,
.limit-input-wrap input,
.custom-stake-inline input {
  background: #081323;
  border: 1px solid #213B61;
  color: #F6F9FD;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 16px;
  width: 100%;
  outline: none;
  transition: border-color 0.18s ease;
}

.field-group input:focus,
.limit-input-wrap input:focus,
.custom-stake-inline input:focus {
  border-color: #DDB860;
}

#inp-license {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #EBD084;
  text-transform: uppercase;
}

.divider-top {
  border-top: 1px solid #1B3354;
  padding-top: 12px;
}

.gold-btn {
  background: linear-gradient(135deg, #EDD287 0%, #D9B359 52%, #B88E37 100%);
  color: #071322;
  border: none;
  border-radius: 13px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.16s ease, opacity 0.16s ease;
}

.gold-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.full-btn {
  width: 100%;
  margin-top: 4px;
}

.ghost-link {
  background: transparent;
  border: none;
  color: #95AAC9;
  font-size: 12px;
  padding: 6px;
  cursor: pointer;
}

.top-back-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #10243F;
  border: 1px solid rgba(217, 179, 89, 0.36);
  color: #EBD084;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Pantalla Principal */
.hero-block {
  text-align: center;
  padding: 6px 0 4px;
}

.hero-caption {
  font-size: 12px;
  font-weight: 500;
  color: #95AAC9;
}

.hero-profit {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 4px;
  color: #34D399;
}

.hero-profit.negative {
  color: #F87171;
}

.hero-sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 5px 14px;
  border-radius: 999px;
  background: #0D1E36;
  border: 1px solid #1E375B;
  font-size: 12px;
  color: #9FB3D1;
}

.gold-dot, .gold-text {
  color: #E5C470;
  font-weight: 700;
}

.hero-week {
  color: #E6C775;
  font-weight: 600;
}

/* Interruptor Principal con Geometria Flexbox Exacta (3px margen en los 4 lados) */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: #F6F9FD;
}

.card-sub {
  font-size: 12px;
  color: #95AAC9;
  margin-top: 3px;
}

.ios-switch {
  width: 52px;
  height: 30px;
  padding: 3px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.ios-switch-on {
  background: linear-gradient(135deg, #EAD084 0%, #D4AC50 55%, #B88E37 100%);
  border: 1px solid rgba(243, 219, 152, 0.65);
  box-shadow: 0 0 16px rgba(217, 179, 89, 0.26);
}

.ios-switch-off {
  background: #162A47;
  border: 1px solid #27436B;
  box-shadow: none;
}

.ios-knob {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #FFFFFF;
  display: block;
  flex-shrink: 0;
  transform: translateX(22px);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 6px rgba(4, 10, 20, 0.48);
}

.ios-switch-off .ios-knob {
  transform: translateX(0px);
}

.live-pill {
  border-radius: 16px;
  padding: 13px 15px;
  background: #10243F;
  border: 1px solid rgba(217, 179, 89, 0.52);
  display: flex;
  align-items: center;
  gap: 12px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E5C470;
  box-shadow: 0 0 0 4px rgba(229, 196, 112, 0.22);
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mb-8 {
  margin-bottom: 9px;
}

.pt-10 {
  padding-top: 11px;
}

.label-muted {
  font-size: 12px;
  color: #95AAC9;
}

.opt-tag {
  color: #6981A3;
}

.segmented-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: #081323;
  border: 1px solid #1C3354;
}

.seg-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #8CA2C2;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.seg-active {
  background: #162C4C;
  color: #F6F9FD;
  border-color: #284773;
}

.seg-real-active {
  background: linear-gradient(135deg, #EDD287 0%, #D9B359 52%, #B88E37 100%);
  color: #071322;
  font-weight: 700;
}

.custom-stake-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.custom-stake-inline input {
  width: 82px;
  padding: 5px 9px;
  border-radius: 9px;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: #E9CD7E;
}

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

.stake-btn {
  padding: 9px 0;
  border-radius: 12px;
  background: #122643;
  border: 1px solid #213B61;
  color: #A7BBD8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.stake-active {
  background: linear-gradient(135deg, #EDD287 0%, #D9B359 52%, #B88E37 100%);
  border-color: rgba(243, 219, 152, 0.7);
  color: #071322;
  font-weight: 700;
}

.prot-header {
  width: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 2px 0;
}

.prot-summary {
  font-size: 12px;
  font-weight: 500;
  color: #7D95B8;
}

.prot-summary.active {
  color: #E5C470;
  font-weight: 600;
}

.prot-panel {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prot-label {
  font-size: 12px;
  color: #CED9EA;
}

.limit-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.limit-input-wrap input {
  width: 102px;
  padding: 6px 9px;
  border-radius: 9px;
  font-size: 16px;
  text-align: right;
}

.muted-prefix {
  font-size: 12px;
  font-weight: 600;
  color: #95AAC9;
}

.subtle-save-btn {
  align-self: flex-end;
  padding: 7px 14px;
  border-radius: 10px;
  background: #162C4C;
  border: 1px solid #294976;
  color: #E9CD7E;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.history-head {
  padding: 0 4px 9px;
}

.history-title {
  font-size: 12px;
  font-weight: 600;
  color: #B4C5DF;
}

.gold-caption {
  font-size: 12px;
  color: #D9B359;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
}

.hist-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.hist-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.hist-icon.pos {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.32);
  color: #34D399;
}

.hist-icon.neg {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.32);
  color: #F87171;
}

.hist-asset {
  font-size: 12px;
  font-weight: 600;
  color: #F6F9FD;
}

.hist-meta {
  font-size: 12px;
  color: #8CA2C2;
  margin-top: 2px;
}

.hist-net {
  font-size: 14px;
  font-weight: 700;
}

.hist-net.pos {
  color: #34D399;
}

.hist-net.neg {
  color: #F87171;
}

.empty-history {
  text-align: center;
  font-size: 12px;
  color: #7E96B8;
  padding: 18px 12px;
}

.app-footer {
  margin-top: auto;
  padding: 12px 20px 14px;
  background: #071222;
  border-top: 1px solid #182E4E;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: #8CA2C2;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.footer-legal-row {
  padding-top: 6px;
  border-top: 1px solid rgba(28, 52, 86, 0.55);
}

.footer-legal-status {
  font-size: 11px;
  color: #7992B5;
}

.legal-footer-link {
  background: transparent;
  border: none;
  color: #DFBC68;
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.app-footer strong {
  color: #D6E1F0;
  font-weight: 500;
}

.change-btn {
  background: transparent;
  border: none;
  color: #E5C470;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Bloque Clickwrap de Blindaje Legal */
.mt-10 {
  margin-top: 10px;
}

.legal-consent-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}

.legal-check-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.legal-check-custom {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  background: #081323;
  border: 1.5px solid rgba(217, 179, 89, 0.58);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.legal-check-row input[type="checkbox"]:checked + .legal-check-custom {
  background: linear-gradient(135deg, #EDD287 0%, #D9B359 55%, #B88E37 100%);
  border-color: #F3DB98;
  box-shadow: 0 0 10px rgba(217, 179, 89, 0.32);
}

.legal-check-row input[type="checkbox"]:checked + .legal-check-custom::after {
  content: "✓";
  color: #071322;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.legal-check-text {
  font-size: 12px;
  line-height: 1.46;
  color: #C7D5E8;
}

.legal-check-text strong {
  color: #F2D88F;
  font-weight: 600;
}

.inline-terms-link {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  color: #EBD084;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.legal-pending-card {
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #162B4C 0%, #0E1F38 100%);
  border: 1px solid rgba(229, 196, 112, 0.62);
}

/* Modal Hoja Completa de Terminos y Condiciones */
.terms-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(4, 10, 20, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.terms-modal-sheet {
  width: 100%;
  max-width: 430px;
  height: 90vh;
  background: linear-gradient(180deg, #10233F 0%, #081426 100%);
  border-top: 1px solid rgba(229, 196, 112, 0.48);
  border-radius: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.6);
}

.terms-modal-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid #1C3456;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.terms-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #F6F9FD;
  margin-top: 8px;
}

.terms-modal-meta {
  font-size: 11px;
  color: #8CA2C2;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.terms-close-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #132847;
  border: 1px solid #24416B;
  color: #CED9EA;
  font-size: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.terms-signed-pill {
  margin: 10px 18px 0;
  padding: 8px 12px;
  border-radius: 11px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.36);
  color: #6EE7B7;
  font-size: 11px;
  line-height: 1.4;
}

.terms-clauses-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.terms-clause-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(8, 19, 35, 0.78);
  border: 1px solid #1B3354;
}

.terms-clause-head {
  font-size: 12px;
  font-weight: 700;
  color: #EBD084;
  margin-bottom: 5px;
}

.terms-clause-body {
  font-size: 12px;
  line-height: 1.52;
  color: #C9D7EA;
}

.terms-modal-foot {
  padding: 12px 18px 16px;
  background: #071222;
  border-top: 1px solid #182E4E;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
