/* ============================================================
   Portal de Proveedores Softwerk — tema oscuro total (v16)
   Paleta: fondo #0D1117 / paneles #161B22 / bordes #21262D
           rojo Softwerk #c8102e (acentos de texto: #ff4d63)
   Estructura y clases identicas a v15 — solo cambian colores.
   ============================================================ */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; background: #0D1117; font-family: 'Segoe UI', Arial, sans-serif; color: #C9D1D9; }

/* ---------- Layout privado (con sidebar) ---------- */
.sw-layout { display: flex; min-height: 100vh; }
.sw-sidebar {
    width: 252px; min-width: 252px; background: #10141A; border-right: 1px solid #21262D;
    display: flex; flex-direction: column; height: 100vh; position: fixed; top: 0; left: 0; z-index: 100;
}
.sw-sidebar-logo { padding: 16px 18px 14px; border-bottom: 1px solid #21262D; }
.sw-sidebar-logo strong { display: block; color: #F0F6FC; font-size: 15px; font-weight: 700; letter-spacing: .06em; }
.sw-sidebar-logo-sub { font-size: 9px; color: #6E7681; letter-spacing: .10em; text-transform: uppercase; margin-top: 5px; font-weight: 600; }
.sw-nav { flex: 1; padding: 8px 0; overflow-y: auto; }
.sw-nav-item {
    display: flex; align-items: center; padding: 14px 20px; cursor: pointer;
    border-left: 3px solid transparent; color: #8B949E; font-size: 15px; font-weight: 600;
    text-decoration: none; transition: background .12s, color .12s, border-left-color .12s;
}
.sw-nav-item:hover { background: #1C2128; color: #F0F6FC; border-left-color: #c8102e; text-decoration: none; }
.sw-nav-item.active { background: #c8102e; color: #fff; border-left-color: #ff1a3c; }
.sw-nav-item i { width: 24px; font-size: 18px; flex-shrink: 0; margin-right: 12px; color: #6E7681; }
.sw-nav-item:hover i { color: #ff4d63; }
.sw-nav-item.active i { color: #fff; }
.sw-nav-item.disabled { opacity: .4; cursor: default; }
.sw-nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sw-sidebar-profile { border-top: 1px solid #21262D; padding: 12px 16px 14px; }
.sw-profile-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sw-avatar { width: 38px; height: 38px; border-radius: 50%; background: #c8102e; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.sw-profile-info { overflow: hidden; flex: 1; }
.sw-profile-name { font-size: 12px; font-weight: 700; color: #F0F6FC; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-profile-sub { font-size: 10px; color: #6E7681; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.sw-btn-salir { width: 100%; background: transparent; border: 1.5px solid #30363D; color: #C9D1D9; border-radius: 6px; padding: 7px 10px; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; transition: background .12s, color .12s, border-color .12s; }
.sw-btn-salir:hover { background: #1C2128; color: #F0F6FC; border-color: #c8102e; text-decoration: none; }

.sw-main { margin-left: 252px; flex: 1; min-height: 100vh; }
.sw-topbar { background: #10141A; color: #F0F6FC; padding: 12px 26px; font-size: 14px; font-weight: 600; letter-spacing: .04em; border-bottom: 1px solid #21262D; }

/* Barra de totales (panel top) */
.sw-statsbar { background: #161B22; border-bottom: 1px solid #21262D; display: flex; align-items: stretch; box-shadow: 0 1px 3px rgba(0,0,0,.3); flex-wrap: wrap; }
.sw-stat { display: flex; align-items: center; gap: 12px; padding: 13px 26px; border-right: 1px solid #21262D; }
.sw-stat > i { font-size: 23px; color: #ff4d63; opacity: .9; }
.sw-stat-txt { display: flex; flex-direction: column; line-height: 1.1; }
.sw-stat .num { font-size: 22px; font-weight: 800; color: #F0F6FC; }
.sw-stat .num-fecha { font-size: 16px; font-weight: 700; color: #F0F6FC; }
.sw-stat .lbl { font-size: 10.5px; color: #8B949E; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.sw-stat-fecha { border-right: none; background: #1C2128; }
.sw-content { padding: 28px 32px; }
.sw-page-title { font-size: 24px; font-weight: 600; color: #F0F6FC; margin: 0 0 4px; }
.sw-page-title b { font-weight: 600; }
.sw-hr { border: none; border-top: 1px solid #21262D; margin: 14px 0 24px; }

/* ---------- Tarjetas ---------- */
.sw-card { background: #161B22; border: 1px solid #21262D; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.35); padding: 22px 26px; margin-bottom: 22px; }
.sw-card h3 { margin: 0 0 16px; font-size: 16px; color: #F0F6FC; text-align: center; font-weight: 700; }

/* ---------- Formularios ---------- */
.sw-form-row { display: flex; align-items: center; margin-bottom: 14px; }
.sw-form-row label { width: 150px; text-align: right; padding-right: 16px; font-weight: 700; color: #8B949E; font-size: 14px; }
.sw-form-row .sw-field { flex: 1; }
.sw-input { width: 100%; padding: 9px 12px; border: 1px solid #30363D; border-radius: 5px; font-size: 14px; background: #0D1117; color: #F0F6FC; }
.sw-input::placeholder { color: #6E7681; }
.sw-input:focus { outline: none; border-color: #c8102e; box-shadow: 0 0 0 2px rgba(200,16,46,.25); }

/* Ver contraseña (ojito) */
.sw-pass-wrap { position: relative; margin-bottom: 14px; }
.sw-pass-wrap .sw-input { margin-bottom: 0; padding-right: 48px; }
.sw-eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; background: none; border: none; color: #6E7681; cursor: pointer; font-size: 18px; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; }
.sw-eye:hover { color: #ff4d63; }
.sw-input[readonly] { background: #161B22; color: #8B949E; }

.sw-btn { background: #c8102e; color: #fff; border: none; border-radius: 6px; padding: 11px 22px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .12s; }
.sw-btn:hover { background: #e11530; }
.sw-btn:disabled { opacity: .5; cursor: default; }
.sw-btn-block { width: 100%; }
.sw-btn-link { background: none; border: none; color: #ff4d63; cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }

.sw-alert { padding: 11px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; text-align: center; }
.sw-alert-error { background: rgba(248,81,73,.12); color: #ff8b85; border: 1px solid rgba(248,81,73,.4); }
.sw-alert-ok { background: rgba(63,185,80,.12); color: #56d364; border: 1px solid rgba(63,185,80,.4); }
.sw-alert-info { background: rgba(210,153,34,.12); color: #e3b341; border: 1px solid rgba(210,153,34,.4); }

/* ---------- Grillas ---------- */
.sw-table { width: 100%; border-collapse: collapse; background: #161B22; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.sw-table th { background: #1C2128; color: #8B949E; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; text-align: left; border-bottom: 2px solid #30363D; }
.sw-table td { padding: 11px 14px; border-bottom: 1px solid #21262D; font-size: 14px; color: #C9D1D9; }
.sw-table tr:hover td { background: #1C2128; }
.sw-empresa-group { background: #7a0a1c; color: #fff; font-weight: 700; padding: 9px 14px; font-size: 13px; }
.sw-table tr:hover td.sw-empresa-group { background: #7a0a1c; color: #fff; }

/* ---------- Login / Registro (pantalla publica, 2 columnas) ---------- */
.sw-auth-page { display: flex; min-height: 100vh; }
.sw-auth-right { flex: 1; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #500a16 0%, #2e0911 55%, #14060a 100%); padding: 24px; }

/* panel izquierdo (marca) */
.sw-brand { width: 30%; min-width: 240px; background: linear-gradient(158deg, #14060a 0%, #2e0911 50%, #5a0e1c 100%); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 32px; position: relative; overflow: hidden; }
.sw-brand::before { content:''; position:absolute; top:-70px; right:-70px; width:300px; height:300px; border-radius:50%; background: radial-gradient(circle, rgba(200,16,46,.22) 0%, transparent 70%); pointer-events:none; }
.sw-brand-line { position:absolute; right:0; top:0; bottom:0; width:1px; background: linear-gradient(to bottom, transparent, rgba(200,16,46,.5) 40%, rgba(200,16,46,.5) 60%, transparent); }
.sw-brand-logo { position:relative; z-index:1; display:flex; flex-direction:column; align-items:flex-start; }
.sw-brand-logo-img { height:38px; width:auto; max-width:210px; display:block; }
.sw-brand-logo-sub { font-size:9.5px; color: rgba(255,255,255,.6); letter-spacing:.14em; text-transform:uppercase; font-weight:700; margin-top:9px; }
.sw-brand-body { flex:1; display:flex; flex-direction:column; justify-content:center; position:relative; z-index:1; }
.sw-badge { display:inline-flex; align-items:center; gap:7px; background: rgba(200,16,46,.20); border:1px solid rgba(200,16,46,.5); color:#ff9a9a; font-size:9.5px; font-weight:700; letter-spacing:1.1px; text-transform:uppercase; padding:4px 11px; border-radius:99px; width:fit-content; margin-bottom:20px; }
.sw-badge-dot { width:6px; height:6px; border-radius:50%; background:#c8102e; box-shadow:0 0 6px rgba(200,16,46,.95); }
.sw-brand-headline { font-size:23px; font-weight:800; line-height:1.3; letter-spacing:-.3px; margin-bottom:14px; }
.sw-brand-headline em { font-style:normal; color:#FF6B6B; }
.sw-brand-desc { font-size:12.5px; color: rgba(255,255,255,.6); line-height:1.78; }
.sw-brand-feats { list-style:none; margin:22px 0 0; padding:0; }
.sw-brand-feats li { font-size:12.5px; color: rgba(255,255,255,.72); padding:6px 0 6px 22px; position:relative; }
.sw-brand-feats li::before { content:'\2713'; position:absolute; left:0; color:#ff4d63; font-weight:800; }
.sw-brand-footer { position:relative; z-index:1; font-size:11px; color: rgba(255,255,255,.4); }
.sw-recaptcha-wrap { display:flex; justify-content:center; margin:4px 0 14px; }
@media (max-width: 760px) { .sw-brand { display:none; } }
.sw-auth-card { background: #161B22; border: 1px solid #30363D; border-radius: 10px; box-shadow: 0 12px 45px rgba(0,0,0,.6); width: 100%; max-width: 400px; overflow: hidden; }
.sw-auth-head { background: #a00d22; color: #fff; padding: 22px 26px; text-align: center; }
.sw-auth-head strong { font-size: 19px; letter-spacing: .02em; }
.sw-auth-head .sub { display: block; font-size: 10px; color: rgba(255,255,255,.7); letter-spacing: .12em; text-transform: uppercase; margin-top: 6px; }
.sw-auth-accent { height: 3px; background: #c8102e; }
.sw-auth-body { padding: 26px; }
.sw-auth-body .sw-input { margin-bottom: 14px; }
.sw-auth-foot { text-align: center; margin-top: 14px; font-size: 13px; color: #8B949E; }
.sw-auth-foot a { color: #ff4d63; text-decoration: none; font-weight: 600; }

/* ---------- Badges de estado ---------- */
.sw-estado { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.sw-estado.pagada { background: rgba(63,185,80,.15); color: #56d364; }
.sw-estado.pendiente { background: rgba(210,153,34,.15); color: #e3b341; }
.sw-estado.parcial { background: rgba(88,166,255,.15); color: #79b8ff; }
.sw-estado.otro { background: #21262D; color: #8B949E; }

/* ---------- Dropdown de descargas ---------- */
.sw-dd { position: relative; display: inline-block; }
.sw-dd-toggle { background: #21262D; border: 1px solid #30363D; border-radius: 5px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: #C9D1D9; cursor: pointer; }
.sw-dd-toggle:hover { border-color: #c8102e; color: #ff4d63; }
.sw-dd-menu { display: none; position: absolute; right: 0; top: 100%; margin-top: 3px; background: #1C2128; border: 1px solid #30363D; border-radius: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.5); min-width: 170px; z-index: 50; overflow: hidden; }
.sw-dd-menu.open { display: block; }
.sw-dd-menu a { display: block; padding: 9px 14px; font-size: 13px; color: #C9D1D9; text-decoration: none; cursor: pointer; }
.sw-dd-menu a:hover { background: #2a1218; color: #ff4d63; }
.sw-btn-ver { background: none; border: none; color: #ff4d63; cursor: pointer; font-size: 16px; }

/* Fila expandible master-detail (factura -> pagos) */
.sw-toggle-btn { background:#21262D; border:1px solid #30363D; border-radius:5px; width:26px; height:26px; cursor:pointer; color:#ff4d63; font-weight:800; font-size:15px; line-height:1; padding:0; }
.sw-toggle-btn:hover { background:#2a1218; border-color:#c8102e; }
.sw-toggle-ph { display:inline-block; width:26px; }
.sw-subdetalle { background:#11151B; padding:12px 18px; }
.sw-subdetalle .sub-title { font-size:11px; font-weight:700; color:#ff4d63; text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
.sw-subtable { width:100%; border-collapse:collapse; background:#161B22; border:1px solid #21262D; border-radius:6px; }
.sw-subtable th { background:#1C2128; font-size:11px; text-transform:uppercase; color:#8B949E; padding:8px 12px; text-align:left; letter-spacing:.03em; }
.sw-subtable td { padding:9px 12px; border-top:1px solid #21262D; font-size:13px; color:#C9D1D9; }
.sw-subtable tr:hover td { background:#1C2128; }

/* Tarjeta de pago (OP) dentro de la factura expandida */
.sw-pago-card { background:#161B22; border:1px solid #21262D; border-radius:6px; margin-bottom:10px; overflow:hidden; }
.sw-pago-card:last-child { margin-bottom:0; }
.sw-pago-head { display:flex; align-items:center; justify-content:space-between; gap:12px; background:#1C2128; padding:9px 14px; font-size:13px; flex-wrap:wrap; }
.sw-pago-head .op-info { color:#8B949E; }
.sw-pago-head .op-info b { color:#F0F6FC; font-size:14px; }
.sw-nc-card .sw-pago-head { background:#12211a; }
.sw-nc-tag { font-size:11px; color:#56d364; font-weight:600; display:inline-flex; align-items:center; gap:5px; }
.sw-pago-body { padding:10px 14px; }
.sw-pdf-btn { display:inline-flex; align-items:center; gap:6px; background:#c8102e; color:#fff; border:none; border-radius:5px; padding:6px 12px; font-size:12px; font-weight:700; cursor:pointer; text-decoration:none; }
.sw-pdf-btn:hover { background:#e11530; color:#fff; }
.sw-mini-title { font-size:10.5px; font-weight:700; color:#6E7681; text-transform:uppercase; letter-spacing:.05em; margin:6px 0 5px; }
.sw-pdf-ico { color:#ff4d63; cursor:pointer; font-size:17px; background:none; border:none; padding:2px 6px; }
.sw-pdf-ico:hover { color:#ff7a8a; }
.sw-detalle-box { background: #161B22; border: 1px solid #21262D; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.35); padding: 18px 22px; margin-bottom: 18px; }
.sw-detalle-box h4 { margin: 0 0 12px; font-size: 14px; color: #ff4d63; text-transform: uppercase; letter-spacing: .04em; }

/* ============================================================
   Acordeon premium (Facturas / Pagos) — Empresa > comprobante > detalle
   ============================================================ */
.sw-emp-block { margin-bottom: 28px; }
.sw-emp-banner { display: flex; align-items: center; gap: 13px; background: linear-gradient(135deg, #10141A 0%, #1C2128 100%); color: #F0F6FC; padding: 13px 20px; border-radius: 10px 10px 0 0; border: 1px solid #30363D; border-bottom: none; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.sw-emp-banner .ico { width: 34px; height: 34px; border-radius: 8px; background: #c8102e; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.sw-emp-banner .nom { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.sw-emp-banner .cuit { margin-left: 14px; font-size: 12px; color: #8B949E; font-weight: 600; }
.sw-emp-stats { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw-emp-stats .st {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.15; min-width: 72px; padding: 5px 12px 6px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px; white-space: nowrap;
}
.sw-emp-stats .st b { color: #fff; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.sw-emp-stats .st.st-fecha b { font-size: 12.5px; padding-top: 2px; }
.sw-emp-stats .st i { font-style: normal; font-size: 9px; color: #b9c0c8; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-top: 1px; }
@media (max-width: 1100px) { .sw-emp-stats .st.st-fecha { display: none; } }
@media (max-width: 900px)  { .sw-emp-stats { display: none; } }

/* encabezado de columnas */
.sw-grid-head { gap: 10px; align-items: center; padding: 9px 16px; background: #1C2128; border-bottom: 2px solid #30363D; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #8B949E; }
.sw-grid-head, .sw-acc-head { display: grid; }
.sw-grid-head .r, .sw-acc-head .r { text-align: right; }
.sw-grid-head .c, .sw-acc-head .c { text-align: center; }

/* contenedor de items por empresa */
.sw-emp-list { border: 1px solid #21262D; border-top: none; border-radius: 0 0 10px 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.sw-emp-list > .sw-acc { border-bottom: 1px solid #21262D; }
.sw-emp-list > .sw-acc:last-child { border-bottom: none; }

/* item acordeon */
.sw-acc { background: #161B22; }
.sw-acc-head { gap: 10px; align-items: center; padding: 12px 16px; cursor: pointer; transition: background .12s; font-size: 13.5px; color: #C9D1D9; }
.sw-acc-head:hover { background: #1C2128; }
.sw-acc.open > .sw-acc-head { background: #2a1218; }
.sw-acc-head .nro b { color: #F0F6FC; }
.sw-chev { color: #ff4d63; font-size: 13px; transition: transform .15s; display: inline-block; }
.sw-acc.open > .sw-acc-head .sw-chev { transform: rotate(90deg); }
.sw-acc-acciones { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* fila no expandible (Nota de Credito / sin hijos) */
.sw-acc-static > .sw-acc-head { cursor: default; }
.sw-acc-static > .sw-acc-head:hover { background: transparent; }
.sw-acc-static .sw-chev { color: #30363D; }

/* panel desplegable */
.sw-acc-panel { display: none; padding: 14px 18px 16px; background: #11151B; border-top: 1px dashed #30363D; }
.sw-acc.open > .sw-acc-panel { display: block; }
.sw-sub-label { font-size: 11px; font-weight: 700; color: #ff4d63; text-transform: uppercase; letter-spacing: .05em; margin: 2px 0 10px; }
.sw-empty { color: #6E7681; font-size: 12px; padding: 2px 0 4px; }

/* sub-tarjetas de OP dentro de una factura */
.sw-acc-op { border: 1px solid #2a3038; border-radius: 8px; margin-bottom: 8px; background: #1A2029; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw-acc-op:last-child { margin-bottom: 0; }
.sw-acc-op.open { box-shadow: 0 2px 8px rgba(0,0,0,.45); }
.sw-acc-op.sw-nc { background: #12211a; border-color: #1f3b2a; }
.sw-acc-op.sw-nc > .sw-acc-head:hover { background: #16291f; }
.sw-acc-op > .sw-acc-panel { border-radius: 0 0 8px 8px; }

/* grillas por tipo (mismas columnas en titulo y filas) */
.sw-grid-fac { grid-template-columns: 26px 1.25fr 1.6fr 1.05fr 1.2fr 1.2fr 1.15fr; }
.sw-grid-op  { grid-template-columns: 24px .95fr 1fr 1.25fr .5fr 1fr 1fr 1fr 1fr 1.05fr .9fr; }
.sw-grid-op.sw-grid-head { background: #1C2128; }
.sw-grid-liq { grid-template-columns: 26px 1.05fr 1.25fr 1fr 1.05fr 1.05fr 1.15fr .55fr; }

/* ---------- Panel de Perfil con tabs laterales (v20) ---------- */
.sw-settings { display: flex; max-width: 980px; margin: auto; background: #161B22; border: 1px solid #21262D; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.35); min-height: 540px; }
.sw-set-nav { width: 218px; min-width: 200px; background: #10141A; border-right: 1px solid #21262D; padding: 14px 0; display: flex; flex-direction: column; }
.sw-set-tab { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: none; border: none; border-left: 3px solid transparent; color: #8B949E; font-size: 14px; font-weight: 600; padding: 13px 18px; cursor: pointer; font-family: inherit; transition: background .12s, color .12s, border-left-color .12s; }
.sw-set-tab i { width: 20px; font-size: 16px; color: #6E7681; text-align: center; }
.sw-set-tab:hover { background: #1C2128; color: #F0F6FC; }
.sw-set-tab:hover i { color: #ff4d63; }
.sw-set-tab.active { background: #1C2128; color: #F0F6FC; border-left-color: #c8102e; }
.sw-set-tab.active i { color: #ff4d63; }
.sw-set-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sw-set-panel { display: none; padding: 26px 32px; flex: 1; }
.sw-set-panel.active { display: block; }
.sw-set-panel h3 { margin: 0 0 4px; font-size: 17px; color: #F0F6FC; text-align: left; font-weight: 700; }
.sw-set-h4 { margin: 0 0 14px; font-size: 14.5px; color: #F0F6FC; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sw-set-h4 i { color: #ff4d63; font-size: 15px; }
.sw-set-sub { font-size: 12.5px; color: #8B949E; margin: 0 0 20px; line-height: 1.5; }
.sw-set-footer { border-top: 1px solid #21262D; background: #10141A; padding: 14px 32px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.sw-set-dirty { font-size: 12.5px; color: #e3b341; display: inline-flex; align-items: center; gap: 6px; }
.sw-set-info { font-size: 12.5px; color: #6E7681; margin-top: 18px; display: flex; align-items: center; gap: 8px; }
.sw-set-info i { font-size: 14px; color: #8B949E; }

/* Switches de notificaciones */
.sw-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #21262D; }
.sw-switch-row:last-of-type { border-bottom: none; }
.sw-switch-txt b { display: block; color: #F0F6FC; font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.sw-switch-txt span { font-size: 12.5px; color: #8B949E; }
.sw-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; display: inline-block; }
.sw-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.sw-switch .sl { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #30363D; border-radius: 99px; cursor: pointer; transition: background .15s; }
.sw-switch .sl::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left .15s; }
.sw-switch input:checked + .sl { background: #c8102e; }
.sw-switch input:checked + .sl::before { left: 23px; }

/* Tarjetas de datos bancarios */
.sw-banco { border: 1px solid #21262D; border-radius: 8px; margin-bottom: 16px; overflow: hidden; }
.sw-banco-emp { background: #7a0a1c; color: #fff; font-weight: 700; font-size: 13px; padding: 9px 14px; }
.sw-banco-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.sw-banco-item { padding: 10px 14px; border-bottom: 1px solid #21262D; }
.sw-banco-item i { display: block; font-style: normal; font-size: 10.5px; color: #8B949E; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.sw-banco-item b { color: #F0F6FC; font-size: 13.5px; font-weight: 600; word-break: break-all; }

@media (max-width: 860px) {
  .sw-settings { flex-direction: column; min-height: 0; }
  .sw-set-nav { width: 100%; min-width: 0; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid #21262D; padding: 0; }
  .sw-set-tab { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; width: auto; }
  .sw-set-tab.active { border-bottom-color: #c8102e; }
  .sw-banco-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PORTADA PUBLICA + DIALOGO DE INGRESO (v17)
   Bloque agregado. No modifica ninguna regla anterior.
   Prefijos nuevos: .sw-pub- / .sw-hero / .sw-seal / .sw-fcard / .sw-dlg-
   Paleta: la del portal + ambar #E3B341 (ya presente en .sw-alert-info)
   ============================================================ */
:root {
  --sw-mono: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;
  --sw-amber: #E3B341;
}

/* ---------- Armazon de la portada ---------- */
.sw-public {
  display: flex; flex-direction: column; min-height: 100vh;
  background-image:
    radial-gradient(1100px 520px at 78% -10%, rgba(200,16,46,.17), transparent 62%),
    radial-gradient(780px 440px at 6% 110%, rgba(122,10,28,.22), transparent 66%);
}
.sw-pub-foot { border-top: 1px solid #21262D; padding: 22px 40px; text-align: center; font: 500 11.5px/1.7 var(--sw-mono); color: #4D5560; }

/* ---------- Hero ---------- */
.sw-hero {
  width: 100%; max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr);
  align-items: center; gap: 40px; padding: 68px 40px 84px;
}
.sw-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 9.5px/1 var(--sw-mono); letter-spacing: .17em; text-transform: uppercase;
  color: #ff9aa4; background: rgba(200,16,46,.12); border: 1px solid rgba(200,16,46,.45);
  padding: 6px 13px; border-radius: 99px;
}
.sw-eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #c8102e; box-shadow: 0 0 7px rgba(200,16,46,.95); }
.sw-hero h1 {
  font-size: clamp(33px, 4.5vw, 56px); font-weight: 800; line-height: 1.08;
  letter-spacing: -.005em; color: #F0F6FC; margin: 24px 0 0;
}
.sw-hero h1 em { font-style: normal; color: var(--sw-amber); }
.sw-hero p { max-width: 47ch; font-size: 15px; line-height: 1.8; color: #8B949E; margin: 20px 0 0; }
.sw-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.sw-btn-lg { padding: 13px 28px; font-size: 15px; }
.sw-btn-ghost { background: transparent; border: 1px solid #30363D; color: #C9D1D9; }
.sw-btn-ghost:hover { background: #161B22; border-color: #c8102e; color: #F0F6FC; }
a.sw-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a.sw-btn:hover { text-decoration: none; }

/* ---------- Firma: sello circular de comprobante ---------- */
.sw-seal { position: relative; justify-self: center; width: min(400px, 84vw); aspect-ratio: 1 / 1; }
.sw-seal::before {
  content: ''; position: absolute; inset: 16%; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,16,46,.42) 0%, rgba(200,16,46,.10) 55%, transparent 72%);
  filter: blur(26px); pointer-events: none;
}
.sw-seal svg { position: relative; width: 100%; height: 100%; display: block; }
.sw-seal-rim   { fill: none; stroke: rgba(200,16,46,.30); stroke-width: 1; }
.sw-seal-dash  { fill: none; stroke: rgba(227,179,65,.38); stroke-width: 1.5; stroke-dasharray: 2 9; stroke-linecap: round; }
.sw-seal-inner { fill: none; stroke: rgba(227,179,65,.28); stroke-width: 1; stroke-dasharray: 1 6; stroke-linecap: round; }
.sw-seal-disc  { fill: url(#swSealDisc); stroke: rgba(227,179,65,.42); stroke-width: 1.5; }
.sw-seal-txt   { font: 700 11.5px var(--sw-mono); letter-spacing: 3.4px; fill: #ff9aa4; text-anchor: middle; }
.sw-seal-mark  { font: 800 60px 'Segoe UI', Arial, sans-serif; fill: var(--sw-amber); text-anchor: middle; dominant-baseline: central; }
.sw-seal-rot   { transform-origin: 130px 130px; animation: sw-seal-spin 38s linear infinite; }
@keyframes sw-seal-spin { to { transform: rotate(360deg); } }

/* ---------- Grilla de funcionalidades ---------- */
.sw-feats { border-top: 1px solid #21262D; background: #0B0F14; padding: 54px 40px 62px; }
.sw-feats-in { max-width: 1180px; margin: 0 auto; }
.sw-feats h2 { font: 700 11px/1 var(--sw-mono); letter-spacing: .17em; text-transform: uppercase; color: #6E7681; margin: 0 0 24px; }
.sw-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.sw-fcard {
  position: relative; overflow: hidden; background: #161B22; border: 1px solid #21262D;
  border-radius: 10px; padding: 22px 20px 24px; transition: border-color .15s, transform .15s;
}
.sw-fcard::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, #c8102e, rgba(200,16,46,0)); opacity: .55; }
.sw-fcard:hover { border-color: #3D2229; transform: translateY(-2px); }
.sw-fcard i {
  width: 38px; height: 38px; border-radius: 9px; margin-bottom: 15px; font-size: 17px;
  background: rgba(200,16,46,.14); border: 1px solid rgba(200,16,46,.32); color: #ff4d63;
  display: flex; align-items: center; justify-content: center;
}
.sw-fcard b { display: block; color: #F0F6FC; font-size: 14.5px; font-weight: 700; margin-bottom: 7px; }
.sw-fcard span { display: block; color: #8B949E; font-size: 13px; line-height: 1.66; }

/* ---------- Dialogos (ingreso y registro) ----------
   Se abren con .show(), NO con .showModal(): showModal mete el dialogo en el top layer,
   que va por encima de cualquier z-index, y el desafio del reCAPTCHA -que Google inyecta
   en el body con z-index normal- quedaba tapado. Con .show() + backdrop propio el
   desafio (z-index 2e9) aparece por encima del dialogo, como corresponde. */
.sw-dlg-backdrop { position: fixed; inset: 0; z-index: 890; display: none; background: rgba(4,6,9,.78); backdrop-filter: blur(4px); }
.sw-dlg-backdrop.on { display: block; }
.sw-dlg {
  position: fixed; inset: 0; z-index: 900; margin: auto; height: fit-content;
  padding: 0; border: none; background: transparent; color: #C9D1D9;
  width: min(880px, 94vw); max-width: none; max-height: 92vh; overflow-y: auto;
}
.sw-dlg[open] .sw-dlg-in { animation: sw-dlg-in .22s ease-out; }
@keyframes sw-dlg-in { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.sw-dlg-in {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: #161B22; border: 1px solid #30363D; border-radius: 14px;
  overflow: hidden; box-shadow: 0 30px 90px rgba(0,0,0,.72);
}
.sw-dlg-brand { background: linear-gradient(158deg, #14060a 0%, #2e0911 52%, #5a0e1c 100%); padding: 34px 30px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.sw-dlg-brand::before { content: ''; position: absolute; top: -80px; right: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(200,16,46,.28) 0%, transparent 70%); pointer-events: none; }
.sw-dlg-wordmark { position: relative; z-index: 1; font: 700 10px/1 var(--sw-mono); letter-spacing: .19em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.sw-dlg-brand h3 { position: relative; z-index: 1; margin: 30px 0 0; font-size: 25px; font-weight: 800; line-height: 1.22; letter-spacing: -.02em; color: #fff; }
.sw-dlg-feats { position: relative; z-index: 1; list-style: none; margin: 22px 0 0; padding: 0; }
.sw-dlg-feats li { position: relative; padding: 7px 0 7px 22px; font-size: 12.5px; line-height: 1.6; color: rgba(255,255,255,.72); }
.sw-dlg-feats li::before { content: '\2713'; position: absolute; left: 0; color: var(--sw-amber); font-weight: 800; }
.sw-dlg-brand small { position: relative; z-index: 1; margin-top: auto; padding-top: 24px; font: 500 10.5px/1 var(--sw-mono); letter-spacing: .06em; color: rgba(255,255,255,.38); }
.sw-dlg-form { padding: 34px 32px 30px; }
.sw-dlg-wordmark-m { display: none; }
.sw-dlg-step { display: none; }
.sw-dlg-step.on { display: block; }
.sw-alert-left { text-align: left; }
.sw-spam-linea {
  display: block; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(210,153,34,.28); font-size: 12px; line-height: 1.6;
}
.sw-spam-linea i { margin-right: 7px; }
.sw-spam-linea b { font-weight: 800; }
.sw-dlg-form h4 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: #F0F6FC; }
.sw-dlg-form > p { margin: 7px 0 22px; font-size: 13px; color: #8B949E; }
.sw-dlg-close {
  position: absolute; top: 12px; right: 14px; z-index: 3; width: 32px; height: 32px;
  background: none; border: none; border-radius: 7px; color: #8B949E; font-size: 19px; line-height: 1; cursor: pointer;
}
.sw-dlg-close:hover { background: #21262D; color: #F0F6FC; }

/* ---------- Accesibilidad y responsive ---------- */
:focus-visible { outline: 2px solid #ff4d63; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .sw-seal-rot { animation: none; }
  .sw-dlg[open] .sw-dlg-in { animation: none; }
  .sw-fcard { transition: none; }
}
@media (max-width: 1040px) { .sw-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) {
  .sw-hero { grid-template-columns: 1fr; align-items: start; gap: 8px; padding: 34px 26px 54px; text-align: left; }
  .sw-seal { order: -1; width: min(250px, 62vw); justify-self: start; margin-bottom: 10px; }
  .sw-feats { padding: 44px 26px 52px; }
  .sw-pub-foot { padding-left: 26px; padding-right: 26px; }
}
@media (max-width: 820px) {
  .sw-dlg { width: 100vw; height: 100vh; max-height: 100vh; margin: 0; }
  .sw-dlg-in { grid-template-columns: 1fr; border-radius: 0; border: none; min-height: 100vh; }
  .sw-dlg-brand { display: none; }
  .sw-dlg-form { display: flex; flex-direction: column; justify-content: center; padding: 30px 26px; }
  .sw-dlg-wordmark-m { display: block; font: 700 10px/1 var(--sw-mono); letter-spacing: .19em; text-transform: uppercase; color: #6E7681; margin: 0 0 22px; }
}
@media (max-width: 560px) { .sw-grid { grid-template-columns: 1fr; } }
