/* Avanty Markets — estilos del portal y del admin (réplica del diseño original, código propio).
   Medidas y colores calcados de las capturas del portal: fondo #000, barra lateral #050505, tarjetas #111,
   texto #ECECEC, secundario #8B8B8B, acento azul #5B8CF7, radios de 12/16 px y la fuente Inter. */

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar-w: 248px;
  --header-h: 78px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --gutter: 34px;
}
/* Tema oscuro (por defecto) */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #111111;
  --surface-2: #181818;
  --surface-3: #050505;
  --surface-hover: #1a1a1a;
  --input-bg: #141414;
  --border: #1f1f1f;
  --border-strong: #2a2a2a;
  --text: #ECECEC;
  --heading: #F5F5F5;
  --muted: #8B8B8B;
  --muted-label: #979797;   /* rótulos de los formularios de Fondos del original (Withdraw, Internal Transfer…) */
  --form-label: #A3A3A3;    /* rótulos y ayudas de los demás formularios del portal (New Account, Settings, Profile…) */
  --disabled-text: #CBCBCB; /* valor de un select / input deshabilitado del portal (Leverage de New Account) */
  --muted-2: #6f6f6f;
  --accent: #5B8CF7;
  --accent-hover: #7AA2FA;
  --accent-muted: rgba(77, 141, 255, 0.12);
  --accent-soft: rgba(91, 140, 247, 0.16);
  --accent-text: #7D9BEA;
  --btn-primary-text: #FFFFFF;
  --success: #56BD64;
  --success-soft: rgba(86, 189, 100, 0.13);
  --success-text: #8CC795;
  --demo: #A594F9;
  --demo-soft: rgba(165, 148, 249, 0.12);
  --warning: #E5B04B;
  --warning-soft: rgba(229, 176, 75, 0.12);
  --danger: #EF5B5B;
  --danger-soft: rgba(239, 91, 91, 0.12);
  --avatar-bg: #1B1B1B;
  --avatar-accent: #2B4BDA;
  --icon-box: #1C1F2E;
  --shadow-primary: 0 8px 22px rgba(91, 140, 247, 0.32);
  --shadow-menu: 0 18px 50px rgba(0, 0, 0, 0.55);
  --overlay: rgba(0, 0, 0, 0.6);
}
/* Tema claro */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #F1F2F4;
  --surface-3: #FFFFFF;
  --surface-hover: #EEF0F3;
  --input-bg: #FFFFFF;
  --border: #E3E5E9;
  --border-strong: #D3D6DC;
  --text: #16181D;
  --heading: #0B0C0F;
  --muted: #6B7280;
  --muted-label: #6B7280;
  --form-label: #6B7280;
  --disabled-text: #6B7280;
  --muted-2: #9097A3;
  --accent: #3F73E8;
  --accent-hover: #2F63D8;
  --accent-muted: rgba(63, 115, 232, 0.10);
  --accent-soft: rgba(63, 115, 232, 0.12);
  --accent-text: #3F73E8;
  --success: #2E9D48;
  --success-soft: rgba(46, 157, 72, 0.10);
  --success-text: #2E8A43;
  --demo: #7C5CE6;
  --demo-soft: rgba(124, 92, 230, 0.10);
  /* Ámbar legible sobre blanco y sobre su fondo suave (contraste 4,9 y 4,9:1; el del tema oscuro daba 1,97 y 1,83) */
  --warning: #A3500A;
  --warning-soft: rgba(163, 80, 10, 0.10);
  --avatar-bg: #EEF0F3;
  --avatar-accent: #3F73E8;
  --icon-box: #EAF0FD;
  --shadow-primary: 0 8px 22px rgba(63, 115, 232, 0.25);
  --shadow-menu: 0 18px 50px rgba(15, 23, 42, 0.14);
  --overlay: rgba(15, 23, 42, 0.35);
}

/* Admin (/master): la paleta del admin original (los tokens de su :root). admin.js le pone .is-admin al <html>, así
   alcanza también a los modales, menús y avisos que se montan fuera de .app. Los *-soft / *-text de este CSS toman los
   *-muted y el color pleno del original. */
:root.is-admin, :root.is-admin[data-theme="dark"] {
  --border: #ffffff14;
  --border-strong: #ffffff1f;
  --text: #ECECEC;
  --heading: #ECECEC;
  --muted: #8A8A8A;
  --accent: #4D8DFF;
  --accent-hover: #6AA0FF;
  --accent-muted: #4d8dff1f;
  --accent-soft: #4d8dff1f;
  --accent-text: #4D8DFF;
  --success: #22C55E;
  --success-soft: #22c55e1f;
  --success-text: #22C55E;
  --success-border: #22c55e59;
  --warning: #F5C451;
  --warning-soft: #f5c4511f;
  --warning-border: #f5c45147;
  --danger: #FF4D6D;
  --danger-soft: #ff4d6d1f;
  --danger-border: #ff4d6d73;
  --btn-danger-border: #FF4D6D;
  --input-bg: #0A0A0A;
  --demo: #A78BFA;
  --shadow-primary: 0 8px 24px #3b7bff47;
  --overlay: #07090db8;
}
:root.is-admin[data-theme="light"] {
  --border: #00000014;
  --border-strong: #0000001f;
  --text: #111214;
  --heading: #111214;
  --muted: #1112149e;
  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-muted: #3b82f61a;
  --accent-soft: #3b82f61a;
  --accent-text: #3B82F6;
  --success: #16A34A;
  --success-soft: #16a34a1f;
  --success-text: #16A34A;
  --success-border: #16a34a59;
  --warning: #D97706;
  --warning-soft: #d977061f;
  --warning-border: #d977064d;
  --danger: #DC2626;
  --danger-soft: #dc26261f;
  --danger-border: #dc262666;
  --btn-danger-border: #DC2626;
  --input-bg: #FFFFFF;
  --demo: #7C3AED;
  --shadow-primary: 0 8px 24px #3b82f640;
  --overlay: #0f141c80;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.link { color: var(--accent); font-weight: 500; }
.link:hover { color: var(--accent-hover); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 14px; height: 14px; }

/* ---------- Logo (versión clara/oscura según el tema) ---------- */
.brand-logo { display: inline-grid; align-items: center; }
.brand-logo img { grid-area: 1 / 1; height: 34px; width: auto; display: block; }
.brand-logo .logo-light { visibility: hidden; }
:root[data-theme="light"] .brand-logo .logo-dark { visibility: hidden; }
:root[data-theme="light"] .brand-logo .logo-light { visibility: visible; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 15px; font-weight: 400; white-space: nowrap; transition: background .15s, border-color .15s, filter .15s, color .15s; }
.btn:hover { background: var(--surface-hover); border-color: #333; }
:root[data-theme="light"] .btn:hover { border-color: var(--border-strong); }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--btn-primary-text); box-shadow: var(--shadow-primary); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.1); border-color: transparent; }
.btn-ghost { background: var(--surface); border-color: var(--border); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-xs { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
/* Variant "danger" del Button del original: solo contorno (bg-transparent, borde y texto rojos), en el portal igual que en
   el admin (Delete account del modal y de la pestaña Settings) */
.btn-danger { background: transparent; border-color: var(--btn-danger-border, var(--danger)); color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--muted); transition: color .15s, background .15s; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 9px; }

/* ---------- Tarjetas, badges, formularios ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-pad { padding: 24px; }
.card-title { font-size: 18px; font-weight: 600; color: var(--heading); margin: 0 0 16px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-demo { background: var(--accent-soft); color: var(--accent-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-plain { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
/* Modo de la cuenta (capturas 01, 14 y 16): "Live" en una píldora y los dos en ~13 px semibold */
.mode-live { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--success-soft); color: var(--success-text); font-size: 13px; font-weight: 600; }
.mode-live .dot { background: var(--success); }
.mode-demo { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; color: var(--demo); font-size: 13px; font-weight: 600; }

.field { display: block; }
.field + .field { margin-top: 16px; }
.label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.input, .select { width: 100%; height: 46px; padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font-size: 14px; outline: none; transition: border-color .15s; }
.input::placeholder { color: var(--muted-2); }
.input:focus, .select:focus { border-color: var(--accent); }
.select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B8B8B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input.is-invalid, .select.is-invalid { border-color: var(--danger); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 42px; }
.input-wrap .toggle-pw { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); padding: 6px; border-radius: 6px; color: var(--muted); }
.input-wrap .toggle-pw:hover { color: var(--accent); }
.hint { margin-top: 6px; font-size: 13px; color: var(--muted); }
/* Formularios del portal (dentro de la app y en sus modales) como el original: rótulos grises de peso normal y ayudas
   del mismo gris (el kit los hacía blancos de 500 y las ayudas más oscuras); el acceso (/signin) sigue con el blanco del
   original. Fondos y Depósito tienen su propio gris (--muted-label). Un campo deshabilitado muestra su valor atenuado. */
.portal-page .label { color: var(--form-label); font-weight: 400; }
.portal-page .hint { color: var(--form-label); }
.portal-page .input:disabled, .portal-page .select:disabled { opacity: 1; color: var(--disabled-text); -webkit-text-fill-color: var(--disabled-text); cursor: not-allowed; }
.form-error { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }
.form-ok { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--success-soft); color: var(--success-text); font-size: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid-2 .field + .field { margin-top: 0; }
.span-2 { grid-column: 1 / -1; }
.phone-row { display: grid; grid-template-columns: 128px 1fr; gap: 8px; }
/* Combo con buscador (ui.combo): el select queda oculto y el botón muestra el valor con flechas arriba/abajo */
.combo { position: relative; min-width: 0; }
.combo > .combo-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0 !important; pointer-events: none; }
.combo-btn { display: flex; align-items: center; text-align: left; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238B8B8B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 15 5 5 5-5M7 9l5-5 5 5'/%3E%3C/svg%3E"); }
.combo-btn:focus-visible, .combo-btn[aria-expanded="true"] { border-color: var(--accent); }
.combo-btn:disabled { cursor: default; }
.combo-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-native.is-invalid + .combo-btn { border-color: var(--danger); }
.combo-pop { position: fixed; z-index: 95; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-menu); overflow: hidden; }
.combo-search { position: relative; flex: none; border-bottom: 1px solid var(--border); }
.combo-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.combo-q { width: 100%; height: 42px; padding: 0 12px 0 36px; border: 0; background: transparent; color: var(--text); font-size: 14px; outline: none; }
.combo-q::placeholder { color: var(--muted-2); }
.combo-list { flex: 1; min-height: 0; margin: 0; padding: 4px; list-style: none; overflow-y: auto; overscroll-behavior: contain; }
.combo-opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.combo-opt.on { background: var(--surface-2); }
.combo-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-check { margin-left: auto; flex: none; color: var(--accent); }
.combo-empty { margin: 0; padding: 14px 12px; font-size: 14px; color: var(--muted); text-align: center; }
/* Combo "rico" (rich): el texto en negrita y el detalle atenuado; encabezados de grupo (<optgroup>) en la lista */
.combo-strong { font-weight: 600; color: var(--text); }
.combo-sub { color: var(--muted); }
.combo-group { padding: 8px 10px 4px; font-size: 12px; font-weight: 500; color: var(--muted); }

/* ---------- Pantallas de acceso (signin / signup / forgot / reset) ---------- */
.auth-stage { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(900px 480px at 50% -8%, rgba(91, 140, 247, 0.10), transparent 62%), var(--bg); }
.auth-header { position: relative; z-index: 2; height: 64px; display: flex; align-items: center; justify-content: center; padding: 0 16px; }
.auth-header .lang-wrap { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
.round-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.round-btn:hover { color: var(--text); background: var(--surface-2); }
.center-page, .auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 440px; padding: 32px 28px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
.auth-card.wide { max-width: 896px; }   /* registro: max-w-4xl del original actual */
.auth-card.not-found { text-align: center; }   /* página 404 (src/app.js) */
/* /confirm-withdrawal: la tarjeta sola del original (max-w-md, p-8, rounded-2xl, sin encabezado ni logo) */
.cw-stage { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 0 16px; background: var(--bg); }
.cw-card { width: 100%; max-width: 448px; padding: 32px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35); }
.cw-title { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; color: var(--text); }
.cw-intro { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.cw-note { margin: 20px 0 0; padding: 8px 12px; border-radius: 8px; font-size: 14px; line-height: 20px; }
.cw-note.ok { color: var(--success); background: var(--success-soft); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); }
.cw-note.err { color: var(--danger); background: var(--danger-soft); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.cw-btn { width: 100%; height: 40px; margin-top: 24px; font-size: 14px; }
.cw-back { display: inline-block; margin-top: 20px; font-size: 14px; color: var(--muted); }
.cw-back:hover { color: var(--accent); }
@media (min-width: 640px) { .auth-card { padding: 40px 36px; } }
.auth-title { margin: 0; text-align: center; font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--heading); }
.auth-sub { margin: 8px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.auth-body { margin-top: 28px; }
.auth-foot { margin-top: 24px; text-align: center; font-size: 14px; color: var(--muted); }
.auth-foot button, .auth-foot a { font-weight: 600; color: var(--accent); }
.auth-legend { margin-top: 24px; display: flex; justify-content: center; gap: 16px; font-size: 12px; color: var(--muted); }
.auth-legend span { display: inline-flex; align-items: center; gap: 6px; }
.auth-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.auth-btn { width: 100%; height: 48px; margin-top: 8px; border-radius: var(--radius); font-size: 15px; }
@media (min-width: 640px) { .auth-btn.auth-btn-auto { width: auto; height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; } }
.forgot-row { margin-top: 8px; text-align: right; }
.forgot-row a { font-size: 14px; font-weight: 500; color: var(--accent); }
.code-input { text-align: center; letter-spacing: 12px; font-size: 24px; font-weight: 700; height: 58px; font-family: var(--mono); }

/* ---------- Menús desplegables ---------- */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 228px; padding: 8px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-menu); }
.menu-title { padding: 10px 12px 12px; font-size: 15px; font-weight: 600; color: var(--heading); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 15px; text-align: left; }
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-item .grow { flex: 1; }
.menu-sep { height: 1px; background: var(--border); margin: 8px 4px; }
/* Menús de la barra superior (usuario y soporte, portal y admin) como el header del original: filas py-2 text-sm (36 px)
   y Sign Out py-2.5 text-sm semibold (40 px) */
.topbar .menu .menu-item { padding: 8px 12px; font-size: 14px; line-height: 20px; }
/* Menú de soporte del portal como la captura 30: rayita de "Support" en y≈119, WhatsApp centrado en y≈142, filas de
   ~37,5 px y el borde de abajo en y≈245 (antes 6 px más abajo el primer ítem y el menú 3 px más alto) */
.portal-page .topbar #support-menu .menu-title { padding: 8px 12px 8px; margin-bottom: 4px; }
.portal-page .topbar #support-menu .menu-item { padding-top: 8.75px; padding-bottom: 8.75px; }
.topbar .menu [data-logout] { height: auto; padding: 9px 16px; font-size: 14px; line-height: 20px; font-weight: 600; }
/* Sign Out dentro de su bloque con margen (px-2 py-1.5 del original) y la línea de arriba con my-1 */
.user-menu .menu-foot { padding: 6px 8px; }
.user-menu .menu-sep { margin: 4px 0; }
.portal-page .user-menu .menu-row { padding-top: 9px; padding-bottom: 9px; }   /* Language / Theme como la captura 31 */
.user-menu { width: 310px; }
.user-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface-2); margin-bottom: 8px; }
.user-head .avatar { width: 36px; height: 36px; font-size: 13px; background: var(--avatar-accent); color: #fff; border: 0; }
:root.is-admin .user-head .avatar { background: #1D4ED8; }
.user-head .who { flex: 1; min-width: 0; }
.user-head .who b { display: block; font-size: 15px; font-weight: 600; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-head .who span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; color: var(--muted); font-size: 15px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface-2); }
.seg button { height: 28px; padding: 0 9px; border-radius: 8px; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.seg button.on { background: var(--accent); color: #fff; }
.seg button:not(.on):hover { color: var(--text); }
/* Menú de usuario del portal como la captura 31: cabecera 4 px más baja (los ítems arrancan donde en el original), selector
   de tema en una píldora ajustada (~104 px en vez de 121) y la opción elegida en semibold */
.portal-page .user-menu .user-head { padding-top: 8px; padding-bottom: 8px; margin-bottom: 7px; }
.portal-page .user-menu .seg button { padding: 0 6px; }
.portal-page .user-menu .seg button.on { font-weight: 600; }
.verified-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; }
.lang-menu { min-width: 170px; }
.lang-menu .menu-item.on { color: var(--text); background: var(--surface-2); }

/* ---------- Layout del portal ---------- */
.app { display: flex; height: 100vh; height: 100dvh; overflow: hidden; background: var(--bg); }
.sidebar { width: var(--sidebar-w); flex: none; height: 100%; display: flex; flex-direction: column; background: var(--surface-3); border-right: 1px solid #131313; transition: width .2s; }
:root[data-theme="light"] .sidebar { border-right-color: var(--border); }
.sidebar-logo { padding: 20px 20px 16px; flex: none; }
.sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 12px; scrollbar-width: thin; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; height: 41px; padding: 0 13px; margin-bottom: 5px; border-radius: var(--radius); color: var(--muted); font-size: 15px; font-weight: 500; text-align: left; transition: background .15s, color .15s; }
.nav-item .icon { width: 17px; height: 17px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-muted); color: var(--heading); }
.nav-item.active .icon { color: var(--accent); }
.nav-item.parent-active { color: var(--heading); }
.nav-item.parent-active .icon:first-child { color: var(--accent); }
.nav-item .chev { margin-left: auto; width: 16px; height: 16px; transition: transform .2s; }
.nav-group.open > .nav-item .chev { transform: rotate(90deg); }
/* margen derecho de 8 px: el subítem activo termina 8 px antes que los de primer nivel, como en el original (capturas 33-35) */
.nav-sub { display: none; margin: 0 8px 6px 24px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-group.open > .nav-sub { display: block; }
.nav-sub a { display: flex; align-items: center; gap: 8px; height: 33px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-size: 15px; }
.nav-sub a:hover { color: var(--text); }
.nav-sub a.active { background: var(--accent-muted); color: var(--accent); }
.nav-sub a .icon { width: 14px; height: 14px; }
/* Launch Platform (sale a otra pestaña): otro tipo de ítem en el original, con el texto 4 px más a la izquierda (capturas 12, 13 y 19) */
.nav-sub a.nav-ext { padding-left: 8px; }
/* Alturas de la captura 20 (1568x757): tarjeta Tutorials de 551 a 614, divisor en 644, botones de 699 a 740 */
.sidebar-bottom { flex: none; padding: 0 12px 17px; }
.tutorial-card { display: flex; align-items: center; gap: 12px; padding: 10.5px 13px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.tutorial-card .ibox { width: 37px; height: 37px; border-radius: 9px; background: #222632; color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; }
:root[data-theme="light"] .tutorial-card .ibox { background: var(--icon-box); }
.tutorial-card b { display: block; font-size: 15px; font-weight: 600; color: var(--heading); }
.tutorial-card span { display: block; font-size: 13px; color: var(--muted); }
.tutorial-card .chev { margin-left: auto; color: var(--muted); }
.switch-modes { margin-top: 30px; padding-top: 11px; border-top: 1px solid #181818; }
:root[data-theme="light"] .switch-modes { border-top-color: var(--border); }
.switch-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 15px; }
.switch-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.switch-btns a { height: 41px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.switch-btns a.on { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }

/* Barra lateral contraída (solo íconos): solo en escritorio. En celular y tablet el cajón deslizable siempre se ve
   completo, aunque la barra haya quedado contraída en escritorio (si no, Funds/TradeLocker no se podían abrir). */
.brand-logo .logo-mark { display: none; }
@media (min-width: 1024px) {
  .app.collapsed { --sidebar-w: 76px; }
  .app.collapsed .sidebar-logo { padding: 20px 14px 16px; }
  /* Logo corto (Aspecto → Short o la marca de fábrica) en lugar del largo recortado */
  .app.collapsed .brand-logo .logo-dark, .app.collapsed .brand-logo .logo-light { display: none; }
  .app.collapsed .brand-logo .logo-mark { display: block; width: 34px; height: 34px; object-fit: contain; }
  .app.collapsed .sidebar-logo a { display: flex; justify-content: center; }
  .app.collapsed .nav-item span, .app.collapsed .nav-item .chev, .app.collapsed .nav-sub, .app.collapsed .tutorial-card > div, .app.collapsed .tutorial-card .chev, .app.collapsed .switch-head span, .app.collapsed .switch-btns { display: none; }
  .app.collapsed .nav-item { justify-content: center; padding: 0; }
  .app.collapsed .tutorial-card { justify-content: center; padding: 10px; }
  .app.collapsed .switch-head { justify-content: center; }
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }
.topbar { flex: none; height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 24px 0 30px; background: rgba(4, 4, 4, 0.92); border-bottom: 1px solid #131313; backdrop-filter: blur(10px); position: relative; z-index: 40; }
:root[data-theme="light"] .topbar { background: rgba(255, 255, 255, 0.92); border-bottom-color: var(--border); }
.topbar .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 9px; height: 50px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 15px; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; background: var(--success); }
.pill.closed .dot { background: var(--danger); }
.wallet-btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 15px; white-space: nowrap; }
.wallet-btn b { color: var(--heading); font-weight: 600; }
.wallet-btn:hover { background: var(--surface-2); }
.avatar { position: relative; width: 50px; height: 50px; border-radius: 50%; background: var(--avatar-bg); border: 1px solid var(--border); color: var(--heading); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.topbar > .icon-btn, .topbar > .pill, .topbar > .menu-wrap { flex: none; }   /* nunca se aplastan: lo que se achica es el Wallet */
.wallet-btn { min-width: 0; }
.wallet-btn b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.avatar .online { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 2px var(--bg); }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 34px var(--gutter) 48px; }
.content:focus { outline: none; }   /* recibe el foco al navegar (portal.js focusContent), sin recuadro */
.content-inner { max-width: 1400px; margin: 0 auto; }
/* Admin: como el original, el contenido ocupa todo el ancho (sin tope; solo el padding de main) */
.app.admin .content-inner { max-width: none; }
.imp-banner { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; background: var(--warning-soft); color: var(--warning); font-size: 14px; }
.backdrop { position: fixed; inset: 0; background: var(--overlay); z-index: 45; }

/* ---------- Encabezados de página ---------- */
.page-head { margin-bottom: 26px; }
.page-title { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; color: var(--heading); }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.page-head.head-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 0; }
.page-head.head-actions .tools { display: flex; gap: 9px; flex: none; }
.page-head.head-actions .page-sub { margin-top: 2px; }
/* Encabezado simple (Profile, KYC, Tutorials, Withdrawal, Journal…): título en y≈119 y subtítulo en y≈154 como el
   original (capturas 28, 42, 07, 18); antes el subtítulo y lo de abajo quedaban 7 px más abajo. Las pantallas IB y las
   de encabezado con botones ya tienen su ajuste (ib.css, .head-actions). */
.app:not(.admin) .screen:not([class*="screen-ib"]):not(.screen-deposit) .page-head:not(.head-actions):not(.detail-head) .page-title { line-height: 34px; }
.app:not(.admin) .screen:not([class*="screen-ib"]):not(.screen-deposit) .page-head:not(.head-actions):not(.detail-head) .page-sub { margin-top: 3px; }
.acc-toolbar.is-list { margin-top: 16px; }
.crumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 15px; color: var(--muted); }
/* Portal: el › pegado a los textos (~6 px), como las migas del original (Deposit › Crypto, Withdrawal › Cryptocurrency) */
:root:not(.is-admin) .crumbs { gap: 2px; }
.crumbs b { color: var(--heading); font-weight: 600; }

/* ---------- Dashboard ---------- */
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 25px 25px 30px; }
.greet { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.greet button { color: var(--muted); display: inline-flex; }
.greet button:hover { color: var(--text); }
.big-amount { margin-top: 6px; display: flex; align-items: baseline; gap: 10px; }
.big-amount .amt { font-size: 54px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; color: var(--heading); }
.big-amount .unit { font-size: 17px; color: var(--muted); }
.hero-sub { margin-top: 6px; font-size: 15px; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 21px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 117px; padding: 17px 17px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: border-color .15s, background .15s; }
.tile:hover { border-color: var(--border-strong); }
.tile .ibox { width: 41px; height: 41px; border-radius: 10px; background: var(--icon-box); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; }
.tile .t-title { margin-top: 14px; font-size: 16px; font-weight: 600; color: var(--heading); }
.tile .t-sub { font-size: 13px; color: var(--muted); }
.tile .badge { position: absolute; top: 18px; right: 17px; }
.acc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.tabs { display: flex; gap: 22px; }
.tab { position: relative; padding: 8px 0 12px; font-size: 16px; color: var(--muted); }
.tab .count { margin-left: 6px; color: var(--muted); }
.tab.on { color: var(--heading); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.tools { display: flex; align-items: center; gap: 9px; }
.search { position: relative; width: 232px; }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { height: 42px; padding-left: 38px; background: var(--surface); }
.table-card { margin-top: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 16px; }
.tbl th { height: 42px; padding: 0 18px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tbl td { height: 74px; padding: 0 18px; border-top: 1px solid var(--border); white-space: nowrap; color: var(--text); }
.tbl td.muted { color: var(--muted); }
.tbl .acc-code b { display: block; font-size: 16px; font-weight: 600; color: var(--heading); }
.tbl .acc-code span { display: block; font-size: 13px; color: var(--muted); }
.tbl .server { font-family: var(--mono); font-size: 14px; color: var(--heading); }
.tbl .row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tbl .empty { height: 120px; text-align: center; color: var(--muted); }
/* Texto de la tabla vacía: del ancho VISIBLE de la tabla (--dt-vis lo pone ui.dataTable) y quieto al desplazarla, así en
   el celular queda centrado en la tarjeta y no corrido o cortado */
.tbl td.empty:has(> .empty-in) { padding-left: 0; padding-right: 0; }
.tbl .empty-in { position: sticky; left: 0; box-sizing: border-box; width: var(--dt-vis, 100%); max-width: 100%; padding: 0 16px; white-space: normal; }
.tbl tr.row-link { cursor: pointer; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.012); }
.btn-view { height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; background: var(--surface); border-color: var(--border); }
/* Trade con el mismo resplandor azul que los demás botones primarios (capturas 01-02) */
.btn-trade { height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; background: var(--accent); color: #fff; border-color: transparent; box-shadow: var(--shadow-primary); }
.btn-trade:hover { background: var(--accent); filter: brightness(1.1); }
.btn-more { width: 34px; height: 34px; padding: 0; border-radius: 9px; background: var(--surface); border-color: var(--border); }
.hide-amounts .amt-val { filter: blur(7px); user-select: none; }
/* Campo de monto que los chips (Max / 25% / 50%) llenan con el saldo: el número difuminado mientras el ojo está cerrado,
   como el "Available" de al lado. Solo el texto (sombra borrosa con el texto transparente): el borde, el foco y el cursor
   del campo se ven igual y se sigue pudiendo escribir */
.hide-amounts .amt-input { color: transparent; text-shadow: 0 0 8px var(--text); caret-color: var(--text); }

/* ---------- Esqueleto de pantallas en construcción ---------- */
.skeleton-card { padding: 48px 24px; text-align: center; }
.skeleton-card .ibox { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: var(--icon-box); color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
.skeleton-card h3 { margin: 0 0 6px; color: var(--heading); font-size: 17px; }
.skeleton-card p { margin: 0 auto; max-width: 460px; color: var(--muted); font-size: 14px; }
.shimmer { height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--surface-hover), var(--surface-2)); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Avisos ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; pointer-events: none; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-menu); font-size: 14px; }
.toast.err { border-color: rgba(239, 91, 91, .5); }
.toast.ok { border-color: rgba(86, 189, 100, .5); }

/* ---------- Modales ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 80; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-menu); }
/* El diálogo recibe el foco al abrirse (tabindex=-1, para no disparar un botón con Enter): sin anillo alrededor de todo el
   modal; los controles de adentro conservan el suyo. Abierto al cargar la página (p. ej. ?id=N de Deposit Requests)
   Chrome lo tomaba como :focus-visible y lo rodeaba con el anillo azul */
.modal:focus { outline: none; }
.modal h3 { margin: 0 0 16px; font-size: 18px; color: var(--heading); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
/* Pie fijo: con un formulario más alto que la pantalla (Create client a 1440×900 o 1366×768, Edit plan) los botones se
   iban con el scroll del modal. Quedan pegados abajo, sobre el fondo del modal (mismo espacio de 20 px arriba y 24 abajo) */
.modal > .modal-actions { position: sticky; bottom: -24px; z-index: 2; margin: 8px -24px -24px; padding: 12px 24px 24px; background: var(--surface); }

/* ---------- Admin ---------- */
.app.admin { --sidebar-w: 240px; }   /* w-[240px] del original; contraída (hamburguesa en escritorio) queda en 76 px */
@media (min-width: 1024px) { .app.admin.collapsed { --sidebar-w: 76px; } }
/* Pie de la barra contraída con "Toggle sidebar" (32×32, ícono girado) como el original; desplegada o en el celular no se ve */
.adm-side-foot { display: none; }
@media (min-width: 1024px) { .app.admin.collapsed .adm-side-foot { display: flex; justify-content: center; margin-top: auto; padding: 12px; border-top: 1px solid var(--border); } .adm-side-foot .icon-btn { width: 32px; height: 32px; } .adm-side-foot .icon { transform: rotate(180deg); } }
.admin .topbar { height: 76px; padding: 0 28px; }   /* px-4 sm:px-6 lg:px-7 del original: 28 / 24 / 16 px, iguales a los dos lados */
.admin .topbar .icon-btn, .admin .topbar > .menu-wrap > .avatar { width: 48px; height: 48px; }   /* h-12 w-12 del original, también en el celular */
.admin .topbar > .menu-wrap > .avatar { font-size: 15px; }
/* Barra lateral del admin como el original: ítems de 14 px con ícono de 16 px y grupos plegables (IB Management,
   Reports) con subítems con ícono y sangría; el grupo de la pantalla actual queda abierto y resaltado */
.admin .nav-item { height: 40px; gap: 12px; padding: 0 12px; margin-bottom: 4px; border-radius: 12px; font-size: 14px; }
.admin .nav-item .icon { width: 16px; height: 16px; }
.admin .nav-item .chev { width: 16px; height: 16px; color: var(--muted); }
.admin .nav-group > .nav-item .chev { transform: none; }
.admin .nav-item.parent-active { color: var(--text); }
.admin .nav-item.parent-active .icon:first-child { color: inherit; }
.admin .nav-sub { margin: 0 0 4px 16px; padding-left: 12px; }
.admin .nav-sub a { gap: 12px; height: 36px; margin-bottom: 2px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.admin .nav-sub a:hover { background: var(--surface-2); }
.admin .nav-sub a.active { color: var(--text); }
.admin .nav-sub a .icon { width: 16px; height: 16px; flex: none; }
.admin .nav-sub a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* un renglón, como el original */
.admin .nav-new { margin-left: auto; height: 18px; font-size: 9px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 13px; }
.stat { padding: 18px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { margin-top: 8px; font-size: 24px; font-weight: 600; color: var(--heading); letter-spacing: -0.01em; }
.stat .s { margin-top: 4px; font-size: 13px; color: var(--muted); }
.section-title { margin: 28px 0 12px; font-size: 15px; font-weight: 600; color: var(--heading); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-word; }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 13px; }
.conn-grid .kv { grid-template-columns: 150px 1fr; }
.conn-card { padding: 20px; }
.conn-card h3 { margin: 0; font-size: 17px; color: var(--heading); }
.conn-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.conn-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
/* Login del admin como el original actual: tarjeta de 448 px con el logo adentro, "ADMIN PORTAL" y una raya; fondo negro */
.adm-login-stage { background: var(--bg); position: relative; }
.adm-login-lang { position: absolute; top: 16px; right: 16px; z-index: 2; }
.auth-card.admin-login { max-width: 448px; padding: 32px; border-radius: 16px; box-shadow: 0 0 40px rgba(77, 141, 255, 0.08), 0 30px 80px rgba(0, 0, 0, 0.35); }
.adm-login-head { display: flex; flex-direction: column; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.adm-login-head .brand-logo img { height: 48px; }
.adm-login-tag { margin: 12px 0 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.adm-login-title { margin: 24px 0 0; font-size: 24px; font-weight: 700; line-height: 32px; color: var(--heading); }
.adm-login-sub { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.adm-login-form { margin-top: 24px; }
.admin-login .input { height: 45px; border-radius: 12px; }
.admin-login .code-input { height: 58px; }
.adm-captcha, .auth-captcha { display: flex; justify-content: center; min-height: 65px; margin: 4px 0 8px; }
.tbl.compact td { height: 54px; font-size: 14px; }
.tbl.compact th { height: 40px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---------- Anchos intermedios: la tabla de cuentas se achica antes de desbordar ---------- */
@media (max-width: 1500px) { .tbl th, .tbl td { padding: 0 14px; } .tbl .row-actions { gap: 6px; } .btn-view, .btn-trade { padding: 0 12px; } }
@media (max-width: 1380px) { .tbl .col-platform { display: none; } }
@media (max-width: 1240px) { .tbl .col-pnl { display: none; } }

/* ---------- Celular y tablet ---------- */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { flex-direction: column; }
  .hero-actions { justify-content: flex-start; }
}
@media (max-width: 1023px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s; width: 272px; }
  /* Cajón del admin como el original: w-[min(100vw-3rem,18rem)] (288 px) con la X "Close menu" arriba a la derecha */
  .app.admin .sidebar { width: min(calc(100vw - 3rem), 18rem); }
  .app.mobile-open .sidebar { transform: none; box-shadow: var(--shadow-menu); }
  .topbar { padding: 0 12px; gap: 8px; }
  .pill { height: 40px; padding: 0 12px; font-size: 13px; }
  .wallet-btn, .icon-btn, .avatar { height: 40px; }
  .icon-btn, .avatar { width: 40px; }
  .avatar { font-size: 14px; }
  .wallet-btn { padding: 0 12px; font-size: 14px; }
  .content { padding-top: 20px; }
  .acc-toolbar { flex-direction: column; align-items: stretch; }
  .page-head.head-actions { flex-direction: column; }
  .tools { flex-wrap: wrap; }
  .search { flex: 1 1 100%; width: auto; }
}
@media (max-width: 640px) {
  .wallet-btn .wallet-label { display: none; }
  /* El texto del estado del mercado no entra: queda para los lectores de pantalla y el punto cerrado es un aro (no
     depende solo del color) */
  .pill .pill-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .pill.closed .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--danger); }
  .pill { padding: 0 14px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { min-height: 104px; padding: 14px; }
  .tile .t-title { font-size: 14px; }
  .big-amount .amt { font-size: 40px; }
  .hero { padding: 20px; }
  .hero-actions .btn { flex: 1 1 calc(50% - 9px); padding: 0 10px; font-size: 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .phone-row { grid-template-columns: 112px 1fr; }
  .page-title { font-size: 22px; }
  .user-menu { width: min(310px, calc(100vw - 24px)); }
  .kv, .conn-grid .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; }
}
.auth-foot button:disabled { color: var(--muted); font-weight: 500; cursor: default; }

/* ---------- Kit de UI (public/js/ui.js) ---------- */
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn[aria-busy="true"] { cursor: progress; }
.btn-danger-solid { background: transparent; border-color: var(--btn-danger-border, var(--danger)); color: var(--danger); }
.btn-danger-solid:hover { background: var(--danger-soft); border-color: var(--danger); }
.icon.flip { transform: rotate(180deg); }
.ta-r { text-align: right !important; }
.textarea { height: auto; min-height: 90px; padding: 10px 14px; resize: vertical; line-height: 1.45; }
.field-error { margin: 6px 0 0; font-size: 13px; color: var(--danger); }
.field-check .check { margin-top: 4px; }
.input-affix { position: relative; display: flex; align-items: center; }
.input-affix .input { flex: 1; }
.input-affix .affix { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.input-affix .affix.pre { left: 14px; }
.input-affix .affix.pre + .input { padding-left: 30px; }
.input-affix .affix.suf { right: 10px; pointer-events: auto; }
.file-box.is-invalid { border-color: var(--danger); }
/* Modal */
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 820px; }
.modal-detail { max-width: 512px; }
.modal-actions-start { justify-content: flex-start; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { margin: 0; }
.modal-text { margin: 0; color: var(--muted); font-size: 15px; }
/* Pestañas en píldoras (All / Processing / Completed / Rejected) */
.pill-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.pill-tab { height: 30px; padding: 0 14px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.pill-tab.on { background: var(--accent); color: #fff; }
.pill-tab:not(.on):hover { color: var(--text); }
.pill-tab .count { margin-left: 6px; opacity: .8; }
/* Menú ⋯ fijo (no lo corta el scroll de la tabla) */
.menu.menu-fixed { position: fixed; right: auto; top: 0; left: 0; min-width: 200px; }
.menu-item.danger { color: var(--danger); }
.menu-item[disabled] { opacity: .5; cursor: not-allowed; }
/* Estados */
.badge-status { gap: 6px; background: var(--surface-2); }
.badge-status.tone-success { background: var(--success-soft); color: var(--success-text); }
.badge-status.tone-success .dot { background: var(--success); }
.badge-status.tone-warning { background: var(--warning-soft); color: var(--warning); }
.badge-status.tone-danger { background: var(--danger-soft); color: var(--danger); }
.badge-status.tone-muted { color: var(--muted); }
/* Tabla de datos */
.data-table + .data-table { margin-top: 16px; }
.dt-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dt-filters, .dt-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.dt-status { width: auto; min-width: 170px; height: 42px; background-color: var(--surface); }
.dt-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.dt-date .input { height: 42px; width: 150px; background: var(--surface); }
.dt-sort { display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; }
.dt-sort.on, .dt-sort:hover { color: var(--text); }
.dt-arrow { font-size: 9px; }
.tbl tbody.is-loading { opacity: .55; }
.tbl tr.dt-loading td { height: 54px; }
.dt-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 14px; }
.dt-pages { display: flex; align-items: center; gap: 8px; }
.dt-pnum { color: var(--muted); font-size: 13px; min-width: 48px; text-align: center; }
.dt-pages .btn-icon { width: 34px; padding: 0; justify-content: center; }
.data-table.compact .tbl td { height: 54px; font-size: 14px; }
/* Piezas de pantalla */
.empty-state { padding: 40px 20px; text-align: center; }
.empty-state .ibox { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; background: var(--icon-box); color: var(--accent-text); display: flex; align-items: center; justify-content: center; }
.empty-state h3 { margin: 0 0 6px; font-size: 16px; color: var(--heading); }
.empty-state p { margin: 0 auto; max-width: 420px; color: var(--muted); font-size: 14px; }
.empty-state .btn { margin-top: 16px; }
.kpi .v { font-size: 22px; }
.kpi.tone-accent .v { color: var(--accent-text); }
.kpi.tone-warning .v { color: var(--warning); }
.kpi.tone-success .v { color: var(--success-text); }
.kpi.tone-danger .v { color: var(--danger); }
/* KPIs del admin: en una misma fila, el valor de cada tarjeta a la misma altura aunque el rótulo de otra ocupe dos
   renglones (cada tarjeta es una subgrilla de 3 filas: rótulo, valor y detalle); en el celular, la última tarjeta de un
   número impar ocupa toda la fila (no queda sola a media anchura) */
:root.is-admin :is(.adm-kpis, .stat-grid) > .kpi { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
@media (max-width: 640px) { :root.is-admin :is(.adm-kpis, .cl-kpis) > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.loading-block { display: grid; gap: 10px; padding: 8px 0; }
/* Archivos */
.file-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: var(--input-bg); }
.fb-info { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--muted); }
.fb-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.fb-name.muted { color: var(--muted); }
.fb-actions { display: flex; gap: 8px; flex: none; }
/* QR */
svg.qr { display: block; border-radius: 10px; max-width: 100%; height: auto; }
/* Gráficos */
av-chart { display: block; min-width: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
/* El SVG se dibuja con el ancho real (ui.chart): estos 12 px son 12 px en pantalla, en el celular también */
.chart .axis { fill: var(--muted); font-size: 12px; font-family: var(--font); }
/* Gráficos con montos y el ojo de "ocultar montos": borrosos y sin los valores al pasar el mouse */
.hide-amounts .amt-chart { pointer-events: none; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .12; }
.chart .bar:hover, .chart .pt:hover { opacity: .8; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-empty { padding: 40px 0; text-align: center; font-size: 14px; }
.chart .grid.dashed { stroke-dasharray: 3 3; }
.chart .x-axis { stroke: var(--border); stroke-width: 1; }
.chart .area-line { stroke-width: 2.5; }
.chart .pt-hit { fill: transparent; }
.chart .pt-hit:hover { fill: currentColor; opacity: .15; }
.chart .col-hit { fill: transparent; }
.chart .col-hit:hover { fill: var(--muted); opacity: .08; }
.chart-legend.bottom { justify-content: center; margin: 8px 0 0; font-size: 12px; }
.chart-legend .lg-area { display: inline-flex; align-items: center; gap: 4px; }
.chart-legend .lg-line, .adm-chart .chart .chart-legend .lg-line { width: 14px; height: 14px; flex: none; }
.chart-legend.bottom:has(.lg-area) { gap: 10px; margin-top: 4px; }
/* Buscador con rótulo y contador (plantilla de reportes del original) */
.dt-search { display: flex; flex-direction: column; gap: 4px; width: 448px; max-width: 100%; }
.dt-search .search { width: 100%; }
.dt-search-label { font-size: 14px; color: var(--muted); }
.dt-count { margin: 0; min-height: 17px; font-size: 12px; color: var(--muted); }
.dt-toolbar.has-search-block { align-items: flex-end; flex-wrap: nowrap; }
.dt-toolbar.has-search-block .dt-filters { flex: 1 1 auto; min-width: 0; }
.dt-toolbar.has-search-block .dt-actions { flex: none; }
/* Reportes del admin y Withdrawal Requests: primera fila como el original ("Search" + "N records" a la izquierda y Export
   CSV / Create request abajo a la derecha); los filtros agregados (estado, From / To, tipo…) van juntos en una segunda fila
   en vez de partirse entre las dos */
:is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block { flex-wrap: wrap; justify-content: flex-start; gap: 12px 9px; }
:is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block .dt-filters { display: contents; }
:is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block .dt-search { order: 0; }
:is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block .dt-actions { order: 1; margin-left: auto; }
:is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block::after { content: ""; order: 2; flex: 1 0 100%; height: 0; }
:is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block .dt-filters > :not(.dt-search) { order: 3; }
/* ---------- Tablas del admin: un solo lenguaje en todas las pantallas /master, como el original (encabezados Title
   Case de 14 px sobre la tarjeta, celdas de 14 px, botones de peligro con borde, estados en pastilla con relleno). Van con
   :root.is-admin (no .app.admin) para que alcancen también a los modales, que se montan fuera de .app ---------- */
/* Encabezado de cada pantalla como el original: main p-8 (32 px; p-6 / p-4 más angosto), h2 text-2xl (24/32 px) y el
   subtítulo mt-1 de 16 px; los botones de la barra de la tabla (Export CSV, Create …) en text-xs (12 px) */
.app.admin .content { padding: 32px 32px 48px; }
.app.admin .page-head { margin-bottom: 24px; }
.app.admin .page-title { font-size: 24px; line-height: 32px; }
.app.admin .page-sub { margin-top: 4px; font-size: 16px; line-height: 24px; }
.app.admin .page-head.head-actions .page-sub { margin-top: 4px; }
/* Barra lateral: logo de 32 px con py-5 (los ítems arrancan en y=72) y el ícono del ítem activo del color del texto */
.app.admin .sidebar-logo { padding: 20px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.app.admin .sidebar-logo .brand-logo img { height: 32px; }
.app.admin .sidebar-logo > a { display: flex; }
.app.admin .nav-item.active .icon { color: inherit; }
.app.admin .drawer-close { display: none; }
/* Pantallas propias del admin (Ajustes, Wallets, Conciliación, Administradores): un solo botón, el del original
   (rounded-[10px] px-4 py-2.5 text-sm: 14 px, radio 10, 38 px), también en las filas y en el ⋯; en las barras, text-xs
   (la regla de abajo) */
.app.admin :is(.screen-settings, .screen-wallets, .screen-reconciliation, .screen-admins) :is(.btn, .btn-xs) { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.app.admin :is(.screen-settings, .screen-wallets, .screen-reconciliation, .screen-admins) .btn-more { width: 38px; padding: 0; }
:root.is-admin .dt-actions .btn-sm, :root.is-admin .cl-actions .btn-sm, :root.is-admin .adm-toolbar .btn-sm, :root.is-admin .conn-card .actions .btn-sm { font-size: 12px; }
:root.is-admin .tbl { font-size: 14px; }
:root.is-admin .tbl th, :root.is-admin .data-table.compact .tbl th, :root.is-admin .tbl.compact th { height: auto; padding: 12px 16px; font-size: 14px; font-weight: 700; line-height: 20px; letter-spacing: 0; text-transform: none; color: var(--muted); }
:root.is-admin .tbl td, :root.is-admin .data-table.compact .tbl td, :root.is-admin .tbl.compact td { height: auto; padding: 12px 16px; font-size: 14px; line-height: 20px; }
/* Como el original (Tailwind: text-sm 14/20, text-xs 12/16): el alto de línea de lo que va dentro de una celda sale de
   su tamaño de letra (2·tamaño − 8 px); lo que trae su propio alto (badges, botones) lo conserva (:where = sin peso) */
:where(:root.is-admin .tbl td) :where(*) { line-height: calc(2em - 8px); }
:root.is-admin .tbl td.empty { height: 120px; }
:root.is-admin .tbl td.empty:has(> .empty-in) { padding-left: 0; padding-right: 0; }   /* el texto ya ocupa el ancho visible: con el relleno de las celdas del admin la tabla medía 32 px de más (Conciliación sin diferencias) */
/* La tabla va en un recuadro sin relleno de radio 12 (overflow-x-auto rounded-xl border del original), no en una tarjeta */
:root.is-admin .table-card { background: transparent; border-radius: var(--radius); }
.app.admin .report-table .tbl td { white-space: normal; min-width: 64px; }
/* 180 px: con 200 la tabla de Withdrawals se pasaba 5-6 px a 1440 entre las 10 y las 12 (hora de dos dígitos en EN) */
.app.admin .report-table .tbl td.rep-dest { min-width: 180px; overflow-wrap: anywhere; }
.app.admin .report-table .tbl td.rep-nowrap { white-space: nowrap; }   /* "USDT ERC-20" sin cortarse en el guion */
/* IDs largos (kyc-1790859271187-vdxil): se cortan solo en los guiones ("kyc-" / "1790859271187-" / "vdxil", como el
   original y /master/documents), no cada 4 caracteres */
.app.admin .report-table .tbl td.rep-id { overflow-wrap: normal; word-break: normal; }
/* Buscador con rótulo y conteo como el original: "Search" (14/20) mb-1, campo de 38 px, conteo mt-1 (12/16) y la tabla mt-6 */
.app.admin .dt-filters .search { width: 448px; max-width: 100%; }
.app.admin .dt-toolbar { margin-bottom: 24px; row-gap: 16px; }   /* gap-4 del original: 16 px entre el conteo y Export CSV si la barra se parte (390 px) */
.app.admin :is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block { row-gap: 16px; }
.app.admin .dt-search-label { line-height: 20px; }
.app.admin .dt-count { min-height: 16px; line-height: 16px; }
.app.admin .rep-filters { display: flex; flex-wrap: wrap; gap: 9px; }
.app.admin .rep-filters .select { height: 42px; width: auto; min-width: 150px; background-color: var(--surface); }
/* El variant "danger" del Button del original es solo contorno (bg-transparent, borde y texto rojos), también en los
   botones de peligro de los modales (Reject del detalle, Delete de las confirmaciones) */
:root.is-admin .btn-danger, :root.is-admin .btn-danger-solid { background: transparent; border-color: var(--btn-danger-border, var(--danger)); color: var(--danger); }
:root.is-admin .btn-danger:hover, :root.is-admin .btn-danger-solid:hover { background: var(--danger-soft); border-color: var(--danger); filter: none; }
/* Medidas del Button del original (rounded-[10px] border px-4 py-2.5 text-sm = 42 px; con text-xs, 38 px y 12 px) en los
   botones de los modales, IB (Custom rates, Deactivate, Activate IB, Save, Refresh symbols, Sync rebates y los Save de
   Settings), Aprobar / Rechazar de IB Transactions y Modify Requests y las acciones de Academy */
:root.is-admin .modal-actions .btn, :root.is-admin .screen-ib :is([data-rates], [data-deact], [data-act], [data-save], [data-symbols], [data-sync], button[type="submit"]), :root.is-admin .screen-academy .acad-submit .btn { height: 42px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
:root.is-admin :is(.screen-ib-transactions, .screen-ib-modify-request) .ibadm-actions .btn { height: 38px; padding: 0 16px; font-size: 12px; border-radius: 10px; }
:root.is-admin .screen-academy .acad-actions .btn { height: 38px; font-size: 12px; border-radius: 10px; }
/* Estados: píldora rellena (inline-block rounded-full border px-2.5 py-0.5 text-xs font-medium, fondo *-muted y borde
   *-border del tono) */
:root.is-admin .badge-status { height: auto; padding: 2px 10px; border: 1px solid; border-radius: 9999px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0; text-transform: none; }
:root.is-admin .badge-status .dot { display: none; }
:root.is-admin .badge-status.tone-success { background: var(--success-soft); border-color: var(--success-border); color: var(--success); }
:root.is-admin .badge-status.tone-warning { background: var(--warning-soft); border-color: var(--warning-border); color: var(--warning); }
:root.is-admin .badge-status.tone-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
:root.is-admin .badge-status.tone-muted { background: var(--surface-2); border-color: var(--border-strong); color: var(--muted); }
/* Rótulos en tipo oración (el original no usa mayúsculas fuera de Aspect): roles, "You", "Active", el modo de la conexión
   y la marca "New" de la barra lateral */
:root.is-admin .badge { letter-spacing: 0; text-transform: none; font-weight: 500; font-size: 12px; }
/* Una sola forma de badge en el admin: la píldora del original (rounded-full), también en roles, "You", KYC, IB, LIVE/DEMO y el modo de la conexión */
:root.is-admin .badge { border-radius: 9999px; }
/* Formularios del admin como el original: rótulo gris de 14 px, campos de 40 px con radio de 8 px sobre surface-2 */
:root.is-admin .label { margin-bottom: 4px; font-weight: 400; color: var(--muted); }
/* Un campo de solo lectura (support, admin sin permiso) se ve atenuado como en el original (disabled:opacity-50) */
:root.is-admin .input:disabled, :root.is-admin .select:disabled, :root.is-admin textarea:disabled, :root.is-admin .combo-btn:disabled { opacity: .5; cursor: not-allowed; }
:root.is-admin .input:not(.textarea), :root.is-admin .select { height: 40px; }
:root.is-admin .input, :root.is-admin .select { border-radius: 8px; background-color: var(--surface-2); }
:root.is-admin .search .input, :root.is-admin .dt-date .input, :root.is-admin .dt-status, :root.is-admin .rep-filters .select { height: 40px; background-color: var(--surface-2); }
.app.admin .search .input { height: 38px; }
/* Pestañas del admin como el original: 14 px con la línea de abajo y el conteo " (n)" en gris */
:root.is-admin .tabs { border-bottom: 1px solid var(--border); }
:root.is-admin .tab { font-size: 14px; font-weight: 500; }
:root.is-admin .tab .count { margin-left: 4px; color: var(--muted); }
:root.is-admin .tab .count::before { content: "("; }
:root.is-admin .tab .count::after { content: ")"; }
.app.admin .data-table > .tabs { margin-top: 8px; }
/* Más angosto: p-6 (24 px) por debajo de 1024 y p-4 (16 px) en el celular; el cajón trae la X */
@media (max-width: 1023px) {
  .app.admin .content { padding: 24px 24px 40px; }
  .app.admin .drawer-close { display: inline-flex; position: absolute; top: 12px; right: 12px; }   /* absolute right-3 top-3 */
}
@media (max-width: 640px) { .app.admin .content { padding: 16px 16px 32px; } }
@media (max-width: 1023px) { .admin .topbar { padding: 0 24px; } }
@media (max-width: 639.98px) { .admin .topbar { padding: 0 16px; } }
/* Celulares angostos (320-380 px): el encabezado del portal entra sin aplastar la hamburguesa ni salirse de la pantalla */
@media (max-width: 380px) {
  .topbar { gap: 6px; }
  .pill { padding: 0 12px; }
  .wallet-btn { padding: 0 10px; gap: 6px; }
  .wallet-btn > .icon { display: none; }
}
:root.is-admin .nav-new { height: 18px; padding: 0 6px; font-size: 10px; }
/* Tarjetas del admin con el lenguaje del original (rounded-2xl p-5 y h3 font-semibold de 16 px): Ajustes, Conciliación,
   Conexiones, la ficha del cliente, Wallets y Account Types iguales a IB y al Dashboard. El formulario de Academy sigue en
   text-lg (18 px), como el original */
.app.admin .section-title { font-size: 16px; }
.app.admin .conn-card h3 { font-size: 16px; font-weight: 600; }
.app.admin .card-pad { padding: 20px; }
.app.admin .card-title { font-size: 16px; }
.app.admin .acad-form-card .card-title { font-size: 18px; }
/* Modales del admin con el ancho de cada modal del original: max-w-md (448 px) por defecto (md y sm), max-w-lg (512) el
   detalle del depósito (size "detail") y max-w-2xl (672) los grandes (Payment Methods, Academy, Email Templates…). El
   orden de los botones lo pone ui.modal (principal primero salvo primaryFirst: false) y align "start" los deja a la izquierda */
:root.is-admin .modal { max-width: 448px; }
:root.is-admin .modal-detail { max-width: 512px; }
:root.is-admin .modal-lg { max-width: 672px; }
:root.is-admin .modal-lg:has(.table-wrap) { max-width: min(1100px, 100%); }   /* los que muestran una tabla (libro de la wallet) */
:root.is-admin .modal-actions { justify-content: flex-end; }
:root.is-admin .modal-actions.modal-actions-start { justify-content: flex-start; }
/* Franja del entorno de prueba (DEMO_MODE) */
.demo-banner { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.auth-stage > .demo-banner { position: relative; z-index: 3; }
@media (max-width: 640px) {
  .dt-toolbar { align-items: stretch; }
  /* El buscador de 448 px (y el estado o Desde/Hasta del admin) dentro del margen de 16 px: sin min-width 0 la fila de
     filtros crecía con su contenido y se salía de la pantalla (Documents, Wallets, Admins, Reconciliation, IB…) */
  .dt-filters { flex: 1 1 100%; min-width: 0; max-width: 100%; }
  .app.admin .dt-filters .search, .app.admin .dt-filters > .select, .app.admin .dt-filters .dt-status { width: 100%; max-width: 100%; }
  .dt-status, .dt-date, .dt-date .input { flex: 1 1 auto; width: 100%; }
  .dt-search { width: 100%; }
  .dt-toolbar.has-search-block { flex-wrap: wrap; }
  .app.admin .dt-date { display: grid; grid-template-columns: 52px minmax(0, 1fr); }   /* From y To con el campo alineado */
  .app.admin .rep-filters, .app.admin .rep-filters .select { flex: 1 1 100%; width: 100%; }
  /* Reportes en el celular: From y To lado a lado (rótulo arriba) y los dos selects propios también, así la tabla no baja */
  .app.admin :is(.report-table, .wa-wd-table) .dt-date { flex: 1 1 calc(50% - 5px); width: auto; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .app.admin .report-table .rep-filters { display: flex; flex-wrap: nowrap; gap: 9px; }
  .app.admin .report-table .rep-filters .select { flex: 1 1 0; min-width: 0; }
  /* Export CSV debajo del conteo, a la izquierda (como el original a 390 px) */
  .app.admin :is(.report-table, .wa-wd-table) .dt-toolbar.has-search-block .dt-actions { margin-left: 0; }
  .dt-pager { flex-direction: column; align-items: stretch; }
  .dt-pages { justify-content: space-between; }
  .file-box { flex-direction: column; align-items: stretch; }
  .fb-name.muted { white-space: normal; }   /* el hint ("JPG, PNG… · max 20 MB") entero, en dos renglones si hace falta */
  .fb-actions .btn { flex: 1; }
}

/* Error al cargar los datos de una pantalla (ui.loadError): en lugar de un estado vacío falso, con "Try again" */
.load-error { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--danger-soft); color: var(--danger); font-size: 14px; }
.load-error .le-text { flex: 1 1 200px; }
.load-error .btn { flex: none; }
.tbl td .load-error { margin: 8px 0; }

/* Admin: botones de las filas con las medidas del original: Account Types (Edit / Delete, 41 px, 14), Payment Methods (37 px, 12),
   el ojo de Deposit Requests (31×23, sin fondo) y "View TL credentials" (25 px, sin fondo) */
.app.admin .screen-account-plans .tbl .row-actions .btn-sm { height: 41px; padding: 0 16px; }
.app.admin .screen-payment-methods .depa-actions .btn-xs { height: 37px; padding: 0 16px; font-size: 12px; border-radius: 10px; }
.app.admin .screen-request-deposit .tbl .btn[data-view] { width: auto; height: 23px; padding: 0 8px; border-radius: 6px; background: transparent; border-color: rgba(255, 255, 255, 0.08); }
.app.admin .screen-request-deposit .tbl .btn[data-view] .icon { width: 14px; height: 14px; }
.app.admin .screen-mt5-accounts .tbl .btn-cred { height: 25px; padding: 0 8px; font-size: 12px; border-radius: 6px; background: transparent; border-color: rgba(255, 255, 255, 0.08); }
/* Trading Accounts del admin: el estado como lo muestra el original (texto de TradeLocker en mayúsculas, "ACTIVE", y el
   verde #22C55E de sus pastillas) */
.app.admin .screen-mt5-accounts .acc-pill { text-transform: uppercase; }
.app.admin .screen-mt5-accounts .acc-pill.s-active { color: #22C55E; background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); }
/* KYC del admin: el motivo del rechazo debajo del estado, como el original (12 px gris, en varias líneas) */
.app.admin .kyc-reason-note { margin: 4px 0 0; max-width: 240px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: normal; }

/* ---------- Portal: escala del original ----------
   El portal del original usa las medidas de Tailwind (texto 12 / 14 / 16 / 18 / 20 / 24, botones de 41, marco de 240 / 76)
   y el de esta versión había quedado ~7 % más grande (13 / 15 / 17 / 19 / 21 / 26: se había medido sobre capturas a
   otra escala). Solo en las pantallas del portal (:root.is-portal, que pone portal.js): el admin ya tiene las suyas y el
   acceso (signin / registro) no cambia. Las reglas de tamaño de letra de abajo del todo salen de las del portal con
   13→12, 15→14, 17→16, 19→18, 21→20 y 26→24. */
:root.is-portal body { font-size: 14px; }
/* Alto de línea de Tailwind (12→16, 14→20, 16→24, 18→26, 20→28, 24→32) para todo lo que no trae el suyo */
:where(:root.is-portal .app) :where(*) { line-height: min(calc(2em - 8px), calc(1em + 8px)); }
/* Marco: barra de 240 con el logo de 32 (ítems desde y=72), ítems de 40 / 14, subítems de 32 / 14 con la línea a la izquierda */
:root.is-portal .app { --sidebar-w: 240px; }
:root.is-portal .sidebar-logo { padding: 20px; }
:root.is-portal .sidebar-logo .brand-logo img { height: 32px; }
:root.is-portal .nav-item { height: 40px; gap: 12px; padding: 0 12px; margin-bottom: 4px; border-radius: 12px; font-size: 14px; font-weight: 500; }
:root.is-portal .nav-item .icon { width: 16px; height: 16px; }
:root.is-portal .nav-sub { margin: 0 0 4px 24px; padding: 4px 0 4px 16px; }
:root.is-portal .nav-sub a { height: 32px; margin-left: -8px; padding: 0 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
:root.is-portal .tutorial-card { padding: 12px; border-radius: 12px; }
:root.is-portal .tutorial-card .ibox { width: 36px; height: 36px; }
:root.is-portal .tutorial-card b { font-size: 14px; line-height: 20px; }
:root.is-portal .tutorial-card span { font-size: 12px; line-height: 16px; }
:root.is-portal .switch-head { font-size: 14px; font-weight: 500; }
:root.is-portal .switch-btns a { height: 40px; font-size: 14px; font-weight: 600; }
/* Encabezado de 76 con controles de 48 (hamburguesa, Trading Open, Wallet, soporte y avatar) */
:root.is-portal .topbar { height: 76px; padding: 0 28px; }
:root.is-portal .topbar .icon-btn, :root.is-portal .topbar .avatar { width: 48px; height: 48px; }
:root.is-portal .topbar .avatar { font-size: 15px; }
:root.is-portal .topbar .pill, :root.is-portal .topbar .wallet-btn { height: 48px; padding: 0 14px; font-size: 14px; }
/* Aviso del admin que mira el portal como el cliente: rojo, a la izquierda, con "Exit impersonation" a la derecha */
:root.is-portal .imp-banner { justify-content: space-between; min-height: 42px; padding: 8px 24px; background: rgba(255, 77, 109, 0.12); color: #FF4D6D; border-bottom: 1px solid rgba(255, 77, 109, 0.2); }
:root.is-portal .imp-banner .imp-who { display: inline-flex; align-items: center; gap: 8px; }
:root.is-portal .imp-banner .btn { height: 25px; gap: 4px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #FF4D6D; background: transparent; border-color: rgba(255, 77, 109, 0.4); }
/* Contenido a todo el ancho con 32 de margen (las pantallas angostas, como Deposit, tienen su propio ancho) */
:root.is-portal .content { padding: 32px; }
:root.is-portal .content-inner { max-width: none; }
:root.is-portal .page-head { margin-bottom: 24px; }
:root.is-portal .page-title { font-size: 24px; line-height: 32px; letter-spacing: 0; }
:root.is-portal .page-sub { margin-top: 4px; font-size: 14px; line-height: 20px; }
:root.is-portal .screen-kyc .page-sub { font-size: 16px; line-height: 24px; }
/* Botones de 41 (14 px, 16 de relleno); los de barra (Demo, + Add New, Settings) de 40; View / Trade de las filas, 12 px */
:root.is-portal .btn { height: 41px; padding: 0 16px; font-size: 14px; line-height: 20px; }
:root.is-portal .btn-h42, :root.is-portal .page-head .btn-h42 { height: 40px; font-size: 14px; }
:root.is-portal .btn-view, :root.is-portal .btn-trade { height: 37px; font-size: 12px; line-height: 16px; }
/* Pestañas (All Accounts / Live / Demo, Deposits / Withdrawals…): 14 / 500 con la línea a 8 px del texto */
:root.is-portal .tab { padding: 0 0 8px; font-size: 14px; font-weight: 500; line-height: 20px; }
/* Tablas: encabezado de 11 px en 40 de alto, celdas de 14 con 16 · 20 de relleno */
:root.is-portal .tbl th { height: 40px; padding: 12px 20px; font-size: 11px; line-height: 16px; }
:root.is-portal .tbl td { height: auto; padding: 16px 20px; font-size: 14px; line-height: 20px; }
:root.is-portal .tbl .server { font-size: 12px; line-height: 16px; }
:root.is-portal .tbl .badge { height: 17px; font-weight: 600; }
/* Tamaños de letra del portal (generados de las reglas de arriba y de los módulos; IB no: sus medidas ya eran las del original) */
:root.is-portal .btn { font-size: 14px; }
:root.is-portal .btn-xs { font-size: 12px; }
:root.is-portal .mode-live { font-size: 12px; }
:root.is-portal .mode-demo { font-size: 12px; }
:root.is-portal .hint { font-size: 12px; }
:root.is-portal .auth-btn { font-size: 14px; }
:root.is-portal .menu-title { font-size: 14px; }
:root.is-portal .menu-item { font-size: 14px; }
:root.is-portal .user-head .avatar { font-size: 12px; }
:root.is-portal .user-head .who b { font-size: 14px; }
:root.is-portal .user-head .who span { font-size: 12px; }
:root.is-portal .menu-row { font-size: 14px; }
:root.is-portal .seg button { font-size: 12px; }
:root.is-portal .nav-item { font-size: 14px; }
:root.is-portal .nav-sub a { font-size: 14px; }
:root.is-portal .tutorial-card b { font-size: 14px; }
:root.is-portal .tutorial-card span { font-size: 12px; }
:root.is-portal .switch-head { font-size: 14px; }
:root.is-portal .switch-btns a { font-size: 14px; }
:root.is-portal .pill { font-size: 14px; }
:root.is-portal .wallet-btn { font-size: 14px; }
:root.is-portal .page-title { font-size: 24px; }
:root.is-portal .page-sub { font-size: 14px; }
:root.is-portal .crumbs { font-size: 14px; }
:root.is-portal .greet { font-size: 14px; }
:root.is-portal .big-amount .unit { font-size: 16px; }
:root.is-portal .hero-sub { font-size: 14px; }
:root.is-portal .tile .t-sub { font-size: 12px; }
:root.is-portal .tbl .acc-code span { font-size: 12px; }
:root.is-portal .skeleton-card h3 { font-size: 16px; }
:root.is-portal .stat .k { font-size: 12px; }
:root.is-portal .stat .s { font-size: 12px; }
:root.is-portal .section-title { font-size: 14px; }
:root.is-portal .conn-card h3 { font-size: 16px; }
:root.is-portal .field-error { font-size: 12px; }
:root.is-portal .modal-text { font-size: 14px; }
:root.is-portal .dt-date { font-size: 12px; }
:root.is-portal .dt-pnum { font-size: 12px; }
:root.is-portal .chart-legend { font-size: 12px; }
:root.is-portal .demo-banner { font-size: 12px; }
:root.is-portal .wh-label { font-size: 12px; }
:root.is-portal .wh-reserved { font-size: 12px; }
:root.is-portal .wallet-tabs .tab { font-size: 14px; }
:root.is-portal .wallet-table [data-download-report] { font-size: 14px; }
:root.is-portal .wl-card-head h2 { font-size: 16px; }
:root.is-portal .wl-sub-title { font-size: 16px; }
:root.is-portal .wl-method-text b { font-size: 16px; }
:root.is-portal .wl-method-text span { font-size: 14px; }
:root.is-portal .wl-dest, :root.is-portal .wl-dest-empty { font-size: 14px; }
:root.is-portal .wl-addr { font-size: 12px; }
:root.is-portal .wl-manage { font-size: 14px; }
:root.is-portal .chip { font-size: 12px; }
:root.is-portal .wl-note { font-size: 12px; }
:root.is-portal .it-card .wl-card-head h2 { font-size: 20px; }
:root.is-portal .it-select .select { font-size: 14px; }
:root.is-portal .it-pv-title { font-size: 20px; }
:root.is-portal .it-pv-box { font-size: 14px; }
:root.is-portal .it-pv-sum > div { font-size: 14px; }
:root.is-portal .it-pv-total dt, :root.is-portal .it-pv-total dd { font-size: 16px; }
:root.is-portal .it-pv-hint { font-size: 14px; }
:root.is-portal .pw-count { font-size: 12px; }
:root.is-portal .pw-form-card .wl-card-head h2, :root.is-portal .pw-saved .wl-card-head h2, :root.is-portal .pw-history .wl-card-head h2 { font-size: 18px; }
:root.is-portal .pw-cancel { font-size: 14px; }
:root.is-portal .pw-warning { font-size: 14px; }
:root.is-portal .pw-head .page-sub { font-size: 14px; }
:root.is-portal .pw-date { font-size: 12px; }
:root.is-portal .pw-hdesc { font-size: 12px; }
:root.is-portal .wa-pick-results .muted { font-size: 12px; }
:root.is-portal .wa-picked span { font-size: 12px; }
:root.is-portal .wa-found { font-size: 12px; }
:root.is-portal .screen-kyc .page-sub { font-size: 16px; }
:root.is-portal .kyc-steps { font-size: 12px; }
:root.is-portal .kyc-doc h4 { font-size: 14px; }
:root.is-portal .kyc-doc-row .btn { font-size: 12px; }
:root.is-portal .kyc-meta { font-size: 12px; }
:root.is-portal .profile-avatar { font-size: 24px; }
:root.is-portal .profile-who h2 { font-size: 20px; }
:root.is-portal .profile-who p { font-size: 14px; }
:root.is-portal .chip { font-size: 12px; }
:root.is-portal .profile-head .profile-settings { font-size: 14px; }
:root.is-portal .profile-form .card-title, :root.is-portal .verif-card .card-title { font-size: 18px; }
:root.is-portal .profile-form .label { font-size: 12px; }
:root.is-portal .profile-hint { font-size: 12px; }
:root.is-portal .verif-item b { font-size: 14px; }
:root.is-portal .verif-s { font-size: 12px; }
:root.is-portal .settings-card .card-title { font-size: 16px; }
:root.is-portal .settings-pref { font-size: 14px; }
:root.is-portal .support-card .support-off { font-size: 12px; }
:root.is-portal .kyc-links .kyc-doc-link { font-size: 12px; }
:root.is-portal .kyc-client span { font-size: 12px; }
:root.is-portal .kyc-count { font-size: 12px; }
:root.is-portal .kyc-stage-links { font-size: 12px; }
:root.is-portal .page-head .btn-h42 { font-size: 14px; }
:root.is-portal .acc-toolbar.is-list .search .input { font-size: 14px; }
:root.is-portal .small { font-size: 12px; }
:root.is-portal .note-warn { font-size: 12px; }
:root.is-portal .flow-steps li { font-size: 14px; }
:root.is-portal .flow-steps .n { font-size: 12px; }
:root.is-portal .preview-sub { font-size: 14px; }
:root.is-portal .preview { font-size: 14px; }
:root.is-portal .email-card h3 { font-size: 14px; }
:root.is-portal .email-card p { font-size: 14px; }
:root.is-portal .detail-tabs .tab { font-size: 14px; }
:root.is-portal .acc-empty-lg .empty-state p { font-size: 14px; }
:root.is-portal .acc-empty-lg .empty-state .btn { font-size: 14px; }
:root.is-portal .lev-current { font-size: 14px; }
:root.is-portal .cred-v { font-size: 14px; }
:root.is-portal .cred-note { font-size: 12px; }
:root.is-portal .jr-range { font-size: 12px; }
:root.is-portal .kpi-3 .kpi .v { font-size: 24px; }
:root.is-portal .journal-pick .select { font-size: 14px; }
:root.is-portal .kpi-3 .kpi .k { font-size: 14px; }
:root.is-portal .dl-section > p { font-size: 14px; }
:root.is-portal .dl-card h3 { font-size: 16px; }
:root.is-portal .dl-card p { font-size: 14px; }
:root.is-portal .cuentas-form .pwd-rule { font-size: 12px; }
:root.is-portal .dep-opt-title { font-size: 18px; }
:root.is-portal .dep-opt-desc { font-size: 14px; }
:root.is-portal .dep-pill { font-size: 12px; }
:root.is-portal .dep-card-head b { font-size: 16px; }
:root.is-portal .dep-card-head span { font-size: 14px; }
:root.is-portal .dep-step-n { font-size: 12px; }
:root.is-portal .dep-step b { font-size: 14px; }
:root.is-portal .dep-coin { font-size: 14px; }
:root.is-portal .dep-net-text b { font-size: 14px; }
:root.is-portal .dep-net-text small { font-size: 12px; }
:root.is-portal .dep-send-title { font-size: 12px; }
:root.is-portal .dep-addr-label { font-size: 12px; }
:root.is-portal .dep-hash .input { font-size: 12px; }
:root.is-portal .dep-done h2 { font-size: 20px; }
:root.is-portal .dep-sim-note { font-size: 12px; }
:root.is-portal .depa-accent { font-size: 12px; }
:root.is-portal .depa-mono .input { font-size: 12px; }
:root.is-portal .depa-actions .btn { font-size: 12px; }
:root.is-portal .depa-env { font-size: 12px; }
:root.is-portal .depa-sec h4 { font-size: 12px; }
:root.is-portal .depa-chainbox .note { font-size: 12px; }
:root.is-portal .depa-proof .depa-proof-name { font-size: 12px; }
:root.is-portal .depa-results .muted { font-size: 12px; }
:root.is-portal .depa-picked span { font-size: 12px; }
:root.is-portal .depa-claims p { font-size: 12px; }
:root.is-portal .mw-tabs .tab { font-size: 14px; }
:root.is-portal .mw-label { font-size: 12px; }
:root.is-portal .mw-h2 { font-size: 18px; }
:root.is-portal .mw-sub { font-size: 14px; }
:root.is-portal .mw-pill { font-size: 14px; }
:root.is-portal .mw-tv-alt { font-size: 12px; }
:root.is-portal .mw-sname { font-size: 14px; }
:root.is-portal .mw-clocks b { font-size: 20px; }
:root.is-portal .mw-dbox .k { font-size: 12px; }
:root.is-portal .mw-dbox .v { font-size: 14px; }
:root.is-portal .mw-dbox.big .v { font-size: 18px; }
:root.is-portal .mw-city-top b { font-size: 14px; }
:root.is-portal .tut-legend { font-size: 12px; }
:root.is-portal .tut-pos { font-size: 12px; }
:root.is-portal .tut-detail p { font-size: 14px; }
:root.is-portal .tut-lesson { font-size: 14px; }
:root.is-portal .dob-sel { font-size: 12px; }
:root.is-portal .dob-day { font-size: 12px; }
@media (max-width: 1023px) {
  :root.is-portal .pill { font-size: 12px; }
}
@media (max-width: 640px) {
  :root.is-portal .pw-addr { font-size: 12px; }
  :root.is-portal .profile-avatar { font-size: 20px; }
}
@media (max-width: 767px) {
  :root.is-portal .dep-wrap .page-title { font-size: 24px; }
  :root.is-portal .dep-opt-title { font-size: 16px; }
}
/* Ajustes puntuales del portal (medidos en el original, texto por texto) */
:root.is-portal #page .page-title { line-height: 32px; }
:root.is-portal #page .dep-wrap .page-title { font-size: 32px; line-height: 48px; }
:root.is-portal #page .dep-wrap .page-head .page-sub { margin-top: 8px; font-size: 15px; line-height: 23px; }
:root.is-portal #page .dep-wrap .page-title.dep-title { font-size: 24px; line-height: 30px; }
:root.is-portal .dep-pill { height: 21px; font-size: 12px; line-height: 16px; }
:root.is-portal .tile .t-title { font-size: 14px; line-height: 20px; }
:root.is-portal .big-amount .unit { font-size: 16px; font-weight: 500; }
:root.is-portal .screen-wallet .big-amount .unit { font-size: 18px; line-height: 28px; }
:root.is-portal .screen-wallet .tab { padding-bottom: 10px; }
:root.is-portal .tbl .btn-view, :root.is-portal .tbl .btn-trade { font-size: 12px; line-height: 16px; }
:root.is-portal .tbl .badge { line-height: 16px; }
:root.is-portal .wl-method-row b { font-weight: 700; }
:root.is-portal .wl-eta { font-size: 11px; }
:root.is-portal .profile-form .label { font-weight: 500; }
:root.is-portal .profile-head .profile-settings { font-weight: 500; }
:root.is-portal :is(.profile-form, .verif-card) .card-title { line-height: 28px; }
:root.is-portal .verif-item b { font-weight: 600; }
:root.is-portal .dl-title { font-size: 18px; line-height: 28px; }
:root.is-portal .dl-section h3, :root.is-portal .dl-card h3 { font-weight: 600; }
:root.is-portal .label.caps { font-weight: 500; line-height: 16px; }
:root.is-portal .jr-range { line-height: 16px; }
:root.is-portal #it-form .chip { font-weight: 500; line-height: 16px; }
:root.is-portal .wl-card-head h2 { line-height: 28px; }
:root.is-portal .tut-j-left h2 { font-size: 17px; line-height: 26px; }
:root.is-portal .badge.ib-pill { height: 20px; }
:root.is-portal .screen-ib .btn { font-weight: 400; }
:root.is-portal .screen-ib .ib-link { font-weight: 400; }
:root.is-portal .screen-ib .ib-card-sub { font-size: 12px; line-height: 16px; }
:root.is-portal #page .tbl td { height: auto; }
:root.is-portal .screen-withdrawal .wl-card-head h2 { line-height: 24px; }
:root.is-portal .wl-eta { line-height: 17px; }
:root.is-portal .jr-range { padding-bottom: 0; }
:root.is-portal #page .screen-ib .btn { font-weight: 400; }
:root.is-portal #page .screen-ib .ib-card-title { font-size: 16px; font-weight: 700; line-height: 24px; }
:root.is-portal .wh-label span { font-weight: 500; }
/* ⋯ de las filas de cuentas: 32 × 32 sin fondo, como el original (así la fila mide 71 como allá) */
:root.is-portal .tbl .row-actions .btn-more { width: 32px; height: 32px; padding: 0; background: transparent; }
:root.is-portal #page .screen-ib .ib-head .btn-primary, :root.is-portal #page .screen-ib .ib-hero .btn-primary { font-weight: 600; }
/* Pantallas del partner y Market Events: medidas del original, pantalla por pantalla */
:root.is-portal .mw-h2 { font-weight: 600; line-height: 28px; }
:root.is-portal .mw-pill { height: 33px; font-weight: 500; }
:root.is-portal #page :is(.screen-ib-links, .screen-ib-commissions) .btn { font-weight: 400; }
:root.is-portal #page .screen-ib-links .ib-card-title { font-size: 16px; font-weight: 700; line-height: 24px; }
:root.is-portal .screen-ib-links .ib-small { font-size: 12px; line-height: 16px; }
:root.is-portal .screen-ib-links .ib-lead { font-size: 14px; }
:root.is-portal .screen-ib-links b { font-size: 13px; font-weight: 600; }
:root.is-portal .screen-ib-commissions .pill-tab { height: 28px; font-size: 12px; line-height: 16px; }
:root.is-portal #page .screen-ib-commissions .btn-sm { font-size: 12px; line-height: 16px; }
:root.is-portal .screen-ib-commissions .k { font-size: 12px; line-height: 16px; }
:root.is-portal #page :is(.screen-ib-commissions, .screen-ib-trade-report, .screen-ib-direct-clients) .ib-card-title { font-size: 18px; font-weight: 900; line-height: 28px; }
:root.is-portal #page .screen-ib-withdrawal .ib-card-title { font-size: 18px; font-weight: 600; line-height: 28px; }
:root.is-portal .screen-ib-withdrawal .label { line-height: 20px; }
:root.is-portal .screen-ib-withdrawal .card-pad > .ib-small { font-size: 14px; line-height: 20px; }
:root.is-portal .screen-ib-withdrawal .ib-max { height: 30px; line-height: 16px; }
:root.is-portal .screen-ib-withdrawal dt { font-size: 13px; line-height: 20px; }
:root.is-portal .screen-ib-statistics .ib-card-sub { font-size: 13px; }
:root.is-portal .screen-ib-statistics .tbl th { font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
:root.is-portal .screen-ib-statistics b { font-weight: 600; }
:root.is-portal #page .screen-ib-activity-log .ib-card-title { font-weight: 600; }
:root.is-portal .screen-ib-trade-report .label { font-weight: 600; }
:root.is-portal .screen-ib-links b { line-height: 20px; }
:root.is-portal .screen-ib-links .ib-rates .ib-small, :root.is-portal .screen-ib-links .ib-card-sub { font-size: 13px; line-height: 20px; }
:root.is-portal .screen-ib-withdrawal .ib-avail .ib-small { font-size: 11px; line-height: 17px; }
:root.is-portal .screen-ib-statistics .ib-card-sub { line-height: 20px; }
:root.is-portal .screen-ib-statistics .ib-card span { font-weight: 600; }
:root.is-portal .screen-ib-trade-report .label { font-size: 12px; line-height: 16px; }
:root.is-portal #page .screen-ib-activity-log .ib-card-title { font-size: 16px; line-height: 24px; }
:root.is-portal .screen-ib-direct-clients .k { font-size: 12px; line-height: 16px; }
:root.is-portal .screen-ib .k, :root.is-portal .screen-ib .ib-link { font-size: 12px; line-height: 16px; }
:root.is-portal .screen-ib-withdrawal dt { line-height: 20px; }
:root.is-portal .screen-ib .ib-small { font-size: 12px; line-height: 16px; }
:root.is-portal .screen-ib dt { font-size: 14px; line-height: 20px; }
:root.is-portal .screen-ib-statistics .ib-lifetime span { font-weight: 600; line-height: 17px; }
