/* =========================================================
   ShekaPan - Tableros Producción (styles.css)
   Diseño moderno con paleta oficial basada en logo/mascota
   ========================================================= */

:root{
  --bg:#f7f4ea;
  --bg-soft:#fffaf0;
  --card:#ffffff;
  --surface:#fffdf7;
  --text:#101827;
  --text-soft:#374151;
  --muted:#6b7280;
  --border:rgba(58,42,20,.14);
  --border-strong:rgba(58,42,20,.24);

  --brand-red:#E91E2F;
  --brand-red-dark:#B91524;
  --brand-yellow:#FFE600;
  --brand-yellow-dark:#F4C400;
  --brand-brown:#8A641F;
  --brand-brown-dark:#3A2A14;
  --brand-cream:#FFF3C4;
  --brand-blue-soft:#D9F4FF;

  --ok:#16A34A;
  --info:#2563EB;
  --warn:#F59E0B;
  --danger:#DC2626;
  --purple:#7C3AED;

  --radius-sm:10px;
  --radius:16px;
  --radius-lg:22px;
  --shadow-sm:0 4px 12px rgba(58,42,20,.08);
  --shadow:0 14px 34px rgba(58,42,20,.14);
  --shadow-lg:0 24px 70px rgba(58,42,20,.22);

  --postit:#fff5a8;
  --postit-border:rgba(138,100,31,.22);
  --tape:rgba(233,30,47,.18);
}

*{ box-sizing:border-box; }
html, body{ min-height:100%; }

body{
  margin:0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,230,0,.18), transparent 28rem),
    radial-gradient(circle at top right, rgba(233,30,47,.10), transparent 26rem),
    linear-gradient(180deg, #fffaf0 0%, #f7f4ea 48%, #f6f7fb 100%);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

a{ color:inherit; }

/* =========================
   Topbar / navegación
   ========================= */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  min-height:62px;
  padding:12px 20px;
  background:
    linear-gradient(90deg, var(--brand-brown-dark) 0%, #1f2937 42%, var(--brand-red-dark) 100%);
  color:#fff;
  box-shadow:0 8px 24px rgba(16,24,39,.22);
  border-bottom:4px solid var(--brand-yellow);
  position:sticky;
  top:0;
  z-index:1000;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:1000;
  letter-spacing:.4px;
  text-transform:uppercase;
  line-height:1;
}

.brand::before{
  content:"";
  width:14px;
  height:14px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--brand-yellow), #fff 70%);
  box-shadow:0 0 0 3px rgba(255,230,0,.18);
}

.userbox{
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap;
  font-size:13px;
  font-weight:800;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.nav-group{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.nav-title{
  font-weight:900;
  font-size:12px;
  opacity:.78;
  margin-right:2px;
}

.link,
.topbar a{
  color:#fff;
  text-decoration:none;
  font-weight:900;
  border-radius:999px;
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
}

.link:hover,
.topbar a:hover{
  background:rgba(255,255,255,.18);
  text-decoration:none;
}

/* =========================
   Layout base
   ========================= */
.container{
  width:min(1500px, 100%);
  margin:0 auto;
  padding:22px;
}

.page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  margin:2px 0 16px;
  padding:18px 20px;
  background:rgba(255,255,255,.72);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
  backdrop-filter:blur(8px);
}

.page-head h1{
  margin:0 0 4px 0;
  font-size:clamp(24px, 3vw, 36px);
  line-height:1.05;
  letter-spacing:-.03em;
  color:var(--brand-brown-dark);
}

.hint{
  color:var(--muted);
  margin:0;
  font-size:14px;
  font-weight:650;
}

label{
  display:inline-block;
  font-size:12px;
  color:var(--text-soft);
  font-weight:900;
  margin-bottom:5px;
}

input,
select,
textarea{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border-strong);
  background:#fff;
  color:var(--text);
  outline:none;
  font:inherit;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input:focus,
select:focus,
textarea:focus{
  border-color:rgba(233,30,47,.55);
  box-shadow:0 0 0 4px rgba(233,30,47,.10);
  background:#fff;
}

button,
.button{
  padding:10px 14px;
  border:0;
  border-radius:12px;
  background:linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color:#fff;
  font-weight:1000;
  cursor:pointer;
  font:inherit;
  box-shadow:0 6px 16px rgba(233,30,47,.18);
  transition:transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

button:hover,
.button:hover{
  transform:translateY(-1px);
  filter:brightness(1.04);
  box-shadow:0 10px 22px rgba(233,30,47,.22);
}

button:active{ transform:translateY(0); }

/* =========================
   Filtros superiores
   ========================= */
.day-filter{
  margin:0 0 14px;
  display:flex;
  gap:12px;
  align-items:end;
  flex-wrap:wrap;
  padding:14px;
  background:rgba(255,255,255,.70);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-sm);
}

.day-filter > div{ min-width:160px; }
.day-filter input,
.day-filter select{ width:100%; }

.day-filter .dir-search{
  flex:1;
  min-width:420px;
}

.check{
  display:flex;
  gap:8px;
  align-items:center;
  margin:0 4px 8px;
  font-size:13px;
  font-weight:900;
  color:var(--text-soft);
}

.check input{ width:auto; }

/* =========================
   Login
   ========================= */
.login-page{
  min-height:calc(100vh - 96px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:36px 16px;
}

.login-card{
  width:min(430px, 94vw);
  background:rgba(255,255,255,.92);
  border:1px solid var(--border);
  border-radius:26px;
  box-shadow:var(--shadow-lg);
  padding:36px 30px 30px;
  position:relative;
  overflow:hidden;
}

.login-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:8px;
  background:linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--brand-brown));
}

.login-card h1{
  margin:0 0 24px;
  font-size:34px;
  line-height:1.1;
  letter-spacing:-.04em;
  color:var(--brand-brown-dark);
}

.login-form{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.login-field{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.login-field label{
  font-size:13px;
  font-weight:950;
  color:var(--brand-brown-dark);
}

.login-field input{
  width:100%;
  height:44px;
  border-radius:14px;
  font-size:15px;
}

.login-button{
  margin-top:6px;
  width:100%;
  height:46px;
  border-radius:15px;
  background:linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  color:#fff;
  font-weight:1000;
}

.login-error,
.error{
  margin-bottom:16px;
  padding:11px 13px;
  border-radius:12px;
  background:#fee2e2;
  border:1px solid #fecaca;
  color:#991b1b;
  font-size:14px;
  font-weight:850;
}

/* Compatibilidad con login viejo */
.login-card form:not(.login-form){
  display:flex;
  flex-direction:column;
  gap:14px;
}
.login-card form:not(.login-form) label{ display:block; }
.login-card form:not(.login-form) input{ width:100%; }

/* =========================
   KPI / pills
   ========================= */
.kpi-row,
.kpi-strip{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:10px 0 14px;
}

.kpi,
.kpi-strip .pill{
  background:rgba(255,255,255,.78);
  border:1px solid var(--border);
  border-radius:999px;
  padding:8px 13px;
  font-size:13px;
  font-weight:900;
  color:var(--text-soft);
  box-shadow:0 3px 10px rgba(58,42,20,.05);
}

.kpi b,
.kpi-strip .pill b{ color:var(--brand-brown-dark); }

/* =========================
   View tabs
   ========================= */
.view-tabs{
  display:flex;
  gap:10px;
  margin:10px 0 14px;
  flex-wrap:wrap;
}

.view-tabs .tab,
.tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:36px;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  text-decoration:none;
  color:var(--brand-brown-dark);
  background:rgba(255,255,255,.72);
  font-weight:1000;
  box-shadow:0 3px 10px rgba(58,42,20,.05);
}

.view-tabs .tab:hover,
.tab:hover{
  background:#fff;
  border-color:rgba(233,30,47,.32);
}

.view-tabs .tab.active{
  color:#fff;
  background:linear-gradient(135deg, var(--brand-red), var(--brand-red-dark));
  border-color:transparent;
  box-shadow:0 8px 20px rgba(233,30,47,.18);
}

/* =========================
   Board / PostIt
   ========================= */
.board-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin:6px 0 12px;
  flex-wrap:wrap;
  gap:10px;
}

.counter{
  font-size:13px;
  font-weight:950;
  color:var(--text-soft);
}

.board{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(330px, 1fr));
  gap:18px;
  align-items:start;
}

.board > p{
  grid-column:1 / -1;
  background:rgba(255,255,255,.72);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:18px;
  color:var(--muted);
  font-weight:800;
}

.postit{
  background:
    linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0)),
    var(--postit);
  border:1px solid var(--postit-border);
  border-radius:20px;
  padding:20px 15px 14px;
  box-shadow:0 14px 30px rgba(138,100,31,.16);
  transform:rotate(-.22deg);
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  position:relative;
  overflow:visible;
}

.postit:nth-child(3n){ transform:rotate(.18deg); }

.postit:hover{
  transform:rotate(0deg) translateY(-3px);
  box-shadow:0 18px 42px rgba(138,100,31,.22);
  border-color:rgba(138,100,31,.34);
}

.postit::before{
  content:"";
  position:absolute;
  top:-9px;
  left:18px;
  width:76px;
  height:19px;
  background:linear-gradient(135deg, rgba(233,30,47,.20), rgba(255,230,0,.16));
  border:1px solid rgba(58,42,20,.10);
  border-radius:14px;
  transform:rotate(-3deg);
}

.tape-label{
  position:absolute;
  top:-9px;
  left:18px;
  z-index:2;
  padding:4px 12px;
  border-radius:14px;
  font-size:12px;
  font-weight:1000;
  border:1px solid rgba(58,42,20,.14);
  box-shadow:0 3px 8px rgba(58,42,20,.10);
  color:var(--brand-brown-dark);
}

.postit-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:8px;
}

.postit .title{
  font-weight:1000;
  letter-spacing:.2px;
  font-size:16px;
  line-height:1.18;
  color:var(--brand-brown-dark);
}

.postit-datebox{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:5px;
  min-width:120px;
}

.postit .time{
  font-size:12px;
  font-weight:1000;
  color:var(--brand-brown-dark);
  background:rgba(255,255,255,.72);
  border:1px solid rgba(58,42,20,.12);
  padding:4px 9px;
  border-radius:999px;
  white-space:nowrap;
}

.status-row{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin:9px 0 10px;
}

.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  line-height:1.2;
  background:rgba(255,255,255,.74);
  border:1px solid rgba(58,42,20,.13);
  color:var(--brand-brown-dark);
  text-decoration:none;
  font-weight:800;
}

.badge b{ font-weight:1000; }

.badge-link{
  background:rgba(255,255,255,.92);
  border-color:rgba(58,42,20,.16);
  cursor:pointer;
}

.badge-link:hover{
  background:#fff;
  border-color:rgba(233,30,47,.28);
}

.badge-slide{
  color:#1d4ed8;
  font-weight:1000;
  border-color:rgba(37,99,235,.24);
  background:rgba(239,246,255,.90);
}

.postit-detail-line{
  margin-top:11px;
  padding-top:9px;
  border-top:1px dashed rgba(58,42,20,.18);
}

.postit-detail-line:first-of-type{
  border-top:0;
  padding-top:0;
}

.postit-product-line{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:6px;
  font-size:15px;
  line-height:1.35;
  margin:6px 0 7px;
  color:var(--text);
}

.postit-product-line b{ font-weight:1000; }

.product-image-btn{
  margin-left:2px;
  border:1px solid rgba(233,30,47,.18);
  cursor:pointer;
  font:inherit;
  background:rgba(255,255,255,.92);
  color:var(--brand-red-dark);
  box-shadow:none;
  padding:5px 10px;
}

.product-image-btn:hover{
  transform:translateY(-1px);
  background:#fff;
  box-shadow:0 6px 12px rgba(233,30,47,.12);
}

.details{ margin-top:6px; }

.details summary{
  cursor:pointer;
  font-weight:1000;
  color:var(--brand-brown-dark);
  margin:8px 0;
  user-select:none;
}

.details summary:hover{ color:var(--brand-red-dark); }
.combo-details summary{ color:#1d4ed8; }

.postit-attrs{
  display:grid;
  gap:4px;
  margin:7px 0 9px;
  font-size:12px;
  line-height:1.35;
  color:var(--text-soft);
}

.postit-attrs b{
  font-weight:1000;
  color:var(--brand-brown-dark);
}

.detail-box{
  margin:8px 0;
  padding:10px 11px;
  border-radius:13px;
  background:rgba(255,255,255,.66);
  border:1px solid rgba(58,42,20,.13);
  font-size:12px;
}

.detail-box b{
  font-weight:1000;
  color:var(--brand-brown-dark);
}

.detail-text{
  margin-top:5px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:normal;
  text-align:left;
  line-height:1.38;
}

.detail-pre{
  margin:8px 0 0;
  padding:10px;
  border-radius:12px;
  background:rgba(255,255,255,.70);
  border:1px dashed rgba(58,42,20,.22);
  font-size:12px;
  max-height:280px;
  overflow:auto;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  word-break:normal;
  overflow-x:hidden;
}

.combo-subdetalle{
  margin-top:6px;
  display:grid;
  gap:6px;
}

.combo-row{
  font-size:12px;
  line-height:1.35;
  background:rgba(255,255,255,.60);
  border-radius:11px;
  padding:8px 9px;
  border:1px solid rgba(58,42,20,.10);
}

.combo-product-line b,
.combo-weight-line b{ font-weight:1000; }

.combo-weight-line{
  margin-top:3px;
  color:var(--text-soft);
}

.delivery-pill{
  font-size:12px;
  color:var(--brand-brown-dark);
  border:1px solid rgba(58,42,20,.10);
  padding:4px 10px;
  border-radius:999px;
  white-space:nowrap;
  font-weight:950;
}

.delivery-recoge{
  background:rgba(46,125,91,.16);
  border-color:rgba(46,125,91,.30);
  color:#1f5f45;
}

.delivery-domicilio{
  background:rgba(37,99,235,.14);
  border-color:rgba(37,99,235,.30);
  color:#1d4ed8;
}

.logistics,
.logistics-details{ margin-top:10px; }

.logistics-links{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:8px;
}

.blocked{
  margin-top:10px;
  padding:10px;
  border-radius:13px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(220,38,38,.35);
  color:#991b1b;
  font-size:13px;
}

/* Formulario de estado */
.mini-form,
.estado-form{
  display:grid;
  gap:8px;
  margin-top:11px;
  padding-top:10px;
  border-top:1px dashed rgba(58,42,20,.16);
}

.estado-form .form-row,
.mini-form .form-row{
  display:grid;
  gap:5px;
  margin-bottom:0;
}

.estado-form label,
.mini-form label{
  font-size:12px;
  font-weight:950;
}

.estado-form select,
.estado-form input,
.mini-form select,
.mini-form input{
  width:100%;
  box-sizing:border-box;
  border-radius:12px;
  border:1px solid rgba(58,42,20,.18);
  padding:8px 10px;
  font-size:13px;
  background:rgba(255,255,255,.82);
}

.estado-form button,
.mini-form button{
  width:100%;
  margin-top:4px;
  border-radius:12px;
  padding:9px 10px;
}

/* Colores por estado */
.estado-pendiente,
.tape-label.estado-pendiente{
  background:rgba(255,230,0,.42);
  border-color:rgba(244,196,0,.52);
}

.estado-en_proceso,
.tape-label.estado-en_proceso{
  background:rgba(37,99,235,.18);
  border-color:rgba(37,99,235,.32);
}

.estado-bloqueado,
.estado-con_problemas,
.tape-label.estado-bloqueado,
.tape-label.estado-con_problemas{
  background:rgba(233,30,47,.18);
  border-color:rgba(233,30,47,.35);
}

.estado-terminado,
.tape-label.estado-terminado{
  background:rgba(22,163,74,.18);
  border-color:rgba(22,163,74,.34);
}

.estado-qc_revision,
.tape-label.estado-qc_revision{
  background:rgba(124,58,237,.15);
  border-color:rgba(124,58,237,.30);
}

.estado-qc_rechazado,
.tape-label.estado-qc_rechazado{
  background:rgba(249,115,22,.18);
  border-color:rgba(249,115,22,.34);
}

.estado-entregado,
.tape-label.estado-entregado{
  background:rgba(20,184,166,.16);
  border-color:rgba(20,184,166,.32);
}

.estado-cancelado,
.tape-label.estado-cancelado{
  background:rgba(75,85,99,.16);
  border-color:rgba(75,85,99,.32);
}

.estado-sin,
.tape-label.estado-sin{
  background:rgba(0,0,0,.06);
  border-color:rgba(0,0,0,.12);
}

/* =========================
   Dashboard administración
   ========================= */
.admin-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(260px, 1fr));
  gap:16px;
  margin-top:14px;
}

.admin-card{
  display:block;
  text-decoration:none;
  color:var(--text);
  background:rgba(255,255,255,.86);
  border:1px solid var(--border);
  border-radius:22px;
  padding:16px;
  box-shadow:var(--shadow-sm);
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  position:relative;
  overflow:hidden;
}

.admin-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:8px;
  background:linear-gradient(90deg, var(--brand-red), var(--brand-yellow), var(--brand-brown));
}

.admin-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow);
  border-color:rgba(233,30,47,.22);
}

.admin-card-title{
  font-weight:1000;
  margin:10px 0 13px;
  letter-spacing:.1px;
  color:var(--brand-brown-dark);
}

.admin-card-mainlink{
  display:block;
  text-decoration:none;
  color:inherit;
}

.admin-card-kpis{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.admin-card-kpis .kpi,
.admin-card-kpis .kpi-link{
  border-radius:15px;
  padding:11px;
  background:rgba(255,253,247,.86);
  border:1px solid rgba(58,42,20,.10);
  box-shadow:none;
}

.admin-card-kpis .kpi span,
.admin-card-kpis .kpi-link span{
  font-size:12px;
  opacity:.74;
  display:block;
  font-weight:900;
}

.admin-card-kpis .kpi b,
.admin-card-kpis .kpi-link b{
  font-size:21px;
  display:block;
  margin-top:2px;
  color:var(--brand-brown-dark);
}

.kpi-link{
  display:block;
  text-decoration:none;
  color:inherit;
  transition:transform .12s ease, background .12s ease, border-color .12s ease;
}

.kpi-link:hover{
  background:#fff;
  border-color:rgba(233,30,47,.26);
  transform:translateY(-1px);
}

.kpi-warning b{ color:#b45309; }

/* Tabla admin */
.table-wrap{
  overflow:auto;
  background:rgba(255,255,255,.78);
  border:1px solid var(--border);
  border-radius:20px;
  padding:10px;
  box-shadow:var(--shadow-sm);
}

.admin-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:900px;
  background:transparent;
}

.admin-table th,
.admin-table td{
  padding:12px 10px;
  border-bottom:1px solid rgba(58,42,20,.10);
  text-align:left;
  font-size:13px;
}

.admin-table th{
  font-weight:1000;
  background:rgba(255,243,196,.70);
  color:var(--brand-brown-dark);
  position:sticky;
  top:0;
  z-index:1;
}

.admin-table tr:hover td{ background:rgba(255,255,255,.52); }

.area-name{ font-weight:1000; }

.num-link,
.admin-table .num{
  font-weight:1000;
  text-decoration:none;
  color:var(--brand-brown-dark);
  background:rgba(255,255,255,.92);
  border:1px solid rgba(58,42,20,.14);
  padding:6px 10px;
  border-radius:999px;
  display:inline-block;
  min-width:34px;
  text-align:center;
}

.num-link:hover,
.admin-table .num:hover{
  background:#fff;
  border-color:rgba(233,30,47,.25);
}

/* =========================
   Autocomplete
   ========================= */
.ac-box{
  position:relative;
  overflow:visible;
}

.ac-wrap,
.ac-box{ width:100%; }

.ac-menu{
  z-index:9999;
  background:#fff;
  border:1px solid var(--border-strong);
  border-radius:14px;
  margin-top:6px;
  box-shadow:var(--shadow);
  max-height:260px;
  overflow:auto;
  padding:6px;
}

.ac-item{
  padding:10px 12px;
  cursor:pointer;
  border-radius:11px;
  user-select:none;
}

.ac-item:hover{ background:rgba(58,42,20,.06); }

.ac-item.active{
  background:rgba(255,230,0,.34);
  outline:2px solid rgba(233,30,47,.42);
  outline-offset:-2px;
  font-weight:950;
}

/* =========================
   Mantenimientos
   ========================= */
.mant-inline-row td,
.mant-edit-row td{
  padding-top:10px;
  padding-bottom:10px;
  background:rgba(255,255,255,.46);
}

.mant-inline-form,
.mant-edit-form{
  display:grid;
  grid-template-columns:minmax(280px, 2.2fr) 110px 160px minmax(220px, 1.6fr) auto;
  gap:10px;
  align-items:end;
}

.mant-inline-form .f label,
.mant-edit-form .f label{
  display:block;
  margin:0 0 6px 0;
  font-size:12px;
  font-weight:950;
  color:var(--text-soft);
}

.mant-inline-form input,
.mant-inline-form select,
.mant-edit-form input,
.mant-edit-form select{ width:100%; }

.mant-inline-form .f-btn button{
  width:100%;
  white-space:nowrap;
}

.mant-edit-form .f-btns{
  display:flex;
  gap:8px;
  align-items:end;
  justify-content:flex-end;
  white-space:nowrap;
}

.mant-edit-form .f-btns .num-link{ padding:10px 12px; }

.badge-flete{
  background:rgba(245,158,11,.18);
  border:1px solid rgba(245,158,11,.45);
  border-radius:999px;
  padding:3px 10px;
  font-weight:1000;
  font-size:12px;
}

/* =========================
   Modal imagen producto
   ========================= */
.image-modal[hidden]{ display:none; }

.image-modal{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}

.image-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(16,24,39,.62);
  backdrop-filter:blur(4px);
}

.image-modal-card{
  position:relative;
  z-index:1;
  width:min(760px, 96vw);
  max-height:90vh;
  background:#fffdf7;
  border:1px solid rgba(255,255,255,.60);
  border-radius:24px;
  box-shadow:var(--shadow-lg);
  padding:17px;
  overflow:auto;
}

.image-modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  border-bottom:1px solid rgba(58,42,20,.10);
  padding-bottom:10px;
}

.image-modal-head h3{
  margin:0;
  font-size:19px;
  color:var(--brand-brown-dark);
}

.image-modal-close{
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--brand-brown-dark);
  font-size:24px;
  line-height:1;
  cursor:pointer;
  box-shadow:none;
}

.product-image-preview{
  display:block;
  max-width:100%;
  max-height:72vh;
  margin:0 auto;
  border-radius:16px;
  border:1px solid rgba(58,42,20,.10);
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px){
  .page-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .admin-card-kpis{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .topbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .container{
    padding:14px;
  }

  .page-head{
    padding:16px;
  }

  .board{
    grid-template-columns:1fr;
  }

  .day-filter{
    align-items:stretch;
  }

  .day-filter > div,
  .day-filter .dir-search{
    min-width:0;
    width:100%;
  }

  .day-filter button{
    width:100%;
  }

  .mant-inline-form,
  .mant-edit-form{
    grid-template-columns:1fr;
  }

  .mant-edit-form .f-btns{
    justify-content:stretch;
  }

  .mant-edit-form .f-btns button,
  .mant-edit-form .f-btns .num-link{
    width:100%;
    text-align:center;
  }

  .postit-head{
    flex-direction:column;
  }

  .postit-datebox{
    align-items:flex-start;
  }
}

@media (max-width: 460px){
  .login-card{
    padding:32px 20px 24px;
  }

  .admin-grid{
    grid-template-columns:1fr;
  }

  .postit{
    padding-left:13px;
    padding-right:13px;
  }
}

/* ===== Mis áreas ===== */

.area-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(230px, 1fr));
  gap:16px;
  margin-top:18px;
}

.area-card{
  display:flex;
  align-items:center;
  gap:14px;
  min-height:96px;
  padding:18px;
  text-decoration:none;
  color:var(--text);
  background:linear-gradient(180deg, #ffffff, #fffaf0);
  border:1px solid rgba(108,72,37,.16);
  border-radius:22px;
  box-shadow:var(--shadow-sm);
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  position:relative;
  overflow:hidden;
}

.area-card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:7px;
  background:linear-gradient(90deg, var(--brand-red), var(--brand-yellow));
}

.area-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  border-color:rgba(225,29,46,.26);
}

.area-card-icon{
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:rgba(245,196,0,.18);
  font-size:26px;
}

.area-card-title{
  font-size:18px;
  font-weight:1000;
  color:var(--brand-ink);
}

.area-card-hint{
  margin-top:4px;
  font-size:13px;
  font-weight:800;
  color:var(--muted);
}

.area-disabled{
  opacity:.55;
  pointer-events:none;
  filter:grayscale(.2);
}

.empty-card{
  margin-top:16px;
  padding:18px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-sm);
  font-weight:900;
  color:var(--muted);
}

/* Opcional: ajustes para formularios de catálogos de producción */
.admin-table input[type="time"],
.admin-table input[type="checkbox"]{
  margin:0;
}

.admin-table input[type="time"]{
  min-width:110px;
}


/* ===== Catálogos producción restantes ===== */
.span-2{ grid-column:1 / -1; }
.checks-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(140px, 1fr));
  gap:10px;
  margin-top:8px;
}
.checks-grid label,
.check-inline,
.check-line{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
}
.actions-cell{
  white-space:nowrap;
}
.form-section{
  margin-top:18px;
  padding-top:14px;
  border-top:1px solid var(--border);
}
.form-section h3{
  margin:0 0 8px 0;
}


/* ===== Generador alternancia PAN ===== */
.check-panel{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:14px;
}
.check-panel-title{
  font-weight:1000;
  margin-bottom:8px;
  color:var(--brand-ink);
}
.check-line{
  display:flex;
  align-items:center;
  gap:8px;
  margin:7px 0;
  font-weight:800;
}
.alert-card{
  margin:14px 0;
  padding:14px 16px;
  background:#fff7d6;
  border:1px solid rgba(245,196,0,.55);
  border-radius:16px;
  color:var(--brand-ink);
  font-weight:800;
}
.section-title{
  margin:18px 0 10px;
  font-size:16px;
  font-weight:1000;
  color:var(--brand-ink);
}
.hint.small{
  display:block;
  margin-top:4px;
  font-size:12px;
}



/* ===== Tablero Operativo V2 ===== */
.board-day-section{
  margin-top:22px;
}
.board-day-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin:14px 0 10px;
  padding:14px 16px;
  background:rgba(255,255,255,.72);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-sm);
}
.board-day-head h2{
  margin:0;
  font-size:22px;
  color:var(--brand-ink);
}
.board-state-section{
  margin:16px 0 22px;
}
.board-state-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 10px;
}
.board-state-head .tape-label{
  position:static;
  transform:none;
  display:inline-flex;
  width:auto;
  min-width:160px;
  justify-content:center;
}
.state-count{
  font-size:13px;
  font-weight:900;
  color:var(--muted);
  background:#fff;
  border:1px solid var(--border);
  border-radius:999px;
  padding:6px 10px;
}
.board-grouped{
  margin-top:0;
}
.refresh-tab{
  margin-left:auto;
}
.estado-form-disabled{
  opacity:.75;
}

/* ===== Tablero Operativo V2: full width + compactación ===== */
body.tablero-fullwidth .container{
  width:100%;
  max-width:none;
  padding:10px 12px 22px;
}

.tablero-v2-page{
  width:100%;
}

.tablero-compact-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:8px 0 10px;
  padding:12px 14px;
  background:rgba(255,255,255,.76);
  border:1px solid rgba(0,0,0,.10);
  border-radius:18px;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
  backdrop-filter:blur(8px);
}

.tablero-titleblock{
  min-width:240px;
}

.tablero-titleblock h1{
  margin:0;
  font-size:28px;
  line-height:1.05;
  color:var(--brand-brown, #6B4E2E);
}

.tablero-titleblock .hint{
  margin:2px 0 0;
  font-size:12px;
  font-weight:800;
}

.tablero-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
}

.tablero-tabs-inline,
.tablero-filter-inline{
  margin:0;
}

.tablero-filter-inline{
  padding:0;
  box-shadow:none;
  border:0;
  background:transparent;
  display:flex;
  align-items:end;
  gap:8px;
}

.tablero-filter-inline label{
  font-size:10px;
  margin-bottom:2px;
}

.tablero-filter-inline input[type="date"]{
  height:36px;
  min-width:150px;
  padding:6px 9px;
}

.compact-check{
  height:36px;
  padding:0 6px;
  white-space:nowrap;
}

.filter-summary-row,
.compact-board-top{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:8px 0 10px;
}

.floating-refresh{
  position:fixed;
  right:18px;
  bottom:20px;
  z-index:9000;
  display:flex;
  align-items:center;
  gap:7px;
  text-decoration:none;
  border-radius:999px;
  padding:10px 14px;
  background:var(--brand-red, #E11D2E);
  color:#fff;
  font-weight:1000;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 14px 36px rgba(0,0,0,.24);
}

.floating-refresh:hover{
  transform:translateY(-1px);
  text-decoration:none;
  opacity:.96;
}

.floating-refresh-icon{
  font-size:18px;
  line-height:1;
}

.tablero-v2-page .board-day-section{
  margin:10px 0 18px;
}

.tablero-v2-page .board-day-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:rgba(255,255,255,.70);
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  box-shadow:0 8px 18px rgba(0,0,0,.07);
}

.tablero-v2-page .board-day-head h2{
  margin:0;
  font-size:19px;
  line-height:1.1;
}

.tablero-v2-page .board-state-section{
  margin-top:12px;
}

.tablero-v2-page .board-state-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:24px;
  margin-bottom:8px;
}

.tablero-v2-page .board-state-head .tape-label{
  position:static;
  display:inline-flex;
  min-width:118px;
  justify-content:center;
  padding:4px 12px;
  box-shadow:none;
}

.tablero-v2-page .state-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:3px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  font-size:12px;
  font-weight:1000;
}

.tablero-v2-page .board{
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:11px;
}

.tablero-v2-page .postit{
  padding:12px 12px 10px;
  border-radius:15px;
  transform:none;
}

.tablero-v2-page .postit:hover{
  transform:translateY(-2px);
}

.tablero-v2-page .postit .title{
  font-size:13px;
  line-height:1.12;
}

.tablero-v2-page .postit-datebox{
  min-width:94px;
}

.tablero-v2-page .postit .time,
.tablero-v2-page .delivery-pill,
.tablero-v2-page .badge{
  font-size:10.5px;
}

.tablero-v2-page .status-row{
  gap:4px;
}

.tablero-v2-page .postit-product-line{
  font-size:13px;
  margin:4px 0;
}

.tablero-v2-page .details summary{
  font-size:12px;
}

.estado-form-compact{
  margin-top:8px;
  padding-top:8px;
}

.estado-form-compact .estado-action-row{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr) auto;
  align-items:center;
  gap:6px;
}

.estado-form-compact label{
  margin:0;
  white-space:nowrap;
  font-size:11px;
}

.estado-form-compact select,
.estado-form-compact input{
  min-width:0;
  height:34px;
  padding:6px 8px;
  font-size:12px;
}

.estado-form-compact button{
  width:auto;
  height:34px;
  margin:0;
  padding:6px 9px;
  font-size:12px;
}

.estado-nota-input,
.problem-field{
  margin-top:6px;
}

.problem-field[hidden]{
  display:none !important;
}

.estado-form-disabled{
  padding:8px 0 0;
  font-size:12px;
}

@media (max-width: 900px){
  .tablero-compact-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .tablero-controls,
  .tablero-filter-inline{
    width:100%;
    justify-content:flex-start;
  }
}

@media (max-width: 640px){
  body.tablero-fullwidth .container{
    padding:8px;
  }

  .tablero-filter-inline input[type="date"]{
    min-width:135px;
  }

  .floating-refresh-text{
    display:none;
  }

  .floating-refresh{
    right:12px;
    bottom:14px;
    padding:11px 13px;
  }
}



/* ===== Problemas por detalle ===== */
.detalle-problemas-alert{
  margin:6px 0 4px;
  padding:5px 8px;
  border-radius:12px;
  background:#fff3cd;
  border:1px solid rgba(180,120,0,.25);
  font-size:12px;
  font-weight:900;
  color:#704600;
}

.badge-problem{
  background:#fff3cd !important;
  border-color:rgba(180,120,0,.35) !important;
  color:#704600 !important;
}

.problemas-detalle-box{
  margin:8px 0;
  padding:8px;
  border-radius:12px;
  background:rgba(255,243,205,.72);
  border:1px dashed rgba(180,120,0,.35);
  font-size:12px;
}

.problema-detalle-item{
  margin-top:6px;
  padding-top:6px;
  border-top:1px solid rgba(180,120,0,.20);
}

.resolve-problem-form{
  display:flex;
  gap:6px;
  margin-top:6px;
}

.resolve-problem-form input{
  flex:1;
  min-width:0;
}

.problem-report-details summary{
  color:#8a5300;
  font-weight:1000;
}

.detalle-problema-form{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-top:7px;
}

.detalle-problema-grid{
  display:grid;
  grid-template-columns:1fr 90px;
  gap:7px;
}

.detalle-problema-form textarea{
  width:100%;
  resize:vertical;
  min-height:48px;
}

.detalle-problema-form button,
.resolve-problem-form button{
  white-space:nowrap;
}

/* ===== Admin: exclusiones por tablero ===== */
.admin-actions-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  margin:10px 0 14px;
}

.form-card{
  background:#fff;
  border:1px solid var(--border, rgba(108,72,37,.16));
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow-sm, 0 6px 18px rgba(0,0,0,.06));
  margin-bottom:16px;
}

.form-card h3{
  margin:0 0 6px;
  font-size:18px;
}

.compact-admin-filter{
  margin-top:12px;
}

.page-subhead{
  margin-top:18px;
  margin-bottom:10px;
}

.page-subhead h2{
  margin:0;
  font-size:22px;
}


/* ===== PAN Operativo V2 ===== */
.pan-turno-hint{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:4px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(245,196,0,.18);
  border:1px solid rgba(108,72,37,.14);
  color:var(--brand-ink, #3d260f);
  font-weight:900;
}

.admin-card-title small,
.area-name small{
  display:block;
  margin-top:2px;
  font-size:12px;
  color:var(--muted, #6b7280);
  font-weight:800;
}


/* ===== PAN Operativo V2 - asignación automática ===== */
.pan-assignment-line{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px 10px;
  margin:6px 0 4px;
  padding:7px 9px;
  border-radius:12px;
  background:rgba(245,196,0,.13);
  border:1px solid rgba(108,72,37,.14);
  color:var(--brand-ink, #3b2a17);
  font-size:12px;
  font-weight:800;
}

.pan-assignment-line span{
  white-space:nowrap;
}

.pan-mini-badge{
  padding:2px 7px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(108,72,37,.18);
  font-weight:1000;
}

@media (max-width: 760px){
  .pan-assignment-line span{
    white-space:normal;
  }
}

/* =========================================================
   Usuarios avanzado
   ========================================================= */
.access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.access-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.access-card input {
  margin-top: 3px;
}

.access-title {
  font-weight: 700;
}

.access-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.access-section {
  margin-top: 14px;
}

.role-badge.role-asesor,
.role-badge.role-logistica {
  background: #eef2ff;
  color: #3730a3;
}


/* Reasignación de órdenes/detalles */
.badge-reassigned {
  background: #fff3c4;
  border-color: #e0b84a;
  color: #5f4300;
  font-weight: 700;
}

.reassigned-line {
  margin: 6px 0 8px 0;
  padding: 7px 9px;
  border: 1px dashed #d8b64c;
  background: #fff8dc;
  border-radius: 10px;
  font-size: 12px;
}

.reassign-details summary {
  color: #5f4300;
  font-weight: 700;
}

.reassign-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.reassign-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px;
  gap: 8px;
}

.reassign-form select,
.reassign-form input,
.reassign-form textarea {
  width: 100%;
  box-sizing: border-box;
}

.inline-reassign-cancel {
  display: inline-flex;
  margin-left: 8px;
}

.inline-reassign-cancel button {
  padding: 3px 8px;
  font-size: 11px;
}

@media (max-width: 720px) {
  .reassign-grid {
    grid-template-columns: 1fr;
  }
}

.reassign-field label{
  display:block;
  margin:0 0 4px 0;
  font-size:11px;
  font-weight:900;
  color:#374151;
}

.reassign-field input{
  width:100%;
}


/* Batidos por equipo/calendario */
.batidos-context-card{
  margin-top:8px;
  display:inline-block;
  padding:8px 10px;
  border-radius:12px;
  background:#ecfdf5;
  border:1px solid #bbf7d0;
  color:#14532d;
  font-size:12px;
  font-weight:700;
}

.batidos-context-card.warn{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}

.batidos-calendar-card h2{
  margin:0 0 10px 0;
  font-size:16px;
}

.day-filter .wide-field{
  min-width:260px;
  flex:1;
}

.reassign-field label{
  display:block;
  margin:0 0 4px 0;
  font-size:11px;
  font-weight:900;
  color:#374151;
}

.reassign-field input{
  width:100%;
}


/* Pulido de mantenimientos */
.row-warning td{
  background: #fff7ed;
}
.ok-pill{
  background: #dcfce7;
  color: #166534;
}
.warn-pill{
  background: #fee2e2;
  color: #991b1b;
}
.login-field select,
.day-filter select{
  min-height: 38px;
}
.login-field textarea{
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
}


/* Área ENTREGAS */
.entregas-head{align-items:flex-start;}
.entregas-filter{gap:10px;align-items:end;}
.entregas-check{margin-top:22px;}
.entregas-kpis{margin:12px 0 16px 0;flex-wrap:wrap;}
.entregas-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px;align-items:start;}
.entrega-card{background:#fff8d6;border:1px solid rgba(0,0,0,.12);border-radius:16px;padding:14px;box-shadow:0 8px 18px rgba(0,0,0,.08);}
.entrega-card.estado-entregado{opacity:.78;background:#f0fdf4;}
.entrega-card.estado-problema{background:#fee2e2;}
.entrega-card.estado-en_ruta{background:#dbeafe;}
.entrega-card-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px;}
.entrega-num{font-size:20px;font-weight:900;color:#111827;}
.entrega-time{font-size:13px;font-weight:700;color:#374151;margin-top:2px;}
.estado-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;background:#e5e7eb;color:#111827;white-space:nowrap;}
.estado-pill.estado-pendiente{background:#fef3c7;}
.estado-pill.estado-en_ruta{background:#bfdbfe;}
.estado-pill.estado-problema{background:#fecaca;}
.estado-pill.estado-entregado{background:#bbf7d0;}
.entrega-section{font-size:13px;margin:10px 0;}
.entrega-address{margin-top:4px;line-height:1.35;white-space:pre-wrap;}
.entrega-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0;align-items:center;}
.entrega-note{border-radius:12px;background:rgba(255,255,255,.7);padding:9px;font-size:13px;margin:10px 0;line-height:1.35;}
.entrega-form{border-top:1px dashed rgba(0,0,0,.18);margin-top:12px;padding-top:10px;display:grid;gap:7px;}
.entrega-form label{font-size:11px;font-weight:900;color:#374151;}
.entrega-form input,.entrega-form select{width:100%;}
.empty-state{grid-column:1/-1;background:#fff;border:1px solid rgba(0,0,0,.1);border-radius:14px;padding:18px;color:#6b7280;}
.muted{color:#6b7280;font-size:12px;}



.entrega-meta-line{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0;
  font-size:12px;
  color:#374151;
}
.entrega-detalles{
  margin-top:10px;
  padding:8px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#f9fafb;
}
.entrega-detalles summary,
.entrega-combo-details summary{
  cursor:pointer;
  font-weight:900;
}
.entrega-productos{
  margin-top:8px;
  display:grid;
  gap:8px;
}
.entrega-producto-row{
  padding:8px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  background:#ffffff;
}
.entrega-producto-main{
  font-size:13px;
  color:#111827;
}
.entrega-producto-extra{
  margin-top:4px;
  font-size:12px;
  color:#4b5563;
}
.entrega-combo-details{
  margin-top:6px;
  padding:6px;
  border-radius:8px;
  background:#fff7ed;
  border:1px solid #fed7aa;
}


/* =========================================================
   Entregas - estilo Post-It alineado a tableros de producción
   Pegar al final de app/static/styles.css
   ========================================================= */

.entregas-postit-board{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(330px, 1fr));
  gap:16px;
  align-items:start;
  margin-top:16px;
}

.entrega-postit{
  position:relative;
  background:#fff8c6;
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  padding:14px;
  box-shadow:0 10px 22px rgba(0,0,0,.12);
  overflow:hidden;
}

.entrega-postit .postit-status-bar{
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:8px;
  background:#9ca3af;
}

.entrega-postit .postit-header{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  padding-left:4px;
  margin-bottom:10px;
}

.entrega-postit .postit-title{
  font-size:18px;
  font-weight:900;
  color:#111827;
}

.entrega-postit .postit-date{
  font-size:13px;
  color:#374151;
  font-weight:700;
}

.entrega-postit .postit-section{
  margin-top:10px;
  padding-top:9px;
  border-top:1px dashed rgba(17,24,39,.25);
}

.entrega-postit .postit-section-title{
  font-weight:900;
  color:#111827;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.03em;
  margin-bottom:4px;
}

.entrega-postit .postit-text-block{
  font-size:13px;
  line-height:1.35;
  color:#1f2937;
  text-align:justify;
  white-space:pre-wrap;
}

.entrega-cobros-postit{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
  margin:10px 0 6px;
}

.entrega-cobro{
  background:rgba(255,255,255,.68);
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  padding:8px;
}

.entrega-cobro span{
  display:block;
  font-size:11px;
  color:#4b5563;
  font-weight:800;
}

.entrega-cobro b{
  display:block;
  font-size:15px;
  color:#111827;
  margin-top:2px;
}

.entrega-cobro.saldo-pedido b,
.entrega-cobro.saldo-deposito b{
  font-size:16px;
}

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

.entrega-slide{
  font-weight:900;
}

.entrega-detalles{
  margin-top:12px;
  border-top:1px dashed rgba(17,24,39,.25);
  padding-top:8px;
}

.entrega-detalles summary,
.entrega-combo-details summary{
  cursor:pointer;
  font-weight:900;
  color:#1d4ed8;
}

.entrega-productos{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.entrega-producto-row{
  background:rgba(255,255,255,.58);
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  padding:9px;
}

.postit-product-line{
  font-size:14px;
  color:#111827;
}

.postit-detail-fields{
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:5px 10px;
  font-size:12px;
  color:#374151;
}

.postit-detail-extra{
  margin-top:5px;
  font-size:12px;
  color:#374151;
  line-height:1.35;
}

.entrega-combo-details{
  margin-top:7px;
  padding-left:8px;
}

.combo-subdetalle{
  margin-top:6px;
  display:flex;
  flex-direction:column;
  gap:5px;
}

.combo-row{
  border-left:3px solid rgba(37,99,235,.35);
  padding-left:7px;
  font-size:12px;
}

.entrega-note{
  font-size:12px;
  color:#374151;
}

.entrega-form{
  margin-top:12px;
  display:grid;
  gap:7px;
  border-top:1px dashed rgba(17,24,39,.25);
  padding-top:10px;
}

.entrega-form label{
  font-size:11px;
  font-weight:900;
  color:#374151;
}

.entrega-form input,
.entrega-form select{
  width:100%;
}

.estado-en_ruta,
.postit-status-bar.estado-en_ruta{ background:#93c5fd; }
.postit-status-bar.estado-pendiente{ background:#facc15; }
.postit-status-bar.estado-problema{ background:#fca5a5; }
.postit-status-bar.estado-entregado{ background:#86efac; }

@media (max-width: 720px){
  .entregas-postit-board{
    grid-template-columns:1fr;
  }
  .entrega-cobros-postit{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   Entregas - alineado visualmente al tablero de producción
   Pegar al final de app/static/styles.css
   ========================================================= */

.entregas-tablero-v2 .tablero-filter-inline{
  align-items:end;
}

.entregas-tablero-v2 .entregas-search-field{
  min-width:260px;
  flex:1;
}

.entregas-tablero-v2 .board-state-section{
  margin:14px 0 22px;
}

.entregas-tablero-v2 .postit{
  min-height:0;
}

.entregas-tablero-v2 .estado-problema,
.entregas-tablero-v2 .tape-label.estado-problema{
  background:rgba(233,30,47,.18);
  border-color:rgba(233,30,47,.35);
}

.entregas-tablero-v2 .estado-en_ruta,
.entregas-tablero-v2 .tape-label.estado-en_ruta{
  background:rgba(37,99,235,.18);
  border-color:rgba(37,99,235,.32);
}

.entregas-tablero-v2 .estado-entregado,
.entregas-tablero-v2 .tape-label.estado-entregado{
  background:rgba(22,163,74,.18);
  border-color:rgba(22,163,74,.34);
}

.entregas-tablero-v2 .status-row{
  margin-bottom:8px;
}

.entregas-tablero-v2 .entrega-money-badge{
  background:rgba(255,255,255,.86);
}

.entregas-tablero-v2 .entrega-money-strip{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:6px;
  margin:8px 0 4px;
}

.entregas-tablero-v2 .entrega-money-box{
  margin:0;
  padding:8px 9px;
}

.entregas-tablero-v2 .entrega-money-value{
  margin-top:2px;
  font-size:14px;
  font-weight:1000;
  color:var(--brand-brown-dark);
}

.entregas-tablero-v2 .saldo-deposito .entrega-money-value{
  color:#991b1b;
}

.entregas-tablero-v2 .logistics-details[open] > summary{
  margin-bottom:4px;
}

.entregas-tablero-v2 .detail-text{
  text-align:left;
}

.entregas-tablero-v2 .entrega-detalles-v2{
  margin-top:8px;
  padding-top:8px;
  border-top:1px dashed rgba(58,42,20,.18);
}

.entregas-tablero-v2 .entrega-nota-estado{
  margin-top:8px;
}

.entregas-tablero-v2 .problem-field[hidden]{
  display:none !important;
}

.entregas-tablero-v2 .estado-form-compact .estado-action-row{
  grid-template-columns:auto minmax(0, 1fr) auto;
}

@media (max-width: 760px){
  .entregas-tablero-v2 .entrega-money-strip{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   Tablero de producción - navegación flotante por estados
   ========================================================= */
.tablero-v2-page{
  padding-bottom:92px;
}

.state-quick-nav[hidden]{
  display:none !important;
}

.state-quick-nav{
  position:fixed;
  right:18px;
  bottom:78px;
  z-index:8990;
  width:min(210px, calc(100vw - 32px));
  padding:9px;
  border:1px solid rgba(58,42,20,.20);
  border-radius:18px;
  background:rgba(255,253,247,.96);
  box-shadow:0 18px 44px rgba(16,24,39,.24);
  backdrop-filter:blur(12px);
}

.state-quick-nav-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:7px;
  padding:0 2px;
}

.state-quick-nav-title{
  font-size:11px;
  font-weight:1000;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--brand-brown-dark);
}

.state-quick-nav-collapse{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  padding:0;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--brand-brown-dark);
  font-size:18px;
  font-weight:1000;
  line-height:1;
  cursor:pointer;
}

.state-quick-nav-actions{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.state-quick-btn{
  --state-accent:var(--brand-brown);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
  min-height:36px;
  padding:7px 9px 7px 11px;
  border:1px solid var(--border);
  border-left:5px solid var(--state-accent);
  border-radius:12px;
  background:#fff;
  color:var(--text);
  text-align:left;
  font:inherit;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 3px 10px rgba(58,42,20,.06);
}

.state-quick-btn:hover,
.state-quick-btn:focus-visible{
  transform:translateY(-1px);
  border-color:var(--state-accent);
  outline:none;
}

.state-quick-btn.is-active{
  background:color-mix(in srgb, var(--state-accent) 12%, white);
  border-color:var(--state-accent);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--state-accent) 18%, transparent);
}

.state-quick-btn-label{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.state-quick-btn-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:25px;
  height:22px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(16,24,39,.08);
  font-size:11px;
  font-weight:1000;
}

.state-code-pendiente{ --state-accent:#d89b00; }
.state-code-en_proceso{ --state-accent:#2563eb; }
.state-code-con_problemas,
.state-code-bloqueado,
.state-code-qc_rechazado{ --state-accent:#dc2626; }
.state-code-qc_revision{ --state-accent:#7c3aed; }
.state-code-terminado,
.state-code-entregado{ --state-accent:#16a34a; }
.state-code-cancelado{ --state-accent:#6b7280; }

.state-quick-top{
  margin-top:7px;
  justify-content:center;
  border-left-width:1px;
  background:var(--brand-brown-dark);
  color:#fff;
}

.state-quick-nav.is-collapsed{
  width:auto;
  padding:7px;
}

.state-quick-nav.is-collapsed .state-quick-nav-title,
.state-quick-nav.is-collapsed .state-quick-nav-actions,
.state-quick-nav.is-collapsed .state-quick-top{
  display:none;
}

.state-quick-nav.is-collapsed .state-quick-nav-head{
  margin:0;
}

.board-state-section{
  scroll-margin-top:84px;
}

@media (max-width: 720px){
  .tablero-v2-page{
    padding-bottom:142px;
  }

  .state-quick-nav{
    left:8px;
    right:72px;
    bottom:12px;
    width:auto;
    max-width:none;
    padding:7px;
  }

  .state-quick-nav-head{
    display:none;
  }

  .state-quick-nav-actions{
    flex-direction:row;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
    padding-bottom:2px;
  }

  .state-quick-btn{
    flex:0 0 auto;
    width:auto;
    min-width:max-content;
    min-height:40px;
  }

  .state-quick-top{
    display:none;
  }

  .state-quick-nav.is-collapsed{
    width:auto;
  }

  .state-quick-nav.is-collapsed .state-quick-nav-actions{
    display:flex;
  }
}

/* PAQUETE 36: entregas que el cliente recoge en tienda */
.entregas-mode-tabs{
  margin-bottom:2px;
}

.entregas-tablero-v2 .estado-listo,
.entregas-tablero-v2 .tape-label.estado-listo{
  background:#93c5fd;
  color:#17365d;
}

.entregas-tablero-v2 .estado-notificado,
.entregas-tablero-v2 .tape-label.estado-notificado{
  background:#c4b5fd;
  color:#3b2675;
}

/* PAQUETE 37: colores del navegador para estados logísticos */
.state-code-en_ruta{ --state-accent:#2563eb; }
.state-code-problema{ --state-accent:#dc2626; }
.state-code-listo{ --state-accent:#0f766e; }
.state-code-notificado{ --state-accent:#7c3aed; }

/* PAQUETE 41: tablero general de pedidos */
.pedidos-general-filtros{
  display:grid;
  grid-template-columns:repeat(3,minmax(150px,1fr)) minmax(260px,2fr) auto;
  gap:12px;
  align-items:end;
  padding:16px;
  margin-bottom:14px;
  border:1px solid rgba(71,56,36,.18);
  border-radius:18px;
  background:rgba(255,255,255,.88);
  box-shadow:0 10px 28px rgba(58,42,23,.08);
}

.pedidos-general-filtros label{
  display:block;
  margin-bottom:5px;
  font-weight:800;
  color:#493a27;
}

.pedidos-general-filtros input,
.pedidos-general-filtros select{
  width:100%;
}

.pedidos-general-kpis{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}

.pedidos-general-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(430px,1fr));
  gap:16px;
}

.pedido-general-card{
  overflow:hidden;
  border:1px solid rgba(71,56,36,.18);
  border-radius:20px;
  background:#fffdf8;
  box-shadow:0 12px 30px rgba(58,42,23,.11);
}

.pedido-general-card-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:16px 18px 12px;
  border-bottom:1px solid rgba(71,56,36,.12);
  background:linear-gradient(135deg,#fff7d2,#fff);
}

.pedido-general-numero{
  font-size:1.3rem;
  font-weight:950;
  color:#3f301e;
}

.pedido-general-fecha{
  margin-top:3px;
  font-weight:800;
  color:#765f41;
}

.pedido-general-personas,
.pedido-general-dato,
.pedido-general-referencia{
  padding:12px 18px 0;
  color:#3d3328;
}

.pedido-general-personas{
  display:grid;
  gap:5px;
}

.pedido-general-dato span,
.pedido-general-personas span{
  overflow-wrap:anywhere;
}

.pedido-general-links{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px 18px 0;
}

.pedido-general-links a{
  font-weight:900;
  color:#0759b7;
  text-decoration:none;
}

.pedido-general-detalle-wrap{
  overflow-x:auto;
  margin:14px 18px 0;
  border:1px solid rgba(71,56,36,.15);
  border-radius:14px;
}

.pedido-general-detalle{
  width:100%;
  min-width:520px;
  border-collapse:collapse;
}

.pedido-general-detalle th,
.pedido-general-detalle td{
  padding:9px 10px;
  border-bottom:1px solid rgba(71,56,36,.11);
  text-align:left;
  vertical-align:top;
}

.pedido-general-detalle th{
  background:#f7f0df;
  color:#493a27;
}

.pedido-general-detalle th:nth-child(1),
.pedido-general-detalle td:nth-child(1),
.pedido-general-detalle th:nth-child(3),
.pedido-general-detalle td:nth-child(3),
.pedido-general-detalle th:nth-child(4),
.pedido-general-detalle td:nth-child(4){
  white-space:nowrap;
  text-align:right;
}

.pedido-linea-nota{
  margin-top:4px;
  font-size:.86rem;
  line-height:1.35;
  color:#655947;
}

.pedido-general-totales{
  display:grid;
  gap:5px;
  padding:14px 18px;
}

.pedido-general-totales > div{
  display:flex;
  justify-content:space-between;
  gap:15px;
}

.pedido-general-total-final{
  margin-top:4px;
  padding-top:8px;
  border-top:2px solid rgba(71,56,36,.22);
  font-size:1.12rem;
}

.pedido-general-referencia{
  padding-bottom:16px;
  border-top:1px dashed rgba(71,56,36,.2);
}

.pedido-general-referencia div{
  margin-top:4px;
  text-align:justify;
  white-space:pre-wrap;
}

.pedidos-general-dashboard-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin:14px 0;
  padding:16px 18px;
  border:1px solid rgba(71,56,36,.18);
  border-radius:18px;
  background:linear-gradient(135deg,#fff7c2,#fff);
  color:inherit;
  text-decoration:none;
  box-shadow:0 10px 28px rgba(58,42,23,.09);
}

.pedidos-general-dashboard-title{
  font-size:1.15rem;
  font-weight:950;
  color:#3f301e;
}

.pedidos-general-dashboard-kpis{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.pedidos-general-dashboard-kpis span{
  display:grid;
  min-width:92px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.82);
  text-align:center;
  font-weight:750;
}

.pedidos-general-dashboard-kpis b{
  margin-top:2px;
  font-size:1.03rem;
}

@media (max-width:1050px){
  .pedidos-general-filtros{
    grid-template-columns:repeat(2,minmax(160px,1fr));
  }

  .pedidos-general-search{
    grid-column:span 2;
  }
}

@media (max-width:700px){
  .pedidos-general-filtros{
    grid-template-columns:1fr;
  }

  .pedidos-general-search{
    grid-column:auto;
  }

  .pedidos-general-grid{
    grid-template-columns:1fr;
  }

  .pedidos-general-dashboard-card{
    align-items:stretch;
    flex-direction:column;
  }

  .pedidos-general-dashboard-kpis{
    justify-content:flex-start;
  }
}

/* PAQUETE 42: mejoras del tablero general de pedidos */
.pedidos-general-filtros-v2{
  grid-template-columns:repeat(2,minmax(145px,1fr)) repeat(2,minmax(220px,1.4fr)) minmax(260px,2fr) auto;
}

.pedidos-check-group{
  min-width:0;
  padding:10px 12px;
  border:1px solid rgba(71,56,36,.17);
  border-radius:14px;
  background:rgba(255,255,255,.7);
}

.pedidos-check-group legend{
  padding:0 5px;
  font-weight:900;
  color:#493a27;
}

.pedidos-check-option{
  display:flex !important;
  align-items:center;
  gap:7px;
  margin:4px 0 !important;
  font-weight:750 !important;
  cursor:pointer;
}

.pedidos-check-option input{
  width:auto !important;
  margin:0;
}

.pedidos-future-sources{
  grid-column:1/-1;
  padding:9px 12px;
  border:1px dashed rgba(71,56,36,.24);
  border-radius:13px;
  background:rgba(250,247,239,.72);
}

.pedidos-future-sources summary{
  cursor:pointer;
  font-weight:900;
}

.pedidos-future-options{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin:10px 0 5px;
}

.pedido-general-date-separator{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:15px;
  margin:24px 0 13px;
  padding:12px 16px;
  border-left:7px solid #c98a16;
  border-radius:13px;
  background:linear-gradient(90deg,#fff0b6,#fffdf7);
  box-shadow:0 7px 20px rgba(58,42,23,.08);
}

.pedido-general-date-label{
  display:block;
  font-size:1.15rem;
  font-weight:950;
  color:#3f301e;
}

.pedido-general-date-iso{
  font-size:.82rem;
  color:#806b4d;
}

.pedido-general-date-count{
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
  font-weight:900;
  white-space:nowrap;
}

.pedido-general-head-badges{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:6px;
}

.pedido-general-status{
  display:inline-flex;
  padding:5px 9px;
  border-radius:999px;
  font-size:.82rem;
  font-weight:950;
}

.estado-general-badge-pendiente{
  background:#fde68a;
  color:#6b4b00;
}

.estado-general-badge-problema{
  background:#fecaca;
  color:#8f1818;
}

.estado-general-badge-entregado{
  background:#bbf7d0;
  color:#14532d;
}

.estado-general-problema{
  border-color:rgba(190,24,24,.35);
}

.estado-general-entregado{
  opacity:.82;
}

.pedido-general-problema{
  margin:12px 18px 0;
  padding:9px 11px;
  border:1px solid #f4aaaa;
  border-radius:12px;
  background:#fff0f0;
  color:#7f1d1d;
}

.pedido-general-financial-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(120px,1fr));
  gap:8px;
  margin:14px 18px 0;
}

.pedido-general-financial-strip > div{
  display:grid;
  gap:3px;
  padding:9px 10px;
  border:1px solid rgba(71,56,36,.14);
  border-radius:12px;
  background:#fbf7ed;
}

.pedido-general-financial-strip span{
  font-size:.78rem;
  color:#73644e;
}

.pedido-general-financial-strip b{
  font-size:.98rem;
  color:#3e3020;
}

.pedido-general-products{
  margin:14px 18px 0;
  border:1px solid rgba(71,56,36,.15);
  border-radius:14px;
  background:rgba(255,255,255,.62);
}

.pedido-general-products > summary{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:950;
  color:#493a27;
}

.pedido-general-products > summary span{
  font-size:.82rem;
  color:#7b6b54;
}

.pedido-general-products .pedido-general-detalle-wrap{
  margin:0;
  border:0;
  border-top:1px solid rgba(71,56,36,.13);
  border-radius:0 0 14px 14px;
}

.pedido-general-audit{
  margin:0 18px 16px;
  padding:9px 11px;
  border:1px dashed rgba(71,56,36,.25);
  border-radius:12px;
  background:#f9f7f2;
}

.pedido-general-audit summary{
  cursor:pointer;
  font-weight:900;
}

.pedido-general-audit-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(150px,1fr));
  gap:9px;
  margin-top:10px;
}

.pedido-general-audit-grid > div{
  display:grid;
  gap:3px;
  padding:9px;
  border-radius:10px;
  background:#fff;
}

.pedido-general-audit-grid span,
.pedido-general-audit-grid small{
  color:#746853;
}

.pedidos-general-consolidado{
  margin-top:26px;
  padding:15px;
  border:1px solid rgba(71,56,36,.18);
  border-radius:18px;
  background:#fffdf8;
  box-shadow:0 10px 28px rgba(58,42,23,.08);
}

.pedidos-general-consolidado > summary{
  cursor:pointer;
  font-size:1.08rem;
  font-weight:950;
  color:#3f301e;
}

.pedidos-consolidado-dia h3{
  margin:18px 0 7px;
}

.pedidos-consolidado-table th:first-child,
.pedidos-consolidado-table td:first-child{
  text-align:right;
  white-space:nowrap;
}

@media (max-width:1250px){
  .pedidos-general-filtros-v2{
    grid-template-columns:repeat(2,minmax(170px,1fr));
  }

  .pedidos-general-search{
    grid-column:span 2;
  }
}

@media (max-width:760px){
  .pedidos-general-filtros-v2{
    grid-template-columns:1fr;
  }

  .pedidos-general-search{
    grid-column:auto;
  }

  .pedido-general-financial-strip,
  .pedido-general-audit-grid{
    grid-template-columns:1fr 1fr;
  }

  .pedido-general-date-separator{
    align-items:flex-start;
    flex-direction:column;
  }
}

@media (max-width:480px){
  .pedido-general-financial-strip,
  .pedido-general-audit-grid{
    grid-template-columns:1fr;
  }
}

/* PAQUETE 43: enlaces del consolidado a cada PostIt */
.pedido-general-card{
  scroll-margin-top:110px;
}

.pedidos-consolidado-referencias{
  min-width:170px;
}

.pedido-consolidado-link{
  display:inline-block;
  padding:2px 5px;
  border-radius:7px;
  color:#0759b7;
  font-weight:900;
  text-decoration:none;
}

.pedido-consolidado-link:hover,
.pedido-consolidado-link:focus{
  background:rgba(7,89,183,.12);
  text-decoration:underline;
}

.pedido-general-card:target,
.pedido-general-jump-active{
  outline:4px solid rgba(230,153,0,.92);
  outline-offset:5px;
  box-shadow:
    0 0 0 9px rgba(255,201,64,.24),
    0 18px 40px rgba(58,42,23,.24);
}

.pedido-general-jump-active{
  animation:pedidoGeneralJumpPulse 2.1s ease-out;
}

@keyframes pedidoGeneralJumpPulse{
  0%{
    transform:scale(1);
  }
  18%{
    transform:scale(1.018);
  }
  38%{
    transform:scale(1);
  }
  58%{
    transform:scale(1.012);
  }
  100%{
    transform:scale(1);
  }
}

/* PAQUETE 44: resumen consolidado inmediatamente después de cada día */
.pedidos-general-consolidado-dia{
  margin-top:18px;
  margin-bottom:10px;
}

.pedidos-general-consolidado-dia > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.pedidos-general-consolidado-dia[open]{
  background:#fffdf8;
}

/* PAQUETE 45: agrupación y navegación por estado */
.pedidos-state-section{
  margin:14px 0 22px;
  scroll-margin-top:105px;
  border-radius:18px;
  transition:box-shadow .25s ease, outline-color .25s ease;
}

.pedidos-state-separator{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
  padding:10px 14px;
  border-left:7px solid #a9864d;
  border-radius:12px;
  background:#f7f0df;
  color:#493a27;
}

.pedidos-state-separator span{
  font-size:1.03rem;
  font-weight:950;
}

.pedidos-state-separator b{
  white-space:nowrap;
}


.pedidos-state-section[data-state-code="EN_RUTA"] .pedidos-state-separator{
  border-left-color:#2563eb;
  background:#eef4ff;
}

.pedidos-state-section[data-state-code="LISTO"] .pedidos-state-separator{
  border-left-color:#0f766e;
  background:#eaf8f5;
}

.pedidos-state-section[data-state-code="NOTIFICADO"] .pedidos-state-separator{
  border-left-color:#7c3aed;
  background:#f3efff;
}

.pedidos-state-section.estado-general-problema .pedidos-state-separator{
  border-left-color:#b42318;
  background:#fff0ed;
}

.pedidos-state-section.estado-general-entregado .pedidos-state-separator{
  border-left-color:#2f7d4a;
  background:#edf8f0;
}

.pedidos-state-section-active{
  outline:4px solid rgba(230,153,0,.9);
  outline-offset:5px;
  box-shadow:0 0 0 9px rgba(255,201,64,.22);
}

.pedido-linea-produccion{
  display:flex;
  flex-wrap:wrap;
  gap:4px 10px;
  margin-top:5px;
  font-size:.84rem;
  color:#655947;
}

.pedidos-state-quick-nav{
  position:fixed;
  z-index:70;
  right:16px;
  top:160px;
  width:min(230px,calc(100vw - 32px));
  padding:10px;
  border:1px solid rgba(71,56,36,.2);
  border-radius:16px;
  background:rgba(255,253,248,.96);
  box-shadow:0 14px 34px rgba(58,42,23,.18);
  backdrop-filter:blur(8px);
}

.pedidos-state-nav-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
  font-weight:950;
  color:#493a27;
}

.pedidos-state-nav-head button{
  width:30px;
  height:30px;
  padding:0;
  border-radius:9px;
}

.pedidos-state-nav-actions{
  display:grid;
  gap:6px;
}

.pedidos-state-nav-button,
.pedidos-state-nav-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  padding:8px 10px;
  border:1px solid rgba(71,56,36,.16);
  border-radius:10px;
  background:#fff;
  color:#493a27;
  text-align:left;
  font-weight:850;
  cursor:pointer;
}

.pedidos-state-nav-button b{
  min-width:28px;
  padding:2px 7px;
  border-radius:999px;
  background:#f1eadb;
  text-align:center;
}

.pedidos-state-nav-button:hover,
.pedidos-state-nav-button:focus,
.pedidos-state-nav-button.is-active{
  border-color:#bf7d00;
  background:#fff5d4;
}


.pedidos-state-nav-button.state-en_ruta b{
  background:#e5edff;
  color:#1d4ed8;
}

.pedidos-state-nav-button.state-listo b{
  background:#dff6f0;
  color:#0f6b63;
}

.pedidos-state-nav-button.state-notificado b{
  background:#eee7ff;
  color:#6d28d9;
}

.pedidos-state-nav-button.state-problema b{
  background:#fee4e2;
  color:#912018;
}

.pedidos-state-nav-button.state-entregado b{
  background:#dff3e5;
  color:#23663a;
}

.pedidos-state-nav-top{
  margin-top:8px;
  justify-content:center;
}

.pedidos-state-quick-nav.is-collapsed{
  width:auto;
}

.pedidos-state-quick-nav.is-collapsed .pedidos-state-nav-actions,
.pedidos-state-quick-nav.is-collapsed .pedidos-state-nav-top{
  display:none;
}

.pedidos-consolidado-table td:nth-child(1),
.pedidos-consolidado-table td:nth-child(5){
  white-space:nowrap;
  text-align:right;
}

@media (max-width:850px){
  .pedidos-state-quick-nav{
    top:auto;
    right:10px;
    bottom:12px;
    width:min(240px,calc(100vw - 20px));
  }
}

/* PAQUETE 50: artículos prestados y notas visibles */
.prestamos-card-details{
  margin-top:10px;
  border:1px solid rgba(102,78,22,.22);
  border-radius:13px;
  background:rgba(255,255,255,.58);
  overflow:hidden;
}

.prestamos-card-details > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:900;
}

.prestamos-summary-count{
  font-size:.8rem;
  font-weight:800;
  text-align:right;
  color:#705214;
}

.prestamos-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  padding:0 10px 10px;
}

.prestamos-summary-grid > div{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:7px;
  border-radius:9px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(80,65,30,.12);
}

.prestamos-summary-grid span{
  font-size:.72rem;
  color:#695b3d;
}

.prestamos-entrega-section{
  margin:0 10px 10px;
  padding:10px;
  border-radius:11px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(80,65,30,.14);
}

.prestamos-entrega-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.prestamos-entrega-head > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.prestamos-entrega-head small,
.prestamos-table small{
  display:block;
  margin-top:2px;
  color:#6f6349;
}

.prestamos-status{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:900;
  white-space:nowrap;
}

.prestamos-status.is-applied{
  background:#dff3e5;
  color:#1d6a37;
}

.prestamos-status.is-saved{
  background:#fff0c7;
  color:#805d00;
}

.prestamos-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px 12px;
  margin-bottom:8px;
  font-size:.78rem;
}

.prestamos-table-wrap{
  overflow-x:auto;
}

.prestamos-table{
  width:100%;
  border-collapse:collapse;
  font-size:.78rem;
}

.prestamos-table th,
.prestamos-table td{
  padding:6px;
  border-bottom:1px dashed rgba(65,52,22,.18);
  text-align:left;
  vertical-align:top;
}

.prestamos-table th{
  font-size:.7rem;
  text-transform:uppercase;
  letter-spacing:.02em;
  color:#5e533b;
}

.prestamos-pending-value{
  color:#a34500;
}

.prestamos-missing-record{
  margin-top:9px;
  padding:9px 11px;
  border-radius:10px;
  border:1px dashed #aa7d11;
  background:rgba(255,240,190,.72);
  font-size:.8rem;
  font-weight:700;
}

.entrega-nota-visible{
  margin-top:9px;
  padding:9px 11px;
  border-radius:11px;
  border-left:5px solid #3f72af;
  background:#eef6ff;
  color:#20364e;
}

.entrega-nota-visible small{
  display:block;
  margin-top:4px;
  color:#5d7084;
}

.entrega-notas-history{
  margin-top:7px;
  border:1px solid rgba(50,90,130,.18);
  border-radius:10px;
  background:rgba(255,255,255,.55);
}

.entrega-notas-history > summary{
  display:flex;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:800;
}

.entrega-notas-list{
  display:grid;
  gap:7px;
  padding:0 10px 10px;
}

.entrega-notas-list > div{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px;
  border-radius:8px;
  background:rgba(255,255,255,.75);
}

.entrega-notas-list small{
  color:#657487;
}

.estado-nota-label{
  display:block;
  margin-top:8px;
  font-size:.78rem;
  font-weight:900;
}

.pedido-general-nota-visible{
  margin-bottom:9px;
}

.prestamos-general-details{
  margin-bottom:10px;
}

@media (max-width:700px){
  .prestamos-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .prestamos-card-details > summary{
    align-items:flex-start;
    flex-direction:column;
  }

  .prestamos-summary-count{
    text-align:left;
  }
}



/* PAQUETE 52: entregas parciales */
.estado-parcial,
.tape-label.estado-parcial{
  background:#ffd166;
  color:#4e3900;
}

.estado-section-parcial{
  border-color:rgba(203,145,0,.38);
}

.delivery-flash{
  margin:10px 0;
  padding:11px 14px;
  border-radius:12px;
  font-weight:800;
}

.delivery-flash.is-success{
  background:#e5f7ea;
  border:1px solid #86c99a;
  color:#1d6132;
}

.delivery-flash.is-error{
  background:#fff0ef;
  border:1px solid #e6a3a0;
  color:#8b2420;
}

.partial-delivery-card{
  margin-top:11px;
  border:1px solid rgba(68,86,105,.22);
  border-radius:14px;
  background:rgba(247,251,255,.82);
  overflow:hidden;
}

.partial-delivery-card > summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:11px 12px;
  cursor:pointer;
  font-weight:900;
}

.partial-summary-count{
  font-size:.8rem;
  color:#43566c;
  text-align:right;
}

.partial-state{
  display:inline-flex;
  margin-left:5px;
  padding:3px 7px;
  border-radius:999px;
  font-size:.7rem;
  text-transform:uppercase;
}

.partial-state-sin_entregas{
  background:#edf0f3;
  color:#4a5866;
}

.partial-state-parcial{
  background:#ffe38f;
  color:#6e4c00;
}

.partial-state-entregado{
  background:#dff3e5;
  color:#1d6a37;
}

.partial-progress-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
  padding:0 10px 10px;
}

.partial-progress-grid > div{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px;
  border-radius:10px;
  border:1px solid rgba(58,77,97,.12);
  background:rgba(255,255,255,.78);
}

.partial-progress-grid span{
  font-size:.72rem;
  color:#596a7a;
}

.partial-lines-wrap{
  overflow-x:auto;
  margin:0 10px 10px;
}

.partial-lines-table{
  width:100%;
  border-collapse:collapse;
  font-size:.78rem;
}

.partial-lines-table th,
.partial-lines-table td{
  padding:7px 6px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px dashed rgba(62,79,96,.18);
}

.partial-lines-table th{
  font-size:.69rem;
  text-transform:uppercase;
  color:#586b7b;
}

.partial-lines-table small{
  display:block;
  margin-top:2px;
  color:#6d7881;
}

.partial-lines-table tr.is-not-deliverable{
  opacity:.62;
}

.partial-delivery-form{
  display:grid;
  gap:9px;
  margin:10px;
  padding:11px;
  border-radius:12px;
  border:1px solid rgba(44,110,155,.2);
  background:#eef8ff;
}

.partial-form-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.partial-form-head > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.partial-form-head small{
  color:#587287;
}

.partial-fill-all{
  width:auto;
  padding:7px 9px;
  font-size:.75rem;
}

.partial-input-list{
  display:grid;
  gap:7px;
}

.partial-input-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 110px;
  align-items:center;
  gap:9px;
}

.partial-input-row > span{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.partial-input-row small{
  color:#607283;
}

.partial-input-row input{
  min-width:0;
}

.partial-history{
  margin:10px;
  border:1px solid rgba(58,78,98,.16);
  border-radius:11px;
  background:rgba(255,255,255,.7);
}

.partial-history > summary{
  display:flex;
  justify-content:space-between;
  padding:9px 10px;
  cursor:pointer;
  font-weight:900;
}

.partial-history-list{
  display:grid;
  gap:8px;
  padding:0 10px 10px;
}

.partial-history-item{
  padding:9px;
  border-radius:10px;
  border:1px solid rgba(58,78,98,.14);
  background:#fff;
}

.partial-history-item.is-annulled{
  opacity:.72;
  background:#f4f4f4;
}

.partial-history-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:8px;
}

.partial-history-head > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.partial-history-head small{
  color:#667685;
}

.partial-movement-status{
  padding:3px 7px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:900;
  background:#e2f4e7;
  color:#24683a;
}

.is-annulled .partial-movement-status{
  background:#ececec;
  color:#666;
}

.partial-history-note{
  margin-top:7px;
  padding:7px 9px;
  border-left:4px solid #4f83b3;
  background:#eef6ff;
  border-radius:7px;
}

.partial-history-products{
  display:grid;
  gap:3px;
  margin-top:7px;
  font-size:.78rem;
}

.partial-annulled-info{
  margin-top:7px;
  color:#7b3532;
  font-size:.77rem;
}

.partial-annul-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
  margin-top:9px;
}

.partial-annul-form button{
  width:auto;
}

.partial-general-card{
  margin-bottom:10px;
}

.partial-general-history{
  display:flex;
  flex-wrap:wrap;
  gap:5px 10px;
  padding:0 10px 10px;
  font-size:.76rem;
}

@media (max-width:700px){
  .partial-delivery-card > summary,
  .partial-form-head{
    align-items:flex-start;
    flex-direction:column;
  }

  .partial-summary-count{
    text-align:left;
  }

  .partial-progress-grid{
    grid-template-columns:1fr;
  }

  .partial-input-row{
    grid-template-columns:1fr;
  }

  .partial-annul-form{
    grid-template-columns:1fr;
  }
}


/* PAQUETE 53: flujo práctico de entregas parciales */
.estado-seguimiento_parcial,
.tape-label.estado-seguimiento_parcial{
  background:#ffb703;
  color:#3f2d00;
}

.estado-section-seguimiento_parcial{
  order:-100;
  border:2px solid rgba(235,151,0,.52);
  background:linear-gradient(
    180deg,
    rgba(255,244,204,.78),
    rgba(255,255,255,.36)
  );
}

.partial-tracking-alert{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 12px;
  margin:9px 0;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid #e0a21c;
  background:#fff3c9;
  color:#553b00;
}

.partial-tracking-alert > div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.partial-tracking-alert strong{
  align-self:center;
  white-space:nowrap;
}

.partial-tracking-alert small{
  grid-column:1 / -1;
  color:#735b24;
}

.partial-panel[hidden]{
  display:none !important;
}

.partial-register-more{
  margin:10px;
  border:1px solid rgba(44,110,155,.2);
  border-radius:11px;
  background:#eef8ff;
}

.partial-register-more > summary{
  padding:9px 10px;
  cursor:pointer;
  font-weight:900;
}

.partial-register-more .partial-delivery-form{
  margin:0;
  border:0;
  border-radius:0 0 11px 11px;
}

.partial-complete-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  margin:10px;
  padding:10px;
  border-radius:11px;
  border:1px solid #8bc69a;
  background:#ebf8ee;
}

.partial-complete-form button{
  width:auto;
}

.admin-delivery-config{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,520px);
  align-items:center;
  gap:18px;
  margin:14px 0;
  padding:16px;
  border-radius:14px;
  border:1px solid rgba(53,93,126,.18);
  background:#f4f9fd;
}

.admin-delivery-config h2{
  margin:0 0 5px;
}

.admin-delivery-config-form{
  display:grid;
  gap:10px;
}

.admin-config-checkbox{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:11px;
  border-radius:11px;
  background:#fff;
  border:1px solid rgba(53,93,126,.16);
}

.admin-config-checkbox input{
  margin-top:4px;
}

.admin-config-checkbox span{
  display:flex;
  flex-direction:column;
  gap:3px;
}

.admin-config-checkbox small{
  color:#617383;
}

@media (max-width:800px){
  .partial-tracking-alert,
  .admin-delivery-config{
    grid-template-columns:1fr;
  }

  .partial-tracking-alert strong{
    align-self:start;
  }

  .partial-complete-form{
    grid-template-columns:1fr;
  }
}


/* PAQUETE 54 */
.pedido-reference-general{
  margin:9px 0;
  padding:10px 12px;
  border-radius:11px;
  border-left:5px solid #d8871c;
  background:#fff7e8;
  color:#4f3a1d;
}
.pedido-reference-general > div{
  margin-top:4px;
  white-space:pre-wrap;
  text-align:justify;
}
.production-reference-general{margin-top:10px}

.partial-delivery-compact > summary{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:4px 10px;
}
.partial-note-chip,
.partial-expand-hint{grid-column:1/-1}
.partial-note-chip{
  display:block;
  padding:5px 8px;
  border-radius:8px;
  background:#fff4c9;
  color:#624900;
  font-size:.75rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.partial-expand-hint{
  color:#667583;
  font-size:.69rem;
  font-weight:700;
}
.postit-borrowed-tab{
  margin-top:9px;
  border:1px solid #9ab7d5;
  background:#f4f9ff;
}
.postit-borrowed-tab > summary{
  background:#e9f3ff;
  color:#214c76;
  border-radius:11px;
}

.general-partials-global{
  margin:12px 0 18px;
  padding:15px;
  border-radius:16px;
  border:2px solid rgba(220,145,15,.4);
  background:linear-gradient(180deg,#fff4ca,#fffaf0);
}
.general-partials-global-head{
  display:flex;justify-content:space-between;gap:12px;margin-bottom:12px;
}
.general-partials-global-head h2{margin:0}
.general-partials-global-head p{margin:4px 0 0;color:#6e5d35}
.general-partials-global-head>span{
  display:inline-flex;min-width:34px;height:34px;align-items:center;
  justify-content:center;border-radius:999px;background:#e29d21;
  color:#fff;font-weight:900;
}
.general-partials-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:11px;
}
.general-partial-card{
  padding:12px;border-radius:13px;border:1px solid rgba(111,83,26,.18);background:#fff;
}
.general-partial-card header{
  display:flex;justify-content:space-between;gap:9px;
}
.general-partial-card header>div{display:flex;flex-direction:column;gap:2px}
.general-partial-card header strong{white-space:nowrap;color:#9b5100}
.general-partial-meta{
  display:flex;flex-wrap:wrap;gap:5px 11px;margin-top:8px;font-size:.78rem;
}
.general-partial-totals{
  display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:9px 0;
}
.general-partial-totals>div{
  display:flex;flex-direction:column;gap:2px;padding:7px;border-radius:9px;background:#f4f7f8;
}
.general-partial-totals span{font-size:.69rem;color:#65727b}
.general-partial-lines{display:grid;gap:5px;padding:8px 0}
.general-partial-lines>div{
  display:flex;justify-content:space-between;gap:8px;padding:6px 0;
  border-bottom:1px dashed #d7d7d7;font-size:.77rem;
}
.general-partial-actions{margin-top:9px}
.general-partial-actions a{
  display:inline-flex;padding:7px 10px;border-radius:9px;background:#eaf4ff;
  color:#164b7c;font-weight:900;text-decoration:none;
}
@media(max-width:700px){
  .partial-delivery-compact>summary{grid-template-columns:1fr}
  .general-partial-totals{grid-template-columns:1fr}
  .general-partial-lines>div{flex-direction:column}
}

/* PAQUETE 55: correcciones de presentación y prioridad de parciales */
.partial-tracking-alert.partial-tracking-compact{
  display:block;
  margin:7px 0;
  padding:0;
  overflow:hidden;
}

.partial-tracking-compact > summary{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:7px 10px;
  padding:7px 9px;
  cursor:pointer;
  list-style-position:inside;
}

.partial-tracking-compact > summary::marker{
  color:#a86b00;
}

.partial-tracking-title{
  display:flex;
  flex-direction:column;
  min-width:0;
  gap:1px;
}

.partial-tracking-title small{
  color:#735b24;
  font-size:.72rem;
  font-weight:750;
}

.partial-tracking-compact > summary > strong{
  align-self:center;
  font-size:.8rem;
}

.partial-tracking-more{
  display:flex !important;
  flex-wrap:wrap;
  gap:4px 12px !important;
  padding:0 9px 8px;
  border-top:1px dashed rgba(168,107,0,.28);
  color:#735b24;
  font-size:.73rem;
}

.partial-tracking-more span{
  padding-top:6px;
}

.general-partials-global{
  scroll-margin-top:105px;
  order:-1000;
}

@media(max-width:700px){
  .partial-tracking-compact > summary{
    grid-template-columns:1fr;
  }

  .partial-tracking-compact > summary > strong{
    justify-self:start;
  }
}

.pedidos-state-nav-button.state-seguimiento_parcial{
  border-color:#dfa21f;
  background:#fff1bd;
  color:#684800;
}


/* package56-tabs-notes-reassign */
.delivery-tab-shell{
  margin-top:10px;
}

.delivery-tab-shell .delivery-tab-radio{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.delivery-tab-buttons{
  display:flex;
  gap:6px;
  margin:8px 0 10px;
}

.delivery-tab-buttons.single-tab{
  margin-bottom:8px;
}

.delivery-tab-button{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:8px 10px;
  border:1px solid rgba(198,156,58,.55);
  border-radius:12px 12px 0 0;
  background:#f5eaa5;
  color:#5e4513;
  font-weight:900;
  cursor:pointer;
  text-align:center;
}

.delivery-tab-button.is-static{
  cursor:default;
}

.delivery-tab-panels{
  border:1px solid rgba(198,156,58,.35);
  border-radius:0 14px 14px 14px;
  background:rgba(255,255,255,.18);
  padding:10px;
}

.delivery-tab-panel{
  display:block;
}

.delivery-tab-shell.has-prestamos .delivery-tab-panel{
  display:none;
}

.delivery-tab-shell.has-prestamos .radio-pedido:checked ~ .delivery-tab-buttons .tab-btn-pedido,
.delivery-tab-shell.has-prestamos .radio-prestados:checked ~ .delivery-tab-buttons .tab-btn-prestados,
.delivery-tab-button.is-active{
  background:#fff7cc;
  color:#3f2f08;
  box-shadow:inset 0 -3px 0 rgba(198,156,58,.45);
}

.delivery-tab-shell.has-prestamos .radio-pedido:checked ~ .delivery-tab-panels .panel-pedido{
  display:block;
}

.delivery-tab-shell.has-prestamos .radio-prestados:checked ~ .delivery-tab-panels .panel-prestados{
  display:block;
}

.prestamos-card-panel{
  background:transparent;
  border:none;
  padding:0;
}

.prestamos-card-panel .prestamos-summary-grid{
  margin-top:0;
}

.entrega-nota-visible{
  margin-top:12px;
}

.entrega-notas-history{
  margin-top:10px;
}

@media (max-width: 640px){
  .delivery-tab-buttons{
    flex-wrap:wrap;
  }

  .delivery-tab-button{
    min-height:34px;
    font-size:.92rem;
  }
}



/* package57-entregas-state-quick-nav */
.state-code-en_ruta,
.state-code-listo{ --state-accent:#2563eb; }
.state-code-seguimiento_parcial,
.state-code-parcial{ --state-accent:#d97706; }
.state-code-problema{ --state-accent:#dc2626; }
.state-code-notificado{ --state-accent:#7c3aed; }

/* package57-notas-nombres-pendiente */
.production-note-visible{
  margin:12px 0;
  padding:10px 12px;
  border:1px solid rgba(195,145,32,.34);
  border-left:5px solid #d99a1d;
  border-radius:12px;
  background:rgba(255,249,222,.92);
  color:#4b3511;
  line-height:1.38;
  overflow-wrap:anywhere;
}

.production-note-visible small{
  display:block;
  margin-top:5px;
  color:#765921;
  font-weight:800;
}

/* package58-history-and-delivery-range */
.production-notes-history,
.problem-history-details{
  margin-top:10px;
  border:1px solid rgba(148,116,43,.28);
  border-radius:12px;
  background:rgba(255,255,255,.42);
  overflow:hidden;
}

.production-notes-history > summary,
.problem-history-details > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 11px;
  cursor:pointer;
  font-weight:900;
  color:#5c4514;
}

.production-notes-history > summary span,
.problem-history-details > summary span{
  min-width:24px;
  padding:2px 7px;
  border-radius:999px;
  background:#f4df86;
  text-align:center;
  font-size:11px;
}

.production-notes-list,
.problem-history-list{
  display:grid;
  gap:8px;
  padding:0 10px 10px;
}

.production-note-history-item,
.problem-history-item{
  display:grid;
  gap:4px;
  padding:9px 10px;
  border:1px solid rgba(148,116,43,.20);
  border-radius:10px;
  background:#fffdf3;
}

.production-note-history-item small,
.problem-history-meta{
  color:#6b7280;
  font-size:11px;
}

.problem-history-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.problem-history-state{
  padding:3px 8px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  font-size:11px;
  font-weight:900;
}

.problem-history-item.is-open .problem-history-state{
  background:#fee2e2;
  color:#991b1b;
}

.problem-resolution-box{
  display:grid;
  gap:3px;
  margin-top:4px;
  padding:8px;
  border-left:4px solid #22c55e;
  border-radius:8px;
  background:#f0fdf4;
}

.entregas-range-filter > div{
  min-width:145px;
}

.entregas-range-filter .entregas-search-field{
  min-width:260px;
}

@media (max-width: 720px){
  .entregas-range-filter > div,
  .entregas-range-filter .entregas-search-field{
    min-width:0;
    width:100%;
  }
}

/* package60-mobile-ux-menu-filters */
.mobile-nav-toggle{
  display:none;
}

@media (max-width: 720px){
  .topbar{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:center;
    gap:8px;
    min-height:54px;
    padding:8px 10px;
  }

  .topbar .brand{
    min-width:0;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:16px;
    line-height:1.1;
  }

  .topbar .brand::before{
    flex:0 0 auto;
    width:12px;
    height:12px;
  }

  .mobile-nav-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    padding:0;
    border:1px solid rgba(255,255,255,.28);
    border-radius:13px;
    background:rgba(255,255,255,.12);
    color:#fff;
    box-shadow:none;
    font-size:22px;
    line-height:1;
  }

  .mobile-nav-toggle:hover,
  .mobile-nav-toggle:focus-visible{
    transform:none;
    background:rgba(255,255,255,.20);
    outline:2px solid rgba(255,230,0,.65);
    outline-offset:2px;
  }

  .topbar .nav,
  .topbar .userbox{
    display:none;
    grid-column:1 / -1;
  }

  .topbar.mobile-nav-open .nav{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:6px;
    width:100%;
    max-height:min(58vh, 430px);
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:8px 0 2px;
  }

  .topbar.mobile-nav-open .nav-group{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    grid-column:1 / -1;
    gap:6px;
    width:100%;
  }

  .topbar.mobile-nav-open .nav-title{
    grid-column:1 / -1;
    margin:4px 2px 0;
    font-size:10px;
  }

  .topbar.mobile-nav-open .nav > a,
  .topbar.mobile-nav-open .nav-group > a{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:38px;
    padding:7px 8px;
    border-radius:12px;
    text-align:center;
    font-size:12px;
    line-height:1.15;
  }

  .topbar.mobile-nav-open .userbox{
    display:flex;
    align-items:center;
    gap:7px;
    width:100%;
    padding-top:7px;
    border-top:1px solid rgba(255,255,255,.18);
    font-size:11px;
  }

  .topbar.mobile-nav-open .userbox a{
    width:auto;
    min-height:34px;
    padding:6px 10px;
  }

  body.tablero-fullwidth .container{
    padding:6px;
  }

  .tablero-compact-head{
    gap:8px;
    margin:5px 0 8px;
    padding:10px;
    border-radius:15px;
  }

  .tablero-titleblock{
    min-width:0;
    width:100%;
  }

  .tablero-titleblock h1{
    font-size:23px;
    line-height:1.05;
  }

  .tablero-titleblock .hint{
    margin-top:3px;
    font-size:11px;
    line-height:1.25;
  }

  .tablero-controls{
    gap:7px;
  }

  .tablero-tabs-inline{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:6px;
    width:100%;
  }

  .tablero-tabs-inline .tab{
    width:100%;
    min-height:38px;
    padding:7px 6px;
    font-size:13px;
    line-height:1.1;
    text-align:center;
  }

  .entregas-range-filter.mobile-compact-filter{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    align-items:end;
    gap:7px 8px;
    width:100%;
    padding:9px;
    border:1px solid rgba(58,42,20,.12);
    border-radius:14px;
    background:rgba(255,255,255,.66);
  }

  .entregas-range-filter.mobile-compact-filter > div{
    min-width:0;
    width:100%;
  }

  .entregas-range-filter.mobile-compact-filter > div:nth-child(3),
  .entregas-range-filter.mobile-compact-filter .entregas-search-field{
    grid-column:1 / -1;
  }

  .entregas-range-filter.mobile-compact-filter label{
    margin-bottom:2px;
    font-size:10px;
  }

  .entregas-range-filter.mobile-compact-filter input,
  .entregas-range-filter.mobile-compact-filter select{
    width:100%;
    min-width:0;
    height:38px;
    padding:6px 8px;
    font-size:13px;
  }

  .entregas-range-filter.mobile-compact-filter .compact-check{
    grid-column:1;
    display:flex;
    align-items:center;
    justify-content:flex-start;
    width:100%;
    min-height:38px;
    height:auto;
    margin:0;
    padding:6px 8px;
    border:1px solid rgba(58,42,20,.12);
    border-radius:11px;
    background:#fff;
    white-space:normal;
    font-size:11px;
  }

  .entregas-range-filter.mobile-compact-filter > button{
    grid-column:2;
    width:100%;
    min-height:38px;
    margin:0;
    padding:7px 10px;
  }

  .filter-summary-row,
  .compact-board-top{
    gap:5px;
    margin:6px 0 8px;
  }

  .filter-summary-row .kpi,
  .compact-board-top .kpi{
    padding:5px 8px;
    font-size:10.5px;
  }

  .tablero-v2-page{
    padding-bottom:78px;
  }

  .state-quick-nav{
    left:8px;
    right:70px;
    bottom:10px;
    width:auto;
    padding:6px;
  }

  .state-quick-nav-head{
    display:flex;
    margin-bottom:6px;
  }

  .state-quick-nav-actions{
    flex-direction:row;
    overflow-x:auto;
    padding-bottom:1px;
  }

  .state-quick-nav.is-collapsed{
    left:auto;
    right:70px;
    width:44px;
    padding:5px;
  }

  .state-quick-nav.is-collapsed .state-quick-nav-head{
    display:flex;
    justify-content:center;
    margin:0;
  }

  .state-quick-nav.is-collapsed .state-quick-nav-title,
  .state-quick-nav.is-collapsed .state-quick-nav-actions,
  .state-quick-nav.is-collapsed .state-quick-top{
    display:none;
  }

  .state-quick-nav.is-collapsed .state-quick-nav-collapse{
    width:32px;
    height:32px;
  }

  .floating-refresh{
    right:10px;
    bottom:10px;
    width:46px;
    height:46px;
    padding:0;
    justify-content:center;
  }
}

@media (max-width: 390px){
  .topbar .brand{
    font-size:14px;
  }

  .tablero-titleblock h1{
    font-size:21px;
  }

  .tablero-tabs-inline .tab{
    font-size:12px;
  }
}


/* package62-users-v2-task-permissions-audit */
.permission-groups{
  display:grid;
  gap:16px;
}

.permission-group{
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
  background:rgba(255,255,255,.48);
}

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

.permission-group-head h3{
  margin:0;
  font-size:1rem;
}

.permission-group-head span{
  color:var(--text-soft);
  font-size:.82rem;
  font-weight:800;
}

.permission-card{
  min-height:104px;
}

.permission-code{
  display:inline-flex;
  margin-top:7px;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(34,48,68,.08);
  color:var(--text-soft);
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.02em;
  word-break:break-all;
}

@media (max-width: 640px){
  .permission-group{
    padding:10px;
  }

  .permission-group-head{
    align-items:flex-start;
  }

  .permission-card{
    min-height:0;
  }
}

/* package63-tasks-core */
.tasks-page,
.task-form-page,
.task-detail-page{
  max-width:1600px;
  margin:0 auto;
}

.tasks-page-head,
.task-form-head,
.task-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

.tasks-page-head h1,
.task-form-head h1,
.task-detail-head h1{
  margin:0;
}

.tasks-page-head p,
.task-form-head p{
  margin:6px 0 0;
  color:var(--text-soft);
  font-weight:700;
}

.tasks-new-button{
  white-space:nowrap;
}

.tasks-scope-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.tasks-filter{
  display:grid;
  grid-template-columns:repeat(6,minmax(130px,1fr));
  gap:10px;
  align-items:end;
  margin-bottom:14px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:18px;
  background:rgba(255,255,255,.78);
  box-shadow:var(--shadow-sm);
}

.tasks-filter label{
  min-width:0;
}

.tasks-filter input,
.tasks-filter select{
  width:100%;
}

.tasks-search-field{
  grid-column:span 2;
}

.tasks-closed-check{
  align-self:center;
}

.tasks-kpis{
  margin-bottom:18px;
}

.tasks-state-section{
  scroll-margin-top:90px;
  margin-bottom:28px;
}

.tasks-board{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:18px;
}

.task-postit{
  position:relative;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:12px;
  border-left:7px solid #d0aa22;
}

.task-postit.priority-baja{border-left-color:#7aa36d;}
.task-postit.priority-normal{border-left-color:#d0aa22;}
.task-postit.priority-alta{border-left-color:#e67e22;}
.task-postit.priority-urgente{border-left-color:#d7192d;}
.task-postit.is-overdue{box-shadow:0 0 0 3px rgba(215,25,45,.13),var(--shadow);}

.task-postit-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}

.task-postit h2{
  margin:3px 0 0;
  font-size:1.15rem;
  line-height:1.18;
}

.task-number{
  display:block;
  font-size:.76rem;
  letter-spacing:.05em;
  font-weight:1000;
  color:#654800;
}

.task-priority{
  padding:5px 9px;
  border-radius:999px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(80,60,10,.16);
  font-size:.78rem;
  font-weight:1000;
  white-space:nowrap;
}

.task-badges{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.task-blocks-time{
  background:#fff0d5;
  border-color:#e7a849;
  color:#7d4700;
}

.task-description{
  margin:0;
  white-space:pre-line;
  line-height:1.42;
}

.task-dates{
  display:grid;
  gap:4px;
  padding:9px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.55);
}

.task-dates span{
  display:block;
}

.task-overdue-text,
.task-info-grid .is-overdue{
  color:#b41424;
}

.task-progress-summary,
.task-progress-large{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.task-progress-large{
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin-top:14px;
}

.task-progress-summary > div,
.task-progress-large > div{
  padding:9px;
  border-radius:12px;
  background:rgba(255,255,255,.65);
}

.task-progress-summary span,
.task-progress-large span,
.task-info-grid span{
  display:block;
  color:var(--text-soft);
  font-size:.78rem;
  font-weight:900;
}

.task-progress-bar{
  height:9px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(70,55,10,.14);
}

.task-progress-bar span{
  display:block;
  height:100%;
  min-width:0;
  max-width:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#f0b323,#58a55c);
}

.task-progress-bar.is-large{
  height:13px;
  margin-top:9px;
}

.task-location{
  display:grid;
  gap:3px;
  padding-top:8px;
  border-top:1px dashed rgba(80,60,10,.18);
}

.task-open-button{
  margin-top:auto;
  text-align:center;
}

.tarea-estado-pendiente{background:#f3d33b;color:#3b2c00;}
.tarea-estado-en_proceso{background:#a8c8ff;color:#173d77;}
.tarea-estado-parcial{background:#ffd59a;color:#7a3d00;}
.tarea-estado-bloqueada{background:#f5a3aa;color:#7d1520;}
.tarea-estado-terminada{background:#9edaa1;color:#17551b;}
.tarea-estado-cancelada{background:#d5d5d5;color:#4c4c4c;}

/* Navegación flotante del tablero de tareas. */
.tasks-page{padding-bottom:92px;}
.tasks-state-quick-nav .state-quick-btn:disabled{cursor:not-allowed;opacity:.48;filter:grayscale(.35);transform:none;}
.state-code-parcial{--state-accent:#d97706;}
.state-code-bloqueada{--state-accent:#dc2626;}
.state-code-terminada{--state-accent:#16a34a;}
.state-code-cancelada{--state-accent:#6b7280;}
@media (max-width:720px){.tasks-page{padding-bottom:142px;}.tasks-state-quick-nav .state-quick-top{display:flex;}}

.task-back-link{
  display:inline-block;
  margin-bottom:8px;
  color:#8c6500;
  font-weight:900;
  text-decoration:none;
}

.task-form{
  display:grid;
  gap:16px;
}

.task-form-section,
.task-card{
  padding:18px;
  border:1px solid var(--border);
  border-radius:20px;
  background:rgba(255,255,255,.86);
  box-shadow:var(--shadow-sm);
}

.task-form-section h2,
.task-card h2{
  margin:0 0 12px;
  font-size:1.08rem;
}

.task-form-grid,
.task-action-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.task-form-grid .span-2,
.task-action-form .span-2{
  grid-column:span 2;
}

.task-form textarea,
.task-action-form textarea,
.task-side-form textarea{
  width:100%;
  resize:vertical;
}

.task-form-hint,
.task-muted{
  margin:0 0 12px;
  color:var(--text-soft);
}

.task-check-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
}

.task-check-card input{
  width:auto;
}

.task-check-card span,
.task-check-card small{
  display:block;
}

.task-check-card small{
  margin-top:3px;
  color:var(--text-soft);
}

.task-form-actions{
  position:sticky;
  bottom:10px;
  z-index:5;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background:rgba(255,255,255,.94);
  box-shadow:var(--shadow);
}

.task-detail-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.task-detail-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:18px;
  align-items:start;
}

.task-main-column,
.task-side-column{
  display:grid;
  gap:16px;
}

.task-summary-card{
  border-left:8px solid #d0aa22;
}
.task-summary-card.priority-baja{border-left-color:#7aa36d;}
.task-summary-card.priority-normal{border-left-color:#d0aa22;}
.task-summary-card.priority-alta{border-left-color:#e67e22;}
.task-summary-card.priority-urgente{border-left-color:#d7192d;}

.task-detail-description{
  margin-top:14px;
  padding:14px;
  border-radius:14px;
  background:#fff9d9;
  white-space:pre-line;
  line-height:1.5;
}

.task-info-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:10px;
  margin-top:14px;
}

.task-info-grid > div{
  padding:10px;
  border-radius:12px;
  background:#f8f8f8;
}

.task-info-grid small{
  display:block;
  margin-top:3px;
  color:var(--text-soft);
}

.task-logistics-box{
  display:grid;
  gap:7px;
  margin-top:14px;
  padding:14px;
  border-left:4px solid #e7a61c;
  border-radius:12px;
  background:#fff8e7;
}

.task-action-form button{
  justify-self:start;
}

.task-timeline{
  display:grid;
  gap:10px;
}

.task-timeline-item{
  padding:12px;
  border-left:4px solid #d3aa2e;
  border-radius:10px;
  background:#f8f8f8;
}

.task-timeline-item.is-cancelled{
  opacity:.68;
  border-left-color:#999;
}

.task-timeline-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
}

.task-timeline-item p{
  margin:7px 0;
  white-space:pre-line;
}

.task-timeline-item small{
  color:var(--text-soft);
}

.task-annulled{
  margin-top:8px;
  color:#a21724;
}

.task-inline-action{
  margin-top:8px;
}

.task-inline-action form,
.task-side-form{
  display:grid;
  gap:9px;
  margin-top:9px;
}

.task-history-details > summary{
  cursor:pointer;
  font-weight:1000;
}

.task-history-details > summary span{
  margin-left:6px;
  padding:2px 7px;
  border-radius:999px;
  background:#eee;
}

.task-history-details[open] > summary{
  margin-bottom:12px;
}

.task-danger-card{
  border-color:#efb6bb;
  background:#fff7f8;
}

.task-danger-card summary{
  cursor:pointer;
  color:#a31422;
  font-weight:1000;
}

@media (max-width: 1100px){
  .tasks-filter{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .task-detail-grid{
    grid-template-columns:1fr;
  }

  .task-side-column{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 720px){
  .tasks-page-head,
  .task-form-head,
  .task-detail-head{
    display:grid;
    gap:10px;
  }

  .tasks-new-button{
    width:100%;
    text-align:center;
  }

  .tasks-filter{
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:10px;
  }

  .tasks-filter .tasks-search-field,
  .tasks-filter button,
  .tasks-filter > .tab,
  .tasks-filter .tasks-closed-check{
    grid-column:span 2;
  }

  .tasks-filter button,
  .tasks-filter > .tab{
    text-align:center;
  }

  .tasks-board{
    grid-template-columns:1fr;
  }

  .task-postit{
    padding:14px;
  }

  .task-form-grid,
  .task-action-form,
  .task-side-column{
    grid-template-columns:1fr;
  }

  .task-form-grid .span-2,
  .task-action-form .span-2{
    grid-column:span 1;
  }

  .task-progress-large{
    grid-template-columns:1fr 1fr;
  }

  .task-progress-large > div:first-child{
    grid-column:span 2;
  }

  .task-form-section,
  .task-card{
    padding:14px;
  }

  .task-form-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .task-form-actions > *{
    text-align:center;
  }
}

/* package64-collaborative-tasks */
.task-users-picker{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  max-height:310px;
  overflow:auto;
  padding:10px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.72);
}

.task-users-picker.is-compact{
  grid-template-columns:1fr;
  max-height:270px;
}

.task-user-option{
  display:flex;
  gap:9px;
  align-items:flex-start;
  padding:9px;
  border:1px solid rgba(20,40,60,.12);
  border-radius:11px;
  background:#fff;
  cursor:pointer;
}

.task-user-option input{
  width:auto;
  margin-top:3px;
}

.task-user-option span{
  display:grid;
  gap:2px;
  min-width:0;
}

.task-user-option small{
  color:var(--text-soft);
}

.task-field-label{
  display:block;
  margin-bottom:6px;
  color:var(--text-soft);
  font-weight:900;
}

.task-responsibles-box,
.task-postit-responsibles{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(100,75,20,.16);
}

.task-responsible-chips{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:7px;
}

.task-responsible-chips > span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(30,60,90,.14);
  font-weight:850;
}

.task-responsible-chips small{
  padding:2px 5px;
  border-radius:999px;
  background:rgba(30,90,160,.10);
  color:var(--text-soft);
  font-size:.72rem;
}

.task-open-problem-banner,
.task-problem-chip,
.task-report-problem-box{
  border:1px solid rgba(190,55,35,.36);
  background:rgba(255,226,218,.88);
  color:#72271c;
  border-radius:14px;
}

.task-open-problem-banner{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  padding:14px;
  margin-bottom:14px;
}

.task-open-problem-banner p{
  margin:5px 0;
}

.task-open-problem-banner details{
  min-width:min(340px,100%);
}

.task-open-problem-banner form,
.task-report-problem-box form{
  display:grid;
  gap:8px;
  margin-top:8px;
}

.task-problem-chip{
  padding:9px 11px;
  margin-top:10px;
}

.task-report-problem-box{
  padding:12px;
}

.task-action-split{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px;
}

.task-problem-resolution{
  display:grid;
  gap:3px;
  margin-top:8px;
  padding:9px;
  border-radius:10px;
  background:rgba(32,135,70,.10);
}

.task-timeline-item.is-problem-open{
  border-color:rgba(190,55,35,.35);
  background:rgba(255,238,233,.78);
}

.task-map-button{
  display:inline-flex;
  width:max-content;
  margin-top:9px;
}

.task-section-head,
.embedded-tasks-head,
.embedded-tasks-head-actions{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}

.task-section-head h2,
.embedded-tasks-head h2{
  margin:0;
}

.task-section-head p,
.embedded-tasks-head p{
  margin:4px 0 0;
  color:var(--text-soft);
}

.task-attachments-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}

.task-attachment-card{
  display:grid;
  gap:8px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:13px;
  background:#fff;
  overflow:hidden;
}

.task-attachment-card img{
  display:block;
  width:100%;
  height:150px;
  object-fit:cover;
  border-radius:9px;
}

.task-attachment-card > div{
  display:grid;
  gap:4px;
}

.task-attachment-card p{
  margin:0;
}

.task-attachment-card small{
  color:var(--text-soft);
}

.task-attachment-type{
  width:max-content;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(35,100,170,.10);
  font-size:.76rem;
  font-weight:900;
}

.task-add-attachment-details{
  margin-top:12px;
}

.task-attachment-form-list{
  display:grid;
  gap:8px;
}

.task-attachment-form-row{
  display:grid;
  grid-template-columns:150px 1fr 1.5fr 1fr;
  gap:8px;
}

.task-add-attachment-row{
  margin-top:10px;
  background:linear-gradient(135deg,#4c647a,#30485d);
}

.task-embed-host[aria-busy="true"]{
  min-height:54px;
  margin:12px 0;
  border-radius:14px;
  background:linear-gradient(90deg,rgba(255,255,255,.25),rgba(255,255,255,.75),rgba(255,255,255,.25));
  background-size:200% 100%;
  animation:taskEmbedLoading 1.2s linear infinite;
}

@keyframes taskEmbedLoading{
  to{background-position:-200% 0;}
}

.embedded-tasks-section{
  margin:16px 0 20px;
  padding:14px;
  border:1px solid rgba(90,70,20,.24);
  border-radius:18px;
  background:rgba(255,248,205,.46);
  box-shadow:var(--shadow-sm);
}

.embedded-tasks-head{
  margin-bottom:12px;
}

.embedded-tasks-head-actions{
  align-items:center;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.embedded-task-state + .embedded-task-state{
  margin-top:14px;
}

.embedded-tasks-board{
  grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
}

.embedded-task-postit{
  min-width:0;
}

.embedded-task-main-actions{
  display:flex;
  gap:8px;
  align-items:stretch;
  margin-top:auto;
  padding-top:12px;
}

.embedded-task-main-actions > *{
  flex:1;
}

.embedded-task-actions{
  position:relative;
}

.embedded-task-actions > summary{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:8px 12px;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(30,60,90,.20);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
  list-style:none;
}

.embedded-task-actions > summary::-webkit-details-marker{display:none;}

.embedded-task-actions-body{
  display:grid;
  gap:9px;
  margin-top:8px;
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.92);
}

.embedded-task-actions-body form{
  display:grid;
  gap:7px;
}

.embedded-task-inline-form{
  padding-top:8px;
  border-top:1px solid rgba(30,60,90,.10);
}

.pedidos-task-embed{
  margin-top:14px;
}

@media (max-width: 980px){
  .task-users-picker{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .task-attachments-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .task-attachment-form-row{
    grid-template-columns:1fr 1fr;
  }

  .task-action-split{
    grid-template-columns:1fr;
  }
}

@media (max-width: 720px){
  .task-users-picker{
    grid-template-columns:1fr;
    max-height:280px;
  }

  .task-open-problem-banner,
  .task-section-head,
  .embedded-tasks-head,
  .embedded-tasks-head-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .task-open-problem-banner details{
    min-width:0;
  }

  .task-attachments-grid,
  .task-attachment-form-row{
    grid-template-columns:1fr;
  }

  .task-attachment-card img{
    height:190px;
  }

  .embedded-tasks-section{
    padding:10px;
    margin:12px 0 16px;
  }

  .embedded-task-main-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
  }
}


/* package65-compact-task-partial-cards-assignee-search */
@media (min-width: 721px){
  .tasks-board,
  .embedded-tasks-board{
    grid-template-columns:repeat(auto-fill,minmax(330px,420px));
    justify-content:start;
  }

  .task-postit,
  .embedded-task-postit{
    width:100%;
    max-width:420px;
  }

  .general-partials-grid{
    grid-template-columns:repeat(auto-fill,minmax(360px,480px));
    justify-content:start;
  }

  .general-partial-card{
    width:100%;
    max-width:480px;
  }
}

.task-assignee-toolbar{
  display:grid;
  grid-template-columns:minmax(260px,1fr) auto;
  align-items:end;
  gap:10px;
  margin-bottom:9px;
}

.task-assignee-search-field{
  min-width:0;
}

.task-assignee-search-field > span{
  display:block;
  margin-bottom:5px;
  color:var(--text-soft);
  font-size:.78rem;
  font-weight:900;
}

.task-assignee-search-field input{
  width:100%;
  min-height:42px;
  padding-left:38px;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:12px center;
}

.task-assignee-search-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-height:42px;
}

.task-assignee-search-count{
  color:var(--text-soft);
  font-size:.78rem;
  font-weight:850;
  white-space:nowrap;
}

.task-assignee-clear{
  min-height:36px;
  padding:7px 11px;
}

.task-assignee-no-results{
  margin-top:8px;
  padding:11px 12px;
  border:1px dashed var(--border-strong);
  border-radius:12px;
  background:rgba(255,255,255,.72);
  color:var(--text-soft);
  font-weight:850;
  text-align:center;
}

.task-user-option[hidden],
.task-assignee-no-results[hidden],
.task-assignee-clear[hidden]{
  display:none !important;
}

@media (max-width: 720px){
  .tasks-board,
  .embedded-tasks-board,
  .general-partials-grid{
    grid-template-columns:minmax(0,1fr);
  }

  .task-postit,
  .embedded-task-postit,
  .general-partial-card{
    width:100%;
    max-width:none;
  }

  .task-assignee-toolbar{
    grid-template-columns:1fr;
    gap:6px;
  }

  .task-assignee-search-actions{
    justify-content:space-between;
    min-height:34px;
  }
}

/* package66-task-items-collapsible-panels */
.task-form-panel{
  padding:0;
  overflow:hidden;
}

.task-form-panel > summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:17px 18px;
  cursor:pointer;
  font-weight:1000;
  list-style:none;
  background:rgba(255,255,255,.52);
}

.task-form-panel > summary::-webkit-details-marker{display:none;}
.task-form-panel > summary::after{
  content:"＋";
  font-size:1.15rem;
  line-height:1;
}
.task-form-panel[open] > summary::after{content:"−";}
.task-form-panel > summary span{font-size:1.05rem;}
.task-form-panel > summary small{
  margin-left:auto;
  color:var(--text-soft);
  font-weight:800;
}
.task-form-panel-body{
  padding:18px;
  border-top:1px solid var(--border);
}
.task-form-panel-body.task-form-grid{display:grid;}

.task-item-form-list{
  display:grid;
  gap:10px;
  margin-bottom:12px;
}
.task-item-form-row{
  display:grid;
  grid-template-columns:minmax(240px,2fr) minmax(110px,.7fr) minmax(150px,1fr) auto;
  gap:10px;
  align-items:end;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.72);
}
.task-item-form-row label{margin:0;}
.task-item-form-row input{width:100%;}
.task-item-row-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:flex-end;
  gap:6px;
  min-width:96px;
}
.task-item-row-actions small{
  color:var(--text-soft);
  font-weight:800;
  text-align:right;
}
.task-add-item-row{margin-top:2px;}
.task-evidence-check{margin:0 0 14px;}

.task-items-postit-list{
  display:grid;
  gap:6px;
  margin:10px 0;
}
.task-item-postit-line{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.55);
  border:1px solid rgba(123,92,12,.12);
}
.task-item-postit-line > span{min-width:0;}
.task-item-postit-line small{
  flex:0 0 auto;
  font-weight:900;
  color:var(--text-soft);
}
.task-item-postit-line.is-complete{
  opacity:.72;
  text-decoration:line-through;
}
.task-items-more{font-weight:800;color:var(--text-soft);}

.task-items-detail-card .task-section-head{margin-bottom:12px;}
.task-item-progress-list{display:grid;gap:12px;}
.task-item-progress-card{
  padding:14px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.72);
}
.task-item-progress-card.is-complete{
  background:rgba(215,248,222,.65);
}
.task-item-progress-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.task-item-progress-head > div{display:grid;gap:3px;}
.task-item-progress-head span{
  color:var(--text-soft);
  font-size:.78rem;
  font-weight:900;
  text-transform:uppercase;
}
.task-item-progress-head b{font-size:1.05rem;}
.task-item-progress-head strong{white-space:nowrap;}
.task-item-progress-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin-top:8px;
  font-size:.9rem;
}
.task-item-progress-action{margin-top:10px;}
.task-item-progress-action > summary{
  cursor:pointer;
  font-weight:900;
}
.task-item-progress-action .task-action-form{margin-top:10px;}
.embedded-task-item-actions{display:grid;gap:10px;}
.embedded-task-item-actions .embedded-task-inline-form{
  padding:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.66);
}
.embedded-task-item-actions small{display:block;margin-bottom:6px;}

@media (max-width: 760px){
  .task-form-panel > summary{
    padding:14px;
    align-items:flex-start;
  }
  .task-form-panel > summary small{
    font-size:.76rem;
    text-align:right;
  }
  .task-form-panel-body{padding:14px;}
  .task-item-form-row{
    grid-template-columns:1fr 1fr;
  }
  .task-item-detail-field{grid-column:1 / -1;}
  .task-item-row-actions{
    grid-column:1 / -1;
    align-items:stretch;
  }
  .task-item-row-actions small{text-align:left;}
  .task-item-progress-head{display:grid;}
  .task-item-progress-head strong{white-space:normal;}
}

@media (max-width: 480px){
  .task-item-form-row{grid-template-columns:1fr;}
  .task-item-detail-field,
  .task-item-row-actions{grid-column:auto;}
}

/* =========================================================
   PAQUETE 69 - NOTAS OPERATIVAS COMPARTIDAS
   ========================================================= */
.shared-notes-card{
  margin:12px 0;
  padding:10px;
  border:1px solid rgba(30,91,146,.28);
  border-left:5px solid #2d7ab7;
  border-radius:14px;
  background:rgba(240,248,255,.78);
}

.shared-notes-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.shared-notes-head > div:first-child{
  min-width:0;
}

.shared-notes-head b{
  display:block;
}

.shared-notes-head small{
  display:block;
  margin-top:2px;
  color:var(--text-soft, #5f6670);
}

.shared-notes-counters{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}

.shared-notes-counters > span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  min-height:28px;
  padding:4px 9px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(30,91,146,.22);
  font-weight:900;
}

.shared-notes-counters .shared-note-pending-count{
  background:#fff3c4;
  border-color:#e4a91a;
  color:#6e4b00;
}

.shared-note-latest{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:#fff;
  border:1px solid rgba(30,91,146,.20);
}

.shared-note-latest.is-pending{
  border-left:5px solid #e3a318;
  background:#fff9df;
}

.shared-note-latest-label,
.shared-note-item-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.shared-note-text{
  margin-top:6px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  line-height:1.38;
}

.shared-note-meta{
  display:flex;
  flex-wrap:wrap;
  gap:5px 10px;
  margin-top:8px;
  font-size:.82rem;
  color:var(--text-soft, #5f6670);
}

.shared-note-emphasis{
  display:inline-flex;
  padding:3px 7px;
  border-radius:999px;
  background:#ffe7a3;
  color:#6d4700;
  font-weight:900;
}

.shared-note-status{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  background:#e9eef3;
  color:#33404b;
  font-size:.76rem;
  font-weight:900;
  white-space:nowrap;
}

.shared-note-status.is-pending{
  background:#ffe39a;
  color:#694500;
}

.shared-note-status.is-attended{
  background:#dff4df;
  color:#205e2a;
}

.shared-notes-empty{
  margin-top:8px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.72);
  color:var(--text-soft, #5f6670);
  font-size:.88rem;
}

.shared-notes-history,
.shared-note-create,
.shared-note-attend{
  margin-top:9px;
  border:1px solid rgba(30,91,146,.18);
  border-radius:11px;
  background:rgba(255,255,255,.72);
}

.shared-notes-history > summary,
.shared-note-create > summary,
.shared-note-attend > summary{
  cursor:pointer;
  padding:9px 10px;
  font-weight:900;
}

.shared-notes-history > summary span{
  float:right;
  min-width:24px;
  padding:2px 7px;
  border-radius:999px;
  background:#e8f1f8;
  text-align:center;
}

.shared-notes-list{
  display:grid;
  gap:8px;
  padding:0 9px 9px;
}

.shared-note-item{
  padding:9px 10px;
  border:1px solid rgba(30,91,146,.16);
  border-radius:10px;
  background:#fff;
}

.shared-note-item.is-pending{
  border-left:4px solid #e3a318;
  background:#fffaf0;
}

.shared-note-item.is-attended{
  border-left:4px solid #5aaf66;
}

.shared-note-item small,
.shared-note-resolution small{
  display:block;
  margin-top:5px;
  color:var(--text-soft, #5f6670);
}

.shared-note-product{
  margin-top:6px;
  font-size:.86rem;
}

.shared-note-resolution{
  margin-top:8px;
  padding:8px;
  border-radius:9px;
  background:#eef8ee;
}

.shared-note-create form,
.shared-note-attend form{
  display:grid;
  gap:9px;
  padding:0 10px 10px;
}

.shared-note-form-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
}

.shared-note-create label,
.shared-note-attend label{
  display:grid;
  gap:4px;
  font-weight:900;
}

.shared-note-create textarea,
.shared-note-attend textarea{
  width:100%;
  min-height:76px;
  resize:vertical;
}

.estado-nota-input{
  width:100%;
  resize:vertical;
}

@media (max-width: 760px){
  .shared-note-form-grid{
    grid-template-columns:1fr;
  }

  .shared-notes-head,
  .shared-note-latest-label,
  .shared-note-item-head{
    align-items:flex-start;
  }

  .shared-notes-counters{
    flex-wrap:wrap;
    justify-content:flex-end;
  }
}

/* =========================================================
   PAQUETE 70 - BUSQUEDA OPERATIVA EN TODAS LAS AREAS
   ========================================================= */
.production-search-field{
  flex:1 1 320px;
  min-width:260px;
}

.production-search-field input{
  width:100%;
}

.search-result-postit{
  outline:2px solid rgba(34, 117, 165, .16);
  outline-offset:2px;
}

.search-match-badge{
  background:#e8f5ff;
  border-color:#9bc8e8;
  color:#124f72;
}

.search-match-detail{
  border-left:4px solid #2b82b8;
  background:rgba(226, 243, 253, .72);
  padding-left:10px;
  border-radius:10px;
}

.search-match-combo{
  background:rgba(226, 243, 253, .78);
  border-radius:8px;
  padding:6px 8px;
}

@media (max-width: 760px){
  .production-search-field{
    flex:1 1 100%;
    min-width:100%;
  }
}

/* =========================================================
   PAQUETE 70A - AJUSTES NOTAS COMPARTIDAS Y POSTIT
   ========================================================= */
.shared-notes-card-compact{
  margin:10px 0;
  padding:9px;
}

.shared-notes-head-compact{
  align-items:center;
}

.shared-notes-head-compact > b{
  margin:0;
  line-height:1.2;
}

.shared-notes-card-compact .shared-notes-counters > span{
  min-width:25px;
  min-height:25px;
  padding:3px 7px;
  font-size:.78rem;
}

.shared-note-form-grid.shared-note-form-stack{
  grid-template-columns:minmax(0, 1fr);
  gap:10px;
  min-width:0;
}

.shared-note-create,
.shared-note-create form,
.shared-note-create label,
.shared-note-create select,
.shared-note-create textarea,
.shared-note-attend form,
.shared-note-attend label,
.shared-note-attend textarea{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

.shared-note-create select,
.shared-note-create textarea,
.shared-note-attend textarea{
  width:100%;
}

.shared-note-field-help{
  display:block;
  margin-top:1px;
  color:var(--text-soft, #5f6670);
  font-size:.72rem;
  font-weight:600;
  line-height:1.3;
  white-space:normal;
}

.shared-note-emphasis{
  white-space:normal;
}

.estado-form-compact{
  width:100%;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
  overflow:hidden;
}

.estado-form-compact .estado-action-row,
.estado-form-compact .estado-nota-label,
.estado-form-compact .estado-nota-input,
.estado-form-compact .problem-field{
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}

.estado-form-compact .estado-nota-label{
  display:grid;
  gap:4px;
  width:100%;
  white-space:normal;
  line-height:1.25;
}

.estado-form-compact .estado-nota-label small{
  display:block;
  color:var(--text-soft, #5f6670);
  font-size:.72rem;
  font-weight:600;
  white-space:normal;
}

.estado-form-compact .estado-nota-input{
  display:block;
  width:100%;
  min-height:72px;
  height:auto;
  padding:9px 10px;
  resize:vertical;
  overflow-wrap:anywhere;
}

@media (max-width: 760px){
  .shared-notes-card-compact{
    padding:8px;
  }

  .shared-notes-head-compact{
    align-items:center;
  }

  .shared-notes-card-compact .shared-note-create form,
  .shared-notes-card-compact .shared-note-attend form{
    padding-left:8px;
    padding-right:8px;
  }
}

/* =========================================================
   PAQUETE 71 - CENTRO INTERNO DE NOTIFICACIONES
   ========================================================= */
.notification-center{
  position:relative;
  display:flex;
  align-items:center;
  margin-left:auto;
  margin-right:8px;
  z-index:80;
}

.notification-bell{
  position:relative;
  width:42px;
  height:42px;
  min-width:42px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.12);
  color:#fff;
  box-shadow:none;
  font-size:1.2rem;
}

.notification-bell:hover{
  background:rgba(255,255,255,.22);
  box-shadow:none;
}

.notification-bell.has-unread{
  background:#fff;
  color:#8d101b;
}

.notification-badge{
  position:absolute;
  top:-6px;
  right:-7px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:2px solid #9d111f;
  background:#ffdf49;
  color:#4a3300;
  font-size:.68rem;
  font-weight:1000;
  line-height:1;
}

.notification-dropdown{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:min(390px, calc(100vw - 24px));
  max-height:min(620px, calc(100vh - 90px));
  overflow:hidden;
  border:1px solid var(--border-strong);
  border-radius:18px;
  background:#fff;
  color:var(--text);
  box-shadow:0 22px 55px rgba(42,23,18,.28);
}

.notification-dropdown-head,
.notification-dropdown-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  background:#fffdf5;
}

.notification-dropdown-head{
  border-bottom:1px solid var(--border);
}

.notification-dropdown-head strong{
  font-size:1rem;
}

.notification-dropdown-mark-all{
  padding:6px 9px;
  border-radius:9px;
  background:transparent;
  color:var(--brand-red-dark);
  box-shadow:none;
  font-size:.78rem;
  font-weight:900;
}

.notification-dropdown-mark-all:hover{
  background:rgba(233,30,47,.08);
  box-shadow:none;
}

.notification-dropdown-list{
  max-height:440px;
  overflow:auto;
  overscroll-behavior:contain;
}

.notification-preview-item{
  display:flex;
  gap:10px;
  padding:12px 14px;
  color:inherit;
  text-decoration:none;
  border-bottom:1px solid var(--border);
  background:#fff;
}

.notification-preview-item:hover{
  background:#fff9db;
}

.notification-preview-item.is-unread{
  background:#fffdf0;
  box-shadow:inset 4px 0 0 var(--brand-red);
}

.notification-preview-icon{
  width:32px;
  min-width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:#f7efd1;
}

.notification-preview-body{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.notification-preview-body strong{
  font-size:.9rem;
  line-height:1.25;
}

.notification-preview-meta{
  color:var(--text-soft);
  font-size:.7rem;
  font-weight:800;
}

.notification-preview-message{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  color:#554d42;
  font-size:.78rem;
  line-height:1.35;
}

.notification-dropdown-empty,
.notification-dropdown-loading{
  padding:24px 16px;
  color:var(--text-soft);
  text-align:center;
  font-size:.86rem;
}

.notification-dropdown-foot{
  justify-content:center;
  border-top:1px solid var(--border);
}

.notification-dropdown-foot a{
  color:var(--brand-red-dark);
  font-weight:1000;
  text-decoration:none;
}

.notifications-page{
  width:min(1180px, 100%);
  margin:0 auto;
}

.notifications-page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.notifications-page-head h1{
  margin:2px 0 4px;
}

.notifications-page-head p{
  margin:0;
  color:var(--text-soft);
}

.eyebrow{
  color:var(--brand-red-dark);
  font-size:.75rem;
  font-weight:1000;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.notifications-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.notifications-head-actions form{
  margin:0;
}

.notifications-unread-kpi{
  padding:9px 12px;
  border:1px solid #e6d79f;
  border-radius:999px;
  background:#fff7cf;
  color:#59420b;
  font-weight:800;
}

.secondary-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:var(--brand-red-dark);
  border:1px solid var(--border-strong);
  box-shadow:none;
  text-decoration:none;
}

.secondary-button:hover{
  background:#fff8dc;
  box-shadow:none;
}

.notifications-filter-card{
  margin-bottom:18px;
  padding:14px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.notifications-filter-primary,
.notifications-filter-secondary{
  display:grid;
  gap:10px;
}

.notifications-filter-primary{
  grid-template-columns:minmax(260px, 1fr) minmax(170px, .35fr) minmax(150px, .3fr);
}

.notifications-filter-secondary{
  grid-template-columns:repeat(4, minmax(145px, 1fr)) auto auto;
  align-items:end;
  margin-top:10px;
}

.notifications-filter-card label{
  min-width:0;
}

.notifications-filter-card input:not([type="checkbox"]),
.notifications-filter-card select{
  width:100%;
  min-width:0;
}

.notification-filter-check{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  margin:0;
  font-weight:900;
}

.notification-filter-check input{
  width:auto;
  margin:0;
}

.notifications-filter-actions{
  display:flex;
  gap:8px;
}

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

.notification-card{
  position:relative;
  display:flex;
  align-items:stretch;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  overflow:hidden;
  box-shadow:var(--shadow-sm);
}

.notification-card.is-unread{
  border-color:#e7c76d;
  background:#fffefa;
  box-shadow:inset 5px 0 0 var(--brand-red), var(--shadow-sm);
}

.notification-card.priority-alta,
.notification-card.priority-urgente{
  border-color:#e9aa9f;
}

.notification-card-main{
  min-width:0;
  flex:1;
  display:flex;
  gap:12px;
  padding:14px 16px;
  color:inherit;
  text-decoration:none;
}

.notification-card-main:hover{
  background:rgba(255,244,198,.35);
}

.notification-card-icon{
  width:42px;
  min-width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:#f7efd1;
  font-size:1.2rem;
}

.notification-card-content{
  min-width:0;
  flex:1;
}

.notification-card-content h2{
  margin:6px 0 4px;
  font-size:1rem;
}

.notification-card-content p{
  margin:0;
  color:#514a40;
  line-height:1.45;
}

.notification-card-meta,
.notification-card-foot{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  color:var(--text-soft);
  font-size:.74rem;
}

.notification-type-chip,
.notification-priority-chip,
.notification-new-label{
  padding:3px 7px;
  border-radius:999px;
  font-weight:1000;
}

.notification-type-chip{
  background:#efe9da;
  color:#524a3e;
}

.notification-priority-chip.priority-informativa{
  background:#eaf5ff;
  color:#235f82;
}

.notification-priority-chip.priority-normal{
  background:#eff4e5;
  color:#456026;
}

.notification-priority-chip.priority-alta{
  background:#fff0cc;
  color:#805812;
}

.notification-priority-chip.priority-urgente{
  background:#ffe1df;
  color:#9b2118;
}

.notification-card-foot{
  margin-top:8px;
}

.notification-new-label{
  background:var(--brand-red);
  color:#fff;
}

.notification-card-read-form{
  display:flex;
  align-items:center;
  padding:10px;
  border-left:1px solid var(--border);
}

.notification-read-button{
  padding:8px 10px;
  background:#fff;
  color:var(--brand-red-dark);
  border:1px solid var(--border-strong);
  box-shadow:none;
  white-space:nowrap;
  font-size:.78rem;
}

.notifications-empty{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:7px;
  padding:34px 20px;
  text-align:center;
}

.notifications-empty > span{
  font-size:2rem;
}

.notifications-empty small{
  max-width:680px;
  color:var(--text-soft);
}

.notification-config-card{
  margin-top:20px;
  border:1px solid var(--border);
  border-radius:16px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.notification-config-card > summary{
  padding:14px 16px;
  cursor:pointer;
  font-weight:1000;
}

.notification-config-form{
  display:grid;
  grid-template-columns:repeat(3, minmax(160px, 1fr)) auto auto;
  align-items:end;
  gap:12px;
  padding:0 16px 16px;
}

.notification-config-form input[type="number"]{
  width:100%;
}

.input-with-suffix{
  display:flex;
  align-items:center;
  gap:7px;
}

.input-with-suffix span{
  color:var(--text-soft);
  font-size:.8rem;
  font-weight:800;
}

@media (max-width: 980px){
  .notifications-filter-primary,
  .notifications-filter-secondary,
  .notification-config-form{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px){
  .notification-center{
    order:2;
    margin-left:auto;
    margin-right:4px;
  }

  .notification-bell{
    width:38px;
    height:38px;
    min-width:38px;
  }

  .notification-dropdown{
    position:fixed;
    top:64px;
    left:12px;
    right:12px;
    width:auto;
    max-height:calc(100vh - 78px);
  }

  .notifications-page-head{
    flex-direction:column;
  }

  .notifications-head-actions{
    width:100%;
    justify-content:flex-start;
  }

  .notifications-filter-primary,
  .notifications-filter-secondary,
  .notification-config-form{
    grid-template-columns:1fr;
  }

  .notifications-filter-actions,
  .notifications-filter-actions > *{
    width:100%;
  }

  .notification-card{
    flex-direction:column;
  }

  .notification-card-main{
    padding:12px;
  }

  .notification-card-read-form{
    border-left:0;
    border-top:1px solid var(--border);
  }

  .notification-card-read-form button{
    width:100%;
  }
}

/* package72-2-shared-problems-groups-reference-logistics */
.shared-notes-counters .shared-note-problem-count{
  background:#fde4e6;
  border-color:#ef9aa2;
  color:#a31221;
  font-weight:800;
}

.shared-note-latest.is-problem,
.shared-note-item.is-problem{
  border-color:#dc3545;
  box-shadow:inset 4px 0 0 rgba(220,53,69,.82);
  background:#fff7f7;
}

.shared-note-status.is-problem{
  background:#fde4e6;
  border-color:#ef9aa2;
  color:#a31221;
  font-weight:800;
}

.shared-note-create select,
.shared-note-create textarea,
.shared-note-attend textarea{
  max-width:100%;
  box-sizing:border-box;
}

/* =========================================================
   PAQUETE 73 - NOTIFICACIONES WEB DEL DISPOSITIVO
   ========================================================= */
.notification-dropdown-foot{
  gap:10px;
  flex-wrap:wrap;
}

.notification-dropdown-foot a{
  white-space:nowrap;
}

.webpush-enable-button{
  appearance:none;
  border:0;
  border-radius:999px;
  padding:7px 10px;
  background:var(--brand-yellow);
  color:var(--brand-brown-dark);
  font:inherit;
  font-size:12px;
  font-weight:1000;
  cursor:pointer;
}

.webpush-enable-button:hover{
  filter:brightness(.98);
  transform:translateY(-1px);
}

.webpush-enable-button.is-active{
  background:#dcfce7;
  color:#166534;
}

.webpush-enable-button:disabled{
  opacity:.62;
  cursor:not-allowed;
  transform:none;
}

.webpush-page{
  display:grid;
  gap:18px;
  max-width:1180px;
  margin:0 auto;
}

.webpush-page-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
}

.webpush-page-head h1{
  margin:4px 0 6px;
}

.webpush-page-head p{
  margin:0;
  color:var(--muted);
}

.webpush-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.webpush-head-actions form{
  margin:0;
}

.webpush-current-device-card,
.webpush-section,
.webpush-admin-card,
.webpush-help-card{
  background:rgba(255,255,255,.94);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);
}

.webpush-current-device-card{
  display:grid;
  grid-template-columns:minmax(260px,.8fr) minmax(340px,1.2fr);
  gap:22px;
  padding:22px;
  border-top:5px solid var(--brand-yellow-dark);
}

.webpush-current-device-copy{
  display:flex;
  align-items:flex-start;
  gap:14px;
}

.webpush-current-device-copy h2,
.webpush-section h2{
  margin:0 0 5px;
}

.webpush-current-device-copy p,
.webpush-section-head p{
  margin:0;
  color:var(--muted);
}

.webpush-device-icon{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  flex:0 0 auto;
  border-radius:16px;
  background:var(--brand-cream);
  border:1px solid rgba(138,100,31,.20);
  font-size:28px;
}

.webpush-current-device-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.webpush-current-device-form label,
.webpush-device-settings label,
.webpush-admin-form label{
  display:grid;
  gap:6px;
  font-size:13px;
  font-weight:900;
  color:var(--text-soft);
}

.webpush-current-device-form input[type="text"],
.webpush-current-device-form select,
.webpush-device-settings input[type="text"],
.webpush-device-settings select,
.webpush-admin-form input[type="number"],
.webpush-admin-form select{
  width:100%;
  min-width:0;
}

.webpush-check{
  display:flex !important;
  align-items:flex-start;
  gap:9px !important;
  grid-column:1 / -1;
  font-weight:800 !important;
}

.webpush-check input{
  margin-top:2px;
  flex:0 0 auto;
}

.webpush-current-actions{
  grid-column:1 / -1;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.webpush-status{
  font-weight:900;
}

.webpush-status.is-ok{ color:#166534; }
.webpush-status.is-warning{ color:#92400e; }
.webpush-status.is-error{ color:#b91c1c; }

.webpush-guidance{
  margin-top:8px !important;
  padding:10px 12px;
  border-radius:12px;
  background:#eff6ff;
  color:#1d4ed8 !important;
  font-size:13px;
  font-weight:800;
}

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

.webpush-explanation-grid article{
  padding:16px;
  border-radius:var(--radius);
  border:1px solid var(--border);
  background:rgba(255,253,247,.92);
}

.webpush-explanation-grid b{
  display:block;
  margin-bottom:6px;
}

.webpush-explanation-grid p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.webpush-section{
  padding:20px;
}

.webpush-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:15px;
}

.webpush-count-chip,
.webpush-state-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:5px 10px;
  font-size:12px;
  font-weight:1000;
  white-space:nowrap;
}

.webpush-count-chip{
  background:var(--brand-cream);
  color:var(--brand-brown-dark);
}

.webpush-device-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}

.webpush-device-card{
  display:grid;
  gap:12px;
  padding:16px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:#fff;
}

.webpush-device-card.is-inactive{
  opacity:.70;
  background:#f8fafc;
}

.webpush-device-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.webpush-device-card-head h3{
  margin:0 0 4px;
}

.webpush-device-card-head p{
  margin:0;
  color:var(--muted);
  font-size:13px;
}

.webpush-state-chip.is-active{
  background:#dcfce7;
  color:#166534;
}

.webpush-state-chip.is-inactive{
  background:#e5e7eb;
  color:#4b5563;
}

.webpush-device-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:0;
}

.webpush-device-meta div{
  min-width:0;
  padding:10px;
  border-radius:12px;
  background:var(--bg-soft);
}

.webpush-device-meta dt{
  color:var(--muted);
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.webpush-device-meta dd{
  margin:4px 0 0;
  font-size:13px;
  font-weight:900;
  overflow-wrap:anywhere;
}

.webpush-device-settings,
.webpush-device-error{
  border-top:1px dashed var(--border-strong);
  padding-top:10px;
}

.webpush-device-settings > summary,
.webpush-device-error > summary,
.webpush-admin-card > summary,
.webpush-help-card > summary{
  cursor:pointer;
  font-weight:1000;
}

.webpush-device-settings form{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.webpush-device-error p{
  margin:8px 0 0;
  color:#991b1b;
  font-size:12px;
  overflow-wrap:anywhere;
}

.webpush-device-disable-form{
  margin:0;
}

.danger-outline{
  border-color:rgba(220,38,38,.35) !important;
  color:#b91c1c !important;
}

.webpush-empty{
  margin:0;
}

.webpush-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}

.webpush-kpis span{
  display:flex;
  align-items:baseline;
  gap:7px;
  padding:13px;
  border-radius:13px;
  background:var(--bg-soft);
  font-size:13px;
  color:var(--muted);
}

.webpush-kpis b{
  color:var(--text);
  font-size:20px;
}

.webpush-admin-card,
.webpush-help-card{
  padding:18px 20px;
}

.webpush-admin-card[open] > summary,
.webpush-help-card[open] > summary{
  margin-bottom:14px;
}

.webpush-admin-form{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  align-items:end;
}

.webpush-admin-form .webpush-check{
  grid-column:auto;
}

.webpush-worker-status{
  margin-bottom:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  font-size:13px;
}

.webpush-worker-error{
  color:#b91c1c;
}

.webpush-help-content{
  display:grid;
  gap:9px;
}

.webpush-help-content p{
  margin:0;
  color:var(--text-soft);
  line-height:1.5;
}

.is-busy{
  opacity:.66;
  cursor:wait !important;
}

@media (max-width:900px){
  .webpush-current-device-card{
    grid-template-columns:1fr;
  }

  .webpush-explanation-grid{
    grid-template-columns:1fr;
  }

  .webpush-device-list{
    grid-template-columns:1fr;
  }

  .webpush-admin-form{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .webpush-admin-form .webpush-check{
    grid-column:1 / -1;
  }
}

@media (max-width:620px){
  .webpush-page-head{
    align-items:stretch;
    flex-direction:column;
  }

  .webpush-head-actions{
    justify-content:flex-start;
  }

  .webpush-current-device-card,
  .webpush-section,
  .webpush-admin-card,
  .webpush-help-card{
    padding:15px;
    border-radius:16px;
  }

  .webpush-current-device-form,
  .webpush-device-meta,
  .webpush-kpis,
  .webpush-admin-form{
    grid-template-columns:1fr;
  }

  .webpush-current-actions{
    flex-direction:column;
  }

  .webpush-current-actions button,
  .webpush-head-actions a,
  .webpush-head-actions button{
    width:100%;
    text-align:center;
    justify-content:center;
  }

  .notification-dropdown-foot{
    align-items:stretch;
  }

  .notification-dropdown-foot a,
  .webpush-enable-button{
    flex:1 1 auto;
    text-align:center;
  }
}

/* package73-webpush-responsive-device-management-ui */

/* PAQUETE 73.1 - PERSISTENCIA Y ADMINISTRACION DE DISPOSITIVOS */
.webpush-current-device-form label small{display:block;margin-top:5px;color:var(--muted);font-size:11px;line-height:1.35}
.webpush-state-chip.is-suspendido{background:#fef3c7;color:#92400e}
.webpush-state-chip.is-liberado{background:#e0e7ff;color:#3730a3}
.webpush-state-chip.is-archivado,.webpush-state-chip.is-inactivo{background:#e5e7eb;color:#4b5563}
.webpush-admin-device-filters{display:grid;grid-template-columns:2fr repeat(3,minmax(140px,1fr)) auto auto;gap:10px;align-items:end;padding:16px 18px;border:1px solid var(--border);border-radius:var(--radius);background:#fff}
.webpush-admin-device-table-wrap{overflow:auto}
.webpush-admin-device-table{width:100%;border-collapse:collapse;min-width:1050px}
.webpush-admin-device-table th,.webpush-admin-device-table td{padding:12px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}
.webpush-admin-device-table th{font-size:12px;text-transform:uppercase;color:var(--muted);background:var(--bg-soft)}
.webpush-admin-device-table td>*{display:block;margin-bottom:4px}
.webpush-admin-device-table td small{color:var(--muted);overflow-wrap:anywhere}
.webpush-admin-actions{display:grid;gap:8px;min-width:260px}
.webpush-admin-actions form{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:0}
.webpush-admin-actions select{min-width:150px}
.webpush-history-list{display:grid;gap:10px}
.webpush-history-list article{display:grid;grid-template-columns:1fr auto;gap:4px 14px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--bg-soft)}
.webpush-history-list article p,.webpush-history-list article small{grid-column:1/-1;margin:0}
@media(max-width:900px){.webpush-admin-device-filters{grid-template-columns:1fr 1fr}.webpush-admin-device-filters label:first-child{grid-column:1/-1}}
@media(max-width:620px){.webpush-admin-device-filters{grid-template-columns:1fr}.webpush-admin-device-filters label:first-child{grid-column:auto}}
/* package73-1-persistent-device-admin-responsive-ui */



/* package74-scheduled-alerts-ui */
.alerts74-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.alerts74-panel,.alerts74-rules{background:#fff;border:1px solid #e7dfce;border-radius:18px;padding:18px;margin:16px 0;box-shadow:0 8px 22px rgba(52,38,17,.06)}.alerts74-config-grid{display:grid;grid-template-columns:minmax(280px,2fr) repeat(5,minmax(110px,1fr));gap:12px;align-items:end}.alerts74-config-grid label,.alerts74-rule-grid label{display:grid;gap:6px;font-weight:700;font-size:.88rem}.alerts74-config-grid input,.alerts74-rule-grid input,.alerts74-rule-grid select{width:100%;box-sizing:border-box}.alerts74-runtime{display:flex;flex-wrap:wrap;gap:16px;margin-top:14px;padding-top:12px;border-top:1px dashed #ddd2ba}.alerts74-rule-card{border:1px solid #e8dfcc;border-radius:16px;padding:15px;margin-top:12px;background:#fffdf7}.alerts74-rule-card header{display:flex;justify-content:space-between;gap:14px}.alerts74-rule-card h3{margin:0 0 4px}.alerts74-rule-card p{margin:0;color:#625e55}.alerts74-switch,.alerts74-recipient-row label{display:flex;gap:7px;align-items:center;font-weight:700}.alerts74-rule-grid{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:12px;margin-top:14px}.alerts74-recipient-row{display:flex;flex-wrap:wrap;align-items:center;gap:16px;margin-top:14px}.alerts74-recipient-row button{margin-left:auto}.alerts74-panel .is-error{color:#a11223}.alerts74-panel table{min-width:850px}@media(max-width:1000px){.alerts74-config-grid{grid-template-columns:repeat(2,minmax(140px,1fr))}.alerts74-config-grid .admin-config-checkbox{grid-column:1/-1}.alerts74-rule-grid{grid-template-columns:repeat(2,minmax(130px,1fr))}}@media(max-width:620px){.alerts74-head{display:block}.alerts74-head form{margin-top:12px}.alerts74-config-grid,.alerts74-rule-grid{grid-template-columns:1fr}.alerts74-recipient-row{display:grid;grid-template-columns:1fr}.alerts74-recipient-row button{margin-left:0;width:100%}}

/* PAQUETE 74.2 - BITACORA PAGINADA, FILTROS, RETENCION Y AGRUPACION */
.alerts742-config-grid{grid-template-columns:minmax(260px,2fr) repeat(4,minmax(125px,1fr))}.alerts742-config-grid label small{font-weight:500;color:var(--muted);line-height:1.3}.alerts742-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin:16px 0}.alerts742-summary-grid article{display:grid;gap:3px;padding:15px 17px;border:1px solid #e7dfce;border-radius:16px;background:#fff;box-shadow:0 7px 18px rgba(52,38,17,.05)}.alerts742-summary-grid article span{font-size:.77rem;text-transform:uppercase;font-weight:900;color:#6f685c}.alerts742-summary-grid article strong{font-size:1.65rem;line-height:1}.alerts742-summary-grid article small{color:var(--muted)}.alerts742-summary-grid article.is-error{border-color:#efb0b5;background:#fff6f6;color:#981b2a}.alerts742-log{padding:0;overflow:hidden}.alerts742-log>summary{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px;cursor:pointer;list-style:none}.alerts742-log>summary::-webkit-details-marker{display:none}.alerts742-log>summary:after{content:'▾';font-size:1.25rem;transition:transform .18s ease}.alerts742-log[open]>summary:after{transform:rotate(180deg)}.alerts742-log>summary h2{margin:0}.alerts742-log>summary div{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}.alerts742-log>summary span{color:var(--muted);font-weight:700}.alerts742-summary-hint{margin-left:auto}.alerts742-log-body{border-top:1px solid #eee4d2;padding:18px}.alerts742-dedupe-note{padding:11px 13px;border-left:4px solid #3d79ad;border-radius:9px;background:#eef7ff}.alerts742-filters{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:11px;align-items:end;margin:15px 0;padding:14px;border:1px solid #e8dfcc;border-radius:14px;background:#fffdf7}.alerts742-filters label{display:grid;gap:5px;font-size:.78rem;font-weight:900}.alerts742-filters input,.alerts742-filters select{width:100%;min-width:0;box-sizing:border-box}.alerts742-filter-actions{display:flex;gap:8px;align-items:center}.alerts742-filter-actions>*{flex:1;text-align:center}.alerts742-log-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:10px 0;color:var(--muted);font-size:.86rem}.alerts742-log-actions form{margin:0}.alerts742-table-wrap{border:1px solid #ece3d2;border-radius:13px}.alerts742-table{min-width:1050px!important}.alerts742-table th{white-space:nowrap}.alerts742-table td{vertical-align:top}.alerts742-table td small{display:block;margin-top:4px;color:var(--muted)}.alerts742-audiences{display:flex;flex-wrap:wrap;gap:5px}.alerts742-audiences span{display:inline-flex;padding:3px 7px;border-radius:999px;background:#edf2f7;color:#33485c;font-size:.7rem;font-weight:900}.alerts742-state{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:.7rem;font-weight:900}.alerts742-state.is-notificada{background:#dff3e5;color:#1d6a37}.alerts742-state.is-omitida{background:#eceff2;color:#59636d}.alerts742-state.is-error{background:#ffe1e1;color:#9c1c2b}.alerts742-error{max-width:420px;margin-top:6px;padding:8px;border-radius:8px;background:#fff0f0;color:#8d1624;white-space:normal;overflow-wrap:anywhere}.alerts742-pagination{display:flex;justify-content:center;align-items:center;gap:6px;margin-top:16px}.alerts742-pagination a,.alerts742-pagination strong,.alerts742-pagination span{display:inline-flex;min-width:34px;height:34px;align-items:center;justify-content:center;border-radius:9px}.alerts742-pagination a{border:1px solid #dfd5c2;background:#fff;text-decoration:none}.alerts742-pagination strong{background:#8f1d2d;color:#fff}.alerts742-pagination span{color:var(--muted)}
@media(max-width:1100px){.alerts742-config-grid,.alerts742-filters{grid-template-columns:repeat(2,minmax(150px,1fr))}.alerts742-config-grid .admin-config-checkbox{grid-column:1/-1}.alerts742-summary-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}}
@media(max-width:650px){.alerts742-config-grid,.alerts742-filters,.alerts742-summary-grid{grid-template-columns:1fr}.alerts742-log>summary{align-items:flex-start}.alerts742-summary-hint{display:none}.alerts742-log-actions{align-items:stretch;flex-direction:column}.alerts742-log-actions button{width:100%}.alerts742-filter-actions{display:grid;grid-template-columns:1fr}.alerts742-log-body{padding:12px}}
/* package74-2-paged-filtered-retention-grouped-log-ui */


/* =========================================================
   CISK ERP | SEI · Fase 1
   Identidad + navegación modular
   Operaciones conectadas. Gestión centralizada.
   package75-3-0-9-sei-identity-navigation
   ========================================================= */

:root{
  --sei-ink:#171518;
  --sei-ink-soft:#242126;
  --sei-panel:#2c272a;
  --sei-red:#ed1c2e;
  --sei-red-deep:#b91524;
  --sei-gold:#ffc800;
  --sei-cream:#fff7e8;
  --sei-line:rgba(255,255,255,.13);
  --sei-line-soft:rgba(255,255,255,.08);
  --sei-shadow:0 14px 38px rgba(17,12,10,.28);
}

.sei-topbar{
  display:grid;
  grid-template-columns:auto minmax(280px, 1fr) auto;
  align-items:center;
  gap:18px;
  min-height:76px;
  padding:9px 18px;
  background:
    linear-gradient(100deg, #151316 0%, #201b1d 48%, #2d1819 100%);
  border-bottom:3px solid var(--sei-gold);
  box-shadow:var(--sei-shadow);
}

.sei-brand-zone{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.sei-topbar .sei-brand{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:4px 6px 4px 4px;
  border:0;
  background:transparent;
  border-radius:12px;
  text-transform:none;
  box-shadow:none;
}

.sei-topbar .sei-brand:hover{
  background:rgba(255,255,255,.06);
}

.sei-topbar .sei-brand::before{
  display:none;
}

.sei-brand-logo{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:12px;
  background:#fff;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.28),
    0 7px 20px rgba(0,0,0,.20);
}

.sei-brand-logo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.sei-brand-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.sei-brand-copy strong{
  color:#fff;
  font-size:16px;
  line-height:1;
  letter-spacing:.2px;
  white-space:nowrap;
}

.sei-brand-copy em{
  color:var(--sei-gold);
  font-style:normal;
}

.sei-brand-copy small{
  color:rgba(255,255,255,.68);
  font-size:9px;
  font-weight:800;
  letter-spacing:.45px;
  white-space:nowrap;
}

.sei-company-chip{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  max-width:190px;
  padding:5px 9px 5px 6px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:12px;
  background:rgba(255,255,255,.07);
}

.sei-company-logo{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  overflow:hidden;
  padding:3px;
  border-radius:9px;
  background:#fff;
}

.sei-company-logo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.sei-company-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:1px;
}

.sei-company-copy small{
  color:rgba(255,255,255,.55);
  font-size:8px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.5px;
}

.sei-company-copy strong{
  overflow:hidden;
  color:#fff;
  font-size:11px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sei-nav{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:5px;
  min-width:0;
  flex-wrap:nowrap;
}

.sei-nav > .link,
.sei-nav-menu > summary{
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:rgba(255,255,255,.86);
  font-size:12px;
  font-weight:850;
  line-height:1;
  cursor:pointer;
  user-select:none;
  white-space:nowrap;
  text-decoration:none;
}

.sei-nav > .link:hover,
.sei-nav-menu > summary:hover,
.sei-nav > .link.is-active,
.sei-nav-menu.is-active > summary,
.sei-nav-menu[open] > summary{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.11);
  color:#fff;
}

.sei-nav > .link.is-active,
.sei-nav-menu.is-active > summary{
  box-shadow:inset 0 -2px 0 var(--sei-gold);
}

.sei-nav-menu{
  position:relative;
}

.sei-nav-menu > summary{
  list-style:none;
}

.sei-nav-menu > summary::-webkit-details-marker{
  display:none;
}

.sei-nav-menu > summary::after{
  content:"⌄";
  margin-left:5px;
  color:var(--sei-gold);
  font-size:11px;
}

.sei-nav-menu[open] > summary::after{
  content:"⌃";
}

.sei-nav-dropdown{
  position:absolute;
  top:calc(100% + 8px);
  left:50%;
  z-index:1200;
  min-width:205px;
  padding:7px;
  transform:translateX(-50%);
  border:1px solid rgba(255,255,255,.12);
  border-radius:14px;
  background:#211d20;
  box-shadow:0 18px 48px rgba(0,0,0,.34);
}

.sei-nav-dropdown-wide{
  min-width:230px;
}

.sei-nav-dropdown a{
  display:flex;
  width:100%;
  min-height:36px;
  align-items:center;
  padding:8px 10px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:rgba(255,255,255,.88);
  font-size:12px;
  font-weight:780;
  text-decoration:none;
}

.sei-nav-dropdown a:hover{
  background:rgba(255,255,255,.09);
  color:#fff;
}

.sei-topbar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}

.sei-topbar .userbox{
  flex-wrap:nowrap;
  gap:6px;
}

.sei-topbar .role-pill{
  border:1px solid rgba(255,200,0,.26);
  background:rgba(255,200,0,.10);
  color:#ffe26f;
}

.sei-topbar .userbox .user{
  max-width:120px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sei-topbar .userbox .link{
  padding:6px 8px;
  border-radius:9px;
  background:rgba(255,255,255,.06);
  border-color:rgba(255,255,255,.10);
  font-size:11px;
}

.sei-mobile-context{
  display:none;
}

@media (max-width: 1180px){
  .sei-topbar{
    grid-template-columns:auto 1fr auto;
    gap:10px;
  }

  .sei-company-chip{
    display:none;
  }

  .sei-nav > .link,
  .sei-nav-menu > summary{
    padding-inline:8px;
    font-size:11px;
  }
}

@media (max-width: 900px) and (min-width: 721px){
  .sei-brand-copy small{
    display:none;
  }

  .sei-brand-logo{
    width:42px;
    height:42px;
    flex-basis:42px;
  }

  .sei-topbar .userbox .user,
  .sei-topbar .role-pill{
    display:none;
  }
}

@media (max-width: 720px){
  .sei-topbar{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    gap:7px 8px;
    min-height:64px;
    padding:7px 9px;
  }

  .sei-brand-zone{
    min-width:0;
  }

  .sei-topbar .sei-brand{
    min-width:0;
    padding:2px;
  }

  .sei-brand-logo{
    width:40px;
    height:40px;
    flex:0 0 40px;
    border-radius:10px;
  }

  .sei-brand-copy strong{
    font-size:14px;
  }

  .sei-brand-copy small{
    display:none;
  }

  .sei-company-chip{
    display:none;
  }

  .sei-topbar .mobile-nav-toggle{
    grid-column:2;
    grid-row:1;
    width:42px;
    height:42px;
    border-radius:11px;
  }

  .sei-topbar .sei-nav,
  .sei-topbar .sei-topbar-actions{
    display:none;
    grid-column:1 / -1;
  }

  .sei-mobile-context{
    display:flex;
    grid-column:1 / -1;
    align-items:baseline;
    gap:7px;
    min-width:0;
    padding:0 3px 3px;
    color:#fff;
  }

  .sei-mobile-context span{
    font-size:10px;
    font-weight:900;
  }

  .sei-mobile-context small{
    min-width:0;
    overflow:hidden;
    color:rgba(255,255,255,.58);
    font-size:9px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .sei-topbar.mobile-nav-open .sei-nav{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:6px;
    width:100%;
    max-height:min(58vh, 440px);
    overflow-y:auto;
    padding:7px 0 2px;
  }

  .sei-topbar.mobile-nav-open .sei-nav > .link,
  .sei-topbar.mobile-nav-open .sei-nav-menu{
    width:100%;
  }

  .sei-topbar.mobile-nav-open .sei-nav > .link,
  .sei-topbar.mobile-nav-open .sei-nav-menu > summary{
    width:100%;
    min-height:39px;
    border:1px solid rgba(255,255,255,.10);
    background:rgba(255,255,255,.06);
    border-radius:10px;
    font-size:11px;
  }

  .sei-topbar.mobile-nav-open .sei-nav-menu{
    position:static;
  }

  .sei-topbar.mobile-nav-open .sei-nav-dropdown{
    position:static;
    grid-column:1 / -1;
    width:100%;
    min-width:0;
    margin-top:5px;
    padding:5px;
    transform:none;
    box-shadow:none;
    background:rgba(0,0,0,.16);
  }

  .sei-topbar.mobile-nav-open .sei-nav-menu[open]{
    grid-column:1 / -1;
  }

  .sei-topbar.mobile-nav-open .sei-nav-menu[open] > summary{
    margin-bottom:5px;
  }

  .sei-topbar.mobile-nav-open .sei-topbar-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    width:100%;
    padding-top:7px;
    border-top:1px solid rgba(255,255,255,.13);
  }

  .sei-topbar.mobile-nav-open .userbox{
    display:flex;
    flex:1;
    justify-content:flex-end;
    gap:5px;
    padding:0;
    border:0;
  }

  .sei-topbar.mobile-nav-open .userbox .user{
    display:none;
  }

  .sei-topbar.mobile-nav-open .userbox a{
    min-height:34px;
    padding:6px 8px;
  }

  .sei-topbar.mobile-nav-open .notification-center{
    display:block;
  }
}

@media (max-width: 420px){
  .sei-brand-copy strong{
    font-size:13px;
  }

  .sei-topbar.mobile-nav-open .sei-nav{
    grid-template-columns:1fr;
  }

  .sei-topbar.mobile-nav-open .sei-nav-menu[open],
  .sei-topbar.mobile-nav-open .sei-nav-dropdown{
    grid-column:1;
  }
}


/* =========================================================
   CISK ERP | SEI · Fase 2
   Ribbon desktop + Login + Inicio
   package75-3-0-9-1-ribbon-login-home
   ========================================================= */

:root{
  --sei-ruby:#b8202e;
  --sei-ruby-deep:#861a24;
  --sei-gold:#e3ac21;
  --sei-gold-soft:#f6df9d;
  --sei-coffee:#4b3429;
  --sei-coffee-soft:#745747;
  --sei-ivory:#fffaf0;
  --sei-ivory-2:#f7ecda;
  --sei-paper:#fffefa;
  --sei-line:#dcc9aa;
  --sei-line-soft:#eadfce;
  --sei-text:#2f261f;
  --sei-muted:#75685c;
}

/* El shell deja atrás el grafito: marfil + café + rubí + oro. */
.sei-shell{
  position:sticky;
  top:0;
  z-index:1000;
  display:block;
  min-height:0;
  padding:0;
  color:var(--sei-text);
  background:var(--sei-paper);
  border:0;
  border-top:4px solid var(--sei-ruby);
  border-bottom:1px solid #cdb996;
  box-shadow:0 8px 28px rgba(74,49,31,.15);
}

.sei-commandbar{
  display:grid;
  grid-template-columns:minmax(390px,auto) 1fr auto;
  align-items:center;
  gap:16px;
  min-height:64px;
  padding:7px 18px;
  background:
    radial-gradient(circle at 18% -40%, rgba(227,172,33,.18), transparent 280px),
    linear-gradient(180deg,#fffdf7 0%,#fbf3e6 100%);
}

.sei-brand-zone{
  display:flex;
  align-items:center;
  gap:13px;
  min-width:0;
}

.sei-shell .sei-brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding:2px;
  border:0;
  border-radius:12px;
  color:var(--sei-text);
  background:transparent;
  box-shadow:none;
  text-transform:none;
  text-decoration:none;
}

.sei-shell .sei-brand::before{display:none}

.sei-shell .sei-brand:hover{
  background:rgba(184,32,46,.05);
}

.sei-brand-logo{
  width:48px;
  height:48px;
  flex:0 0 48px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #e5d8c5;
  border-radius:12px;
  background:#fff;
  box-shadow:0 5px 15px rgba(73,50,35,.10);
}

.sei-brand-logo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.sei-brand-copy{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}

.sei-brand-copy strong{
  color:#241d18;
  font-size:17px;
  line-height:1;
  font-weight:1000;
  letter-spacing:.2px;
  white-space:nowrap;
}

.sei-brand-copy strong em{
  color:var(--sei-ruby);
  font-style:normal;
}

.sei-brand-copy small{
  display:flex;
  flex-direction:column;
  gap:1px;
  color:var(--sei-coffee-soft);
  font-size:11px;
  line-height:1.05;
  font-weight:950;
  letter-spacing:.5px;
}

.sei-company-chip{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:155px;
  max-width:200px;
  padding:5px 10px 5px 6px;
  border:1px solid #dfceb3;
  border-radius:12px;
  background:rgba(255,255,255,.84);
  box-shadow:0 3px 12px rgba(73,50,35,.06);
}

.sei-company-logo{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  overflow:hidden;
  padding:3px;
  border-radius:9px;
  background:#fff;
}

.sei-company-logo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.sei-company-copy{
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:0;
}

.sei-company-copy small{
  color:#9b7a61;
  font-size:8px;
  font-weight:950;
  letter-spacing:.5px;
  text-transform:uppercase;
}

.sei-company-copy strong{
  overflow:hidden;
  color:var(--sei-coffee);
  font-size:12px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sei-command-actions{
  grid-column:3;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.sei-shell .userbox{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:nowrap;
  color:var(--sei-text);
}

.sei-shell .role-pill{
  border:1px solid rgba(184,32,46,.20);
  background:#fff1f1;
  color:var(--sei-ruby-deep);
}

.sei-shell .userbox .user{
  max-width:130px;
  overflow:hidden;
  color:var(--sei-coffee);
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sei-shell .userbox .link{
  padding:7px 9px;
  border:1px solid #ded0bc;
  border-radius:9px;
  background:#fff;
  color:var(--sei-coffee);
  font-size:11px;
  box-shadow:none;
}

.sei-shell .userbox .link:hover{
  background:#fff8eb;
  border-color:#c9aa77;
  color:#2c211a;
}

.sei-shell .notification-bell{
  border-color:#dfceb3;
  background:#fff;
  box-shadow:none;
}

/* Tabs estilo ribbon: una sola pestaña activa. */
.sei-ribbon-tabs{
  display:flex;
  align-items:end;
  gap:2px;
  min-height:37px;
  padding:0 18px;
  background:linear-gradient(180deg,#f4e7d1 0%,#ead8bc 100%);
  border-top:1px solid #eadcc6;
  border-bottom:1px solid #cdb996;
}

.sei-ribbon-tab{
  appearance:none;
  min-height:36px;
  margin:0;
  padding:8px 15px 7px;
  border:1px solid transparent;
  border-bottom:0;
  border-radius:8px 8px 0 0;
  background:transparent;
  box-shadow:none;
  color:#4a392e;
  font:inherit;
  font-size:14px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
}

.sei-ribbon-tab:hover{
  transform:none;
  filter:none;
  border-color:rgba(126,87,49,.18);
  background:rgba(255,255,255,.44);
  box-shadow:none;
}

.sei-ribbon-tab.is-active{
  position:relative;
  background:#fffefa;
  border-color:#cdb996;
  color:var(--sei-ruby-deep);
}

.sei-ribbon-tab.is-active::after{
  content:"";
  position:absolute;
  left:9px;
  right:9px;
  bottom:-1px;
  height:3px;
  border-radius:4px 4px 0 0;
  background:var(--sei-ruby);
}

.sei-ribbon-tab-link{
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Panel contextual: compacto, sin iconos gigantes. */
.sei-ribbon-panels{
  background:#fffefa;
}

.sei-ribbon-panel{
  min-height:66px;
  display:flex;
  align-items:stretch;
  gap:8px;
  padding:7px 18px 8px;
  border-bottom:1px solid #eadfce;
}

.sei-ribbon-panel[hidden]{
  display:none !important;
}

.sei-ribbon-group{
  position:relative;
  display:flex;
  align-items:center;
  gap:5px;
  min-height:50px;
  padding:0 12px 14px 0;
  margin-right:4px;
  border-right:1px solid #e5d8c5;
}

.sei-ribbon-group:last-child{
  border-right:0;
}

.sei-ribbon-group-title{
  position:absolute;
  left:0;
  right:12px;
  bottom:0;
  color:#9a8068;
  font-size:8px;
  font-weight:950;
  letter-spacing:.65px;
  text-align:center;
}

.sei-ribbon-action{
  display:flex;
  align-items:center;
  gap:7px;
  min-width:126px;
  min-height:44px;
  padding:5px 9px;
  border:1px solid transparent;
  border-radius:9px;
  color:#382a22;
  background:transparent;
  text-decoration:none;
}

.sei-ribbon-action:hover{
  border-color:#e2ceb0;
  background:#fff5e3;
}

.sei-ribbon-action.is-key{
  border-color:#efd59c;
  background:linear-gradient(180deg,#fff7dd 0%,#fff1c8 100%);
}

.sei-ribbon-icon{
  width:27px;
  height:27px;
  flex:0 0 27px;
  display:grid;
  place-items:center;
  border-radius:8px;
  background:#f4e9d8;
  color:var(--sei-ruby);
}

.sei-ribbon-action.is-key .sei-ribbon-icon{
  background:#fff;
  box-shadow:0 0 0 1px #efd9a8 inset;
}

.sei-ribbon-icon svg{
  width:18px;
  height:18px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.sei-ribbon-action > span:last-child{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.sei-ribbon-action b{
  font-size:12px;
  line-height:1.1;
  font-weight:950;
}

.sei-ribbon-action small{
  max-width:180px;
  overflow:hidden;
  color:#806f62;
  font-size:9px;
  line-height:1.1;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.sei-mobile-context{
  display:none;
}

/* =========================================================
   Login SEI
   ========================================================= */

.sei-auth-shell{
  background:
    radial-gradient(circle at 12% 18%,rgba(227,172,33,.20),transparent 28rem),
    radial-gradient(circle at 90% 80%,rgba(184,32,46,.12),transparent 28rem),
    linear-gradient(145deg,#fffaf0,#f5ead8);
}

.sei-auth-shell .sei-shell{
  display:none;
}

.sei-auth-shell .container{
  width:100%;
  max-width:none;
  padding:0;
}

.sei-login-page{
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(390px,.72fr);
}

.sei-login-brand-panel{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:100vh;
  padding:clamp(42px,7vw,96px);
  overflow:hidden;
  background:
    linear-gradient(145deg,rgba(255,255,255,.94),rgba(255,248,230,.88));
  border-right:1px solid #ddc9a6;
}

.sei-login-brand-panel::before{
  content:"";
  position:absolute;
  width:380px;
  height:380px;
  right:-150px;
  top:-170px;
  border:60px solid rgba(184,32,46,.07);
  border-radius:50%;
}

.sei-login-brand-panel::after{
  content:"";
  position:absolute;
  width:280px;
  height:280px;
  left:-130px;
  bottom:-150px;
  border:45px solid rgba(227,172,33,.16);
  border-radius:50%;
}

.sei-login-brand-head{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:16px;
}

.sei-login-cisk-logo{
  width:76px;
  height:76px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid #e0cfb4;
  border-radius:18px;
  background:#fff;
  box-shadow:0 14px 36px rgba(85,55,31,.12);
}

.sei-login-cisk-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.sei-login-product{
  color:#241c17;
  font-size:23px;
  font-weight:1000;
}

.sei-login-product b{
  color:var(--sei-ruby);
}

.sei-login-suite{
  display:flex;
  flex-direction:column;
  margin-top:4px;
  color:#654d3c;
  font-size:14px;
  line-height:1.08;
  font-weight:950;
  letter-spacing:.85px;
}

.sei-login-message{
  position:relative;
  z-index:1;
  max-width:720px;
  margin:70px 0 50px;
}

.sei-login-eyebrow{
  color:var(--sei-ruby);
  font-size:11px;
  font-weight:1000;
  letter-spacing:.15em;
}

.sei-login-message h1{
  max-width:700px;
  margin:12px 0 18px;
  color:#30241d;
  font-size:clamp(2.8rem,5vw,5.5rem);
  line-height:.96;
  letter-spacing:-.055em;
}

.sei-login-message p{
  max-width:670px;
  margin:0;
  color:#6d5e52;
  font-size:1.05rem;
  line-height:1.65;
}

.sei-login-company{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:13px;
  width:max-content;
  max-width:100%;
  padding:11px 16px 11px 10px;
  border:1px solid #e1cfb1;
  border-radius:16px;
  background:rgba(255,255,255,.82);
}

.sei-login-company-logo{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  padding:4px;
  border-radius:13px;
  background:#fff;
}

.sei-login-company-logo img{
  width:100%;
  height:100%;
  object-fit:contain;
}

.sei-login-company div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.sei-login-company small{
  color:#a28165;
  font-size:9px;
  font-weight:950;
  letter-spacing:.12em;
}

.sei-login-company strong{
  color:#463226;
  font-size:17px;
}

.sei-login-company span{
  color:#8a7565;
  font-size:11px;
}

.sei-zemita-note{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:11px;
  max-width:460px;
  margin-top:28px;
  padding:10px 12px 10px 10px;
  border-left:4px solid var(--sei-gold);
  border-radius:12px;
  background:rgba(255,255,255,.66);
}

.sei-zemita-note img{
  width:48px;
  height:48px;
  flex:0 0 48px;
  object-fit:cover;
  object-position:center 24%;
  border-radius:12px;
}

.sei-zemita-note div{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.sei-zemita-note b{
  color:#4e392b;
  font-size:12px;
}

.sei-zemita-note span{
  color:#7b6b5e;
  font-size:10px;
  line-height:1.35;
}

.sei-login-access-panel{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:100vh;
  padding:clamp(38px,6vw,82px);
  background:
    linear-gradient(180deg,#8b1d28 0%,#68151e 100%);
  color:#fff;
}

.sei-login-access-copy span{
  color:#ffdc72;
  font-size:10px;
  font-weight:1000;
  letter-spacing:.16em;
}

.sei-login-access-copy h2{
  margin:8px 0 4px;
  color:#fff;
  font-size:2.5rem;
  letter-spacing:-.04em;
}

.sei-login-access-copy p{
  margin:0 0 30px;
  color:rgba(255,255,255,.70);
}

.sei-login-access-panel .login-error{
  border-color:rgba(255,255,255,.24);
  background:rgba(255,255,255,.10);
  color:#fff;
}

.sei-login-form .login-field label{
  color:#fff6dc;
  font-size:12px;
}

.sei-login-form .login-field input{
  height:50px;
  border:1px solid rgba(255,255,255,.25);
  border-radius:13px;
  background:rgba(255,255,255,.96);
  color:#2f261f;
  font-size:15px;
}

.sei-login-button{
  height:50px;
  margin-top:8px;
  border:1px solid #f0c957;
  background:linear-gradient(180deg,#ffd95e,#e9b72e);
  color:#3b281d;
  box-shadow:0 10px 24px rgba(30,10,10,.20);
}

.sei-login-button:hover{
  filter:brightness(1.03);
  box-shadow:0 14px 28px rgba(30,10,10,.24);
}

.sei-login-foot{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-top:38px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.16);
  color:rgba(255,255,255,.65);
}

.sei-login-foot span{
  color:#fff;
  font-size:11px;
  font-weight:950;
}

.sei-login-foot small{
  font-size:9px;
}

/* =========================================================
   Ajustes Inicio SEI
   ========================================================= */

.sei-home{
  max-width:1320px;
}

.sei-home-hero{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at 88% 18%,rgba(184,32,46,.10),transparent 240px),
    linear-gradient(135deg,#fffaf0,#f4e6cf);
  border-color:#dcc6a4;
}

.sei-home-hero::after{
  content:"SEI";
  position:absolute;
  right:-8px;
  bottom:-45px;
  color:rgba(126,75,42,.055);
  font-size:150px;
  line-height:1;
  font-weight:1000;
  letter-spacing:-.08em;
}

.sei-home-hero-copy{
  position:relative;
  z-index:1;
}

.sei-home-signature{
  display:flex;
  flex-direction:column;
  gap:3px;
  margin-top:24px;
  color:#6d513e;
}

.sei-home-signature b{
  font-size:12px;
  letter-spacing:.08em;
}

.sei-home-signature b span{
  color:var(--sei-ruby);
}

.sei-home-signature small{
  color:#8a7464;
}

.sei-home-profile{
  position:relative;
  z-index:1;
}

.sei-home-section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
}

.sei-home-section-head p{
  max-width:500px;
  margin:0 0 4px;
  color:#76695e;
  font-size:.9rem;
  line-height:1.45;
  text-align:right;
}

.sei-home .cisk-home-card.is-featured{
  background:
    radial-gradient(circle at 100% 0%,rgba(255,218,94,.18),transparent 170px),
    linear-gradient(145deg,#8b1d28,#64141d);
  border-color:#8b1d28;
}

.sei-home .cisk-home-card.is-featured .cisk-home-card-icon{
  background:#fff3c8;
  color:#4a3024;
}

.sei-home-lower{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:18px;
  align-items:stretch;
  margin-top:24px;
}

.sei-home-info{
  margin:0;
}

.sei-home-zemita{
  display:flex;
  align-items:center;
  gap:14px;
  padding:18px;
  border:1px solid #dec8a5;
  border-radius:18px;
  background:#fffaf0;
  box-shadow:0 9px 26px rgba(44,35,24,.05);
}

.sei-home-zemita img{
  width:76px;
  height:76px;
  flex:0 0 76px;
  object-fit:cover;
  object-position:center 23%;
  border-radius:18px;
}

.sei-home-zemita div{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.sei-home-zemita span{
  color:var(--sei-ruby);
  font-size:9px;
  font-weight:1000;
  letter-spacing:.12em;
}

.sei-home-zemita b{
  color:#443126;
  font-size:14px;
}

.sei-home-zemita p{
  margin:0;
  color:#77675b;
  font-size:11px;
  line-height:1.45;
}

/* =========================================================
   Móvil: NO usamos ribbon de escritorio.
   Se conserva un menú compacto y solo un panel activo.
   ========================================================= */

@media (max-width:1180px) and (min-width:721px){
  .sei-commandbar{
    grid-template-columns:minmax(300px,auto) 1fr auto;
    padding-inline:12px;
  }

  .sei-company-chip{
    display:none;
  }

  .sei-ribbon-tab{
    padding-inline:11px;
    font-size:13px;
  }

  .sei-ribbon-action{
    min-width:110px;
  }

  .sei-shell .userbox .user{
    display:none;
  }
}

@media (max-width:720px){
  .sei-shell{
    border-top-width:3px;
  }

  .sei-commandbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:7px;
    min-height:62px;
    padding:7px 9px;
  }

  .sei-brand-zone{
    min-width:0;
  }

  .sei-brand-logo{
    width:40px;
    height:40px;
    flex-basis:40px;
    border-radius:10px;
  }

  .sei-brand-copy strong{
    font-size:14px;
  }

  .sei-brand-copy small{
    font-size:8px;
  }

  .sei-company-chip{
    display:none;
  }

  .sei-command-actions{
    display:none;
    grid-column:1 / -1;
    justify-content:space-between;
    padding-top:7px;
    border-top:1px solid #e3d1b6;
  }

  .sei-shell.mobile-nav-open .sei-command-actions{
    display:flex;
  }

  .sei-shell .mobile-nav-toggle{
    display:inline-flex;
    width:42px;
    height:42px;
    align-items:center;
    justify-content:center;
    border:1px solid #d5bea0;
    border-radius:11px;
    background:#fff;
    color:#513a2d;
    box-shadow:none;
  }

  .sei-ribbon-tabs{
    display:none;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:6px;
    padding:8px 9px;
    background:#f3e6d2;
  }

  .sei-shell.mobile-nav-open .sei-ribbon-tabs{
    display:grid;
  }

  .sei-ribbon-tab{
    width:100%;
    min-height:39px;
    padding:8px;
    border:1px solid #dbc5a7;
    border-radius:10px;
    background:#fffaf0;
    font-size:12px;
  }

  .sei-ribbon-tab.is-active{
    background:#fff;
    border-color:#b78355;
  }

  .sei-ribbon-tab.is-active::after{
    display:none;
  }

  .sei-ribbon-panels{
    display:none;
    padding:0 9px 8px;
    background:#f3e6d2;
  }

  .sei-shell.mobile-nav-open .sei-ribbon-panels{
    display:block;
  }

  .sei-ribbon-panel{
    display:grid;
    gap:7px;
    min-height:0;
    padding:8px;
    border:1px solid #ddc7a8;
    border-radius:12px;
    background:#fff;
  }

  .sei-ribbon-panel[hidden]{
    display:none !important;
  }

  .sei-ribbon-group{
    display:grid;
    grid-template-columns:1fr;
    gap:5px;
    min-height:0;
    padding:18px 0 0;
    margin:0;
    border:0;
  }

  .sei-ribbon-group-title{
    top:0;
    bottom:auto;
    right:0;
    text-align:left;
  }

  .sei-ribbon-action{
    width:100%;
    min-width:0;
    min-height:44px;
    border-color:#eee1cf;
    background:#fffaf3;
  }

  .sei-ribbon-action small{
    max-width:none;
  }

  .sei-shell .userbox{
    flex:1;
    justify-content:flex-end;
    gap:5px;
  }

  .sei-shell .userbox .user{
    display:none;
  }

  .sei-mobile-context{
    display:flex;
    align-items:baseline;
    gap:7px;
    padding:4px 11px 6px;
    border-top:1px solid #eadbc7;
    background:#fffaf1;
    color:#4e392d;
  }

  .sei-mobile-context span{
    font-size:10px;
    font-weight:950;
  }

  .sei-mobile-context small{
    min-width:0;
    overflow:hidden;
    color:#927b68;
    font-size:9px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .sei-login-page{
    grid-template-columns:1fr;
  }

  .sei-login-brand-panel{
    min-height:auto;
    padding:28px 22px 22px;
    border-right:0;
    border-bottom:1px solid #dec7a7;
  }

  .sei-login-cisk-logo{
    width:58px;
    height:58px;
    border-radius:14px;
  }

  .sei-login-product{
    font-size:18px;
  }

  .sei-login-suite{
    font-size:10px;
  }

  .sei-login-message{
    margin:34px 0 24px;
  }

  .sei-login-message h1{
    font-size:2.45rem;
  }

  .sei-zemita-note{
    display:none;
  }

  .sei-login-access-panel{
    min-height:auto;
    padding:30px 22px 42px;
  }

  .sei-login-access-copy h2{
    font-size:2rem;
  }

  .sei-home-section-head{
    display:block;
  }

  .sei-home-section-head p{
    margin-top:8px;
    text-align:left;
  }

  .sei-home-lower{
    grid-template-columns:1fr;
  }
}

@media (max-width:460px){
  .sei-brand-copy small{
    display:none;
  }

  .sei-ribbon-tabs{
    grid-template-columns:1fr;
  }

  .sei-login-company{
    width:100%;
  }
}


/* =========================================================
   HOTFIX 75.3.0.9.1.1
   Ajustes visuales del Ribbon + auto-colapso
   ========================================================= */

.sei-shell{
  box-shadow:0 10px 26px rgba(74,49,31,.14);
}

.sei-brand-copy small{
  color:#e3ac21 !important;
  font-size:12px !important;
  line-height:1.05 !important;
  font-weight:1000 !important;
  letter-spacing:.7px !important;
  text-transform:uppercase;
}

.sei-company-chip{
  min-width:220px !important;
  max-width:280px !important;
  gap:10px !important;
  padding:7px 14px 7px 8px !important;
  border-color:#d7bf9a !important;
  background:rgba(255,255,255,.95) !important;
  box-shadow:0 5px 16px rgba(73,50,35,.08);
}

.sei-company-logo{
  width:50px !important;
  height:42px !important;
  flex:0 0 50px !important;
  padding:4px 6px !important;
  border-radius:10px !important;
  background:#fff !important;
}

.sei-company-copy small{
  color:#9a7a5f !important;
  font-size:9px !important;
  line-height:1.1 !important;
  letter-spacing:.8px !important;
}

.sei-company-copy strong{
  color:#4a3528 !important;
  font-size:16px !important;
  line-height:1.1 !important;
  font-weight:950 !important;
}

.sei-ribbon-tabs{
  box-shadow:inset 0 -1px 0 #ccb997;
}

.sei-ribbon-tab{
  font-size:14px !important;
}

.sei-ribbon-group-title{
  color:#7f6243 !important;
  font-size:10px !important;
  font-weight:1000 !important;
  letter-spacing:.85px !important;
}

.sei-ribbon-action{
  min-width:146px !important;
  min-height:48px !important;
  gap:9px !important;
  padding:7px 10px !important;
  border-radius:10px !important;
}

.sei-ribbon-action:hover{
  border-color:#d7c09d !important;
  background:#fff2dc !important;
}

.sei-ribbon-icon{
  width:31px !important;
  height:31px !important;
  flex:0 0 31px !important;
  border-radius:9px !important;
}

.sei-ribbon-action b{
  color:#483223 !important;
  font-size:13px !important;
  line-height:1.12 !important;
  font-weight:1000 !important;
}

.sei-ribbon-action small{
  max-width:240px !important;
  overflow:visible !important;
  color:#6a5544 !important;
  font-size:11px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
  text-overflow:clip !important;
  white-space:normal !important;
}

.sei-ribbon-panels{
  transition:max-height .22s ease, opacity .18s ease, padding .18s ease, border-color .18s ease;
  overflow:hidden;
  max-height:150px;
  opacity:1;
}

.sei-shell.is-ribbon-collapsed .sei-ribbon-panels{
  max-height:0;
  opacity:0;
  padding-top:0 !important;
  padding-bottom:0 !important;
  border-bottom-color:transparent !important;
}

.sei-shell.is-ribbon-collapsed .sei-ribbon-panel{
  min-height:0 !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
  border-bottom:0 !important;
}

.sei-shell.is-ribbon-collapsed .sei-ribbon-group{
  min-height:0 !important;
  padding-bottom:0 !important;
  border-right:0 !important;
}

.sei-shell.is-ribbon-collapsed .sei-ribbon-tab.is-active{
  box-shadow:inset 0 -3px 0 var(--sei-ruby);
}

.sei-shell.is-ribbon-collapsed .sei-ribbon-tab.is-active::after{
  display:none;
}

@media (max-width:1180px) and (min-width:721px){
  .sei-company-chip{
    min-width:205px !important;
    max-width:235px !important;
  }

  .sei-ribbon-action{
    min-width:132px !important;
  }

  .sei-ribbon-action b{
    font-size:12px !important;
  }

  .sei-ribbon-action small{
    font-size:10px !important;
  }
}

@media (max-width:720px){
  .sei-brand-copy small{
    font-size:9px !important;
  }

  .sei-company-chip{
    min-width:0 !important;
    max-width:none !important;
  }

  .sei-ribbon-action b{
    font-size:12px !important;
  }

  .sei-ribbon-action small{
    font-size:10px !important;
  }

  .sei-shell.is-ribbon-collapsed .sei-ribbon-panels{
    max-height:none;
    opacity:1;
  }
}

/* =========================================================
   HOTFIX 75.3.0.9.1.2
   AFINADO VISUAL FINAL · CISK ERP | SEI
   - más personalidad en barra superior
   - logo ShekaPan con mayor presencia
   - estados activos/hover más claros
   - mantiene fondo marfil
   ========================================================= */

:root{
  --sei-brand-red:#b7192b;
  --sei-brand-red-dark:#8f1320;
  --sei-brand-gold:#e8b622;
  --sei-brand-gold-soft:#f7dfa0;
  --sei-brand-coffee:#4b3327;
  --sei-brand-ivory:#fff9ee;
  --sei-brand-ivory-deep:#f4e3c5;
}

/* ---------------------------------------------------------
   1. PERSONALIDAD DE LA BARRA SUPERIOR
   --------------------------------------------------------- */

.sei-shell{
  border-top:4px solid var(--sei-brand-red) !important;
  border-bottom:1px solid #c9ab7c !important;
  background:#fffaf0 !important;
  box-shadow:
    0 10px 28px rgba(78,50,28,.16),
    0 2px 0 rgba(232,182,34,.34) !important;
}

.sei-commandbar{
  position:relative;
  min-height:72px !important;
  background:
    radial-gradient(
      circle at 14% 0%,
      rgba(232,182,34,.20),
      transparent 260px
    ),
    linear-gradient(
      90deg,
      #fffdf8 0%,
      #fff8e8 48%,
      #f5e4c6 100%
    ) !important;
}

.sei-commandbar::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:2px;
  background:linear-gradient(
    90deg,
    var(--sei-brand-red) 0%,
    var(--sei-brand-gold) 42%,
    rgba(232,182,34,.18) 82%,
    transparent 100%
  );
  pointer-events:none;
}

.sei-brand-zone{
  position:relative;
}

.sei-brand-zone::before{
  content:"";
  position:absolute;
  left:-10px;
  top:4px;
  bottom:4px;
  width:4px;
  border-radius:8px;
  background:linear-gradient(
    180deg,
    var(--sei-brand-red),
    var(--sei-brand-gold)
  );
  opacity:.9;
}

/* ---------------------------------------------------------
   2. CISK ERP | SEI MÁS DEFINIDO
   --------------------------------------------------------- */

.sei-brand-copy strong{
  color:#261c16 !important;
  font-size:18px !important;
  letter-spacing:.15px !important;
}

.sei-brand-copy strong em{
  color:var(--sei-brand-red) !important;
}

.sei-brand-copy small{
  color:var(--sei-brand-gold) !important;
  font-size:12px !important;
  line-height:1.03 !important;
  font-weight:1000 !important;
  letter-spacing:.75px !important;
  text-shadow:0 1px 0 rgba(255,255,255,.95);
}

/* ---------------------------------------------------------
   3. SHEKAPAN MÁS VISIBLE
   El PNG tiene bastante aire interno; hacemos zoom visual por CSS
   sin modificar el archivo de marca.
   --------------------------------------------------------- */

.sei-company-chip{
  min-width:250px !important;
  max-width:310px !important;
  min-height:54px !important;
  gap:12px !important;
  padding:6px 15px 6px 8px !important;
  border:1px solid #d4b98d !important;
  border-left:4px solid var(--sei-brand-gold) !important;
  border-radius:13px !important;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.98),
      rgba(255,248,235,.96)
    ) !important;
  box-shadow:
    0 5px 14px rgba(73,50,35,.08),
    inset 0 1px 0 rgba(255,255,255,.9) !important;
}

.sei-company-logo{
  width:74px !important;
  height:44px !important;
  flex:0 0 74px !important;
  overflow:hidden !important;
  padding:0 !important;
  border:0 !important;
  border-radius:8px !important;
  background:#fff !important;
}

.sei-company-logo img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  transform:scale(1.48);
  transform-origin:center center;
}

.sei-company-copy small{
  color:#987251 !important;
  font-size:9px !important;
  letter-spacing:.9px !important;
}

.sei-company-copy strong{
  color:#3f2c22 !important;
  font-size:16px !important;
  font-weight:1000 !important;
}

/* ---------------------------------------------------------
   4. PESTAÑAS DEL RIBBON
   --------------------------------------------------------- */

.sei-ribbon-tabs{
  min-height:40px !important;
  padding-top:2px !important;
  background:
    linear-gradient(
      180deg,
      #f6e6ca 0%,
      #ead3aa 100%
    ) !important;
  border-top:0 !important;
  border-bottom:1px solid #c8a978 !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    inset 0 -1px 0 rgba(116,74,36,.10) !important;
}

.sei-ribbon-tab{
  position:relative;
  min-height:38px !important;
  padding:9px 16px 8px !important;
  border-radius:9px 9px 0 0 !important;
  color:#4b362a !important;
  font-size:14px !important;
  font-weight:950 !important;
  transition:
    background .14s ease,
    color .14s ease,
    border-color .14s ease,
    box-shadow .14s ease,
    transform .14s ease !important;
}

.sei-ribbon-tab:hover{
  border-color:#d5b27d !important;
  background:
    linear-gradient(
      180deg,
      #fff7df,
      #f9e8c6
    ) !important;
  color:#7c1b24 !important;
  box-shadow:
    inset 0 -3px 0 rgba(232,182,34,.75) !important;
}

.sei-ribbon-tab.is-active{
  border-color:#c69f67 !important;
  background:
    linear-gradient(
      180deg,
      #fffefa 0%,
      #fff8ea 100%
    ) !important;
  color:var(--sei-brand-red-dark) !important;
  box-shadow:
    0 -2px 0 rgba(255,255,255,.90),
    inset 0 -4px 0 var(--sei-brand-red) !important;
}

.sei-ribbon-tab.is-active::after{
  display:none !important;
}

/* Cuando el ribbon está colapsado, la pestaña activa sigue avisando
   visualmente que puede volver a desplegarse. */
.sei-shell.is-ribbon-collapsed .sei-ribbon-tab.is-active{
  background:
    linear-gradient(
      180deg,
      #fff8e7,
      #f7e7c8
    ) !important;
  box-shadow:
    inset 0 -4px 0 var(--sei-brand-red),
    0 1px 0 rgba(255,255,255,.7) !important;
}

.sei-shell.is-ribbon-collapsed .sei-ribbon-tab.is-active::before{
  content:"⌄";
  position:absolute;
  right:7px;
  top:50%;
  transform:translateY(-53%);
  color:var(--sei-brand-gold);
  font-size:12px;
  font-weight:1000;
}

/* ---------------------------------------------------------
   5. ACCIONES DEL RIBBON: contraste / hover / jerarquía
   --------------------------------------------------------- */

.sei-ribbon-panel{
  background:
    linear-gradient(
      180deg,
      #fffefa 0%,
      #fffaf1 100%
    ) !important;
}

.sei-ribbon-group{
  border-right-color:#dfcba9 !important;
}

.sei-ribbon-group-title{
  color:#7b5737 !important;
  font-size:10px !important;
  font-weight:1000 !important;
  letter-spacing:.9px !important;
}

.sei-ribbon-action{
  position:relative;
  min-width:154px !important;
  min-height:50px !important;
  border:1px solid transparent !important;
  background:transparent !important;
  transition:
    background .13s ease,
    border-color .13s ease,
    box-shadow .13s ease,
    transform .13s ease !important;
}

.sei-ribbon-action:hover{
  transform:translateY(-1px);
  border-color:#d9b879 !important;
  background:
    linear-gradient(
      180deg,
      #fff8e7,
      #ffefd1
    ) !important;
  box-shadow:
    0 4px 12px rgba(96,59,27,.09),
    inset 3px 0 0 var(--sei-brand-gold) !important;
}

.sei-ribbon-action:focus-visible{
  outline:3px solid rgba(232,182,34,.34) !important;
  outline-offset:2px !important;
}

.sei-ribbon-action.is-key{
  border-color:#e3c27c !important;
  background:
    linear-gradient(
      180deg,
      #fff5d4 0%,
      #ffeab7 100%
    ) !important;
}

.sei-ribbon-action.is-key:hover{
  border-color:#cfa447 !important;
  background:
    linear-gradient(
      180deg,
      #fff0bd,
      #ffdf91
    ) !important;
}

.sei-ribbon-icon{
  color:var(--sei-brand-red) !important;
  background:#f8ead6 !important;
  box-shadow:inset 0 0 0 1px rgba(176,118,66,.08);
}

.sei-ribbon-action:hover .sei-ribbon-icon{
  background:#fff !important;
  color:var(--sei-brand-red-dark) !important;
}

.sei-ribbon-action b{
  color:#3f2b20 !important;
  font-size:13px !important;
  font-weight:1000 !important;
}

.sei-ribbon-action small{
  color:#675242 !important;
  font-size:11px !important;
  line-height:1.22 !important;
  font-weight:850 !important;
}

/* ---------------------------------------------------------
   6. CONTROLES DE USUARIO / NOTIFICACIONES
   --------------------------------------------------------- */

.sei-shell .role-pill{
  border-color:#d8a3a9 !important;
  background:#fff0f1 !important;
  color:#921726 !important;
  font-weight:1000 !important;
}

.sei-shell .userbox .link{
  border-color:#d9c2a0 !important;
  background:rgba(255,255,255,.82) !important;
}

.sei-shell .userbox .link:hover{
  border-color:#c79c58 !important;
  background:#fff4dc !important;
  color:#7d1721 !important;
}

.sei-shell .notification-bell:hover{
  border-color:#d2a84e !important;
  background:#fff3cc !important;
}

/* ---------------------------------------------------------
   7. SEPARACIÓN ENTRE SHELL Y CONTENIDO
   La sombra y una banda fina ayudan a que la navegación no se funda
   con el fondo marfil de las páginas.
   --------------------------------------------------------- */

.sei-shell + .container{
  position:relative;
}

.sei-shell + .container::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:10px;
  pointer-events:none;
  background:
    linear-gradient(
      180deg,
      rgba(102,65,32,.09),
      rgba(102,65,32,0)
    );
}

/* ---------------------------------------------------------
   8. RESPONSIVE
   --------------------------------------------------------- */

@media (max-width:1180px) and (min-width:721px){
  .sei-company-chip{
    min-width:220px !important;
    max-width:250px !important;
  }

  .sei-company-logo{
    width:62px !important;
    flex-basis:62px !important;
  }

  .sei-ribbon-action{
    min-width:138px !important;
  }
}

@media (max-width:720px){
  .sei-commandbar{
    min-height:64px !important;
  }

  .sei-brand-zone::before{
    display:none;
  }

  .sei-brand-copy strong{
    font-size:14px !important;
  }

  .sei-brand-copy small{
    font-size:9px !important;
  }

  /* En móvil mantenemos la empresa en el contexto textual;
     no agrandamos el chip oculto. */
  .sei-company-chip{
    min-width:0 !important;
    max-width:none !important;
  }

  .sei-ribbon-action{
    min-width:0 !important;
    min-height:46px !important;
  }

  .sei-shell + .container::before{
    height:6px;
  }
}

/* hotfix75-3-0-9-1-2-final-visual-polish */

/* =========================================================
   HOTFIX 75.3.0.9.1.2.1
   - corrige logo ShekaPan entrecortado
   - deja más aire al contenedor de empresa activa
   ========================================================= */

.sei-company-chip{
  min-width:270px !important;
  max-width:340px !important;
  min-height:56px !important;
  gap:12px !important;
}

.sei-company-logo{
  width:88px !important;
  height:48px !important;
  flex:0 0 88px !important;
  overflow:hidden !important;
  padding:2px 4px !important;
  border-radius:8px !important;
  background:#fff !important;
}

.sei-company-logo img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  transform:scale(1.18) !important;
  transform-origin:center center !important;
}

.sei-company-copy strong{
  font-size:16px !important;
}

/* hotfix75-3-0-9-1-2-1-logo-fix */

/* =========================================================
   HOTFIX 75.3.0.9.1.2.2
   Logo ShekaPan: activo recortado de forma NO destructiva y sin zoom CSS.
   ========================================================= */
.sei-company-chip{
  min-width:285px !important;
  max-width:360px !important;
  min-height:58px !important;
  gap:13px !important;
  padding:6px 16px 6px 8px !important;
}

.sei-company-logo{
  width:118px !important;
  height:46px !important;
  flex:0 0 118px !important;
  overflow:visible !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
}

.sei-company-logo img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  object-position:center center !important;
  transform:none !important;
}

.sei-company-copy{
  min-width:125px !important;
}

.sei-company-copy strong{
  font-size:16px !important;
  white-space:nowrap !important;
}

@media (max-width:1180px) and (min-width:721px){
  .sei-company-chip{
    min-width:260px !important;
    max-width:300px !important;
  }
  .sei-company-logo{
    width:104px !important;
    flex-basis:104px !important;
  }
}

/* hotfix75-3-0-9-1-2-2-header-logo */


/* =========================================================
   HOTFIX 75.3.0.9.1.4
   UI MÓVIL
   - submenú inmediatamente bajo módulo seleccionado
   - sin recorte de opciones del Ribbon
   - filtros operativos contraídos por defecto en móvil
   ========================================================= */

/* En escritorio el wrapper de filtros no altera el layout existente. */
.operational-filter-details{
  display:contents;
}

/* Restauración de la funcionalidad 75.3.0.6 que había quedado
   fuera del styles.css posterior de identidad SEI. */
.mobile-filter-details{
  width:100%;
}

.mobile-filter-summary{
  display:none;
}

@media (max-width:720px){

  /* -------- Ribbon -------- */

  .sei-shell.mobile-nav-open .sei-ribbon-tabs{
    display:grid !important;
    grid-template-columns:1fr !important;
    align-items:stretch;
    max-height:calc(100dvh - 145px);
    overflow-x:hidden;
    overflow-y:auto;
    overscroll-behavior:contain;
    padding-bottom:10px;
  }

  /* El host desktop queda vacío en móvil: el panel activo se mueve
     debajo de su pestaña mediante JS. */
  .sei-shell.mobile-nav-open .sei-ribbon-panels{
    display:none !important;
    max-height:none !important;
    overflow:visible !important;
    opacity:1 !important;
    padding:0 !important;
  }

  .sei-ribbon-panel{
    grid-column:1 / -1 !important;
    width:100%;
    max-height:none !important;
    overflow:visible !important;
    opacity:1 !important;
  }

  .sei-ribbon-tabs > .sei-ribbon-panel:not([hidden]){
    display:grid !important;
    margin:0 0 4px;
    padding:8px !important;
  }

  .sei-ribbon-tabs > .sei-ribbon-panel .sei-ribbon-group{
    padding-top:18px !important;
  }

  .sei-ribbon-tabs > .sei-ribbon-panel .sei-ribbon-action{
    min-width:0 !important;
    width:100% !important;
  }

  /* -------- Filtros -------- */

  .operational-filter-details{
    display:block;
  }

  .mobile-filter-details{
    width:100%;
    margin-top:8px;
    border:1px solid rgba(58,42,20,.12);
    border-radius:14px;
    background:rgba(255,255,255,.70);
    overflow:hidden;
  }

  .mobile-filter-summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    min-height:44px;
    padding:10px 12px;
    cursor:pointer;
    list-style:none;
    font-weight:900;
    color:var(--brand-ink);
    background:linear-gradient(
      180deg,
      rgba(255,255,255,.96),
      rgba(255,250,240,.96)
    );
  }

  .mobile-filter-summary::-webkit-details-marker{
    display:none;
  }

  .mobile-filter-summary::after{
    content:"▾";
    flex:0 0 auto;
    font-size:15px;
    transition:transform .15s ease;
  }

  .mobile-filter-details[open] .mobile-filter-summary::after{
    transform:rotate(180deg);
  }

  .mobile-filter-summary small{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:11px;
    font-weight:800;
    color:var(--muted);
  }

  .mobile-filter-details > form.mobile-compact-filter{
    margin:0 !important;
    border:0 !important;
    border-top:1px solid rgba(58,42,20,.10) !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }

  /* Producción: al desplegar, los campos quedan cómodos a una columna. */
  .operational-filter-details .tablero-filter-inline{
    display:grid !important;
    grid-template-columns:1fr !important;
    width:100% !important;
    padding:10px !important;
    gap:8px !important;
  }

  .operational-filter-details .tablero-filter-inline > div,
  .operational-filter-details .tablero-filter-inline input,
  .operational-filter-details .tablero-filter-inline select,
  .operational-filter-details .tablero-filter-inline button{
    min-width:0 !important;
    width:100% !important;
  }

  .operational-filter-details .compact-check{
    width:100% !important;
    justify-content:flex-start;
  }

  /* Pedidos general */
  .pedidos-general-mobile-filter .pedidos-general-filtros-v2{
    margin:0 !important;
    border:0 !important;
    border-top:1px solid rgba(58,42,20,.10) !important;
    border-radius:0 !important;
    box-shadow:none !important;
    padding:10px !important;
  }
}

/* hotfix75-3-0-9-1-4-mobile-ribbon-filters */

/* hotfix75-3-0-10-1-2-1-general-gps-buttons */
.cisk-pedido-action-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.28rem;
  min-height:32px;
  padding:.34rem .62rem;
  margin:.18rem .22rem .18rem 0;
  border:1px solid #bfd1f3;
  border-radius:999px;
  background:#f5f9ff;
  color:#0757c7 !important;
  font-weight:800;
  font-size:.86rem;
  line-height:1.1;
  text-decoration:none !important;
  white-space:nowrap;
}
.cisk-pedido-action-btn:hover,
.cisk-pedido-action-btn:focus{
  background:#eaf2ff;
  border-color:#8fb1ed;
  text-decoration:none !important;
}
@media (max-width:720px){
  .cisk-pedido-action-btn{
    min-height:30px;
    padding:.31rem .55rem;
    font-size:.82rem;
  }
}

/* ==========================================================================
   75.3.0.11.6 · Historial operativo dentro de la PostIt de Producción
   ========================================================================== */
.production-history-details {
  margin-top: 10px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

.production-history-details > summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  font-weight: 800;
  user-select: none;
}

.production-history-count {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.78rem;
  background: rgba(17, 24, 39, 0.08);
}

.production-history-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 0 11px 9px;
  font-size: 0.78rem;
  opacity: 0.78;
}

.production-history-list {
  border-top: 1px solid rgba(17, 24, 39, 0.10);
}

.production-history-item {
  padding: 9px 11px;
}

.production-history-item + .production-history-item {
  border-top: 1px dashed rgba(17, 24, 39, 0.12);
}

.production-history-line {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.production-history-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.08);
  font-weight: 900;
  line-height: 1;
}

.production-history-main {
  min-width: 0;
  flex: 1 1 auto;
}

.production-history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.production-history-head time {
  white-space: nowrap;
  font-size: 0.76rem;
  opacity: 0.72;
}

.production-history-main > small {
  display: block;
  margin-top: 2px;
  opacity: 0.78;
}

.production-history-route {
  margin-top: 3px;
  font-weight: 700;
}

.production-history-note,
.production-history-annulment {
  margin-top: 6px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.045);
  overflow-wrap: anywhere;
}

.production-history-note.is-problem {
  background: rgba(146, 64, 14, 0.08);
}

.production-history-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 5px;
  font-size: 0.76rem;
  opacity: 0.8;
}

.production-history-item.is-annulled {
  opacity: 0.76;
}

@media (max-width: 700px) {
  .production-history-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .production-history-head time {
    white-space: normal;
  }

  .production-history-details > summary {
    padding: 9px;
  }

  .production-history-item {
    padding: 9px;
  }
}

/* hotfix75-3-0-11-6-historial-operativo-postit */

/* ==========================================================================
   75.3.0.11.8 · Notas multiárea + lectura explícita
   ========================================================================== */
.shared-note-destinations {
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 10px;
}

.shared-note-destinations > legend {
  padding: 0 5px;
  font-weight: 800;
}

.shared-note-destination-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 7px;
}

.shared-note-destination-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 9px;
  border: 1px solid rgba(17, 24, 39, 0.10);
  border-radius: 9px;
  background: rgba(255,255,255,.7);
  cursor: pointer;
}

.shared-note-destination-option input {
  margin-top: 2px;
  flex: 0 0 auto;
}

.shared-note-destination-option span {
  min-width: 0;
}

.shared-note-destination-option small {
  display: block;
  margin-top: 1px;
  opacity: .72;
  font-weight: 500;
}

.shared-note-destination-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.shared-note-destination-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .08);
  font-size: .76rem;
  line-height: 1.35;
}

.shared-note-open-form {
  margin-top: 8px;
}

.shared-note-open-button {
  min-height: 34px;
}

.shared-note-open-content {
  margin-top: 8px;
}

.shared-note-read-count {
  font-weight: 700;
  opacity: .8;
}

.shared-note-readers {
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 9px;
  background: rgba(17, 24, 39, .045);
}

.shared-note-readers > summary {
  cursor: pointer;
  font-weight: 700;
}

.shared-note-readers-list {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.shared-note-readers-list > span {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
}

.shared-note-readers-list small {
  opacity: .72;
}

@media (max-width: 700px) {
  .shared-note-destination-grid {
    grid-template-columns: 1fr;
  }

  .shared-note-destination-option {
    padding: 9px;
  }
}

/* hotfix75-3-0-11-8-notas-multiarea-lectura */
/* 75.3.0.11.9 - Pedidos > Seguimiento */
.seguimiento-filtros{display:grid;grid-template-columns:repeat(5,minmax(145px,1fr));gap:12px;align-items:end;margin:16px 0;padding:16px;border:1px solid var(--line,#d8dee7);border-radius:14px;background:var(--card,#fff)}
.seguimiento-filtros label{display:grid;gap:5px;font-size:.82rem;font-weight:700}
.seguimiento-filtros input,.seguimiento-filtros select{min-height:40px}
.seguimiento-filter-details{margin:0;padding:0}
.seguimiento-filter-summary{display:none}
.seguimiento-q{grid-column:span 2}
.seguimiento-resumen{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 16px}
.seguimiento-resumen span{padding:8px 12px;border-radius:999px;background:#eef3f8;border:1px solid #d8e1eb}
.seguimiento-lista{display:grid;gap:14px}
.seguimiento-card{border:1px solid #d9e0e8;border-left:6px solid #d69b18;border-radius:14px;background:#fff;padding:15px;box-shadow:0 3px 12px rgba(25,42,70,.06)}
.seguimiento-card.seguimiento-problema{border-left-color:#c93838}
.seguimiento-card.is-atendida{border-left-color:#319264;opacity:.94}
.seguimiento-card>header{display:flex;justify-content:space-between;align-items:center;gap:12px}
.seguimiento-card>header>div{display:flex;flex-wrap:wrap;align-items:center;gap:9px}
.seguimiento-tipo,.seguimiento-estado{font-size:.72rem;font-weight:800;letter-spacing:.04em;padding:4px 8px;border-radius:999px;background:#f2f4f7}
.seguimiento-meta{display:flex;flex-wrap:wrap;gap:7px 16px;margin:10px 0;color:#536171;font-size:.84rem}
.seguimiento-destinos{margin:8px 0;color:#344357}
.seguimiento-texto{white-space:pre-wrap;padding:12px;border-radius:10px;background:#f7f9fb;font-weight:600}
.seguimiento-resolucion{margin-top:10px;padding:11px;border-radius:10px;background:#eaf7f0}
.seguimiento-resolucion small{display:block;margin-top:5px}
.seguimiento-auditoria{margin-top:11px}
.seguimiento-auditoria summary{cursor:pointer;font-weight:800;color:#365a82}
.seguimiento-auditoria-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:10px}
.seguimiento-auditoria-grid section{padding:11px;border:1px solid #e1e6ec;border-radius:10px}
.seguimiento-auditoria-grid h3{margin:0 0 8px;font-size:.9rem}
.seguimiento-audit-row{display:grid;gap:3px;padding:8px 0;border-bottom:1px solid #edf0f4;font-size:.82rem}
.seguimiento-audit-row:last-child{border-bottom:0}
@media(max-width:900px){.seguimiento-filtros{grid-template-columns:1fr 1fr}.seguimiento-q{grid-column:span 2}.seguimiento-auditoria-grid{grid-template-columns:1fr}}
@media(max-width:560px){.seguimiento-filtros{grid-template-columns:1fr}.seguimiento-q{grid-column:auto}.seguimiento-card>header{align-items:flex-start}.seguimiento-meta{display:grid;gap:5px}}
@media(min-width:901px){.seguimiento-filter-details:not([open])>.seguimiento-filtros{display:grid}}
@media(max-width:900px){
  .seguimiento-filter-details{margin:14px 0}
  .seguimiento-filter-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border:1px solid var(--line,#d8dee7);border-radius:14px;background:var(--card,#fff);cursor:pointer;list-style:none;font-weight:900}
  .seguimiento-filter-summary::-webkit-details-marker{display:none}
  .seguimiento-filter-summary:after{content:'▾';flex:0 0 auto;font-size:.82rem;transition:transform .16s ease}
  .seguimiento-filter-details[open]>.seguimiento-filter-summary:after{transform:rotate(180deg)}
  .seguimiento-filter-summary small{min-width:0;margin-left:auto;color:#667085;font-size:.72rem;font-weight:600;text-align:right}
  .seguimiento-filter-details>.seguimiento-filtros{margin:7px 0 0}
}
@media(max-width:560px){.seguimiento-filter-summary{align-items:flex-start}.seguimiento-filter-summary small{display:none}}

/* 75.3.0.11.9.1 - permisos, contención y checklist compacto */
.shared-notes-card,.shared-notes-history,.shared-notes-list,.shared-note-latest,.shared-note-item,.shared-note-item-head,.shared-note-meta,.shared-note-open-content,.shared-note-text,.shared-note-readers{box-sizing:border-box;min-width:0;max-width:100%}
.shared-note-item{width:100%;overflow:hidden}
.shared-note-item-head{display:flex;flex-wrap:wrap}
.shared-note-item-head>div{min-width:0;flex:1 1 180px}
.shared-note-meta,.shared-note-text,.shared-note-emphasis,.shared-note-destination-summary{overflow-wrap:anywhere;word-break:break-word}
.shared-note-emphasis{display:inline-flex;flex-wrap:wrap;max-width:100%;white-space:normal}
.shared-note-destination-chip{min-width:0;max-width:100%;white-space:normal}
.shared-note-open-content{width:100%;overflow:hidden}
.shared-note-readers-list>span{min-width:0}
.shared-note-checklist{padding:8px}
.shared-note-checklist-control{position:relative;width:100%;margin:0}
.shared-note-checklist-control>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px;padding:8px 11px;border:1px solid rgba(17,24,39,.16);border-radius:9px;background:#fff;cursor:pointer;list-style:none}
.shared-note-checklist-control>summary::-webkit-details-marker{display:none}
.shared-note-checklist-control>summary:after{content:'▾';font-size:.8rem;transition:transform .16s ease}
.shared-note-checklist-control[open]>summary:after{transform:rotate(180deg)}
.shared-note-checklist-title{font-weight:800;min-width:0}
.shared-note-checklist-count{margin-left:auto;padding:3px 8px;border-radius:999px;background:#eef2f7;color:#41536a;font-size:.72rem;font-weight:800;white-space:nowrap}
.shared-note-checklist-panel{margin-top:6px;padding:7px;border:1px solid rgba(17,24,39,.14);border-radius:9px;background:#fff;box-shadow:0 8px 22px rgba(27,39,58,.12)}
.shared-note-checklist-actions{display:flex;justify-content:flex-end;gap:6px;margin-bottom:6px}
.shared-note-checklist-actions button{min-height:28px;padding:4px 8px;border-radius:7px;font-size:.72rem}
.shared-note-checklist .shared-note-destination-grid{display:grid;grid-template-columns:1fr;gap:2px;max-height:210px;overflow-y:auto;overscroll-behavior:contain;padding-right:2px}
.shared-note-checklist .shared-note-destination-option{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:7px;min-height:34px;padding:5px 7px;border:0;border-radius:7px;background:transparent}
.shared-note-checklist .shared-note-destination-option:hover{background:#f4f7fa}
.shared-note-checklist .shared-note-destination-option.is-selected{background:#eaf3ff;box-shadow:inset 3px 0 #356da8}
.shared-note-checklist .shared-note-destination-option input{width:16px;height:16px;margin:0}
.shared-note-checklist .shared-note-destination-option span{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.shared-note-checklist .shared-note-destination-option b{font-size:.78rem;line-height:1.2}
.shared-note-checklist .shared-note-destination-option small{margin:0;white-space:nowrap;font-size:.66rem}
.seguimiento-scope-note{margin:8px 0 14px;padding:9px 12px;border-left:4px solid #356da8;border-radius:8px;background:#edf5ff;color:#2d4f73;font-size:.84rem}

/* 75.3.0.11.9.3 - tablero general enfocado */
.pedidos-general-task-details{margin:12px 0 16px;border:1px solid rgba(17,24,39,.14);border-radius:12px;background:rgba(255,255,255,.72);overflow:hidden}
.pedidos-general-task-details>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;cursor:pointer;font-weight:900;list-style:none}
.pedidos-general-task-details>summary::-webkit-details-marker{display:none}
.pedidos-general-task-details>summary:after{content:'▾';font-size:.8rem;transition:transform .16s ease}
.pedidos-general-task-details[open]>summary:after{transform:rotate(180deg)}
.pedidos-general-task-details>summary small{margin-left:auto;color:var(--text-soft,#5f6670);font-weight:600;text-align:right}
.pedidos-general-task-details .pedidos-task-embed{padding:0 10px 10px}
.pedidos-state-nav-button.state-resumen{background:#edf4ff;border-color:#9bbce0;color:#254e79}
@media(max-width:700px){.pedidos-general-task-details>summary{align-items:flex-start}.pedidos-general-task-details>summary small{display:none}}


/* evidencias-tareas-75-3-0-11-9-10 */
/* Se incorpora al final de app/static/styles.css durante la instalacion. */
.task-evidence-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
.task-evidence-grid .task-attachment-card{min-width:0;}
.task-evidence-upload-form small{display:block;margin-top:4px;color:var(--text-soft,#667085);line-height:1.35;}
.task-evidence-upload-form input[type="file"]{max-width:100%;}
@media(max-width:640px){
  .task-evidence-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .task-evidence-grid .task-attachment-card{padding:8px;font-size:.88rem;}
  .task-evidence-grid .task-attachment-card img{height:110px;}
  .task-evidence-grid .task-attachment-card b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}
/* 75.3.0.11.9.11 - plantillas y tareas repetitivas */
.task-template-page{max-width:1420px;margin:0 auto;padding:28px 22px 80px}.task-template-heading,.section-inline-title{display:flex;gap:18px;align-items:flex-start;justify-content:space-between}.task-template-heading h1{margin:.15rem 0}.task-template-heading p{max-width:740px;color:#5a6478}.eyebrow{font-size:.76rem;font-weight:800;letter-spacing:.08em;color:#9d6616}.back-link{display:inline-block;margin-bottom:14px;font-weight:700}.task-template-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:20px}.task-template-list,.task-template-card{background:#fff;border:1px solid #e4ddd1;border-radius:18px;padding:20px;box-shadow:0 9px 23px rgba(72,50,22,.06)}.task-template-choice{display:block;border:1px solid #e8e1d6;border-radius:12px;padding:12px;margin-top:10px;color:inherit}.task-template-choice:hover,.task-template-choice.is-active{background:#fff6d9;border-color:#dfaf4b}.task-template-choice span{display:block;color:#697387;font-size:.84rem;margin-top:4px}.task-template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:14px 0}.task-template-card label{display:grid;gap:6px;font-weight:700;font-size:.88rem}.task-template-card input,.task-template-card textarea,.task-template-card select{width:100%;box-sizing:border-box}.task-template-card details{margin:14px 0;padding:12px;border:1px solid #ece5da;border-radius:12px}.task-template-card summary{cursor:pointer;font-weight:800}.template-items{margin:18px 0}.template-item-row{display:grid;grid-template-columns:minmax(0,1fr) 130px 150px auto;gap:8px;margin:8px 0}.template-users{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px}.check-line{display:flex!important;align-items:center;gap:8px}.check-line input{width:auto!important}.weekday-picker{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin:18px 0}.weekday-button{border:1px solid #ded6c7;background:#fff;border-radius:10px;padding:10px 4px;font-weight:800}.weekday-button.selected{background:#f5c74f;border-color:#c89014;color:#332100}.week-days{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.week-day-card{border:1px solid #e5ddd0;border-radius:14px;padding:14px;background:#fffdf7}.week-day-card h3{margin:0}.week-day-card label{max-width:180px;margin:8px 0}.muted{color:#6a7384;font-size:.92rem}.btn-ghost{background:transparent;border:0;color:#a01d2c;font-weight:700}@media(max-width:800px){.task-template-layout{grid-template-columns:1fr}.task-template-grid{grid-template-columns:1fr 1fr}.template-users{grid-template-columns:1fr 1fr}.week-days{grid-template-columns:1fr}.weekday-picker{grid-template-columns:repeat(4,1fr)}.task-template-heading,.section-inline-title{flex-direction:column}.template-item-row{grid-template-columns:1fr 90px 110px auto}}@media(max-width:480px){.task-template-page{padding:18px 12px 70px}.task-template-grid,.template-users{grid-template-columns:1fr}.template-item-row{grid-template-columns:1fr 1fr}.template-item-row input:first-child{grid-column:1/-1}}
/* 75.3.0.11.9.11.4 - navegación y formulario compacto de tareas */
.tasks-page-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.task-templates-button{border-color:#d3aa52;background:#fff9e8;color:#68460d;font-weight:800}.task-form-page-compact{max-width:1280px}.compact-task-form-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.task-form-compact{display:grid;gap:14px}.task-form-compact .task-form-section{margin:0}.task-compact-card{padding:18px 20px;border-radius:18px}.task-compact-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.task-compact-section-head>div{display:flex;align-items:center;gap:10px}.task-compact-section-head h2{margin:0}.task-compact-section-head>small{color:#6e7788;text-align:right}.task-step{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#f3c84e;color:#3a2805;font-weight:900}.task-compact-core-grid{display:grid;grid-template-columns:minmax(250px,2fr) repeat(2,minmax(150px,1fr));gap:12px}.task-title-field{grid-column:span 1}.task-description-field{grid-column:1/-1}.compact-check-card{grid-column:1/-1;max-width:520px}.task-legacy-note,.task-upload-after-save{margin:10px 0 0;padding:9px 11px;border-radius:10px;background:#fff8de;color:#66521f;font-size:.86rem}.task-assignment-top{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(320px,2fr);gap:12px;align-items:end}.task-selected-assignees{display:flex;gap:7px;flex-wrap:wrap;min-height:34px;margin-top:10px;align-items:center}.task-assignee-chip{border:1px solid #d4b765;border-radius:999px;background:#fff8dc;color:#4a3710;padding:6px 10px;font-weight:800;cursor:pointer}.compact-task-users-picker{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;max-height:220px;margin-top:8px;overflow-y:auto}.compact-task-users-picker .task-user-option[hidden]{display:none!important}.task-support-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:end}.task-location-field{grid-column:1/-1}.task-location-actions{display:flex;gap:8px;flex-wrap:wrap;grid-column:1/-1}.task-compact-subpanel{margin-top:12px;border:1px solid #e2ddd3;border-radius:13px;background:#fff}.task-compact-subpanel>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;cursor:pointer;font-weight:900;list-style:none}.task-compact-subpanel>summary::-webkit-details-marker{display:none}.task-compact-subpanel>summary:after{content:'+';font-size:1.15rem}.task-compact-subpanel[open]>summary:after{content:'−'}.task-compact-subpanel>summary small{margin-left:auto;color:#687286}.task-compact-subpanel .task-form-panel-body{padding:4px 14px 14px}.compact-task-form-actions{position:sticky;bottom:10px;z-index:20;margin-top:2px;background:rgba(255,255,255,.94);backdrop-filter:blur(8px);border:1px solid #e3ddd3;border-radius:15px;box-shadow:0 9px 24px rgba(42,32,17,.13)}
@media(max-width:850px){.compact-task-form-head,.task-compact-section-head{flex-direction:column}.task-compact-section-head>small{text-align:left}.task-compact-core-grid{grid-template-columns:1fr 1fr}.task-title-field,.task-description-field,.compact-check-card{grid-column:1/-1}.task-assignment-top,.task-support-grid{grid-template-columns:1fr}.compact-task-users-picker{grid-template-columns:1fr 1fr}.tasks-page-head-actions{justify-content:flex-start}.task-templates-button,.tasks-new-button{flex:1;text-align:center}.task-form-page-compact{padding-bottom:80px}}
@media(max-width:520px){.task-compact-card{padding:14px}.task-compact-core-grid,.compact-task-users-picker{grid-template-columns:1fr}.task-compact-core-grid>*{grid-column:1/-1}.task-assignment-top{grid-template-columns:1fr}.task-selected-assignees{max-height:110px;overflow:auto}.compact-task-form-actions{bottom:6px}.tasks-page-head-actions{width:100%}.task-templates-button,.tasks-new-button{width:100%}}

/* 75.3.0.11.9.11.6 - contraste de los días del plan semanal */
.task-template-card .weekday-button{
  color:#17223b !important;
}
.task-template-card .weekday-button:hover,
.task-template-card .weekday-button:focus-visible{
  background:#fff8df;
  border-color:#d7a83e;
}
.task-template-card .weekday-button.selected{
  color:#332100 !important;
  background:#f5c74f;
  border-color:#c89014;
}
