.table-pagination{
  width:100%;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  gap:12px;
  align-items:center;
  margin-top:12px;
}

.table-pagination .pager-status{
  text-align:center;
  font-weight:700;
  color:#1f2937;
  white-space:nowrap;
}

@media (max-width: 700px){
  .table-pagination{
    grid-template-columns:1fr;
  }

  .table-pagination .pager-status{
    order:-1;
  }
}
:root{
      --bg:#f4f6fb;--card:#fff;--text:#0f172a;--muted:#64748b;--primary:#17135a;--primary2:#2d267a;--accent:#6d5dfc;--border:#e5e7eb;--success:#008c2e;--danger:#dc2626;--warning:#b45309;--soft:#eef2ff;--shadow:0 14px 35px rgba(15,23,42,.09);
    }
    *{box-sizing:border-box} body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
    button,input,textarea,select{font-family:inherit;font-size:15px} button{border:0;cursor:pointer;font-weight:800;transition:.18s} button:hover{transform:translateY(-1px);filter:brightness(.96)} button:disabled{background:#94a3b8!important;cursor:not-allowed;transform:none}
    input,textarea,select{width:100%;padding:13px 14px;border:1px solid #d7dce6;border-radius:14px;background:#fff;margin:8px 0 12px} textarea{min-height:85px;resize:vertical}.hidden{display:none!important}
    .auth-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(160deg,#fff 0 48%,var(--primary) 48% 100%);padding:22px}.auth-card{width:min(760px,100%);background:#fff;border-radius:26px;box-shadow:var(--shadow);padding:42px;position:relative}.auth-logo{width:110px;height:110px;border-radius:999px;background:var(--primary);color:#fff;display:grid;place-items:center;font-size:60px;font-weight:900;margin:-92px auto 24px}.auth-card h1{text-align:center;margin:0 0 22px;font-size:34px}.tabs{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}.tab-btn{background:#e9edf8;color:var(--primary);padding:15px;border-radius:16px;font-size:18px}.tab-btn.active{background:var(--primary);color:#fff}.primary-btn{background:var(--primary);color:#fff;padding:14px;border-radius:14px;width:100%}.danger-btn{background:var(--danger)!important;color:#fff}.muted-btn{background:#475569!important;color:#fff}.green-btn{background:#048848!important;color:#fff}.outline-btn{background:#fff!important;color:var(--primary);border:1px solid #d8d6ff!important}.message{position:fixed;top:18px;right:18px;z-index:2000;max-width:360px}.message p{margin:0;padding:14px 16px;border-radius:14px;box-shadow:var(--shadow);background:#fff}.success{color:var(--success);font-weight:800}.error{color:var(--danger);font-weight:800}
    .app{display:flex;min-height:100vh}.sidebar{width:280px;background:var(--primary);color:#fff;position:fixed;inset:0 auto 0 0;padding:22px 18px;display:flex;flex-direction:column;z-index:1000}.brand{display:flex;gap:14px;align-items:center;margin-bottom:28px}.brand-logo{width:58px;height:58px;border-radius:999px;background:#fff;color:var(--primary);display:grid;place-items:center;font-size:34px;font-weight:900}.brand h2{font-size:22px;line-height:1.05;margin:0}.brand p{margin:4px 0 0;color:#c7d2fe;font-size:14px;overflow-wrap:anywhere}.menu{display:flex;flex-direction:column;gap:10px;flex:1}.menu-btn{display:flex;align-items:center;gap:12px;width:100%;background:transparent;color:#fff;text-align:left;padding:14px 15px;border-radius:18px;font-size:16px}.menu-btn.active,.menu-btn:hover{background:#fff;color:var(--primary)}.sidebar-bottom{border-top:1px solid rgba(255,255,255,.18);padding-top:16px}.logout-side{background:#ef4444;color:#fff;border-radius:16px;padding:14px;width:100%}
    .main{margin-left:280px;width:calc(100% - 280px);padding:22px}.topbar{height:78px;background:#fff;border-radius:0 0 26px 26px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:space-between;padding:0 24px;margin:-22px -22px 28px}.topbar-user{margin-left:16px;font-weight:700;color:var(--text)}.searchbox{max-width:380px;position:relative;flex:1}.searchbox input{margin:0;padding-left:46px}.searchbox span{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:20px}.top-actions{display:flex;align-items:center;gap:12px}.pill{padding:12px 18px;border-radius:14px;background:#f1f5f9;font-weight:800}.pill.open{background:var(--success);color:#fff}.mobile-header{display:none;background:var(--primary);color:#fff;padding:14px 18px;align-items:center;justify-content:space-between}.hamb{background:transparent;color:#fff;font-size:30px}.section{display:none}.section.active{display:block}.section-title{font-size:30px;margin:0 0 22px}.grid-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:22px}.dash-card{background:#fff;border-radius:24px;box-shadow:var(--shadow);padding:22px;display:flex;gap:18px;align-items:center;min-height:118px}.dash-card.clickable{cursor:pointer}.dash-icon{width:70px;height:70px;border-radius:18px;background:var(--primary);color:#fff;display:grid;place-items:center;font-size:32px;font-weight:900}.dash-label{font-size:21px;color:#555;font-weight:800}.dash-value{font-size:40px;color:var(--primary);font-weight:900;line-height:1.1}.panel{background:#fff;border-radius:24px;box-shadow:var(--shadow);padding:24px;margin-bottom:22px}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.panel h2{margin:0;font-size:24px}.small-text{color:var(--muted);font-size:14px}.account-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.account-box{border:1px solid var(--border);background:#f8fafc;border-radius:18px;padding:18px}.account-label{font-size:12px;color:var(--muted);font-weight:900;text-transform:uppercase}.account-value{font-size:18px;font-weight:900;margin-top:6px;overflow-wrap:anywhere}.row{display:grid;grid-template-columns:1fr 1fr;gap:22px}.three-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.two-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field-label{display:block;font-weight:900;margin-top:8px}.checkbox-row{display:flex;align-items:center;gap:8px;margin:8px 0 14px}.checkbox-row input{width:auto;margin:0}.divider{border:0;border-top:1px solid var(--border);margin:22px 0}
    .tools{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}.tools input,.tools select{margin:0}.products-list{display:flex;flex-direction:column;gap:10px}.category-title{font-weight:900;background:var(--primary);color:#fff;border-radius:16px;padding:12px 16px;margin:16px 0 8px}.product-row{border:1px solid var(--border);border-radius:18px;background:#fff;overflow:hidden}.product-header{display:grid;grid-template-columns:1fr auto auto;gap:14px;align-items:center;padding:16px;cursor:pointer}.product-name{font-weight:900;font-size:18px}.chip{display:inline-flex;background:#eef2ff;color:#3730a3;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:900}.price{font-size:18px;font-weight:900;color:var(--success)}.stock{font-size:13px;font-weight:900;color:var(--success)}.stock.out{color:var(--danger)}.product-details{display:none;border-top:1px solid var(--border);padding:16px;background:#fbfdff}.product-row.open .product-details{display:block}.product-description{color:#334155;line-height:1.45}.order-data{background:#fff;border:1px dashed #cbd5e1;border-radius:14px;padding:12px;margin:10px 0}.response-text{white-space:pre-line;line-height:1.5}.status{font-weight:900;color:var(--warning)}.item{border:1px solid var(--border);padding:16px;border-radius:18px;background:#fbfdff;margin-bottom:12px}.admin-product-body{display:none;margin-top:14px}.item.open .admin-product-body{display:block}.table-wrap{overflow-x:auto}.mini-table{width:100%;border-collapse:collapse}.mini-table th,.mini-table td{padding:12px;text-align:left;border-bottom:1px solid var(--border);vertical-align:top}.mini-table th{background:#f1f5f9;color:#475569}.copy-btn{background:#e0f2fe!important;color:#075985!important;border-radius:10px;padding:8px 10px;width:auto;margin:0 0 0 8px}.copy-account-btn{background:#048848!important;color:#fff!important;border-radius:12px;padding:11px 14px;width:auto;margin-top:10px}.bank-box{background:#e9fff7;border:1px solid #a7f3d0;border-radius:18px;padding:18px;margin:12px 0}

    .dashboard-chart-card{min-height:360px}.chart-note{color:var(--muted);font-size:13px;margin:4px 0 16px}.bar-chart{display:flex;flex-direction:column;gap:14px}.bar-row{display:grid;grid-template-columns:minmax(120px,210px) 1fr auto;gap:12px;align-items:center}.bar-label{font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bar-track{height:18px;background:#eef2ff;border-radius:999px;overflow:hidden}.bar-fill{height:100%;background:linear-gradient(90deg,var(--primary),#f00662);border-radius:999px;min-width:4px}.bar-value{font-weight:900;color:var(--primary);min-width:72px;text-align:right}.empty-chart{color:var(--muted);padding:28px 0;text-align:center}.chart-footer{margin-top:18px;text-align:right}.chart-footer button{width:auto;padding:10px 14px}.donut-summary{display:grid;grid-template-columns:170px 1fr;gap:18px;align-items:center}.donut{width:160px;height:160px;border-radius:50%;background:conic-gradient(var(--primary) 0deg 0deg,#e5e7eb 0deg 360deg);display:grid;place-items:center;position:relative}.donut:after{content:'';position:absolute;width:86px;height:86px;background:#fff;border-radius:50%;box-shadow:inset 0 0 0 1px var(--border)}.donut-center{position:relative;z-index:1;text-align:center;font-weight:900;color:var(--primary)}.donut-center span{display:block;font-size:12px;color:var(--muted);font-weight:800}.legend-list{display:flex;flex-direction:column;gap:10px}.legend-item{display:grid;grid-template-columns:14px 1fr auto;gap:10px;align-items:center}.legend-dot{width:12px;height:12px;border-radius:50%;background:var(--primary)}.legend-name{font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.legend-value{font-weight:900;color:var(--primary)}

    .dash-card.stock-alert{border:2px solid var(--danger)}.dash-card.stock-alert .dash-icon{background:var(--danger)}
    @media(max-width:1000px){.grid-cards{grid-template-columns:repeat(2,1fr)}.account-grid,.row{grid-template-columns:1fr 1fr}.topbar{height:auto;padding:15px;gap:12px;flex-wrap:wrap}.searchbox{max-width:none;min-width:250px}}
    @media(max-width:760px){.donut-summary{grid-template-columns:1fr}.donut{margin:auto}.bar-row{grid-template-columns:1fr;gap:6px}.bar-value{text-align:left}.mobile-header{display:flex;position:sticky;top:0;z-index:1100}.app{display:block}.sidebar{transform:translateX(-105%);width:285px;transition:.2s}.sidebar.show{transform:translateX(0)}.main{margin-left:0;width:100%;padding:14px}.topbar{border-radius:18px;margin:0 0 18px}.grid-cards,.account-grid,.row,.three-row,.two-row{grid-template-columns:1fr}.dash-card{min-height:96px}.dash-icon{width:56px;height:56px;font-size:25px}.dash-value{font-size:30px}.section-title{font-size:25px}.product-header{grid-template-columns:1fr;gap:6px}.panel{padding:18px}.auth-card{padding:28px 20px}.auth-card h1{font-size:27px}.auth-logo{width:86px;height:86px;font-size:46px;margin:-70px auto 18px}.tabs{gap:8px}.tab-btn{font-size:15px;padding:12px}.message{left:12px;right:12px;max-width:none}}

    .urgent-card{border:2px solid #ef4444!important}
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:99999;
}

.modal-box{
  background:#fff;
  padding:25px;
  border-radius:12px;
  width:400px;
  max-width:95%;
}

.modal-box h2{
  margin-bottom:15px;
}

.modal-box input{
  width:100%;
  margin-bottom:10px;
  padding:12px;
}

.modal-box button{
  width:100%;
  margin-bottom:10px;
  padding:12px;
  cursor:pointer;
}

.timeline-event{
  background:#fff;
  border:1px solid #d1d5db;
  border-radius:16px;
  padding:18px;
  margin-bottom:16px;
  box-shadow:0 10px 20px rgba(15,23,42,.08);
}

.timeline-date{
  font-size:13px;
  color:#6b7280;
  margin-bottom:10px;
}

.timeline-title{
  font-size:16px;
  font-weight:700;
  margin-bottom:10px;
}

.timeline-details p{
  margin:6px 0;
  line-height:1.6;
}

.timeline-details .badge{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  margin-right:6px;
}

.timeline-details .badge-venta{background:#e0f2fe;color:#0f4c81;}
.timeline-details .badge-manual{background:#ede9fe;color:#5b21b6;}
.timeline-details .badge-reemplazo{background:#fee2e2;color:#991b1b;}

/* ===== Dashboard SaaS Redesign (isolado) ===== */
#appSection{
  background:
    radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.18), transparent 35%),
    radial-gradient(circle at 85% 0%, rgba(99, 102, 241, 0.22), transparent 40%),
    linear-gradient(165deg, #05070f 0%, #0b1222 48%, #0a1328 100%);
  color:#e5e7eb;
  font-family:"Space Grotesk","Manrope","Segoe UI",sans-serif;
}

#appSection .mobile-header{
  display:none!important;
}

#appSection .sidebar.sidebar-ghost{
  display:none!important;
  width:0!important;
  padding:0!important;
}

#appSection .main{
  margin-left:0!important;
  width:100%!important;
  max-width:none;
  padding:105px 28px 28px;
}

.balance-pill{
    font-weight:700;
    padding:10px 16px;
}

.logout-top-btn{
    margin-left:12px;
    border:none;
    border-radius:12px;
    padding:10px 18px;
    cursor:pointer;
    font-weight:700;

    background:#ef4444;
    color:#fff;

    transition:.25s;
}

.logout-top-btn:hover{
    background:#dc2626;
    transform:translateY(-1px);
}

.top-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-shrink:0;
}

#appSection .topbar{
  position:fixed;
  top:12px;
  left:16px;
  right:16px;

  display:flex;
  justify-content:space-between;
  align-items:center;

  gap:12px;

  padding:10px 14px;

  z-index:9999;

  background:rgba(15,23,42,.72);
  backdrop-filter:blur(16px);

  border:1px solid rgba(148,163,184,.28);
  border-radius:18px;

  box-shadow:0 20px 45px rgba(2,6,23,.45);
}

#appSection .searchbox input,
#appSection .topbar .pill{
  background:rgba(15, 23, 42, 0.8);
  color:#dbeafe;
  border:1px solid rgba(148, 163, 184, 0.22);
}

#appSection .top-actions b{
  color:#f8fafc;
}

.dashboard-premium .section-title{
  color:#f8fafc;
  letter-spacing:0.02em;
  margin-bottom:16px;
}

.dashboard-command-bar{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(168px,1fr));
  gap:10px;
  padding:14px;
  border:1px solid rgba(148, 163, 184, 0.24);
  background:rgba(15, 23, 42, 0.62);
  backdrop-filter:blur(14px);
}

.dashboard-command-bar .menu-btn,
.dashboard-utility-btn{
  border-radius:14px;
  min-height:44px;
  justify-content:center;
  text-align:center;
  border:1px solid rgba(148, 163, 184, 0.24);
  background:rgba(15, 23, 42, 0.7);
  color:#cbd5e1;
  padding:10px 12px;
  font-size:14px;
  font-weight:700;

}

.dashboard-mini-banners{
  width:100%;
  margin:-6px 0 14px;
}

.dashboard-mini-banners-carousel{
  --mini-banner-visible:4;
  --mini-banner-gap:10px;
  --mini-banner-card-width:150px;
  position:relative;
  width:min(100%, 700px);
  margin:0 auto;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(148, 163, 184, 0.35);
  background:rgba(15, 23, 42, 0.72);
  padding:8px;
}

.dashboard-mini-banners-track{
  display:flex;
  width:max-content;
  gap:var(--mini-banner-gap);
  transition:none;
  will-change:transform;
}

.dashboard-mini-banners-carousel.is-looping .dashboard-mini-banners-track{
  animation:miniBannerConveyor var(--mini-banner-duration, 20s) linear infinite;
}

.dashboard-mini-banners-carousel.paused .dashboard-mini-banners-track{
  animation-play-state:paused;
}

@keyframes miniBannerConveyor{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}

.dashboard-mini-banner-slide{
  flex:0 0 var(--mini-banner-card-width);
  width:var(--mini-banner-card-width);
  display:block;
  text-decoration:none;
  color:inherit;
}

.dashboard-mini-banner-item{
  position:relative;
  width:100%;
  aspect-ratio:1 / 1;
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.3);
  background:rgba(2, 6, 23, 0.7);
}

.dashboard-mini-banner-item img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  image-rendering:auto;
  display:block;
}

.mini-banner-below-title{
  display:block;
  margin-top:6px;
  text-align:center;
  font-size:11px;
  line-height:1.3;
  font-weight:700;
  color:#e2e8f0;
  min-height:28px;
}

@media(max-width:1100px){
  .dashboard-mini-banners-carousel{
    --mini-banner-visible:3;
    --mini-banner-card-width:138px;
    width:min(100%, 500px);
  }
}

@media(max-width:760px){
  .dashboard-mini-banners-carousel{
    --mini-banner-visible:2;
    --mini-banner-gap:8px;
    --mini-banner-card-width:136px;
    width:min(100%, 300px);
    padding:6px;
  }

  .dashboard-mini-banners{
    margin:-2px 0 10px;
  }

  .mini-banner-below-title{
    font-size:11px;
    min-height:26px;
  }
}

.mini-banner-admin-list{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:260px;
  overflow:auto;
}

.mini-banner-admin-item{
  border:1px solid #334155;
  border-radius:12px;
  padding:10px;
  background:rgba(15, 23, 42, 0.55);
  display:grid;
  grid-template-columns:80px 1fr;
  gap:10px;
  align-items:center;
}

.mini-banner-admin-item img{
  width:80px;
  height:54px;
  object-fit:cover;
  border-radius:8px;
  border:1px solid rgba(148,163,184,.35);
}

.mini-banner-admin-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.dashboard-command-bar .menu-btn.active,
.dashboard-command-bar .menu-btn:hover,
.dashboard-utility-btn:hover{
  color:#f8fafc;
  border-color:rgba(56, 189, 248, 0.8);
  background:linear-gradient(130deg, rgba(14, 165, 233, 0.36), rgba(99, 102, 241, 0.28));
}

.dashboard-logout-btn{
  border-color:rgba(248, 113, 113, 0.5);
  color:#fecaca;
}

.dashboard-actions-center{
  margin-bottom:22px!important;
  background:rgba(15, 23, 42, 0.62)!important;
  border:1px solid rgba(148, 163, 184, 0.26);
  backdrop-filter:blur(16px);
}

.dashboard-actions-title{
  text-align:center;
  color:#f8fafc;
  margin:0 0 18px;
  font-size:20px;
  letter-spacing:0.01em;
}

.dashboard-actions-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}

.dashboard-actions-grid .dash-card{
  margin:0;
  min-height:112px;
}

.dashboard-premium .grid-cards{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:16px;
}

.dashboard-premium .dash-card{
  border-radius:20px;
  border:1px solid rgba(148, 163, 184, 0.24);
  background:linear-gradient(150deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.64));
  box-shadow:0 18px 34px rgba(2, 6, 23, 0.45);
  backdrop-filter:blur(10px);
  color:#e2e8f0;
}

.dashboard-premium .dash-card .dash-label{
  color:#cbd5e1;
  font-size:18px;
}

.dashboard-premium .dash-card .dash-value{
  color:#f8fafc;
  font-size:36px;
}

.dashboard-premium .dash-card .small-text{
  color:#94a3b8;
}

.dashboard-premium .dash-card .dash-icon{
  background:linear-gradient(145deg, rgba(14, 165, 233, 0.86), rgba(79, 70, 229, 0.86));
  box-shadow:0 12px 22px rgba(30, 64, 175, 0.36);
}

.dashboard-premium .dash-card.clickable:hover{
  transform:translateY(-4px);
  border-color:rgba(56, 189, 248, 0.75);
}

.dashboard-premium .panel{
  border:1px solid rgba(148, 163, 184, 0.22);
  background:rgba(15, 23, 42, 0.68);
  backdrop-filter:blur(12px);
}

.dashboard-premium .dashboard-chart-card,
.dashboard-premium #recentOrdersList{
  animation:fadeUp .55s ease both;
}

@keyframes fadeUp{
  from{opacity:0;transform:translateY(10px)}
  to{opacity:1;transform:translateY(0)}
}

@media(max-width:900px){
  #appSection .main{padding:16px}
  .dashboard-command-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-actions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:640px){
  .dashboard-command-bar,
  .dashboard-actions-grid,
  .dashboard-premium .grid-cards{grid-template-columns:1fr}
  .dashboard-premium .dash-card .dash-value{font-size:30px}
}

/* ===== Tienda tipo marketplace moderno ===== */
#section-shop .panel{
  border:1px solid #dbe4f6;
  background:linear-gradient(180deg,#f8fbff,#eef4ff);
}

#section-shop .panel-head h2{
  font-size:28px;
  letter-spacing:.01em;
  color:#0b1f44;
}

#section-shop .tools{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:12px;
  margin:0 0 18px;
  padding:14px;
  border-radius:16px;
  background:#ffffff;
  border:1px solid #dde6f8;
  box-shadow:0 10px 20px rgba(15,23,42,.06);
}

#section-shop .tools input,
#section-shop .tools select{
  margin:0;
  border-radius:12px;
  border:1px solid #c9d8f8;
  background:#f9fbff;
}

#section-shop.shop-view-categories .tools{display:none}

#section-shop .products-list{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.shop-categories-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
}

.shop-category-card{
  width:100%;
  border:1px solid #d6e2fb;
  border-radius:16px;
  background:linear-gradient(135deg,#0b132b,#1c2541 55%,#3a506b);
  color:#f8fafc;
  padding:16px;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
}

.shop-category-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 26px rgba(15,23,42,.25);
}

.shop-category-card-icon{
  width:38px;
  height:38px;
  border-radius:10px;
  background:rgba(148,163,184,.2);
  display:grid;
  place-items:center;
  font-size:14px;
  font-weight:900;
}

.shop-category-card-name{
  font-size:16px;
  font-weight:900;
  line-height:1.15;
  margin-bottom:3px;
}

.shop-category-card-meta{
  font-size:12px;
  color:#cbd5e1;
}

.shop-category-block{
  padding:14px;
  border-radius:16px;
  border:1px solid #d6e2fb;
  background:#ffffff;
}

.shop-category-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}

.shop-category-name{
  margin:0;
  font-size:18px;
  color:#12254f;
}

.shop-category-count{
  font-size:12px;
  font-weight:800;
  color:#3756a6;
  background:#eaf0ff;
  border-radius:999px;
  padding:6px 10px;
}

.shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}

.shop-products-view-block .shop-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}

.shop-product-list{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.shop-back-btn{
  width:auto;
  padding:8px 12px;
  border-radius:10px;
  background:linear-gradient(135deg,#0ea5e9,#2563eb)!important;
  color:#fff!important;
  border:1px solid #1d4ed8!important;
}

.shop-back-btn:hover{
  background:linear-gradient(135deg,#0284c7,#1d4ed8)!important;
}

.shop-card{
  border:1px solid #d9e4fb;
  border-radius:14px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 8px 20px rgba(17,24,39,.06);
  min-height:190px;
  width:100%;
}

.shop-list-item{min-height:170px}

.shop-card-head{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:flex-start;
  padding:12px;
  border:0;
  background:linear-gradient(180deg,#ffffff,#f7faff);
  text-align:left;
  min-height:190px;
}

.shop-list-head{min-height:170px}

.shop-list-head .shop-expand{margin-top:auto}

.shop-card-head:hover{filter:none;transform:none}

.shop-card-main{min-width:0}

.shop-card-main .product-name{
  margin-bottom:0;
  font-size:15px;
  font-weight:900;
  line-height:1.15;
  color:#12254f;
  text-transform:capitalize;
  width:100%;
  word-break:break-word;
}

.shop-card-main .product-name .product-name-line{display:block}

.shop-card-price-wrap{text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:4px}

.shop-card-price-wrap .price{font-size:17px;font-weight:900;color:#0f5bd8}

.shop-card-price-wrap .stock{font-size:11px;font-weight:800}

.shop-price-label{
  font-size:11px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#64748b;
}

.shop-expand{
  margin-top:auto;
  font-size:12px;
  font-weight:900;
  color:#fff;
  background:linear-gradient(135deg,#06b6d4,#0ea5e9);
  border-radius:10px;
  padding:5px 10px;
}

.shop-card.open .shop-expand{background:linear-gradient(135deg,#0891b2,#0284c7);color:#fff}

.shop-card-details{
  display:none;
  border-top:1px solid #e1e8f8;
  padding:16px;
  background:#fbfdff;
}

.shop-card.open .shop-card-details{display:block}

.shop-list-details{display:none}

#section-shop .product-details .primary-btn{
  margin-top:6px;
  border-radius:12px;
  background:linear-gradient(135deg,#0f5bd8,#2f7bff);
}

.shop-product-modal-card{max-width:560px}

.shop-modal-price{font-size:23px;font-weight:900;color:#0f5bd8;margin:8px 0 4px}

.shop-modal-stock{font-size:13px;font-weight:800;color:#0b6bcb;margin-bottom:10px}

.shop-modal-stock.out{color:#dc2626}

#shopProductModal .modal-card,
#shopProductModal .shop-product-modal-card{
  background:#ffffff;
  color:#0f172a;
  border:1px solid #dbe4f6;
  box-shadow:0 24px 48px rgba(15,23,42,.2);
}

#shopProductModal .modal-head h2,
#shopProductModal .modal-head .small-text,
#shopProductModal .product-description,
#shopProductModal .small-text,
#shopProductModal .field-label,
#shopProductModal label,
#shopProductModal p,
#shopProductModal b{
  color:#0f172a!important;
}

#shopProductModal input,
#shopProductModal textarea,
#shopProductModal select{
  background:#f8fbff!important;
  color:#0f172a!important;
  border:1px solid #c9d8f8!important;
}

#shopProductModal input::placeholder,
#shopProductModal textarea::placeholder{
  color:#64748b!important;
}

#shopProductModal .modal-close-btn{
  background:#ef4444;
  color:#ffffff;
}

#shopProductModal .primary-btn{
  background:linear-gradient(135deg,#0f5bd8,#2f7bff);
  color:#ffffff!important;
  border:1px solid #1d4ed8;
}

@media(max-width:760px){
  .shop-product-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .shop-grid,
  .shop-products-view-block .shop-grid,
  .shop-categories-grid{grid-template-columns:1fr}
  .shop-card-head{gap:8px}

  .shop-list-head{
    align-items:center;
    text-align:center;
  }

  .shop-card-main,
  .shop-card-main .product-name,
  .shop-card-price-wrap,
  .shop-card-price-wrap .price,
  .shop-card-price-wrap .stock{
    width:100%;
    text-align:center;
    align-items:center;
    justify-content:center;
  }

  .shop-list-head .shop-expand{
    margin-top:8px;
  }
}

@media(max-width:520px){
  .shop-product-list{grid-template-columns:1fr}
  .shop-list-item,
  .shop-card,
  .shop-list-head{
    width:100%;
    min-height:160px;
  }
}

/* ===== Dashboard Light Mode Premium (override final) ===== */
#section-dashboard.dashboard-premium{
  background:#f8fafc;
  color:#0f172a;
  border-radius:20px;
  padding:18px;
}

#section-dashboard.dashboard-premium .section-title,
#section-dashboard.dashboard-premium .dashboard-actions-title,
#section-dashboard.dashboard-premium .panel h2,
#section-dashboard.dashboard-premium .panel h3{
  color:#0f172a;
}

#section-dashboard.dashboard-premium .panel,
#section-dashboard.dashboard-premium .dashboard-command-bar,
#section-dashboard.dashboard-premium .dashboard-actions-center,
#section-dashboard.dashboard-premium .dashboard-chart-card{
  background:#ffffff!important;
  border:1px solid #e2e8f0!important;
  box-shadow:0 6px 18px rgba(15, 23, 42, 0.06)!important;
  backdrop-filter:none!important;
}

#section-dashboard.dashboard-premium .menu-btn,
#section-dashboard.dashboard-premium .dashboard-utility-btn{
  background:#ffffff;
  color:#0f172a;
  border:1px solid #e2e8f0;
}

#section-dashboard.dashboard-premium .menu-btn.active,
#section-dashboard.dashboard-premium .menu-btn:hover,
#section-dashboard.dashboard-premium .dashboard-utility-btn:hover{
  background:#f1f5f9;
  color:#0f172a;
  border-color:#cbd5e1;
  box-shadow:0 4px 12px rgba(15, 23, 42, 0.08);
}

#section-dashboard.dashboard-premium .dash-card{
  background:#ffffff;
  border:1px solid #e2e8f0;
  box-shadow:0 8px 20px rgba(15, 23, 42, 0.06);
  color:#0f172a;
}

#section-dashboard.dashboard-premium .dash-card .dash-label{
  color:#64748b;
}

#section-dashboard.dashboard-premium .dash-card .dash-value,
#section-dashboard.dashboard-premium .dash-card .dash-value span,
#section-dashboard.dashboard-premium .dash-card .small-text,
#section-dashboard.dashboard-premium .chart-note,
#section-dashboard.dashboard-premium .empty-chart,
#section-dashboard.dashboard-premium .bar-value,
#section-dashboard.dashboard-premium .legend-value,
#section-dashboard.dashboard-premium .legend-name,
#section-dashboard.dashboard-premium .donut-center,
#section-dashboard.dashboard-premium .panel .small-text{
  color:#0f172a;
}

#section-dashboard.dashboard-premium .dash-card .dash-icon{
  background:#f1f5f9;
  color:#0f172a;
  box-shadow:none;
}

#section-dashboard.dashboard-premium .dash-card.clickable:hover{
  border-color:#cbd5e1;
  transform:translateY(-2px);
}

/* ===== Navegacion fija + alto contraste de acciones ===== */
#appSection .topbar{
  position: fixed;
  top: 10px;
  left: 28px;
  right: 28px;
  z-index: 1200;

  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(16px);
  border-radius: 22px;
  margin: 0;
}

.topbar-left-actions{
  display:flex;
  align-items:center;
  margin-right:12px;
}

.topbar-home-btn{
  background:#1e293b;
  color:#ffffff;
  border:1px solid #0f172a;
  border-radius:12px;
  padding:11px 16px;
  font-weight:800;
  white-space:nowrap;
  box-shadow:0 4px 6px rgba(0,0,0,0.1);
}

.topbar-home-btn:hover{
  background:#0f172a;
  color:#ffffff;
}

#section-dashboard.dashboard-premium .menu-acciones-globales .menu-btn,
#section-dashboard.dashboard-premium .menu-acciones-globales .dashboard-utility-btn,
#section-dashboard.dashboard-premium .primary-btn,
#section-dashboard.dashboard-premium .green-btn,
#section-dashboard.dashboard-premium .outline-btn{
  background:#4f46e5;
  color:#ffffff;
  border:1px solid #4338ca;
  box-shadow:0 4px 6px rgba(0,0,0,0.1);
}

#section-dashboard.dashboard-premium .menu-acciones-globales .menu-btn:hover,
#section-dashboard.dashboard-premium .menu-acciones-globales .dashboard-utility-btn:hover,
#section-dashboard.dashboard-premium .primary-btn:hover,
#section-dashboard.dashboard-premium .green-btn:hover,
#section-dashboard.dashboard-premium .outline-btn:hover{
  background:#4338ca;
  color:#ffffff;
  border-color:#3730a3;
}

#section-dashboard.dashboard-premium .menu-acciones-globales .dashboard-logout-btn,
#section-dashboard.dashboard-premium .menu-acciones-globales #logoutMenuBtn{
  background:#1e293b;
  border-color:#0f172a;
  color:#ffffff;
}

#section-dashboard.dashboard-premium .menu-acciones-globales #btnHistorialId{
  background:#10b981;
  border-color:#059669;
  color:#ffffff;
}

#section-dashboard.dashboard-premium .menu-acciones-globales #btnHistorialId:hover,
#section-dashboard.dashboard-premium .menu-acciones-globales #btnHistorialId:hover{
  background:#059669;
  border-color:#047857;
}

@media(max-width:900px){
  .topbar-left-actions{width:100%;margin:0 0 10px}
  .topbar-home-btn{width:100%}
}

/* ===== Fix final: contraste alto en modo claro + comprobantes visibles ===== */
#appSection,
#appSection .section,
#appSection .panel,
#appSection .item,
#appSection .order-data,
#appSection .response-text,
#appSection p,
#appSection label,
#appSection .field-label,
#appSection .small-text,
#appSection .account-label,
#appSection .account-value,
#appSection .compact-meta,
#appSection .compact-title,
#appSection .status,
#appSection .chip,
#appSection .bar-label,
#appSection .chart-note,
#appSection .empty-chart,
#appSection .legend-name,
#appSection .legend-value,
#appSection .bar-value,
#appSection .donut-center,
#appSection .donut-center span{
  color:#0f172a!important;
}

#appSection input,
#appSection textarea,
#appSection select,
#appSection option{
  color:#1e293b!important;
  background:#ffffff!important;
  border:1px solid #cbd5e1!important;
}

#appSection input::placeholder,
#appSection textarea::placeholder{
  color:#64748b!important;
  opacity:1;
}

#appSection .mini-table th,
#appSection .mini-table td,
#appSection table th,
#appSection table td{
  color:#1e293b!important;
  border-bottom:1px solid #e2e8f0!important;
}

#appSection .mini-table th,
#appSection table th{
  background:#f8fafc!important;
  color:#0f172a!important;
}

#appSection .section a{
  color:#1d4ed8;
}

.proof-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:6px 0 10px;
}

.proof-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px 14px;
  border-radius:10px;
  text-decoration:none;
  background:#4f46e5;
  color:#ffffff!important;
  border:1px solid #4338ca;
  box-shadow:0 4px 6px rgba(0,0,0,0.1);
  font-weight:800;
  font-size:13px;
}

.proof-action-btn:hover{
  background:#4338ca;
  color:#ffffff!important;
}

.proof-action-download{
  background:#0f766e;
  border-color:#0f766e;
}

.proof-action-download:hover{
  background:#115e59;
}

.order-proof-row{
  margin:8px 0;
  padding:10px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fafc;
}

.proof-preview img{
  width:100%;
  max-width:460px;
  max-height:320px;
  object-fit:contain;
  border-radius:10px;
  border:1px solid #cbd5e1;
  background:#ffffff;
}

/* ===== Fix ancho completo para Pedidos/Sin Stock en admin ===== */
#adminOrdersPanel,
#adminProductsPanel,
#adminOrdersList,
#adminProductsList,
#adminOrdersList > *,
#adminProductsList > *,
#adminOrdersPanel .table-wrap,
#adminProductsPanel .table-wrap,
#adminOrdersPanel .mini-table,
#adminProductsPanel .mini-table,
#adminOrdersPanel .item,
#adminProductsPanel .item{
  width:100%!important;
  max-width:100%!important;
}

#adminOrdersPanel .mini-table,
#adminProductsPanel .mini-table{
  table-layout:auto;
}

/* ===== Boton exportar inventario CSV ===== */
.inventory-download-btn{
  width:100%;
  margin-top:8px;
  background:#1d4ed8!important;
  color:#ffffff!important;
  border:1px solid #1e40af!important;
  box-shadow:0 4px 10px rgba(30,64,175,0.22);
}

.inventory-download-btn:hover{
  background:#1e40af!important;
  color:#ffffff!important;
}

.csv-process-btn:disabled{
  background:#94a3b8!important;
  border-color:#94a3b8!important;
  color:#f8fafc!important;
  cursor:not-allowed;
  box-shadow:none;
}

.csv-process-btn:not(:disabled){
  background:#16a34a!important;
  border-color:#15803d!important;
}

.csv-process-btn:not(:disabled):hover{
  background:#15803d!important;
}

/* ===== Modal estado CSV ===== */
.modal-status-csv{
  position:fixed;
  inset:0;
  z-index:100001;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.modal-status-csv.hidden{
  display:none!important;
}

.modal-status-csv-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2, 6, 23, 0.7);
}

.modal-status-csv-card{
  position:relative;
  width:min(680px, 100%);
  background:#ffffff;
  border:1px solid #cbd5e1;
  border-radius:16px;
  box-shadow:0 24px 50px rgba(15,23,42,0.26);
  padding:22px;
  z-index:1;
}

.modal-status-csv-card h2{
  margin:0 0 14px;
  color:#0f172a;
}

.modal-status-csv-loading{
  display:flex;
  align-items:center;
  gap:12px;
  color:#0f172a;
  font-weight:700;
  margin-bottom:14px;
}

.csv-spinner{
  width:22px;
  height:22px;
  border-radius:999px;
  border:3px solid #bfdbfe;
  border-top-color:#1d4ed8;
  animation:csvSpin .9s linear infinite;
}

@keyframes csvSpin{
  to{transform:rotate(360deg)}
}

.modal-status-csv-result{
  margin-bottom:14px;
}

.csv-summary-success{
  color:#15803d;
  font-weight:900;
  margin:0 0 8px;
}

.csv-summary-error{
  color:#b91c1c;
  font-weight:900;
  margin:0 0 10px;
}

.csv-error-list{
  border:1px solid #fecaca;
  background:#fef2f2;
  border-radius:12px;
  padding:10px;
  max-height:220px;
  overflow:auto;
  color:#7f1d1d;
  white-space:pre-wrap;
}

.modal-status-csv-close{
  width:100%;
  min-height:48px;
  border-radius:12px;
  background:#1d4ed8;
  color:#ffffff;
  border:1px solid #1e40af;
  font-weight:900;
  font-size:16px;
}

.modal-status-csv-close:hover{
  background:#1e40af;
}

/* ===== Modal entrega inmediata ===== */
.modal-entrega{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}

.modal-entrega.hidden{
  display:none!important;
}

.modal-entrega-backdrop{
  position:absolute;
  inset:0;
  background:rgba(2, 6, 23, 0.72);
}

.modal-entrega-card{
  position:relative;
  width:min(720px, 100%);
  background:#ffffff;
  border:1px solid #cbd5e1;
  border-radius:18px;
  box-shadow:0 24px 48px rgba(15,23,42,0.24);
  padding:22px;
  z-index:1;
}

.modal-entrega-card h2{
  margin:0 0 8px;
  color:#0f172a;
}

#modalEntregaInmediataText{
  min-height:260px;
  font-family:Consolas, "Courier New", monospace;
  white-space:pre-wrap;
}

.modal-entrega-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:10px;
}

.modal-entrega-actions .outline-btn{
  width:auto;
}

.modal-entrega-confirm{
  flex:1;
  min-height:48px;
  border-radius:12px;
  background:#16a34a;
  color:#ffffff;
  border:1px solid #15803d;
  font-size:16px;
  font-weight:900;
}

.modal-entrega-confirm:hover{
  background:#15803d;
}

.modal-entrega-close{
  position:absolute;
  top:10px;
  right:10px;
  width:42px;
  height:42px;
  border-radius:999px;
  background:#ef4444;
  color:#ffffff;
  border:2px solid #b91c1c;
  font-size:22px;
  font-weight:900;
  line-height:1;
}

.modal-entrega-close:hover{
  background:#dc2626;
  border-color:#991b1b;
}

/* ===== Modal historial inventario ===== */
.modal-overlay.hidden{
  display:none!important;
}
.modal-overlay.inventory-history-modal,
#inventoryHistoryModal {
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,0.75);
}
.modal-card.inventory-history-modal-card {
  position:relative;
  width:min(920px, 100%);
  max-height:min(90vh, 950px);
  background:#ffffff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  box-shadow:0 28px 60px rgba(15,23,42,0.12);
  padding:24px;
  color:#111827;
  overflow:auto;
}

/* Estilos generales para modales (pulido) */
.modal-card{
  position:relative;
  width:clamp(320px, 90%, 920px);
  max-height:90vh;
  background:#0f172a;
  border:1px solid rgba(148,163,184,0.12);
  border-radius:16px;
  box-shadow:0 28px 60px rgba(2,6,23,0.6);
  padding:20px;
  color:#e2e8f0;
  overflow:auto;
}

/* Inventory history modal white theme */
#inventoryHistoryModal .modal-head h2 {
  color:#111827;
}

#inventoryHistoryModal .modal-head .small-text {
  color:#4b5563;
}

#inventoryHistoryModal .modal-summary div {
  background:#f8fafc;
  border:1px solid #e5e7eb;
  color:#111827;
}

#inventoryHistoryModal .modal-summary div strong,
#inventoryHistoryModal .modal-summary div div,
#inventoryHistoryModal .timeline-event,
#inventoryHistoryModal .modal-timeline .timeline-details p,
#inventoryHistoryModal .timeline-date,
#inventoryHistoryModal .timeline-title {
  color:#111827;
}

#inventoryHistoryModal .modal-timeline .timeline-event {
  background:#ffffff;
  border:1px solid #e5e7eb;
}

#inventoryHistoryModal .timeline-date {
  color:#6b7280;
}

/* Contenedor de lista con scroll interno para modales largos */
#quarantineListContainer{
  max-height:calc(90vh - 220px);
  overflow-y:auto;
  padding-right:8px; /* para evitar solapamiento con scrollbar */
  display:flex;
  flex-direction:column;
  gap:12px;
}

.modal-card .modal-close-btn{
  background:transparent;
  border:0;
  color:#cbd5e1;
  font-size:22px;
  cursor:pointer;
}

.quarantine-item{ padding:12px; }
.quarantine-actions input.form-control{ padding:10px; }

@media (max-width:900px){
  .modal-card{ width:calc(100% - 32px); padding:16px }
  #quarantineListContainer{ max-height:calc(80vh - 180px) }
  .quarantine-row{ flex-direction:column }
  .quarantine-actions{ width:100% }
}
.modal-head {
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:18px;
}
.modal-head h2 {
  margin:0;
  font-size:1.4rem;
  color:#ffffff;
}
.modal-head .small-text {
  margin:0;
  color:#94a3b8;
}
.modal-close-btn {
  position:absolute;
  top:18px;
  right:18px;
  width:42px;
  height:42px;
  border:none;
  border-radius:50%;
  background:#ef4444;
  color:#ffffff;
  font-size:22px;
  font-weight:900;
  cursor:pointer;
}
.modal-close-btn:hover {
  background:#dc2626;
}
.modal-summary {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px;
  margin-bottom:20px;
}
.modal-summary div {
  background:rgba(148,163,184,0.08);
  border:1px solid rgba(148,163,184,0.16);
  border-radius:14px;
  padding:14px;
}
.modal-summary div strong {
  display:block;
  margin-bottom:8px;
  color:#cbd5e1;
}
.modal-summary div div {
  color:#f8fafc;
  line-height:1.5;
}
.modal-timeline {
  display:grid;
  gap:16px;
}

/* Estilos para modal de cuarentena */
.quarantine-item{
  background:rgba(255,255,255,0.03);
  border-radius:10px;
  padding:14px;
  display:block;
}
.quarantine-row{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
}
.quarantine-meta{
  flex:1 1 60%;
  color:#cbd5e1;
}
.quarantine-actions{
  flex:0 0 320px;
  display:flex;
  flex-direction:column;
}
.quarantine-platform{ font-weight:700; color:#f8fafc; margin-bottom:6px }
.quarantine-email{ color:#60a5fa; margin-bottom:6px }
.quarantine-profile{ color:#94a3b8; margin-bottom:6px }
.quarantine-life{ color:#f1f5f9; margin-top:6px }
.quarantine-item input.form-control{ width:100%; padding:10px; border-radius:8px; border:1px solid rgba(148,163,184,0.08); background:transparent; color:#e2e8f0 }
.quarantine-item .green-btn{ background:#10b981; color:white; border:none; padding:10px; border-radius:8px; cursor:pointer; font-weight:700 }
.quarantine-item .outline-btn{ background:transparent; color:#94a3b8; border:1px solid rgba(148,163,184,0.12); padding:10px; border-radius:8px; cursor:pointer }

@media (max-width:900px){
  .quarantine-row{ flex-direction:column }
  .quarantine-actions{ width:100% }
}
.modal-timeline .timeline-event {
  background:rgba(255,255,255,0.05);
  border-color:rgba(148,163,184,0.22);
}
.modal-timeline .timeline-title {
  color:#f8fafc;
}
.modal-timeline .timeline-details p {
  color:#cbd5e1;
}

/* ===== Celulares ===== */

@media (max-width:768px){

    #appSection .topbar{
        left:8px;
        right:8px;
        top:8px;

        padding:8px 10px;
        gap:8px;
    }

    .topbar-home-btn,
    .logout-top-btn{

        font-size:12px;
        padding:8px 10px;
        white-space:nowrap;
    }

    .balance-pill{

        font-size:12px;
        padding:8px 10px;
        white-space:nowrap;
    }

    .top-actions{
        gap:6px;
    }

}

/* ===== Celulares ===== */

@media (max-width:768px){

    #appSection .topbar{
        left:8px;
        right:8px;
        top:8px;

        padding:8px 10px;
        gap:8px;
    }

    .topbar-home-btn,
    .logout-top-btn{

        font-size:12px;
        padding:8px 10px;
        white-space:nowrap;
    }

    .balance-pill{

        font-size:12px;
        padding:8px 10px;
        white-space:nowrap;
    }

    .top-actions{
        gap:6px;
    }

}

/* ===== Forzar una sola fila en móviles ===== */
@media (max-width:768px){

    #appSection .topbar{
        display:grid !important;
        grid-template-columns:auto 1fr auto !important;
        align-items:center !important;
        gap:8px !important;
    }

    #appSection .topbar-left-actions{
        margin:0 !important;
    }

    #appSection .top-actions{
        display:contents !important;
    }

    .balance-pill{
        justify-self:end;
        font-size:11px;
        padding:6px 8px;
    }

    .logout-top-btn{
        font-size:11px;
        padding:6px 8px;
    }

    .topbar-home-btn{
        font-size:11px;
        padding:6px 8px;
    }

    #appSection .main{
      padding-top:82px !important;
    }

    #section-dashboard .dashboard-mini-banners{
      margin-top:6px;
    }
}

/* El fondo oscuro que bloquea el panel trasero */
.modal-overlay {
  display: flex;
  position: fixed;
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

/* La caja blanca de la ventana */
.modal-content {
  background: white;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  max-height: 85vh; /* Altura máxima del 85% de la pantalla */
  overflow-y: auto; /* Agrega scroll interno si hay muchos datos */
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* El botón de la X para cerrar */
.close-btn {
  position: absolute;
  top: 15px; 
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #64748b;
}

.close-btn:hover {
  color: #ef4444;
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 20px 0;
  padding-left: 30px;
  border-left: 3px solid #3b82f6; /* Color de la línea vertical */
}

.timeline-event {
  position: relative;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* El punto en la línea de tiempo */
.timeline-event::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 15px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #3b82f6;
}

.timeline-date {
  font-size: 0.85em;
  color: #64748b;
  font-weight: bold;
  margin-bottom: 5px;
}

.timeline-title {
  font-size: 1.1em;
  font-weight: bold;
  color: #0f172a;
  margin-bottom: 8px;
}

.timeline-details p {
  margin: 4px 0;
  font-size: 0.95em;
  color: #334155;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: bold;
}
.badge-manual { background: #e0f2fe; color: #0284c7; }
.badge-venta { background: #dcfce7; color: #166534; }
.badge-reemplazo { background: #fee2e2; color: #991b1b; }

/* ===== Acceso profesional 2026 (aislado de la aplicación) ===== */
#authSection.auth-page{
  min-height:100vh;
  padding:clamp(18px,3vw,42px);
  display:grid;
  place-items:center;
  overflow:hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(59,130,246,.22), transparent 30%),
    radial-gradient(circle at 88% 82%, rgba(124,58,237,.22), transparent 34%),
    linear-gradient(145deg,#050a16 0%,#0b1530 50%,#111b3f 100%);
  font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;
}

#authSection .auth-shell{
  width:min(1120px,100%);
  min-height:min(690px,calc(100vh - 60px));
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr);
  overflow:hidden;
  border:1px solid rgba(148,163,184,.2);
  border-radius:32px;
  background:rgba(255,255,255,.98);
  box-shadow:0 38px 100px rgba(0,0,0,.46);
}

#authSection .auth-showcase{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  padding:48px;
  color:#fff;
  display:flex;
  flex-direction:column;
  background:
    linear-gradient(155deg,rgba(37,99,235,.96),rgba(49,46,129,.98) 58%,rgba(88,28,135,.96));
}

#authSection .auth-showcase:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  opacity:.22;
  background-image:
    linear-gradient(rgba(255,255,255,.12) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.12) 1px,transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(to bottom,black,transparent 86%);
}

#authSection .auth-showcase:after{
  content:"";
  position:absolute;
  width:300px;
  height:300px;
  right:-110px;
  bottom:-120px;
  z-index:-1;
  border:60px solid rgba(255,255,255,.09);
  border-radius:50%;
}

#authSection .auth-showcase-glow{
  position:absolute;
  z-index:-1;
  border-radius:50%;
  filter:blur(8px);
  pointer-events:none;
}
#authSection .auth-showcase-glow-one{width:260px;height:260px;top:80px;right:-100px;background:rgba(56,189,248,.34)}
#authSection .auth-showcase-glow-two{width:220px;height:220px;bottom:80px;left:-100px;background:rgba(244,114,182,.22)}

#authSection .auth-brand-lockup,
#authSection .auth-mobile-brand{
  display:flex;
  align-items:center;
  gap:14px;
}

#authSection .auth-brand-mark{
  width:58px;
  height:58px;
  flex:0 0 58px;
  display:grid;
  place-items:center;
  border-radius:18px;
  color:#fff;
  font-size:29px;
  font-weight:950;
  letter-spacing:-.06em;
  background:linear-gradient(145deg,#38bdf8,#6366f1 58%,#a855f7);
  box-shadow:0 16px 32px rgba(15,23,42,.3),inset 0 1px 0 rgba(255,255,255,.5);
}

#authSection .auth-brand-name{font-size:18px;font-weight:780;letter-spacing:.01em}
#authSection .auth-brand-surname{font-size:13px;font-weight:700;letter-spacing:.24em;text-transform:uppercase;color:#c7d2fe;margin-top:3px}
#authSection .auth-showcase-content{margin:auto 0;max-width:510px;padding:52px 0}
#authSection .auth-kicker{display:inline-flex;padding:8px 12px;border:1px solid rgba(255,255,255,.22);border-radius:999px;background:rgba(255,255,255,.1);font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#e0e7ff}
#authSection .auth-showcase h2{font-size:clamp(34px,4vw,52px);line-height:1.05;letter-spacing:-.045em;margin:24px 0 18px;max-width:520px}
#authSection .auth-showcase-content>p{margin:0;max-width:480px;color:#dbeafe;font-size:17px;line-height:1.65}
#authSection .auth-benefits{display:grid;gap:13px;margin-top:34px}
#authSection .auth-benefit{display:flex;align-items:center;gap:13px;padding:13px 15px;border:1px solid rgba(255,255,255,.15);border-radius:16px;background:rgba(15,23,42,.16);backdrop-filter:blur(8px)}
#authSection .auth-benefit>span{width:30px;height:30px;display:grid;place-items:center;flex:0 0 30px;border-radius:10px;background:rgba(255,255,255,.16);font-weight:900;color:#a7f3d0}
#authSection .auth-benefit b{display:block;font-size:14px}
#authSection .auth-benefit small{display:block;margin-top:3px;color:#c7d2fe;font-size:12px}
#authSection .auth-showcase-footer{font-size:12px;color:#bfdbfe;letter-spacing:.03em}

#authSection .auth-card{
  width:auto;
  min-width:0;
  border-radius:0;
  box-shadow:none;
  padding:clamp(38px,5vw,72px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  background:#fff;
  position:relative;
}

#authSection .auth-mobile-brand{display:none;margin-bottom:32px;color:#172554}
#authSection .auth-mobile-brand .auth-brand-mark{width:48px;height:48px;flex-basis:48px;border-radius:15px;font-size:24px}
#authSection .auth-mobile-brand b,#authSection .auth-mobile-brand span{display:block}
#authSection .auth-mobile-brand span{margin-top:2px;color:#64748b;font-size:12px;letter-spacing:.14em;text-transform:uppercase}
#authSection .auth-form-heading{margin-bottom:27px}
#authSection .auth-eyebrow{display:block;color:#4f46e5;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.15em;margin-bottom:10px}
#authSection .auth-card h1{text-align:left;margin:0;color:#0f172a;font-size:clamp(32px,4vw,44px);line-height:1.08;letter-spacing:-.04em}
#authSection .auth-form-heading p{margin:12px 0 0;color:#64748b;line-height:1.55}

#authSection .tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:5px;
  margin:0 0 28px;
  border:1px solid #e2e8f0;
  border-radius:15px;
  background:#f1f5f9;
}
#authSection .tab-btn{min-height:44px;padding:10px 14px;border-radius:11px;background:transparent;color:#64748b;font-size:14px;font-weight:850;box-shadow:none}
#authSection .tab-btn:hover{transform:none;background:rgba(255,255,255,.7)}
#authSection .tab-btn.active{color:#1e1b4b;background:#fff;box-shadow:0 6px 18px rgba(15,23,42,.09)}

#authSection .auth-form{display:flex;flex-direction:column}
#authSection .auth-field-label{display:block;margin:0 0 8px;color:#334155;font-size:13px;font-weight:850}
#authSection .auth-input-wrap{position:relative;margin-bottom:18px}
#authSection .auth-input-wrap input{
  height:52px;
  margin:0;
  padding:0 48px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#fff;
  color:#0f172a;
  font-size:15px;
  outline:none;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
#authSection .auth-input-wrap input::placeholder{color:#94a3b8}
#authSection .auth-input-wrap input:focus{border-color:#6366f1;box-shadow:0 0 0 4px rgba(99,102,241,.12);background:#fff}
#authSection .auth-input-icon{position:absolute;left:17px;top:50%;transform:translateY(-50%);z-index:1;width:20px;text-align:center;color:#6366f1;font-size:14px;font-weight:900;pointer-events:none}
#authSection .auth-password-wrap input{padding-right:76px}
#authSection .auth-password-toggle{position:absolute;right:8px;top:7px;height:38px;width:auto;padding:0 10px;border-radius:9px;background:transparent;color:#4f46e5;font-size:12px;font-weight:850}
#authSection .auth-password-toggle:hover{transform:none;background:#eef2ff}
#authSection .auth-submit{height:52px;margin-top:5px;padding:0 18px;display:flex;align-items:center;justify-content:center;gap:12px;border-radius:14px;background:linear-gradient(135deg,#2563eb,#4f46e5 58%,#7c3aed);box-shadow:0 14px 26px rgba(79,70,229,.24);font-size:15px;letter-spacing:.01em}
#authSection .auth-submit:hover{filter:brightness(1.06);box-shadow:0 18px 32px rgba(79,70,229,.32)}
#authSection .auth-security-note{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:26px;color:#94a3b8;font-size:12px;text-align:center}
#authSection .auth-security-note span{color:#22c55e;font-size:10px}

.replacement-delivery-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.replacement-delivery-actions .copy-account-btn{margin-top:0}

@media(max-width:880px){
  #authSection.auth-page{padding:18px}
  #authSection .auth-shell{grid-template-columns:1fr;width:min(560px,100%);min-height:auto;border-radius:26px}
  #authSection .auth-showcase{display:none}
  #authSection .auth-card{padding:40px clamp(22px,7vw,48px)}
  #authSection .auth-mobile-brand{display:flex}
}

@media(max-width:520px){
  #authSection.auth-page{padding:0;place-items:stretch;background:#fff}
  #authSection .auth-shell{width:100%;min-height:100vh;border:0;border-radius:0;box-shadow:none}
  #authSection .auth-card{min-height:100vh;padding:32px 22px 26px;justify-content:flex-start}
  #authSection .auth-mobile-brand{margin-bottom:42px}
  #authSection .auth-card h1{font-size:34px}
  #authSection .auth-form-heading{margin-bottom:24px}
  #authSection .tabs{margin-bottom:24px}
  .replacement-delivery-actions{display:grid;grid-template-columns:1fr}
  .replacement-delivery-actions .copy-account-btn{width:100%}
}


/* Paso 7: los comprobantes y evidencias se renderizan solamente al abrirlos. */
.lazy-media-card{
  width:min(920px, calc(100% - 28px));
  max-height:92vh;
  overflow:auto;
}
.lazy-media-preview{
  min-height:120px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  border-radius:16px;
  background:#f8fafc;
  overflow:hidden;
}
.lazy-media-image{
  display:block;
  width:100%;
  max-height:72vh;
  object-fit:contain;
  background:#fff;
}
.lazy-media-frame{
  width:100%;
  min-height:70vh;
  border:0;
  background:#fff;
}
@media(max-width:700px){
  .lazy-media-frame{min-height:62vh}
}


/* ===== Entrega inmediata de compra (v2) ===== */
body.modal-open{
  overflow:hidden;
}

.modal-entrega{
  isolation:isolate;
}

.modal-entrega-card{
  width:min(760px, 100%);
  max-height:min(92vh, 860px);
  overflow:auto;
  border:1px solid rgba(34,197,94,.35);
  border-radius:24px;
  box-shadow:0 28px 80px rgba(2,6,23,.38);
  padding:28px;
  text-align:left;
}

.modal-entrega-success-icon{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  margin:0 auto 12px;
  border-radius:999px;
  background:#dcfce7;
  color:#15803d;
  border:1px solid #86efac;
  font-size:34px;
  font-weight:900;
}

.modal-entrega-card h2{
  padding-right:44px;
  text-align:center;
  font-size:clamp(22px, 4vw, 30px);
}

.modal-entrega-subtitle{
  margin:0 0 16px;
  text-align:center;
  color:#475569;
}

#modalEntregaInmediataText{
  width:100%;
  min-height:280px;
  max-height:46vh;
  resize:vertical;
  padding:16px;
  border:1px solid #cbd5e1;
  border-radius:14px;
  background:#f8fafc;
  color:#0f172a;
  line-height:1.55;
  font-size:14px;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.05);
}

.modal-entrega-account-chooser{
  margin-top:14px;
  padding:14px;
  border:1px solid #dbeafe;
  border-radius:14px;
  background:#eff6ff;
}

.modal-entrega-account-chooser.hidden{
  display:none!important;
}

.modal-entrega-account-chooser select{
  width:100%;
}

.modal-entrega-actions{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  margin-top:16px;
}

.modal-entrega-actions button{
  width:100%;
  min-height:48px;
  border-radius:12px;
  font-weight:900;
}

.modal-entrega-copy{
  border-color:#2563eb!important;
  color:#1d4ed8!important;
  background:#eff6ff!important;
}

.modal-entrega-report{
  border:1px solid #dc2626;
  background:#fee2e2;
  color:#991b1b;
}

.modal-entrega-report:hover:not(:disabled){
  background:#fecaca;
}

.modal-entrega-report:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.modal-entrega-confirm{
  background:#16a34a;
  border-color:#15803d;
}

.modal-entrega-history-note{
  margin:14px 0 0;
  text-align:center;
  color:#64748b;
  font-size:13px;
}

@media (max-width:680px){
  .modal-entrega{
    padding:10px;
    align-items:flex-end;
  }

  .modal-entrega-card{
    width:100%;
    max-height:94vh;
    border-radius:22px 22px 14px 14px;
    padding:22px 16px 18px;
  }

  #modalEntregaInmediataText{
    min-height:250px;
    max-height:43vh;
  }

  .modal-entrega-actions{
    grid-template-columns:1fr;
  }
}

/* ===== Ajuste final exclusivo para celular: navegación y dashboard ===== */
@media (max-width: 768px){
  html,
  body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  #appSection,
  #appSection .app,
  #appSection .main,
  #appSection .section,
  #appSection .panel,
  #appSection .item,
  #appSection .row,
  #appSection .two-row,
  #appSection .three-row,
  #appSection .account-grid,
  #appSection .grid-cards,
  #appSection .dashboard-actions-grid{
    min-width:0;
    max-width:100%;
  }

  #appSection{
    overflow-x:hidden;
  }

  #appSection .mobile-header,
  #appSection .sidebar,
  #appSection .topbar-user{
    display:none!important;
  }

  #appSection .topbar{
    position:fixed!important;
    top:calc(env(safe-area-inset-top, 0px) + 8px)!important;
    left:8px!important;
    right:8px!important;
    width:auto!important;
    min-height:48px;
    margin:0!important;
    padding:7px 8px!important;
    display:grid!important;
    grid-template-columns:minmax(0, 1fr) auto auto!important;
    align-items:center!important;
    gap:6px!important;
    border-radius:16px!important;
    z-index:12000!important;
    background:rgba(15,23,42,.92)!important;
    border:1px solid rgba(148,163,184,.32)!important;
    box-shadow:0 12px 28px rgba(2,6,23,.38)!important;
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
  }

  #appSection .topbar-left-actions{
    display:block!important;
    width:auto!important;
    min-width:0;
    margin:0!important;
  }

  #appSection .top-actions{
    display:contents!important;
  }

  #appSection .topbar-home-btn,
  #appSection .logout-top-btn,
  #appSection .balance-pill{
    width:auto!important;
    min-width:0;
    min-height:34px;
    margin:0!important;
    padding:7px 9px!important;
    border-radius:10px!important;
    font-size:11px!important;
    line-height:1.1;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  #appSection .topbar-home-btn{
    justify-self:start;
  }

  #appSection .balance-pill{
    justify-self:end;
    display:flex;
    align-items:center;
    background:rgba(30,41,59,.96)!important;
    color:#f8fafc!important;
  }

  #appSection .logout-top-btn{
    justify-self:end;
  }

  #appSection .main{
    width:100%!important;
    margin-left:0!important;
    padding:calc(env(safe-area-inset-top, 0px) + 72px) 10px calc(34px + env(safe-area-inset-bottom, 0px))!important;
    overflow-x:hidden;
  }

  #section-dashboard .dashboard-mini-banners{
    width:100%;
    margin:0 0 10px!important;
    overflow:hidden;
  }

  #section-dashboard .dashboard-mini-banners-carousel{
    --mini-banner-gap:7px;
    --mini-banner-card-width:clamp(116px, 38vw, 142px);
    width:100%!important;
    max-width:360px;
    padding:6px!important;
    border-radius:14px;
  }

  #section-dashboard .dashboard-mini-banner-item{
    height:90px;
    aspect-ratio:auto;
    border-radius:10px;
  }

  #section-dashboard .dashboard-mini-banner-item img{
    width:100%;
    height:100%;
    object-fit:contain;
    object-position:center;
  }

  #section-dashboard .mini-banner-below-title{
    min-height:24px;
    margin-top:4px;
    font-size:10px;
    line-height:1.2;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
  }

  #section-dashboard.dashboard-premium > .grid-cards,
  #section-dashboard.dashboard-premium .dashboard-actions-grid{
    display:grid!important;
    grid-template-columns:repeat(2, minmax(0, 1fr))!important;
    gap:9px!important;
    margin-bottom:12px;
  }

  #section-dashboard .dashboard-actions-center{
    padding:10px!important;
    margin-bottom:12px!important;
    border-radius:16px!important;
  }

  #section-dashboard.dashboard-premium .dash-card,
  #section-dashboard .dashboard-actions-grid .dash-card{
    min-width:0;
    min-height:96px!important;
    margin:0!important;
    padding:11px 8px!important;
    border-radius:15px!important;
    display:flex;
    flex-direction:column;
    align-items:center!important;
    justify-content:center;
    gap:7px!important;
    text-align:center;
    overflow:hidden;
    box-shadow:0 8px 18px rgba(15,23,42,.10)!important;
  }

  #section-dashboard.dashboard-premium .dash-card > div,
  #section-dashboard .dashboard-actions-grid .dash-card > div{
    min-width:0;
    max-width:100%;
  }

  #section-dashboard.dashboard-premium .dash-card .dash-icon,
  #section-dashboard .dashboard-actions-grid .dash-card .dash-icon{
    flex:0 0 40px;
    width:40px!important;
    height:40px!important;
    border-radius:12px!important;
    font-size:20px!important;
    line-height:1;
  }

  #section-dashboard.dashboard-premium .dash-card .dash-label,
  #section-dashboard .dashboard-actions-grid .dash-card .dash-label{
    max-width:100%;
    color:#1e293b;
    font-size:13px!important;
    line-height:1.18;
    font-weight:850;
    overflow-wrap:anywhere;
    word-break:normal;
  }

  #section-dashboard.dashboard-premium .dash-card .dash-value,
  #section-dashboard.dashboard-premium .dash-card .dash-value span,
  #section-dashboard .dashboard-actions-grid .dash-card .dash-value,
  #section-dashboard .dashboard-actions-grid .dash-card .dash-value span{
    max-width:100%;
    font-size:22px!important;
    line-height:1.05;
    overflow-wrap:anywhere;
  }

  #section-dashboard.dashboard-premium .dash-card .small-text,
  #section-dashboard .dashboard-actions-grid .dash-card .small-text{
    max-width:100%;
    font-size:10.5px!important;
    line-height:1.2;
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    overflow-wrap:anywhere;
  }

  #appSection img,
  #appSection video,
  #appSection canvas,
  #appSection svg,
  #appSection iframe{
    max-width:100%;
  }

  #appSection input,
  #appSection textarea,
  #appSection select,
  #appSection button{
    min-width:0;
    max-width:100%;
  }

  #appSection .panel-head,
  #appSection .tools,
  #appSection .product-header,
  #appSection .quarantine-row{
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
  }

  #appSection .table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
  }

  #appSection table{
    width:100%!important;
    max-width:100%;
    table-layout:fixed;
  }

  #appSection table th,
  #appSection table td{
    max-width:0;
    padding:8px 6px;
    font-size:11px;
    white-space:normal!important;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  #appSection pre,
  #appSection code,
  #appSection .order-data,
  #appSection .response-text,
  #appSection .account-value,
  #appSection .product-name,
  #appSection .compact-title,
  #appSection .compact-meta{
    max-width:100%;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  #appSection .modal-card,
  #appSection .modal-content,
  #appSection .modal-box,
  #appSection .modal-entrega-card{
    max-width:calc(100vw - 20px)!important;
  }
}

/* ===== Avisos del sistema visibles debajo de la barra fija en celular ===== */
@media (max-width: 768px){
  .message{
    top:calc(env(safe-area-inset-top, 0px) + 72px)!important;
    left:10px!important;
    right:10px!important;
    width:auto!important;
    max-width:none!important;
    z-index:200000!important;
    pointer-events:none;
  }

  .message p{
    width:100%;
    max-height:min(42vh, 280px);
    margin:0!important;
    padding:13px 15px!important;
    overflow-y:auto;
    border:1px solid currentColor;
    border-radius:13px!important;
    background:rgba(255,255,255,.98)!important;
    box-shadow:0 12px 30px rgba(15,23,42,.24)!important;
    font-size:14px;
    line-height:1.35;
    text-align:left;
    overflow-wrap:anywhere;
    word-break:break-word;
    pointer-events:auto;
  }

  .message p.success{
    color:#166534!important;
    background:#ecfdf5!important;
    border-color:#86efac!important;
  }

  .message p.error{
    color:#991b1b!important;
    background:#fef2f2!important;
    border-color:#fca5a5!important;
  }
}
