
/* ============================================================
   Fuentes propias. Cero dependencia de Google Fonts.
   Inter y JetBrains Mono se usaban en el CSS pero nunca se
   descargaban: el portal caia a fuentes de sistema.
   ============================================================ */
/* Inter retirado 2026-08-21: el body usa la pila del sistema y ninguna regla
   referenciaba 'Inter'. El @font-face y su preload descargaban 101 KB por carga. */
@font-face { font-family: 'JetBrains Mono'; src: url('/assets/fonts/jetbrains.woff2') format('woff2'); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Michroma'; src: url('/assets/fonts/michroma.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

@font-face {
  font-family: 'LFX Great Vibes';
  src: url('/assets/fonts/great-vibes.woff2') format('woff2');
  font-display: block;
}
@font-face {
  font-family: 'LFX Dancing Script';
  src: url('/assets/fonts/dancing-script.woff2') format('woff2');
  font-display: block;
}
@font-face {
  font-family: 'LFX Sacramento';
  src: url('/assets/fonts/sacramento.woff2') format('woff2');
  font-display: block;
}
@font-face {
  font-family: 'LFX Pinyon Script';
  src: url('/assets/fonts/pinyon-script.woff2') format('woff2');
  font-display: block;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: #050505;
  color: #E8DDC9;
  /* Sin -webkit-font-smoothing: en Windows (ratio 1) adelgaza los trazos y
     los vuelve grises. El renderizado nativo del sistema es mas nitido. */
  overflow-x: hidden;
}

input, button, textarea { font-family: inherit; }

.view { display: none; min-height: 100vh; position: relative; }
.view.active { display: block; }
.view[hidden] { display: none !important; }

.bg-glow-top {
  position: fixed; top: -30%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 600px;
  background: radial-gradient(ellipse, rgba(201,169,97,0.12) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
.bg-glow-bottom-left {
  position: fixed; bottom: -20%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(232,212,158,0.05) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
.bg-glow-bottom-right {
  position: fixed; bottom: -10%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,169,97,0.06) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
.top-line {
  position: fixed; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,169,97,0.4), transparent);
  z-index: 1;
}

.login-container {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; z-index: 2;
}
@media (max-height: 800px) {
  .login-container {
    align-items: flex-start;
    padding: 20px 24px;
  }
}
.login-card {
  width: 100%; max-width: 420px; padding: 48px 44px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(201,169,97,0.15);
  border-radius: 18px;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Scrollbar interno dorado del card */
.login-card::-webkit-scrollbar {
  width: 4px;
}
.login-card::-webkit-scrollbar-track {
  background: transparent;
  margin: 18px 0;
}
.login-card::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.4), rgba(176, 141, 122, 0.4));
  border-radius: 2px;
}
.login-card::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.7), rgba(176, 141, 122, 0.7));
}
.login-header {
  display: flex; flex-direction: column; align-items: center; margin-bottom: 36px;
}

.brand-name {
  font-size: 36px;
  margin-bottom: 14px;
  margin-top: 8px;
  text-align: center;
  filter: drop-shadow(0 0 40px rgba(201,169,97,0.15));
}
.brand-tagline {
  font-size: 11px; color: rgba(201,169,97,0.7);
  letter-spacing: 0.2em; font-weight: 500;
}

.form-group { margin-bottom: 18px; }

.fld-label {
  display: block; font-size: 10.5px; color: rgba(201,169,97,0.7);
  letter-spacing: 0.18em; font-weight: 500; margin-bottom: 10px;
}
.fld {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 11px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(201,169,97,0.15);
  transition: all 0.2s;
}
.fld:focus-within {
  border-color: rgba(201,169,97,0.5);
  background: rgba(0,0,0,0.4);
  box-shadow: 0 0 0 3px rgba(201,169,97,0.08);
}
.fld-icon { color: rgba(201,169,97,0.6); font-size: 16px; flex-shrink: 0; }
.fld-input {
  border: none; outline: none; background: transparent;
  flex: 1; font-size: 13.5px; color: #E8DDC9; min-width: 0;
}
.fld-input::placeholder {
  color: rgba(248,246,242,0.3); letter-spacing: 0.05em;
}
.fld-icon-toggle {
  color: rgba(201,169,97,0.5); font-size: 16px;
  cursor: pointer; padding: 0 4px; flex-shrink: 0;
  transition: color 0.15s;
}
.fld-icon-toggle:hover { color: rgba(232,212,158,0.85); }

.form-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 24px; font-size: 12px; flex-wrap: wrap; gap: 10px;
}

.remember {
  display: flex; align-items: center; gap: 9px;
  cursor: pointer; user-select: none;
}
.remember input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(201,169,97,0.45);
  background: rgba(0,0,0,0.4);
  cursor: pointer; position: relative;
  flex-shrink: 0; transition: all 0.15s; margin: 0;
}
.remember input[type="checkbox"]:hover {
  border-color: rgba(201,169,97,0.7);
  background: rgba(201,169,97,0.06);
}
.remember input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
  border-color: rgba(201,169,97,0.8);
}
.remember input[type="checkbox"]:checked::after {
  content: ""; position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #050505; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.remember-label {
  color: rgba(201,169,97,0.85); letter-spacing: 0.02em;
  transition: color 0.15s;
}
.remember:hover .remember-label { color: #E8D49E; }

.forgot-link {
  color: rgba(201,169,97,0.85); text-decoration: none;
  letter-spacing: 0.02em; transition: color 0.15s;
}
.forgot-link:hover { color: #E8D49E; }

.error-box {
  display: none;
  background: rgba(200,80,80,0.08);
  border: 1px solid rgba(200,80,80,0.25);
  color: #E8A5A5;
  padding: 10px 14px; border-radius: 10px;
  font-size: 12.5px; margin-bottom: 14px;
  align-items: center; gap: 8px;
}
.error-box.visible {
  display: flex;
}
.error-box i { font-size: 16px; flex-shrink: 0; }

.btn-login {
  width: 100%; padding: 14px; border-radius: 11px;
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
  border: none; color: #050505;
  font-weight: 600; font-size: 13px;
  cursor: pointer; letter-spacing: 0.2em;
  box-shadow: 0 8px 24px rgba(201,169,97,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-login:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(201,169,97,0.32), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-login.loading .btn-label::before {
  content: ""; display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(5,5,5,0.3);
  border-top-color: #050505;
  border-radius: 50%;
  margin-right: 10px; vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lang-row {
  margin-top: 24px; padding-top: 22px;
  border-top: 1px solid rgba(201,169,97,0.1);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.lang-btn {
  padding: 6px 12px; border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(248,246,242,0.5);
  font-size: 10.5px; font-weight: 500;
  cursor: pointer; letter-spacing: 0.1em;
  transition: all 0.15s;
}
.lang-btn:hover {
  color: rgba(248,246,242,0.8);
  background: rgba(201,169,97,0.05);
}
.lang-active {
  background: rgba(201,169,97,0.12);
  color: #E8D49E;
  border-color: rgba(201,169,97,0.25);
}

.footer-stamp {
  position: fixed; bottom: 24px; left: 0; right: 0;
  text-align: center; z-index: 1;
  font-size: 10.5px; color: rgba(201,169,97,0.4);
  letter-spacing: 0.25em;
}

#view-login {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  align-items: center; justify-content: center;
  padding: 24px; position: relative; z-index: 2;
  overflow: hidden;
}
.app-placeholder {
  text-align: center; max-width: 480px;
  padding: 48px 36px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(201,169,97,0.15);
  border-radius: 18px;
  backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.ap-title {
  font-size: 22px; font-weight: 400; color: #E8DDC9;
  letter-spacing: 0.28em; margin-bottom: 6px;
}
.ap-name {
  font-size: 16px; color: #E8D49E;
  margin-bottom: 4px; letter-spacing: 0.02em;
}
.ap-meta {
  font-size: 11.5px; color: rgba(248,246,242,0.5);
  letter-spacing: 0.12em; margin-bottom: 32px;
}
.btn-secondary {
  padding: 11px 20px; border-radius: 10px;
  background: rgba(201,169,97,0.08);
  border: 1px solid rgba(201,169,97,0.25);
  color: #E8D49E; font-size: 12px;
  font-weight: 500; letter-spacing: 0.18em;
  cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover {
  background: rgba(201,169,97,0.14);
  border-color: rgba(201,169,97,0.4);
}
.ap-hint {
  margin-top: 28px; font-size: 11px;
  color: rgba(248,246,242,0.35);
  letter-spacing: 0.05em; font-style: italic;
}

.ap-brand {
  font-family: 'Michroma', 'Trajan Pro', Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  color: #E8D49E;
  letter-spacing: 0.14em;
  margin-bottom: 20px;
  text-align: center;
  background: linear-gradient(135deg, #E8D49E 0%, #C9A961 50%, #8A7340 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fld.invalid {
  border-color: rgba(212,131,131,0.55);
  background: rgba(212,131,131,0.04);
  box-shadow: 0 0 0 3px rgba(212,131,131,0.08);
  animation: shake 0.35s ease-in-out;
}
.fld.invalid .fld-icon {
  color: #D48383;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@media (max-width: 480px) {
  .login-card { padding: 36px 28px; }
  .footer-stamp { font-size: 9.5px; bottom: 16px; }
}

/* === LOGO V1: Michroma respirado + opacidad === */
.brand-name {
  font-size: 22px !important;
  letter-spacing: 0.12em !important;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
}
.bn-mark, .bn-fax {
  font-family: 'Michroma', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 0.12em;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
.bn-mark {
  color: #C9A961;
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
}
.bn-fax {
  color: #E8D49E;
  background: linear-gradient(135deg, #E8D49E 0%, #C9A961 100%);
  font-size: 1.15em;
  font-weight: 500;
}

.ap-brand {
  font-size: 18px !important;
  letter-spacing: 0.12em !important;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}

/* El parent del input password debe ser position:relative */
.fld-group:has(.fld-input-pwd) { position: relative; }

/* ============================================================
   APP SHELL — Sidebar + Topbar + Content
   ============================================================ */
#view-app .app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ===== Sidebar ===== */
.sidebar {
  background: rgba(17,17,17,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(201,169,97,0.10);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sb-brand {
  display: flex;
  align-items: baseline;
  gap: 0;
  font-family: 'Michroma', sans-serif;
  font-size: 14px;
  letter-spacing: 0.10em;
  padding: 8px 8px 24px;
  border-bottom: 1px solid rgba(201,169,97,0.08);
}
.sb-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  flex: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(232,221,201,0.65);
  text-decoration: none;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.nav-item i { font-size: 17px; color: rgba(201,169,97,0.55); flex-shrink: 0; }
.nav-item:hover {
  background: rgba(201,169,97,0.06);
  color: #E8DDC9;
}
.nav-item:hover i { color: #C9A961; }
.nav-item.active {
  background: rgba(201,169,97,0.10);
  color: #E8DDC9;
}
.nav-item.active i { color: #C9A961; }
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, #E8D49E, #C9A961, #8A7340);
}
.nav-badge {
  margin-left: auto;
  background: rgba(201,169,97,0.20);
  color: #E8DDC9;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}

/* ===== Sidebar footer (user + logout) ===== */
.sb-foot {
  border-top: 1px solid rgba(201,169,97,0.08);
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sb-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(201,169,97,0.30), rgba(138,115,64,0.30));
  display: flex; align-items: center; justify-content: center;
  color: #E8DDC9;
  font-size: 16px;
  flex-shrink: 0;
}
.sb-user-info { min-width: 0; flex: 1; }
.sb-user-name {
  font-size: 12.5px;
  color: #E8DDC9;
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-user-role {
  font-size: 10px;
  color: rgba(201,169,97,0.55);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.sb-logout {
  background: transparent;
  border: 1px solid rgba(201,169,97,0.15);
  color: rgba(201,169,97,0.60);
  cursor: pointer;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.sb-logout:hover {
  background: rgba(180,55,55,0.08);
  border-color: rgba(180,55,55,0.30);
  color: #b43737;
}

/* ===== Main ===== */
.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 40px;
  background: rgba(17,17,17,0.60);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,169,97,0.08);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(201,169,97,0.15);
  color: #C9A961;
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center; justify-content: center;
  font-size: 18px;
}
.topbar-title {
  font-size: 14px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(232,221,201,0.85);
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang-mini {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(201,169,97,0.60);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.lang-mini:hover { background: rgba(201,169,97,0.08); color: #E8DDC9; }

/* ===== Content ===== */
.app-content {
  padding: 32px 40px;
  flex: 1;
}
.page-header { margin-bottom: 24px; }
.page-title {
  font-family: 'Michroma', sans-serif;
  font-size: 22px;
  letter-spacing: 0.10em;
  color: #E8DDC9;
  background: linear-gradient(135deg, #E8D49E 0%, #C9A961 50%, #8A7340 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 400;
}
.page-sub {
  margin-top: 8px;
  font-size: 13px;
  color: rgba(232,221,201,0.50);
  letter-spacing: 0.05em;
}

/* ===== Dashboard cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.card-stat {
  background: rgba(21,20,15,0.55);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  padding: 22px;
}
.cs-label {
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(201,169,97,0.65);
  margin-bottom: 12px;
}
.cs-value {
  font-family: 'Michroma', sans-serif;
  font-size: 28px;
  letter-spacing: 0.05em;
  color: #E8DDC9;
}

.empty-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(201,169,97,0.05);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 10px;
  font-size: 13px;
  color: rgba(232,221,201,0.65);
}
.empty-hint i { color: #C9A961; font-size: 18px; }

.placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: rgba(232,221,201,0.40);
  text-align: center;
}
.placeholder-page i {
  font-size: 56px;
  color: rgba(201,169,97,0.30);
  margin-bottom: 16px;
}
.placeholder-page p {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .topbar-toggle { display: flex; }
  .app-content { padding: 20px 16px; }
  @media (max-width: 768px) { .topbar { padding: 0 16px; } }
}

/* ============================================================
   FIXES: contraste + sidebar fija + modal app
   ============================================================ */

/* Layout: sidebar SIEMPRE fija, solo main scrollea */
.app-shell {
  grid-template-columns: 240px 1fr;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  height: 100vh;
  overflow-y: auto;
}
.app-main {
  grid-column: 2;
  min-height: 100vh;
}
.topbar { position: sticky; top: 0; }

/* === Subir contraste textos === */
.nav-item { color: rgba(232,221,201,0.88); }
.nav-item i { color: rgba(201,169,97,0.75); }
.nav-item:hover { color: #F0E6D2; }
.nav-item:hover i { color: #E8D49E; }
.nav-item.active { color: #F0E6D2; }
.nav-item.active i { color: #E8D49E; }

.sb-user-name { color: #F0E6D2; }
.sb-user-role { color: rgba(201,169,97,0.75); }

.topbar-title { color: #E8DDC9; }
.page-sub { color: rgba(232,221,201,0.70); }
.cs-label { color: rgba(201,169,97,0.85); }
.cs-value { color: #F0E6D2; }
.empty-hint { color: rgba(232,221,201,0.80); }
.placeholder-page { color: rgba(232,221,201,0.55); }
.placeholder-page i { color: rgba(201,169,97,0.45); }
.lang-mini { color: rgba(201,169,97,0.85); }

/* Sidebar scrollbar discreto */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(201,169,97,0.15); border-radius: 2px; }

/* Mobile override (sidebar como drawer) */
@media (max-width: 768px) {
  .app-main { margin-left: 0; width: 100%; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
}

/* ============================================================
   MODAL GENERICO (reusable)
   ============================================================ */
.lfx-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lfx-modal[hidden] { display: none; }
.lfx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lfx-modal-card {
  position: relative;
  background: linear-gradient(180deg, rgba(25,25,25,0.95), rgba(17,17,17,0.95));
  border: 1px solid rgba(201,169,97,0.22);
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,169,97,0.08);
  animation: lfxModalIn 0.2s ease;
}
@keyframes lfxModalIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.lfx-modal-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(201,169,97,0.20), rgba(138,115,64,0.20));
  border: 1px solid rgba(201,169,97,0.30);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  color: #E8D49E;
}
.lfx-modal-title {
  font-family: 'Michroma', sans-serif;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #F0E6D2;
  margin-bottom: 10px;
  font-weight: 400;
}
.lfx-modal-body {
  color: rgba(232,221,201,0.80);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.lfx-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-modal {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 11px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid rgba(201,169,97,0.25);
  background: transparent;
  color: rgba(232,221,201,0.85);
  min-width: 110px;
}
.btn-modal:hover { background: rgba(201,169,97,0.08); color: #F0E6D2; border-color: rgba(201,169,97,0.45); }
.btn-modal-primary {
  background: linear-gradient(135deg, #E8D49E, #C9A961, #8A7340);
  border-color: transparent;
  color: #050505 !important;
  font-weight: 600;
}
.btn-modal-primary:hover {
  background: linear-gradient(135deg, #F0DEA8, #D4B57A, #A08850) !important;
  border-color: transparent !important;
  color: #050505 !important;
  box-shadow: 0 4px 16px rgba(201,169,97,0.40);
}
.btn-modal-danger {
  border-color: rgba(180,55,55,0.30);
  color: #d97070;
}
.btn-modal-danger:hover { background: rgba(180,55,55,0.10); border-color: rgba(180,55,55,0.55); }

/* Variantes de icon */
.lfx-modal-icon.warning { background: linear-gradient(135deg, rgba(201,169,97,0.15), rgba(138,115,64,0.15)); border-color: rgba(201,169,97,0.40); color: #C9A961; }
.lfx-modal-icon.danger { background: linear-gradient(135deg, rgba(180,55,55,0.15), rgba(140,40,40,0.15)); border-color: rgba(180,55,55,0.50); color: #d97070; }
.lfx-modal-icon.success { background: linear-gradient(135deg, #E8D49E, #C9A961); border-color: transparent; color: #050505; }

/* === SVG icons inline (reemplaza Tabler Icons font) === */
.lfx-icon { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.lfx-icon svg { width: 1em; height: 1em; display: block; }
/* Tamaños default por contexto (heredan del font-size del parent) */
.nav-item .lfx-icon svg { width: 17px; height: 17px; }
.sb-avatar .lfx-icon svg { width: 16px; height: 16px; }
.sb-logout .lfx-icon svg { width: 16px; height: 16px; }
.topbar-toggle .lfx-icon svg { width: 18px; height: 18px; }
.fld-icon .lfx-icon svg, .fld-icon-toggle .lfx-icon svg { width: 16px; height: 16px; }
.placeholder-page .lfx-icon svg { width: 56px; height: 56px; }
.empty-hint .lfx-icon svg { width: 18px; height: 18px; }
.lfx-modal-icon .lfx-icon svg { width: 26px; height: 26px; }
/* Si el ícono original tenía clase fld-icon o similar, mantener estilo */
.fld-icon { display: flex; align-items: center; }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-tabs {
  display: flex; gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(201,169,97,0.10);
  flex-wrap: wrap;
}
.st-tab {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: none;
  padding: 12px 18px;
  color: rgba(232,221,201,0.65);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  font-family: inherit;
}
.st-tab .lfx-icon svg { width: 16px; height: 16px; }
.st-tab:hover { color: #E8DDC9; }
.st-tab.active {
  color: #E8D49E;
  border-bottom-color: #C9A961;
}
.st-tab.active .lfx-icon { color: #E8D49E; }

.form-card {
  background: rgba(21,20,15,0.55);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  padding: 30px 34px;
  max-width: 1280px;
}
.fc-title {
  font-family: 'Michroma', sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: #E8D49E;
  margin-bottom: 6px;
  font-weight: 400;
}
.fc-desc {
  font-size: 12px;
  color: rgba(232,221,201,0.65);
  margin-bottom: 22px;
  line-height: 1.55;
}

.fld-wrap { margin-bottom: 18px; }
.fld-wrap .fld-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.20em;
  color: rgba(201,169,97,0.85);
  margin-bottom: 10px;
}
.fld-flat {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(201,169,97,0.15);
  border-radius: 10px;
  color: #E8DDC9;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.fld-flat:focus { border-color: rgba(201,169,97,0.45); background: rgba(0,0,0,0.45); }
.fld-flat:disabled { opacity: 0.55; cursor: not-allowed; }
.fld-flat::placeholder { color: rgba(232,221,201,0.30); }

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }

.fc-actions {
  display: flex; gap: 16px;
  margin-top: 8px;
  align-items: center;
  justify-content: flex-end;
}
/* Facturacion: las tarjetas van una debajo de otra y sus botones quedan
   alineados en columna. Con anchos distintos se lee como un descuido, asi
   que comparten el ancho del mas largo. */
.st-panel[data-tab-content="billing"] .fc-actions .btn-ghost {
  min-width: 232px; justify-content: center;
}
/* Los de bundles son una rejilla de precios, no acciones: van a su aire. */
.st-panel[data-tab-content="billing"] .fc-actions .billing-bundle-btn {
  min-width: 0;
}
@media (max-width: 640px) {
  .st-panel[data-tab-content="billing"] .fc-actions .btn-ghost { min-width: 0; }
}
/* Si el pie lleva texto ademas del boton, el texto ocupa el hueco y el
   boton se queda entero a la derecha. */
.fc-actions > .card-hint { flex: 1 1 auto; min-width: 0; margin: 0; text-align: left; }
.fc-actions > .btn-gold, .fc-actions > .btn-ghost { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 640px) { .fc-actions { flex-wrap: wrap; } }
.btn-gold {
  background: linear-gradient(135deg, #E8D49E, #C9A961, #8A7340);
  color: #050505;
  border: none;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.20em;
  padding: 12px 28px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-gold:hover { box-shadow: 0 4px 16px rgba(201,169,97,0.30); transform: translateY(-1px); }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Password strength */
.pwd-strength {
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  position: relative;
}
.pwd-strength::after {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--strength, 0%);
  background: var(--strength-color, #b43737);
  transition: width 0.2s, background 0.2s;
}

/* Switch toggle */
.switch-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(201,169,97,0.06);
  cursor: pointer;
  gap: 16px;
}
.switch-row:last-child { border-bottom: none; }
.sr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sr-text strong { color: #E8DDC9; font-size: 13.5px; font-weight: 500; }
.sr-text span { color: rgba(232,221,201,0.55); font-size: 11.5px; }
.switch {
  position: relative;
  display: inline-block;
  width: 42px; height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(201,169,97,0.15);
  border-radius: 12px;
  transition: 0.2s;
  cursor: pointer;
}
.switch .slider::before {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 18px; height: 18px;
  background: rgba(232,221,201,0.85);
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + .slider {
  background: linear-gradient(135deg, rgba(201,169,97,0.6), rgba(138,115,64,0.6));
  border-color: rgba(201,169,97,0.50);
}
.switch input:checked + .slider::before { left: 20px; background: #050505; }

.forward-section { margin-top: 16px; padding-top: 8px; border-top: 1px solid rgba(201,169,97,0.10); }

/* === Toast === */
.lfx-toast {
  position: fixed;
  top: 72px; left: 50%;
  transform: translateX(-50%) translateY(-12px) scale(0.98);
  padding: 13px 24px;
  background: rgba(24,22,18,0.98);
  border: 1px solid rgba(201,169,97,0.22);
  border-radius: 12px;
  color: #E8DDC9;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 4000;
  max-width: 420px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lfx-toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.lfx-toast.success { border-color: rgba(201,169,97,0.45); }
.lfx-toast.error { border-color: rgba(180,55,55,0.45); }

/* ============================================================
   SETTINGS FIX — forzar look glassmorphism dorado
   (override de estilos antiguos del login)
   ============================================================ */
[data-page-content] .fld-label {
  display: block !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  letter-spacing: 0.20em !important;
  color: rgba(201,169,97,0.85) !important;
  text-transform: uppercase !important;
  margin: 0 0 8px 0 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

[data-page-content] .fld-flat {
  width: 100% !important;
  padding: 12px 14px !important;
  background: rgba(0,0,0,0.30) !important;
  border: 1px solid rgba(201,169,97,0.18) !important;
  border-radius: 10px !important;
  color: #E8DDC9 !important;
  font-size: 13.5px !important;
  font-family: inherit !important;
  outline: none !important;
  transition: border-color 0.15s, background 0.15s !important;
  box-sizing: border-box !important;
}
[data-page-content] .fld-flat:focus {
  border-color: rgba(201,169,97,0.50) !important;
  background: rgba(0,0,0,0.45) !important;
}
[data-page-content] .fld-flat:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background: rgba(0,0,0,0.15) !important;
  color: rgba(232,221,201,0.55) !important;
}
[data-page-content] .fld-flat::placeholder {
  color: rgba(232,221,201,0.30) !important;
}
[data-page-content] select.fld-flat {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9A961' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
}

[data-page-content] .fc-title {
  font-family: 'Michroma', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0.12em !important;
  color: #E8D49E !important;
  margin: 0 0 6px 0 !important;
}

[data-page-content] .btn-gold {
  background: linear-gradient(135deg, #E8D49E, #C9A961, #8A7340) !important;
  color: #050505 !important;
  border: none !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.20em !important;
  padding: 12px 28px !important;
  border-radius: 9px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  text-transform: uppercase !important;
}

/* page-title sin gradient blanco (era hereditado del login) */
.page-title {
  background: linear-gradient(135deg, #E8D49E 0%, #C9A961 50%, #8A7340 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  font-weight: 400 !important;
}

/* Switch sliders refuerzo */
.switch input { position: absolute; opacity: 0; }

/* === Form-row 3 columnas (City State Zip) === */
.form-row-3 {
  display: grid;
  grid-template-columns: 2fr 0.7fr 1fr;
  gap: 14px;
}
@media (max-width: 600px) { .form-row-3 { grid-template-columns: 1fr; } }

.fc-subtitle {
  font-family: 'Michroma', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(201,169,97,0.85);
  margin: 28px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(201,169,97,0.10);
  font-weight: 400;
  text-transform: uppercase;
}

/* === Toast inline (junto al botón Save) — mismo alto que btn-gold === */
.lfx-inline-toast {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  border: 1px solid transparent;
  color: transparent;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
  pointer-events: none;
  margin-right: 8px;
  height: 41px;
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
}

/* Garantizar mismo height en el botón gold del card */
.fc-actions .btn-gold {
  height: 41px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}
.lfx-inline-toast.show { opacity: 1; transform: translateX(0); }
.lfx-inline-toast.success { background: rgba(201,169,97,0.08); border-color: rgba(201,169,97,0.40); color: #C9A961; }
.lfx-inline-toast.error {
  background: rgba(180,55,55,0.06);
  border-color: rgba(180,55,55,0.30);
  color: rgba(217,112,112,0.90);
}
.fc-actions { align-items: center; }

/* === Override Chrome autofill (incluyendo el highlight justo al seleccionar) === */
/* Aplica a TODOS los inputs de la app, no solo .fld-flat / .fld-input */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
input:-webkit-autofill:autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #E8DDC9 !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(0,0,0,0.45) inset !important;
  box-shadow: 0 0 0 1000px rgba(0,0,0,0.45) inset !important;
  caret-color: #E8DDC9 !important;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-color 9999s ease-out 0s, color 9999s ease-out 0s;
  animation-name: lfxAutofillFix;
  animation-duration: 0.1s;
}
/* Animación que se dispara EN el autofill (chrome hack para detectar el momento) */
@keyframes lfxAutofillFix {
  from { background: transparent; }
  to { background: transparent; }
}
/* Doble seguridad: dentro de inputs ya activos */
input:autofill {
  background: rgba(0,0,0,0.45) !important;
  color: #E8DDC9 !important;
}

/* === Override de selección de texto (era azul/blanco feo) === */
::selection {
  background: rgba(201,169,97,0.30);
  color: #F0E6D2;
}
::-moz-selection {
  background: rgba(201,169,97,0.30);
  color: #F0E6D2;
}
input::selection,
textarea::selection {
  background: rgba(201,169,97,0.35);
  color: #F0E6D2;
}
input::-moz-selection,
textarea::-moz-selection {
  background: rgba(201,169,97,0.35);
  color: #F0E6D2;
}

/* ============================================================
   CONTACTS PAGE / Data table / Toolbar
   ============================================================ */
.toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar-search { flex: 1; min-width: 260px; }
.toolbar-search .fld-flat { padding: 10px 14px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn-secondary-thin {
  background: transparent;
  border: 1px solid rgba(201,169,97,0.20);
  color: rgba(232,221,201,0.85);
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-secondary-thin:hover { background: rgba(201,169,97,0.06); border-color: rgba(201,169,97,0.45); color: #F0E6D2; }

.btn-gold-thin {
  background: linear-gradient(135deg, #E8D49E, #C9A961, #8A7340);
  color: #050505;
  border: none;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.15em;
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
.btn-gold-thin:hover { box-shadow: 0 4px 16px rgba(201,169,97,0.25); }

.toolbar-tabs {
  display: flex; gap: 0;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(201,169,97,0.08);
}
.tb-tab {
  background: transparent;
  border: none;
  color: rgba(232,221,201,0.55);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.tb-tab:hover { color: #E8DDC9; }
.tb-tab.active { color: #E8D49E; border-bottom-color: #C9A961; }

.data-table-wrap {
  background: rgba(21,20,15,0.55);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead th {
  text-align: left;
  padding: 14px 18px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(201,169,97,0.85);
  font-weight: 500;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid rgba(201,169,97,0.10);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(201,169,97,0.06);
  color: #E8DDC9;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(201,169,97,0.04); }
.data-table tbody td.dt-meta { color: rgba(232,221,201,0.50); font-size: 12px; }
.data-table tbody td.dt-actions { text-align: right; white-space: nowrap; }

.dt-row-btn {
  background: transparent;
  border: 1px solid rgba(201,169,97,0.15);
  color: rgba(232,221,201,0.70);
  font-size: 11px;
  padding: 5px 11px;
  border-radius: 6px;
  margin-left: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.dt-row-btn:hover { background: rgba(201,169,97,0.10); color: #F0E6D2; border-color: rgba(201,169,97,0.40); }
.dt-row-btn.danger:hover { background: rgba(180,55,55,0.10); color: #d97070; border-color: rgba(180,55,55,0.50); }
.dt-row-btn.dt-cancel-btn { color: #d97070; border-color: rgba(180,55,55,0.45); }
.dt-row-btn.dt-cancel-btn:hover { background: rgba(180,55,55,0.12); border-color: rgba(180,55,55,0.65); }

.data-empty {
  padding: 60px 20px;
  text-align: center;
  color: rgba(232,221,201,0.50);
}

/* Contact modal grande */
.contact-modal-card {
  max-width: 700px;
  text-align: left;
  padding: 28px 32px;
}
.contact-modal-card .lfx-modal-title {
  text-align: left;
  margin-bottom: 22px;
}
.contact-modal-card .contact-form { margin-bottom: 10px; }
.contact-modal-card textarea {
  resize: vertical;
  min-height: 56px;
  font-family: inherit;
}
.contact-modal-card .lfx-modal-actions {
  justify-content: flex-end;
  margin-top: 8px;
}

/* Row button primary (Send Fax) — un poquito más visible */
.dt-row-btn.primary {
  background: rgba(201,169,97,0.10);
  border-color: rgba(201,169,97,0.35);
  color: #E8D49E;
}
.dt-row-btn.primary:hover {
  background: rgba(201,169,97,0.20);
  border-color: rgba(201,169,97,0.60);
  color: #F0E6D2;
}

/* ============================================================
   BULK SELECTION
   ============================================================ */
.dt-check-col {
  width: 42px;
  padding: 0 !important;
  text-align: center;
  vertical-align: middle;
}
.data-table thead th.dt-check-col,
.data-table tbody td.dt-check-col {
  padding: 0 !important;
  text-align: center;
}
.data-table .dt-check-col .dt-check {
  margin: 0 auto;
  display: block;
}
.dt-check-col input { margin: 0; }

.dt-check {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1.5px solid rgba(201,169,97,0.40);
  background: rgba(0,0,0,0.40);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: all 0.15s;
}
.dt-check:hover { border-color: rgba(201,169,97,0.75); }
.dt-check:checked {
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  border-color: #C9A961;
}
.dt-check:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #050505;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.dt-check:indeterminate {
  background: rgba(201,169,97,0.30);
  border-color: rgba(201,169,97,0.65);
}
.dt-check:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px; top: 6px;
  width: 8px; height: 2px;
  background: #E8D49E;
}

/* Fila seleccionada */
.data-table tbody tr.selected {
  background: rgba(201,169,97,0.10);
}
.data-table tbody tr.selected:hover {
  background: rgba(201,169,97,0.14);
}
.data-table tbody tr {
  user-select: none;
}

/* Bulk action bar (sticky arriba del table) */
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  margin-bottom: 14px;
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.35);
  border-radius: 10px;
  animation: bulkBarSlide 0.2s ease-out;
}
@keyframes bulkBarSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.bulk-count {
  color: #E8D49E;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.bulk-count strong {
  color: #F0E6D2;
  font-size: 15px;
  margin-right: 4px;
}
.bulk-actions {
  display: flex;
  gap: 8px;
}
.btn-secondary-thin.danger {
  border-color: rgba(180,55,55,0.30);
  color: rgba(217,112,112,0.90);
}
.btn-secondary-thin.danger:hover {
  background: rgba(180,55,55,0.08);
  border-color: rgba(180,55,55,0.60);
  color: #d97070;
}

/* Drag selection overlay */
.drag-select-box {
  position: fixed;
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.50);
  pointer-events: none;
  z-index: 100;
}

/* === Toolbar buttons: TODOS height 38px === */
.toolbar-search .fld-flat {
  height: 38px;
  padding: 0 14px;
  box-sizing: border-box;
}
.btn-secondary-thin,
.btn-gold-thin {
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}
.btn-gold-thin { padding: 0 18px; }

#view-app { padding: 0; margin: 0; min-height: 100vh; }

/* === Prevenir selección de texto en tabla (para drag select) === */
#contactsTbody, #contactsTbody * {
  user-select: none !important;
  -webkit-user-select: none !important;
}
/* Excepto en inputs y buttons (donde sí queremos selección/click normal) */
#contactsTbody input, #contactsTbody button {
  user-select: auto !important;
  -webkit-user-select: auto !important;
}

/* === Fix: atributo HTML 'hidden' debe ganarle a display custom === */
[hidden] {
  display: none !important;
}

/* === Estado deshabilitado de bulk buttons === */
.bulk-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.bulk-actions button:disabled:hover {
  background: transparent;
  border-color: rgba(201,169,97,0.20);
  color: rgba(232,221,201,0.85);
}

/* Contador más sutil cuando es 0 */
.bulk-count {
  transition: color 0.15s;
}

/* ============================================================
   COVERS PAGE — Grid de cards
   ============================================================ */
/* ============================================================
   COVERS — Card grid 3 columnas con preview real
   ============================================================ */
.covers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.cover-card {
  background: rgba(21,20,15,0.60);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  position: relative;
}
.cover-card:hover {
  border-color: rgba(201,169,97,0.40);
  background: rgba(201,169,97,0.04);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.30);
}
.cover-card.is-default {
  border-color: rgba(201,169,97,0.45);
}

/* Top bar de la card: badge + menu */
.cc-topbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
  pointer-events: none;
}
.cc-topbar > * { pointer-events: auto; }

.cc-default-badge {
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  color: #050505;
  font-size: 9px;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Botón menu (⋯) */
.cc-menu-btn {
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(201,169,97,0.25);
  color: #E8DDC9;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: all 0.15s;
}
.cc-menu-btn:hover { background: rgba(201,169,97,0.20); border-color: rgba(201,169,97,0.55); }

/* Menu dropdown */
.cc-menu {
  position: absolute;
  top: 44px;
  right: 12px;
  background: rgba(17,17,17,0.98);
  border: 1px solid rgba(201,169,97,0.25);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 10;
  min-width: 160px;
  display: none;
}
.cc-menu.open { display: block; }
.cc-menu-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: rgba(232,221,201,0.85);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
}
.cc-menu-item:hover { background: rgba(201,169,97,0.10); color: #F0E6D2; }
.cc-menu-item.danger { color: rgba(217,112,112,0.90); }
.cc-menu-item.danger:hover { background: rgba(180,55,55,0.10); color: #d97070; }
.cc-menu-sep {
  height: 1px;
  background: rgba(201,169,97,0.10);
  margin: 4px 0;
}

/* Thumbnail (preview real escalado) — proporción A4 vertical, centrado */
.cc-thumb-wrap {
  position: relative;
  aspect-ratio: 8.5 / 11;       /* proporción Letter exacta */
  width: 100%;
  background: #1c1a14;
  border-bottom: 1px solid rgba(201,169,97,0.10);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  box-sizing: border-box;
  pointer-events: none;
}
.cc-thumb {
  width: 816px;                 /* 8.5in @ 96dpi */
  height: 1056px;               /* 11in @ 96dpi — Letter exacto, FIJO */
  background: #fff;  /* blanco-ok: portada de fax, se imprime */
  padding: 56px;
  box-sizing: border-box;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.6;
  color: #1a1a1a;
  transform-origin: top center;
  /* escala calculada en JS por card para que entre completo */
  transform: scale(var(--thumb-scale, 0.36));
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  flex-shrink: 0;
  overflow: hidden;
}
.cc-thumb table { border-collapse: collapse; }
.cc-thumb h1, .cc-thumb h2, .cc-thumb h3 { color: #1a1a1a; margin: 0 0 12px; }

/* (fade removido — el cover se muestra completo) */

/* Info inferior */
.cc-info {
  padding: 16px 18px;
}
.cc-name {
  font-size: 15px;
  color: #F0E6D2;
  font-weight: 500;
  margin: 0 0 4px;
  word-break: break-word;
}
.cc-desc {
  font-size: 12.5px;
  color: rgba(232,221,201,0.55);
  line-height: 1.4;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-meta {
  font-size: 11px;
  color: rgba(232,221,201,0.40);
  display: flex;
  gap: 12px;
  letter-spacing: 0.03em;
}

/* ============================================================
   COVER EDITOR (full-screen modal)
   ============================================================ */
.lfx-modal-full {
  z-index: 1000;
}
.lfx-modal-full[hidden] { display: none !important; }
.cover-editor {
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,0.97);
  display: flex;
  flex-direction: column;
}
.ce-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(201,169,97,0.10);
  background: rgba(17,17,17,0.95);
}
.ce-name-input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: #F0E6D2;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  padding: 6px 0;
  transition: border-color 0.15s;
}
.ce-name-input:focus { border-bottom-color: rgba(201,169,97,0.40); }
.ce-name-input::placeholder { color: rgba(232,221,201,0.40); }
.ce-header-actions { display: flex; gap: 8px; }

.ce-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ce-toolbar {
  display: flex;
  gap: 4px;
  padding: 8px 20px;
  background: rgba(17,17,17,0.85);
  border-bottom: 1px solid rgba(201,169,97,0.08);
  flex-wrap: wrap;
}
.ce-tool {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(232,221,201,0.70);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ce-tool:hover { background: rgba(201,169,97,0.10); color: #F0E6D2; }
.ce-tool.active { background: rgba(201,169,97,0.20); color: #E8D49E; }
.ce-tool-sep {
  width: 1px;
  height: 22px;
  background: rgba(201,169,97,0.15);
  margin: 0 4px;
  align-self: center;
}
.ce-select {
  width: auto;
  padding: 0 8px;
  background: rgba(0,0,0,0.40);
  border-color: rgba(201,169,97,0.20);
  font-size: 12px;
}

.ce-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  min-height: 0;
}
.ce-editor-wrap {
  overflow-y: auto;
  padding: 32px;
  background: #15140f;
}
.ce-editor {
  background: #fff;  /* blanco-ok: editor de portada, se imprime */
  color: #1a1a1a;
  min-height: calc(100vh - 200px);
  max-width: 850px;
  margin: 0 auto;
  padding: 60px 80px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  line-height: 1.6;
  outline: none;
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}
.ce-editor:focus { outline: 1px solid rgba(201,169,97,0.45); }
.ce-editor table { border-collapse: collapse; }
.ce-editor h1, .ce-editor h2, .ce-editor h3 { color: #1a1a1a; }

.ce-sidebar {
  background: rgba(17,17,17,0.95);
  border-left: 1px solid rgba(201,169,97,0.10);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ce-tabs {
  display: flex;
  border-bottom: 1px solid rgba(201,169,97,0.10);
}
.ce-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px 8px;
  color: rgba(232,221,201,0.55);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  cursor: pointer;
  font-family: inherit;
  border-bottom: 2px solid transparent;
}
.ce-tab.active { color: #E8D49E; border-bottom-color: #C9A961; }
.ce-pane {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.ce-pane-desc {
  font-size: 11.5px;
  color: rgba(232,221,201,0.55);
  margin: 0 0 14px;
  line-height: 1.4;
}

.ce-var-group {
  margin-bottom: 18px;
}
.ce-var-group-title {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(201,169,97,0.80);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.ce-var-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(201,169,97,0.12);
  color: rgba(232,221,201,0.90);
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  cursor: pointer;
  margin-bottom: 4px;
  font-family: inherit;
  transition: all 0.12s;
}
.ce-var-btn:hover {
  background: rgba(201,169,97,0.10);
  border-color: rgba(201,169,97,0.40);
  color: #F0E6D2;
}
.ce-var-btn code {
  font-size: 10.5px;
  color: rgba(201,169,97,0.85);
  font-family: monospace;
  display: block;
  margin-top: 2px;
}

/* Preview */
.ce-preview-frame {
  background: #fff;  /* blanco-ok: vista previa de portada, se imprime */
  color: #1a1a1a;
  padding: 24px;
  border-radius: 8px;
  font-family: Georgia, serif;
  font-size: 11px;
  line-height: 1.5;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
  margin-bottom: 12px;
}

/* Templates gallery */
.templates-modal-card {
  max-width: 900px;
  text-align: left;
}
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  margin: 16px 0 20px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 4px;
}
.tpl-card {
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(201,169,97,0.15);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.tpl-card:hover {
  border-color: rgba(201,169,97,0.50);
  background: rgba(201,169,97,0.06);
}
.tpl-card h4 {
  margin: 0 0 4px;
  color: #E8D49E;
  font-size: 14px;
  font-family: 'Michroma', sans-serif;
  font-weight: 400;
  letter-spacing: 0.05em;
}
.tpl-card p {
  margin: 0;
  font-size: 12px;
  color: rgba(232,221,201,0.60);
  line-height: 1.4;
}

/* === Responsive === */
@media (max-width: 768px) {
  .ce-main { grid-template-columns: 1fr; }
  .ce-sidebar { border-left: none; border-top: 1px solid rgba(201,169,97,0.10); max-height: 50vh; }
  .ce-editor { padding: 32px 24px; }
}

/* ============================================================
   SEND FAX — Layout 2 columnas (composer + preview)
   ============================================================ */
.send-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 1100px) {
  .send-layout { grid-template-columns: 1fr; }
  .send-preview-pane { position: static !important; }
}

.send-composer { display: flex; flex-direction: column; gap: 18px; }

.send-section {
  background: rgba(21,20,15,0.55);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  /* overflow visible para que el autocomplete pueda flotar fuera */
}
.ss-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(201,169,97,0.08);
  background: rgba(0,0,0,0.20);
}
.ss-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  color: #050505;
  font-weight: 700;
  font-size: 13px;
}
.ss-title {
  font-family: 'Michroma', sans-serif;
  font-size: 13px;
  letter-spacing: 0.10em;
  color: #E8D49E;
  margin: 0;
  font-weight: 400;
}
.ss-body { padding: 20px 24px 22px; }

/* Recipients */
.recipient-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 12px;
}
.recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.30);
  border-radius: 20px;
  font-size: 12px;
  color: #E8DDC9;
}
.recipient-chip .chip-fax {
  color: rgba(232,221,201,0.55);
  font-size: 11px;
}
.recipient-chip .chip-x {
  cursor: pointer;
  background: none;
  border: none;
  color: rgba(232,221,201,0.50);
  font-size: 16px;
  line-height: 1;
  padding: 0 0 0 4px;
}
.recipient-chip .chip-x:hover { color: #d97070; }
.recipient-add-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.recipient-manual-form {
  margin-top: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,169,97,0.15);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rmf-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

/* Toggle dentro del header de section */
.ss-header-toggle .ss-title { flex: 1; }
.ss-toggle { margin-left: auto; }
.ss-header.collapsed-section { opacity: 0.50; }
.ss-body.cover-disabled {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.4);
}

/* Autocomplete dropdown */
.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 2px);
  background: rgba(17,17,17,0.98);
  border: 1px solid rgba(201,169,97,0.30);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  z-index: 20;
  max-height: 240px;
  overflow-y: auto;
}
.ac-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 12.5px;
  color: rgba(232,221,201,0.85);
  border-bottom: 1px solid rgba(201,169,97,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.highlighted {
  background: rgba(201,169,97,0.08);
  color: #F0E6D2;
}
.ac-item .ac-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-item .ac-count {
  font-size: 10px;
  color: rgba(201,169,97,0.55);
  letter-spacing: 0.05em;
}
.ac-item .ac-remove {
  background: none;
  border: none;
  color: rgba(232,221,201,0.40);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  flex-shrink: 0;
}
.ac-item .ac-remove:hover { color: #d97070; }
.ac-empty {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(232,221,201,0.40);
}

/* Dropzone */
.dropzone {
  border: 2px dashed rgba(201,169,97,0.25);
  border-radius: 10px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(0,0,0,0.20);
}
.dropzone:hover, .dropzone.dragover {
  border-color: rgba(201,169,97,0.55);
  background: rgba(201,169,97,0.04);
}
.dz-text strong {
  display: block;
  color: #E8DDC9;
  font-size: 14px;
  margin-bottom: 6px;
}
.dz-text span {
  display: block;
  color: rgba(232,221,201,0.50);
  font-size: 12px;
}
.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}
.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 8px;
  font-size: 12.5px;
}
.attachment-item .ai-info {
  display: flex; gap: 10px; align-items: center;
  color: #E8DDC9;
  overflow: hidden;
}
.attachment-item .ai-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.attachment-item .ai-size {
  color: rgba(232,221,201,0.50);
  font-size: 11px;
}
.attachment-item .ai-status {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: rgba(201,169,97,0.70);
}
.attachment-item .ai-x {
  background: none;
  border: none;
  color: rgba(232,221,201,0.50);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
}
.attachment-item .ai-x:hover { color: #d97070; }
.attachment-item.uploading { opacity: 0.7; }

/* Submit actions */
.send-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  align-items: center;
}

/* Preview pane (sticky) */
.send-preview-pane {
  position: sticky;
  top: 80px;
  background: rgba(21,20,15,0.55);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  overflow: hidden;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
}
.spp-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(201,169,97,0.08);
  background: rgba(0,0,0,0.20);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.spp-title {
  font-family: 'Michroma', sans-serif;
  font-size: 13px;
  letter-spacing: 0.10em;
  color: #E8D49E;
  margin: 0;
  font-weight: 400;
}
.spp-meta {
  font-size: 11px;
  color: rgba(232,221,201,0.55);
}
.spp-frame {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: #15140f;
}
.spp-paper {
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}
/* Cada página del preview = hoja Letter de ancho completo */
.spp-page-cover {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  background: #fff;  /* blanco-ok: vista previa de pagina */
  color: #1a1a1a;
  font-family: Georgia, serif;
  border-radius: 2px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.35);
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}
/* El contenido del cover se renderiza a tamaño Letter real y se escala al ancho del pane */
.spp-page-cover > .spp-cover-inner {
  width: 816px;
  height: 1056px;
  padding: 56px;
  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.6;
  transform-origin: top left;
  position: absolute;
  top: 0; left: 0;
}
.spp-empty {
  text-align: center;
  padding: 80px 30px;
  color: rgba(232, 221, 201, 0.35);
  font-family: inherit;
  width: 100%;
  aspect-ratio: 8.5 / 11;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(201,169,97,0.20);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 13px;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
}

/* Contact picker modal */
.contact-picker-card {
  max-width: 620px;
  text-align: left;
  padding-bottom: 28px;
}
.contact-picker-card #pickerSearch { margin-top: 8px; }
.picker-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-top: 14px;
  margin-bottom: 24px;
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 10px;
  background: rgba(0,0,0,0.20);
}
.picker-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(201,169,97,0.06);
  cursor: pointer;
  user-select: none;
}
.picker-item:hover { background: rgba(201,169,97,0.05); }
.picker-item:last-child { border-bottom: none; }
.picker-item.selected { background: rgba(201,169,97,0.08); }
.picker-item.already-added {
  opacity: 0.60;
  cursor: not-allowed;
  background: rgba(201,169,97,0.03);
}
.picker-item.already-added:hover { background: rgba(201,169,97,0.03); }
.picker-item .pi-already-badge {
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  color: #050505;
  font-size: 9px;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Actions: wrap si la pantalla es chica */
.picker-actions {
  flex-wrap: wrap;
  gap: 8px;
}

/* Custom checkbox dorado (matching app style) */
.picker-checkbox {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(201,169,97,0.40);
  border-radius: 4px;
  background-color: rgba(0,0,0,0.40);
  background-image: none;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  transition: all 0.15s;
  font-size: 0; /* oculta cualquier render nativo de texto del checkbox */
}
.picker-checkbox:hover {
  border-color: rgba(201,169,97,0.70);
}
.picker-checkbox:checked {
  background-color: transparent;
  background-image: linear-gradient(135deg, #E8D49E, #C9A961);
  border-color: #C9A961;
}
.picker-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #050505;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.picker-item .pi-info { flex: 1; min-width: 0; }
.picker-item .pi-name {
  color: #E8DDC9;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.picker-item .pi-meta {
  color: rgba(232,221,201,0.55);
  font-size: 11.5px;
  margin-top: 2px;
}

/* ============================================================
   SENT PAGE — Status chips + Detail modal
   ============================================================ */
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
  box-sizing: border-box;
}
.status-chip.queued {
  color: #C9A961;
  border-color: rgba(201,169,97,0.45);
  background: rgba(201,169,97,0.08);
  position: relative;
  overflow: hidden;
}
.status-chip.queued::after,
.status-chip.sending::after,
.status-chip.converting::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(232,212,158,0.18),
    transparent);
  animation: chip-shimmer 1.8s ease-in-out infinite;
}
@keyframes chip-shimmer {
  0%   { left: -50%; }
  100% { left: 100%; }
}
.status-chip.sending {
  color: #E8D49E;
  border-color: rgba(232,212,158,0.55);
  background: rgba(232,212,158,0.12);
  position: relative;
  overflow: hidden;
  animation: chip-sending-pulse 1.6s ease-in-out infinite;
}
@keyframes chip-sending-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,212,158,0); }
  50%      { box-shadow: 0 0 0 4px rgba(232,212,158,0.10); }
}
.status-chip.sent {
  color: #C9A961;
  border-color: rgba(201,169,97,0.45);
  background: rgba(201,169,97,0.08);
}
.status-chip.delivered {
  color: #1a1a1a;
  border-color: #C9A961;
  background: linear-gradient(135deg, #E8D49E, #C9A961);
}
.status-chip.partial {
  color: #d99b5a;
  border-color: rgba(217,155,90,0.55);
  background: rgba(217,155,90,0.12);
}
.status-chip.cancelled {
  background: rgba(201,169,97,0.10);
  color: #8A7340;
  border-color: rgba(138,115,64,0.35);
}
.status-chip.failed {
  color: #d97070;
  border-color: rgba(217,112,112,0.55);
  background: rgba(217,112,112,0.12);
}

/* Recipient count badge */
.recipient-count-badge {
  display: inline-block;
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.30);
  color: rgba(201,169,97,0.85);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 6px;
}

/* Sent detail modal */
.sent-detail-card {
  max-width: 820px;
  text-align: left;
  padding: 0 !important;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.sd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(201,169,97,0.10);
  background: rgba(0,0,0,0.20);
}
.sd-header .lfx-modal-title { margin: 0; }
.sd-close {
  background: transparent;
  border: none;
  color: rgba(232,221,201,0.60);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
}
.sd-close:hover { color: #F0E6D2; }
.sd-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
}
.sd-footer {
  padding: 14px 24px;
  border-top: 1px solid rgba(201,169,97,0.10);
  background: rgba(0,0,0,0.20);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Detail sections */
.pdfv-ref-lbl { color: rgba(232,221,201,0.55); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; letter-spacing: normal; }
.pdfv-ref { display: block; color: #9bd64a; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.03em; }
.pdfv-sub { display: block; color: rgba(232,221,201,0.55); font-size: 12px; margin-top: 2px; }
/* Segunda linea dentro de una celda de tabla: el contacto resuelto bajo el
   numero en Recibidos. Mismas medidas que .pdfv-sub. */
.dt-sub { display: block; color: rgba(232,221,201,0.55); font-size: 12px; margin-top: 2px; }
/* Referencia en la MISMA linea que la accion. */
.dt-ref { color: rgba(232,221,201,0.45); font-size: 11px; font-family: 'JetBrains Mono', monospace; margin-left: 8px; white-space: nowrap; }
.sd-faxref-val { color: #9bd64a !important; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.04em; }
.sd-faxref {
  text-align: center;
  padding: 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(201,169,97,0.10) 0%, rgba(201,169,97,0.04) 100%);
  border: 1px solid rgba(201,169,97,0.30);
  border-radius: 10px;
}
.sd-faxref-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #E8D49E;
}
.sd-faxref-hint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(232,221,201,0.55);
}
.sd-section {
  margin-bottom: 22px;
}
.sd-section-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(201,169,97,0.80);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(201,169,97,0.10);
}
.sd-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.sd-info-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sd-info-row .label {
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(232,221,201,0.50);
}
.sd-info-row .value {
  color: #F0E6D2;
  font-size: 13px;
}

.sd-recipient-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 8px;
  margin-bottom: 6px;
}
.sd-recipient-row .sr-info { flex: 1; }
.sd-recipient-row .sr-name { color: #E8DDC9; font-size: 13px; }
.sd-recipient-row .sr-fax {
  color: rgba(232,221,201,0.55);
  font-size: 11px;
}

.sd-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
}
.sd-attachment-row .sa-name {
  color: #E8DDC9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 12px;
}
.sd-attachment-row .sa-size {
  color: rgba(232,221,201,0.55);
  font-size: 11px;
  white-space: nowrap;
}

/* Pagination */
/* Salto directo de pagina. Un "3 / 22" fijo obliga a pulsar Siguiente 19
   veces; escribir el numero resuelve cualquier volumen. */
.pag-jump { display: inline-flex; align-items: center; gap: 6px; }
.pag-input {
  width: 52px; text-align: center;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(201,169,97,0.20);
  border-radius: 7px;
  color: #E8DDC9; font-family: 'JetBrains Mono', monospace; font-size: 12.5px;
  padding: 6px 4px; outline: none;
  transition: border-color 0.15s;
}
.pag-input:focus { border-color: rgba(201,169,97,0.55); background: rgba(0,0,0,0.45); }
.pag-of { color: rgba(232,221,201,0.40); font-size: 12.5px; }
.pag-total { color: rgba(232,221,201,0.70); font-family: 'JetBrains Mono', monospace; font-size: 12.5px; min-width: 22px; }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.pg-btn {
  background: transparent;
  border: 1px solid rgba(201,169,97,0.25);
  color: rgba(232,221,201,0.85);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  letter-spacing: 0.05em;
}
.pg-btn:hover:not(:disabled) {
  background: rgba(201,169,97,0.08);
  border-color: rgba(201,169,97,0.50);
}
.pg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pg-info {
  color: rgba(232,221,201,0.60);
  font-size: 12px;
}

/* ============================================================
   SENT — Toolbar alineada en una fila + padding compacto
   ============================================================ */
.sent-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sent-toolbar .toolbar-search {
  flex: 1;
  min-width: 200px;
}
/* Barra de filtros del registro de actividad. Los botones son .st-tab y el
   desplegable .sent-filter: aqui solo se alinean. */
.audit-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 14px;
  border-bottom: 1px solid rgba(201,169,97,0.10);
}
.audit-views { display: flex; gap: 8px; }
/* El boton activo se marca con el dorado de la paleta, no con subrayado: el
   subrayado es de las pestanas de Settings y confundia los dos niveles. */
.audit-views .btn-secondary-thin.active {
  border-color: rgba(201,169,97,0.55);
  color: #E8D49E;
  background: rgba(201,169,97,0.08);
}
/* La tabla del registro puede ser larga: se limita el alto para que el resto
   de la pestana Security siga siendo alcanzable sin scroll infinito. */
#auditCard .data-table-wrap { max-height: 420px; overflow-y: auto; }
.audit-right { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; flex-shrink: 1; margin-left: auto; }
.audit-right .btn-secondary-thin { white-space: nowrap; flex-shrink: 0; }
/* El desplegable tiene que medir lo mismo que los botones o el flex-wrap lo
   manda a su propia linea y la barra queda partida en dos. */
.audit-toolbar { --audit-h: 36px; }
.audit-right .sent-filter,
.audit-right .lfx-dd { width: 190px; min-width: 190px; max-width: 190px; flex: 0 0 190px; }
/* El texto del boton cambia segun haya filtro; el ancho no. */
#auditReportBtn { width: 168px; flex: 0 0 168px; }
#auditCsvBtn { flex: 0 0 auto; }
/* Los cinco elementos de la barra comparten altura fija. */
.audit-toolbar .btn-secondary-thin,
.audit-right .lfx-dd-trigger {
  height: var(--audit-h);
  padding: 0 16px;
  font-size: 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}
.audit-toolbar .audit-right .lfx-dd-trigger.fld-flat {
  height: var(--audit-h) !important;
  min-height: var(--audit-h) !important;
  padding: 0 34px 0 12px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 8px !important;
  justify-content: space-between;
}
/* Boton destacado sin romper la altura: mismo padding, distinto color. */
.btn-secondary-thin.gold {
  border-color: rgba(201,169,97,0.55);
  color: #E8D49E;
  background: rgba(201,169,97,0.10);
}
.btn-secondary-thin.gold:hover { background: rgba(201,169,97,0.18); border-color: rgba(201,169,97,0.7); }
.audit-toolbar { align-items: center; padding-bottom: 12px; }
/* Las tarjetas del registro reusan .stat-card del dashboard. Solo se ajusta el
   margen y el pie que indica el periodo. */
.audit-stats { margin-bottom: 6px; }
.audit-period { font-size: 11.5px; color: rgba(232,221,201,0.45); margin: 0 0 18px; }

.sent-filter {
  min-width: 200px;
  max-width: 240px;
  flex-shrink: 0;
}

/* Tabla Sent: filas más compactas */
#sentTable tbody td {
  padding: 12px 14px !important;
  vertical-align: middle;
}
#sentTable tbody tr {
  transition: background 0.12s;
}
#sentTable tbody tr:hover {
  background: rgba(201,169,97,0.03);
}

/* Action buttons en fila — consistencia visual */
#sentTable .dt-row-btn {
  font-size: 11px;
  padding: 5px 10px;
}

/* Sent: cursor pointer + badge clickable */
#sentTable tbody tr {
  cursor: pointer;
}
button.recipient-count-badge {
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
button.recipient-count-badge:hover {
  background: rgba(201,169,97,0.20);
  border-color: rgba(201,169,97,0.60);
  color: #F0E6D2;
}

/* Sent: columna checkbox alineada */
#sentTable th.dt-checkbox-col,
#sentTable td.dt-checkbox-col {
  width: 44px;
  text-align: center;
  padding: 0;
}
#sentTable th.dt-checkbox-col .picker-checkbox,
#sentTable td.dt-checkbox-col .picker-checkbox {
  vertical-align: middle;
  margin: 0;
}
#sentTable tbody tr.selected {
  background: rgba(201,169,97,0.06);
}
#sentTable tbody tr.selected:hover {
  background: rgba(201,169,97,0.10);
}

/* Bulk bar (reusable) */

/* Cuando un checkbox tiene BOTH .picker-checkbox + .dt-check, solo .picker-checkbox dibuja el check */
.picker-checkbox.dt-check:checked::after {
  content: '✓' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) rotate(0) !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  background: none !important;
  color: #050505 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}
.picker-checkbox.dt-check:indeterminate::after {
  content: '−' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  height: auto !important;
  border: none !important;
  background: none !important;
  color: #050505 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dash-period-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 4px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 10px;
  width: fit-content;
}
.dash-period-btn {
  background: transparent;
  border: none;
  color: rgba(232,221,201,0.60);
  padding: 7px 18px;
  font-size: 12px;
  letter-spacing: 0.05em;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.dash-period-btn:hover { color: #E8DDC9; }
.dash-period-btn.active {
  background: rgba(201,169,97,0.15);
  color: #E8D49E;
}

/* Stat cards */
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: rgba(21,20,15,0.60);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  padding: 22px 24px;
  transition: all 0.18s;
}
.stat-card:hover {
  border-color: rgba(201,169,97,0.30);
}
.sc-label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(201,169,97,0.75);
  margin-bottom: 12px;
}
.sc-value {
  font-size: 32px;
  color: #F0E6D2;
  font-weight: 300;
  font-family: 'Michroma', sans-serif;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
  line-height: 1;
}
.sc-trend {
  font-size: 11.5px;
  color: rgba(232,221,201,0.55);
}
.sc-trend.positive { color: #C9A961; }
.sc-trend.negative { color: #d97070; }

/* Panels */
.dash-charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.dash-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1200px) {
  .dash-bottom-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .dash-charts-row, .dash-bottom-row { grid-template-columns: 1fr; }
}
.dash-panel {
  background: rgba(21,20,15,0.60);
  border: 1px solid rgba(201,169,97,0.10);
  border-radius: 14px;
  padding: 20px 24px;
}
.dp-title {
  font-size: 12px;
  letter-spacing: 0.15em;
  color: rgba(201,169,97,0.85);
  margin: 0 0 18px;
  text-transform: uppercase;
  font-family: 'Michroma', sans-serif;
  font-weight: 400;
}




/* Status breakdown */
.status-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
}
.sb-label { width: 80px; color: rgba(232,221,201,0.65); letter-spacing: 0.05em; }
.sb-bar-wrap {
  flex: 1;
  height: 22px;
  background: rgba(0,0,0,0.40);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.sb-bar-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  border-radius: 4px;
  transition: width 0.4s ease-out;
}
.sb-bar-fill.queued { background: rgba(201,169,97,0.30); }
.sb-bar-fill.sent { background: rgba(201,169,97,0.55); }
.sb-bar-fill.delivered { background: linear-gradient(135deg, #E8D49E, #C9A961); }
.sb-bar-fill.failed { background: rgba(180,55,55,0.50); }
/* partial: transmitio parte y se facturo — ni exito ni fallo */
.sb-bar-fill.partial { background: rgba(217,168,112,0.55); }
/* cancelled: nunca se intento — neutro, no penaliza */
.sb-bar-fill.cancelled { background: rgba(160,160,160,0.30); }
.sb-count {
  width: 36px;
  text-align: right;
  color: #E8DDC9;
  font-weight: 600;
}

/* Recent list */
.dash-recent-list, .dash-top-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dr-item {
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,169,97,0.08);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.12s;
}
.dr-item:hover {
  background: rgba(201,169,97,0.04);
  border-color: rgba(201,169,97,0.20);
}
.dr-info { flex: 1; min-width: 0; overflow: hidden; }
.dr-recipient {
  color: #E8DDC9;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dr-subject {
  color: rgba(232,221,201,0.50);
  font-size: 11.5px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dr-meta {
  text-align: right;
  flex-shrink: 0;
}
.dr-status { margin-bottom: 4px; }
.dr-date {
  font-size: 10.5px;
  color: rgba(232,221,201,0.45);
}

.dt-item {
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(201,169,97,0.08);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dt-name { color: #E8DDC9; font-size: 13px; }
.dt-company { color: rgba(232,221,201,0.50); font-size: 11px; margin-top: 2px; }
.dt-count {
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  color: #050505;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
}

.dash-empty {
  text-align: center;
  padding: 24px;
  color: rgba(232,221,201,0.40);
  font-size: 12px;
}

/* Modal sin icono: ajustar padding-top */
.lfx-modal-card .lfx-modal-icon:empty,
.lfx-modal-card .lfx-modal-icon[hidden] {
  display: none;
}

/* Inline error en manual form (badge al lado de los botones) */
.rmf-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* Inline error badge — mismo estilo que lfx-inline-toast con fade out */



/* Inline error badge — idéntico a lfx-inline-toast (mismo fade, misma estructura) */
.rmf-error {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  border: 1px solid transparent;
  color: transparent;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s, color 0.2s, background 0.2s;
  pointer-events: none;
  margin-right: 8px;
  height: 41px;
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
}
.rmf-error.show {
  opacity: 1;
  transform: translateX(0);
  background: rgba(180,55,55,0.06);
  border-color: rgba(180,55,55,0.30);
  color: rgba(217,112,112,0.90);
}

/* Mirror chart — diseño limpio con línea central */
.chart-legend {
  display: flex;
  gap: 24px;
  font-size: 11px;
  margin: 0 0 18px;
  letter-spacing: 0.12em;
}
.chart-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chart-legend .legend-text {
  color: rgba(232,221,201,0.55);
  text-transform: uppercase;
}
.chart-legend .legend-count {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: 'Michroma', sans-serif;
  margin-left: 2px;
}
.chart-legend .legend-item:nth-child(1) .legend-count { color: #d97070; }
.chart-legend .legend-item:nth-child(2) .legend-count { color: #E8D49E; }
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.legend-dot.received {
  background: linear-gradient(180deg, rgba(217,112,112,0.55), rgba(217,112,112,0.20));
  border: 1px solid rgba(217,112,112,0.40);
}
.legend-dot.sent {
  background: linear-gradient(180deg, rgba(201,169,97,0.55), rgba(201,169,97,0.20));
  border: 1px solid rgba(201,169,97,0.40);
}

.chart-bars {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 220px;
  padding: 36px 0 28px; /* +14px arriba para que el tooltip tenga espacio sobre la barra más alta */
  position: relative;
  box-sizing: border-box;
}
/* Línea central horizontal */
.chart-bars::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(201,169,97,0.18);
  pointer-events: none;
  z-index: 0;
}

.cb-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  z-index: 1;
}
/* Mitad superior: received (crece hacia arriba desde el centro) */
.cb-half-top {
  height: 50%;
  display: flex;
  align-items: flex-end;
  position: relative;
}
/* Mitad inferior: sent (crece hacia abajo desde el centro) */
.cb-half-bottom {
  height: 50%;
  display: flex;
  align-items: flex-start;
  position: relative;
}
.cb-bar {
  width: 100%;
  transition: all 0.15s;
}
.cb-bar.received {
  background: linear-gradient(0deg, rgba(217,112,112,0.85) 0%, rgba(217,112,112,0.50) 100%);
  border: 1px solid rgba(217,112,112,0.55);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}
.cb-bar.sent {
  background: linear-gradient(180deg, rgba(232,212,158,0.85) 0%, rgba(201,169,97,0.50) 100%);
  border: 1px solid rgba(201,169,97,0.55);
  border-top: none;
  border-radius: 0 0 3px 3px;
}
.cb-col[data-has-sent="1"] .cb-bar.sent { min-height: 6px; }
.cb-col[data-has-recv="1"] .cb-bar.received { min-height: 6px; }
.cb-col:hover .cb-bar.received {
  background: linear-gradient(0deg, #ff8585 0%, #d97070 100%);
  border-color: #d97070;
}
.cb-col:hover .cb-bar.sent {
  background: linear-gradient(180deg, #F0DEA8 0%, #E8D49E 100%);
  border-color: #E8D49E;
}
/* Valores arriba y abajo de cada columna (solo en hover) */
.cb-value {
  position: absolute;
  font-size: 9.5px;
  color: rgba(232,221,201,0.55);
  opacity: 0;
  transition: opacity 0.12s;
  font-weight: 600;
  white-space: nowrap;
  left: 50%;
  transform: translateX(-50%);
}
.cb-value.top-val {
  top: -16px;
  color: #d97070;
}
.cb-value.bottom-val {
  bottom: -16px;
  color: #E8D49E;
}
.cb-col:hover .cb-value { opacity: 1; }

/* Etiquetas de fecha */
.cb-label {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(232,221,201,0.55);
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}




/* Wrapper del chart: contiene totals + legend + chart-bars */
.chart-wrap {
  width: 100%;
  display: block;
}



/* Solo mostrar números si la barra es suficientemente alta */
.cb-bar { min-height: 0; }


/* Tooltip flotante en hover — posicionado JUSTO encima de la barra (no del panel) */
.cb-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  background: rgba(17,17,17,0.96);
  border: 1px solid rgba(201,169,97,0.40);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 10.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
  font-weight: 700;
}
.cb-tooltip .ct-r { color: #d97070; }
.cb-tooltip .ct-s { color: #E8D49E; }
.cb-tooltip .ct-sep { color: rgba(232,221,201,0.30); margin: 0 6px; font-weight: 400; }
.cb-col:hover .cb-tooltip { opacity: 1; }

/* La columna debe permitir overflow para el tooltip */
.cb-col { position: relative; overflow: visible; }
.cb-half-top, .cb-half-bottom { overflow: visible; }


/* Volume slider en Settings */
.volume-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  margin-top: 4px;
}
.vol-label {
  font-size: 12.5px;
  color: rgba(232,221,201,0.75);
  min-width: 80px;
}
.vol-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(201,169,97,0.20);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.30);
}
.vol-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.30);
}
.vol-value {
  font-size: 12px;
  color: #C9A961;
  min-width: 40px;
  text-align: right;
  font-weight: 600;
}

/* --- Contador de contactos en subtitle --- */
.page-sub-divider { opacity: 1; color: rgba(232,221,201,0.70); margin: 0 .35em; font-size: 1.1em; }
.page-sub-count {
  font-variant-numeric: tabular-nums;
  color: var(--gold, #C9A961);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.page-sub-count::after {
  content: attr(data-suffix);
  margin-left: .35em;
  color: rgba(232, 221, 201, .55);
  font-weight: 400;
}

/* ============================================================
   RESPONSIVE — Mobile / iPad / Tablet (2026-05-15)
   Bloque consolidado al final para garantizar precedencia
   ============================================================ */

/* === TABLET (iPad portrait y abajo) === */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .app-main {
    grid-column: 1 !important;
    margin-left: 0 !important;
    width: 100% !important;
  }
  .topbar-toggle { display: flex !important; }

  /* Overlay cuando el sidebar esta abierto */
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
  }
  .sidebar.open ~ .sidebar-backdrop,
  body.sidebar-open .sidebar-backdrop { display: block; }
}

/* === MOBILE (phones) === */
@media (max-width: 640px) {
  /* Contenido con padding razonable */
  .app-content { padding: 16px 14px !important; }
  .topbar { padding: 0 14px !important; height: 56px; }

  /* Page title que no se corte */
  .page-title {
    font-size: 22px !important;
    letter-spacing: 0.05em !important;
    word-break: break-word;
  }
  .page-sub { font-size: 13px; }

  /* Toolbars: apilar todo */
  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .toolbar-search { min-width: 0 !important; width: 100%; }
  .toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .toolbar-actions .btn-secondary-thin,
  .toolbar-actions .btn-gold-thin {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    text-align: center;
    padding: 10px 14px;
    font-size: 11px;
  }

  /* Bulk bar inline */
  .bulk-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Dashboard cards: 1 columna */
  .dash-grid,
  .dash-cards,
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .stat-card {
    padding: 18px !important;
  }

  /* Period selector (7/30/90 dias) compacto */
  .period-tabs button,
  .dash-period-btn {
    padding: 10px 16px !important;
    font-size: 11px;
  }

  /* Chart bars: labels mas chicos en mobile */
  .cb-label { font-size: 9px !important; }

  /* Tablas: scroll horizontal cuando hace falta */
  .table-wrap, .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Modals: ocupar casi toda la pantalla */
  .modal-card,
  .modal-content {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 12px auto;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  /* Forms en modales: 1 columna */
  .form-row-2,
  .form-row-3 {
    grid-template-columns: 1fr !important;
  }

  /* Send page: composer y preview apilados */
  .send-layout {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .send-preview-pane {
    position: static !important;
    max-height: 50vh;
  }

  /* Login (por si entran desde phone) */
  .login-card { padding: 28px 20px !important; max-width: 92vw !important; }

  /* Brand text en topbar */
  .ap-brand,
  .topbar-title {
    font-size: 15px !important;
    letter-spacing: 0.08em !important;
  }
}

/* === SMALL MOBILE (< 380px, iPhone SE 1st gen, etc) === */
@media (max-width: 380px) {
  .toolbar-actions .btn-secondary-thin,
  .toolbar-actions .btn-gold-thin {
    flex: 1 1 100%;
  }
  .page-title { font-size: 19px !important; }
  .stat-card .big-num,
  .stat-num { font-size: 32px !important; }
}

/* === TOUCH: aumentar targets en todos los devices touch === */
@media (hover: none) and (pointer: coarse) {
  .nav-item,
  .tb-tab,
  .btn-secondary-thin,
  .btn-gold-thin,
  .bulk-actions button {
    min-height: 44px;
  }
}

/* --- Boton clear (X) en autocomplete fields --- */
.autocomplete-wrap { position: relative; }
.fld-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(232,221,201,0.40);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  z-index: 5;
  transition: color 0.15s, background 0.15s;
  display: none;
}
.fld-clear-btn:hover {
  color: #d97070;
  background: rgba(217,112,112,0.10);
}
.fld-clear-btn.visible { display: inline-flex; align-items: center; justify-content: center; }
/* Para textarea: posicionar arriba derecha en lugar de centrado */
.autocomplete-wrap textarea + .fld-clear-btn {
  top: 32px;
  transform: none;
}
/* Padding derecho para no superponerse con el texto */
.autocomplete-wrap .fld-flat { padding-right: 32px; }

/* --- Header del autocomplete dropdown con Clear All --- */
.ac-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(201,169,97,0.15);
  background: rgba(201,169,97,0.04);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ac-header-count {
  color: rgba(232,221,201,0.55);
  font-weight: 500;
}
.ac-clear-all {
  background: none;
  border: 1px solid rgba(217,112,112,0.25);
  color: rgba(217,112,112,0.85);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.15s;
}
.ac-clear-all:hover {
  background: rgba(217,112,112,0.10);
  border-color: rgba(217,112,112,0.50);
  color: #d97070;
}

/* --- Sidebar badge (faxes recibidos no leidos) --- */
.nav-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  color: #050505;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  box-shadow: 0 0 12px rgba(201,169,97,0.4);
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 8px rgba(201,169,97,0.4); }
  50% { box-shadow: 0 0 16px rgba(201,169,97,0.7); }
}

/* Filas Received clickeables */
#receivedTbody tr { cursor: pointer; transition: background 0.15s; }
#receivedTbody tr:hover { background: rgba(201,169,97,0.04); }

/* Status breakdown: barra received en rosado/burgundy igual que el chart */
.sb-bar-fill.received {
  background: linear-gradient(90deg, #B85C5C, #D48383);
}
.sb-bar-fill.sending {
  background: linear-gradient(90deg, #C9A961, #E8D49E);
  opacity: 0.6;
}

/* Recent faxes: badges direccion */
.dr-dir-badge {
  display: inline-block;
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 8px;
  font-weight: 700;
  vertical-align: middle;
}
.dr-dir-badge.inbound {
  background: rgba(184,92,92,0.18);
  color: #D48383;
  border: 1px solid rgba(184,92,92,0.4);
}
.dr-dir-badge.outbound {
  background: rgba(201,169,97,0.15);
  color: #C9A961;
  border: 1px solid rgba(201,169,97,0.4);
}
/* Status chip 'received' (igual color que el badge inbound) */
.status-chip.received {
  background: rgba(184,92,92,0.18);
  color: #D48383;
  border: 1px solid rgba(184,92,92,0.4);
}

/* ============================================================
   LFX FAX TOAST — Premium branded notification (in-app)
   ============================================================ */
.lfx-fax-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}
.lfx-fax-toast {
  pointer-events: all;
  background: linear-gradient(135deg, rgba(17,17,17,0.95) 0%, rgba(25,20,15,0.95) 100%);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(201,169,97,0.35);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,169,97,0.10);
  padding: 14px 36px 14px 16px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: lfxToastSlide 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: transform 0.2s, opacity 0.2s;
  min-width: 320px;
}
.lfx-fax-toast:hover {
  transform: translateX(-4px) scale(1.02);
  border-color: rgba(201,169,97,0.6);
}
.lfx-fax-toast.closing {
  animation: lfxToastSlideOut 0.25s ease-in forwards;
}
@keyframes lfxToastSlide {
  from { transform: translateX(420px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes lfxToastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(420px); opacity: 0; }
}
.lfx-toast-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(201,169,97,0.4);
}
.lfx-toast-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.lfx-toast-icon.received {
  background: linear-gradient(135deg, #D48383, #B85C5C);
  box-shadow: 0 4px 12px rgba(184,92,92,0.4);
}
.lfx-toast-icon.failed {
  background: linear-gradient(135deg, #d97070, #a04848);
  box-shadow: 0 4px 12px rgba(217,112,112,0.4);
}
.lfx-toast-content {
  flex: 1;
  min-width: 0;
}
.lfx-toast-brand {
  font-family: 'Michroma', sans-serif;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #C9A961;
  text-transform: uppercase;
  margin-bottom: 3px;
  font-weight: 400;
}
.lfx-toast-title {
  font-size: 14px;
  font-weight: 600;
  color: #F0E6D2;
  margin-bottom: 3px;
  line-height: 1.25;
}
.lfx-toast-body {
  font-size: 12.5px;
  color: rgba(232,221,201,0.75);
  line-height: 1.35;
  word-wrap: break-word;
}
.lfx-toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: rgba(232,221,201,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.lfx-toast-close:hover {
  color: #F0E6D2;
  background: rgba(255,255,255,0.05);
}
.lfx-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #E8D49E, #C9A961);
  border-radius: 0 0 14px 14px;
  animation: lfxToastProgress var(--toast-duration, 6s) linear forwards;
}
.lfx-toast-progress.received {
  background: linear-gradient(90deg, #D48383, #B85C5C);
}
.lfx-toast-progress.failed {
  background: linear-gradient(90deg, #d97070, #a04848);
}
@keyframes lfxToastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}
@media (max-width: 480px) {
  .lfx-fax-toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .lfx-fax-toast { min-width: 0; }
}


/* Toast body: numero destacado en dorado */
.lfx-toast-body strong {
  color: #E8D49E;
  font-weight: 600;
  font-size: 13px;
}
.lfx-toast-body br {
  display: block;
  content: "";
  margin-top: 2px;
}


/* ============================================================
   TRASH PAGE — additions (uses existing .data-table, .toolbar-tabs, .bulk-bar)
   ============================================================ */
.tb-tab-count {
  display: inline-block;
  background: rgba(201, 169, 97, 0.12);
  color: rgba(232, 221, 201, 0.85);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
  min-width: 20px;
  text-align: center;
}
.tb-tab.active .tb-tab-count {
  background: rgba(201, 169, 97, 0.22);
  color: var(--gold, #c9a961);
}

.trash-row-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(201,169,97,0.30);
  color: rgba(232,221,201,0.80);
  background: transparent;
}
.trash-row-type.outbound,
.trash-row-type.inbound {
  color: rgba(232,221,201,0.80);
  border-color: rgba(201,169,97,0.30);
}

.trash-purge-soon {
  color: #d97070;
  font-weight: 600;
}
.trash-purge-today {
  color: #d97070;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.trash-row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.trash-row-actions button {
  background: transparent;
  border: 1px solid rgba(201, 169, 97, 0.25);
  color: rgba(232, 221, 201, 0.85);
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.trash-row-actions button:hover {
  border-color: var(--gold, #c9a961);
  color: var(--gold, #c9a961);
}
.trash-row-actions button.danger:hover {
  border-color: #d97070;
  color: #d97070;
}
.trash-row-actions button i { font-size: 14px; }

.trash-empty-state {
  text-align: center;
  padding: 80px 20px;
  color: rgba(232, 221, 201, 0.5);
}
.trash-empty-state i {
  font-size: 56px;
  opacity: 0.25;
  margin-bottom: 16px;
  display: block;
}
.trash-empty-state h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 8px;
  color: rgba(232, 221, 201, 0.85);
}
.trash-empty-state p {
  font-size: 13px;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ============================================================
   SELECT custom theming (premium dark + gold, invertido al hover)
   ============================================================ */
select.fld-flat {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23C9A961' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  cursor: pointer;
  accent-color: #C9A961;
  color-scheme: dark;
  forced-color-adjust: none;
}
select.fld-flat:hover { border-color: rgba(201,169,97,0.30); }
select.fld-flat:focus {
  border-color: rgba(201,169,97,0.55);
  background-color: rgba(0,0,0,0.45);
  outline: none;
}

/* Opciones base */
select.fld-flat option {
  background-color: #111111;
  color: #E8DDC9;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  forced-color-adjust: none;
}

/* Hover/selected: fondo oro, texto oscuro, MISMO weight (sin bold) */
select.fld-flat option:hover,
select.fld-flat option:focus,
select.fld-flat option:active,
select.fld-flat option:checked,
select.fld-flat option[selected] {
  background: #C9A961 !important;
  background-color: #C9A961 !important;
  color: #0a0a0a !important;
  -webkit-text-fill-color: #0a0a0a !important;
  font-weight: 400 !important;
  box-shadow: 0 0 10px 100px #C9A961 inset !important;
  forced-color-adjust: none !important;
}

/* Opciones del dropdown: base oscuro + texto oro pálido */
select.fld-flat option {
  background-color: #111111;
  color: #E8DDC9;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  forced-color-adjust: none;
}

/* Hover y selected: INVERTIR - fondo dorado, texto oscuro */
select.fld-flat option:hover,
select.fld-flat option:focus,
select.fld-flat option:active,
select.fld-flat option:checked,
select.fld-flat option[selected] {
  background: #C9A961 !important;
  background-color: #C9A961 !important;
  color: #0a0a0a !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px 100px #C9A961 inset !important;
}

/* Firefox: estilizar option text color cuando esta seleccionado */
select.fld-flat option:checked {
  box-shadow: 0 0 10px 100px rgba(201,169,97,0.20) inset;
}

/* ============================================================
   LFX CUSTOM DROPDOWN — premium dark + gold
   ============================================================ */
.lfx-dd {
  position: relative;
  display: inline-block;
  width: 100%;
}
.lfx-dd-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  /* hereda fld-flat: padding, border, background, etc */
}
.lfx-dd-trigger:hover {
  border-color: rgba(201,169,97,0.30);
}
.lfx-dd-open .lfx-dd-trigger,
.lfx-dd-trigger:focus {
  border-color: rgba(201,169,97,0.55);
  background-color: rgba(0,0,0,0.45);
  outline: none;
}
.lfx-dd-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #E8DDC9;
}
.lfx-dd-arrow {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  color: rgba(201,169,97,0.75);
  transition: transform 0.15s ease;
}
.lfx-dd-open .lfx-dd-arrow {
  transform: rotate(180deg);
}
.lfx-dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #111111;
  border: 1px solid rgba(201,169,97,0.30);
  border-radius: 10px;
  max-height: 440px;
  overflow-y: auto;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s linear 0.12s;
  /* Cuando cerrado, no contribuir al scrollHeight del padre */
  pointer-events: none;
  height: 0;
  padding: 0;
  border: none;
}
.lfx-dd-open .lfx-dd-menu {
  pointer-events: auto;
  height: auto;
  padding: 6px 0;
  border: 1px solid rgba(201,169,97,0.30);
}
.lfx-dd-open .lfx-dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0s;
}
.lfx-dd-flip .lfx-dd-menu {
  top: auto;
  bottom: calc(100% + 4px);
  transform: translateY(4px);
}
.lfx-dd-flip.lfx-dd-open .lfx-dd-menu {
  transform: translateY(0);
}
.lfx-dd-option {
  padding: 10px 14px;
  cursor: pointer;
  color: #E8DDC9;
  font-size: 13px;
  letter-spacing: 0.03em;
  user-select: none;
  outline: none;
  transition: background-color 0.1s ease, color 0.1s ease;
}
.lfx-dd-option:hover,
.lfx-dd-option:focus {
  background: rgba(201,169,97,0.12);
  color: #E8D49E;
}
.lfx-dd-option.selected {
  background: #C9A961;
  color: #0a0a0a;
}
.lfx-dd-option.selected:hover,
.lfx-dd-option.selected:focus {
  background: #D4B870;
  color: #0a0a0a;
}
.lfx-dd-disabled .lfx-dd-trigger {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Scrollbar del menu */
.lfx-dd-menu::-webkit-scrollbar {
  width: 6px;
}
.lfx-dd-menu::-webkit-scrollbar-track {
  background: transparent;
}
.lfx-dd-menu::-webkit-scrollbar-thumb {
  background: rgba(201,169,97,0.25);
  border-radius: 3px;
}
.lfx-dd-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(201,169,97,0.40);
}


/* Arreglar: el wrap debe heredar comportamiento flex/sizing del select reemplazado */
.toolbar .lfx-dd,
.sent-toolbar .lfx-dd {
  min-width: 200px;
  max-width: 240px;
  flex-shrink: 0;
  width: auto;
}
/* Asegurar que el wrap NO ocupe 100% por default si esta en flexbox */
.lfx-dd {
  vertical-align: top;
}


/* Trigger del dropdown: matchear exactamente altura/padding de .fld-flat */
.lfx-dd-trigger.fld-flat {
  padding: 12px 14px;
  padding-right: 36px;
  line-height: 1.4;
  height: auto;
  min-height: 0;
  font-size: 13.5px;
}
.lfx-dd-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 0;
  pointer-events: none;
}
.lfx-dd-open .lfx-dd-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* ============================================================
   DASHBOARD ACCOUNT BANNER
   ============================================================ */
.dash-account-banner {
  display: grid;
  grid-template-columns: 1.6fr 1.4fr 1fr 1fr 1.1fr;
  gap: 20px;
  padding: 20px 28px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(201,169,97,0.08), rgba(201,169,97,0.02));
  border: 1px solid rgba(201,169,97,0.20);
  border-radius: 14px;
}
.dab-section { display: flex; flex-direction: column; gap: 4px; }
.dab-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(201,169,97,0.75);
}
.dab-value {
  font-size: 16px;
  color: #F0E6D2;
  font-weight: 500;
  line-height: 1.25;
}
.dab-sub {
  font-size: 11.5px;
  color: rgba(232,221,201,0.50);
  margin-top: 2px;
}
.dab-plan-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(201,169,97,0.18);
  color: #E8D49E;
  border: 1px solid rgba(201,169,97,0.35);
}
.dab-plan-badge.dev {
  background: rgba(126,211,33,0.12);
  color: #9bd64a;
  border-color: rgba(126,211,33,0.30);
}
@media (max-width: 900px) {
  .dash-account-banner { grid-template-columns: 1fr 1fr; gap: 16px; }
}
@media (max-width: 600px) {
  .dash-account-banner { grid-template-columns: 1fr; }
}

/* ============================================================
   FORGOT PASSWORD / RESET PASSWORD
   ============================================================ */


.login-forgot-link:hover {
  color: #E8D49E;
  text-decoration: underline;
}
.login-success-box {
  margin-top: 24px;
  padding: 24px 20px;
  background: rgba(201,169,97,0.06);
  border: 1px solid rgba(201,169,97,0.20);
  border-radius: 10px;
  text-align: center;
}
.login-success-box .success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E8D49E 0%, #C9A961 50%, #8A7340 100%);
  color: #0a0a0a;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
}
.login-success-box p {
  color: rgba(232,221,201,0.85);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 14px 0;
}

/* ===== FORGOT/RESET SCREEN TEXT STYLES ===== */
#forgotScreen .brand-tagline,
#resetScreen .brand-tagline {
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
  color: rgba(232,221,201,0.65);
}

#resetScreen #resetEmailHint {
  color: rgba(201,169,97,0.85);
  font-size: 12px;
  text-align: center;
  margin: -8px 0 22px;
  letter-spacing: 0.02em;
}

#resetScreen #resetLoading p,
#resetScreen #resetInvalid p {
  color: rgba(232, 221, 201, 0.65);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

#resetScreen #resetInvalid h3,
#resetScreen #resetSuccess h3 {
  font-family: 'Michroma', Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin: 12px 0 10px;
  text-align: center;
}

#resetScreen #resetInvalid h3 { color: #E8A5A5; }
#resetScreen #resetSuccess h3 { color: #E8D49E; }

#resetScreen #resetSuccess p {
  color: rgba(232,221,201,0.72);
  font-size: 13px;
  text-align: center;
  margin: 0 0 22px;
  line-height: 1.5;
}

/* Botones "anchor" que parecen botón */
#resetScreen a.btn-login,
#forgotScreen a.btn-login {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Autofill fix para forgotEmail / resetNewPassword / resetConfirmPassword ===== */
#forgotEmail:-webkit-autofill,
#resetNewPassword:-webkit-autofill,
#resetConfirmPassword:-webkit-autofill,
#forgotEmail:-webkit-autofill:hover,
#forgotEmail:-webkit-autofill:focus,
#resetNewPassword:-webkit-autofill:hover,
#resetNewPassword:-webkit-autofill:focus,
#resetConfirmPassword:-webkit-autofill:hover,
#resetConfirmPassword:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(17,17,17,0.95) inset !important;
  -webkit-text-fill-color: #E8D49E !important;
  caret-color: #E8D49E !important;
  background-color: transparent !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ===== Reset screen — "Your username" pill ===== */
.reset-username-box {
  background: rgba(201,169,97,0.08);
  border: 1px solid rgba(201,169,97,0.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 22px;
  text-align: center;
}
.reset-username-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(201,169,97,0.7);
  margin-bottom: 6px;
  font-weight: 600;
}
.reset-username-value {
  font-family: 'JetBrains Mono', 'Menlo', 'Consolas', monospace;
  font-size: 16px;
  color: #E8D49E;
  letter-spacing: 0.04em;
  font-weight: 500;
  word-break: break-all;
}

/* ===== Login support footer ===== */
.login-support-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(201,169,97,0.1);
  text-align: center;
  font-size: 11.5px;
  color: rgba(232,221,201,0.55);
  letter-spacing: 0.02em;
}
.login-support-footer a {
  color: rgba(201,169,97,0.85);
  text-decoration: none;
  margin-left: 6px;
  transition: color 0.15s;
}
.login-support-footer a:hover {
  color: #E8D49E;
  text-decoration: underline;
}

/* ===== Fix: link "Forgot username or password?" muy largo en ES ===== */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 18px;
}
.form-row .remember {
  flex: 0 0 auto;
}
.form-row .forgot-link {
  flex: 0 1 auto;
  text-align: right;
  font-size: 12.5px;
  white-space: normal;
  line-height: 1.35;
}
@media (max-width: 480px) {
  .form-row .forgot-link {
    flex: 1 0 100%;
    text-align: left;
    margin-top: 4px;
  }
}

/* ===== Fix: forgot/reset screens deben centrarse igual que login ===== */
#forgotScreen.login-container,
#resetScreen.login-container {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}

/* ===== Lang switcher dentro de forgot/reset (sin necesidad de volver al login) ===== */
#forgotScreen .lang-row,
#resetScreen .lang-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(201,169,97,0.1);
}

/* ===== Link "Forgot username or password?" más compacto para caber en una línea ===== */
.form-row .forgot-link {
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
  line-height: 1.4;
}
.form-row .remember,
.form-row .remember-label {
  font-size: 11px !important;
  letter-spacing: 0.02em !important;
}

/* ===== Fix scroll en reset/forgot: no forzar 100vh, usar padding flexible ===== */
#forgotScreen.login-container,
#resetScreen.login-container {
  min-height: auto;
  padding: 24px;
}
/* Sólo centrar cuando hay espacio */
@media (min-height: 700px) {
  #forgotScreen.login-container,
  #resetScreen.login-container {
    min-height: 100vh;
  }
}

/* Compactar el resetScreen */
#resetScreen .login-card {
  padding: 36px 36px 28px;
}
#resetScreen .login-header {
  margin-bottom: 22px;
}
#resetScreen .reset-username-box {
  padding: 10px 14px;
  margin-bottom: 18px;
}
#resetScreen .reset-username-value {
  font-size: 14px;
}
#resetScreen .form-group {
  margin-bottom: 14px;
}
#resetScreen .lang-row {
  margin-top: 18px;
  padding-top: 14px;
}

/* Ojito del password toggle en reset */
#resetScreen .fld {
  position: relative;
}
#resetScreen .fld-icon-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(201,169,97,0.5);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s;
}
#resetScreen .fld-icon-toggle:hover {
  color: #E8D49E;
}

/* ===== FORCE CENTER reset/forgot screens (override anterior) ===== */
#forgotScreen.login-container,
#resetScreen.login-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  min-height: 100vh !important;
  width: 100vw !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  margin: 0 !important;
  z-index: 100;
  overflow-y: auto;
}
#forgotScreen[hidden],
#resetScreen[hidden] {
  display: none !important;
}

/* ===== Fix botones "anchor as button" en reset/forgot — text-transform + letter-spacing ===== */
#resetScreen a.btn-login,
#forgotScreen a.btn-login,
#resetScreen #resetSubmitBtn,
#forgotScreen #forgotBtn {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
}

/* ============================================================
   F3-B4: Signup + verify email screens
   ============================================================ */
.signup-prompt {
  text-align: center;
  margin: 18px 0 0;
  font-size: 13px;
  color: rgba(232,221,201,0.55);
}
.signup-prompt span {
  margin-right: 6px;
}
.signup-prompt .forgot-link {
  font-weight: 500;
}

.signup-tos {
  text-align: center;
  font-size: 11px;
  color: rgba(232,221,201,0.45);
  margin: 18px 0 0;
  line-height: 1.5;
}
.signup-tos a {
  color: rgba(232,212,158,0.85);
  text-decoration: none;
  border-bottom: 1px dotted rgba(232,212,158,0.4);
}
.signup-tos a:hover {
  color: #E8D49E;
  border-bottom-color: rgba(232,212,158,0.8);
}

/* (Removed: now uses lfx-dd via dropdown.js) */

/* Success icon variant for signup (envelope) */
#signupSuccess .success-icon {
  font-size: 42px;
  color: #E8D49E;
}

/* ============================================================
   Login screen — signup + back to homepage prompts (refinements)
   ============================================================ */
.signup-prompt {
  font-weight: 400;
}
/* Mejor espaciado entre prompts */
.login-form .signup-prompt + .signup-prompt {
  margin-top: 4px;
}
/* Back to homepage: peso más ligero, color dorado original */
.login-form .signup-prompt + .signup-prompt .forgot-link {
  font-weight: 300;
}

/* Verify loading icon — rotación mientras verifica */
#verifyIcon {
  display: inline-block;
  font-size: 36px;
  transition: font-size 0.3s ease, color 0.3s ease;
}
#verifySuccess:not(.verified) #verifyIcon {
  animation: lfx-verify-spin 1.2s linear infinite;
  color: #E8D49E;
}
@keyframes lfx-verify-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Cuando verifica → checkmark dorado con pop, sin glare */
#verifySuccess.verified #verifyIcon {
  font-size: 56px;
  color: #E8D49E;
  animation: lfx-verify-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 0 14px rgba(232, 212, 158, 0.55));
}
@keyframes lfx-verify-pop {
  0%   { transform: scale(0.2); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
  80%  { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* ============================================================
   Password strength meter + match indicator (signup) — single bar
   ============================================================ */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pw-strength-bars {
  position: relative;
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.pw-bar {
  display: none;  /* old 3-bar layout disabled */
}
.pw-strength-bars::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.35s ease, background 0.35s ease;
  background: linear-gradient(90deg, #9B6F58 0%, #B08D7A 30%, #D4B98A 65%, #F5DFA8 100%);
  box-shadow: 0 0 8px rgba(232, 212, 158, 0.35);
}
.pw-strength[data-score="1"] .pw-strength-bars::after { width: 33%; }
.pw-strength[data-score="2"] .pw-strength-bars::after { width: 66%; }
.pw-strength[data-score="3"] .pw-strength-bars::after { width: 100%; }

.pw-strength-label {
  min-width: 50px;
  text-align: right;
  font-weight: 400;
  color: rgba(232, 212, 158, 0.55);
}
.pw-strength[data-score="1"] .pw-strength-label { color: rgba(176, 141, 122, 0.95); }
.pw-strength[data-score="2"] .pw-strength-label { color: rgba(212, 185, 138, 0.95); }
.pw-strength[data-score="3"] .pw-strength-label { color: #F5DFA8; }

/* Match indicator — sin checkmark, color dorado de la app cuando ok */
.pw-match {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.pw-match[data-match="ok"] { color: rgba(232, 212, 158, 0.75); }
.pw-match[data-match="no"] { color: #E8A5A5; }

/* Strength bars: gradient rose gold → champagne → bright gold */
.pw-strength[data-score="1"] .pw-bar:nth-child(1) { background: #B08D7A; }  /* rose gold */
.pw-strength[data-score="2"] .pw-bar:nth-child(1) { background: #B08D7A; }  /* rose gold */
.pw-strength[data-score="2"] .pw-bar:nth-child(2) { background: #D4B98A; }  /* champagne */
.pw-strength[data-score="3"] .pw-bar:nth-child(1) { background: #B08D7A; }  /* rose gold */
.pw-strength[data-score="3"] .pw-bar:nth-child(2) { background: #D4B98A; }  /* champagne */
.pw-strength[data-score="3"] .pw-bar:nth-child(3) { background: #E8D49E; }  /* bright gold */
.pw-strength-label {
  min-width: 50px;
  text-align: right;
  font-weight: 400;
  color: rgba(232, 212, 158, 0.55);
}
.pw-strength[data-score="1"] .pw-strength-label { color: rgba(138, 111, 61, 0.9); }
.pw-strength[data-score="2"] .pw-strength-label { color: rgba(201, 169, 97, 0.95); }
.pw-strength[data-score="3"] .pw-strength-label { color: #E8D49E; }

/* Match indicator — sin checkmark, color dorado de la app cuando ok */
.pw-match {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.pw-match[data-match="ok"] { color: rgba(232, 212, 158, 0.75); }
.pw-match[data-match="no"] { color: #E8A5A5; }

/* ============================================================
   ONBOARDING MODAL (F3-C2)
   ============================================================ */
.onb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}
/* Body lock cuando el modal está abierto (lo activamos via JS) */
body.onb-open { overflow: hidden !important; }
.onb-card {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(160deg, #0a0a0a 0%, #0a0a0a 100%);
  border: 1px solid rgba(232, 212, 158, 0.18);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  padding: 18px 22px;
  position: relative;
  /* Max altura razonable: el menor entre 720px y viewport-32 */
  max-height: min(720px, calc(100vh - 32px));
  display: block;
  overflow-y: hidden;
}
/* Solo si el contenido realmente excede, mostrar scroll */
.onb-card.scrollable {
  overflow-y: auto;
}
.onb-card::-webkit-scrollbar { width: 6px !important; }
.onb-card::-webkit-scrollbar-track { background: rgba(0,0,0,0.3) !important; border-radius: 3px !important; }
.onb-card::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.5), rgba(176, 141, 122, 0.5)) !important;
  border-radius: 3px !important;
}

.onb-card > .onb-step {
  overflow: visible;
}
.onb-card .onb-step {
  /* No scroll en el step, todo cabe */
  overflow: visible;
}
/* Custom scrollbar dorado (BAA doc, DID results, step content) */
.onb-baa-doc::-webkit-scrollbar,
.onb-did-results::-webkit-scrollbar,
.onb-card .onb-step::-webkit-scrollbar {
  width: 6px !important;
}
.onb-baa-doc::-webkit-scrollbar-track,
.onb-did-results::-webkit-scrollbar-track,
.onb-card .onb-step::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3) !important;
  border-radius: 3px !important;
}
.onb-baa-doc::-webkit-scrollbar-thumb,
.onb-did-results::-webkit-scrollbar-thumb,
.onb-card .onb-step::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.5), rgba(176, 141, 122, 0.5)) !important;
  border-radius: 3px !important;
}
.onb-baa-doc::-webkit-scrollbar-thumb:hover,
.onb-did-results::-webkit-scrollbar-thumb:hover,
.onb-card .onb-step::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.75), rgba(176, 141, 122, 0.75)) !important;
}
.onb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.onb-brand {
  font-family: 'Michroma', sans-serif;
  font-size: 14px;
  letter-spacing: 0.18em;
}
.onb-brand .bn-mark, .onb-brand .bn-fax {
  /* hereda gradients globales; solo override de tamano si necesario */
}
.onb-brand .bn-fax { margin-left: 0; }
.onb-skip-btn {
  background: transparent;
  border: none;
  color: rgba(232, 212, 158, 0.5);
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: color 0.2s;
}
.onb-skip-btn:hover { color: #E8D49E; }

.onb-progress {
  margin-bottom: 28px;
}
.onb-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.onb-progress-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, #B08D7A 0%, #D4B98A 50%, #E8D49E 100%);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.onb-progress-label {
  font-size: 11px;
  color: rgba(232, 212, 158, 0.55);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.onb-title {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: #E8D49E;
  margin: 0 0 8px;
}
.onb-sub {
  font-size: 14px;
  color: rgba(232,221,201,0.65);
  margin: 0 0 24px;
  line-height: 1.5;
}

.onb-feature-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 24px 0;
}
.onb-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(232, 212, 158, 0.08);
  border-radius: 10px;
}
.onb-feature-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(232, 212, 158, 0.12);
  color: #E8D49E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 14px;
  flex-shrink: 0;
}
.onb-feature-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.onb-feature-txt strong {
  color: #E8D49E;
  font-weight: 500;
  font-size: 14px;
}
.onb-feature-txt span {
  color: rgba(232, 221, 201, 0.55);
  font-size: 13px;
}

.onb-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.onb-actions .btn-login { flex: 1; }
.onb-btn-back {
  background: transparent;
  color: rgba(232, 212, 158, 0.65);
  border: 1px solid rgba(232, 212, 158, 0.18);
  padding: 14px 22px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}
.onb-btn-back:hover {
  border-color: rgba(232, 212, 158, 0.4);
  color: #E8D49E;
}
.btn-ghost {
  background: transparent;
  color: rgba(232, 212, 158, 0.65);
  border: 1px solid rgba(232, 212, 158, 0.18);
  padding: 14px 22px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  font-size: 12px;
}
.btn-ghost:hover {
  border-color: rgba(232, 212, 158, 0.4);
  color: #E8D49E;
}

/* BAA document box */
.onb-baa-doc {
  max-height: 140px;
  overflow-y: auto;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(232, 212, 158, 0.12);
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(232, 221, 201, 0.62);
  white-space: pre-wrap;
  margin-bottom: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
.onb-baa-doc h1,
.onb-baa-doc h2,
.onb-baa-doc h3,
.onb-baa-doc strong {
  color: #E8D49E;
}
.onb-baa-loading {
  text-align: center;
  color: rgba(232, 212, 158, 0.5);
  font-size: 12px;
  padding: 30px;
}

.onb-checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 13px;
  /* Paleta: el blanco puro no es del sistema. Afecta al BAA y a la LOA, que
     comparten esta clase. */
  color: rgba(232, 221, 201, 0.78);
  line-height: 1.5;
  padding: 8px 0;
}
.onb-checkbox-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(232, 212, 158, 0.3);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s;
}
.onb-checkbox-row input[type="checkbox"]:hover {
  border-color: rgba(232, 212, 158, 0.55);
}
.onb-checkbox-row input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
  border-color: #E8D49E;
}
.onb-checkbox-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #050505;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.onb-signature-wrap {
  position: relative;
  border: 1px solid rgba(232, 212, 158, 0.25);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px;
  overflow: hidden;
}
.onb-signature-wrap canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 120px;
  cursor: crosshair;
  touch-action: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.4);
}
.onb-signature-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.onb-signature-tab {
  flex: 1;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(232, 212, 158, 0.15);
  color: rgba(232, 212, 158, 0.55);
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: all 0.2s;
}
.onb-signature-tab:hover { color: #E8D49E; border-color: rgba(232, 212, 158, 0.35); }
.onb-signature-tab.active {
  background: rgba(201, 169, 97, 0.12);
  border-color: rgba(232, 212, 158, 0.5);
  color: #E8D49E;
}
.onb-signature-typed {
  width: 100%;
  height: 120px;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 6px;
  color: #E8D49E;
  font-family: 'Brush Script MT', 'Dancing Script', cursive;
  font-size: 38px;
  text-align: center;
  padding: 0 16px;
  outline: none;
  letter-spacing: 0.02em;
}
.onb-signature-typed::placeholder {
  color: rgba(232, 212, 158, 0.2);
  font-style: italic;
}
.onb-signature-clear {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(232, 212, 158, 0.12);
  color: rgba(232, 212, 158, 0.8);
  border: 1px solid rgba(232, 212, 158, 0.25);
  font-size: 10px;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: all 0.2s;
}
.onb-signature-clear:hover {
  background: rgba(232, 212, 158, 0.22);
  color: #E8D49E;
}

/* DID picker */
.onb-did-filters {
  margin-bottom: 18px;
}
.onb-did-type-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.onb-did-type {
  flex: 1;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(232, 212, 158, 0.18);
  color: rgba(232, 212, 158, 0.6);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 500;
  transition: all 0.2s;
}
.onb-did-type:hover { border-color: rgba(232, 212, 158, 0.35); color: #E8D49E; }
.onb-did-type.active {
  background: rgba(201, 169, 97, 0.12);
  border-color: rgba(232, 212, 158, 0.5);
  color: #E8D49E;
}
.onb-did-area-code {
  display: flex;
  gap: 12px;
  align-items: stretch;
}
/* Altura comun para campo y boton: sin esto acaban con alturas distintas segun
   su padding y su line-height, y no cuadran en la fila. */
.onb-did-area-code input,
.onb-did-area-code .btn-secondary {
  height: 44px;
  box-sizing: border-box;
}
.onb-did-area-code input { flex: 1; padding: 0 14px; }
/* min-width: SEARCH y CHECK tienen textos de distinta longitud y sin esto uno
   sale mas estrecho. inline-flex centra el texto en vertical: con padding y el
   boton estirado por el input, se quedaba pegado arriba. */
.onb-did-area-code .btn-secondary {
  min-width: 112px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 169, 97, 0.15);
  border: 1px solid rgba(232, 212, 158, 0.4);
  color: #E8D49E;
  padding: 0 22px;
  line-height: 1;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.onb-did-area-code .btn-secondary:hover {
  background: rgba(201, 169, 97, 0.25);
}

.onb-did-results {
  max-height: 280px;
  min-height: 0;
  overflow-y: auto;
  border: 1px solid rgba(232, 212, 158, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  margin-bottom: 8px;
}
/* Vacia, la caja de resultados no necesita 280px de alto: con 30px de relleno
   empujaba el bloque de "trae tu numero" fuera de la pantalla y no se veia.
   Con resultados el max-height sigue mandando y la lista scrollea igual. */
.onb-did-hint {
  text-align: center;
  padding: 8px 12px;
  color: rgba(232,221,201,0.45);
  font-size: 13px;
}
/* Que el cliente vea que traer su numero no cuesta: es el argumento que le hace
   quedarse en vez de pedir uno nuevo y quedarse con dos. Verde de la paleta. */
/* Solo cambia el color: mismo tamano y peso que el resto de la frase, para que
   llame la atencion sin desalinearse. */
.onb-port-free { color: #9bd64a; }
.onb-did-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.onb-did-item:hover {
  background: rgba(232, 212, 158, 0.06);
}
.onb-did-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.onb-did-item-number {
  font-family: 'JetBrains Mono', monospace;
  color: #E8D49E;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.onb-did-item-meta {
  color: rgba(232,221,201,0.55);
  font-size: 11px;
}
.onb-did-item-cost {
  color: rgba(232, 212, 158, 0.7);
  font-size: 12px;
  font-weight: 500;
}
.onb-did-item-claim {
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
  color: #050505;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.onb-did-item-claim:hover { filter: brightness(1.1); }
.onb-did-item-claim:disabled { opacity: 0.5; cursor: not-allowed; }

.onb-did-loading,
.onb-did-empty {
  text-align: center;
  padding: 30px;
  color: rgba(232,221,201,0.55);
  font-size: 13px;
}

/* Banner if signup but no BAA */
.lfx-baa-banner {
  background: linear-gradient(90deg, rgba(232, 212, 158, 0.08) 0%, rgba(232, 212, 158, 0.02) 100%);
  border-bottom: 1px solid rgba(232, 212, 158, 0.18);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(232, 212, 158, 0.85);
}
.lfx-baa-banner-action {
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
  color: #050505;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Mobile */
@media (max-width: 600px) {
  .onb-card { padding: 20px; max-height: 96vh; }
  .onb-title { font-size: 20px; }
  .onb-actions { flex-direction: column; }
  .onb-actions .btn-login,
  .onb-btn-back,
  .btn-ghost { width: 100%; }
}


/* Onboarding: compact form-group */
.onb-step .form-group { margin-bottom: 12px; }
.onb-step .onb-checkbox-row { padding: 4px 0; }


/* Step 3 BAA compact + inputs sin icon */
.onb-step[data-step="3"] .form-group { margin-bottom: 10px; }
.onb-step[data-step="3"] .onb-checkbox-row { padding: 3px 0; font-size: 12px; }
.onb-step[data-step="3"] .fld-label { font-size: 10px; margin-bottom: 4px; letter-spacing: 0.06em; }
.onb-step[data-step="3"] .fld {
  position: relative;
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
}
.onb-step[data-step="3"] .fld-input {
  padding: 10px 14px;
  font-size: 13px;
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(232, 212, 158, 0.18);
  border-radius: 10px;
  color: #E8DDC9;
}
.onb-step[data-step="3"] .fld-input:focus {
  border-color: rgba(232, 212, 158, 0.4);
  outline: none;
}
.onb-step[data-step="3"] .fld .fld-icon { display: none; }
/* El paso 3 quita borde y fondo al .fld, asi que .fld.invalid no se veia: en
   este paso el aviso lo pinta el input, que es quien tiene borde visible. */
/* Solo el cuadro, sin tocar el layout: cualquier padding o margen aqui
   desplaza la fila entera. */
.baa-version-notice {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; margin-bottom: 14px; border-radius: 10px;
  background: rgba(201,169,97,0.05); border: 1px solid rgba(201,169,97,0.22);
}
.baa-version-notice .bvn-text { flex: 1; }
.baa-version-notice strong { display: block; color: #E8D49E; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.baa-version-notice p { margin: 0; color: rgba(245,233,200,0.55); font-size: 13px; line-height: 1.5; }
.baa-version-notice .btn-ghost { flex-shrink: 0; white-space: nowrap; }

/* Solo el marco, sin padding ni margen: desplazaria el layout. */
.onb-signature-wrap.invalid,
.onb-sig-type-area.invalid {
  outline: 1px solid rgba(212,131,131,0.75);
  outline-offset: 1px;
}
.onb-checkbox-row.invalid input[type="checkbox"] {
  outline: 1px solid rgba(212,131,131,0.75);
  outline-offset: 1px;
}
.onb-step[data-step="3"] .fld.invalid .fld-input {
  border-color: rgba(212,131,131,0.75);
  background: rgba(212,131,131,0.06);
  box-shadow: 0 0 0 3px rgba(212,131,131,0.10);
}
.onb-step[data-step="3"] .onb-signature-wrap canvas { height: 100%; min-height: 100px; display: block; width: 100%; }
.onb-step[data-step="3"] .onb-signature-tabs { margin-bottom: 6px; }

/* Reservar altura fija para firma: draw y type ocupan mismo espacio */
.onb-step[data-step="3"] .onb-signature-wrap,
.onb-step[data-step="3"] .onb-sig-type-area {
  min-height: 130px;
}
.onb-step[data-step="3"] .onb-sig-preview {
  min-height: 60px !important;
  font-size: 30px !important;
  margin-bottom: 6px;
}
.onb-step[data-step="3"] .onb-sig-fonts {
  margin-top: 0;
}


/* Font picker para typed signature */
.onb-sig-type-area {
  border: 1px solid rgba(232, 212, 158, 0.25);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  padding: 10px;
}
.onb-sig-preview {
  min-height: 50px;
  font-size: 38px;
  color: #E8D49E;
  text-align: center;
  line-height: 1.2;
  font-family: 'Allura', cursive;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onb-sig-fonts {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.onb-sig-font-opt {
  flex: 1;
  min-width: 55px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(232, 212, 158, 0.18);
  color: rgba(232, 212, 158, 0.7);
  border-radius: 5px;
  cursor: pointer;
  font-size: 9px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.15s;
  height: 24px;
  line-height: 1;
}
.onb-sig-font-opt:hover {
  border-color: rgba(232, 212, 158, 0.4);
  color: #E8D49E;
}
.onb-sig-font-opt.active {
  background: rgba(201, 169, 97, 0.15);
  border-color: rgba(232, 212, 158, 0.55);
  color: #E8D49E;
}

/* Preview reducida y normal-weight */
.onb-sig-preview {
  font-weight: 400 !important;
  font-style: italic;
  min-height: 60px !important;
  font-size: 34px !important;
}

/* Los dos bloques del paso 4 —numero nuevo y traer el tuyo— comparten caja y
   relleno. Antes solo el de portar tenia recuadro, asi que su boton CHECK quedaba
   14px mas adentro que SEARCH y no alineaban. */
.onb-did-box {
  padding: 14px;
  background: rgba(201,169,97,0.04);
  border: 1px solid rgba(201,169,97,0.12);
  border-radius: 10px;
}
.onb-did-box + .onb-did-box { margin-top: 12px; }

/* Step 4 DID results: SIN min-height. Antes eran 280px fijos incluso vacia, y
   eso empujaba el bloque de "trae tu numero" fuera de la pantalla: el cliente no
   lo veia sin bajar. Con resultados el max-height sigue mandando y la lista
   scrollea, asi que el modal tampoco crece. */
.onb-step[data-step="4"] .onb-did-results {
  max-height: 280px;
}

/* DID item con CLAIMED */
.onb-did-item.claimed {
  background: rgba(232, 212, 158, 0.04);
  pointer-events: none;
  opacity: 0.6;
}
.onb-did-item.claimed .onb-did-item-claim {
  background: rgba(232, 212, 158, 0.15);
  color: rgba(232, 212, 158, 0.55);
}


/* Compactar todo el onboarding para que quepa en pantalla pequeña */
@media (max-height: 800px) {
  .onb-card { padding: 16px 20px; }
  .onb-header { margin-bottom: 14px; }
  .onb-progress { margin-bottom: 18px; }
  .onb-title { font-size: 20px; }
  .onb-sub { font-size: 13px; margin-bottom: 16px; }
  .onb-baa-doc { max-height: 110px; }
  .onb-step[data-step="3"] .onb-signature-wrap canvas,
  .onb-step[data-step="3"] .onb-signature-wrap,
  .onb-step[data-step="3"] .onb-sig-type-area { min-height: 100px; }
  .onb-step[data-step="3"] .onb-sig-preview { min-height: 50px !important; font-size: 26px !important; }
}


/* Badges fonts pegados al fondo del wrapper */
.onb-sig-type-area:not([hidden]) {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 12px 8px 12px;
}
.onb-sig-type-area[hidden] { display: none !important; }
.onb-signature-wrap[hidden] { display: none !important; }


/* Close X button */
.onb-close-btn {
  background: transparent;
  border: none;
  color: rgba(232, 212, 158, 0.55);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}
.onb-close-btn:hover {
  color: #E8D49E;
  background: rgba(232, 212, 158, 0.08);
}


/* ============================================================
   Custom LuzardoFax modal (lfxConfirm / lfxAlert)
   ============================================================ */
.lfx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.lfx-modal-overlay.visible { opacity: 1; }
.lfx-modal-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 400;
  color: #E8D49E;
  letter-spacing: 0.01em;
}
.lfx-modal-msg {
  margin: 0 0 24px;
  font-size: 14px;
  color: rgba(232,221,201,0.72);
  line-height: 1.55;
}
.lfx-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.lfx-modal-cancel,
.lfx-modal-confirm {
  padding: 10px 22px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.18s;
  border: none;
}
.lfx-modal-cancel {
  background: transparent;
  color: rgba(232, 212, 158, 0.65);
  border: 1px solid rgba(232, 212, 158, 0.22);
}
.lfx-modal-cancel:hover {
  border-color: rgba(232, 212, 158, 0.5);
  color: #E8D49E;
}
.lfx-modal-confirm {
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
  color: #050505;
  font-weight: 600;
}
.lfx-modal-confirm:hover { filter: brightness(1.1); }


/* Step 2: sin scroll */
.onb-step[data-step="2"] { overflow: visible !important; }


/* DRAW wrapper: canvas fills full available space */
.onb-step[data-step="3"] .onb-signature-wrap {
  position: relative;
  padding: 6px;
}
.onb-step[data-step="3"] .onb-signature-wrap canvas {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
}


/* Steps: usar altura natural, no flex shrinking */
.onb-step {
  flex: none !important;
  height: auto !important;
  min-height: auto !important;
}


/* Scroll dorado en el card solo cuando scrollable */
.onb-card.scrollable {
  /* Scrollbar respeta el border-radius del card */
  padding-right: 18px;
}
.onb-card.scrollable::-webkit-scrollbar { width: 4px !important; }
.onb-card.scrollable::-webkit-scrollbar-track {
  background: transparent !important;
  margin: 22px 4px;  /* Margin para no tocar el border-radius */
}
.onb-card.scrollable::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.45), rgba(176, 141, 122, 0.45)) !important;
  border-radius: 2px !important;
}
.onb-card.scrollable::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.7), rgba(176, 141, 122, 0.7)) !important;
}


/* Step 4: claim confirmation */
.onb-did-claimed-confirm {
  text-align: center;
  padding: 40px 24px;
}
.onb-did-claimed-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C9A961 0%, #8A7340 100%);
  color: #050505;
  font-size: 28px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 24px rgba(232, 212, 158, 0.35);
  animation: lfx-claim-pop 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes lfx-claim-pop {
  0% { transform: scale(0.2); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.onb-did-claimed-number {
  font-size: 26px;
  font-weight: 400;
  color: #E8D49E;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.onb-did-claimed-msg {
  font-size: 14px;
  color: rgba(232, 221, 201, 0.75);
  line-height: 1.55;
  margin-bottom: 14px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
.onb-did-claimed-note {
  font-size: 12px;
  color: rgba(232, 212, 158, 0.55);
  line-height: 1.5;
  max-width: 380px;
  margin: 0 auto;
}


/* Loading spinner for DID purchase */
.onb-did-loading-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto;
  border: 3px solid rgba(232, 212, 158, 0.15);
  border-top-color: #E8D49E;
  border-radius: 50%;
  animation: lfx-did-spin 0.9s linear infinite;
  box-shadow: 0 0 18px rgba(232, 212, 158, 0.2);
}
@keyframes lfx-did-spin {
  to { transform: rotate(360deg); }
}


/* === Signup intent banner (contextual) === */
.signup-intent-banner {
  background: linear-gradient(135deg, rgba(232, 212, 158, 0.08) 0%, rgba(176, 141, 122, 0.04) 100%);
  border: 1px solid rgba(232, 212, 158, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 0 0 22px;
  text-align: center;
}
.signup-intent-banner .sib-plan-name {
  font-size: 16px;
  font-weight: 500;
  color: #E8D49E;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}
.signup-intent-banner .sib-detail {
  font-size: 13px;
  color: rgba(232, 221, 201, 0.65);
  line-height: 1.45;
}
.signup-intent-banner.is-subscribe {
  border-color: rgba(232, 212, 158, 0.4);
  background: linear-gradient(135deg, rgba(232, 212, 158, 0.12) 0%, rgba(176, 141, 122, 0.06) 100%);
}


/* === Body scrollbar dorado (matches theme) === */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 97, 0.35) rgba(5, 5, 5, 1);
}
body::-webkit-scrollbar {
  width: 8px;
}
body::-webkit-scrollbar-track {
  background: #050505;
}
body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.35), rgba(176, 141, 122, 0.35));
  border-radius: 4px;
}
body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(232, 212, 158, 0.6), rgba(176, 141, 122, 0.6));
}


/* === SUBSCRIBE SCREEN === */
.subscribe-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at top, #1a1410 0%, #0a0807 60%, #050403 100%);
  overflow-y: auto;
  z-index: 100;
}
.subscribe-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 40px 80px;
  min-height: 100%;
  box-sizing: border-box;
}
.subscribe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: nowrap;
}
.subscribe-back {
  color: rgba(232, 212, 158, 0.7);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.subscribe-back:hover { color: #E8D49E; }
.subscribe-brand {
  font-family: 'Michroma', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.subscribe-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 56px;
  align-items: stretch;
}
/* On payment step, give Stripe checkout more room */


@media (max-width: 880px) {
  .subscribe-grid { grid-template-columns: 1fr; gap: 32px; }
  .subscribe-shell { padding: 24px 20px 60px; }
}

/* LEFT */
.subscribe-main { min-width: 0; }
.subscribe-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 36px;
  letter-spacing: -0.01em;
  color: #f5e9c8;
  margin: 0 0 8px;
}
.subscribe-subtitle {
  color: rgba(245, 233, 200, 0.55);
  font-size: 15px;
  margin: 0 0 36px;
}
.subscribe-form { display: flex; flex-direction: column; gap: 18px; }
.subscribe-form .lfx-field { display: flex; flex-direction: column; gap: 6px; }
.subscribe-form .lfx-field label {
  font-size: 13px;
  color: rgba(245, 233, 200, 0.7);
  letter-spacing: 0.01em;
}
.subscribe-form .lfx-field input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 169, 97, 0.2);
  border-radius: 10px;
  padding: 14px 16px;
  color: #f5e9c8;
  font-size: 15px;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.subscribe-form .lfx-field input:focus {
  border-color: rgba(201, 169, 97, 0.6);
  background: rgba(255, 255, 255, 0.05);
}
.subscribe-form .lfx-field input.invalid {
  border-color: #D48383;
  animation: lfx-shake 0.4s;
}
@keyframes lfx-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.lfx-field-hint {
  font-size: 12px;
  color: rgba(245, 233, 200, 0.4);
}
.subscribe-error {
  background: rgba(212, 131, 131, 0.1);
  border: 1px solid rgba(212, 131, 131, 0.3);
  color: #D48383;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
}
.subscribe-submit {
  align-self: flex-end;
  min-width: 220px;
  margin-top: -38px;
  position: relative;
  background: linear-gradient(135deg, #C9A961 0%, #B89550 100%);
  color: #1a1410;
  border: none;
  border-radius: 10px;
  padding: 16px 24px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.subscribe-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.25);
}
.subscribe-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.subscribe-submit .btn-spinner {
  display: none;
  position: absolute;
  right: 18px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(26, 20, 16, 0.3);
  border-top-color: #1a1410;
  border-radius: 50%;
  animation: lfx-spin 0.8s linear infinite;
}
.subscribe-submit.loading .btn-spinner { display: block; }
.subscribe-submit.loading .btn-label { opacity: 0.5; }
@keyframes lfx-spin { to { transform: rotate(360deg); } }
/* Consentimiento del checkout: aviso de cargo recurrente + casilla explicita.
   Un parrafo "By continuing you agree" no es un acto afirmativo, y la FTC pide
   que los terminos del cargo se vean ANTES de pedir el pago. */
.subscribe-consent { margin: 20px 0 0; }

.ftc-notice {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(232,221,201,0.72);
  background: rgba(201,169,97,0.05);
  border-left: 2px solid rgba(201,169,97,0.30);
  border-radius: 0 8px 8px 0;
  padding: 11px 14px;
  margin: 0 0 14px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  margin: -8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.consent-row:hover { background: rgba(201,169,97,0.04); }

.consent-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  flex: 0 0 18px;
  margin: 1px 0 0;
  border: 1.5px solid rgba(201,169,97,0.40);
  border-radius: 4px;
  background: rgba(0,0,0,0.30);
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s, background 0.15s;
}
.consent-row input[type="checkbox"]:hover { border-color: rgba(201,169,97,0.65); }
.consent-row input[type="checkbox"]:checked {
  background: #C9A961;
  border-color: #C9A961;
}
.consent-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 10px;
  border: solid #0a0a0a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent-row input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(201,169,97,0.55);
  outline-offset: 2px;
}

.consent-text {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(232,221,201,0.85);
}
.consent-text a { color: #C9A961; text-decoration: underline; }
.consent-text a:hover { color: #E8D49E; }

/* Sin marcar al enviar: se senala la fila, no solo el mensaje de error.
   Mismo rojo y misma animacion que el resto del formulario. */
.consent-row.invalid {
  background: rgba(212,131,131,0.06);
  animation: lfx-shake 0.4s;
}
.consent-row.invalid input[type="checkbox"] { border-color: #D48383; }

.subscribe-terms {
  font-size: 12px;
  color: rgba(245, 233, 200, 0.4);
  text-align: center;
  margin: 4px 0 0;
}
.subscribe-terms a {
  color: rgba(201, 169, 97, 0.8);
  text-decoration: none;
}
.subscribe-terms a:hover { text-decoration: underline; }

.stripe-checkout-mount {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  width: 100%;
}


.subscribe-processing {
  text-align: center;
  padding: 80px 20px;
}
.subscribe-processing h2 {
  font-weight: 300;
  font-size: 22px;
  color: #f5e9c8;
  margin: 24px 0 8px;
}
.subscribe-processing p {
  color: rgba(245, 233, 200, 0.5);
  font-size: 14px;
}
.subscribe-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid rgba(201, 169, 97, 0.15);
  border-top-color: #C9A961;
  border-radius: 50%;
  animation: lfx-spin 0.9s linear infinite;
}

/* RIGHT: summary */
.subscribe-summary {
  display: flex;
  height: 100%;
}

.summary-card {
  background: linear-gradient(180deg, rgba(201, 169, 97, 0.06) 0%, rgba(201, 169, 97, 0.02) 100%);
  border: 1px solid rgba(201, 169, 97, 0.15);
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}
.summary-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 169, 97, 0.7);
  margin-bottom: 6px;
}
.summary-plan-name {
  font-size: 24px;
  font-weight: 500;
  color: #f5e9c8;
  margin-bottom: 12px;
}
.summary-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 4px;
}
.summary-amount {
  font-size: 40px;
  font-weight: 300;
  color: #E8D49E;
  letter-spacing: -0.02em;
}
.summary-period {
  font-size: 15px;
  color: rgba(245, 233, 200, 0.5);
}
.summary-cycle-note {
  font-size: 12px;
  color: rgba(201, 169, 97, 0.7);
  margin-bottom: 24px;
  min-height: 16px;
}
.summary-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-features li {
  font-size: 13px;
  color: rgba(245, 233, 200, 0.75);
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}
.summary-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C9A961, #E8D49E);
}
.summary-divider {
  height: 1px;
  background: rgba(201, 169, 97, 0.15);
  margin: 20px 0;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(245, 233, 200, 0.85);
  margin-bottom: 10px;
}
.summary-line strong {
  color: #E8D49E;
  font-weight: 500;
}
.summary-line.subtle {
  color: rgba(245, 233, 200, 0.5);
  font-size: 12px;
}
.summary-trust {
  margin-top: 20px;
}
.trust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(245, 233, 200, 0.55);
  margin-bottom: 8px;
}
.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C9A961;
  flex-shrink: 0;
}


/* === SUBSCRIBE HEADER EXTENSION === */
.subscribe-header {
  flex-wrap: nowrap;
}
.subscribe-header-right {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}
.subscribe-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  line-height: 1;
}
.subscribe-lang .lang-pill {
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(232, 212, 158, 0.45);
  padding: 2px 4px;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 12px;
  line-height: 1;
  transition: color 0.2s;
  font-family: inherit;
}
.subscribe-lang .lang-pill:hover { color: #E8D49E; }
.subscribe-lang .lang-pill.active { color: #C9A961; }
.subscribe-lang .lang-pill:focus { outline: none; box-shadow: none; }
.subscribe-lang .lang-sep {
  color: rgba(201, 169, 97, 0.25);
  font-size: 11px;
  line-height: 1;
}
.subscribe-header .subscribe-back {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1;
}


/* === SUBSCRIBE HEADER OVERRIDE === */
.subscribe-header { flex-wrap: nowrap; }
.subscribe-header-right {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}
.subscribe-lang { display: inline-flex; align-items: center; gap: 6px; line-height: 1; }
.subscribe-lang .lang-pill {
  appearance: none;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  color: rgba(232, 212, 158, 0.45);
  padding: 2px 4px;
  cursor: pointer;
  font: 500 12px/1 inherit;
  letter-spacing: 0.12em;
  transition: color 0.2s;
}
.subscribe-lang .lang-pill:hover { color: #E8D49E; }
.subscribe-lang .lang-pill.active { color: #C9A961; }
.subscribe-lang .lang-sep { color: rgba(201, 169, 97, 0.25); font-size: 11px; }






/* === SUBSCRIBE PASSWORD UX === */
.sub-pw-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sub-pw-field { position: relative; }

.sub-pw-wrap { position: relative; }
.sub-pw-wrap input {
  width: 100%;
  padding-right: 44px !important;
  box-sizing: border-box;
}
.sub-pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(232, 212, 158, 0.35);
  cursor: pointer;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.sub-pw-toggle:hover { color: rgba(232, 212, 158, 0.75); }
.sub-pw-toggle.is-shown { color: #C9A961; }

/* Strength bar — between confirm and reqs */
.sub-pw-strength {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.sub-pw-strength-bar {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}
.sub-pw-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease, box-shadow 0.4s ease;
  background: linear-gradient(90deg, #D48383 0%, #D48383 100%);
}
.sub-pw-strength[data-score="1"] .sub-pw-strength-fill {
  width: 25%;
  background: linear-gradient(90deg, #D48383 0%, #C99060 100%);
}
.sub-pw-strength[data-score="2"] .sub-pw-strength-fill {
  width: 50%;
  background: linear-gradient(90deg, #D48383 0%, #C9A961 100%);
}
.sub-pw-strength[data-score="3"] .sub-pw-strength-fill {
  width: 75%;
  background: linear-gradient(90deg, #D48383 0%, #C9A961 70%, #D9C078 100%);
}
.sub-pw-strength[data-score="4"] .sub-pw-strength-fill {
  width: 100%;
  background: linear-gradient(90deg, #D48383 0%, #C9A961 50%, #E8D49E 100%);
  box-shadow: 0 0 10px rgba(232, 212, 158, 0.3);
}
.sub-pw-strength-label {
  min-width: 56px;
  text-align: right;
  font-weight: 500;
  color: rgba(232, 212, 158, 0.3);
  transition: color 0.3s;
}
.sub-pw-strength[data-score="1"] .sub-pw-strength-label { color: #D48383; }
.sub-pw-strength[data-score="2"] .sub-pw-strength-label { color: #C9A961; }
.sub-pw-strength[data-score="3"] .sub-pw-strength-label { color: #D9C078; }
.sub-pw-strength[data-score="4"] .sub-pw-strength-label { color: #E8D49E; }

/* Requirements: 3 columns x 2 rows */
.sub-pw-reqs {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 18px;
}
.sub-pw-reqs li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: rgba(232, 212, 158, 0.4);
  letter-spacing: 0.01em;
  transition: color 0.25s;
}
.sub-pw-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(232, 212, 158, 0.18);
  flex-shrink: 0;
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.sub-pw-reqs li.met { color: rgba(232, 212, 158, 0.92); }
.sub-pw-reqs li.met .sub-pw-dot {
  background: #C9A961;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
  transform: scale(1.2);
}
.sub-pw-reqs li.met-fail { color: rgba(212, 131, 131, 0.85); }
.sub-pw-reqs li.met-fail .sub-pw-dot {
  background: #D48383;
  box-shadow: 0 0 0 3px rgba(212, 131, 131, 0.15);
}

@media (max-width: 720px) {
  .sub-pw-reqs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 460px) {
  .sub-pw-reqs { grid-template-columns: 1fr; }
}



/* === SUBSCRIBE PAYMENT (centered, no pay-side) === */
.subscribe-screen.is-payment .subscribe-summary { display: none; }
.subscribe-screen.is-payment .subscribe-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin: 0 auto;
  gap: 0;
}
.subscribe-screen.is-payment #subscribeStepPayment .subscribe-title,
.subscribe-screen.is-payment #subscribeStepPayment .subscribe-subtitle {
  display: none;
}

.pay-centered {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pay-back-inline {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: rgba(232, 212, 158, 0.55);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 6px 4px;
  transition: color 0.2s;
  font-family: inherit;
}
.pay-back-inline:hover { color: #E8D49E; }

.pay-centered .stripe-checkout-mount {
  height: auto;
  width: 100%;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(201, 169, 97, 0.12),
    0 20px 50px -20px rgba(0, 0, 0, 0.7),
    0 8px 20px -8px rgba(0, 0, 0, 0.5);
}
/* El iframe que monta Stripe Checkout: que ocupe solo el contenido */
.pay-centered .stripe-checkout-mount iframe {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
}


/* === SUBSCRIBE PAYMENT (centered, no pay-side) === */
.subscribe-screen.is-payment .subscribe-summary { display: none; }
.subscribe-screen.is-payment .subscribe-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  margin: 0 auto;
  gap: 0;
}
.subscribe-screen.is-payment #subscribeStepPayment .subscribe-title,
.subscribe-screen.is-payment #subscribeStepPayment .subscribe-subtitle {
  display: none;
}

.pay-centered {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pay-back-inline {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: rgba(232, 212, 158, 0.55);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 6px 4px;
  transition: color 0.2s;
  font-family: inherit;
}
.pay-back-inline:hover { color: #E8D49E; }




/* === ACCOUNT STEP BACK LINK === */
.acc-back-link {
  margin-bottom: 22px;
  text-decoration: none;
}

/* === BRAND LINK === */
a.subscribe-brand {
  text-decoration: none;
  color: #C9A961;
  cursor: pointer;
  transition: opacity 0.2s;
}
a.subscribe-brand:hover {
  opacity: 0.85;
}


/* === SUMMARY CARD SECTIONS (v2) === */
.summary-section {
  display: flex;
  flex-direction: column;
}
.summary-section-title {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(201, 169, 97, 0.65);
  margin-bottom: 14px;
  font-weight: 500;
}
.summary-header-block .summary-eyebrow {
  margin-bottom: 6px;
}
.summary-card .summary-divider {
  height: 1px;
  background: rgba(201, 169, 97, 0.12);
  margin: 20px 0;
}

/* Features list (existing) — minor tweaks for new layout */
.summary-card .summary-features {
  margin: 0;
  padding: 0;
}

/* Total line emphasis */
.summary-card .summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13.5px;
  color: rgba(245, 233, 200, 0.78);
  margin-bottom: 8px;
}
.summary-line.subtle {
  color: rgba(245, 233, 200, 0.45);
  font-size: 12px;
}
.summary-line-total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(201, 169, 97, 0.12);
  color: #f5e9c8;
  font-size: 14px;
}
.summary-line-total strong {
  color: #E8D49E;
  font-weight: 500;
  font-size: 15px;
}

/* What happens next steps */
.summary-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.summary-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 28px;
  font-size: 13px;
  color: rgba(245, 233, 200, 0.75);
  line-height: 1.45;
}
.summary-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(201, 169, 97, 0.12);
  color: #E8D49E;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}

/* Trust rows: row layout with dot */
.summary-trust {
  gap: 8px;
}
.summary-trust .trust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: rgba(245, 233, 200, 0.6);
}
.summary-trust .trust-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C9A961;
  flex-shrink: 0;
}

/* Footer with support email */
.summary-footer {
  margin-top: auto;   /* pushes it to bottom of stretched card */
  padding-top: 20px;
  border-top: 1px solid rgba(201, 169, 97, 0.08);
  font-size: 12px;
  color: rgba(245, 233, 200, 0.5);
  text-align: center;
}
.summary-footer a {
  color: rgba(201, 169, 97, 0.85);
  text-decoration: none;
}
.summary-footer a:hover { color: #E8D49E; }

/* Mobile */
@media (max-width: 880px) {
  .subscribe-summary { height: auto; }
  .summary-card { flex: 0 0 auto; }
  .summary-footer { margin-top: 24px; }
}


/* === SUMMARY CARD POLISH === */
/* Quitar el divider duplicado antes de .summary-trust */
.summary-divider + .summary-section.summary-trust {
  padding-top: 0;
}
/* Ocultar divider justo antes de trust (parece doble) */
.summary-card .summary-section.summary-trust {
  margin-top: 0;
}

/* Card no se estira mas alla del contenido natural */
.subscribe-summary {
  align-items: flex-start;  /* no stretch */
}
.summary-card {
  flex: 0 0 auto;  /* size to content */
  align-self: flex-start;
}

/* Footer pegado al final del contenido, no del card */
.summary-footer {
  margin-top: 24px;
  padding-top: 18px;
}


/* === PAY SUCCESS SCREEN === */
.subscribe-screen.is-processing .subscribe-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
  margin: 0 auto;
}
.subscribe-screen.is-processing .subscribe-summary { display: none; }

.pay-success {
  text-align: center;
  padding: 32px 0 60px;
}

.pay-success-icon {
  margin: 0 auto 28px;
  display: inline-flex;
  position: relative;
}
.pay-success-icon svg {
  filter: drop-shadow(0 0 16px rgba(201, 169, 97, 0.25));
}
.ps-circle {
  stroke-dasharray: 226;
  stroke-dashoffset: 226;
  animation: ps-draw-circle 0.6s ease-out forwards;
}
.ps-check {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: ps-draw-check 0.4s 0.5s ease-out forwards;
}
@keyframes ps-draw-circle { to { stroke-dashoffset: 0; } }
@keyframes ps-draw-check { to { stroke-dashoffset: 0; } }

.pay-success-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 32px;
  letter-spacing: -0.01em;
  color: #f5e9c8;
  margin: 0 0 8px;
}
.pay-success-sub {
  color: rgba(245, 233, 200, 0.55);
  font-size: 15px;
  margin: 0 0 36px;
}

.pay-receipt {
  background: rgba(201, 169, 97, 0.04);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 0 auto 32px;
  max-width: 460px;
  text-align: left;
}
.pay-receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  color: rgba(245, 233, 200, 0.7);
  border-bottom: 1px solid rgba(201, 169, 97, 0.06);
}
.pay-receipt-row:last-child { border-bottom: none; }
.pay-receipt-row strong {
  color: #E8D49E;
  font-weight: 500;
}
.pay-receipt-email {
  color: rgba(232, 212, 158, 0.9);
  font-size: 13px;
}
.pay-receipt-row a {
  color: #C9A961;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pay-receipt-row a:hover {
  color: #E8D49E;
  text-decoration: underline;
}

.pay-success-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(245, 233, 200, 0.5);
  font-size: 13px;
  margin-top: 8px;
}
.pay-success-spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.pay-success-continue {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  max-width: 340px;
}


/* === TRIAL SCREEN SPECIFIC === */
.trial-screen .summary-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-self: flex-start;
}

.trial-price-line {
  color: rgba(232, 212, 158, 0.75);
  font-size: 14px;
  margin-top: 4px;
}

.trial-when-ends-text {
  color: rgba(245, 233, 200, 0.7);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.trial-back-login {
  text-align: center;
  margin: 16px 0 0;
  font-size: 13px;
}
.trial-back-login a {
  color: rgba(201, 169, 97, 0.75);
  text-decoration: none;
}
.trial-back-login a:hover { color: #E8D49E; }

.trial-success-email {
  font-size: 15px;
  color: #E8D49E;
  font-weight: 500;
  text-align: center;
  margin: 0 0 22px;
  padding: 12px 18px;
  background: rgba(201, 169, 97, 0.06);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 8px;
  display: inline-block;
}
.trial-success-hint {
  color: rgba(245, 233, 200, 0.55);
  font-size: 13px;
  margin: 0 0 24px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.55;
}
.pay-success .trial-success-email {
  display: block;
  max-width: 380px;
  margin: 0 auto 22px;
}


/* === TRIAL FORM: hereda 1:1 del subscribe === */

/* Usa exactamente la misma estructura que .subscribe-form */
#signupForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* .subscribe-field se renderiza igual que .lfx-field */
#signupForm .subscribe-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
#signupForm .subscribe-field label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(245, 233, 200, 0.85);
  letter-spacing: 0.01em;
  margin: 0;
}

/* Inputs identicos al subscribe */
#signupForm input[type="text"],
#signupForm input[type="email"],
#signupForm input[type="password"],
#signupForm select {
  width: 100%;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 10px;
  padding: 13px 16px;
  color: #f5e9c8;
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
#signupForm input::placeholder {
  color: rgba(245, 233, 200, 0.28);
}
#signupForm input:focus,
#signupForm select:focus {
  border-color: rgba(201, 169, 97, 0.38);
  background: rgba(201, 169, 97, 0.025);
}

/* Title y subtitle match subscribe */
#signupScreen .subscribe-title {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 36px;
  letter-spacing: -0.01em;
  color: #f5e9c8;
  margin: 0 0 8px;
}
#signupScreen .subscribe-subtitle {
  color: rgba(245, 233, 200, 0.55);
  font-size: 15px;
  margin: 0 0 36px;
}

/* Password wrapper */
#signupForm .lfx-pw-wrap {
  position: relative;
}
#signupForm .lfx-pw-wrap input {
  padding-right: 44px;
}
#signupForm .lfx-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(201, 169, 97, 0.5);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
#signupForm .lfx-pw-toggle:hover {
  color: #E8D49E;
}

/* Strength bar: row con barra a la izq y label texto a la der (match subscribe) */
#signupForm .sub-pw-strength {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  height: auto;
  overflow: visible;
}
#signupForm .sub-pw-bar {
  flex: 1;
  height: 3px;
  background: rgba(201, 169, 97, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
#signupForm .sub-pw-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #D48383 0%, #C99060 33%, #C9A961 66%, #E8D49E 100%);
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}
#signupForm .sub-pw-label {
  position: static;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(245, 233, 200, 0.6);
  flex-shrink: 0;
  min-width: 50px;
  text-align: right;
}

/* Reqs en 3 columnas */
#signupForm .sub-pw-reqs {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 14px;
}
#signupForm .sub-pw-reqs li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: rgba(245, 233, 200, 0.45);
  transition: color 0.2s;
}
#signupForm .sub-pw-reqs .sub-pw-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(245, 233, 200, 0.3);
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}
#signupForm .sub-pw-reqs li.met {
  color: rgba(232, 212, 158, 0.85);
}
#signupForm .sub-pw-reqs li.met .sub-pw-dot {
  background: #C9A961;
  box-shadow: 0 0 6px rgba(201, 169, 97, 0.4);
}
#signupForm .sub-pw-reqs li.fail {
  color: rgba(212, 131, 131, 0.7);
}
#signupForm .sub-pw-reqs li.fail .sub-pw-dot {
  background: #D48383;
}

/* Submit */
#signupForm .subscribe-submit {
  width: 100%;
  margin-top: 0;
}

/* Terms */
#signupForm .subscribe-terms {
  text-align: center;
  font-size: 12.5px;
  color: rgba(245, 233, 200, 0.5);
  margin: 0;
}

/* Autofill */
#signupForm input:-webkit-autofill,
#signupForm input:-webkit-autofill:hover,
#signupForm input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5e9c8;
  -webkit-box-shadow: 0 0 0px 1000px rgba(20, 16, 13, 0.95) inset;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #E8D49E;
}



/* === EYE TOGGLE: linea tachada cuando .is-shown === */

/* Solo el ::after agrega la linea, NO tocar position (ya esta absolute en subscribe) */
.sub-pw-toggle.is-shown::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 1.6px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 1px;
  pointer-events: none;
}

/* Estados de color (sin tocar position) */
.sub-pw-toggle.is-shown {
  color: #C9A961;
}



/* === SIGNUP SUCCESS SCREEN: card frame match subscribe === */
#signupStepSuccess {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20px;
}
#signupStepSuccess .pay-success {
  background: linear-gradient(180deg, rgba(201, 169, 97, 0.04) 0%, rgba(201, 169, 97, 0.02) 100%);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 16px;
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 30px 80px -30px rgba(0, 0, 0, 0.8),
    0 12px 32px -10px rgba(0, 0, 0, 0.5);
}

/* La pantalla en modo success: ocultar sidebar */
.subscribe-screen.signup-success-mode .subscribe-summary {
  display: none;
}
.subscribe-screen.signup-success-mode .subscribe-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 600px;
  margin: 0 auto;
}


/* === BAA REMINDER BANNER (compact, right-aligned in page-header) === */

.page-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.page-header-flex .ph-left { flex: 1; min-width: 0; }

/* Banner de trial: dias restantes y como elegir plan. Vive junto al del BAA,
   a la derecha del titulo del dashboard. Sin boton de cerrar a proposito: un
   aviso de que se acaba la prueba que se puede cerrar no avisa de nada. */
.trial-banner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(201, 169, 97, 0.07) 0%, rgba(201, 169, 97, 0.03) 100%);
  border: 1px solid rgba(201, 169, 97, 0.25);
  border-radius: 10px;
  padding: 10px 10px 10px 12px;
  flex-shrink: 0;
  min-width: 340px;
}
.trial-banner-accent {
  width: 3px;
  align-self: stretch;
  background: linear-gradient(180deg, #C9A961 0%, #9bd64a 100%);
  border-radius: 2px;
  flex-shrink: 0;
}
.trial-banner .trial-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.trial-banner-text strong { font-size: 13px; color: #E8DDC9; font-weight: 600; }
.trial-banner-text span { font-size: 11.5px; color: rgba(232, 221, 201, 0.6); }
.trial-banner-cta {
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.4);
  color: #E8D49E;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.trial-banner-cta:hover {
  background: rgba(201, 169, 97, 0.22);
  border-color: rgba(201, 169, 97, 0.6);
}
/* 3 dias o menos: deja de ser informativo. */
.trial-banner.urgent {
  background: linear-gradient(90deg, rgba(212, 131, 131, 0.07) 0%, rgba(201, 169, 97, 0.03) 100%);
  border-color: rgba(212, 131, 131, 0.3);
}
.trial-banner.urgent .trial-banner-accent {
  background: linear-gradient(180deg, #D48383 0%, #C9A961 100%);
}

.baa-banner-compact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(90deg, rgba(212, 131, 131, 0.05) 0%, rgba(201, 169, 97, 0.04) 100%);
  border: 1px solid rgba(212, 131, 131, 0.2);
  border-radius: 10px;
  padding: 10px 10px 10px 12px;
  flex-shrink: 0;
  min-width: 340px;
}
.baa-banner-accent {
  width: 3px;
  align-self: stretch;
  background: linear-gradient(180deg, #D48383 0%, #C9A961 100%);
  border-radius: 2px;
  flex-shrink: 0;
}
.baa-banner-compact .baa-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.baa-banner-compact .baa-banner-text strong {
  color: #D48383;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
}
.baa-banner-compact .baa-banner-text span {
  color: rgba(245, 233, 200, 0.55);
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
}
.baa-banner-compact .baa-banner-cta {
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.4);
  color: #E8D49E;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.baa-banner-compact .baa-banner-cta:hover {
  background: rgba(201, 169, 97, 0.22);
  border-color: rgba(201, 169, 97, 0.5);
}
.baa-banner-compact .baa-banner-dismiss {
  background: transparent;
  border: none;
  color: rgba(245, 233, 200, 0.4);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.baa-banner-compact .baa-banner-dismiss:hover {
  color: rgba(245, 233, 200, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 920px) {
  .baa-banner-compact {
    min-width: 0;
    width: 100%;
    margin-top: 12px;
  }
}

/* === LANG MINI SWITCH DUAL === */
.lang-mini-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
}
.lang-mini-switch .lang-mini-pill {
  background: transparent;
  border: none;
  color: rgba(245, 233, 200, 0.4);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  font-family: inherit;
  transition: color 0.2s;
}
.lang-mini-switch .lang-mini-pill:hover {
  color: rgba(245, 233, 200, 0.8);
}
.lang-mini-switch .lang-mini-pill.active {
  color: #E8D49E;
  font-weight: 500;
}
.lang-mini-switch .lang-mini-sep {
  color: rgba(245, 233, 200, 0.25);
  pointer-events: none;
}

/* === LANG MINI SWITCH DUAL === */
.lang-mini-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
}
.lang-mini-switch .lang-mini-pill {
  background: transparent;
  border: none;
  color: rgba(245, 233, 200, 0.4);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  font-family: inherit;
  transition: color 0.2s;
}
.lang-mini-switch .lang-mini-pill:hover {
  color: rgba(245, 233, 200, 0.8);
}
.lang-mini-switch .lang-mini-pill.active {
  color: #E8D49E;
  font-weight: 500;
}
.lang-mini-switch .lang-mini-sep {
  color: rgba(245, 233, 200, 0.25);
  pointer-events: none;
}



/* === MODO BAA-ONLY (cuando se abre el modal desde el banner del dashboard) === */
.onb-baa-only .onb-progress { display: none !important; }
.onb-baa-only .onb-btn-back { display: none !important; }
/* Salida propia del modo BAA: el BACK del onboarding llevaria a un paso que el
   cliente ya completo, asi que se oculta y se pone un cerrar de verdad. */
.onb-baa-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  display: none;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(201,169,97,0.25);
  border-radius: 7px;
  color: rgba(232,221,201,0.55);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.onb-baa-only .onb-baa-close { display: inline-flex; }
.onb-baa-close:hover { color: #E8DDC9; border-color: rgba(201,169,97,0.5); }
.onb-baa-only #onbStep3Skip { display: none !important; }

/* === MODAL CENTRO DE EXITO (BAA, etc) === */
.lfx-success-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  animation: lfxSuccessFadeIn 0.25s ease-out;
}
.lfx-success-box {
  background: linear-gradient(180deg, rgba(45, 35, 26, 0.98) 0%, rgba(28, 22, 16, 0.98) 100%);
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-radius: 18px;
  padding: 44px 64px;
  text-align: center;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(201, 169, 97, 0.08) inset;
  animation: lfxSuccessPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 380px;
}
.lfx-success-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 97, 0.18) 0%, rgba(201, 169, 97, 0.05) 100%);
  border: 2.5px solid #C9A961;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E8D49E;
  position: relative;
  box-shadow: 0 0 30px rgba(201, 169, 97, 0.2);
}
.lfx-success-icon svg {
  width: 38px;
  height: 38px;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: lfxCheckDraw 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
}
.lfx-success-text {
  color: #f5e9c8;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.3;
}
@keyframes lfxSuccessFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes lfxSuccessPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes lfxCheckDraw {
  to { stroke-dashoffset: 0; }
}


/* === COMPLIANCE TAB (BAA + OpenTimestamps) === */
.baa-status-card { padding: 8px 0; }
.baa-status-loading {
  color: rgba(245, 233, 200, 0.45);
  text-align: center;
  padding: 24px;
  font-size: 13px;
  font-style: italic;
}

.baa-status-unsigned {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(212, 131, 131, 0.06);
  border: 1px solid rgba(212, 131, 131, 0.2);
  border-radius: 10px;
}
.baa-status-icon-warn {
  font-size: 24px;
  color: #D48383;
  flex-shrink: 0;
}
.baa-status-unsigned .baa-status-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.baa-status-unsigned strong {
  color: #D48383;
  font-size: 14px;
  font-weight: 500;
}
.baa-status-unsigned span {
  color: rgba(245, 233, 200, 0.55);
  font-size: 13px;
}
/* .btn-login trae width:100% (viene del formulario de login). Dentro de este
   flex se expandia y aplastaba el texto a dos palabras por linea. */
.baa-status-unsigned .btn-login {
  width: auto; flex-shrink: 0; padding: 12px 28px; white-space: nowrap;
}
.baa-status-unsigned .baa-status-icon-warn { flex-shrink: 0; }

.baa-status-signed { display: flex; flex-direction: column; gap: 24px; }

.baa-info-grid {
  display: grid;
  gap: 0;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 10px;
  overflow: hidden;
}
.baa-info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(201, 169, 97, 0.06);
  align-items: center;
}
.baa-info-row:last-child { border-bottom: none; }
.baa-info-label {
  color: rgba(201, 169, 97, 0.7);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}
.baa-info-value {
  color: #f5e9c8;
  font-size: 13.5px;
  word-break: break-all;
}
.baa-info-mono {
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  color: rgba(245, 233, 200, 0.8);
}

/* Badge para status */
/* Los cuatro estados miden lo mismo: sin ancho fijo, 'Processing' (sin regla
   propia) salia sin caja y desalineado respecto al resto de campos. */
.baa-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 96px;
  box-sizing: border-box;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}
.baa-status-pill.none {
  background: rgba(255,255,255,0.04);
  color: rgba(232,221,201,0.62);
  border-color: rgba(232, 221, 201, 0.10);
}
.baa-status-pill.pending {
  background: rgba(201, 169, 97, 0.14);
  color: #E8D49E;
  border: 1px solid rgba(201, 169, 97, 0.3);
}
.baa-status-pill.attested {
  background: rgba(126, 211, 33, 0.12);
  color: #9bd64a;
  border: 1px solid rgba(126, 211, 33, 0.3);
}
.baa-status-pill.failed {
  background: rgba(212, 131, 131, 0.14);
  color: #D48383;
  border: 1px solid rgba(212, 131, 131, 0.3);
}

/* OpenTimestamps section */
.baa-ots-section {
  padding: 18px 20px;
  background: rgba(201, 169, 97, 0.04);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 10px;
}
.baa-ots-title {
  font-size: 13px;
  font-weight: 500;
  color: #E8D49E;
  letter-spacing: 0.02em;
  margin: 0 0 8px 0;
}
.baa-ots-desc {
  color: rgba(245, 233, 200, 0.6);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 14px 0;
}
.baa-ots-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.baa-ots-actions .btn-secondary {
  padding: 7px 12px;
  font-size: 12px;
  text-decoration: none;
  display: inline-block;
}


/* Override para botones del compliance: heredan font + menos letter-spacing */
.baa-ots-actions .btn-secondary {
  font-family: inherit;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  font-weight: 500;
  text-transform: none;
  padding: 8px 14px;
  border-radius: 8px;
}
.baa-ots-actions .btn-secondary:hover {
  background: rgba(201,169,97,0.16);
  border-color: rgba(201,169,97,0.45);
}

/* Branding lock state for free tier */
.brand-toggle-locked {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
.brand-toggle-locked .switch {
  opacity: 0.6;
  cursor: not-allowed;
}
.brand-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: rgba(201, 169, 97, 0.12);
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 4px;
  color: #E8D49E;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-left: 8px;
}
.brand-locked-badge svg { width: 11px; height: 11px; }
.brand-locked-hint {
  display: block;
  margin-top: 6px;
  color: rgba(201, 169, 97, 0.65);
  font-size: 11.5px;
  font-style: italic;
}



/* Status chip: converting (DOCX -> PDF en proceso) */
.status-chip.converting {
  background: linear-gradient(135deg, rgba(201,169,97,0.14), rgba(201,169,97,0.06));
  color: #C9A961;
  border: 1px solid rgba(201,169,97,0.35);
  position: relative;
  overflow: hidden;
  animation: chip-converting-glow 2s ease-in-out infinite;
}
@keyframes chip-converting-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,97,0); }
  50%      { box-shadow: 0 0 0 3px rgba(201,169,97,0.10); }
}

/* ====== Dashboard fax number copy button ====== */
.dab-copy-btn {
  background: transparent;
  border: none;
  color: rgba(201,169,97,0.65);
  width: auto;
  height: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  padding: 4px;
  margin-left: 10px;
  vertical-align: middle;
  border-radius: 4px;
}
.dab-copy-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.dab-copy-btn:hover {
  color: #C9A961;
}
.dab-copy-btn:active {
  transform: scale(0.94);
}
.dab-copy-btn.copied {
  color: #C9A961;
}
.dab-fax-number {
  display: inline-flex;
  align-items: center;
}


/* ====== Sent Detail - "Converted to PDF" badge ====== */
.sa-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.sa-name-wrap .sa-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sa-converted-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #C9A961;
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.30);
  border-radius: 4px;
  flex-shrink: 0;
  margin-right: 12px;
}


/* ====== Inactivity Warning Modal ====== */
.idle-warning-card {
  max-width: 440px;
  text-align: center;
  padding: 36px 32px 28px;
}
.idle-warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(201,169,97,0.10);
  color: #C9A961;
  margin: 0 auto 18px;
  animation: idle-pulse 2.4s ease-in-out infinite;
}
@keyframes idle-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,97,0.25); }
  50%      { box-shadow: 0 0 0 12px rgba(201,169,97,0); }
}
.idle-warning-title {
  font-size: 19px;
  font-weight: 600;
  color: #E8DDC9;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
.idle-warning-sub {
  color: rgba(232,221,201,0.65);
  font-size: 13px;
  line-height: 1.55;
  margin: 0 0 22px;
}
.idle-warning-countdown {
  font-variant-numeric: tabular-nums;
  font-size: 42px;
  font-weight: 300;
  color: #C9A961;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}
.idle-warning-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.idle-warning-actions button {
  min-width: 150px;
}


/* Cuando un fax acaba de cambiar a delivered, hacer un flash sutil */
.status-chip.delivered.just-arrived {
  animation: chip-delivered-flash 0.9s ease-out;
}
@keyframes chip-delivered-flash {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(201,169,97,0.45); }
  40%  { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(201,169,97,0.20); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(201,169,97,0); }
}



/* El modal padre no debe limitar el contenedor */
#pdfViewerModal {
  align-items: stretch !important;
  justify-content: stretch !important;
}
#pdfViewerModal .lfx-modal-backdrop {
  display: none !important;
}
.pdf-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(201,169,97,0.18);
  background: rgba(0,0,0,0.30);
  flex-shrink: 0;
}
.pdf-viewer-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}
.pdf-viewer-title {
  color: #E8DDC9;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-viewer-meta {
  color: rgba(232,221,201,0.55);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.pdf-viewer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.pv-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(201,169,97,0.75);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}
.pv-btn:hover {
  color: #C9A961;
  background: rgba(201,169,97,0.08);
  border-color: rgba(201,169,97,0.30);
}
.pv-btn:active {
  transform: scale(0.94);
}
.pv-btn-save {
  width: auto;
  padding: 0 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  color: #1a1a1a;
  background: linear-gradient(135deg, #E8D49E, #C9A961);
  border-color: #C9A961;
}
.pv-btn-save:hover {
  background: linear-gradient(135deg, #F0DCA8, #D6B670);
  color: #1a1a1a;
  border-color: #C9A961;
}
.pv-divider {
  width: 1px;
  height: 22px;
  background: rgba(201,169,97,0.22);
  margin: 0 6px;
}
.pdf-viewer-body {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}
.pdf-viewer-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #1a1a1a;
}


/* ============================================================
   PDF VIEWER MODAL (PDF.js powered) - Full screen with controls
   ============================================================ */
.pdfv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}
.pdfv-modal[hidden] {
  display: none;
}
.pdfv-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  overflow: hidden;
}

/* --- Toolbar --- */
.pdfv-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(21,20,15,1), rgba(17,17,17,1));
  border-bottom: 1px solid rgba(201, 169, 97, 0.18);
  flex-shrink: 0;
  gap: 16px;
}
.pdfv-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}
.pdfv-title {
  color: #E8DDC9;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdfv-meta {
  color: rgba(201, 169, 97, 0.65);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdfv-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.pdfv-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.pdfv-divider {
  width: 1px;
  height: 22px;
  background: rgba(201, 169, 97, 0.20);
  margin: 0 6px;
}

.pdfv-btn {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(201, 169, 97, 0.78);
  width: 32px;
  height: 32px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.14s ease;
  padding: 0;
  flex-shrink: 0;
}
.pdfv-btn:hover {
  color: #C9A961;
  background: rgba(201, 169, 97, 0.08);
  border-color: rgba(201, 169, 97, 0.28);
}
.pdfv-btn:active {
  transform: scale(0.94);
}
.pdfv-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.pdfv-btn:disabled:hover {
  background: transparent;
  border-color: transparent;
  color: rgba(201, 169, 97, 0.78);
}
/* Floppy disk - default state (clean, igual que otros botones) */
.pdfv-btn-save {
  color: rgba(201, 169, 97, 0.45);
  background: transparent;
  border-color: transparent;
}
.pdfv-btn-save:disabled {
  opacity: 1;  /* override del .pdfv-btn:disabled genérico */
  cursor: default;
}
.pdfv-btn-save:disabled:hover {
  color: rgba(201, 169, 97, 0.45);
  background: transparent;
  border-color: transparent;
}
/* Active state - cuando hay rotation pendiente de guardar */
.pdfv-btn-save-active {
  color: #C9A961 !important;
  background: rgba(201, 169, 97, 0.12) !important;
  border-color: rgba(201, 169, 97, 0.50) !important;
  animation: pdfv-save-pulse 1.8s ease-in-out infinite;
}
.pdfv-btn-save-active:hover {
  background: rgba(201, 169, 97, 0.22) !important;
  border-color: rgba(201, 169, 97, 0.75) !important;
  color: #E8D49E !important;
}
@keyframes pdfv-save-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 97, 0); }
  50%      { box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.12); }
}

/* --- Page navigation --- */
.pdfv-pageinfo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}
.pdfv-pageinput {
  width: 38px;
  height: 26px;
  background: rgba(0, 0, 0, 0.40);
  border: 1px solid rgba(201, 169, 97, 0.25);
  color: #E8DDC9;
  border-radius: 4px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.pdfv-pageinput::-webkit-outer-spin-button,
.pdfv-pageinput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pdfv-pageinput:focus {
  outline: none;
  border-color: rgba(201, 169, 97, 0.55);
}
.pdfv-pagesep {
  color: rgba(201, 169, 97, 0.50);
  font-size: 12px;
}
.pdfv-pagetotal {
  color: rgba(232, 221, 201, 0.85);
  font-size: 12px;
  min-width: 18px;
}

/* --- Zoom select --- */
.pdfv-zoomselect {
  height: 26px;
  background: rgba(0, 0, 0, 0.40);
  border: 1px solid rgba(201, 169, 97, 0.25);
  color: #E8DDC9;
  border-radius: 4px;
  padding: 0 6px;
  font-size: 11.5px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%23C9A961' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  padding-right: 22px;
}
.pdfv-zoomselect:focus {
  outline: none;
  border-color: rgba(201, 169, 97, 0.55);
}
.pdfv-zoomselect option {
  background: #0a0a0a;
  color: #E8DDC9;
}

/* --- Canvas area --- */
.pdfv-canvas-wrap {
  flex: 1;
  overflow: auto;
  background: #1a1a1a;
  position: relative;
}
.pdfv-pages-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  min-height: 100%;
  box-sizing: border-box;
}
.pdfv-page-canvas {
  display: block;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  background: white;
}

/* --- Scrollbar dorada custom --- */
.pdfv-canvas-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.pdfv-canvas-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.40);
  border-left: 1px solid rgba(201, 169, 97, 0.10);
}
.pdfv-canvas-wrap::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 97, 0.30);
  border-radius: 6px;
  border: 2px solid rgba(0, 0, 0, 0.40);
  background-clip: padding-box;
}
.pdfv-canvas-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(201, 169, 97, 0.55);
  background-clip: padding-box;
}
.pdfv-canvas-wrap {
  scrollbar-color: rgba(201, 169, 97, 0.30) rgba(0, 0, 0, 0.40);
  scrollbar-width: thin;
}

/* --- Loading overlay --- */
.pdfv-loading {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(201, 169, 97, 0.80);
}
.pdfv-loading[hidden] { display: none; }
.pdfv-loading-spinner {
  width: 38px;
  height: 38px;
  border: 2.5px solid rgba(201, 169, 97, 0.20);
  border-top-color: #C9A961;
  border-radius: 50%;
  animation: pdfv-spin 0.85s linear infinite;
}
.pdfv-loading-text {
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
@keyframes pdfv-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 800px) {
  .pdfv-zoomselect, .pdfv-pageinfo { display: none; }
  .pdfv-divider { margin: 0 3px; }
  .pdfv-toolbar { padding: 8px 10px; }
}


/* Attachment clickeable (PDF visualizable) */
.attachment-item-clickable {
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.attachment-item-clickable:hover {
  background: rgba(201,169,97,0.06);
  border-color: rgba(201,169,97,0.30);
}


/* ====== Preview: páginas de attachments (thumbnails) ====== */
#sppAttachThumbs {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

/* Preview de attachments en B&W — el fax transmite 1-bit blanco y negro.
   Coherencia: lo que ves = lo que se transmite. NO aplica al cover (ya es fax-safe). */
#sppAttachThumbs canvas,
#sppAttachThumbs img {
  filter: grayscale(1) contrast(1.15) brightness(1.02);
}

.spp-page-canvas {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 3px 14px rgba(0,0,0,0.35);
  border-radius: 2px;
  background: white;
}
.spp-page-placeholder {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  background: linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px dashed rgba(201,169,97,0.30);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  box-sizing: border-box;
  text-align: center;
}
.spp-ph-icon { font-size: 32px; opacity: 0.7; }
.spp-ph-name {
  font-size: 12px;
  color: #E8DDC9;
  word-break: break-word;
  font-weight: 500;
}
.spp-ph-note {
  font-size: 10px;
  color: rgba(201,169,97,0.65);
  letter-spacing: 0.03em;
}


/* ====== BAA Dormant Banner ====== */
.baa-dormant-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(201,169,97,0.08);
  border: 1px solid rgba(201,169,97,0.30);
  border-left: 3px solid #C9A961;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.baa-dormant-banner .bdb-icon {
  font-size: 20px;
  line-height: 1.2;
  color: #C9A961;
  flex-shrink: 0;
}
.baa-dormant-banner .bdb-text strong {
  display: block;
  color: #E8D49E;
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.baa-dormant-banner .bdb-text p {
  margin: 0;
  color: rgba(232,221,201,0.75);
  font-size: 12px;
  line-height: 1.55;
}


/* ====== Dashboard Usage Bar ====== */
.dash-usage {
  background: rgba(21,20,15,0.55);
  border: 1px solid rgba(201,169,97,0.12);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
}
.du-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.du-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(201,169,97,0.75);
  font-weight: 600;
}
.du-meta { font-size: 12px; color: rgba(232,221,201,0.70); }
.du-unlimited { font-size: 12px; color: #9bd64a; letter-spacing: 0.03em; }
.du-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}
.du-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
  /* Gradiente progresivo: dorado (poco uso) -> rojo (cerca del límite).
     El gradiente está anclado al ANCHO COMPLETO de la barra (background-size 100% del track),
     así el color visible en la punta depende de qué tan llena esté el fill.
     A 10% solo se ve el dorado del inicio; a 90% ya asoma el rojo del final. */
  background-image: linear-gradient(90deg,
    #C9A961 0%,      /* dorado */
    #E8C16A 35%,     /* champagne */
    #D9A441 55%,     /* ámbar */
    #D98341 78%,     /* naranja */
    #C0392B 100%);   /* rojo (límite) */
  background-size: var(--track-w, 100%) 100%;
  background-repeat: no-repeat;
}
/* Cuando está en bloqueo (>=110%) reforzar el rojo en toda la barra */
.du-fill.blocked {
  background-image: linear-gradient(90deg, #C0392B, #E05A48);
}
.du-note {
  font-size: 11px;
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.du-note.warn   { color: #d9a870; }
.du-note.limit  { color: #E89A5A; }
.du-note.blocked{ color: #E86A58; font-weight: 600; }
.du-sub-label {
  font-size: 10px;
  color: rgba(232,221,201,0.55);
  letter-spacing: 0.08em;
  margin: 6px 0 3px;
}

.du-breakdown {
  font-size: 11px;
  color: rgba(232,221,201,0.50);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

.sc-trend.sc-trend-note { color: rgba(232,196,158,0.70); }


/* DOCX preview opt-in card */
.spp-docx-card { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:24px 18px; }
.spp-docx-btn {
  margin-top:6px; padding:9px 18px; border-radius:8px; cursor:pointer;
  background:linear-gradient(135deg,#c8b88a,#b09a5e); color:#1a1a1a;
  border:none; font-weight:600; font-size:13px; letter-spacing:.3px;
  transition:filter .15s ease, transform .1s ease;
}
.spp-docx-btn:hover { filter:brightness(1.08); }
.spp-docx-btn:active { transform:translateY(1px); }
.spp-docx-tip { margin-top:8px; font-size:11px; line-height:1.5; color:#7d735f; max-width:300px; text-align:center; }
.spp-docx-why { font-size:11.5px; line-height:1.55; max-width:320px; }

/* ===== Onboarding step 5: Verify email ===== */
.onb-verify-email-box {
  background: #0a0a0a;
  border: 1px solid rgba(201,169,97,0.30);
  border-radius: 10px;
  padding: 18px 24px;
  text-align: center;
  margin: 22px 0 18px 0;
  color: #E8D49E;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.onb-verify-instructions {
  color: #b8ad97;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  margin: 12px 0 22px 0;
}

/* ===== Banner: solo hay numeros cercanos, no exact match ===== */
.onb-did-nearby-notice {
  background: rgba(212, 131, 131, 0.10);
  border: 1px solid rgba(212, 131, 131, 0.45);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 14px 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #D48383;
}
.onb-did-nearby-text strong {
  color: #D48383;
  font-weight: 600;
}

/* ============ L-NEURO MD CROSS-PROMO ============ */
/* Estetica hibrida: base dark+gold (LuzardoFax) + acento cyan (L-Neuro). */
.lnx-promo-link{
  display:flex; align-items:center; gap:12px;
  padding:10px 12px; border-radius:8px; margin:2px 0;
  color:rgba(232,221,201,0.65); text-decoration:none;
  font-size:13.5px; cursor:pointer; transition:all .15s ease;
}
.lnx-promo-link i{ font-size:17px; color:#35d6fc; flex-shrink:0; }
.lnx-promo-logo{ width:20px; height:20px; object-fit:contain; flex-shrink:0; border-radius:4px; }
.lnx-promo-link:hover{ background:rgba(53,214,252,0.07); color:#E8DDC9; }

.lnx-overlay{
  position:fixed; inset:0; z-index:2000; padding:20px;
  display:flex; align-items:center; justify-content:center;
  background:rgba(8,7,5,.88);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  opacity:0; transition:opacity .25s ease;
}
.lnx-overlay.open{ opacity:1; }
.lnx-overlay[hidden]{ display:none; }

.lnx-card{
  position:relative; width:100%; max-width:460px;
  background:linear-gradient(160deg,#1c1a14 0%, #15140f 100%);
  border:1px solid rgba(201,169,97,.28);
  border-radius:16px; padding:52px 32px 28px; text-align:center;
  box-shadow:0 24px 60px rgba(0,0,0,.55);
  transform:translateY(12px) scale(.98); transition:transform .25s cubic-bezier(.2,.8,.2,1);
}
.lnx-overlay.open .lnx-card{ transform:translateY(0) scale(1); }

.lnx-close{
  position:absolute; top:14px; right:14px; width:32px; height:32px;
  background:transparent; border:1px solid rgba(201,169,97,.35); border-radius:8px;
  color:#C9A961; font-size:20px; cursor:pointer; transition:.2s;
  display:flex; align-items:center; justify-content:center; padding:0;
  line-height:1; font-family:Arial,sans-serif;
}
.lnx-close:hover{ border-color:#C9A961; color:#C9A961; }

.lnx-kicker{
  display:inline-flex; align-items:center; gap:8px; margin-bottom:14px;
  font-size:10.5px; font-weight:600; letter-spacing:.14em; text-transform:uppercase;
  color:#7d735f;
}
.lnx-dot{
  width:6px; height:6px; border-radius:50%; background:#35d6fc;
  box-shadow:0 0 0 0 rgba(53,214,252,.5); animation:lnxPulse 2.2s infinite;
}
@keyframes lnxPulse{
  0%{box-shadow:0 0 0 0 rgba(53,214,252,.45)}
  70%{box-shadow:0 0 0 7px rgba(53,214,252,0)}
  100%{box-shadow:0 0 0 0 rgba(53,214,252,0)}
}

.lnx-title{
  font-family:'Michroma',sans-serif; font-size:21px; line-height:1.25; font-weight:400;
  color:#F0E6D2; margin:0 0 14px;
}
.lnx-desc{
  font-size:14px; line-height:1.6; color:#b8ad97; margin:0 auto 24px; max-width:380px;
}

.lnx-actions{ display:flex; gap:12px; justify-content:center; align-items:center; flex-wrap:wrap; }
.lnx-cta{
  display:inline-flex; align-items:center; gap:8px; padding:12px 24px; border-radius:10px;
  text-decoration:none; font-size:14px; font-weight:500; color:#15140f;
  background:linear-gradient(135deg,#d9bd7e,#C9A961); border:1px solid rgba(201,169,97,.6);
  transition:transform .2s, box-shadow .2s;
}
.lnx-cta:hover{ transform:translateY(-1px); box-shadow:0 8px 22px rgba(201,169,97,.3); }
.lnx-cta i{ transition:transform .2s; }
.lnx-cta:hover i{ transform:translateX(3px); }

.lnx-ghost{
  padding:12px 18px; border-radius:10px; cursor:pointer; font-size:13.5px; font-weight:400;
  background:transparent; border:1px solid rgba(201,169,97,.25); color:rgba(201,169,97,.7);
  transition:.2s;
}
.lnx-ghost:hover{ border-color:#C9A961; color:#C9A961; }

@media(prefers-reduced-motion:reduce){
  .lnx-dot{animation:none}
  .lnx-overlay,.lnx-card{transition:none}
}

/* ============ 2FA polish ============ */
/* Casillas OTP */
.otp-row { display:flex; gap:10px; justify-content:center; margin:4px 0; }
.otp-box {
  width:48px; height:58px; text-align:center;
  font-family:'JetBrains Mono', monospace; font-size:26px; font-weight:500;
  color:#E8DDC9; background:rgba(201,169,97,0.05);
  border:1px solid rgba(201,169,97,0.25); border-radius:10px;
  transition:border-color .15s, background .15s; caret-color:#C9A961;
}
.otp-box:focus {
  outline:none; border-color:#C9A961; background:rgba(201,169,97,0.10);
  box-shadow:0 0 0 3px rgba(201,169,97,0.12);
}
.otp-box.filled { border-color:rgba(201,169,97,0.5); }
.otp-row.error .otp-box { border-color:rgba(217,112,112,0.6); }
.otp-backup-input {
  text-align:center; font-family:'JetBrains Mono', monospace;
  font-size:20px; letter-spacing:0.2em; text-transform:uppercase;
  height:54px; color:#E8DDC9; background:rgba(201,169,97,0.05);
  border:1px solid rgba(201,169,97,0.25); border-radius:10px; caret-color:#C9A961;
}
.otp-backup-input:focus {
  outline:none; border-color:#C9A961; background:rgba(201,169,97,0.10);
  box-shadow:0 0 0 3px rgba(201,169,97,0.12);
}

/* QR con marco dorado */
.twofa-qr-frame {
  display:inline-block; padding:12px; border-radius:14px;
  background:#fff; border:2px solid #C9A961;  /* blanco-ok: un QR sin fondo claro no se escanea */
  box-shadow:0 0 30px rgba(201,169,97,0.2);
}
.twofa-qr-frame img { display:block; width:184px; height:184px; }

/* Key manual: grande y legible */
.twofa-key-box {
  font-family:'JetBrains Mono', monospace; font-size:14px; letter-spacing:0.08em;
  color:#C9A961; background:rgba(201,169,97,0.08); border:1px solid rgba(201,169,97,0.2);
  border-radius:8px; padding:12px 18px; margin:10px auto; text-align:center;
  white-space:nowrap; overflow-x:auto; max-width:none; width:fit-content;
  user-select:all; cursor:copy;
}

/* Backup codes en grid 2 columnas */
.twofa-backup-grid {
  display:grid; grid-template-columns:repeat(5, 1fr); gap:10px 18px;
  font-family:'JetBrains Mono', monospace; font-size:14px; letter-spacing:0.05em;
  color:#C9A961; background:rgba(201,169,97,0.06); border:1px solid rgba(201,169,97,0.15);
  border-radius:10px; padding:18px 20px; margin:12px 0;
}
@media (max-width:640px){ .twofa-backup-grid { grid-template-columns:repeat(2, 1fr); } }
.twofa-backup-copy {
  display:inline-flex; align-items:center; gap:7px; cursor:pointer;
  background:transparent; border:1px solid rgba(201,169,97,0.3); border-radius:8px;
  color:#C9A961; font-size:12.5px; padding:7px 14px; transition:.2s; margin-top:4px;
}
.twofa-backup-copy:hover { border-color:#C9A961; background:rgba(201,169,97,0.08); }
.twofa-backup-copy.copied { color:#9bd64a; border-color:rgba(126,211,33,0.4); }
.twofa-backup-grid span { text-align:center; padding:2px 0; }

/* Badge "2FA activo" */
.twofa-active-badge {
  display:inline-flex; align-items:center; gap:8px;
  font-size:12px; font-weight:600; letter-spacing:0.1em; text-transform:uppercase;
  color:#9bd64a; background:rgba(126,211,33,0.10);
  border:1px solid rgba(126,211,33,0.3); border-radius:999px;
  padding:5px 14px; margin-bottom:14px;
}
.twofa-active-badge .dot {
  width:7px; height:7px; border-radius:50%; background:#9bd64a;
  box-shadow:0 0 8px rgba(126,211,33,0.5);
}

/* Botón disable con tinte de advertencia sutil */
#twofaDisableBtn {
  border-color:rgba(180,55,55,0.35) !important; color:rgba(217,112,112,0.85) !important;
}
#twofaDisableBtn:hover {
  border-color:rgba(180,55,55,0.55) !important; background:rgba(180,55,55,0.10) !important;
}

/* Casillas backup (8 hex + guion) — más chicas que las 6 del TOTP */
.otp-backup-row { gap:6px; flex-wrap:nowrap; }
.otp-backup-row .otp-box {
  width:34px; height:48px; font-size:19px;
}
.otp-dash {
  display:flex; align-items:center; color:rgba(201,169,97,0.5);
  font-size:22px; font-weight:300; padding:0 2px;
}


/* Regenerar backup codes: input inline + botón */
.twofa-regen-row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.twofa-regen-input {
  width:120px; text-align:center; font-family:'JetBrains Mono', monospace;
  font-size:18px; letter-spacing:0.15em; flex-shrink:0;
}


/* 2FA: subbloques separados (regenerar / desactivar) */
.twofa-subblock {
  margin-top:20px; padding-top:18px; border-top:1px solid rgba(201,169,97,0.12);
}
/* El separador va dorado como todos: en rojo parecia un aviso de error. */
.twofa-subblock-danger { border-top-color:rgba(201,169,97,0.12); }
.twofa-subtitle {
  font-size:14px; font-weight:500; color:#E8DDC9; margin:0 0 6px;
  letter-spacing:0.02em;
}
.twofa-action-row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-top:10px; }
.twofa-inline-code {
  width:130px; text-align:center; font-family:'JetBrains Mono', monospace;
  font-size:18px; letter-spacing:0.15em; flex-shrink:0;
}


/* 2FA disable btn altura: igualar al btn-gold */
#twofaDisableBtn { padding:12px 24px; line-height:1.2; }



}


/* ===== Equipo (tabla) ===== */
.team-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:nowrap; }
.team-title-row { display:flex; align-items:baseline; gap:12px; }
.team-count {
  font-size:11.5px; color:#C9A961; white-space:nowrap; flex-shrink:0;
  font-weight:500; font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; letter-spacing:0.02em;
  padding:3px 10px; border:1px solid rgba(201,169,97,0.3);
  border-radius:999px; background:rgba(201,169,97,0.06);
  text-transform:none; line-height:1.6;
}
.team-table { margin:16px 0; width:100%; }
.team-table {
  display:grid;
  grid-template-columns: max-content max-content minmax(180px, 1fr) max-content max-content 60px;
  column-gap:0; align-items:center;
  overflow-x:auto;
}
.team-thead, .team-trow { display:contents; }
/* Header: font uniforme en TODAS las columnas (pisa los font-size de .tc-*) */
.team-thead > div {
  font-size:11px !important; font-weight:500; color:#7d735f !important;
  font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif !important; letter-spacing:0.05em;
  padding-left:9px; padding-right:9px;
}
.team-thead > div {
  padding:0 0 10px; letter-spacing:0.05em; text-transform:uppercase;
  border-bottom:1px solid rgba(201,169,97,0.12);
}
.team-trow > div {
  padding:14px 9px; border-bottom:1px solid rgba(201,169,97,0.08);
  display:flex; align-items:center; min-height:68px; box-sizing:border-box;
}
.team-trow > div:first-child { padding-left:0; }
.team-trow > div:last-child { padding-right:0; }
.team-trow:hover > div { background:rgba(201,169,97,0.03); }
.team-trow-inactive { opacity:0.5; }
.team-row-name { font-size:13.5px; color:#E8DDC9; font-weight:500; white-space:nowrap; }
.team-you { color:#C9A961; font-weight:400; font-size:11.5px; margin-right:4px; }
.team-row-username { font-size:11.5px; color:#9a8f7a; margin-top:2px; font-family:'JetBrains Mono', monospace; }
.tc-username { font-size:12.5px; color:#C9A961; font-family:'JetBrains Mono', monospace; }
.tc-email { font-size:12.5px; color:#b8ad97; font-family:'JetBrains Mono', monospace; white-space:nowrap; }
.tc-status { font-size:12.5px; color:#b8ad97; white-space:nowrap; }
.team-2fa-inline { font-size:12px; color:#7d735f; }
.team-role-select {
  width:100%; background:#15140f; border:1px solid rgba(201,169,97,0.25); color:#E8DDC9;
  border-radius:8px; padding:8px 10px; font-size:12.5px; cursor:pointer;
}
.team-role-select:disabled { opacity:0.45; cursor:default; }
.tc-actions { display:flex; gap:8px; justify-content:flex-start; }
.team-thead .tc-actions { display:block; text-align:left; }
.tc-actions .btn-ghost { height:40px; min-width:100px; padding:0 14px; font-size:12px; white-space:nowrap; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; line-height:1; }
/* Mismo separador que .team-seats-box: las tres zonas del tab (lista, alta de
   usuario, asientos) se leen como bloques hermanos y no como uno dentro de otro. */
.team-add-row { display:flex; gap:16px; flex-wrap:wrap; align-items:center;
  justify-content:space-between; margin-top:0; padding:18px 2px 4px;
  border-top:1px solid rgba(201,169,97,0.12); }
.team-btns-group { display:flex; gap:12px; align-items:center; }
.team-add-row .btn-gold, .team-add-row .btn-ghost { height:40px; padding:0 22px; font-size:13px; display:inline-flex; align-items:center; box-sizing:border-box; line-height:1; }
.team-limit-note { color:#9a8f7a; margin-top:14px; font-size:13px; }
@media (max-width:760px){
  .team-thead { display:none; }
  .team-table { display:block; overflow-x:visible; }
  .team-trow { display:grid; grid-template-columns:1fr; gap:6px; padding:14px; border:1px solid rgba(201,169,97,0.15); border-radius:10px; margin-bottom:10px; }
  .team-trow > div { padding:0; border-bottom:none; min-height:0; }
  .tc-actions { justify-content:flex-start; margin-top:6px; }
  .team-role-select { width:auto; }
}

/* fc-actions: ghost igualado al gold (altura + uppercase) */
.fc-actions .btn-ghost {
  height: 41px; padding-top: 0; padding-bottom: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; line-height: 1;
  text-transform: uppercase; letter-spacing: 0.20em; font-size: 12px;
}
.team-add-row .btn-ghost { text-transform: uppercase; }

/* Accept-invite screen: centrar como reset */
#acceptInviteScreen.login-container {
  min-height: 100vh;
  align-items: center;
  justify-content: center;
}
@media (max-height: 800px) {
  #acceptInviteScreen.login-container { align-items: flex-start; padding: 20px 24px; }
}
.invite-error {
  background: rgba(180,55,55,0.08);
  border: 1px solid rgba(180,55,55,0.30);
  color: rgba(232,165,165,0.95);
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 0 0 14px;
  text-align: center;
}

/* invite-error: asegurar visible cuando no esta hidden */
.invite-error:not([hidden]) { display: block !important; }

/* dropdown de rol en fila: separar texto del arrow */
.tc-role .lfx-dd-trigger { padding-right:34px; }
/* La columna de rol es max-content: el navegador la mide con el <select> nativo
   oculto, sin contar el padding-right de la flecha del dropdown custom. Sin un
   min-width, el label se corta con ellipsis. 13ch cubre el texto mas largo
   ('Administrador' / 'Administrator') mas el espacio de la flecha. */
.tc-role .lfx-dd { min-width: 13ch; }
.tc-role .lfx-dd-trigger { min-width: 13ch; box-sizing: border-box; }
/* El trigger hereda .fld-flat (13.5px / #E8DDC9, estilo de formulario), pero en
   la tabla debe igualar a .team-role-fixed y al resto de celdas: 12.5px / #b8ad97. */
.tc-role .lfx-dd-label { overflow: visible; text-overflow: clip; font-size:12.5px; color:#b8ad97; }
.tc-role .lfx-dd-trigger.fld-flat { font-size:12.5px; }
/* El menu crece con su contenido si hace falta, sin desbordar la pantalla */
.tc-role .lfx-dd-menu { min-width: 100%; width: max-content; max-width: 260px; }
.tc-role .team-role-select { padding-right:30px; }

/* Rol fijo (owner/ultimo admin): texto plano sin control */
.team-role-fixed {
  display:inline-block;
  font-size:12.5px;
  color:#b8ad97;
  padding:8px 2px;
}

/* Tab Equipo: card mas ancho para que la tabla respire */

/* Modal editar usuario */
.lfx-edit-form { display:flex; flex-direction:column; gap:4px; text-align:left; }
.lfx-edit-form .fld-label { margin-top:10px; }
.lfx-edit-form .fld-input { width:100%; box-sizing:border-box; }
.lfx-temp-pwd { display:flex; gap:10px; align-items:center; justify-content:center; }
.lfx-temp-pwd code {
  font-family:'JetBrains Mono', monospace; font-size:15px; color:#C9A961;
  background:rgba(201,169,97,0.08); border:1px solid rgba(201,169,97,0.30);
  padding:10px 14px; border-radius:8px; letter-spacing:0.05em;
}

/* Menu de acciones por fila (kebab) */
.team-actions-menu { position:relative; display:flex; justify-content:flex-end; width:100%; }
.tc-actions .team-kebab, .team-kebab {
  height:40px; width:40px; min-width:40px !important; max-width:40px; padding:0; font-size:18px; line-height:1;
  display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box;
}
.team-menu {
  position:absolute; top:calc(100% + 6px); right:0; z-index:1000; min-width:200px;
  background:#111111; border:1px solid rgba(201,169,97,0.30); border-radius:10px;
  padding:6px 0; box-shadow:0 12px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.4); display:flex; flex-direction:column; gap:0;
}
.team-menu[hidden] { display:none; }
.team-menu-item {
  background:transparent; border:none; color:#E8DDC9; text-align:left;
  padding:10px 14px; font-size:13px; letter-spacing:0.03em; cursor:pointer; font-family:inherit;
  white-space:nowrap; transition:background-color 0.1s ease, color 0.1s ease;
}
.team-menu-item:hover, .team-menu-item:focus { background:rgba(201,169,97,0.12); color:#E8D49E; outline:none; }
.team-menu-item.danger { color:#d97070; }
.team-menu-item.danger:hover { background:rgba(180,55,55,0.10); color:#d97070; }

/* Checkbox recordar dispositivo (login 2FA) */
.lfx-remember-device {
  display:flex; align-items:center; gap:8px; justify-content:center;
  margin:16px 0 18px; font-size:12.5px; color:rgba(232,221,201,0.75); cursor:pointer;
}
.lfx-remember-device input {
  width:15px; height:15px; cursor:pointer; appearance:none; -webkit-appearance:none;
  background:transparent; border:1px solid rgba(201,169,97,0.45); border-radius:4px; position:relative;
}
.lfx-remember-device input:checked { background:#C9A961; border-color:#C9A961; }
.lfx-remember-device input:checked::after {
  content:''; position:absolute; left:50%; top:45%; transform:translate(-50%,-50%) rotate(45deg); width:4px; height:8px;
  border:solid #0a0a0a; border-width:0 2px 2px 0;
}

/* Banner inline de exito dentro de forms (mismo patron que invite-error) */
.lfx-inline-ok {
  background: rgba(201,169,97,0.10);
  border: 1px solid rgba(201,169,97,0.40);
  color: #C9A961;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  margin: 0 0 14px;
  text-align: center;
}

/* Sub-container "Requerir 2FA" en tab Equipo (patron Compliance .baa-ots-section) */
.team-req2fa-section {
  margin-top: 22px;
  padding: 6px 20px;
  background: rgba(201, 169, 97, 0.04);
  border: 1px solid rgba(201, 169, 97, 0.12);
  border-radius: 10px;
}
.team-req2fa-section .switch-row { border-bottom: none; }

/* Separacion uniforme entre form-cards adyacentes en todos los tabs de Settings */
.st-panel .form-card + .form-card { margin-top: 18px; }

/* Frame rojo para campo invalido */
.fld-flat.fld-invalid, .fld-input.fld-invalid { border-color: rgba(217,112,112,0.7) !important; }

/* Accept-invite: valor en una sola linea */
#inviteEmailValue { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Accept-invite: password reqs a 2 columnas con mas aire (card angosto) */
#inviteForm .sub-pw-reqs { grid-template-columns: repeat(2, 1fr); gap: 8px 18px; margin: 10px 0 18px; }
#inviteForm .sub-pw-reqs li { font-size: 11px; line-height: 1.3; white-space: nowrap; }
#inviteForm .sub-pw-reqs li .sub-pw-txt { overflow: hidden; text-overflow: ellipsis; }
#inviteForm .sub-pw-reqs li.met .sub-pw-dot { box-shadow: none; transform: none; }
#inviteForm .sub-pw-strength-label { text-shadow: none; font-weight: 500; }
#inviteForm .sub-pw-strength { margin-top: 14px; }

/* Alineacion de columnas: cada fila es su propio grid; min-width:0 evita que
   contenido largo (emails) ensanche su columna y desalinee entre filas */
.team-trow .tc-name, .team-trow .tc-username, .team-trow .tc-email { white-space:nowrap; }

/* Badge 2FA en tabla equipo */
.team-2fa-badge {
  display:inline-block; padding:3px 10px; border-radius:20px;
  font-size:10.5px; letter-spacing:0.06em; margin-left:8px;
  white-space:nowrap;
}
.team-2fa-badge.off {
  color:#9a8f7a; border:1px solid rgba(201,169,97,0.25);
  background:rgba(201,169,97,0.06);
}
.team-2fa-badge.on {
  color:#9bd64a; border:1px solid rgba(126,211,33,0.3);
  background:rgba(126,211,33,0.12);
}

/* El menu kebab no debe ser recortado por el overflow del grid de la tabla */
.team-table { overflow: visible; }

/* Hint bajo los botones de Add/Invite */
/* Texto plano, como .seats-info: con fondo y borde parecia una caja aparte y
   competia visualmente con los botones que explica. */
.team-btns-hint { text-align:left; padding:0; }
.team-btns-hint p { margin:0 0 4px; font-size:12px; color:#7d735f; line-height:1.5; }
.team-btns-hint p:last-child { margin-bottom:0; }
/* El titulo copia el formato de .seats-info; las dos lineas de detalle se quedan
   como estaban. El selector > evita que el titulo herede el estilo pequeno. */
.team-btns-hint > strong { display:block; color:#E8DDC9; font-size:13.5px; margin-bottom:3px; }
.team-btns-hint p strong { color:rgba(201,169,97,0.85); font-weight:500; }

/* Login 2FA: label y descripcion centrados (coherente con la card) */
#login2faStep .fld-label, #login2faStep .fc-desc { text-align:center; display:block; }

/* Dropdown con busqueda */
.lfx-dd-search { padding: 8px 10px 6px; position: sticky; top: 0; background: #15140f; z-index: 1; list-style: none; }
.lfx-dd-search-input {
  width: 100%; box-sizing: border-box; padding: 8px 12px; font-size: 12.5px;
  background: rgba(0,0,0,0.35); border: 1px solid rgba(201,169,97,0.25);
  border-radius: 8px; color: #E8DDC9; outline: none;
}
.lfx-dd-search-input:focus { border-color: rgba(201,169,97,0.5); }
.lfx-dd-has-search .lfx-dd-menu { max-height: 280px; overflow-y: auto; }

/* Atencion: pulso dorado cuando aparece un field nuevo */
@keyframes lfxFieldAttn {
  0%, 100% { box-shadow: none; }
  25%, 75% { box-shadow: 0 0 0 2px rgba(201,169,97,0.45); }
}
.fld-attn .fld-flat, .fld-attn .lfx-dd-trigger { animation: lfxFieldAttn 1.3s ease 2; border-radius: 10px; }

/* Sub-container Other industria (patron Compliance) */
.org-other-section {
  margin: 4px 0 16px; padding: 16px 20px 6px;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12); border-radius: 10px;
}
.org-other-section .org-phi-row { border-bottom: none; padding-top: 6px; }

/* Footer del sub-container Other */
.org-other-footer { display:flex; align-items:center; justify-content:flex-end; gap:14px; padding:6px 0 10px; }
.org-other-q { font-size:11.5px; color:#7d735f; }
.org-other-btn { height:41px; padding:0 18px; font-size:12px; display:inline-flex; align-items:center; justify-content:center; line-height:1; box-sizing:border-box; white-space:nowrap; }
.org-other-section .fld-wrap { margin-bottom: 4px; }

/* PHI + back en una fila */
.org-phi-back-row { display:flex; align-items:center; gap:18px; }
.org-phi-back-row .org-phi-section { flex:1; margin:4px 0; padding:0 18px; }
.org-phi-back-row .org-phi-row { padding:8px 0; }
.org-phi-back-row .org-phi-row { border-bottom:none; }
.org-phi-back-row .org-other-btn { flex-shrink:0; }
/* Opcion destacada (no esta en la lista) */
.lfx-dd-option.lfx-dd-accent { color:#C9A961; font-style:italic; border-bottom:1px solid rgba(201,169,97,0.12); }

/* Fila dropdown + boton clear */
.org-other-dd-row { display:flex; gap:10px; align-items:center; }
.org-other-dd-row .lfx-dd { flex:1; }

/* Sub-container PHI dentro del modo escritura */
.org-phi-section {
  margin: 6px 0 4px; padding: 4px 18px;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12); border-radius: 10px;
}
.org-phi-section .org-phi-row { border-bottom: none; }

/* Sugerencias */
.sug-textarea { resize: vertical; min-height: 96px; font-family: inherit; line-height: 1.5; }
.sug-counter { text-align: right; font-size: 11px; color: #7d735f; margin-top: 4px; }
.sug-error { color: #d48383; font-size: 12.5px; margin: 6px 0; }
.sug-list-wrap { margin-top: 22px; }
.sug-item {
  padding: 12px 16px; margin-bottom: 10px;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12); border-radius: 10px;
}
.sug-item-msg { color: #E8DDC9; font-size: 13px; line-height: 1.5; }
.sug-item-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.sug-item-date { font-size: 11px; color: #7d735f; }
.sug-status {
  font-size: 10px; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 20px;
  border: 1px solid rgba(201,169,97,0.30); color: #C9A961; background: rgba(201,169,97,0.08);
}
.sug-status.planned, .sug-status.done { color: #9bd64a; border-color: rgba(126,211,33,0.3); background: rgba(126,211,33,0.12); }
.sug-status.declined { color: #d48383; border-color: rgba(212,131,131,0.30); background: rgba(212,131,131,0.10); }

/* Botones quitar sugerencias */
.sug-remove {
  margin-left: auto; background: none; border: none; cursor: pointer;
  font-size: 10px; letter-spacing: 0.08em; color: #7d735f; padding: 2px 4px;
}
.sug-remove:hover { color: #d48383; }
.sug-list-head { display: flex; align-items: baseline; justify-content: space-between; }

/* Foto de perfil / logo */
.pi-row { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.pi-preview {
  width: 84px; height: 84px; border-radius: 12px; flex-shrink: 0;
  background: rgba(201,169,97,0.06); border: 1px solid rgba(201,169,97,0.18);
  display: flex; align-items: center; justify-content: center;
  color: rgba(201,169,97,0.45); font-size: 30px; overflow: hidden;
}
.pi-preview img { width: 100%; height: 100%; object-fit: cover; }
.pi-preview.pi-logo { border-radius: 12px; }
.pi-preview.pi-logo img { object-fit: contain; padding: 6px; box-sizing: border-box; }
/* ---- Aviso de servicio en el sidebar ---- */
/* Mismo ancho y caja que .sb-clock: sin margen lateral, el sidebar ya lo da. */
/* Misma caja neutra que .sb-clock. El rojo se reserva al punto y al titulo:
   asi el aviso destaca por contraste, no por saturacion. */
.sb-alert {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 9px;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(217,112,112,0.28);
}
.sb-alert-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sb-alert-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #d97070; flex-shrink: 0;
  animation: sbAlertPulse 1.6s ease-in-out infinite;
}
@keyframes sbAlertPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.sb-alert-title {
  font-family: 'Michroma', sans-serif; font-size: 8px; letter-spacing: 0.14em;
  color: #D48383; text-transform: uppercase; white-space: nowrap;
}
/* Mismo tratamiento que .sb-clock-date: misma fuente, tamano y color. */
.sb-alert-txt {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  color: rgba(201,169,97,0.65); letter-spacing: 0.02em;
  margin-bottom: 9px; white-space: nowrap;
}
.sb-alert-btn {
  width: 100%; height: 30px; border-radius: 7px; cursor: pointer;
  background: rgba(201,169,97,0.10); border: 1px solid rgba(201,169,97,0.35);
  color: #E8D49E; font-family: 'Michroma', sans-serif; font-size: 8px; letter-spacing: 0.14em;
  text-transform: uppercase; transition: background 0.15s, border-color 0.15s;
}
.sb-alert-btn:hover { background: rgba(201,169,97,0.20); border-color: rgba(201,169,97,0.6); }

/* ---- Selector de plan (modal de cambio) ---- */
/* Modal ancho: solo cuando se pide con opts.cardClass. Los demas siguen a 440px. */
.lfx-modal-card.lfx-modal-wide { max-width: 760px; }

/* Rejilla 2x2 dentro del modal ancho. */
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card {
  display: flex; flex-direction: column;
  padding: 22px 20px; border-radius: 12px; text-align: left;
  background: rgba(255,255,255,0.018); border: 1px solid rgba(201,169,97,0.12);
  transition: border-color 0.25s, transform 0.25s;
}
.plan-card:hover { border-color: rgba(201,169,97,0.35); transform: translateY(-2px); }
.plan-card-current {
  border-color: rgba(201,169,97,0.55);
  background: linear-gradient(180deg, rgba(201,169,97,0.08) 0%, rgba(201,169,97,0.02) 100%);
}
.plan-card-blocked { opacity: 0.7; }
.plan-card-blocked:hover { transform: none; border-color: rgba(201,169,97,0.12); }
/* Nombre en dorado con tracking amplio, igual que el landing */
.plan-card-name {
  font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: #C9A961; margin-bottom: 12px;
}
.plan-card-price { display: flex; align-items: baseline; gap: 5px; margin-bottom: 3px; }
.plan-card-price .amount { font-size: 34px; font-weight: 300; letter-spacing: -0.025em; color: #E8DDC9; }
.plan-card-price .per { font-size: 12.5px; color: rgba(232,221,201,0.45); }
.plan-card-pages { font-size: 12.5px; color: #E8D49E; margin-bottom: 14px; }
/* Metricas como filas con separador y guion dorado */
.plan-card-feats { list-style: none; padding: 0; margin: 0 0 16px; flex: 1; border-top: 1px solid rgba(201,169,97,0.10); }
.plan-card-feats li {
  padding: 9px 0 9px 16px; font-size: 12px; font-weight: 300; line-height: 1.5;
  color: rgba(232,221,201,0.62); position: relative;
  border-bottom: 1px solid rgba(201,169,97,0.10);
}
.plan-card-feats li::before {
  content: ''; position: absolute; left: 0; top: 15px;
  width: 8px; height: 1px; background: #C9A961;
}
.plan-card-feats li:last-child { border-bottom: none; }
.plan-card-btn { width: 100%; height: 40px; font-size: 11.5px; margin-top: auto; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.plan-card-badge {
  display: inline-flex; align-items: center; justify-content: center;
  height: 38px; border-radius: 8px; box-sizing: border-box;
  font-size: 10.5px; letter-spacing: 0.06em; font-weight: 600; text-transform: uppercase;
  color: #C9A961; background: rgba(201,169,97,0.10); border: 1px solid rgba(201,169,97,0.30);
}
.plan-card-warn { margin: 0; font-size: 11px; color: #d9a870; line-height: 1.5; }

/* ---- Numeros de fax: cuota y filas ---- */
.num-quota {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 14px; margin-bottom: 12px; flex-wrap: wrap;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12); border-radius: 10px;
}
.num-quota-txt { font-size: 12.5px; color: #b8ad97; font-family: 'JetBrains Mono', monospace; }
.num-quota-full { font-size: 12px; color: rgba(232,221,201,0.55); }
.num-row-right { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* LEY DE BADGES: ancho uniforme para que la columna quede alineada. */
.num-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 96px; box-sizing: border-box;
  padding: 3px 10px; border-radius: 20px;
  font-size: 10.5px; letter-spacing: 0.06em; font-weight: 600;
  text-transform: uppercase; white-space: nowrap; border: 1px solid transparent;
}
.num-badge-primary { color: #C9A961; background: rgba(201,169,97,0.10); border-color: rgba(201,169,97,0.30); }
.num-badge-incl    { color: #9bd64a; background: rgba(155,214,74,0.10); border-color: rgba(155,214,74,0.28); }
.num-badge-extra   { color: #E8D49E; background: rgba(201,169,97,0.08); border-color: rgba(201,169,97,0.22); min-width: 130px; }
/* Pie de acciones: mismo patron que .team-add-row */
.num-add-row {
  display: flex; gap: 16px; flex-wrap: nowrap; align-items: center;
  justify-content: space-between; margin-top: 8px;
}
/* En movil el boton baja debajo del texto. */
@media (max-width: 640px) { .num-add-row { flex-wrap: wrap; } }
.num-add-row .btn-gold,
#portStartActions .btn-gold {
  height: 40px; padding: 0 22px; font-size: 13px; min-width: 200px;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; line-height: 1;
  white-space: nowrap; flex-shrink: 0;
}
.num-btns-hint { flex: 1 1 auto; min-width: 0; padding-right: 8px; }
/* Texto de ayuda al pie de una tarjeta. Canon unico: 11px, terciario,
   interlineado 1.5. Lo que va en negrita es el nombre de un boton o un
   aviso, y usa .hint-btn. */
.card-hint,
.num-btns-hint p {
  margin: 0 0 4px; font-size: 11px; color: #7d735f; line-height: 1.5;
}
.card-hint:last-child,
.num-btns-hint p:last-child { margin-bottom: 0; }
.card-hint strong, .num-btns-hint strong, .hint-btn {
  color: #E8D49E; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap;
}
/* 'Antes de empezar:' es una frase, no el nombre de un boton: puede partir. */
.card-hint-wrap strong { white-space: normal; }
/* Badge de estado de una orden de porting. Mismo canon que .num-badge, pero
   sin min-width fijo: los estados son frases ('En proceso con tu carrier'). */
.port-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 20px; box-sizing: border-box;
  font-size: 10.5px; letter-spacing: 0.06em; font-weight: 600;
  text-transform: uppercase; white-space: nowrap; border: 1px solid transparent;
  margin-left: 12px; flex-shrink: 0;
}
.port-badge-ok   { color: #9bd64a; background: rgba(155,214,74,0.10); border-color: rgba(155,214,74,0.28); }
.port-badge-err  { color: #d97070; background: rgba(217,112,112,0.10); border-color: rgba(217,112,112,0.30); }
.port-badge-wait { color: #C9A961; background: rgba(201,169,97,0.08); border-color: rgba(201,169,97,0.25); }

/* El campo lleva <label> encima y el boton no: alinear por la base no basta,
   hay que igualar la altura del boton a la del input (.fld-flat). */
.num-search-row { display: flex; gap: 10px; align-items: flex-end; margin: 14px 0; flex-wrap: wrap; }
.num-search-row .fld-wrap { margin-bottom: 0; }
.num-search-row .btn-gold {
  height: 44px; padding: 0 22px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; line-height: 1;
}
.num-result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; margin-bottom: 8px;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12); border-radius: 10px;
}
.num-result-num { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: #E8DDC9; }

.pi-btns { display: flex; gap: 10px; margin: 8px 0 6px; }
.pi-btn { height: 34px; padding: 0 14px; font-size: 11px; display: inline-flex; align-items: center; }
/* Aire sobre el hint: pegado al boton parecia parte de el. */
/* ---- LOA: formulario y documento lado a lado ----------------------------
   El cliente firmaba sin haber visto lo que firmaba. La LOA autoriza a un
   tercero a mover su numero de telefono: es de las pocas cosas del producto
   donde leer antes de firmar no es un detalle. */
.port-loa-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
/* El documento sube al nivel del texto de arriba: la columna izquierda empieza
   con el hint y la derecha quedaba un renglon mas abajo. */
.port-loa-side { margin-top: -30px; }
.port-loa-form { min-width: 0; }
/* Los dos consentimientos son una sola decision: separados por el margen normal
   de form-group parecian bloques distintos. */
/* Los dos consentimientos son una sola decision: van pegados, no como dos
   bloques independientes. :has() no vale en navegadores viejos, asi que se
   apoya en que ambos son form-group consecutivos. */
.port-loa-form .onb-checkbox-row { margin-bottom: 0; }
.port-loa-form .form-group:has(> .onb-checkbox-row) { margin-bottom: 6px; }
.port-loa-form .form-group:has(> .onb-checkbox-row) + .form-group:has(> .onb-checkbox-row) { margin-top: -6px; }
.port-loa-side {
  min-width: 0;
  border: 1px solid rgba(201, 169, 97, 0.18);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.port-loa-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(201, 169, 97, 0.14);
  font-size: 10.5px;
  letter-spacing: 0.10em;
  color: rgba(232, 221, 201, 0.55);
}
.port-loa-print {
  background: transparent;
  border: 1px solid rgba(201, 169, 97, 0.28);
  color: #C9A961;
  padding: 4px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 0.08em;
}
.port-loa-print:hover { background: rgba(201, 169, 97, 0.08); }
/* El documento en claro: es lo que se imprime y lo que recibe el operador.
   Verlo en oscuro no seria una vista previa fiel. */
/* Marco alrededor del documento, como los previews de portada: sin el, el papel
   llegaba a los bordes del panel y parecia un fondo claro, no un documento. */
/* El marco NO scrollea: es un borde fijo por los cuatro lados. Quien scrollea es
   el papel de dentro, que pasa por detras del marco. Antes el contenedor entero
   se movia y el borde inferior solo aparecia al llegar al final del documento. */
.port-loa-paper {
  background: #1c1a14;
  padding: 18px;
  height: 640px;
  box-sizing: border-box;
  overflow: hidden;
}
.port-loa-doc {
  /* El scroll vive aqui, dentro del marco. */
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  background: #ffffff;  /* impresion-ok: es el documento en papel · blanco-ok: es el documento, se imprime */
  color: #1a1a1a;  /* impresion-ok: la LOA es el documento en papel */
  padding: 26px 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 12px;
  line-height: 1.65;
}
.port-loa-doc h5 {
  margin: 0 0 4px 0;
  font-size: 14px;
  text-align: center;
  letter-spacing: 0.02em;
}
.port-loa-doc .loa-ver {
  margin: 0 0 16px 0;
  text-align: center;
  font-size: 9px;
  color: #666666;  /* impresion-ok: la LOA es el documento en papel */
}
.port-loa-doc hr { border: 0; border-top: 1px solid #e0e0e0; margin: 14px 0; }  /* impresion-ok: la LOA es el documento en papel */
.port-loa-doc .loa-body { text-align: justify; margin: 0 0 16px 0; }
.port-loa-doc .loa-k {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: #666666;  /* impresion-ok: la LOA es el documento en papel */
  text-transform: uppercase;
  margin: 0;
}
.port-loa-doc .loa-v { font-size: 12px; color: #1a1a1a; margin: 0 0 10px 0; }  /* impresion-ok: la LOA es el documento en papel */
.port-loa-doc .loa-v.empty { color: #777777; font-style: italic; }  /* impresion-ok: la LOA es el documento en papel */
.port-loa-doc .loa-sig-img { max-width: 200px; display: block; margin: 6px 0; }
.port-loa-doc .loa-sig-line { border-bottom: 1px solid #777777; height: 42px; margin: 6px 0; }  /* impresion-ok: la LOA es el documento en papel */
.port-loa-doc .loa-evi { font-size: 7.5px; color: #777777; text-align: justify; margin-top: 14px; }  /* impresion-ok: la LOA es el documento en papel */
@media (max-width: 1100px) {
  .port-loa-grid { grid-template-columns: minmax(0, 1fr); }
  .port-loa-doc { max-height: 400px; }
}

/* Quitar el archivo subido. Discreto: es una accion de deshacer, no principal. */
.port-file-x {
  background: transparent;
  border: 1px solid rgba(217, 112, 112, 0.30);
  color: #d97070;
  width: 24px; height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.port-file-x:hover { background: rgba(217, 112, 112, 0.10); }
.pi-hint { font-size: 11px; color: #7d735f; margin-top: 8px; line-height: 1.5; }
.port-doc-preview { overflow: auto; padding: 14px; box-sizing: border-box; }
.port-doc-preview .pdfv-page-canvas { width: auto; max-width: 100%; height: auto; display: block; margin: 0 auto 12px; }
.port-doc-hint { color: #C9A961; }
.port-doc-preview .pdfv-page-canvas:last-child { margin-bottom: 0; }
.port-loa-side-doc { margin-top: 0; }
.port-doc-pick { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.port-doc-pick .lfx-dd { width: 210px; min-width: 210px; flex: 0 0 210px; }
.port-doc-pick input.fld-flat { max-width: 200px; }
.port-doc-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.port-doc-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12); border-radius: 8px; font-size: 12px; }
.port-doc-kind { color: #C9A961; white-space: nowrap; }
.port-doc-name { color: rgba(232,221,201,0.75); overflow: hidden; text-overflow: ellipsis; flex: 1; }
/* Avatar del sidebar con foto */
.sb-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

/* Crop modal */
.pi-crop-modal { max-width: 380px; }
.pi-crop-stage { position: relative; width: 320px; height: 320px; margin: 14px auto; border-radius: 12px; overflow: hidden; background: #000; cursor: grab; touch-action: none; }
.pi-crop-stage:active { cursor: grabbing; }
.pi-crop-mask {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at center, transparent 0, transparent 129px, rgba(0,0,0,0.62) 130px);
}
.pi-crop-mask.square {
  background: none;
  box-shadow: inset 0 0 0 30px rgba(0,0,0,0.62);
}
.pi-crop-zoom { display: flex; align-items: center; gap: 12px; margin: 4px auto 8px; width: 320px; }
.pi-crop-zoom input { flex: 1; accent-color: #C9A961; }
.pi-zoom-label { color: #C9A961; font-size: 18px; width: 16px; text-align: center; }
.pi-btn-danger { color: #d97070 !important; border-color: rgba(180,55,55,0.30) !important; }
.pi-btn-danger:hover { background: rgba(180,55,55,0.10) !important; border-color: rgba(180,55,55,0.55) !important; color: #d97070 !important; }

/* Crop card */
.pi-crop-card { max-width: 384px; padding: 26px 28px; }
.pi-crop-actions { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }
.pi-crop-actions .btn-ghost, .pi-crop-actions .btn-gold { height: 41px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 12px; letter-spacing: 0.08em; box-sizing: border-box; }

/* Aire bajo la seccion logo en Organization */
[data-tab-content="organization"] .pi-row { margin-bottom: 34px; }

/* Seats adicionales (Team tab) */
.team-seats-box {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 0; padding: 18px 2px 4px;
  border-top: 1px solid rgba(201,169,97,0.12);
}
.seats-info > strong { display: block; color: #E8DDC9; font-size: 13.5px; margin-bottom: 3px; }
.seats-info span { font-size: 12px; color: #7d735f; }
/* Mismo tratamiento que el hint de Add users: la etiqueta en dorado y el resto
   en gris, para que las dos zonas se lean igual. */
.seats-info span strong { display: inline; color:rgba(201,169,97,0.85); font-weight:500; }
.seats-btns { display: flex; gap: 10px; flex-shrink: 0; }

/* Stepper de seats */
.seats-controls { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.seats-stepper { display: flex; align-items: center; border: 1px solid rgba(201,169,97,0.25); border-radius: 9px; overflow: hidden; width: 178px; }
.seats-stepper .seats-num { flex: 1; }
.seats-step {
  width: 42px; height: 40px; background: rgba(201,169,97,0.06); border: none; cursor: pointer;
  color: #C9A961; font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.seats-step:hover:not(:disabled) { background: rgba(201,169,97,0.14); }
.seats-step:disabled { opacity: 0.3; cursor: default; }
.seats-num { min-width: 44px; text-align: center; color: #E8DDC9; font-size: 15px; font-family: 'JetBrains Mono', 'Menlo', 'Consolas', monospace; font-weight: 500; }

/* Confirm seats deshabilitado */
#seatConfirmBtn:disabled { opacity: 0.4; cursor: default; filter: grayscale(0.3); }

/* Botones de seats a 41px (= ADD USER) */
.seats-btn { height: 40px; padding: 0 22px; font-size: 13px; letter-spacing: 0.20em; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 150px; }
.seats-remove-btn { color: #d97070 !important; border-color: rgba(180,55,55,0.30) !important; }
.seats-remove-btn:hover { background: rgba(180,55,55,0.10) !important; border-color: rgba(180,55,55,0.55) !important; color: #d97070 !important; }
.seats-stepper { height: 40px; }

/* Remove seat deshabilitado */
.seats-remove-btn:disabled { opacity: 0.35; cursor: default; }
.seats-remove-btn:disabled:hover { background: none; }

/* Boton de accion de seats: ancho fijo para que no salte entre AGREGAR/QUITAR */


/* ADD seat: ghost dorado (mismo estilo que REMOVE pero en dorado) */
.seats-add-btn { color: #E8D49E !important; border-color: rgba(232,212,158,0.35) !important; }
.seats-add-btn:hover:not(:disabled) { background: rgba(232,212,158,0.08) !important; border-color: rgba(232,212,158,0.55) !important; color: #E8D49E !important; }
.seats-add-btn:disabled { opacity: 0.35; cursor: default; }
.seats-add-btn:disabled:hover { background: none !important; }

/* Anchos fijos para alinear fila de usuarios con fila de seats */
#teamInviteBtn { width: 178px; justify-content: center; }
#teamAddBtn { width: 150px; justify-content: center; }
.team-btns-group { gap: 12px; }

/* ============================================================
   BILLING TAB
   ============================================================ */
.billing-plan-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.billing-plan-name { font-size:1.1rem; font-weight:600; color:var(--gold); margin-right:12px; }
.billing-plan-price { font-size:0.95rem; color:var(--fc-desc, #9a8f7a); }
.billing-plan-status { font-size:0.8rem; color:var(--fc-desc, #9a8f7a); text-transform:uppercase; letter-spacing:.05em; }
.billing-plan-includes { margin-top:4px; }

.billing-usage-bar-wrap { margin:12px 0 8px; }
.billing-usage-bar-bg { background:rgba(255,255,255,.08); border-radius:4px; height:8px; overflow:hidden; }
.billing-usage-bar-fill { height:100%; background:var(--gold,#C9A961); border-radius:4px; transition:width .4s; }
.billing-usage-bar-fill.bar-warn    { background:#d9a870; }
.billing-usage-bar-fill.bar-limit   { background:#c87320; }
.billing-usage-bar-fill.bar-blocked { background:#b43737; }
.billing-usage-labels { display:flex; justify-content:space-between; margin-top:6px; font-size:.82rem; color:var(--fc-desc,#9a8f7a); }
.billing-usage-detail { display:flex; justify-content:space-between; font-size:.82rem; color:var(--fc-desc,#9a8f7a); margin-top:4px; }
.billing-nudge { margin-top:10px; padding:8px 12px; border-radius:4px; font-size:.85rem; }
.billing-nudge.nudge-warn80    { background:rgba(217,168,112,.15); color:#d9a870; }
.billing-nudge.nudge-limit100  { background:rgba(200,115,32,.15); color:#c87320; }
.billing-nudge.nudge-blocked110{ background:rgba(200,64,64,.15);  color:#b43737; }

.billing-bundles-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:10px; margin-top:12px; }
.billing-bundle-btn { text-align:center; }
.billing-bundles-active { margin-top:10px; }

.billing-payment-info { font-size:.9rem; color:var(--fc-desc,#9a8f7a); margin-bottom:12px; }

.billing-inv-row { display:flex; align-items:center; gap:16px; padding:8px 0; border-bottom:1px solid rgba(255,255,255,.06); font-size:.88rem; }
.billing-inv-row:last-child { border-bottom:none; }
.billing-inv-row span:first-child { min-width:90px; color:var(--fc-desc,#9a8f7a); }
.billing-inv-row span:nth-child(2){ min-width:60px; }
.billing-inv-status { font-size:.78rem; text-transform:uppercase; letter-spacing:.05em; }
.billing-inv-status.inv-paid { color:#9bd64a; }
.billing-inv-status.inv-open,
.billing-inv-status.inv-uncollectible { color:#b43737; }
.billing-inv-pdf { margin-left:auto; color:var(--gold,#C9A961); font-size:.82rem; text-decoration:none; }
.billing-inv-pdf:hover { text-decoration:underline; }

/* billing fixes */
.billing-plan-name { color: var(--gold, #C9A961) !important; font-weight: 500 !important; }
.btn-ghost.btn-danger { border-color: rgba(180,55,55,0.55); color: #d97070; }
.btn-ghost.btn-danger:hover { background: rgba(180,55,55,0.10) !important; border-color: #d97070 !important; color: #d97070 !important; }

/* btn-modal-danger standalone (fuera de modal) */
.btn-modal-danger { display:inline-flex; align-items:center; justify-content:center; padding:0 22px; height:40px; border-radius:6px; border:1px solid rgba(180,55,55,0.55); background:transparent; color:#d97070; font-size:13px; font-family:inherit; letter-spacing:.06em; cursor:pointer; transition:background .18s, color .18s; }
.btn-modal-danger:hover { background:rgba(180,55,55,0.10); border-color:#d97070; color:#d97070; }
.btn-modal-danger:disabled { opacity:.5; cursor:not-allowed; }

/* billing bundles section label */
.billing-bundles-section-title { font-size:.78rem; color:var(--fc-desc,#9a8f7a); text-transform:uppercase; letter-spacing:.08em; margin-bottom:6px; }

/* sent size/duration col */
.sent-size-dur-col { font-size:.82rem; color:var(--fc-desc,#9a8f7a); white-space:nowrap; }
.sent-stopwatch { font-size:.82rem; color:var(--gold,#C9A961); font-family:'JetBrains Mono',monospace; }


/* ===== AYUDA ===== */
.help-loading { padding: 40px; text-align: center; color: rgba(248,246,242,0.45); font-size: 13px; }
.help-group { margin-bottom: 28px; }
.help-group-t { font-size: 10.5px; color: #C9A961; text-transform: uppercase;
  letter-spacing: 0.09em; font-weight: 600; margin-bottom: 12px; }
.help-item { background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12);
  border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.help-q { width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 15px 18px; background: none; border: none; cursor: pointer;
  text-align: left; font-family: inherit; font-size: 14px; color: #E8DDC9; font-weight: 500;
  transition: background .15s; }
.help-q:hover { background: rgba(201,169,97,0.05); }
.help-chev { flex-shrink: 0; color: rgba(201,169,97,0.5); transition: transform .2s;
  display: inline-flex; }
.help-chev.lfx-icon svg { width: 18px; height: 18px; }
.help-item.open .help-chev { transform: rotate(180deg); }
.help-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.help-item.open .help-a { max-height: 800px; }
.help-a-in { padding: 0 18px 18px; font-size: 13.5px; line-height: 1.75;
  color: rgba(248,246,242,0.62); }
.help-contact { margin-top: 34px; padding: 24px; text-align: center;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12);
  border-radius: 12px; }
.help-contact-t { font-size: 15px; color: #E8DDC9; font-weight: 600; margin-bottom: 6px; }
.help-contact-s { font-size: 13px; color: rgba(248,246,242,0.5); margin-bottom: 16px; }
.help-contact-mail { display: inline-block; text-decoration: none; font-size: 14px;
  color: #C9A961; font-weight: 600; letter-spacing: 0.02em; transition: color .15s; }
.help-contact-mail:hover { color: #E8D49E; text-decoration: underline; }


/* ===== MODO SOPORTE (impersonate) ===== */
/* Rojo y permanente: nadie debe operar sin saber que esta viendo otra cuenta. */
.support-banner { position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 9px 16px; background: rgba(180,55,55,0.14);
  border-bottom: 1px solid rgba(217,112,112,0.35); }
.support-banner-txt { font-size: 12.5px; color: #d97070; font-weight: 600;
  letter-spacing: 0.02em; }
.support-banner-note { font-size: 11px; color: rgba(248,246,242,0.5); }
.support-banner-dot { color: rgba(217,112,112,0.4); font-size: 11px; }
@media (max-width: 640px) {
  .support-banner { flex-direction: column; gap: 2px; padding: 8px 12px; }
}

.nav-item .nav-chat-ico{width:17px;height:17px;color:rgba(201,169,97,0.55);flex-shrink:0}
.nav-item:hover .nav-chat-ico,.nav-item.active .nav-chat-ico{color:rgba(201,169,97,0.75)}

/* Botones destructivos del panel API (revocar clave, borrar webhook) */
.api-danger-btn{color:rgba(248,246,242,0.5)!important;border:1px solid rgba(201,169,97,0.14)!important;background:transparent!important;transition:all .18s;}
.api-danger-btn:hover{background:rgba(180,55,55,0.14)!important;border-color:rgba(217,112,112,0.6)!important;color:#D48383!important;}

/* Panel API — Settings */
/* .fc-subtitle trae border-bottom propio, pero dentro de un flex la linea solo
   abarca el texto. Aqui la ponemos en el contenedor para que cruce todo el ancho. */
#apiKeysWrap .sug-list-head,
#apiHooksWrap .sug-list-head {
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201,169,97,0.10);
  margin: 26px 0 4px;
}
#apiKeysWrap .fc-subtitle,
#apiHooksWrap .fc-subtitle {
  border-bottom: none;
  padding-bottom: 0;
  margin: 0;
}
/* Botones del panel: mismo tamano, texto centrado en ambos ejes */
#apiKeysWrap .sug-list-head > button,
#apiHooksWrap .sug-list-head > button,
.api-row-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  height: 34px;
  padding: 0 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1;
  box-sizing: border-box;
}
/* Fila de clave: la ultima no lleva separador (lo pone la seccion siguiente) */
.api-key-row:last-child { border-bottom: none !important; }

/* Badges del panel API: mismo ancho para que las filas alineen */
.api-badge { display:inline-flex; align-items:center; justify-content:center; min-width:76px; }
/* Fila de clave revocada: mas apagada, ya no sirve */
.api-key-row.revoked { opacity: .55; }

/* ===== Reloj del sidebar: hora local de quien abre la app ===== */
/* Calcado del reloj del panel admin: punto LIVE, zona en Michroma, hora en mono. */
.sb-clock { margin: 0 0 12px; padding: 10px 12px; border-radius: 9px;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.12); }
.sb-clock-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.sb-clock-live { width: 7px; height: 7px; border-radius: 50%; background: #d97070;
  box-shadow: 0 0 0 0 rgba(217,112,112,0.7); animation: sbPulse 1.8s infinite; }
/* Mismo radar que .infra-dot del admin: el punto se expande y se desvanece. */
@keyframes sbPulse {
  0% { box-shadow: 0 0 0 0 rgba(217,112,112,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(217,112,112,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,112,112,0); }
}
.sb-clock-live-txt { font-family: 'Michroma', sans-serif; font-size: 7.5px;
  letter-spacing: 0.2em; color: rgba(217,112,112,0.9); }
.sb-clock-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sb-clock-zone { font-family: 'Michroma', sans-serif; font-size: 8.5px; letter-spacing: 0.14em;
  color: rgba(155,214,74,0.7); white-space: nowrap; }
.sb-clock-time { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: #E8D49E;
  font-variant-numeric: tabular-nums; }
.sb-clock-date { font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  color: rgba(201,169,97,0.65); text-align: right; margin-top: 2px; letter-spacing: 0.02em; }

/* Revision de invitaciones masivas: se muestra ANTES de crear nada, para que el
   admin vea quien entra y quien no en vez de descubrirlo despues. */
.team-emails { min-height: 62px; resize: vertical; font-family: inherit; }
.team-emails-hint { margin: 6px 0 0; font-size: 11.5px; }
.team-review { margin: 16px 0 4px; padding: 14px 16px; border-radius: 10px;
  background: rgba(201,169,97,0.04); border: 1px solid rgba(201,169,97,0.14); }
.team-review-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 12.5px;
  color: rgba(232,221,201,0.8); margin-bottom: 12px; }
.team-review-sum strong { color: #E8D49E; font-weight: 600; }
.team-review-warn { flex-basis: 100%; color: #d9a870; margin-top: 4px; }
.team-review-list { display: grid; width: 100%; box-sizing: border-box;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 86px 120px;
  column-gap: 0;
  align-items: center; max-height: 260px; overflow-y: auto; overflow-x: hidden; }
.team-review-row { display: contents; }
.team-review-row > span { box-sizing: border-box; min-width: 0; padding: 9px 0; font-size: 12.5px; line-height: 1.35; text-align: left;
  border-bottom: 1px solid rgba(201,169,97,0.08);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-review-row > span:nth-child(1) { padding-left: 2px; padding-right: 16px; }
.team-review-row > span:nth-child(2) { padding-left: 16px; padding-right: 12px; }
.team-review-row > span:nth-child(3) { padding-left: 12px; padding-right: 12px; }
/* STATUS a la derecha: asi el margen exterior queda simetrico con el de NAME. */
.team-review-row > span:nth-child(4) { padding-left: 12px; padding-right: 2px; text-align: left; }
.team-review-row.head > span { font-size: 10.5px; font-weight: 600; color: #7d735f;
  letter-spacing: 0.08em; text-transform: uppercase; padding-top: 7px; padding-bottom: 9px;
  border-bottom: 1px solid rgba(201,169,97,0.12); }
.team-review-row:last-child > span { border-bottom: 0; }
.team-review-row .tr-nom { color: rgba(232,221,201,0.85); }
.team-review-row .tr-mail { font-family: 'JetBrains Mono', monospace; color: #b8ad97; }
.team-review-row .tr-rol { color: rgba(201,169,97,0.85); }
.team-review-row.ok .tr-est { color: #9bd64a; }
.team-review-row.no .tr-est { color: rgba(232,221,201,0.5); }
.team-review-row.head .tr-est { color: #7d735f; }
.team-review-row.head .tr-est { color: rgba(232,221,201,0.45); }
.team-review-row .tr-rol { color:rgba(201,169,97,0.85); }
.team-emails-hint code { font-family:'JetBrains Mono',monospace; color:rgba(201,169,97,0.85); font-size:11px; }

/* Invitaciones pendientes: mismo separador que el resto de bloques del tab. */
.team-pending { padding: 18px 2px 4px; border-top: 1px solid rgba(201,169,97,0.12); }
.team-pending-title { color: #E8DDC9; font-size: 13.5px; margin-bottom: 3px; }
.team-pending-n { color: #C9A961; font-family: 'JetBrains Mono', monospace; }
.team-pending-list { margin-top: 12px; }
.team-pending-list .tr-exp { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #7d735f; }
.tr-acts { display: inline-flex; gap: 8px; }
.team-inv-resend { background: none; border: 1px solid rgba(201,169,97,0.3); color: #C9A961;
  border-radius: 7px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
.team-inv-resend:hover:not(:disabled) { background: rgba(201,169,97,0.08); }
.team-inv-resend:disabled { opacity: 0.4; cursor: default; }
.team-inv-revoke { background: none; border: 1px solid rgba(217,112,112,0.3); color: #d97070;
  border-radius: 7px; padding: 3px 10px; font-size: 11px; cursor: pointer; }
.team-inv-revoke:hover:not(:disabled) { background: rgba(217,112,112,0.08); }
.team-inv-revoke:disabled { opacity: 0.4; cursor: default; }

/* Pendientes: misma rejilla que la revision pero con la ultima columna mas ancha,
   porque lleva dos botones en vez de una palabra. */
.team-pending-list { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 86px 210px; }
.team-pending-list .team-review-row > span:nth-child(4) { overflow: visible; padding-right: 2px; }
.team-pending-list .tr-exp { white-space: nowrap; }
/* Identico a .team-count: es el mismo tipo de dato (asientos) y el color de aviso
   del proyecto es el mismo dorado. */
.team-pending-badge {
  font-size:11.5px; color:#C9A961; white-space:nowrap; flex-shrink:0;
  font-weight:500; font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; letter-spacing:0.02em;
  padding:3px 10px; border:1px solid rgba(201,169,97,0.3);
  border-radius:999px; background:rgba(201,169,97,0.06);
  text-transform:none; line-height:1.6; margin-left:8px;
  display:inline-flex; align-items:center;
}
/* Rol mal escrito: se acepta como nombre pero se avisa, porque en silencio
   quedaria como member sin que nadie lo note. */
.team-review-row .tr-rol-mal { color:#d97070; }
/* Aviso previo al port: evita que se inicie un tramite condenado a fallar. */
/* Aviso previo al port: evita que se inicie un tramite condenado a fallar.
   Hereda el color de .fc-desc; con #9a8f7a se veia de otro tono que el texto
   de arriba, como si fuera otra cosa. */
.port-check-note { margin: 0; max-width: 640px; margin-bottom: 0 !important; }
.port-check-note strong { color: #E8D49E; font-weight: 500; }
#portStartActions { align-items: flex-start; justify-content: space-between; gap: 28px; }

/* ============ ESTADO DEL SERVICIO ============
   El punto del menu reutiliza el patron de irradiacion del admin. Colores solo
   de la paleta (LUZARDOFAX_SISTEMA_COLOR.md). Nada parpadea de forma agresiva:
   el pulso es lento (1.8s) y con prefers-reduced-motion se queda quieto. */
.nav-status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: #9bd64a; margin-left: 8px;
}
.nav-status-dot.ok { background: #9bd64a; animation: lfxStPulse 1.8s infinite; }
.nav-status-dot.warn { background: #d9a870; animation: lfxStPulseWarn 1.6s infinite; }
.nav-status-dot.bad { background: #d97070; animation: lfxStPulseBad 1.1s infinite; }
.nav-status-dot.maint { background: #C9A961; animation: lfxStPulseWarn 2.4s infinite; }
.nav-status-dot.unk { background: #7d735f; animation: none; }
@keyframes lfxStPulse {
  0% { box-shadow: 0 0 0 0 rgba(155,214,74,0.6); }
  70% { box-shadow: 0 0 0 7px rgba(155,214,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(155,214,74,0); }
}
@keyframes lfxStPulseWarn {
  0% { box-shadow: 0 0 0 0 rgba(201,169,97,0.6); }
  70% { box-shadow: 0 0 0 7px rgba(201,169,97,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,97,0); }
}
@keyframes lfxStPulseBad {
  0% { box-shadow: 0 0 0 0 rgba(217,112,112,0.6); }
  70% { box-shadow: 0 0 0 7px rgba(217,112,112,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,112,112,0); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-status-dot, .stp-hero-dot, .stp-row-dot, .stp-banner-dot, .lgn-status-dot {
    animation: none !important; box-shadow: none !important;
  }
}
/* Cabecera de la pagina de estado */
.stp-hero {
  display: flex; align-items: center; gap: 13px; padding: 20px 22px; margin-bottom: 22px;
  border: 1px solid rgba(201,169,97,0.12); border-radius: 14px; background: #0a0a0a; flex-wrap: wrap;
}
.stp-hero-dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.stp-hero-dot.ok { background: #9bd64a; animation: lfxStPulse 1.8s infinite; }
.stp-hero-dot.warn { background: #d9a870; animation: lfxStPulseWarn 1.6s infinite; }
.stp-hero-dot.bad { background: #d97070; animation: lfxStPulseBad 1.1s infinite; }
.stp-hero-dot.maint { background: #C9A961; animation: lfxStPulseWarn 2.4s infinite; }
.stp-hero-dot.unk { background: #7d735f; }
.stp-hero-txt { font-size: 17px; color: #E8D49E; letter-spacing: 0.02em; }
.stp-hero-sub { font-size: 12.5px; color: rgba(232,221,201,0.52); margin-left: auto; }
/* Lista de componentes */
.stp-list { border: 1px solid rgba(201,169,97,0.12); border-radius: 14px; overflow: hidden; background: #0a0a0a; }
.stp-row {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(201,169,97,0.06);
}
.stp-row-top { display: flex; align-items: center; gap: 12px; }
.stp-row:last-child { border-bottom: none; }
.stp-row-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.stp-row-dot.ok { background: #9bd64a; animation: lfxStPulse 1.8s infinite; }
.stp-row-dot.warn { background: #d9a870; animation: lfxStPulseWarn 1.6s infinite; }
.stp-row-dot.bad { background: #d97070; animation: lfxStPulseBad 1.1s infinite; }
.stp-row-dot.maint { background: #C9A961; animation: lfxStPulseWarn 2.4s infinite; }
.stp-row-dot.unk { background: #7d735f; }
.stp-row-name { color: #E8DDC9; font-size: 14px; }
.stp-row-st { margin-left: auto; font-size: 11px; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 6px; }
.stp-row-st.ok { color: #9bd64a; background: rgba(155,214,74,0.10); border: 1px solid rgba(155,214,74,0.25); }
.stp-row-st.warn { color: #d9a870; background: rgba(217,168,112,0.10); border: 1px solid rgba(217,168,112,0.28); }
.stp-row-st.bad { color: #d97070; background: rgba(180,55,55,0.12); border: 1px solid rgba(217,112,112,0.30); }
.stp-row-st.maint { color: #C9A961; background: rgba(201,169,97,0.10); border: 1px solid rgba(201,169,97,0.28); }
.stp-row-st.unk { color: #7d735f; background: rgba(201,169,97,0.06); border: 1px solid rgba(201,169,97,0.15); }
/* Incidentes */
.stp-inc { border: 1px solid rgba(201,169,97,0.12); border-radius: 14px; background: #0a0a0a; padding: 18px 20px; margin-bottom: 14px; }
.stp-inc-head { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; margin-bottom: 6px; }
.stp-inc-title { color: #E8D49E; font-size: 15px; }
.stp-inc-meta { font-size: 11.5px; color: rgba(232,221,201,0.45); margin-bottom: 13px; }
.stp-upd { border-left: 2px solid rgba(201,169,97,0.20); padding: 0 0 0 14px; margin-top: 13px; }
.stp-upd-when { font-size: 11px; color: rgba(232,221,201,0.45); margin-bottom: 4px; }
.stp-upd-txt { font-size: 13.5px; color: rgba(232,221,201,0.82); line-height: 1.6; }
.stp-sec { font-size: 11px; letter-spacing: 0.16em; color: rgba(201,169,97,0.75); text-transform: uppercase; margin: 30px 0 14px; }
.stp-empty { padding: 34px; text-align: center; color: rgba(232,221,201,0.50); font-size: 13.5px; }
.stp-note { font-size: 12px; color: rgba(232,221,201,0.50); margin-top: 28px;
  padding-top: 20px; border-top: 1px solid rgba(201,169,97,0.10); line-height: 1.6; }
/* Banner dentro de la pagina afectada: el cliente lo ve donde esta trabajando,
   no en otra pestana. Es lo que evita el reintento en bucle. */
.stp-banner {
  display: flex; align-items: center; gap: 11px; padding: 13px 16px; margin-bottom: 18px;
  border-radius: 12px; font-size: 13.5px; line-height: 1.5;
  border: 1px solid rgba(217,168,112,0.28); background: rgba(217,168,112,0.07); color: #d9a870;
}
.stp-banner.bad { border-color: rgba(217,112,112,0.30); background: rgba(180,55,55,0.10); color: #d97070; }
.stp-banner-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; animation: lfxStPulseWarn 1.6s infinite; }
.stp-banner-link { margin-left: auto; color: inherit; text-decoration: underline; cursor: pointer; white-space: nowrap; font-size: 12.5px; }

/* Barra de 90 dias por componente. Mismo patron que status.luzardofax.com:
   una casilla por dia, efecto piano al pasar por encima y tooltip propio. */
.stp-bar { display: flex; gap: 1px; align-items: stretch; height: 22px; margin-top: 11px; }
.stp-day { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: rgba(155,214,74,0.55);
  transition: transform 0.12s ease, filter 0.12s ease; transform-origin: center; cursor: default; }
.stp-day:hover { transform: scaleY(1.22) scaleX(1.6); filter: brightness(1.35); position: relative; z-index: 2; }
.stp-day.warn { background: #d9a870; }
.stp-day.bad { background: #d97070; }
.stp-day.maint { background: #C9A961; }
.stp-bar-leg { display: flex; justify-content: space-between; font-size: 10.5px;
  color: rgba(232,221,201,0.35); margin-top: 7px; }
@media (prefers-reduced-motion: reduce) {
  .stp-day { transition: none; }
  .stp-day:hover { transform: none; }
}
.stp-tip { position: fixed; z-index: 9999; display: none; max-width: 330px; padding: 14px 16px;
  border: 1px solid rgba(201,169,97,0.22); border-radius: 12px; background: #111111;
  box-shadow: 0 12px 34px rgba(0,0,0,0.7); pointer-events: none; }
.stp-tip-d { font-size: 12px; color: #E8D49E; margin-bottom: 9px; }
.stp-tip-ok { font-size: 12.5px; color: rgba(232,221,201,0.55); }
.stp-tip-i { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; margin-top: 8px; line-height: 1.5; }
.stp-tip-dur { margin-left: auto; color: rgba(232,221,201,0.45); font-size: 11.5px; white-space: nowrap; }

/* Barra de refresco: misma que en Infrastructure del admin y en la publica.
   Animada por CSS y no por temporizador, para que dure exactamente lo mismo
   que el ciclo y no se desincronice si la pestana pierde el foco. */
.stp-tick-wrap { height: 3px; border-radius: 3px; background: rgba(201,169,97,0.07);
  overflow: hidden; margin-bottom: 22px; }
.stp-tick { height: 100%; width: 0; opacity: 0.75; border-radius: 3px;
  background: linear-gradient(90deg, #9bd64a 0%, #C9A961 55%, #d9a870 100%);
  animation: stpTick 60s linear forwards; }
@keyframes stpTick { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .stp-tick { animation: none; width: 100%; } }
/* El vacio necesita caja: sin ella parece que la pagina se corto. */
.stp-empty { border: 1px solid rgba(201,169,97,0.12); border-radius: 14px;
  background: #0a0a0a; }

/* Aviso de incidencia en el login. Quien no puede entrar cree que es culpa suya
   y reintenta la contrasena; esto le dice que no lo es. Solo aparece si hay un
   incidente PUBLICADO: en condiciones normales no ocupa sitio. */
.lgn-status {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 15px; margin-bottom: 22px; border-radius: 11px; font-size: 12.5px;
  line-height: 1.55; border: 1px solid rgba(201,169,97,0.25);
  background: rgba(201,169,97,0.06); color: rgba(201,169,97,0.85);
}
.lgn-status-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.lgn-status.bad { border-color: rgba(217,112,112,0.30); background: rgba(180,55,55,0.10); color: #d97070; }
.lgn-status.bad .lgn-status-dot { background: #d97070; animation: lfxStPulseBad 1.1s infinite; }
.lgn-status-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #C9A961; flex-shrink: 0; margin-top: 6px;
  animation: lgnDotPulse 1.6s infinite;
}
@keyframes lgnDotPulse {
  0% { box-shadow: 0 0 0 0 rgba(201,169,97,0.75); }
  70% { box-shadow: 0 0 0 7px rgba(201,169,97,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,169,97,0); }
}
.lgn-status-txt { display: block; }
/* Cada frase en su linea: que componente falla, y que implica. */
.lgn-status-l1, .lgn-status-l2 { display: block; }
.lgn-status-l2 { opacity: 0.85; }
/* Cada frase en su linea: el componente que falla y que implica. */
.lgn-status-l1, .lgn-status-l2 { display: block; }
.lgn-status-l2 { opacity: 0.85; }
.lgn-status-link { display: inline-block; margin-top: 3px; color: inherit;
  text-decoration: underline; white-space: nowrap; font-size: 12px; opacity: 0.75; }
.lgn-status-link:hover { opacity: 1; }

/* Caller ID (CNAM). Solo colores de la paleta: dorado #C9A961 / #E8D49E,
   texto #E8DDC9, terciario #7d735f, ambar #d9a870 para el aviso. */
.num-cid {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 20px;
  font-size: 10.5px; letter-spacing: 0.06em; font-weight: 600;
  font-family: inherit; text-transform: uppercase; white-space: nowrap;
  color: #E8D49E; background: rgba(201,169,97,0.08);
  border: 1px solid rgba(201,169,97,0.22);
}
/* Aviso de que hoy no hay nombre: quien duda necesita saber que ahora mismo
   el destinatario solo ve el numero. */
.cid-now {
  font-size: 12px; color: #d9a870; margin: 0 0 16px; line-height: 1.5;
  padding: 9px 12px; border-radius: 8px;
  background: rgba(217,168,112,0.07); border: 1px solid rgba(217,168,112,0.22);
}
/* Centrado y en mayusculas: son 15 caracteres como mucho, y asi es
   exactamente como lo vera el destinatario. */
#cidInput {
  text-align: center; letter-spacing: 0.12em; font-weight: 600;
  text-transform: uppercase; font-size: 15px;
}
#cidInput::placeholder {
  letter-spacing: 0.04em; font-weight: 400; font-size: 12.5px; text-transform: none;
}
/* Contador de caracteres: el limite se ve al escribir, no al guardar. */
.cid-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 8px; font-size: 11px; color: #7d735f;
}
.cid-meta .cid-full { color: #d9a870; }
.cid-meta span:last-child { color: #d9a870; text-align: right; }
/* Sugerencias: el servidor propone abreviaturas que caben, para que nadie
   tenga que inventarse una ni contar caracteres. En lista y no en chips:
   15 caracteres se comparan mejor uno debajo de otro. */
.cid-sug-lbl {
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(201,169,97,0.75); font-weight: 600; margin: 4px 0 8px;
}
.cid-sug { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.cid-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 10px 14px; border-radius: 9px; cursor: pointer;
  font-family: inherit; text-align: left; transition: all 0.15s;
  color: #E8DDC9; background: rgba(201,169,97,0.05);
  border: 1px solid rgba(201,169,97,0.18);
}
.cid-opt:hover { background: rgba(201,169,97,0.12); border-color: rgba(201,169,97,0.45); }
/* El valor con el mismo espaciado que el campo: se ve tal cual quedara. */
.cid-opt-v { font-size: 13px; letter-spacing: 0.12em; font-weight: 600; }
.cid-opt-n { font-size: 10.5px; color: #7d735f; white-space: nowrap; }
.cid-note { font-size: 11px; color: #7d735f; line-height: 1.55; margin: 0; }


/* === Selector de numero (28-ago) ===
   .lfx-modal-card es text-align:center y arrastraba las etiquetas de los campos.
   Y la lista de resultados crecia sin tope hasta comerse el alto de la pantalla. */
.num-picker { text-align: left; }
.num-picker .fld-label { display: block; text-align: left; }
.num-picker .np-desc { text-align: left; margin: 0 0 14px; }
.num-picker .np-note { text-align: left; margin: 6px 0 10px; font-size: 11px; }
.num-picker .num-search-row { display: flex; gap: 8px; align-items: flex-end; margin: 0 0 4px; flex-wrap: nowrap; }
.num-picker .num-search-row .fld-wrap { flex: 1 1 0; min-width: 0; margin-bottom: 0; }
.num-picker .num-search-row .btn-gold { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 420px) { .num-picker .num-search-row { flex-wrap: wrap; } }
.num-picker #numSearchResults { max-height: min(56vh, 452px); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding-right: 4px; }
.num-picker #numSearchResults::-webkit-scrollbar { width: 6px; }
.num-picker #numSearchResults::-webkit-scrollbar-thumb { background: rgba(201,169,97,0.25); border-radius: 3px; }
.num-picker .num-actions-row { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.num-picker .num-actions-row .btn-modal { min-width: 132px; }

.onb-did-more { display: block; margin: 10px auto 2px; min-width: 132px; }

/* La nota del porting salia en card-hint, ilegible, y es la que convence al
   cliente de coger un numero temporal mientras se transfiere. */
.onb-port-note { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: rgba(232,212,158,0.72); }

.onb-port-note strong { color: #E8D49E; font-weight: 600; }
