@charset "UTF-8";

/* Variables */
:root{
  --siavce-font:"Futura","Trebuchet MS","Avenir Next","Segoe UI",system-ui,-apple-system,sans-serif;
  --siavce-bg:#07111f;
  --siavce-surface:#102136;
  --siavce-surface-2:#162b46;
  --siavce-glass:rgba(255,255,255,.08);
  --siavce-glass-strong:rgba(255,255,255,.14);
  --siavce-primary:#2563eb;
  --siavce-success:#16a34a;
  --siavce-danger:#dc2626;
  --siavce-warning:#d97706;
  --siavce-text:#f8fafc;
  --siavce-muted:rgba(248,250,252,.74);
  --siavce-muted-2:rgba(248,250,252,.58);
  --siavce-border:rgba(255,255,255,.14);
  --siavce-shadow:0 24px 56px rgba(2,6,23,.28);
  --siavce-shadow-soft:0 14px 28px rgba(2,6,23,.18);
  --siavce-radius:22px;
  --siavce-radius-sm:14px;
  --siavce-header-height:56px;
  --siavce-ribbon-height:0px;
  --siavce-content-top:calc(var(--siavce-header-height) + var(--siavce-ribbon-height) + 20px);
  --siavce-page-width:min(1480px,calc(100vw - 32px));
  --siavce-page-gap:20px;
}

/* Reset seguro */
html{
  min-height:100%;
  scroll-behavior:smooth;
}

*,*::before,*::after{
  box-sizing:border-box;
}

body{
  margin:0;
  min-height:100vh;
  font-family:var(--siavce-font);
  color:var(--siavce-text);
  background:
    radial-gradient(circle at top left,rgba(37,99,235,.18),transparent 32%),
    radial-gradient(circle at bottom right,rgba(22,163,74,.14),transparent 28%),
    linear-gradient(145deg,var(--siavce-bg),var(--siavce-surface));
}

img{
  max-width:100%;
  display:block;
}

a{
  color:inherit;
}

/* Tema */
body.siavce-theme-gris-oscuro{--bgcolor:#343434;--hovercolor:#171717;--siavce-primary:#4b5563;--siavce-surface:#151a21;}
body.siavce-theme-rojo-oscuro{--bgcolor:#660505;--hovercolor:#bb4d4d;--siavce-primary:#b91c1c;--siavce-surface:#2a1014;}
body.siavce-theme-verde-oscuro{--bgcolor:#056613;--hovercolor:#032c09;--siavce-primary:#15803d;--siavce-surface:#12261b;}
body.siavce-theme-cafe-oscuro{--bgcolor:#664105;--hovercolor:#3e2702;--siavce-primary:#92400e;--siavce-surface:#241912;}
body.siavce-theme-azul-oscuro{--bgcolor:#14606e;--hovercolor:#0b333a;--siavce-primary:#2563eb;--siavce-surface:#102136;}
body.siavce-theme-azul-claro{--bgcolor:#5980b4;--hovercolor:#416fac;--siavce-primary:#3b82f6;--siavce-surface:#16324c;}
body.siavce-theme-morado{--bgcolor:#574187;--hovercolor:#2b1e46;--siavce-primary:#7c3aed;--siavce-surface:#1b1931;}
body.siavce-theme-rosa-oscuro{--bgcolor:#d17ba6;--hovercolor:#983b6a;--siavce-primary:#db2777;--siavce-surface:#301727;}
body.siavce-theme-rosa-claro{--bgcolor:#ffcdd4;--hovercolor:#ff8c9c;--siavce-primary:#ec4899;--siavce-surface:#3a1f2a;}
body.siavce-theme-verde-claro{--bgcolor:#59ab6b;--hovercolor:#346840;--siavce-primary:#22c55e;--siavce-surface:#16281c;}

body[class*="siavce-theme-"],
body.siavce-bootstrap-glass,
body.siavce-compact-ui{
  --siavce-bg:color-mix(in srgb,var(--hovercolor,#0f2742) 72%,#020617 28%);
  --siavce-surface:color-mix(in srgb,var(--bgcolor,#123b67) 24%,#08111f 76%);
  --siavce-surface-2:color-mix(in srgb,var(--bgcolor,#123b67) 42%,#08111f 58%);
  --siavce-primary:var(--bgcolor,#2563eb);
  background:
    radial-gradient(circle at top left,color-mix(in srgb,var(--bgcolor,#123b67) 24%,transparent),transparent 32%),
    radial-gradient(circle at bottom right,color-mix(in srgb,var(--siavce-primary,#2563eb) 12%,transparent),transparent 30%),
    linear-gradient(145deg,var(--siavce-bg),var(--siavce-surface));
}

/* Tipografía */
h1,h2,h3,h4,h5,h6{
  margin:0 0 .45rem;
  font-weight:800;
  line-height:1.12;
  color:#fff;
}

p{
  margin:0 0 .85rem;
  color:var(--siavce-muted);
}

small,
.text-muted{
  color:var(--siavce-muted-2) !important;
}

/* Fondo global */
body.siavce-auth-brand{
  background:
    radial-gradient(circle at top left,rgba(37,99,235,.22),transparent 34%),
    radial-gradient(circle at top right,rgba(22,163,74,.18),transparent 30%),
    radial-gradient(circle at bottom center,color-mix(in srgb,var(--siavce-primary,#2563eb) 16%,transparent),transparent 32%),
    linear-gradient(155deg,#0f1218,#171b20 48%,#102136 100%);
}

/* Layout global SIAVCE */
.siavce-app-main,
#siavceAppMain{
  position:relative;
  width:100%;
  min-height:100vh;
  padding:var(--siavce-content-top) 0 28px;
}

.siavce-page,
.siavce-page-shell{
  width:var(--siavce-page-width);
  margin:0 auto;
}

.siavce-page-shell{
  display:grid;
  gap:var(--siavce-page-gap);
}

.siavce-shell,
.siavce-panel,
.siavce-card,
.siavce-glass,
.glass-card,
.glass-container,
.portal-card,
.dash-panel,
.marketing-card,
.support-card,
.ship-card,
.metric-card,
.product-panel,
.store-card{
  background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.05));
  border:1px solid var(--siavce-border);
  border-radius:var(--siavce-radius);
  box-shadow:var(--siavce-shadow);
  backdrop-filter:blur(18px);
  color:var(--siavce-text);
}

.siavce-shell,
.siavce-panel,
.siavce-card,
.glass-card,
.glass-container,
.marketing-card,
.support-card,
.ship-card,
.product-panel,
.store-card{
  padding:18px;
}

.siavce-grid{
  display:grid;
  gap:14px;
}

.siavce-grid-2{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.siavce-grid-3{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.siavce-kpi-grid,
.support-metrics,
.marketing-kpis,
.cliente-kpis{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
}

/* Header ribbon */
.ribbon{
  position:fixed;
  inset:0 0 auto 0;
  z-index:1030;
  background:linear-gradient(180deg,rgba(7,17,31,.98),rgba(11,23,40,.96));
  border-bottom:1px solid rgba(255,255,255,.08);
  box-shadow:0 16px 34px rgba(2,6,23,.26);
  backdrop-filter:blur(18px);
}

.ribbon-tabs{
  min-height:var(--siavce-header-height);
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 12px;
  overflow-x:auto;
  scrollbar-width:thin;
}

.ribbon-tab{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:0 14px;
  border-radius:999px;
  color:rgba(248,250,252,.88);
  white-space:nowrap;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}

.ribbon-tab:hover,
.ribbon-tab.active{
  background:rgba(255,255,255,.1);
  color:#fff;
}

.ribbon-tab.ms-auto{
  margin-left:auto;
  cursor:default;
}

.ribbon-tab a{
  color:inherit;
  text-decoration:none;
}

.siavce-logout-link,
.ribbon-tab a.text-danger{
  color:#f87171 !important;
}

.badge-notif{
  font-size:.68rem;
  border-radius:999px;
}

.ribbon-tools{
  display:flex;
  align-items:stretch;
  gap:10px;
  flex-wrap:wrap;
  padding:0 12px;
  max-height:0;
  overflow:hidden;
  opacity:0;
  border-top:1px solid transparent;
  transition:max-height .2s ease,opacity .2s ease,padding .2s ease,border-color .2s ease;
}

.ribbon-tools.active{
  max-height:72px;
  padding:10px 12px 12px;
  opacity:1;
  border-top-color:rgba(255,255,255,.08);
}

body.siavce-ribbon-open{
  --siavce-ribbon-height:82px;
}

.tool-group{
  display:flex;
}

.tool-btn{
  min-height:56px;
  display:grid;
  justify-items:center;
  align-content:center;
  gap:4px;
  min-width:92px;
  padding:8px 10px;
  border-radius:16px;
  text-decoration:none;
  color:#fff;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow-soft);
  transition:transform .16s ease,background .16s ease,border-color .16s ease;
}

.tool-btn:hover,
.tool-active .tool-btn{
  transform:translateY(-1px);
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.2);
}

.tool-icon,
.iconosbar{
  width:22px;
  height:22px;
  object-fit:contain;
}

/* Submenus */
.notif-bubble{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:1025;
}

.notif-toggle{
  width:56px;
  height:56px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,var(--siavce-danger),#fb7185);
  color:#fff;
  font-weight:800;
  box-shadow:0 16px 28px rgba(2,6,23,.24);
}

.notif-panel{
  display:none;
  position:absolute;
  right:0;
  bottom:70px;
  width:min(360px,92vw);
  max-height:420px;
  overflow:auto;
  padding:14px;
  border-radius:18px;
  border:1px solid var(--siavce-border);
  background:rgba(7,17,31,.96);
  box-shadow:var(--siavce-shadow);
}

.notif-bubble.is-open .notif-panel,
.notif-panel.active,
.notif-panel.is-open{
  display:block;
}

.notif-item{
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.notif-item:last-child{
  border-bottom:0;
}

/* Formularios */
body.siavce-bootstrap-glass .form-control,
body.siavce-bootstrap-glass .form-select,
body.siavce-core-access .form-control,
body.siavce-core-access .form-select{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:#fff;
  box-shadow:none;
}

body.siavce-bootstrap-glass .form-control::placeholder,
body.siavce-core-access .form-control::placeholder{
  color:rgba(248,250,252,.52);
}

body.siavce-bootstrap-glass .form-control:focus,
body.siavce-bootstrap-glass .form-select:focus,
body.siavce-core-access .form-control:focus,
body.siavce-core-access .form-select:focus{
  border-color:color-mix(in srgb,var(--siavce-primary) 52%,white 16%);
  background:rgba(255,255,255,.12);
  color:#fff;
  box-shadow:0 0 0 .18rem color-mix(in srgb,var(--siavce-primary) 18%,transparent);
}

body.siavce-bootstrap-glass label,
body.siavce-core-access label{
  color:rgba(248,250,252,.86);
  font-size:.84rem;
  font-weight:700;
}

/* Botones */
body.siavce-bootstrap-glass .btn,
body.siavce-core-access .btn{
  border-radius:14px;
  font-weight:700;
  transition:transform .16s ease,filter .16s ease;
}

body.siavce-bootstrap-glass .btn:hover,
body.siavce-core-access .btn:hover{
  transform:translateY(-1px);
}

body.siavce-bootstrap-glass .btn-primary,
body.siavce-core-access .btn-primary{
  --bs-btn-bg:linear-gradient(135deg,#2563eb,#38bdf8);
  --bs-btn-border-color:transparent;
  --bs-btn-hover-border-color:transparent;
  background:linear-gradient(135deg,#2563eb,#38bdf8);
  border-color:transparent;
}

body.siavce-bootstrap-glass .btn-success,
body.siavce-core-access .btn-success{
  background:linear-gradient(135deg,#16a34a,#22c55e);
  border-color:transparent;
}

body.siavce-bootstrap-glass .btn-danger,
body.siavce-core-access .btn-danger{
  background:linear-gradient(135deg,#dc2626,#fb7185);
  border-color:transparent;
}

body.siavce-bootstrap-glass .btn-secondary,
body.siavce-bootstrap-glass .btn-outline-light,
body.siavce-core-access .btn-secondary{
  background:rgba(255,255,255,.1);
  border-color:rgba(255,255,255,.16);
  color:#fff;
}

/* Tablas */
body.siavce-bootstrap-glass .table,
body.siavce-bootstrap-glass .table-glass{
  color:#fff;
  margin:0;
  --bs-table-bg:transparent;
  --bs-table-color:#fff;
  --bs-table-border-color:rgba(255,255,255,.1);
}

body.siavce-bootstrap-glass .table thead th,
body.siavce-bootstrap-glass .table-glass thead th{
  background:rgba(255,255,255,.1);
  color:rgba(255,255,255,.82);
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  border-bottom:0;
  white-space:nowrap;
}

body.siavce-bootstrap-glass .table tbody td,
body.siavce-bootstrap-glass .table-glass tbody td{
  background:rgba(255,255,255,.05);
  vertical-align:middle;
}

.table-responsive{
  border-radius:18px;
}

/* Modales */
body.siavce-bootstrap-glass .modal-content{
  background:rgba(10,20,34,.94);
  border:1px solid rgba(255,255,255,.14);
  border-radius:20px;
  color:#fff;
  backdrop-filter:blur(18px);
}

body.siavce-bootstrap-glass .modal-header,
body.siavce-bootstrap-glass .modal-footer{
  border-color:rgba(255,255,255,.08);
}

/* Alertas */
.alert{
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
}

body.siavce-bootstrap-glass .alert{
  background:rgba(255,255,255,.09);
  color:#fff;
}

/* Utilidades */
.siavce-actions-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.siavce-toolbar,
.panel-title-row,
.cliente-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.empty-state,
.cliente-empty{
  padding:18px;
  border-radius:16px;
  background:rgba(255,255,255,.05);
  color:var(--siavce-muted);
  text-align:center;
}

/* Acceso */
.siavce-core-access{
  display:grid;
  place-items:center;
  padding:28px 16px;
}

.siavce-login-layout{
  width:min(1380px,calc(100vw - 32px));
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(420px,.82fr);
  gap:24px;
  align-items:stretch;
}

.siavce-login-welcome,
.siavce-login-card,
.siavce-access-card,
.login-status,
.login-container{
  background:linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.05));
  border:1px solid rgba(255,255,255,.16);
  border-radius:28px;
  box-shadow:var(--siavce-shadow);
  backdrop-filter:blur(20px);
}

.siavce-login-welcome,
.siavce-login-card,
.siavce-access-card,
.login-status,
.login-container{
  padding:24px;
}

.siavce-login-brand{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:16px;
  align-items:center;
}

.siavce-login-brand img,
.login-logo img{
  width:78px;
  height:78px;
  border-radius:22px;
  object-fit:contain;
  background:rgba(255,255,255,.08);
  padding:10px;
}

.siavce-login-features{
  display:grid;
  gap:12px;
  margin-top:18px;
}

.siavce-login-feature{
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
}

.siavce-login-card form,
.siavce-login-actions,
.login-actions{
  display:grid;
  gap:14px;
}

.siavce-access-page{
  width:100%;
  min-height:100vh;
}

.siavce-access-card{
  text-align:center;
}

.siavce-access-logo{
  width:88px;
  height:88px;
  margin:0 auto 14px;
  display:grid;
  place-items:center;
  border-radius:24px;
  background:linear-gradient(135deg,#2563eb,#16a34a);
  color:#fff;
  font-size:1.6rem;
  font-weight:900;
}

.login-status,
.login-container{
  width:min(560px,100%);
  margin:0 auto;
  text-align:center;
}

body.siavce-view-index .siavce-login-welcome{
  padding:32px;
}

body.siavce-view-index .siavce-login-card{
  max-width:460px;
  justify-self:end;
  padding:30px 28px;
}

body.siavce-view-index .siavce-login-brand{
  align-items:flex-start;
}

body.siavce-view-index .siavce-login-brand h1{
  margin:0 0 8px;
  font-size:clamp(2.1rem,2.9vw,3rem);
}

body.siavce-view-index .siavce-login-welcome .siavce-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

body.siavce-view-index .siavce-login-feature{
  padding:16px 18px;
}

.loader{
  width:46px;
  height:46px;
  margin:12px auto 0;
  object-fit:contain;
}

/* Dashboard */
body.siavce-view-dashboard .dash-shell{
  width:min(1440px,calc(100vw - 32px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

body.siavce-view-dashboard .dash-hero,
body.siavce-view-dashboard .dash-card,
body.siavce-view-dashboard .dash-panel,
body.siavce-view-dashboard .dash-action-card,
body.siavce-view-dashboard .module-card,
body.siavce-view-dashboard .client-card{
  border:1px solid var(--siavce-border);
  box-shadow:var(--siavce-shadow);
  backdrop-filter:blur(18px);
}

body.siavce-view-dashboard .dash-hero{
  display:grid;
  grid-template-columns:minmax(0,1.18fr) minmax(320px,.82fr);
  gap:18px;
  padding:24px;
  border-radius:28px;
  background:linear-gradient(165deg,rgba(9,18,34,.94),rgba(16,33,54,.9));
  overflow:hidden;
}

body.siavce-view-dashboard .dash-title{
  margin:0 0 6px;
  font-size:clamp(1.9rem,2.5vw,2.6rem);
}

body.siavce-view-dashboard .dash-sub{
  margin:0;
  max-width:72ch;
  color:var(--siavce-muted);
}

body.siavce-view-dashboard .dash-pill-row,
body.siavce-view-dashboard .panel-head,
body.siavce-view-dashboard .task-item,
body.siavce-view-dashboard .module-head,
body.siavce-view-dashboard .module-stats{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

body.siavce-view-dashboard .dash-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  color:var(--siavce-text);
}

body.siavce-view-dashboard .dash-mini-icon,
body.siavce-view-dashboard .dash-icon{
  width:24px;
  height:24px;
  max-width:100%;
  max-height:24px;
  object-fit:contain;
  flex:0 0 auto;
}

body.siavce-view-dashboard .kpi-icon .dash-icon{
  width:54px;
  height:54px;
  max-height:54px;
}

body.siavce-view-dashboard .dash-hero-side,
body.siavce-view-dashboard .kpi-grid,
body.siavce-view-dashboard .content-grid,
body.siavce-view-dashboard .charts-grid,
body.siavce-view-dashboard .module-grid{
  display:grid;
  gap:16px;
}

body.siavce-view-dashboard .dash-hero-side{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

body.siavce-view-dashboard .impact-card,
body.siavce-view-dashboard .dash-card,
body.siavce-view-dashboard .dash-panel,
body.siavce-view-dashboard .module-card,
body.siavce-view-dashboard .client-card{
  padding:18px;
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.045));
}

body.siavce-view-dashboard .impact-card strong,
body.siavce-view-dashboard .kpi-value{
  font-size:1.8rem;
  line-height:1.05;
}

body.siavce-view-dashboard .dash-action-strip{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
}

body.siavce-view-dashboard .dash-action-card{
  display:grid;
  gap:8px;
  padding:18px;
  border-radius:22px;
  text-decoration:none;
  color:var(--siavce-text);
  background:rgba(255,255,255,.06);
}

body.siavce-view-dashboard .kpi-grid{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}

body.siavce-view-dashboard .content-grid,
body.siavce-view-dashboard .charts-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

body.siavce-view-dashboard .panel-head{
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:14px;
}

body.siavce-view-dashboard .task-list,
body.siavce-view-dashboard .client-grid{
  display:grid;
  gap:12px;
}

body.siavce-view-dashboard .task-item,
body.siavce-view-dashboard .client-card{
  align-items:flex-start;
  justify-content:space-between;
  padding:14px 16px;
  border-radius:18px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.09);
}

body.siavce-view-dashboard .task-main{
  display:grid;
  gap:4px;
}

body.siavce-view-dashboard .tag-link{
  color:#dbeafe;
  text-decoration:none;
  font-weight:700;
}

body.siavce-view-dashboard .chart{
  min-height:320px;
}

body.siavce-view-dashboard .module-grid{
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
}

body.siavce-view-dashboard img{
  max-width:100%;
  height:auto;
}

/* Clientes */
body.siavce-view-clientes .clientes-shell{
  width:min(1400px,calc(100vw - 32px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

.siavce-page-hero,
.siavce-panel-card{
  padding:22px;
  border-radius:26px;
  background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.045));
  border:1px solid var(--siavce-border);
  box-shadow:var(--siavce-shadow);
}

.siavce-page-hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(280px,.9fr);
  gap:16px;
  align-items:flex-start;
}

.siavce-panel-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  align-items:flex-start;
}

.siavce-page-title{
  margin:0 0 8px;
  font-size:clamp(1.9rem,2.5vw,2.5rem);
}

.siavce-page-copy{
  margin:0;
  max-width:72ch;
  color:var(--siavce-muted);
}

.siavce-page-pill-row,
.siavce-actions-row,
.siavce-chip-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.siavce-page-pill,
.siavce-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
}

.siavce-chip.alt{
  background:rgba(37,99,235,.16);
}

.siavce-page-kpis{
  min-width:min(100%,420px);
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.siavce-page-kpi{
  padding:16px;
  border-radius:20px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
}

.siavce-page-kpi small{
  display:block;
  color:var(--siavce-muted);
  text-transform:uppercase;
  letter-spacing:.06em;
}

.siavce-page-kpi strong{
  display:block;
  margin-top:8px;
  font-size:1.4rem;
}

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

.siavce-filter-actions{
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}

body.siavce-view-clientes .siavce-entity-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(310px,1fr));
  gap:16px;
}

body.siavce-view-clientes .siavce-entity-card{
  display:grid;
  gap:14px;
  min-height:100%;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-clientes .siavce-entity-title{
  margin:0;
  font-size:1.05rem;
  line-height:1.3;
}

body.siavce-view-clientes .siavce-entity-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

body.siavce-view-clientes .siavce-entity-body{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

body.siavce-view-clientes .siavce-entity-column{
  display:grid;
  gap:10px;
}

body.siavce-view-clientes .siavce-meta-list{
  display:grid;
  gap:10px;
}

body.siavce-view-clientes .siavce-meta-item{
  display:grid;
  gap:4px;
  padding:10px 12px;
  border-radius:16px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
}

body.siavce-view-clientes .siavce-meta-item span{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  overflow-wrap:anywhere;
}

body.siavce-view-clientes .siavce-img-avatar-sm{
  width:30px;
  height:30px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.16);
}

body.siavce-view-clientes img{
  max-width:100%;
  height:auto;
}

body.siavce-view-clientes .siavce-entity-footer{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:auto;
}

/* Calendario de citas */
body.siavce-view-citascalendario .siavce-page-shell{
  width:min(1680px,calc(100vw - 24px));
  margin:0 auto;
}

body.siavce-view-citascalendario .calendar-shell{
  display:grid;
  gap:18px;
}

body.siavce-view-citascalendario .calendar-layout{
  display:grid;
  grid-template-columns:minmax(300px,.28fr) minmax(0,1fr);
  gap:18px;
  align-items:start;
}

body.siavce-view-citascalendario .calendar-sidebar,
body.siavce-view-citascalendario .calendar-main-card{
  padding:22px;
  border-radius:26px;
  background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.045));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-citascalendario .calendar-main-card{
  overflow:hidden;
}

body.siavce-view-citascalendario .calendar-grid-wrap{
  overflow-x:auto;
}

body.siavce-view-citascalendario .calendar-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
}

body.siavce-view-citascalendario .calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:10px;
}

body.siavce-view-citascalendario .day-header{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:10px 8px;
  text-align:center;
  border-radius:16px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.1);
  color:var(--siavce-muted-2);
  font-weight:700;
}

body.siavce-view-citascalendario .day-cell,
body.siavce-view-citascalendario .empty-cell{
  min-height:172px;
  border-radius:20px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
}

body.siavce-view-citascalendario .empty-cell{
  opacity:.28;
}

body.siavce-view-citascalendario .day-cell{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  overflow:hidden;
}

body.siavce-view-citascalendario .day-cell.weekend{
  background:rgba(15,23,42,.42);
}

body.siavce-view-citascalendario .day-cell.today{
  border-color:rgba(96,165,250,.55);
  box-shadow:0 0 0 1px rgba(96,165,250,.18) inset;
}

body.siavce-view-citascalendario .day-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  font-weight:800;
}

body.siavce-view-citascalendario .day-cell.today .day-number{
  background:rgba(37,99,235,.26);
}

body.siavce-view-citascalendario .cita-pill{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:8px 10px;
  border-radius:14px;
  color:#fff;
  background:rgba(15,23,42,.75);
  border:1px solid rgba(255,255,255,.08);
}

body.siavce-view-citascalendario .legend-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
}

body.siavce-view-citascalendario .legend-pill .dot,
body.siavce-view-citascalendario .cita-pill .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background:currentColor;
  flex:0 0 auto;
}

/* Dashboard cliente */
body.siavce-view-dashboard_cliente .cliente-dashboard-page{
  width:min(1400px,calc(100vw - 32px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

body.siavce-view-dashboard_cliente .cliente-shell,
body.siavce-view-dashboard_cliente .cliente-grid,
body.siavce-view-dashboard_cliente .cliente-grid-2{
  display:grid;
  gap:18px;
}

body.siavce-view-dashboard_cliente .cliente-grid-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

body.siavce-view-dashboard_cliente .cliente-timeline,
body.siavce-view-dashboard_cliente .cliente-scroll{
  display:grid;
  gap:14px;
}

body.siavce-view-dashboard_cliente #formSeguimientoCliente,
body.siavce-view-dashboard_cliente #clientePendienteForm{
  display:none !important;
}

body.siavce-view-dashboard_cliente .cliente-timeline-item,
body.siavce-view-dashboard_cliente .cliente-task-card{
  padding:16px 18px;
  border-radius:20px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 14px 28px rgba(15,23,42,.16);
}

body.siavce-view-dashboard_cliente .cliente-task-card{
  display:grid;
  gap:10px;
}

body.siavce-view-dashboard_cliente .cliente-bottom-section,
body.siavce-view-dashboard_cliente .glass-container{
  border-radius:26px;
}

body.siavce-view-dashboard_cliente .cliente-profile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}

body.siavce-view-dashboard_cliente .cliente-item{
  min-height:100%;
}

body.siavce-view-dashboard_cliente .cliente-media-thumb{
  max-width:100%;
  max-height:180px;
  object-fit:cover;
}

/* Marketing */
body.siavce-view-marketing .marketing-composer-layout{
  display:grid;
  grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);
  gap:18px;
  align-items:start;
}

body.siavce-view-marketing .marketing-composer-main{
  display:grid;
  gap:14px;
}

body.siavce-view-marketing .marketing-composer-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.84fr);
  gap:16px;
  align-items:start;
}

body.siavce-view-marketing .marketing-composer-form > [class*="col-"]{
  width:auto;
}

body.siavce-view-marketing .marketing-preview-column{
  grid-column:2;
  grid-row:1 / span 12;
  display:block;
}

body.siavce-view-marketing .marketing-preview-rail{
  position:sticky;
  top:calc(var(--siavce-content-top) + 18px);
  display:grid;
  gap:14px;
}

body.siavce-view-marketing .marketing-preview-card,
body.siavce-view-marketing .marketing-side-card{
  padding:18px;
  border-radius:24px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-marketing .preview-layout{
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  justify-content:stretch;
}

body.siavce-view-marketing .marketing-grid{
  grid-template-columns:1fr;
}

body.siavce-view-marketing .marketing-grid > .stack:last-child{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

body.siavce-view-marketing .marketing-list-card,
body.siavce-view-marketing .marketing-detail-card{
  min-height:100%;
}

body.siavce-view-marketing .destination-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

body.siavce-view-marketing .destination-card{
  padding:16px;
  border-radius:20px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.1);
}

body.siavce-view-marketing .destination-select{
  min-height:168px;
  background:rgba(15,23,42,.42);
}

/* Panel avanzado */
body.siavce-view-mipanel2 .panel2-shell{
  width:min(1540px,calc(100vw - 28px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

body.siavce-view-mipanel2 .panel2-hero,
body.siavce-view-mipanel2 .panel2-card,
body.siavce-view-mipanel2 .chart-box,
body.siavce-view-mipanel2 .stat-card{
  border-radius:26px;
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-mipanel2 .panel2-hero{
  padding:24px;
  background:linear-gradient(165deg,rgba(9,18,34,.94),rgba(16,33,54,.9));
}

body.siavce-view-mipanel2 .panel2-grid{
  display:grid;
  grid-template-columns:minmax(360px,.38fr) minmax(0,1fr);
  gap:18px;
  align-items:start;
}

body.siavce-view-mipanel2 .panel2-card{
  padding:20px;
  background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.045));
}

body.siavce-view-mipanel2 .filter-grid{
  display:grid;
  gap:14px;
}

body.siavce-view-mipanel2 .stat-grid,
body.siavce-view-mipanel2 .charts-grid{
  display:grid;
  gap:16px;
}

body.siavce-view-mipanel2 .stat-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

body.siavce-view-mipanel2 .charts-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

body.siavce-view-mipanel2 .stat-card,
body.siavce-view-mipanel2 .chart-box{
  padding:18px;
  background:rgba(255,255,255,.05);
}

body.siavce-view-mipanel2 .table-card{
  margin-top:18px;
}

/* Logout */
body.siavce-logout-screen .logout-shell{
  width:min(560px,calc(100vw - 32px));
  padding:30px 28px;
  border-radius:28px;
  background:linear-gradient(145deg,rgba(255,255,255,.12),rgba(255,255,255,.05));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:var(--siavce-shadow);
  text-align:center;
}

body.siavce-logout-screen .logout-mark{
  width:76px;
  height:76px;
  margin:0 auto 16px;
  display:grid;
  place-items:center;
  border-radius:22px;
  background:linear-gradient(135deg,var(--siavce-primary),var(--siavce-success));
  color:#fff;
  font-weight:900;
  font-size:1.35rem;
}

body.siavce-logout-screen .logout-bar{
  height:10px;
  margin-top:18px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.08);
}

body.siavce-logout-screen .logout-bar span{
  display:block;
  width:100%;
  height:100%;
  background:linear-gradient(90deg,var(--siavce-primary),var(--siavce-success),var(--siavce-danger));
  animation:siavce-logout-progress 1.6s ease infinite;
}

@keyframes siavce-logout-progress{
  0%{transform:translateX(-100%);}
  100%{transform:translateX(100%);}
}

/* Chats de marketing */
body.siavce-view-marketing_chats .marketing-chat-shell{
  width:min(1480px,calc(100vw - 32px));
  margin:0 auto;
}

body.siavce-view-marketing_chats .siavce-chat-app{
  grid-template-columns:280px 360px minmax(0,1fr);
}

body.siavce-view-marketing_chats .chat-main-panel{
  min-height:72vh;
}

body.siavce-view-marketing_chats .chat-composer{
  margin-top:auto;
}

/* Productos */
body.siavce-view-productos .products-page-shell{
  width:min(1440px,calc(100vw - 32px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

body.siavce-view-productos .products-page-head,
body.siavce-view-productos .products-panel{
  padding:22px;
  border-radius:26px;
  background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.045));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-productos .product-card-thumb{
  width:100%;
  max-height:220px;
  object-fit:contain;
  padding:14px;
  border-radius:22px;
  background:rgba(255,255,255,.05);
}

body.siavce-view-productos .product-thumb{
  width:84px;
  height:84px;
  object-fit:contain;
  border-radius:16px;
  background:rgba(255,255,255,.05);
  padding:8px;
}

body.siavce-view-productos .product-main-preview{
  width:100%;
  max-height:320px;
  object-fit:contain;
}

body.siavce-view-productos .product-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:1400;
  display:none;
  align-items:center;
  justify-content:center;
  padding:22px;
  background:rgba(2,6,23,.72);
  backdrop-filter:blur(12px);
}

body.siavce-view-productos .product-modal{
  width:min(1220px,calc(100vw - 34px));
  max-height:min(900px,calc(100vh - 34px));
  overflow:auto;
  padding:24px;
  color:#f8fafc;
  background:linear-gradient(145deg,rgba(15,23,42,.96),rgba(30,41,59,.92));
  border:1px solid rgba(255,255,255,.16);
  border-radius:24px;
  box-shadow:0 30px 90px rgba(0,0,0,.42);
}

body.siavce-view-productos .product-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:18px 0;
  padding-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.12);
}

body.siavce-view-productos .product-tab-btn{
  padding:10px 16px;
  border-radius:999px;
  color:#f8fafc;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  font-weight:800;
}

body.siavce-view-productos .product-tab-btn.active{
  background:linear-gradient(135deg,color-mix(in srgb,var(--siavce-primary,#2563eb) 95%,transparent),color-mix(in srgb,var(--siavce-secondary,#0f2742) 86%,transparent));
  border-color:rgba(255,255,255,.22);
}

body.siavce-view-productos .product-tab-pane{
  display:none;
}

body.siavce-view-productos .product-tab-pane.active{
  display:block;
}

body.siavce-view-productos .product-preview-grid{
  display:grid;
  grid-template-columns:minmax(240px,320px) minmax(0,1fr);
  gap:18px;
  margin-bottom:18px;
}

body.siavce-view-productos .product-preview-card{
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}

body.siavce-view-productos .product-gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(86px,1fr));
  gap:10px;
  margin-top:12px;
}

body.siavce-view-productos .store-edit-gallery img,
body.siavce-view-productos .product-gallery img{
  max-width:100%;
  max-height:110px;
  object-fit:cover;
  border-radius:14px;
}

body.siavce-view-productos.store-edit-open{
  overflow:hidden;
}

body.siavce-view-productos .store-edit{
  position:fixed!important;
  inset:0!important;
  z-index:1420!important;
  display:none!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  padding:22px!important;
  border:0!important;
  border-radius:0!important;
  background:rgba(2,6,23,.72)!important;
  backdrop-filter:blur(12px);
}

body.siavce-view-productos .store-edit.active{
  display:flex!important;
}

body.siavce-view-productos .store-edit-dialog{
  width:min(1180px,calc(100vw - 34px));
  max-height:min(880px,calc(100vh - 34px));
  overflow:auto;
  padding:22px;
  border-radius:24px;
  color:#f8fafc;
  background:linear-gradient(145deg,rgba(15,23,42,.96),rgba(30,41,59,.92));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 30px 90px rgba(0,0,0,.42);
}

body.siavce-view-productos .store-edit-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(255,255,255,.12);
}

body.siavce-view-productos .store-edit-eyebrow,
body.siavce-view-tienda_admin .store-config-eyebrow{
  display:inline-flex;
  width:fit-content;
  margin-bottom:8px;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(34,197,94,.14);
  color:#bbf7d0;
  font-size:.74rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.06em;
}

body.siavce-view-productos .store-edit-head small{
  display:block;
  max-width:760px;
  color:rgba(248,250,252,.68);
}

body.siavce-view-productos .store-edit .row{
  margin:0;
}

body.siavce-view-tienda_admin .store-config-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}

body.siavce-view-tienda_admin .store-config-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}

body.siavce-view-tienda_admin .store-config-modal .modal-content,
body.siavce-view-tienda_admin .store-modal-content{
  color:#f8fafc;
  background:linear-gradient(145deg,rgba(15,23,42,.98),rgba(30,41,59,.94));
  border:1px solid rgba(255,255,255,.16);
  border-radius:24px;
  box-shadow:0 30px 90px rgba(0,0,0,.42);
}

body.siavce-view-tienda_admin .store-config-modal{
  z-index:1555!important;
}

body.siavce-view-tienda_admin.modal-open .modal-backdrop,
body.modal-open:has(.store-config-modal.show) .modal-backdrop{
  z-index:1540!important;
}

body.siavce-view-tienda_admin .store-config-modal .modal-header,
body.siavce-view-tienda_admin .store-config-modal .modal-footer{
  border-color:rgba(255,255,255,.12);
}

body.siavce-view-tienda_admin .store-config-modal .modal-body{
  padding:22px;
}

body.siavce-view-tienda_personalizacion .layout-store{
  display:grid;
  grid-template-columns:minmax(430px,620px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}

body.siavce-view-tienda_personalizacion .glass-block{
  min-width:0;
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,255,255,.10),rgba(255,255,255,.05));
  border:1px solid rgba(255,255,255,.14);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-tienda_personalizacion #tabsTiendaSimple{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
}

body.siavce-view-tienda_personalizacion #tabsTiendaSimple .nav-link{
  min-height:46px;
  white-space:normal;
}

body.siavce-view-tienda_personalizacion .tab-content{
  max-height:calc(100vh - 340px);
  min-height:420px;
  overflow:auto;
  padding-right:4px;
}

body.siavce-view-tienda_personalizacion .preview-frame{
  width:100%;
  height:min(720px,calc(100vh - 260px));
  border:0;
  border-radius:18px;
  background:#fff;
}

body.siavce-view-tienda_personalizacion .mini-preview{
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
}

@media (max-width:720px){
  body.siavce-view-productos .store-edit{
    padding:10px!important;
  }

  body.siavce-view-productos .store-edit-dialog{
    width:min(100%,calc(100vw - 20px));
    max-height:calc(100vh - 20px);
    padding:16px;
    border-radius:18px;
  }

  body.siavce-view-productos .product-modal-backdrop{
    padding:10px;
  }

  body.siavce-view-productos .product-modal{
    width:min(100%,calc(100vw - 20px));
    max-height:calc(100vh - 20px);
    padding:16px;
    border-radius:18px;
  }

  body.siavce-view-productos .product-preview-grid{
    grid-template-columns:1fr;
  }

  body.siavce-view-productos .store-edit-head,
  body.siavce-view-tienda_admin .store-config-summary{
    flex-direction:column;
    align-items:flex-start;
  }

  body.siavce-view-tienda_admin .store-config-actions{
    width:100%;
    justify-content:flex-start;
  }

  body.siavce-view-tienda_personalizacion .layout-store{
    grid-template-columns:1fr;
  }

  body.siavce-view-tienda_personalizacion .tab-content{
    max-height:none;
  }
}

/* Usuarios */
body.siavce-view-seg_usuarios .usuarios-shell{
  width:min(1400px,calc(100vw - 32px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

body.siavce-view-seg_usuarios .usuarios-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:16px;
}

body.siavce-view-seg_usuarios .usuario-card{
  display:grid;
  gap:14px;
  min-height:100%;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(145deg,rgba(255,255,255,.09),rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-seg_usuarios .usuario-avatar{
  width:72px;
  height:72px;
  border-radius:22px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.12);
}

/* Yo / perfil */
body.siavce-view-yo .yo-shell{
  width:min(1280px,calc(100vw - 32px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

body.siavce-view-yo .yo-grid,
body.siavce-view-yo .yo-info-grid{
  display:grid;
  gap:18px;
}

body.siavce-view-yo .yo-grid{
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
}

body.siavce-view-yo .yo-card{
  padding:22px;
  border-radius:26px;
  background:linear-gradient(145deg,rgba(255,255,255,.1),rgba(255,255,255,.045));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-yo .cover-photo{
  width:100%;
  height:220px;
  object-fit:cover;
}

body.siavce-view-yo .profile-picture{
  width:144px;
  height:144px;
  object-fit:cover;
}

/* Panel avanzado y dashboard */
body.siavce-view-dashboard .dash-icon,
body.siavce-view-dashboard .dash-mini-icon,
body.siavce-view-mipanel2 .panel2-icon,
body.siavce-view-mipanel2 .panel2-title img{
  max-width:100%;
  max-height:72px;
  object-fit:contain;
}

.siavce-empty-state{
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.05);
  border:1px dashed rgba(255,255,255,.16);
  color:var(--siavce-muted);
}

/* Ajustes */
body.siavce-view-ajustes .ajustes-page-shell{
  width:min(1280px,calc(100vw - 32px));
  margin:0 auto;
  display:grid;
  gap:18px;
}

body.siavce-view-ajustes .settings-shell{
  display:grid;
  gap:18px;
}

body.siavce-view-ajustes .settings-header{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);
  gap:18px;
}

body.siavce-view-ajustes .settings-hero,
body.siavce-view-ajustes .ajustes-main-card,
body.siavce-view-ajustes .admin-card,
body.siavce-view-ajustes .security-device{
  border-radius:24px;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--siavce-shadow);
}

body.siavce-view-ajustes .settings-hero{
  padding:24px;
  background:linear-gradient(165deg,rgba(9,18,34,.94),rgba(16,33,54,.9));
}

body.siavce-view-ajustes .settings-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

body.siavce-view-ajustes .settings-kpi{
  padding:18px;
  border-radius:20px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
}

body.siavce-view-ajustes .settings-kpi small{
  display:block;
  color:var(--siavce-muted);
  text-transform:uppercase;
  letter-spacing:.06em;
}

body.siavce-view-ajustes .settings-kpi strong{
  display:block;
  margin-top:8px;
  font-size:1.35rem;
}

body.siavce-view-ajustes .ajustes-main-card{
  overflow:hidden;
}

body.siavce-view-ajustes #ajustesTabs{
  gap:10px;
  row-gap:12px;
}

body.siavce-view-ajustes #ajustesTabs .nav-link{
  height:100%;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.05);
  color:var(--siavce-text);
}

body.siavce-view-ajustes #ajustesTabs .nav-link.active{
  background:rgba(37,99,235,.22);
  border-color:rgba(96,165,250,.4);
}

body.siavce-view-ajustes .security-qr{
  width:min(220px,100%);
  margin:0 auto;
}

body.siavce-view-ajustes .security-qr img,
body.siavce-view-ajustes #previewPerfil,
body.siavce-view-ajustes #previewPortada,
body.siavce-view-ajustes .admin-card img{
  max-width:100%;
  height:auto;
}

body.siavce-view-ajustes #previewPerfil{
  width:160px;
  height:160px;
  object-fit:cover;
}

body.siavce-view-ajustes .table-responsive{
  border-radius:20px;
}

/* Marketing */
body.siavce-view-marketing .marketing-shell{
  width:min(1440px,calc(100vw - 32px));
  margin:0 auto;
  overflow-x:clip;
}

body.siavce-view-marketing img{
  max-width:100%;
  height:auto;
}

.marketing-shell{
  display:grid;
  gap:18px;
}

.marketing-hero{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);
  gap:16px;
  align-items:start;
}

.marketing-hero-card{
  padding:24px;
  border-radius:26px;
  background:linear-gradient(165deg,rgba(9,18,34,.94),rgba(16,33,54,.9));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--siavce-shadow);
}

.marketing-title{
  font-size:clamp(1.8rem,2.4vw,2.5rem);
}

.marketing-pills,
.tool-row,
.destination-status-pills{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.marketing-pill,
.badge-state,
.destination-status-pill,
.preview-account-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  font-size:.82rem;
}

.marketing-grid{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);
  gap:18px;
  align-items:start;
}

.stack{
  display:grid;
  gap:14px;
}

.kpi{
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.1);
}

.kpi strong{
  display:block;
  font-size:1.7rem;
  line-height:1.05;
}

.destination-grid,
.source-grid,
.preview-layout{
  display:grid;
  gap:12px;
}

.destination-grid{
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
}

.preview-layout{
  grid-template-columns:repeat(auto-fit,minmax(280px,360px));
  justify-content:center;
}

.preview-panel,
.preview-shell{
  border-radius:22px;
}

.post-list{
  display:grid;
  gap:12px;
  max-height:520px;
  overflow:auto;
}

.post-item{
  padding:12px;
  border-radius:18px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.1);
}

.post-item-compact{
  display:grid;
  grid-template-columns:68px 1fr;
  gap:12px;
}

.post-thumb{
  width:68px;
  height:68px;
  border-radius:16px;
  overflow:hidden;
  background:rgba(255,255,255,.07);
}

.marketing-detail-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0 8px;
}

.marketing-detail-table td{
  background:rgba(255,255,255,.05);
}

/* Chats */
.marketing-chat-shell{
  display:grid;
  gap:18px;
}

.siavce-chat-app{
  display:grid;
  grid-template-columns:300px 360px minmax(0,1fr);
  gap:14px;
}

.glass-list{
  display:grid;
  gap:10px;
}

.glass-account-item,
.glass-conversation-item,
.chat-guide-step,
.chat-file-chip,
.chat-upload-box{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.06);
}

.glass-account-item,
.glass-conversation-item{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  padding:12px;
  text-decoration:none;
}

.glass-account-item.active,
.glass-conversation-item.active{
  background:rgba(37,99,235,.18);
  border-color:rgba(96,165,250,.4);
}

.chat-messages-area{
  min-height:420px;
  max-height:68vh;
  overflow:auto;
  display:grid;
  gap:10px;
}

.chat-bubble-row{
  display:flex;
}

.chat-bubble-row.mine{
  justify-content:flex-end;
}

.chat-bubble{
  max-width:min(72ch,90%);
  padding:12px 14px;
  border-radius:18px;
  background:rgba(255,255,255,.08);
}

.chat-bubble-row.mine .chat-bubble{
  background:rgba(37,99,235,.22);
}

.chat-composer-box{
  display:grid;
  gap:12px;
}

.chat-composer-toolbar{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.chat-upload-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.chat-upload-box{
  position:relative;
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
}

.chat-upload-box input{
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}

.chat-selected-files{
  display:none;
  gap:8px;
  flex-wrap:wrap;
}

.chat-media-lightbox{
  display:none;
}

.chat-media-lightbox.open{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  background:rgba(2,6,23,.82);
  z-index:1040;
}

/* Tickets */
body.siavce-view-tickets .support-dashboard{
  width:min(1400px,calc(100vw - 32px));
  margin:0 auto;
}

.support-dashboard{
  display:grid;
  gap:18px;
}

.support-hero{
  padding:22px;
  border-radius:26px;
  background:linear-gradient(165deg,rgba(9,18,34,.94),rgba(16,33,54,.9));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:var(--siavce-shadow);
}

.support-title{
  font-size:clamp(1.8rem,2.2vw,2.35rem);
}

.metric-link{
  text-decoration:none;
}

.metric-label{
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:var(--siavce-muted-2);
}

.metric-value{
  font-size:1.7rem;
  font-weight:800;
}

.metric-hint{
  font-size:.82rem;
  color:var(--siavce-muted);
}

.progress-soft{
  margin-top:10px;
  height:7px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,.12);
}

.progress-soft span{
  display:block;
  height:100%;
  width:0;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--siavce-primary),#fff);
}

.progress-warning span{background:linear-gradient(90deg,var(--siavce-warning),#facc15);}
.progress-success span{background:linear-gradient(90deg,var(--siavce-success),#4ade80);}

.badge-soft{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
}

.badge-priority{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-weight:700;
  background:rgba(255,255,255,.08);
}

.btn-view{
  background:rgba(255,255,255,.08);
  color:#fff;
  border-color:rgba(255,255,255,.16);
}

.client-item{
  padding:14px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.client-item:last-child{
  border-bottom:0;
}

/* Páginas públicas y tienda */
.store-public-page,
.store-legal-page,
.store-product-page,
.shipment-tracking-page,
.support-ticket-public{
  min-height:100vh;
  font-family:var(--siavce-font);
  color:var(--siavce-text);
}

.store-public-page .wrap,
.store-legal-page .wrap,
.store-product-page .wrap,
.shipment-tracking-page .wrap,
.support-ticket-public .wrap{
  width:min(1200px,calc(100vw - 24px));
  margin:0 auto;
  padding:24px 0 36px;
}

.store-public-page .card,
.store-legal-page .card,
.shipment-tracking-page .card{
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.16);
  border-radius:22px;
  color:#fff;
}

.store-product-page .product,
.store-product-page .details{
  display:grid;
  gap:18px;
}

.store-product-page .product{
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
}

/* Compatibilidad legacy */
.barranavleft,
#sidemenu{
  display:none !important;
}

.siavce-footer-version{
  pointer-events:none;
  color:rgba(248,250,252,.5);
  font-size:.76rem;
}

.rounded-circle{
  object-fit:cover;
}

[data-siavce-width-value]{
  width:calc(attr(data-siavce-width-value number) * 1%);
}

@supports not (width:calc(attr(data-siavce-width-value number) * 1%)){
  [data-siavce-width-value]{
    width:var(--siavce-progress-width,0%);
  }
}

/* Responsive */
@media (max-width:1200px){
  .siavce-chat-app,
  .marketing-grid,
  .marketing-hero,
  body.siavce-view-marketing .marketing-composer-layout,
  body.siavce-view-citascalendario .calendar-layout,
  body.siavce-view-yo .yo-grid,
  body.siavce-view-mipanel2 .panel2-grid,
  .store-product-page .product{
    grid-template-columns:1fr;
  }

  body.siavce-view-marketing .marketing-composer-form{
    grid-template-columns:1fr;
  }

  body.siavce-view-marketing .marketing-preview-column{
    grid-column:auto;
    grid-row:auto;
  }

  body.siavce-view-marketing .marketing-grid > .stack:last-child,
  body.siavce-view-mipanel2 .charts-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:992px){
  .siavce-grid-2,
  .siavce-grid-3{
    grid-template-columns:1fr;
  }

  .siavce-login-layout{
    grid-template-columns:1fr;
  }

  .ribbon-tools.active{
    max-height:120px;
  }

  body.siavce-ribbon-open{
    --siavce-ribbon-height:128px;
  }

  body.siavce-view-dashboard .dash-hero,
  body.siavce-view-dashboard .content-grid,
  body.siavce-view-dashboard .charts-grid,
  body.siavce-view-dashboard_cliente .cliente-grid-2,
  body.siavce-view-ajustes .settings-header,
  body.siavce-view-ajustes .settings-kpis,
  body.siavce-view-mipanel2 .stat-grid,
  .siavce-page-hero-grid{
    grid-template-columns:1fr;
  }

  body.siavce-view-dashboard .dash-hero-side,
  .siavce-page-kpis{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:768px){
  :root{
    --siavce-page-width:min(100vw - 20px,100%);
    --siavce-page-gap:16px;
  }

  .ribbon-tabs{
    gap:6px;
    padding:0 10px;
  }

  .ribbon-tab{
    min-height:36px;
    padding:0 12px;
    font-size:.84rem;
  }

  .tool-btn{
    min-width:82px;
    min-height:52px;
    font-size:.76rem;
  }

  .siavce-page-shell,
  .siavce-page{
    width:min(100vw - 20px,100%);
  }

  .support-hero,
  .marketing-hero-card,
  .siavce-login-card,
  .siavce-login-welcome,
  .login-status,
  .login-container{
    padding:18px;
  }

  .chat-composer-toolbar,
  .siavce-actions-row{
    flex-direction:column;
    align-items:stretch;
  }

  body.siavce-view-dashboard .dash-shell,
  body.siavce-view-clientes .clientes-shell,
  body.siavce-view-ajustes .ajustes-page-shell,
  body.siavce-view-marketing .marketing-shell,
  body.siavce-view-citascalendario .siavce-page-shell,
  body.siavce-view-dashboard_cliente .cliente-dashboard-page,
  body.siavce-view-productos .products-page-shell,
  body.siavce-view-seg_usuarios .usuarios-shell,
  body.siavce-view-yo .yo-shell,
  body.siavce-view-mipanel2 .panel2-shell,
  body.siavce-view-marketing_chats .marketing-chat-shell,
  body.siavce-view-tickets .support-dashboard{
    width:min(100vw - 20px,100%);
  }

  body.siavce-view-dashboard .dash-hero-side,
  .siavce-page-kpis,
  .siavce-filter-grid,
  body.siavce-view-clientes .siavce-entity-body{
    grid-template-columns:1fr;
  }

  body.siavce-view-citascalendario .calendar-grid{
    min-width:840px;
  }

  body.siavce-view-citascalendario .day-cell,
  body.siavce-view-citascalendario .empty-cell{
    min-height:132px;
  }
}
