/* RECARGALOFACILITO.COM · panel del puesto y de la administración · Material Design 3
   Estructura: barra superior + panel de navegación (permanente en escritorio, modal en pantallas chicas) + contenido.
   Requiere material.css (tokens y componentes). */

/* ---------- estructura de la aplicación ---------- */
.app-shell { display:grid;grid-template-columns:304px minmax(0,1fr);grid-template-rows:64px minmax(0,1fr) auto;min-height:100dvh;background:var(--brand-paper); }
.top-bar { grid-column:2;grid-row:1;position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:8px;height:64px;padding:0 16px 0 8px;background:var(--brand-paper);transition:background-color var(--md-motion-fast),box-shadow var(--md-motion-fast); }
.top-bar.scrolled { background:rgba(255,255,255,.92);backdrop-filter:blur(8px);box-shadow:0 1px 0 var(--brand-line),0 8px 24px rgba(13,43,33,.06); }
.top-bar .menu-toggle,.top-bar .top-brand { display:none; }
.top-bar .top-context { display:flex;flex-direction:column;justify-content:center;min-width:0;padding:0 8px; }
.top-bar .top-context b { display:block;font-family:var(--md-font-display);font-size:16px;line-height:22px;font-weight:600;letter-spacing:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--brand-ink); }
.top-bar .top-context span { display:block;font-size:12px;line-height:16px;letter-spacing:.4px;color:var(--md-sys-color-on-surface-variant);overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.top-bar .top-actions { display:flex;align-items:center;gap:4px;margin-left:auto; }
.top-bar .avatar-button { width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;background:transparent;box-shadow:none!important; }
.avatar { display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--brand-accent);color:var(--brand-deep);font-family:var(--md-font-display);font-size:13px;line-height:1;font-weight:600;letter-spacing:.3px;text-transform:uppercase; }
.avatar.large { width:48px;height:48px;font-size:18px; }
.rapi-bell { position:relative;width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;background:transparent;color:var(--md-sys-color-on-surface-variant);box-shadow:none!important; }
.rapi-bell .ui-icon { width:24px;height:24px;margin:0; }
.rapi-bell-count { position:absolute;top:2px;right:0;min-width:16px;height:16px;padding:0 4px;border-radius:var(--md-shape-full);background:var(--md-sys-color-error);color:var(--md-sys-color-on-error);font-size:11px;line-height:16px;font-weight:500;text-align:center; }
.rapi-bell-count[hidden] { display:none; }
.nav-drawer { grid-column:1;grid-row:1/-1;position:sticky;top:0;z-index:45;display:flex;flex-direction:column;height:100dvh;overflow:hidden;background:#fff;border-right:1px solid var(--brand-line); }
.drawer-head { display:flex;align-items:center;gap:12px;min-height:64px;padding:12px 20px 4px 24px; }
.drawer-head img { display:block;width:220px;max-width:100%;height:auto; }
.drawer-head .drawer-close { display:none;margin-left:auto; }
.drawer-account { position:relative;display:flex;align-items:center;gap:12px;margin:8px 12px 4px;padding:12px;border-radius:var(--brand-radius);background:var(--brand-gradient);color:#fff;overflow:hidden; }
.drawer-account::after { content:"";position:absolute;inset:0;background-image:var(--brand-halftone);background-size:12px 12px;opacity:.6;pointer-events:none;-webkit-mask-image:linear-gradient(115deg,transparent 50%,#000 100%);mask-image:linear-gradient(115deg,transparent 50%,#000 100%); }
.drawer-account>* { position:relative;z-index:1; }
.drawer-account .avatar { background:var(--brand-accent);color:var(--brand-deep); }
.drawer-account span { color:rgba(255,255,255,.8); }
.drawer-account>div { min-width:0;display:grid;gap:2px; }
.drawer-account b { font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.drawer-account span { font-size:12px;line-height:16px;letter-spacing:.4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.drawer-scroll { flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px 12px 16px;scrollbar-width:thin; }
.drawer-section { padding:6px 0 4px; }
.drawer-section+.drawer-section { border-top:1px solid var(--brand-line);margin-top:4px;padding-top:12px; }
.drawer-title { margin:0 0 6px;padding:0 16px;color:var(--brand-accent-ink);font-family:var(--md-font-display);font-size:11px;line-height:16px;font-weight:600;letter-spacing:1.6px;text-transform:uppercase; }
.drawer-item { display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:0 14px 0 16px;border:0;border-radius:var(--brand-radius-sm);background:transparent;color:var(--brand-muted);font-family:var(--md-font);font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;text-align:left;white-space:normal;justify-content:flex-start;box-shadow:none!important;cursor:pointer; }
.drawer-item::before { content:"";position:absolute;left:0;top:11px;bottom:11px;width:4px;border-radius:0 3px 3px 0;background:var(--brand-accent);transform:scaleY(0);transition:transform var(--md-motion-fast); }
.drawer-item .ui-icon { width:24px;height:24px;margin:0;flex-shrink:0; }
.drawer-item span { min-width:0;overflow-wrap:anywhere; }
.drawer-item:hover { color:var(--brand-ink);background:var(--brand-paper); }
.drawer-item.active,.drawer-item[aria-current=page] { background:var(--brand-accent-soft);color:var(--brand-deep-2);font-weight:600; }
.drawer-item.active::before,.drawer-item[aria-current=page]::before { transform:scaleY(1); }
.drawer-item.active .ui-icon { color:var(--brand-deep-2); }
.drawer-item .trailing-count { margin-left:auto;font-size:12px;letter-spacing:.4px;color:var(--md-sys-color-on-surface-variant); }
.drawer-foot { padding:12px 24px 16px;color:var(--md-sys-color-on-surface-variant);font-size:11px;line-height:16px;letter-spacing:.5px; }
.drawer-scrim { display:none;position:fixed;inset:0;z-index:44;background:rgba(0,0,0,.32); }
.page { grid-column:2;grid-row:2;min-width:0;width:100%;max-width:1240px;margin:0 auto;padding:8px 32px 48px; }
.page-header { display:flex;align-items:flex-start;flex-wrap:wrap;gap:12px 24px;margin:0 0 24px; }
.page-header>div:first-child { flex:1 1 360px;min-width:0; }
.page-header .eyebrow { margin-bottom:6px; }
.page-header h1 { margin:0;font-size:30px;line-height:38px;font-weight:600;letter-spacing:-.3px;overflow-wrap:anywhere; }
.page-header .rapi-hint { margin:4px 0 0;max-width:860px;color:var(--md-sys-color-on-surface-variant);font-size:14px;line-height:20px; }
.page-header .page-actions { display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding-top:4px; }
.rapi-window-body,.page-body { display:flex;flex-direction:column;gap:24px;min-width:0; }
.rapi-footer-bar { display:flex;flex-wrap:wrap;align-items:center;gap:16px 24px;padding:16px 0 0;border-top:1px solid var(--md-sys-color-outline-variant); }
.rapi-footer-bar>:first-child { flex:1 1 320px; }
.rapi-footer-bar>:last-child { display:flex;gap:8px;flex-wrap:wrap; }
.rapi-footer-logo { display:none; }
.rapi-statusbar { grid-column:2;grid-row:3;display:flex;flex-wrap:wrap;justify-content:center;gap:4px 20px;padding:12px 24px 20px;color:var(--md-sys-color-on-surface-variant);font-size:12px;line-height:16px;letter-spacing:.4px; }
.rapi-statusbar span { min-width:0;overflow-wrap:anywhere; }
.rapi-statusbar span:nth-child(2) { color:var(--brand-ink);font-weight:500; }
.rapi-statusbar { border-top:1px solid var(--brand-line);background:#fff; }
.rapi-desktop-empty { flex:1; }
.rapi-hint { margin:0;color:var(--md-sys-color-on-surface-variant);font-size:14px;line-height:20px; }
/* menú de cuenta (anclado al avatar) */
.account-menu { position:fixed;top:60px;right:12px;width:min(320px,calc(100vw - 24px)); }
.account-menu .md-menu-head { display:flex;align-items:center;gap:12px;padding:8px 16px 12px; }
.account-menu .md-menu-head>div { min-width:0; }
.account-menu .md-menu-head small { display:block;color:var(--md-sys-color-on-surface-variant);font-size:12px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }

/* ---------- pantallas chicas: panel de navegación modal ---------- */
@media (max-width:1100px) {
  .app-shell { grid-template-columns:minmax(0,1fr); }
  .top-bar,.page,.rapi-statusbar { grid-column:1; }
  .top-bar { padding:0 8px; }
  .top-bar .menu-toggle { display:inline-flex; }
  .top-bar .top-brand { display:flex;align-items:center;gap:8px;min-width:0;padding:0 4px;text-decoration:none;color:var(--md-sys-color-on-surface); }
  .top-bar .top-brand img { display:block;width:32px;height:32px;border-radius:9px; }
  .top-bar .top-brand b { font-size:15px;font-weight:500;letter-spacing:.1px;white-space:nowrap; }
  .top-bar .top-context { display:none; }
  .nav-drawer { position:fixed;top:0;bottom:0;left:0;width:min(360px,calc(100vw - 56px));height:100dvh;border-radius:0 var(--md-shape-lg) var(--md-shape-lg) 0;background:var(--md-sys-color-surface-container-low);box-shadow:var(--md-elev-1);transform:translateX(-105%);transition:transform var(--md-motion);visibility:hidden; }
  .app-shell.drawer-open .nav-drawer { transform:none;visibility:visible; }
  .app-shell.drawer-open .drawer-scrim { display:block; }
  .drawer-head { padding:12px 12px 4px 24px; }
  .drawer-head .drawer-close { display:inline-flex; }
  .page { padding:8px 20px 40px; }
}
@media (max-width:700px) {
  .page { padding:4px 16px 32px; }
  .page-header { margin-bottom:16px; }
  .page-header h1 { font-size:24px;line-height:32px; }
  .rapi-window-body,.page-body { gap:16px; }
  .rapi-footer-bar>:last-child { width:100%; }
  .rapi-footer-bar>:last-child button { flex:1; }
  .rapi-statusbar { padding:12px 16px 20px; }
  .rapi-statusbar span:nth-child(2) { width:100%;text-align:center; }
  .rapi-statusbar .rapi-status-clock { display:none; }
}

/* ---------- ingreso (registro del equipo e ingreso interno) ---------- */
.auth-desktop { display:grid;place-items:center;min-height:100dvh;padding:24px 16px;background:var(--md-sys-color-surface);background-image:radial-gradient(1100px 600px at 50% -10%,var(--md-sys-color-primary-container) 0,transparent 70%); }
.auth { position:relative;z-index:1;width:100%;max-width:420px;margin:0 auto; }
.auth-brand { display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:20px; }
.auth-mark { width:64px;height:64px;border-radius:18px;box-shadow:var(--md-elev-2); }
.auth-name { font-size:16px;line-height:24px;font-weight:500;letter-spacing:.15px;color:var(--md-sys-color-on-surface); }
.auth-name b { color:var(--md-sys-color-primary);font-weight:700; }
.auth-card { padding:28px 28px 24px;border-radius:var(--brand-radius);background:#fff;box-shadow:var(--brand-shadow-hover);border-top:5px solid var(--brand-accent); }
.auth-card h1 { margin:0 0 4px;font-size:24px;line-height:32px;font-weight:600;letter-spacing:-.2px; }
.auth-sub { margin:0 0 20px;color:var(--md-sys-color-on-surface-variant);font-size:14px;line-height:20px; }
.auth-form { display:grid;gap:16px; }
.auth-form .md-field { --md-field-bg:var(--md-sys-color-surface-container-lowest); }
.auth-row { display:flex;justify-content:flex-end;margin:-6px 0 0; }
.auth-link { color:var(--md-sys-color-primary);font-size:14px;line-height:20px;font-weight:500;letter-spacing:.1px;text-decoration:none; }
.auth-link:hover { text-decoration:underline; }
.auth-submit { min-height:48px;width:100%;font-size:15px; }
.auth-submit .ui-icon { margin:0 -4px 0 0; }
.auth-sep { display:flex;align-items:center;gap:12px;margin:20px 0 16px;color:var(--md-sys-color-on-surface-variant);font-size:12px;letter-spacing:.4px; }
.auth-sep::before,.auth-sep::after { content:"";flex:1;height:1px;background:var(--md-sys-color-outline-variant); }
.auth-ghost { width:100%;min-height:44px;background:transparent;color:var(--md-sys-color-primary);border:1px solid var(--md-sys-color-outline); }
.auth-ghost:hover { box-shadow:none; }
.auth-ghost .ui-icon { margin:0; }
.auth-create { margin:16px 0 0;text-align:center;color:var(--md-sys-color-on-surface-variant);font-size:14px;line-height:20px; }
.auth-create a { color:var(--md-sys-color-primary);font-weight:500; }
.auth-foot { display:flex;align-items:center;justify-content:center;gap:6px;margin-top:20px;color:var(--md-sys-color-on-surface-variant);font-size:12px;line-height:16px;letter-spacing:.4px; }
.auth-foot .ui-icon { width:16px;height:16px; }
/* 3.19.0 · Ingreso rápido de caja: personas del puesto, persona elegida, PIN y aviso de Bloq Mayús. */
.quick-login.auth-card { max-width:520px; }
.auth-people { display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:-4px 0 4px; }
.auth-person { display:flex;align-items:center;gap:10px;min-height:60px;padding:10px 12px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-lg,14px);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface);text-align:left;cursor:pointer;box-shadow:none;font:inherit; }
.auth-person:hover,.auth-person:focus-visible { border-color:var(--md-sys-color-primary);background:var(--md-sys-color-primary-container,#e8f1ff);box-shadow:none;outline:none; }
.auth-avatar { flex:0 0 auto;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--md-sys-color-primary);color:var(--md-sys-color-on-primary,#fff);font-size:14px;font-weight:700;letter-spacing:.3px; }
.auth-person-name { display:flex;flex-direction:column;min-width:0;line-height:18px; }
.auth-person-name strong { font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.auth-person-name small { color:var(--md-sys-color-on-surface-variant);font-size:12px; }
.auth-person-selected { display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:var(--md-shape-lg,14px);background:var(--md-sys-color-surface-container,#f0f3f8); }
.auth-person-selected .auth-avatar { width:44px;height:44px;font-size:15px; }
.auth-person-selected .auth-person-name strong { font-size:16px; }
.auth-switch { margin-left:auto;padding:6px 8px;background:transparent;border:0;box-shadow:none;cursor:pointer;font:inherit;font-size:14px;font-weight:500; }
.auth-switch:hover { text-decoration:underline;box-shadow:none;background:transparent; }
.auth-other { margin:-2px 0 2px; }
.auth-person-hint { margin:-8px 0 0;color:var(--md-sys-color-on-surface-variant);font-size:13px;line-height:18px; }
.caps-hint { display:flex;align-items:center;gap:6px;margin:-10px 0 0;color:var(--md-sys-color-error,#b3261e);font-size:13px;line-height:18px;font-weight:500; }
.caps-hint .ui-icon { width:18px;height:18px; }
#pin { letter-spacing:.35em;font-size:18px; }
.auth-row:empty,.auth-row:not(:has(:not([hidden]))) { display:none; }
.auth-desktop .rapi-form { gap:16px; }
.auth-desktop .login-window.rapi-window { width:100%;max-width:460px;padding:28px;border-radius:var(--md-shape-xl);background:var(--md-sys-color-surface-container-lowest);box-shadow:var(--md-elev-1); }
.login-desktop .rapi-workspace { width:100%;max-width:460px;margin:0 auto;padding:0; }
.login-desktop .rapi-statusbar { grid-column:auto;justify-content:center;padding:16px 0 0;border:0; }
.rapi-logo { display:flex;justify-content:center;padding:0 0 20px; }
.rapi-logo img { display:block;width:260px;max-width:100%;height:auto; }
.rapi-titlebar { display:flex;align-items:center;gap:16px;margin-bottom:12px; }
.rapi-titlebar h1,.rapi-titlebar h2 { margin:0;min-width:0;overflow-wrap:anywhere; }
.rapi-titlebar-fill { flex:1; }
.rapi-titlebar-buttons { display:none; }
@media (max-width:420px) { .auth-card { padding:24px 20px 20px;border-radius:var(--md-shape-lg); } }

/* ---------- marca de agua ---------- */
#watermark { position:fixed;inset:0;z-index:35;pointer-events:none;background-repeat:repeat;background-position:0 0;opacity:.9; }
@media print { #watermark { display:none; } }

/* ---------- recargas: catálogo y datos ---------- */
.recharge-overview { grid-template-columns:1.6fr 1fr 1fr; }
.recharge-overview .stat-card { min-height:140px; }
.recharge-overview .stat-card:first-child .stat-value { font-size:34px;line-height:40px; }
.recharge-overview .stat-action { margin-top:auto;justify-content:flex-start;gap:6px; }
fieldset.recharge-panel { padding:0;border:0;background:transparent; }
.recharge-panel>legend { position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%); }
.recharge-form { display:grid;grid-template-columns:minmax(0,1.4fr) minmax(340px,1fr);gap:24px;align-items:start; }
.recharge-chooser,.recharge-details { min-width:0;padding:20px 24px 24px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest); }
.recharge-section-head { display:flex;align-items:flex-start;gap:12px;margin:0 0 20px; }
.step-index { display:grid;place-items:center;flex-shrink:0;width:32px;height:32px;border-radius:10px;background:var(--brand-accent);color:var(--brand-deep);font-family:var(--md-font-display);font-size:12px;font-weight:500; }
.recharge-section-head h2 { margin:0 0 2px;font-size:16px;line-height:24px;font-weight:500;letter-spacing:.15px; }
.recharge-section-head p { margin:0;color:var(--md-sys-color-on-surface-variant);font-size:12px;line-height:16px; }
.recharge-details { display:grid;gap:16px;position:sticky;top:80px; }
.recharge-details>.recharge-section-head { margin-bottom:0; }
.recharge-details>.muted { margin:-8px 0 0;padding:0 16px;font-size:12px;line-height:16px; }
.recharge-details>.note { font-size:13px; }
.recharge-details>.actions { margin-top:4px; }
.recharge-details>.actions button { width:100%;min-height:48px; }
.recharge-details>label { margin-bottom:-8px;padding:0 4px; }
#cat-destination { font-variant-numeric:tabular-nums;letter-spacing:.3px; }
#cat-amount { font-variant-numeric:tabular-nums;font-size:20px; }
.company-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px; }
.company { min-width:0;min-height:100px;padding:16px 12px;flex-direction:column;gap:10px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface);font-size:14px;font-weight:500;text-align:center;white-space:normal;box-shadow:none!important; }
.company img { display:block;width:100%;max-width:112px;height:44px;object-fit:contain; }
.company:hover { border-color:var(--md-sys-color-outline); }
.company.selected { background:var(--brand-accent-soft);border-color:var(--brand-deep-2);color:var(--brand-deep-2);box-shadow:inset 0 0 0 1px var(--md-sys-color-primary)!important; }
.recharge-products { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.recharge-product { position:relative;display:grid;grid-template-columns:96px minmax(0,1fr);grid-template-rows:1fr 1fr;align-items:end;justify-items:start;min-height:88px;padding:12px 14px;gap:2px 12px;text-align:left; }
.recharge-product span { line-height:20px; }
.recharge-product .product-art { display:flex;justify-content:center;align-items:center;grid-row:1/3;align-self:center;width:100%;height:56px;overflow:hidden; }
.product-art img { flex-shrink:0;width:96px;height:56px;max-width:100%;object-fit:contain; }
.product-art .product-logo-personal,.product-art .product-logo-claro,.product-art .product-logo-tuenti { width:96px;height:96px;max-width:none; }
.product-art .product-logo-uala { width:92px;height:44px; }
.product-art .product-logo-saeta,.product-art .product-logo-redbus { width:84px;height:48px; }
.recharge-product .product-name { font-size:14px;font-weight:500; }
.recharge-product .product-kind { align-self:start;color:var(--md-sys-color-on-surface-variant);font-size:12px;font-weight:400;letter-spacing:.4px; }
.recharge-product.selected::after { content:"";position:absolute;top:10px;right:10px;width:18px;height:18px;border-radius:50%;background:var(--md-sys-color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' fill='%23fff'%3E%3Cpath d='M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z'/%3E%3C/svg%3E") center/12px no-repeat;opacity:1; }
.recharge-product-preview { display:flex;justify-content:center;margin-bottom:8px;padding:16px;border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-low); }
.recharge-product-preview img { display:block;width:140px;height:56px;object-fit:contain; }
.rapi-list-head { display:grid;grid-template-columns:140px minmax(0,1fr);padding:10px 14px;border-radius:var(--md-shape-sm) var(--md-shape-sm) 0 0;background:var(--md-sys-color-surface-container-low);color:var(--md-sys-color-on-surface-variant);font-size:12px; }
.amounts { display:grid;align-content:start;gap:8px;max-height:350px;overflow:auto; }
.amounts:empty { min-height:100px; }
.amounts button { justify-content:flex-start;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface);text-align:left;white-space:normal;box-shadow:none!important; }
.amounts button:hover,.amounts button.selected { background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container); }
.offer-card { display:grid!important;grid-template-columns:125px minmax(0,1fr);align-items:center; }
.offer-card strong { font-size:20px;grid-row:1/4; }
.offer-title { font-weight:500; }
.offer-description,.offer-pill { font-size:12px;color:var(--md-sys-color-on-surface-variant); }
.phone-row { display:flex;gap:12px;align-items:center;flex-wrap:wrap; }
.phone-row input { flex:1;min-width:150px; }
.phone-row small { color:var(--md-sys-color-on-surface-variant); }
.phone-row .prefix { font-weight:500; }
/* 3.16.0 · consulta de importes: botón bajo el destino, tarjetas de importes del motor (fijos) o importe libre */
.quote-actions { margin:0; }
.quote-actions button { width:100%;min-height:44px; }
.quote-box:empty { display:none; }
.quote-box { display:grid;gap:10px; }
.quote-head { display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;margin:0;font-size:14px;line-height:20px; }
.quote-head strong { font-weight:500; }
.quote-loading { margin:0;padding:0 4px; }
.quote-detail { margin:0;padding:0 4px;font-size:12px;line-height:16px; }
.amount-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.amount-card { position:relative;display:grid;align-content:start;justify-items:start;gap:2px;min-height:76px;padding:12px 14px 12px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface);text-align:left;white-space:normal;box-shadow:none!important; }
.amount-card:hover { border-color:var(--md-sys-color-outline); }
.amount-card.selected { background:var(--brand-accent-soft);border-color:var(--brand-deep-2);color:var(--brand-deep-2);box-shadow:inset 0 0 0 1px var(--md-sys-color-primary)!important; }
.amount-card.selected::after { content:"";position:absolute;inset:10px 10px auto auto;width:18px;height:18px;opacity:1;border-radius:50%;background:var(--md-sys-color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' fill='%23fff'%3E%3Cpath d='M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z'/%3E%3C/svg%3E") center/12px no-repeat; }
.amount-value { font-family:var(--md-font-display);font-size:20px;line-height:26px;font-weight:600;letter-spacing:-.2px;font-variant-numeric:tabular-nums;padding-right:22px; }
.amount-title { font-size:13px;line-height:18px;font-weight:500;overflow-wrap:anywhere; }
.amount-description { color:var(--md-sys-color-on-surface-variant);font-size:12px;line-height:16px;font-weight:400;overflow-wrap:anywhere; }
.amount-card.selected .amount-description { color:inherit;opacity:.85; }
.amount-badge { margin-top:4px;padding:2px 8px;border-radius:var(--md-shape-full);background:var(--brand-accent);color:var(--brand-deep);font-size:11px;line-height:16px;font-weight:600;letter-spacing:.4px; }
/* 3.17.0 · promoción informada por el proveedor (benefit), «Última recarga» y grupos por categoría (Saldo / Pack) */
.amount-promo { display:inline-flex;align-items:flex-start;gap:4px;margin-top:4px;padding:3px 8px;border-radius:var(--md-shape-sm);background:var(--md-sys-color-tertiary-container,#ffe3c2);color:var(--md-sys-color-on-tertiary-container,#5a3a00);font-size:12px;line-height:16px;font-weight:500;text-align:left;overflow-wrap:anywhere; }
.amount-promo .ui-icon { width:14px;height:14px;flex:none;margin-top:1px; }
.amount-card.selected .amount-promo { background:rgba(255,255,255,.18);color:inherit; }
.amount-flags { display:flex;flex-wrap:wrap;gap:4px;margin-top:2px; }
.amount-flags .amount-badge { margin-top:0; }
.amount-last { padding:2px 8px;border-radius:var(--md-shape-full);border:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface-variant);font-size:11px;line-height:16px;font-weight:500; }
.amount-card.selected .amount-last { color:inherit;border-color:currentColor;opacity:.85; }
.amount-groups { display:grid;gap:12px; }
.amount-group-head { display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;margin-bottom:6px;font-size:14px;line-height:20px; }
.quote-notice { margin:6px 0 0;font-size:12px;line-height:16px; }
.quote-legal { margin:4px 0 0;font-size:11px;line-height:15px; }
.promo-box-empty { opacity:.85; }
.product-logo-text { display:grid;place-items:center;width:72px;height:44px;border-radius:var(--md-shape-sm);background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);font-family:var(--md-font-display);font-size:16px;font-weight:600;letter-spacing:1px; }
.recharge-product-preview .product-logo-text { width:140px;height:56px;font-size:20px; }
.offer-note { display:block;margin-top:2px;font-size:12px;line-height:16px; }
/* 3.16.0 · Proveedores: una tarjeta por motor (sesión, capacidades, habilitación, captura HAR, clave de firma) + rutas por producto */
.engine-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;align-items:start; }
.engine-card { display:flex;flex-direction:column;gap:16px; }
.engine-card>legend+* { clear:both; }
.engine-head { display:flex;flex-wrap:wrap;align-items:center;gap:8px; }
.engine-detail { margin:-6px 0 0;color:var(--md-sys-color-on-surface-variant);font-size:14px;line-height:20px; }
.engine-facts { display:grid; }
.engine-facts .summary-line { padding:8px 0;font-size:13px; }
.engine-facts .summary-line strong { max-width:60%;font-size:13px; }
.engine-facts>.details { margin:6px 0 0; }
.engine-flags { display:grid;gap:4px;margin:0;padding:12px 16px;list-style:none;border-radius:var(--md-shape-sm);background:var(--md-sys-color-surface-container-low);font-size:13px;line-height:18px; }
.engine-flags li { display:flex;gap:10px;align-items:flex-start; }
.engine-flags .flag-mark { flex-shrink:0;width:18px;font-weight:700;text-align:center; }
.engine-flags li.ok .flag-mark { color:var(--md-ext-success); }
.engine-flags li.off { color:var(--md-sys-color-on-surface-variant); }
.engine-flags li.off .flag-mark { color:var(--md-sys-color-error); }
.engine-card .rapi-group { margin:0; }
.engine-session { display:grid;gap:10px; }
.engine-session>label { padding:0 4px; }
.engine-session .actions { margin-top:4px; }
.engine-session>.details { margin:0; }
.engine-products-box { margin:0; }
.engine-products { margin-top:8px; }
#recharge-routing .rapi-grid td select { min-width:200px; }

/* ---------- tesorería: medios de pago (segmentados) ---------- */
.pay-methods { display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:0;margin:0 0 4px;border:1px solid var(--md-sys-color-outline);border-radius:var(--md-shape-full);overflow:hidden; }
.pay-methods button { min-height:40px;padding:0 12px;border:0;border-left:1px solid var(--md-sys-color-outline);border-radius:0;background:transparent;color:var(--md-sys-color-on-surface);font-weight:500;box-shadow:none!important; }
.pay-methods button:first-child { border-left:0; }
.pay-methods button.selected { background:var(--brand-accent-soft);color:var(--brand-deep-2);font-weight:600; }
.pay-methods button.selected::before { content:"✓";margin-right:6px;font-size:12px; }

/* ---------- notificaciones ---------- */
.notification-list { display:grid;gap:8px;max-height:58vh;overflow:auto;padding:2px; }
.notification { display:grid;gap:4px;width:100%;min-height:0;text-align:left;padding:12px 16px;border:0;border-radius:var(--md-shape-md);background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container);font:inherit;white-space:normal;justify-content:stretch;box-shadow:none!important; }
.notification.read { background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface);border:1px solid var(--md-sys-color-outline-variant); }
.notification-kind { font-size:11px;font-weight:500;letter-spacing:.5px;text-transform:uppercase; }
.notification-body { font-size:14px;line-height:20px;font-weight:400; }
.notification-time { font-size:12px;letter-spacing:.4px;opacity:.8; }

/* ---------- tablero ---------- */
.dash-secondary { margin-top:0; }
.dash-secondary .stat-card:first-child { background:var(--md-sys-color-surface-container);color:var(--md-sys-color-on-surface); }
.dash-secondary .stat-card:first-child .stat-label,.dash-secondary .stat-card:first-child .stat-note { color:var(--md-sys-color-on-surface-variant);opacity:1; }
.dash-chart { width:100%;height:auto;max-height:260px;display:block; }
.dash-grid { stroke:var(--md-sys-color-outline-variant);stroke-width:1; }
.dash-axis { font-size:11px;fill:var(--md-sys-color-on-surface-variant); }
.dash-bar-cash { fill:var(--md-sys-color-primary); }
.dash-bar-electronic { fill:var(--md-sys-color-primary-container); }
.dash-legend { display:flex;align-items:center;gap:8px;margin:8px 0 0;font-size:12px;letter-spacing:.4px;color:var(--md-sys-color-on-surface-variant); }
.dash-swatch { display:inline-block;width:14px;height:14px;border-radius:4px;background:var(--md-sys-color-primary); }
.dash-swatch.electronic { background:var(--md-sys-color-primary-container);margin-left:10px; }
.dash-alerts p { margin:6px 0 0; }
.dash-alerts a { font-weight:500; }
.dash-recent { display:grid;gap:8px; }
.dash-event { display:grid;gap:2px;padding:10px 12px;border-radius:var(--md-shape-sm);background:var(--md-sys-color-surface-container-low); }
.dash-event-time { font-size:12px;letter-spacing:.4px;color:var(--md-sys-color-on-surface-variant); }
.rapi-stats.dash-four { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media (max-width:1100px) { .rapi-stats.dash-four { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px) { .rapi-stats.dash-four { grid-template-columns:minmax(0,1fr); } }

/* ---------- expedientes, rendición, pasos, documentos ---------- */
.amount.neg { color:var(--md-sys-color-error);font-weight:500; }
.rendicion-block { position:relative;margin:0;padding:16px 20px 16px 24px;border:1px solid var(--brand-line);border-radius:var(--brand-radius);background:#fff;color:var(--brand-ink);box-shadow:var(--brand-shadow); }
.rendicion-block::before { content:"";position:absolute;left:0;top:16px;bottom:16px;width:5px;border-radius:0 4px 4px 0;background:var(--md-ext-info); }
.rendicion-head { margin-bottom:8px;font-size:16px;line-height:24px;font-weight:500;letter-spacing:.15px; }
.rendicion-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px 18px; }
.rendicion-grid>div { display:flex;flex-direction:column;gap:2px; }
.rendicion-grid>div>span:first-child { font-size:12px;letter-spacing:.4px;opacity:.85; }
.rendicion-grid strong,.rendicion-grid .amount { font-size:17px;font-weight:500;font-variant-numeric:tabular-nums; }
.timeline { display:flex;flex-direction:column;gap:6px;max-height:320px;overflow:auto;padding:4px 2px; }
.timeline-item { display:grid;grid-template-columns:150px 110px 1fr;gap:8px;align-items:baseline;padding:8px 12px;border-left:3px solid var(--md-sys-color-outline-variant);border-radius:0 var(--md-shape-sm) var(--md-shape-sm) 0;background:var(--md-sys-color-surface-container-low);font-size:13px; }
.timeline-item.kind-estado { border-left-color:var(--md-sys-color-primary); } .timeline-item.kind-decision { border-left-color:var(--md-ext-warning); } .timeline-item.kind-documento { border-left-color:var(--md-sys-color-tertiary); } .timeline-item.kind-movimiento { border-left-color:var(--md-sys-color-error); }
.timeline-when { color:var(--md-sys-color-on-surface-variant);font-size:12px; } .timeline-kind { font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.5px; }
.steps { margin:6px 0 0;padding-left:0;list-style:none;display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:6px 16px; }
.steps li { display:flex;gap:8px;padding:8px 12px;border-radius:var(--md-shape-sm);background:var(--md-sys-color-surface-container-low);font-size:13px; }
.steps li.done { color:var(--md-ext-on-success-container);background:var(--md-ext-success-container); } .steps li.observed { color:var(--md-ext-on-warning-container);background:var(--md-ext-warning-container); }
.step-mark { display:inline-block;width:20px;font-weight:500; }
.doc-list { display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:12px; }
.doc-item.observed { border-color:var(--md-sys-color-error); }
.doc-item input[type=file] { margin:6px 0; }
@media (max-width:700px) { .timeline-item { grid-template-columns:1fr;gap:2px; } }

/* ---------- portal: estado de mi cuenta, declaraciones, novedades, ayuda ---------- */
/* 3.15.0 · bloque de saldo en el degradado oscuro de la marca (como el hero del sitio): cifra grande en Poppins y acción principal de acento */
.home-balance { position:relative;margin:0;padding:24px 28px;border-radius:var(--brand-radius);background:var(--brand-gradient);color:#fff;overflow:hidden;box-shadow:var(--brand-shadow); }
.home-balance::after { content:"";position:absolute;inset:0;background-image:var(--brand-halftone);background-size:14px 14px;opacity:.75;pointer-events:none;-webkit-mask-image:linear-gradient(115deg,transparent 40%,#000 100%);mask-image:linear-gradient(115deg,transparent 40%,#000 100%); }
.home-balance>* { position:relative;z-index:1; }
.home-balance .stat-label { display:block;font-size:12px;letter-spacing:1.2px;text-transform:uppercase;color:var(--brand-accent);opacity:1;font-family:var(--md-font-display);font-weight:600; }
.home-balance > .amount { display:block;margin:6px 0 2px;font-family:var(--md-font-display);font-size:40px;line-height:48px;font-weight:600;letter-spacing:-.5px;color:inherit; }
.home-balance > .muted { color:rgba(255,255,255,.82); }
.home-balance-extra { margin-top:14px;padding-top:8px;border-top:1px solid rgba(255,255,255,.18); }
.home-balance .summary-line { border-bottom-color:rgba(255,255,255,.18); }
.home-balance .summary-line>span,.home-balance .summary-total { color:inherit; }
.home-balance .summary-line>span { color:rgba(255,255,255,.78); }
.home-balance .summary-total { background:rgba(255,255,255,.14); }
.home-balance .stat-action,.home-balance a { color:var(--brand-accent); }
.home-balance .actions { margin-top:18px;justify-content:flex-start; }
.home-balance .actions button:not(.secondary) { background:var(--brand-accent);color:var(--brand-deep);box-shadow:0 6px 18px rgba(95,181,42,.32); }
.home-balance .actions button.secondary { background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.4); }
.home-grid { align-items:start; }
.home-grid .rapi-stats .stat-value { font-size:22px;line-height:28px; }
.home-grid .rapi-stats .stat-card { padding:14px 16px; }
.news-body p { margin:0 0 8px;font-size:14px;line-height:20px; }
.receipt-rows { display:flex;flex-direction:column;gap:8px;margin:4px 0; }
.receipt-row { display:grid;grid-template-columns:28px 1.1fr 1fr 1.6fr auto auto;gap:8px;align-items:center;padding:8px 12px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-sm);background:var(--md-sys-color-surface-container-lowest); }
.receipt-row.observed { border-color:var(--md-sys-color-error);background:var(--md-sys-color-error-container); }
.receipt-row input:not([type=file]) { min-height:44px;padding:8px 12px;font-size:14px; }
.receipt-row input[type=file] { font-size:12px;max-width:100%; }
.receipt-index { font-weight:500;color:var(--md-sys-color-on-surface-variant);text-align:center; }
.receipt-totals { margin:8px 0 0;font-size:13px; }
.declaration-form [hidden] { display:none; }
.decl-transfer,.decl-deposit { display:contents; }
.help-item { margin:0 0 8px;padding:12px 16px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest); }
.help-item summary { cursor:pointer;font-weight:500;color:var(--md-sys-color-on-surface); }
.help-item p { margin:8px 0 0;font-size:14px;line-height:20px;color:var(--md-sys-color-on-surface-variant); }
@media (max-width:760px) { .receipt-row { grid-template-columns:28px 1fr 1fr;grid-auto-rows:auto; } .home-balance > .amount { font-size:28px;line-height:36px; } }
.recover-form .form-error:not(:empty) { margin:0 0 10px; }

/* ---------- pagos de servicios (bills) ---------- */
.bill-workspace,.bill-rapi-window,.service-details { display:flex;flex-direction:column;gap:16px; }
.workspace-toolbar,.service-window-titlebar,.debt-window-titlebar,.bill-rapi-window-head { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 16px;border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-low); }
.workspace-breadcrumb,.workspace-actions,.service-window-title { display:flex;align-items:center;gap:10px; }
.desktop-dot { width:9px;height:9px;border-radius:50%;background:var(--md-ext-success); }
.breadcrumb-arrow,.bill-live-status,.bill-live-count { color:var(--md-sys-color-on-surface-variant);font-size:12px; }
.workspace-status,.window-state { color:var(--md-ext-success);font-size:12px; }
.window-state.warning { color:var(--md-ext-warning); }
.window-state.success { font-weight:500; }
.toolbar-button { min-width:0; }
.service-window,.mode-window,.debt-window { padding:20px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest); }
.service-window-body { padding:16px 0 0; }
.service-logo,.service-logo-fallback { width:32px;height:32px;object-fit:contain;flex-shrink:0; }
.service-logo-fallback { display:grid;place-items:center;border-radius:var(--md-shape-sm);background:var(--md-sys-color-secondary-container);color:var(--md-sys-color-on-secondary-container); }
.service-logo-fallback .ui-icon { width:20px;height:20px;margin:0; }
/* 3.16.0 · servicios en el panel: búsqueda en vivo, modalidad en el diálogo y revisión con medio de pago y efectivo recibido */
.bill-search .actions { margin-top:0; }
.bill-rapi-window>label { padding:0 4px; }
.bill-modal-details:empty { display:none; }
.mode-window .actions { margin-top:4px; }
.bill-pay-label { margin:12px 0 6px;padding:0 4px; }
#modal-content .pay-methods { margin-bottom:8px; }
.bill-cash:empty { display:none; }
.bill-live-results,.result-items { display:grid;gap:8px;max-height:380px;overflow:auto; }
.bill-live-results:empty,.bill-invoices:empty { display:none; }
.bill-live-option { display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:12px;justify-content:start;min-height:0;padding:12px 16px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest);color:var(--md-sys-color-on-surface);text-align:left;white-space:normal;box-shadow:none!important; }
.bill-live-option:hover { background:var(--md-sys-color-secondary-container); }
.bill-live-copy { display:grid;min-width:0;gap:2px; }
.bill-live-copy strong,.bill-live-copy small { overflow-wrap:anywhere; }
.bill-live-copy small,.bill-rapi-window-head span,.bill-modal-empty { color:var(--md-sys-color-on-surface-variant);font-size:12px; }
.bill-rapi-window-head { justify-content:flex-start; }
.bill-rapi-window-head div { display:grid;gap:4px; }
.bill-modal-details { margin:0; }
.bill-field-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px; }
.bill-debt-scroll { max-width:100%;overflow:auto;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md); }
.bill-debt-table { width:100%;border-collapse:collapse;font-size:14px; }
.bill-debt-table caption,.bill-debt-table th { padding:12px 16px;text-align:left;background:var(--md-sys-color-surface-container-low);border-bottom:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface-variant);font-size:12px;font-weight:500;letter-spacing:.5px; }
.bill-debt-table td { padding:12px 16px;border-bottom:1px solid var(--md-sys-color-outline-variant); }
.bill-debt-table td small { display:block;color:var(--md-sys-color-on-surface-variant);font-size:12px; }
.bill-debt-table input { min-width:120px;max-width:180px;min-height:44px;padding:8px 12px; }
.bill-grid-total,.bill-window-footer,.bill-results-summary,.result-item-head { display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;font-size:14px; }
.bill-window-footer small { color:var(--md-sys-color-on-surface-variant); }
.bill-results-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px; }
.bill-results-summary { grid-column:1/-1; }
.result-item { padding:16px;border:1px solid var(--md-sys-color-outline-variant);border-radius:var(--md-shape-md);background:var(--md-sys-color-surface-container-lowest); }
.result-item-head { padding:0 0 10px;font-weight:500; }
.result-approved .result-item-head span { color:var(--md-ext-success); }
.result-rejected .result-item-head span { color:var(--md-sys-color-error); }
.result-pending .result-item-head span { color:var(--md-ext-warning); }

/* ---------- pantallas chicas ---------- */
@media (max-width:1100px) {
  .recharge-form { grid-template-columns:minmax(0,1fr) minmax(300px,1fr);gap:16px; }
  .recharge-overview { grid-template-columns:1.4fr 1fr 1fr;gap:12px; }
  .engine-grid { grid-template-columns:minmax(0,1fr);gap:16px; }
}
@media (max-width:700px) {
  .recharge-overview { grid-template-columns:1fr 1fr;gap:10px; }
  .recharge-overview .stat-card { min-height:0;padding:16px; }
  .recharge-overview .stat-card:first-child { grid-column:1/-1; }
  .recharge-overview .stat-card:first-child .stat-value { font-size:28px;line-height:36px; }
  .recharge-form { grid-template-columns:minmax(0,1fr);gap:16px; }
  .recharge-details { position:static;scroll-margin-top:80px; }
  .recharge-chooser,.recharge-details { padding:16px; }
  .company-grid,.recharge-products { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
  .recharge-product { display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:104px;padding:12px 8px;gap:4px; }
  .recharge-product .product-art { height:46px; }
  .recharge-product .product-kind { display:none; }
  .bill-field-grid,.bill-results-grid { grid-template-columns:1fr; }
  .workspace-toolbar,.bill-grid-total,.bill-window-footer { align-items:flex-start;flex-direction:column; }
  .bill-live-option { grid-template-columns:32px minmax(0,1fr); }
  .bill-live-count { grid-column:2; }
  .bill-debt-table thead { display:none; }
  .bill-debt-table,.bill-debt-table caption,.bill-debt-table tbody,.bill-debt-table tr,.bill-debt-table td { display:block; }
  .bill-debt-table td { border:0; }
  .bill-debt-table tr { padding:6px;border-bottom:1px solid var(--md-sys-color-outline-variant); }
  .bill-debt-table input,.bill-debt-table button { width:100%;max-width:none; }
}
@media print {
  .top-bar,.nav-drawer,.rapi-statusbar,.drawer-scrim { display:none!important; }
  .app-shell { display:block; }
  .page { max-width:none;padding:0; }
  .rapi-grid-scroll { overflow:visible;border:0; }
  .stat-card,.card { break-inside:avoid; }
}

/* 3.15.0 · forma de pago en efectivo: efectivo recibido y vuelto en la confirmación de la recarga. */
.cash-received{margin-top:12px;padding:12px 14px;background:var(--brand-accent-soft);border:1px solid #cfe9b8;border-radius:var(--brand-radius-sm);}
.cash-received>label{display:block;font-family:var(--md-font-display);font-weight:600;font-size:13px;color:var(--brand-deep-2);margin-bottom:6px;}
.cash-row{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.cash-row input{flex:0 1 180px;min-width:120px;font-size:18px;font-family:var(--md-font-display);font-weight:600;text-align:right;padding:8px 10px;border:1px solid var(--brand-line);border-radius:8px;background:#fff;color:var(--brand-ink);}
.cash-change{font-family:var(--md-font-display);font-size:16px;color:var(--brand-deep-2);}
.cash-change.status-rejected{color:var(--md-sys-color-error,#b3261e);}
.cash-change.status-approved{color:var(--brand-accent-ink);}
.cash-quick{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;}
.cash-quick button{min-height:30px;padding:4px 12px;font-size:12px;}
@media (max-width:700px){.cash-row input{flex:1 1 100%;}}


/* ---------- 3.20.0 · Chat en vivo puesto ↔ red ---------- */
.chat-fab { position:fixed;right:20px;bottom:20px;z-index:60;display:grid;place-items:center;width:56px;height:56px;min-height:56px;padding:0;border:0;border-radius:18px;background:var(--brand-gradient,linear-gradient(135deg,#1f5b49,#2f8a63));color:#fff;box-shadow:0 10px 28px rgba(13,43,33,.28)!important;cursor:pointer;transition:transform var(--md-motion-fast),box-shadow var(--md-motion-fast); }
.chat-fab:hover { transform:translateY(-2px);box-shadow:0 14px 32px rgba(13,43,33,.32)!important; }
.chat-fab .ui-icon { width:28px;height:28px;margin:0; }
.chat-fab.is-open { transform:scale(.92);opacity:.85; }
.chat-fab[hidden], .chat-fab-count[hidden] { display:none; }
.chat-fab-count { position:absolute;top:-6px;right:-6px;min-width:22px;height:22px;padding:0 6px;border-radius:var(--md-shape-full);background:var(--md-sys-color-error,#b3261e);color:#fff;font-size:12px;line-height:22px;font-weight:600;text-align:center;box-shadow:0 0 0 2px #fff; }
.chat-fab-count[hidden] { display:none; }
.chat-fab.has-unread::after { content:"";position:absolute;inset:-6px;border-radius:24px;border:2px solid rgba(47,138,99,.45);animation:chat-pulse 1.8s ease-out infinite;pointer-events:none; }
@keyframes chat-pulse { 0% { transform:scale(.9);opacity:.9; } 100% { transform:scale(1.25);opacity:0; } }
.chat-panel { position:fixed;right:20px;bottom:88px;z-index:59;display:flex;flex-direction:column;width:380px;max-width:calc(100vw - 24px);height:560px;max-height:calc(100dvh - 110px);border-radius:var(--brand-radius,16px);background:#fff;border:1px solid var(--brand-line);box-shadow:0 24px 60px rgba(13,43,33,.24);overflow:hidden;transform:translateY(16px) scale(.98);opacity:0;visibility:hidden;transition:transform var(--md-motion-fast),opacity var(--md-motion-fast),visibility 0s linear .2s; }
.chat-panel.open { transform:none;opacity:1;visibility:visible;transition:transform var(--md-motion-fast),opacity var(--md-motion-fast),visibility 0s; }
.chat-head { display:flex;align-items:center;gap:10px;padding:12px 10px 12px 16px;background:var(--brand-gradient,#1f5b49);color:#fff; }
.chat-head-icon { display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:rgba(255,255,255,.16); }
.chat-head-icon .ui-icon { width:22px;height:22px;margin:0; }
.chat-head-text { display:grid;gap:2px;min-width:0;flex:1; }
.chat-head-text strong { font-family:var(--md-font-display);font-size:15px;line-height:20px;font-weight:600; }
.chat-head .icon { width:36px;height:36px;min-height:36px;padding:0;border-radius:50%;background:transparent;color:#fff;box-shadow:none!important; }
.chat-head .icon .ui-icon { width:22px;height:22px;margin:0; }
.chat-status { display:block;font-size:12px;line-height:16px;letter-spacing:.3px;color:rgba(255,255,255,.82);overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.chat-status.online::before,.chat-status.typing::before,.chat-status.away::before,.chat-status.off::before { content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;background:#9be4b0;vertical-align:1px; }
.chat-status.typing::before { animation:chat-blink 1s steps(2) infinite; }
.chat-status.away::before { background:#ffd166; }
.chat-status.off::before { background:#ff8a80; }
@keyframes chat-blink { 50% { opacity:.3; } }
.chat-messages { flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:6px;padding:14px 14px 10px;background:var(--brand-paper,#f4f8f5);scrollbar-width:thin; }
.chat-day { align-self:center;margin:6px 0 2px;padding:2px 10px;border-radius:var(--md-shape-full);background:rgba(31,91,73,.08);color:var(--md-sys-color-on-surface-variant);font-size:11px;line-height:16px;letter-spacing:.4px;text-transform:capitalize; }
.chat-msg { position:relative;display:grid;gap:2px;max-width:82%;padding:8px 12px 6px;border-radius:14px;font-size:14px;line-height:20px;overflow-wrap:anywhere; }
.chat-msg.fresh { animation:chat-in .18s ease-out; }
@keyframes chat-in { from { opacity:0;transform:translateY(6px); } }
.chat-msg.theirs { align-self:flex-start;background:#fff;border:1px solid var(--brand-line);border-bottom-left-radius:4px;color:var(--brand-ink); }
.chat-msg.mine { align-self:flex-end;background:var(--brand-accent-soft,#dff3e4);border-bottom-right-radius:4px;color:var(--brand-deep-2,#124233); }
.chat-msg.system { align-self:center;max-width:92%;padding:6px 12px;border-radius:10px;background:transparent;color:var(--md-sys-color-on-surface-variant);font-size:12px;line-height:17px;text-align:center;font-style:italic; }
.chat-msg.system .chat-msg-time { justify-content:center;font-style:normal; }
.chat-msg-name { font-size:11px;line-height:14px;font-weight:600;letter-spacing:.3px;color:var(--brand-accent-ink,#2f8a63); }
.chat-msg.mine .chat-msg-name { color:var(--brand-deep-2,#124233);opacity:.75; }
.chat-msg-body { white-space:normal; }
.chat-msg-time { display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:10px;line-height:14px;color:var(--md-sys-color-on-surface-variant);letter-spacing:.3px; }
.chat-msg-check .ui-icon { width:14px;height:14px;margin:0;opacity:.6; }
.chat-msg-check.read .ui-icon { color:var(--brand-accent-ink,#2f8a63);opacity:1; }
.chat-msg-image { display:block;margin:2px 0 4px; }
.chat-msg-image img { display:block;max-width:100%;max-height:220px;border-radius:10px;border:1px solid var(--brand-line);background:#fff; }
.chat-more { align-self:center;min-height:32px;padding:4px 14px;font-size:12px; }
.chat-empty { margin:auto;padding:16px;color:var(--md-sys-color-on-surface-variant);font-size:13px;text-align:center; }
.chat-banner { display:flex;align-items:center;gap:8px;padding:8px 14px;border-top:1px solid var(--brand-line);background:#fff8e1;color:#5a3a00;font-size:12px;line-height:16px; }
.chat-banner[hidden] { display:none; }
.chat-banner .ui-icon { width:18px;height:18px;margin:0;flex:none;color:var(--brand-accent-ink,#2f8a63); }
.chat-compose { display:flex;align-items:flex-end;gap:6px;padding:10px 10px 10px 6px;border-top:1px solid var(--brand-line);background:#fff; }
.chat-compose.disabled { opacity:.55; }
.chat-compose .icon { width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;background:transparent;color:var(--md-sys-color-on-surface-variant);box-shadow:none!important;flex:none; }
.chat-compose .icon .ui-icon { width:22px;height:22px;margin:0; }
.chat-input { flex:1;min-width:0;min-height:40px;max-height:140px;margin:0;padding:10px 14px;border:1px solid var(--brand-line);border-radius:20px;background:var(--brand-paper,#f4f8f5);color:var(--brand-ink);font-family:var(--md-font);font-size:14px;line-height:20px;resize:none;overflow-y:auto; }
.chat-input:focus { outline:2px solid var(--md-sys-color-primary);outline-offset:-1px;background:#fff; }
.chat-send { display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border-radius:50%;flex:none;box-shadow:none!important; }
.chat-send .ui-icon { width:20px;height:20px;margin:0 0 0 2px; }
/* pantalla de administración */
.chat-admin { display:grid;grid-template-columns:340px minmax(0,1fr);gap:0;min-height:560px;height:calc(100dvh - 250px);max-height:760px;border:1px solid var(--brand-line);border-radius:var(--brand-radius,16px);background:#fff;overflow:hidden;box-shadow:var(--brand-shadow); }
.chat-side { display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--brand-line);background:#fff; }
.chat-side-tools { display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:8px;padding:12px;border-bottom:1px solid var(--brand-line); }
.chat-search,.chat-filter { margin:0;min-height:40px;padding:8px 12px;border:1px solid var(--brand-line);border-radius:12px;background:var(--brand-paper,#f4f8f5);font-size:14px; }
.chat-list { flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin; }
.chat-item { display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:12px 14px;border:0;border-bottom:1px solid var(--brand-line);border-radius:0;background:#fff;color:var(--brand-ink);text-align:left;white-space:normal;box-shadow:none!important;cursor:pointer; }
.chat-item:hover { background:var(--brand-paper,#f4f8f5); }
.chat-item.active { background:var(--brand-accent-soft,#dff3e4); }
.chat-item.unread .chat-item-title b,.chat-item.unread .chat-item-preview { font-weight:600;color:var(--brand-ink); }
.chat-item-avatar { position:relative;display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:var(--brand-accent,#9be4b0);color:var(--brand-deep,#0d2b21);font-family:var(--md-font-display);font-size:13px;font-weight:600; }
.chat-item-avatar.large { width:44px;height:44px; }
.chat-item-avatar.online::after { content:"";position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:#2f8a63;border:2px solid #fff; }
.chat-item-main { display:grid;gap:2px;min-width:0; }
.chat-item-title { display:flex;align-items:baseline;gap:4px;min-width:0;font-size:14px;line-height:20px; }
.chat-item-title b { font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.chat-item-title small { flex:none;color:var(--md-sys-color-on-surface-variant);font-size:12px; }
.chat-item-preview { display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--md-sys-color-on-surface-variant);font-size:13px;line-height:18px; }
.chat-item-meta { display:grid;justify-items:end;gap:4px; }
.chat-item-time { font-size:11px;color:var(--md-sys-color-on-surface-variant); }
.chat-item-count { min-width:20px;height:20px;padding:0 6px;border-radius:var(--md-shape-full);background:var(--md-sys-color-error,#b3261e);color:#fff;font-size:11px;line-height:20px;font-weight:600;text-align:center; }
.chat-item-state .ui-icon { width:18px;height:18px;margin:0;color:var(--brand-accent-ink,#2f8a63); }
.chat-pane { display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--brand-paper,#f4f8f5); }
.chat-pane .chat-messages { padding:16px 20px 10px; }
.chat-pane .chat-msg { max-width:70%; }
.chat-pane-empty { display:grid;gap:8px;justify-items:center;margin:auto;max-width:360px; }
.chat-pane-head { display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px 16px;border-bottom:1px solid var(--brand-line);background:#fff; }
.chat-pane-title { display:grid;gap:2px;min-width:0;flex:1 1 200px; }
.chat-pane-title strong { font-family:var(--md-font-display);font-size:15px;line-height:20px;font-weight:600;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.chat-pane-head .chat-status { color:var(--md-sys-color-on-surface-variant); }
.chat-pane-head .chat-status.online::before { background:#2f8a63; }
.chat-pane-tags { display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12px; }
.chat-assigned { display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:var(--md-shape-full);background:var(--brand-accent-soft,#dff3e4);color:var(--brand-deep-2,#124233);font-weight:500; }
.chat-assigned.none { background:rgba(0,0,0,.05);color:var(--md-sys-color-on-surface-variant); }
.chat-assigned .ui-icon { width:14px;height:14px;margin:0; }
.chat-pane-actions { display:flex;gap:8px;flex-wrap:wrap; }
.chat-pane-actions button { min-height:36px;padding:6px 14px;font-size:13px; }
.chat-quick { display:flex;gap:6px;flex-wrap:wrap;padding:8px 12px 0;background:#fff;border-top:1px solid var(--brand-line); }
.chat-chip { min-height:30px;padding:4px 12px;border:1px solid var(--brand-line);border-radius:var(--md-shape-full);background:#fff;color:var(--brand-deep-2,#124233);font-size:12px;line-height:18px;font-weight:500;box-shadow:none!important;white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis; }
.chat-chip:hover { background:var(--brand-accent-soft,#dff3e4);border-color:var(--brand-accent-ink,#2f8a63); }
.chat-pane .chat-compose { border-top:0;padding-top:8px; }
.chat-days { display:flex;flex-wrap:wrap;gap:4px 14px;margin:0 0 8px; }
.chat-day { display:inline-flex;align-items:center;gap:6px;font-size:14px; }
.chat-replies { display:grid;gap:8px;margin:8px 0; }
.chat-reply { display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:8px 16px;padding:12px 14px;border:1px solid var(--brand-line);border-radius:12px;background:#fff; }
.chat-reply.inactive { opacity:.6; }
.chat-reply-text { display:grid;gap:4px;flex:1 1 320px;min-width:0;font-size:14px;line-height:20px; }
.chat-reply-text span { color:var(--md-sys-color-on-surface-variant);white-space:pre-wrap; }
.chat-reply .actions { margin:0; }
@media (max-width:1000px) {
  .chat-admin { grid-template-columns:minmax(0,1fr);height:auto;max-height:none; }
  .chat-side { max-height:320px;border-right:0;border-bottom:1px solid var(--brand-line); }
  .chat-pane { min-height:520px; }
}
@media (max-width:700px) {
  .chat-fab { right:14px;bottom:14px;width:52px;height:52px;min-height:52px; }
  .chat-panel { right:0;left:0;bottom:0;width:100%;max-width:none;height:min(78dvh,620px);max-height:none;border-radius:20px 20px 0 0; }
  .chat-panel.open ~ .chat-fab,.chat-fab.is-open { opacity:0;pointer-events:none; }
  .chat-pane .chat-msg { max-width:88%; }
  .chat-side-tools { grid-template-columns:minmax(0,1fr); }
}
@media print { .chat-fab,.chat-panel { display:none!important; } }
/* 3.20.0 · clave temporal: campo con botón «Copiar» (la clave también se copia sola al generarla). */
.copy-field { display:flex;align-items:flex-end;gap:8px; }
.copy-field .md-field { flex:1;min-width:0; }
.copy-field input { font-family:ui-monospace,Consolas,'Cascadia Mono',monospace;letter-spacing:.4px; }
.copy-field .copy-button { display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 14px;white-space:nowrap; }
.copy-field .copy-button .ui-icon { width:18px;height:18px;margin:0; }
.copy-field .copy-button.copied { background:var(--brand-accent-soft,#dff3e4);color:var(--brand-deep-2,#124233); }
/* 3.20.0 · promociones: aviso al ingresar a Recargas (una vez por día) y pastilla en la cabecera de los importes. */
.promo-banner { position:relative;display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px 14px;margin:0;padding:14px 18px 14px 16px;border:1px solid #f3d9a4;border-left:5px solid #e8a33d;border-radius:var(--brand-radius,16px);background:linear-gradient(135deg,#fff8e8,#fffdf7);color:#4a3200; }
.promo-banner .promo-banner-icon { display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:#ffe7bd;color:#8a5a00;flex:none; }
.promo-banner .promo-banner-icon .ui-icon { width:22px;height:22px;margin:0; }
.promo-banner-text { flex:1 1 280px;min-width:0;display:grid;gap:4px;font-size:14px;line-height:20px; }
.promo-banner-text strong { font-family:var(--md-font-display);font-size:15px; }
.promo-banner-list { margin:2px 0 0;padding:0;list-style:none;display:grid;gap:2px;font-size:13px;line-height:18px; }
.promo-banner-list li b { color:#6b4300;font-weight:600; }
.promo-banner .promo-banner-close { width:36px;height:36px;min-height:36px;padding:0;border-radius:50%;background:transparent;color:#6b4300;box-shadow:none!important;flex:none; }
.promo-banner .promo-banner-close .ui-icon { width:20px;height:20px;margin:0; }
.quote-head .quote-promo-pill { display:inline-flex;align-items:center;gap:4px;margin-left:8px;padding:2px 10px;border-radius:var(--md-shape-full);background:#ffe7bd;color:#6b4300;font-size:12px;line-height:18px;font-weight:600;vertical-align:middle; }
.quote-head .quote-promo-pill .ui-icon { width:14px;height:14px;margin:0; }
.promo-slot:empty { display:none; }
.quote-auto { display:inline-flex;align-items:center;gap:6px;color:var(--md-sys-color-on-surface-variant);font-size:12px;line-height:16px; }
.quote-auto::before { content:"";width:12px;height:12px;border-radius:50%;border:2px solid var(--brand-accent-ink,#2f8a63);border-right-color:transparent;animation:chat-spin .8s linear infinite; }
@keyframes chat-spin { to { transform:rotate(360deg); } }

/* 3.21 · Mesa de trabajo: jerarquía estable, navegación rápida y datos legibles. */
:root {
  --brand-deep:#143d2d;--brand-deep-2:#1f5b49;--brand-ink:#172b23;
  --brand-muted:#5b6c62;--brand-paper:#f5f6f2;--brand-line:#dde5de;
  --brand-radius:16px;--brand-radius-sm:10px;
  --brand-shadow:0 2px 8px rgba(20,61,45,.035);--brand-shadow-hover:0 8px 24px rgba(20,61,45,.09);
  --md-sys-color-surface:var(--brand-paper);--md-sys-color-outline-variant:#d5dfd7;
  --md-sys-color-on-surface-variant:#53655b;--md-sys-color-surface-container-low:#f1f5ef;
}
body { letter-spacing:.08px; }
.app-shell { grid-template-columns:264px minmax(0,1fr);grid-template-rows:76px minmax(0,1fr) auto; }
.nav-drawer { background:var(--brand-deep);border:0;color:#fff; }
.drawer-head { min-height:80px;padding:18px 22px 10px; }
.drawer-head img { width:214px;padding:10px 12px;border-radius:12px;background:#fff; }
.drawer-role { display:flex;align-items:center;gap:8px;padding:8px 24px 14px;color:#d3e6d8;font-size:12px;font-weight:500;letter-spacing:.3px; }
.drawer-role .ui-icon { width:17px;height:17px; }
.drawer-search-wrap { position:relative;margin:0 16px 14px; }
.drawer-search-wrap>.ui-icon { position:absolute;left:11px;top:12px;width:18px;height:18px;color:#bed6c7;pointer-events:none; }
.drawer-search { min-height:42px;height:42px;margin:0;padding:9px 11px 9px 36px;border:1px solid #51725f;border-radius:9px;background:#204c39;color:#fff;font-size:13px; }
.drawer-search::placeholder { color:#c7d8cc; }
.drawer-search:focus { border-color:var(--brand-accent);background:#204c39;color:#fff; }
.drawer-scroll { padding:0 12px 16px;scrollbar-color:#719580 transparent; }
.drawer-section { padding:0 0 10px; }
.drawer-section+.drawer-section { border-color:#3b5d49;margin-top:6px;padding-top:16px; }
.drawer-title { margin-bottom:6px;padding:0 12px;font-size:10px;font-family:var(--md-font);letter-spacing:1.45px;color:#b4cbbd; }
.drawer-item { position:relative;min-height:42px;margin:2px 0;padding:9px 12px;gap:11px;border-radius:9px;color:#e0eae3;font-size:13px;line-height:19px;font-weight:400; }
.drawer-item .ui-icon { width:20px;height:20px;color:#b7d0c0; }
.drawer-item:hover { color:#fff;background:#27543f; }
.drawer-item.active,.drawer-item[aria-current=page] { background:#e2f3cf;color:#143d2d;font-weight:600; }
.drawer-item.active .ui-icon,.drawer-item[aria-current=page] .ui-icon { color:#143d2d; }
.drawer-item::before { display:none; }
.nav-drawer :focus-visible { outline-color:#c0ed96;outline-offset:2px; }
.drawer-foot { padding:14px 24px;border-top:1px solid #3b5d49;color:#bfd1c6;font-size:10px;letter-spacing:.25px; }
.drawer-no-results { margin:12px;color:#d2e1d8;font-size:13px; }
.drawer-head .drawer-close { color:white; }
.top-bar { height:76px;padding:0 34px;border-bottom:1px solid var(--brand-line);background:rgba(245,246,242,.98); }
.top-bar .top-context { padding:0; }
.top-bar .top-context b { font-size:15px;line-height:22px; }
.top-bar .top-context span { font-size:12px;letter-spacing:0;margin-top:2px; }
.top-bar .top-actions { gap:10px; }
.top-bar .avatar-button { border:1px solid var(--brand-line);background:white;width:42px;height:42px; }
.avatar { background:#e6f0df;color:var(--brand-deep); }
.quick-navigation { height:40px;min-height:40px;gap:9px;padding:0 12px;background:white;color:var(--brand-muted);border:1px solid var(--brand-line);border-radius:9px;font:13px var(--md-font);box-shadow:none; }
.quick-navigation .ui-icon { width:18px;height:18px;margin:0; }
.quick-navigation kbd { margin:0 0 0 16px;background:#f0f3ee;color:#58695f;font-size:10px;height:21px;border:1px solid #dce3da; }
.page { max-width:1536px;padding:30px 34px 40px; }
.page-header { align-items:center;gap:16px;margin-bottom:26px;animation:none; }
.page-header h1 { font-size:28px;line-height:36px;letter-spacing:-.65px; }
.page-header .eyebrow { font:600 10px/16px var(--md-font);letter-spacing:1.6px;margin-bottom:6px;color:#47674b; }
.page-header .eyebrow::before { width:14px;height:3px; }
.page-header .rapi-hint { margin-top:6px;color:#5a6c61;max-width:780px; }
.page-header .page-actions { padding:0;gap:8px; }
.rapi-window-body,.page-body { gap:22px; }
.rapi-window-body>*,.page-body>*,.page-header,.stats>.stat-card,.rapi-stats>.stat-card,.note,.rapi-message,.empty { animation:none; }
.rapi-statusbar { background:var(--brand-paper);justify-content:flex-start;padding:14px 34px;color:#607366;font-size:11px;letter-spacing:0; }
#watermark { opacity:.27; }
.card,.panel,fieldset.rapi-group,.md-card { padding:23px 24px;border-radius:16px;box-shadow:var(--brand-shadow); }
fieldset.rapi-group>legend,.card-title { font-size:15px;line-height:22px;padding-left:0;margin-bottom:18px; }
fieldset.rapi-group>legend::before,.card-title::before { display:none; }
.rapi-group .rapi-group { border:1px solid var(--brand-line);background:#f8faf6; }
.stats,.rapi-stats { gap:16px; }
.stat-card { padding:22px 24px;gap:8px;border-radius:16px;box-shadow:none;min-height:128px; }
.stat-card::before { display:none; }
.stat-card:first-child { background:var(--brand-deep);border:1px solid var(--brand-deep); }
.stat-card:first-child::after { display:none; }
.stat-card .stat-label { font-family:var(--md-font);font-size:11px;line-height:16px;letter-spacing:.8px;font-weight:500; }
.stat-card .stat-value { font-family:var(--md-font-display);font-size:29px;line-height:38px;letter-spacing:-.8px;font-weight:600;font-variant-numeric:tabular-nums; }
.stat-card .stat-value-text { font-size:20px;line-height:29px;letter-spacing:-.35px; }
.stat-card .stat-note { font-size:12px;line-height:18px;letter-spacing:0; }
.stat-card:hover { box-shadow:none; }
.stat-card.stat-warn { background:#fff3d4;border-color:#efcf87;color:#674c12; }
.stat-card.stat-error { background:#fceae7;border-color:#edc6c0;color:#8a2425; }
button,.receipt-link,.auth-ghost { border-radius:9px;min-height:42px;font-family:var(--md-font);font-weight:500;letter-spacing:0; }
button:hover,.receipt-link:hover { box-shadow:none; }
button.secondary,.receipt-link { background:#f1f5ec;border:1px solid #d9e4d0;color:#245039; }
button:disabled { color:#68756d;background:#e8ece7;cursor:not-allowed; }
button[aria-busy=true] { cursor:progress; }
:focus-visible { outline:3px solid #3d854e;outline-offset:3px; }
button:focus-visible,.receipt-link:focus-visible { box-shadow:0 0 0 2px white; }
input:not([type=checkbox]):not([type=radio]),select,textarea { border-radius:9px; }
.md-field>input,.md-field>select,.md-field>textarea { border-color:#aab9ae; }
.md-field>input:focus,.md-field>select:focus,.md-field>textarea:focus { border-color:#317347; }
.summary-line { padding-top:11px;padding-bottom:11px;font-variant-numeric:tabular-nums; }
.summary-total { border-top:1px solid #cdddcd;background:#f0f6e9;border-radius:9px;padding:15px 16px;color:#193d29; }
.rapi-grid-scroll { border:1px solid var(--brand-line);border-radius:10px;scrollbar-width:thin;scrollbar-color:#b4c6b9 #f3f6ef; }
.rapi-grid { font-size:13px;line-height:20px; }
.rapi-grid th { height:44px;padding:10px 14px;font-family:var(--md-font);font-size:10px;letter-spacing:.65px;background:#f5f7f2;border-bottom:1px solid var(--brand-line);color:#526859; }
.rapi-grid td { height:58px;padding:12px 14px;border-color:#e8ede6; }
.rapi-grid tbody tr:nth-child(even) { background:#fcfdfb; }
.rapi-grid tbody tr:hover,.rapi-grid tbody tr:focus-within { background:#f2f7ed; }
.rapi-grid td .details { font-size:11px;line-height:17px;color:#5d7062;margin-top:2px; }
.rapi-grid td button,.rapi-grid td .receipt-link { min-height:36px;font-size:12px;padding:7px 12px; }
.rapi-grid-footer { padding-top:14px; }
.rapi-filter { padding:16px;gap:12px;border:1px solid #e3e9df;background:#f7f9f4;margin-bottom:16px; }
.rapi-filter .md-field { --md-field-bg:#f7f9f4; }
.rapi-filter>button { min-height:44px;margin-top:4px; }
.network-filter .md-field:first-child { flex-grow:2; }
.results-caption { font-size:12px;color:#58705f;margin:0 0 12px; }
.network-results { min-width:0; }
.status-approved,.status-rejected,.status-unknown,.status-paying,.status-reserved,.status-preparing,.status-pending,.chip { border-radius:7px;min-height:25px;font-size:11px;letter-spacing:.1px;padding:3px 9px; }
.empty { padding:38px 24px;border:1px dashed #c4d4c2;border-radius:12px;background:#fafcf8;color:#51695a; }
.empty-icon { display:grid;place-items:center;width:46px;height:46px;margin:0 auto 12px;border-radius:13px;background:#edf4e6;color:#3f7046; }
.empty-icon .ui-icon { width:24px;height:24px; }
.note,.rapi-message { border-radius:10px;font-size:13px;line-height:21px; }
.rapi-message { display:flex;align-items:flex-start;gap:13px; }
.message-symbol { display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#e1edda;color:#386e3c; }
.rapi-message.error .message-symbol { background:#f8d9d3;color:#9f3330; }
.rapi-message-title { font-weight:600; }
.loading-inline { animation:none; }
.recharge-overview .stat-card { min-height:132px; }
.recharge-overview .stat-card:first-child .stat-value { font-size:31px; }
.recharge-form { gap:20px; }
.recharge-chooser,.recharge-details { padding:22px;border:1px solid var(--brand-line);border-radius:16px;box-shadow:var(--brand-shadow); }
.recharge-details { top:98px; }
.recharge-section-head h2 { font-family:var(--md-font-display);font-size:15px;font-weight:600; }
.step-index { width:30px;height:30px;border-radius:9px;background:#e5f0db;font-weight:600; }
.recharge-products { gap:10px; }
.recharge-product { grid-template-columns:76px minmax(0,1fr);padding:14px 12px;gap:2px 10px;min-height:91px;border-color:#d9e2d6; }
.company:hover,.recharge-product:hover,.product-tile:hover { transform:none; }
.recharge-product .product-name { font-size:13px; }
.recharge-product .product-kind { font-size:11px;letter-spacing:0; }
.amount-card { border-color:#d8e3d3;gap:4px;min-height:82px;border-radius:11px; }
.amount-card.selected,.recharge-product.selected { background:#f0f8e6;border-color:#538045;box-shadow:inset 0 0 0 1px #538045!important; }
.amount-value { font-size:21px;line-height:29px; }
.amount-promo { background:#ecf3df;color:#3c5c23; }
.promo-banner { background:#fff9ed;border-color:#eedfc1;border-left:3px solid #c49336;padding:14px 16px; }
.promo-banner-icon { border-radius:10px!important; }
.promo-banner-text strong { font-size:14px; }
#modal { border-radius:18px;box-shadow:0 24px 90px #10291b38;border:1px solid #dce5d9; }
#modal[open],#modal[open]::backdrop,.operation-overlay[open],.operation-overlay[open]::backdrop { animation:none; }
#modal::backdrop,.operation-overlay::backdrop { background:rgba(12,31,20,.45);backdrop-filter:blur(2px); }
.modal-titlebar { background:#f6f8f2;color:var(--brand-ink);border-bottom:1px solid var(--brand-line);padding:19px 22px; }
.modal-titlebar h2 { font-size:18px;line-height:26px;letter-spacing:-.3px; }
.modal-close { border-radius:8px; }
.modal-titlebar .modal-close { color:#4c6355;background:#eaf0e4; }
#modal-content>.actions { border-top:1px solid var(--brand-line);padding-top:18px;margin-top:22px; }
.operation-overlay-card { border-radius:18px;border:1px solid #dce6d6; }
.operation-progress-label { font-family:var(--md-font-display);font-size:17px!important; }
.operation-progress-time { font-variant-numeric:tabular-nums; }
.operation-overlay-card { gap:18px;padding:28px;background:#fff; }
.operation-eyebrow { color:#536a5d;font-size:10px;letter-spacing:1.7px;font-weight:700; }
.operation-overlay-card>strong { color:#173e2d;font-size:25px;font-weight:700;line-height:1.25; }
.operation-progress-label { color:#294e3c;line-height:1.5; }
.operation-progress-time { font-size:13px!important;line-height:20px!important;color:#52675b!important; }
.operation-progress-hint { margin:0;padding:12px 14px;border-radius:10px;background:#f2f6ef;color:#385341;font-size:13px;line-height:1.55; }
.operation-progress-track { height:5px;overflow:hidden;background:#e1ecd9;border-radius:5px; }
.operation-progress-track>span { display:block;height:100%;width:42%;background:#39724b;border-radius:5px;animation:operation-travel 1.4s ease-in-out infinite; }
@keyframes operation-travel { from{transform:translateX(-105%)} to{transform:translateX(345%)} }
.selection-toolbar { display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:14px 16px;background:#f2f6ec;border:1px solid #d9e6d1;border-radius:12px;margin:12px 0; }
.selection-toolbar p { margin:0;font-size:13px;color:#385341; }
.selection-toolbar .actions { margin:0; }
.rapi-grid .is-selected>td { background:#e8f1df!important;border-bottom-color:#b7cca9; }
.row-selector { width:18px;height:18px;accent-color:#245637;cursor:pointer; }
.edit-section { border:1px solid #dce5d6;border-radius:12px;padding:16px;margin:14px 0; }
.edit-section.is-editing { border-color:#62894b;background:#fbfdf8; }
.edit-section-toggle { display:flex;align-items:center;gap:10px;font-weight:700;color:#234a31;cursor:pointer; }
.edit-section-toggle input { width:18px;height:18px;accent-color:#245637; }
.edit-section-body { border:0;padding:14px 0 0;margin:0;min-width:0; }
.edit-section-body:disabled { opacity:.72; }
.edit-section-state { display:block;margin-top:5px;font-size:12px;color:#4b6353; }
.edit-section-overview { margin:10px 0 0;font-size:12px;line-height:1.6;color:#4d6355;overflow-wrap:anywhere; }
.edit-section-body[hidden],.edit-section-overview[hidden] { display:none; }
.edit-summary { padding:10px 14px;border-radius:10px;background:#f2f6ef;color:#365441;font-size:13px; }
.edit-change { display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid #e2eadd;overflow-wrap:anywhere; }
.edit-change:last-child { border-bottom:0; }
@media(max-width:600px){.selection-toolbar{align-items:stretch}.selection-toolbar .actions{width:100%;flex-wrap:wrap}.edit-section{padding:12px}.operation-overlay-card{padding:22px}}
@media(prefers-reduced-motion:reduce){.operation-progress-track>span,.operation-progress-label::before{animation:none!important}.operation-progress-track>span{width:100%;background:repeating-linear-gradient(90deg,#39724b 0 14px,#dbe8d2 14px 28px)}}
.auth-desktop { background:#f2f5ec;background-image:radial-gradient(ellipse at 20% 0,#ddebcf,transparent 60%); }
.auth-card { border:1px solid #d9e3d3;border-top:4px solid #8fd14f;border-radius:20px;padding:30px;box-shadow:0 16px 48px #1e44200c;animation:none; }
.auth-sub { line-height:22px; }
.auth-mark { box-shadow:none;border-radius:18px; }
.auth-brand { margin-bottom:25px; }
.auth-submit { min-height:48px;border-radius:10px; }
.chat-fab { background:var(--brand-deep);box-shadow:0 6px 20px #143d2d26;border:1px solid #51735b; }
.chat-admin { border-radius:16px;box-shadow:none; }
.chat-pane { background:#f6f8f2; }
.chat-quick { padding:12px 12px 0;gap:7px; }
.chat-chip { border-radius:8px;background:#f5f8f0;font-size:12px; }
.chat-panel { border-radius:18px;box-shadow:0 16px 60px #143d2d2e; }
.chat-msg { border-radius:12px; }
.chat-pane-head { min-height:80px; }
.chat-item:hover { background:#f4f8ee; }
.chat-item.active { background:#e8f3dc; }
.copy-field .copy-button { min-height:46px;border-radius:9px; }
.skip-link { position:fixed;left:12px;top:-90px;z-index:100;padding:12px 18px;border-radius:10px;background:white;color:#143d2d;box-shadow:0 2px 12px #0003; }
.skip-link:focus { top:12px; }
#notice { display:flex;align-items:center;gap:18px;border-radius:11px;padding:12px 14px 12px 18px;box-shadow:0 6px 28px #102a1933; }
#notice:empty { display:none; }
#notice.notice-error { background:#712d2b; }
#modal>#notice { position:sticky;inset:auto;bottom:0;transform:none;margin:12px;max-width:none;width:auto;z-index:1; }
.notice-close { flex:0 0 32px;min-height:32px;width:32px;height:32px;padding:0;background:transparent;color:white; }
.notice-close .ui-icon { width:18px;height:18px;margin:0; }
#modal.command-dialog { width:min(620px,calc(100vw - 24px));max-width:620px; }
.command-palette { display:grid;gap:12px; }
.command-input-wrap { display:flex;align-items:center;gap:12px;border:1px solid #93ad93;border-radius:10px;padding:0 13px;background:#fbfdf8; }
.command-input-wrap>.ui-icon { width:22px;height:22px;color:#52784f; }
.command-input-wrap .command-search { width:100%;height:50px;padding:8px 0;margin:0;background:transparent;border:0;box-shadow:none; }
.command-search:focus { outline:none; }
.command-input-wrap:focus-within { outline:2px solid #48784d;outline-offset:2px; }
.command-count { font-size:12px;line-height:18px;color:#59715e;margin:0; }
.command-results { max-height:min(420px,50dvh);overflow-y:auto;display:grid;gap:4px;padding:3px; }
.command-result { width:100%;justify-content:flex-start;min-height:57px;gap:12px;padding:10px 13px;border:0;background:#fff;color:#213f2d;text-align:left;white-space:normal; }
.command-result:hover,.command-result:focus { background:#edf5e4; }
.command-result>.ui-icon { margin:0;width:21px;height:21px; }
.command-result>.ui-icon:last-child { margin-left:auto;width:17px;height:17px;opacity:.65; }
.command-result>span { display:grid;gap:2px; }
.command-result b { font-size:14px;font-weight:500; }
.command-result small { font-size:11px;color:#59715e; }
.home-grid .rapi-stats { grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); }
.home-grid .rapi-stats .stat-label { overflow-wrap:normal;word-break:normal; }
.home-balance .summary-line { flex-wrap:wrap;column-gap:12px; }
.home-balance .summary-line strong { white-space:nowrap;flex-shrink:0;margin-left:auto; }
.dash-data { padding:15px 18px;border:1px solid var(--brand-line);border-radius:12px;background:#fff; }
.dash-data>summary { cursor:pointer;font-weight:500;color:#335c3e;line-height:24px; }
.dash-data[open]>summary { margin-bottom:15px; }
.workflow-guide { padding:0 4px; }
.workflow-intro { margin:0 0 24px;color:#506453;line-height:1.6; }
.workflow-steps { list-style:none;padding:0;margin:0;display:grid;gap:24px; }
.workflow-step { display:flex;position:relative;align-items:flex-start;gap:16px;padding:18px;border:1px solid #dce6d7;background:#f8faf5;border-radius:13px; }
.workflow-number { display:grid;place-items:center;flex:0 0 35px;height:35px;border-radius:10px;background:#dff0d0;color:#234b30;font-size:12px;font-weight:700; }
.workflow-step-content { min-width:0;flex:1; }
.workflow-step h3 { display:flex;align-items:center;gap:9px;margin:3px 0 9px;font-size:16px;color:#173d2b; }
.workflow-step h3 .ui-icon { width:20px;height:20px;flex-shrink:0; }
.workflow-step p { margin:0;line-height:1.65;font-size:14px;color:#445c48; }
.workflow-links { display:flex;flex-wrap:wrap;gap:7px;margin-top:12px; }
.workflow-links button { min-height:38px;padding:7px 12px;font-size:12px; }
.workflow-connector { position:absolute;left:30px;bottom:-25px;height:24px;color:#719661; }
.workflow-connector .ui-icon { width:17px;height:23px;transform:rotate(90deg); }
.workflow-outcomes { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:24px 0 18px; }
.workflow-outcomes .rapi-message { min-width:0;padding:12px;gap:9px;align-items:flex-start; }
.workflow-outcomes .message-symbol { width:20px;height:20px;flex:0 0 20px; }
.workflow-outcomes p { font-size:12px;line-height:1.6; }
@media(max-width:700px) {
  .workflow-step { padding:14px;gap:10px; }
  .workflow-number { flex-basis:27px;height:30px; }
  .workflow-step h3 { align-items:flex-start;font-size:14px; }
  .workflow-step p { font-size:13px; }
  .workflow-outcomes { grid-template-columns:1fr; }
}
@media(min-width:1101px) and (max-width:1280px) {
  .app-shell { grid-template-columns:242px minmax(0,1fr); }
  .page { padding:26px 24px 36px; }
  .top-bar { padding:0 24px; }
  .recharge-form { grid-template-columns:minmax(0,1fr) minmax(290px,1fr);gap:16px; }
  .recharge-product { grid-template-columns:62px minmax(0,1fr);gap:2px 8px; }
  .recharge-chooser,.recharge-details { padding:16px; }
}
@media(max-width:1100px) {
  .app-shell { grid-template-columns:minmax(0,1fr);grid-template-rows:66px minmax(0,1fr) auto; }
  .nav-drawer { background:#143d2d;width:min(320px,calc(100vw - 40px)); }
  .top-bar { height:66px;padding:0 20px; }
  .top-bar .top-context { display:flex;max-width:55%; }
  .top-bar .top-context span { max-width:360px; }
  .drawer-head { padding:18px 16px 10px;gap:12px; }
  .drawer-head img { width:210px; }
  .page { padding:24px 22px 32px; }
  .recharge-details { top:82px; }
}
@media(max-width:700px) {
  .page { padding:20px 16px 28px; }
  .top-bar { padding:0 12px;gap:7px; }
  .top-bar .top-context { max-width:none;flex:1;overflow:hidden; }
  .top-bar .top-context b { font-size:13px; }
  .top-bar .top-context span { display:none; }
  .top-bar .top-actions { gap:2px; }
  .quick-navigation { width:38px;min-height:38px;padding:0;justify-content:center;background:transparent;border:0; }
  .quick-navigation>span,.quick-navigation kbd { display:none; }
  .page-header { margin-bottom:22px;gap:14px; }
  .page-header h1 { font-size:24px;line-height:32px;letter-spacing:-.4px; }
  .page-header .rapi-hint { font-size:13px;line-height:20px; }
  .page-header .page-actions { width:100%; }
  .page-actions button { flex:1;min-height:44px; }
  .card,.panel,fieldset.rapi-group,.recharge-chooser,.recharge-details { padding:18px 16px;border-radius:13px; }
  .stat-card { padding:17px 18px;min-height:114px; }
  .stat-card .stat-value { font-size:26px;line-height:34px; }
  .rapi-window-body,.page-body { gap:18px; }
  .rapi-statusbar { padding:16px;justify-content:center; }
  .rapi-filter { padding:14px;gap:14px; }
  .rapi-grid td { padding:10px 12px; }
  .recharge-form { gap:16px; }
  .recharge-details { position:static; }
  .recharge-product { grid-template-columns:64px minmax(0,1fr);padding:12px 10px; }
  .recharge-product .product-name { font-size:12px; }
  .recharge-product .product-kind { font-size:10px; }
  .recharge-overview .stat-card { min-height:108px; }
  .modal-titlebar { padding:17px 18px; }
  #modal { border-radius:16px; }
  .chat-panel { border-radius:18px 18px 0 0; }
  .copy-field { flex-wrap:wrap; }
  .copy-field .copy-button { min-height:42px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important; }
}
.account-amount { font-variant-numeric:tabular-nums; white-space:nowrap; }
.account-amount.balance-credit { color:#166534; }
.account-amount.balance-debt { color:#b42318; }
.account-amount.balance-settled { color:#475569; }
.stat-card:first-child:not(.stat-warn):not(.stat-error) .account-amount.balance-credit { color:#c6f59b; }
.stat-card:first-child:not(.stat-warn):not(.stat-error) .account-amount.balance-debt { color:#ffc9c3; }
.stat-card:first-child:not(.stat-warn):not(.stat-error) .account-amount.balance-settled { color:#e7efe9; }
.home-balance > .balance-credit,.home-balance .summary-line .balance-credit { color:#c6f59b; }
.home-balance > .balance-debt,.home-balance .summary-line .balance-debt { color:#ffc9c3; }
.home-balance > .balance-settled,.home-balance .summary-line .balance-settled { color:#e7efe9; }
.balance-guide { line-height:1.65; font-size:13px; }
.balance-guide .account-amount { font-weight:700; }
.home-balance > .account-amount { display:block; font-size:clamp(26px,4vw,38px); font-weight:750; line-height:1.25; margin:10px 0; }
.home-balance { background:var(--brand-deep); box-shadow:none; }
.home-balance::after { display:none; }
