/* =========================================================
   SISTEMA DE CONTROL Y SEGUIMIENTO DE OFICIOS
   CSS depurado y rediseñado. Solo presentación visual.
   ========================================================= */

/* Base: reinicio de medidas sin selector universal */
html { box-sizing: border-box; }
body, div, span, header, footer, main, nav, section, article, aside,
form, fieldset, label, input, select, textarea, button, table, thead,
tbody, tr, th, td, img, svg, details, summary, a, p, h1, h2, h3, h4,
h5, h6, ul, ol, li {
    box-sizing: border-box;
}


:root{
  --r:#7b2d5f;
  --rd:#64234d;
  --nav:#35172f;
  --navText:#fff5fb;
  --g:#f8f6fa;
  --g2:#f2edf4;
  --b:#e7dce8;
  --t:#352b3b;
  --m:#7d7181;
  --shadow:0 6px 22px rgba(72,35,69,.07);
  --shadow2:0 16px 40px rgba(72,35,69,.13);
  --radius:16px;
}

html{min-height:100%;background:var(--g)}
body{
  margin:0;
  min-height:100vh;
  font:13px/1.5 "Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  color:var(--t);
  background:var(--g);
}
a{color:inherit}
button,input,select,textarea{font:inherit}
h2{margin:0;font-size:25px;line-height:1.15;color:#132f4a;letter-spacing:-.3px}
h3{margin:0;font-size:17px;color:#17324d}
p{margin:0}
.mu{color:var(--m)}
.page-kicker{
  color:#087f86;
  font-size:12px;
  line-height:1;
  font-weight:800;
  letter-spacing:.8px;
  margin:2px 0 5px;
}
.page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
.page-sub{color:var(--m);margin-top:4px}
.muted-right{color:var(--m);font-size:12px;white-space:nowrap}

/* ---------- Header ---------- */
.top{
  position:fixed;
  inset:0 0 auto 0;
  height:58px;
  background:#fff;
  border-top:3px solid #7a1f5b;
  border-bottom:1px solid var(--b);
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 18px 0 208px;
  z-index:40;
}
.ham{
  display:none;
  width:36px;
  height:36px;
  align-items:center;
  justify-content:center;
  border:1px solid var(--b);
  border-radius:8px;
  background:#fff;
  color:var(--t);
  font-size:20px;
  cursor:pointer;
}
.tt{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.15}
.tt b{font-size:13px;color:#132f4a}
.tt small{color:var(--m);font-size:12px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.top-actions{display:flex;align-items:center;gap:10px}

/* ---------- Notification dropdown ---------- */
.bell{position:relative}
.bell summary{
  list-style:none;
  cursor:pointer;
  width:42px;
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--b);
  border-radius:10px;
  background:#fff;
  color:#6d2457;
}
.bell summary svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bell summary::-webkit-details-marker{display:none}
.bell summary i{
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:17px;
  height:17px;
  padding:0 4px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ef5350;
  color:#fff;
  border:2px solid #fff;
  border-radius:10px;
  font-style:normal;
  font-size:9px;
  font-weight:800;
}
.dd{
  position:absolute;
  right:0;
  top:44px;
  width:350px;
  max-width:calc(100vw - 24px);
  background:#fff;
  border:1px solid var(--b);
  border-radius:10px;
  box-shadow:var(--shadow2);
  overflow:hidden;
  z-index:60;
}
.dd-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:13px 14px;
  border-bottom:1px solid var(--b);
}
.dd-head b{font-size:14px}
.dd-head a{font-size:11px;color:var(--r);font-weight:700;text-decoration:none}
.dd>a{
  display:block;
  padding:10px 14px;
  border-bottom:1px solid var(--g2);
  text-decoration:none;
}
.dd>a:hover{background:#fafbfc}
.dd>a strong,.dd>a span,.dd>a small{display:block}
.dd>a strong{font-size:12px;color:#263f57}
.dd>a span{font-size:11px;color:#62768a;margin-top:2px}
.dd>a small{font-size:10px;color:#9aa7b3;margin-top:2px}
.nu{background:#fff8f8}

/* ---------- Sidebar ---------- */
.side{
  position:fixed;
  top:0;
  bottom:0;
  left:0;
  width:190px;
  background:var(--nav);
  padding:14px 10px 12px;
  overflow:auto;
  z-index:50;
  display:flex;
  flex-direction:column;
}
.brand{
  min-height:58px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:0 7px 13px;
  margin-bottom:10px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.brand-logo{
  width:34px;
  height:34px;
  object-fit:contain;
  flex:none;
  border-radius:8px;
}
.menu-label{
  color:#7f9ab4;
  font-size:9px;
  font-weight:800;
  letter-spacing:1px;
  padding:5px 10px 7px;
}
.side a{
  min-height:39px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:8px 10px;
  margin:2px 0;
  border-radius:8px;
  color:var(--navText);
  text-decoration:none;
  font-size:12px;
  transition:background .15s ease,color .15s ease;
}
.side a:hover{background:rgba(255,255,255,.07)}
.side a.on{
  background:#30465c;
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(0,188,212,.55);
}
.side .mi{
  width:18px;
  flex:none;
  text-align:center;
  color:#c8d8e7;
  font-size:16px;
  line-height:1;
}
.side a.on .mi{color:#fff}
.side a>span:nth-child(2){flex:1}
.side a i{
  min-width:16px;
  height:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 4px;
  border-radius:10px;
  background:#ef5350;
  color:#fff;
  font-size:9px;
  font-style:normal;
  font-weight:800;
}
.side-footer{
  margin-top:auto;
  padding:14px 8px 2px;
  border-top:1px solid rgba(255,255,255,.08);
  display:flex;
  align-items:flex-start;
  gap:8px;
  color:#d7e4ef;
}
.side-footer .shield{
  width:18px;
  text-align:center;
  color:#c6d7e7;
}
.side-footer div{display:flex;flex-direction:column;line-height:1.15}
.side-footer b{font-size:10px;font-weight:600}
.side-footer small{font-size:9px;color:#829bb3;margin-top:3px}

/* ---------- Main ---------- */
main{
  margin:58px 0 0 190px;
  padding:28px 20px 40px;
  min-height:calc(100vh - 58px);
  max-width:none;
}
main>h2{margin-bottom:5px}
main>h2 + .tw,main>h2 + .cd,main>h2 + .fm{margin-top:14px}
.backbar{margin:0 0 12px}
.backbar .bt{padding:6px 10px}
.ov{display:none}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  background:var(--r);
  color:#fff;
  border:0;
  border-radius:7px;
  padding:10px 16px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  box-shadow:0 2px 5px rgba(185,28,28,.14);
}
.btn:hover{background:var(--rd)}
.btn.alt{background:#fff;color:var(--r);border:1px solid #e3a4a6;box-shadow:none}
.btn.alt:hover{background:#fff7f7}
.btn.danger{background:#991b1b}
.btn.danger:hover{background:#7f1d1d}
.bt{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  border:1px solid var(--b);
  background:#fff;
  color:#314a61;
  border-radius:7px;
  padding:5px 9px;
  font:inherit;
  font-size:11px;
  font-weight:600;
  text-decoration:none;
  cursor:pointer;
  margin:2px 0;
}
.bt:hover{border-color:#c8d1da;color:var(--r);background:#fafbfc}
.bt.danger{border-color:#e8b0b0;color:var(--r);background:#fff}
.bt.danger:hover{background:#fff3f3}
.in{display:inline}.bts{display:flex;gap:8px;flex-wrap:wrap}

/* ---------- Cards / dashboard ---------- */
.cd{
  background:#fff;
  border:1px solid var(--b);
  border-radius:var(--radius);
  padding:15px;
  margin-bottom:15px;
  box-shadow:var(--shadow);
}
.kp{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px;
}
.kp .cd{margin:0}
.kp-card{
  min-height:108px;
  padding:13px;
  border-top:0;
}
.kp-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:6px;
  color:#61758a;
  font-size:11px;
}
.kp-top b{
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:7px;
  color:var(--r);
  background:#fff3f3;
  font-size:14px;
}
.kp-card>strong{
  display:block;
  margin-top:9px;
  font-size:25px;
  line-height:1;
  color:#142f49;
}
.kp-card>small{display:block;color:#4eaa77;font-size:10px;margin-top:6px}
.dash-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);
  gap:14px;
}
.activity,.priority{padding:0;overflow:hidden}
.section-title{
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:13px 15px;
  border-bottom:1px solid var(--b);
}
.section-title h3{font-size:16px}
.section-title span{display:block;color:var(--m);font-size:10px;margin-top:2px}
.section-title .bt,.section-title .muted-right{margin:0}
.activity-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px 15px;
  border-bottom:1px solid var(--g2);
  text-decoration:none;
}
.activity-row:hover{background:#fafbfc}
.activity-row:last-child{border-bottom:0}
.activity-icon{
  width:23px;height:23px;flex:none;
  display:flex;align-items:center;justify-content:center;
  border-radius:7px;background:#eef7f6;color:#00858a;font-size:12px;
}
.activity-row b{display:block;font-size:11px;font-weight:600;color:#29445b}
.activity-row small{display:block;color:#8a9aaa;font-size:10px;margin-top:2px}
.priority-list{padding:0}
.priority-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:12px;
  padding:11px 15px;
  border-bottom:1px solid var(--g2);
  text-decoration:none;
}
.priority-row:last-child{border-bottom:0}
.priority-row:hover{background:#fafbfc}
.priority-row b{display:block;font-size:11px;color:#27425a}
.priority-row small{display:block;color:#7c8e9e;font-size:10px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}

/* ---------- Forms ---------- */
.fm label{display:block;margin-bottom:12px;font-weight:650;color:#2b4359}
.fm input:not([type=file]),.fm select,.fm textarea,.lgbox input{
  display:block;
  width:100%;
  margin-top:5px;
  padding:10px 11px;
  border:1px solid #dbe2e8;
  border-radius:7px;
  font:inherit;
  background:#fff;
  color:#20384f;
  outline:none;
}
.fm input:not([type=file]):focus,.fm select:focus,.fm textarea:focus,.lgbox input:focus{
  border-color:#80a6c4;
  box-shadow:0 0 0 3px rgba(44,112,157,.08);
}
.fm form label{margin-top:12px}
.g2{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}

/* ---------- Tables ---------- */
.tw{
  overflow-x:auto;
  background:#fff;
  border:1px solid var(--b);
  border-radius:var(--radius);
  margin-bottom:16px;
  box-shadow:var(--shadow);
}
table{width:100%;border-collapse:collapse;font-size:11px}
th{
  background:#f8fafb;
  color:#62768a;
  text-align:left;
  padding:11px 10px;
  white-space:nowrap;
  font-size:9px;
  letter-spacing:.25px;
  text-transform:uppercase;
  border-bottom:1px solid var(--b);
}
td{
  padding:10px;
  border-top:1px solid #edf0f3;
  vertical-align:middle;
  color:#29445b;
}
tbody tr:hover,table tr:hover td{background:#fcfdfe}
.bd{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:2px 8px;
  border-radius:12px;
  font-size:9px;
  font-weight:700;
  background:#e8edf1;
  color:#506679;
  white-space:nowrap;
}
.bd.r{background:#fde9e9;color:#b42329}
.bd.y{background:#fff2d8;color:#8b6500}
.bd.v{background:#e0f4e9;color:#157346}
.bd.g0{background:#e7edf2;color:#5c7081}

/* ---------- Alerts / notifications ---------- */
.al{
  background:#fff6f6;
  border:1px solid #f1c4c4;
  border-left:4px solid var(--r);
  padding:10px 14px;
  border-radius:8px;
  margin:0 0 14px;
}
.al.ok{background:#effaf4;border-color:#b6dfc6;border-left-color:#2e9c68}
.nl{
  display:block;
  padding:11px 5px;
  border-bottom:1px solid var(--g2);
  color:#29445b;
  text-decoration:none;
}
.nl:last-child{border-bottom:0}
.nl small{color:var(--m);margin-left:8px}
.pdf{
  width:100%;
  height:70vh;
  border:1px solid var(--b);
  border-radius:8px;
  background:#fff;
  margin-bottom:16px;
}

/* ---------- Login ---------- */
.lg{
  display:flex;
  min-height:100vh;
  align-items:center;
  justify-content:center;
  background:
    linear-gradient(#7c3aed 0 7px,transparent 7px),
    linear-gradient(135deg,#f5f7f9,#edf1f4);
}
.lgbox{
  background:#fff;
  padding:32px;
  border-radius:13px;
  border:1px solid var(--b);
  width:min(410px,92vw);
  text-align:center;
  box-shadow:var(--shadow2);
}
.login-card img{display:block;margin:0 auto 18px!important;width:86px!important;height:86px!important}
.lgbox h1{font-size:20px;margin:0;color:#17324d}
.lgbox p{color:var(--m);margin:5px 0 20px}
.lgbox label{display:block;text-align:left;font-weight:650;margin-bottom:12px;color:#29445b}
.lgbox .btn{width:100%;margin-top:4px}

/* ---------- Accessibility ---------- */
:focus-visible{outline:3px solid #a7d6da;outline-offset:2px}

/* =========================================================
   REDISEÑO MODERNO - VINO / MORADO CLARO
   Solo estilos visuales. No modifica la lógica del sistema.
   ========================================================= */

/* Fondo general */
html,body{background:#f8f6fa;color:var(--t)}
body{
  font-family:"Segoe UI",Inter,system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
  font-size:14px;
}

/* Encabezado */
.top{
  height:76px;
  padding:0 28px 0 220px;
  background:rgba(255,255,255,.96);
  border-top:4px solid #8b3d72;
  border-bottom:1px solid #eadfea;
  box-shadow:0 3px 18px rgba(67,37,65,.05);
  backdrop-filter:blur(10px);
}
.tt b{font-size:18px;color:#3b2840;font-weight:750}
.tt small{font-size:13px;color:#8a7b8e;margin-top:4px}
.top-actions{gap:9px}
.logout{
  min-height:42px;
  padding:0 15px;
  gap:8px;
  border:1px solid #eadce9;
  border-radius:11px;
  background:#fff;
  color:#6e2857;
  font-size:13px;
  font-weight:700;
  box-shadow:0 2px 8px rgba(72,35,69,.04);
}
.logout:hover{background:#fbf3f9;border-color:#d8bfd4}
.logout-icon{font-size:19px}

/* Notificaciones */
.bell summary{
  width:42px;height:42px;
  border-radius:11px;
  border-color:#eadce9;
  color:#762e60;
}
.bell summary:hover{background:#fbf3f9}
.dd{
  top:48px;
  border-radius:15px;
  border-color:#eadfea;
  box-shadow:var(--shadow2);
}

/* Menú lateral */
.side{
  width:220px;
  padding:18px 13px 15px;
  background:linear-gradient(180deg,#32152d 0%,#4b2143 48%,#612950 100%);
  box-shadow:5px 0 25px rgba(55,25,50,.08);
}
.brand-only-logo{
  min-height:145px;
  justify-content:center;
  padding:16px 0 22px;
  margin-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.12);
}
.brand-only-logo .brand-logo{
  width:125px;
  height:125px;
  object-fit:contain;
  border-radius:0;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.16));
}
.menu-label{
  color:#e8c7dc;
  font-size:10px;
  letter-spacing:1.2px;
  padding:7px 12px 9px;
}
.side a{
  min-height:46px;
  gap:12px;
  padding:9px 12px;
  margin:4px 0;
  border-radius:12px;
  color:#f9eef7;
  font-size:13px;
  font-weight:500;
}
.side a:hover{background:rgba(255,255,255,.09)}
.side a.on{
  background:linear-gradient(90deg,rgba(255,255,255,.18),rgba(255,255,255,.10));
  box-shadow:inset 0 0 0 1px rgba(255,220,239,.35),0 5px 14px rgba(20,8,18,.10);
}
.side .mi{
  width:22px;
  font-size:18px;
  color:#e8bfd8;
}
.side a.on .mi{color:#fff}
.side a i{
  min-width:19px;height:19px;
  background:#d65a91;
  border:2px solid rgba(255,255,255,.18);
}
.side-footer{
  padding:16px 10px 3px;
  gap:10px;
  border-top-color:rgba(255,255,255,.12);
}
.side-footer .shield{color:#efcde0}
.side-footer b{font-size:11px}
.side-footer small{font-size:9px;color:#c6a5bb}

/* Área principal */
main{
  margin:76px 0 0 220px;
  padding:30px 30px 50px;
  min-height:calc(100vh - 76px);
  max-width:none;
}
h2{font-size:28px;color:#382a3d}
h3{color:#443448}
.page-kicker{color:#8b3d72;font-size:11px;letter-spacing:1.1px}
.page-sub{color:#877b8a}
.page-head{margin-bottom:22px}

/* Bienvenida del usuario en Inicio */
.welcome{
  width:100%;
  max-width:720px;
  margin:0 0 22px;
  padding:18px 20px;
  gap:16px;
  background:linear-gradient(135deg,#fff 0%,#fbf5fa 100%);
  border:1px solid #eadce9;
  border-radius:18px;
  box-shadow:0 8px 26px rgba(72,35,69,.08);
}
.welcome-avatar{
  width:56px;height:56px;
  flex:none;
  background:linear-gradient(135deg,#7b2d5f,#a24a82);
  box-shadow:0 6px 14px rgba(123,45,95,.20);
  font-size:16px;
}
.welcome span{font-size:12px;color:#8a7b8e}
.welcome strong{font-size:18px;color:#392a3f;margin-top:3px}
.welcome small{font-size:11px;color:#8b3d72;margin-top:4px}

/* Tarjetas */
.cd{
  border:1px solid #eadfea;
  border-radius:16px;
  box-shadow:var(--shadow);
}
.kp{gap:14px;margin-bottom:20px}
.kp-card{
  min-height:124px;
  padding:17px;
  transition:transform .18s ease,box-shadow .18s ease;
}
.kp-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 26px rgba(72,35,69,.10);
}
.kp-top{font-size:12px;color:#807486}
.kp-top b{
  width:34px;height:34px;
  border-radius:10px;
  color:#7b2d5f;
  background:#f7eaf3;
  font-size:17px;
}
.kp-card>strong{font-size:29px;color:#3d2d43}
.kp-card>small{color:#6b9b82;font-size:10px}

/* Secciones inferiores */
.dash-grid{gap:18px}
.section-title{
  min-height:70px;
  padding:16px 18px;
  border-bottom:1px solid #eee5ef;
}
.section-title h3{font-size:17px}
.section-title span{font-size:11px}
.activity-row,.priority-row{
  padding:14px 18px;
}
.activity-row:hover,.priority-row:hover{background:#fcf8fc}
.activity-icon{
  width:34px;height:34px;
  border-radius:10px;
  background:#f4e8f1;
  color:#7b2d5f;
  font-size:14px;
}
.activity-row b,.priority-row b{font-size:12px;color:#49364b}
.activity-row small,.priority-row small{font-size:10px;color:#8b7d8e}

/* Botones */
.btn{
  background:linear-gradient(135deg,#7b2d5f,#934074);
  border-radius:11px;
  padding:11px 17px;
  box-shadow:0 5px 14px rgba(123,45,95,.18);
}
.btn:hover{background:linear-gradient(135deg,#64234d,#7b2d5f)}
.btn.alt{color:#7b2d5f;border-color:#d9bfd4;background:#fff}
.bt{border-color:#e5d9e5;border-radius:9px;color:#624e64;background:#fff;padding:7px 10px}
.bt:hover{border-color:#cfaec5;color:#7b2d5f;background:#fcf7fb}

/* Formularios */
.fm label{color:#4a394d}
.fm input:not([type=file]),.fm select,.fm textarea,.lgbox input{
  border-color:#e3d9e4;
  border-radius:10px;
  padding:11px 12px;
  background:#fff;
}
.fm input:not([type=file]):focus,.fm select:focus,.fm textarea:focus,.lgbox input:focus{
  border-color:#b879a3;
  box-shadow:0 0 0 3px rgba(139,61,114,.10);
}

/* Tablas */
.tw{
  border-color:#eadfea;
  border-radius:16px;
  box-shadow:var(--shadow);
}
th{
  background:#faf6fa;
  color:#786b7c;
  padding:13px 11px;
}
td{padding:12px 11px;color:#4a394d}

/* Estados */
.bd.r{background:#f9e7ef;color:#8b285f}
.bd.y{background:#fff1d9;color:#896200}
.bd.v{background:#e4f4eb;color:#287455}
.bd.g0{background:#eeeaf0;color:#6f6472}

/* Login */
.lg{
  background:
    radial-gradient(circle at 15% 15%,rgba(162,74,130,.16),transparent 30%),
    radial-gradient(circle at 85% 80%,rgba(123,45,95,.13),transparent 30%),
    linear-gradient(135deg,#faf7fb,#f1ebf3);
}
.lgbox{
  width:min(440px,92vw);
  padding:38px 36px;
  border-radius:22px;
  border:1px solid #eadfea;
  box-shadow:0 20px 50px rgba(72,35,69,.13);
}
.login-card img{
  width:65px!important;
  height:65px!important;
  margin-bottom:22px!important;
}
.lgbox h1{font-size:22px;color:#392a3f}
.lgbox p{color:#8a7b8e}
.lgbox .btn{border-radius:11px;margin-top:7px}

/* Controles de contraseña */
.password-wrap{position:relative;display:block}
.password-input{padding-right:52px!important}
.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;cursor:pointer;padding:6px 8px;display:flex;align-items:center;justify-content:center;color:#7b2d5f;border-radius:8px}
.password-toggle:hover{background:#f7eaf3}
.password-toggle:focus-visible{outline:2px solid #b879a3;outline-offset:1px}
.emb.sm{width:92px;height:92px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#7b2d5f,#a24a82);color:#fff;font-size:30px;font-weight:800}


/* Pulido visual final */
.top::after{content:"";position:absolute;left:220px;right:0;bottom:-1px;height:1px;background:linear-gradient(90deg,rgba(123,45,95,.24),rgba(162,74,130,.05),transparent)}
.brand-only-logo .brand-logo{transition:transform .2s ease,filter .2s ease}
.brand-only-logo:hover .brand-logo{transform:scale(1.04);filter:drop-shadow(0 8px 16px rgba(0,0,0,.22))}
.side a{position:relative}
.side a.on::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:0 4px 4px 0;background:#f2b4d2}
.kp-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.kp-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(72,35,69,.10);border-color:#dbc4d8}
.welcome{position:relative;overflow:hidden}
.welcome::after{content:"";position:absolute;right:-40px;top:-60px;width:150px;height:150px;border-radius:50%;background:rgba(162,74,130,.08);pointer-events:none}
.section-title{background:linear-gradient(180deg,#fff,#fdf9fd)}

/* Responsive unificado */
@media(max-width:1100px){
  .kp{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:820px){
  .top::after{left:0}
  .top{height:68px;padding:0 14px}
  .ham{display:flex}
  .top-actions{gap:5px}
  .side{
    width:270px;
    padding-top:80px;
    transform:translateX(-100%);
    transition:transform .2s ease;
    box-shadow:10px 0 25px rgba(0,0,0,.12);
  }
  #mn:checked~.side{transform:none}
  #mn:checked~.ov{
    display:block;
    position:fixed;
    inset:68px 0 0 0;
    background:rgba(31,16,28,.35);
    z-index:45;
  }
  .brand-only-logo .brand-logo{width:108px;height:108px}
  main{margin-left:0;margin-top:68px;padding:22px 16px 35px}
  .tt b{font-size:14px}
  .tt small{font-size:10px}
  .page-head{align-items:stretch;flex-direction:column}
  .page-head .btn{align-self:flex-start}
  .g2{grid-template-columns:1fr}
  .dash-grid{grid-template-columns:1fr}
  .kp{grid-template-columns:repeat(2,minmax(0,1fr))}
  .priority-row{grid-template-columns:1fr auto}
  .priority-row .bd:last-child{grid-column:2}
  .dd{right:-55px}
}
@media(max-width:560px){
  .top{height:64px}
  h2{font-size:22px}
  .tt b{font-size:14px}
  .tt small{font-size:10px}
  main{margin-top:64px;padding:18px 12px 30px}
  .top-actions{margin-left:auto}
  .kp{grid-template-columns:1fr}
  .kp-card{min-height:92px}
  .tw{border-radius:8px}
  table,tbody,tr,td{display:block}
  thead,tr:first-child{display:none}
  table tr{border-bottom:7px solid var(--g);padding:7px 0}
  table td{border:0;padding:4px 12px}
  table td::before{content:attr(data-l) ": ";font-weight:700;color:var(--m)}
  table td:last-child::before{content:""}
  .login-card{padding:25px 20px}
  .welcome{padding:15px;width:100%}
  .welcome-avatar{width:48px;height:48px}
  .welcome strong{font-size:16px}
  .lgbox{padding:30px 22px}
}

/* Ajuste final: menú lateral compacto, sin barra de desplazamiento visible */
.side{
  overflow:hidden !important;
  scrollbar-width:none !important;
  -ms-overflow-style:none !important;
}
.side::-webkit-scrollbar{
  display:none !important;
  width:0 !important;
  height:0 !important;
}

/* Menú compacto para que todos sus elementos entren en pantalla */
.brand-only-logo{
  min-height:108px;
  height:108px;
  padding:6px 0 10px;
  margin-bottom:7px;
}
.brand-only-logo .brand-logo{
  width:94px;
  height:94px;
}
.menu-label{
  padding:4px 12px 5px;
  font-size:9px;
}
.side a{
  min-height:36px;
  gap:9px;
  padding:6px 10px;
  margin:1px 0;
  font-size:12px;
}
.side a.on::before{
  top:6px;
  bottom:6px;
}
.side-footer{
  padding:8px 8px 1px;
}

/* Cerrar sesión: sin subrayado en ningún estado */
.logout,
.logout:hover,
.logout:focus,
.logout:active,
.logout:visited{
  text-decoration:none !important;
}

@media(max-width:820px){
  .side{
    overflow:hidden !important;
    scrollbar-width:none !important;
    -ms-overflow-style:none !important;
  }
  .side::-webkit-scrollbar{
    display:none !important;
    width:0 !important;
    height:0 !important;
  }
  .brand-only-logo{
    min-height:108px;
    height:108px;
    padding:6px 0 10px;
  }
  .brand-only-logo .brand-logo{
    width:94px;
    height:94px;
  }
  .side a{
    min-height:35px;
    padding:5px 10px;
    margin:1px 0;
  }
}

/* =========================================================
   GENERADOR DE OFICIOS - agregado sin alterar el diseño existente
   ========================================================= */
.page-head-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.generator-intro{margin:-10px 0 18px}
.oficio-generator{max-width:1050px}
.generator-section-title{
  margin:8px 0 14px;
  padding:10px 12px;
  border-left:4px solid #8b3d72;
  background:linear-gradient(90deg,#faf2f8,#fff);
  border-radius:8px;
  color:#5b3654;
  font-size:13px;
  font-weight:800;
  letter-spacing:.2px;
}
.oficio-generator textarea{min-height:300px;resize:vertical;line-height:1.65}
.generator-help{
  margin:4px 0 15px;
  padding:10px 12px;
  background:#faf7fb;
  border:1px solid #eadfea;
  border-radius:9px;
  color:#817385;
  font-size:11px;
}
.generated-summary{
  margin:14px 0;
  padding:13px 15px;
  background:#faf6fa;
  border:1px solid #eadfea;
  border-radius:11px;
  color:#59465a;
  line-height:1.7;
}
.generated-summary b{color:#392a3f}
@media(max-width:820px){
  .page-head-actions{width:100%}
  .page-head-actions .btn{width:100%;justify-content:center}
  .oficio-generator textarea{min-height:240px}
}
@media(max-width:560px){
  .generator-section-title{margin-top:5px}
  .generated-summary{font-size:12px}
}




/* =========================================================
   LOGIN PROFESIONAL VINO Y DORADO — Sistema de Oficios Actopan
   Estilos aislados: no modifican las pantallas internas.
   ========================================================= */
.login-page {
    --login-green-950: #4a1028;
    --login-green-900: #641b38;
    --login-green-800: #741f42;
    --login-green-700: #84264b;
    --login-green-600: #982c55;
    --login-gold: #d8b66b;
    --login-gold-soft: #f4e5d9;
    --login-ink: #1e2e28;
    --login-muted: #718078;
    --login-line: #e3e9e4;
    min-height: 100vh;
    margin: 0;
    padding: clamp(18px, 4vw, 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--login-ink);
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 10%, rgba(199,163,90,.14), transparent 24rem),
        radial-gradient(circle at 95% 90%, rgba(132,38,75,.12), transparent 30rem),
        #f1f4f0;
    box-sizing: border-box;
}
.login-page,
.login-shell, .login-brand-panel, .login-form-panel,
.login-brand-top, .login-brand-copy, .login-form,
.login-field, .login-input-wrap, .login-form-footer,
.login-emblem, .login-input-icon, .login-show-password,
.login-submit, .login-security-note, .login-brand-note,
.login-brand-footer, .login-error {
    box-sizing: border-box;
}
.login-shell {
    width: min(1080px, 100%);
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    overflow: hidden;
    border: 1px solid rgba(91,25,52,.14);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(91,25,52,.14), 0 4px 16px rgba(91,25,52,.05);
}
.login-brand-panel {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: clamp(30px, 4vw, 52px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 85% 14%, rgba(255,255,255,.08) 0 1px, transparent 2px) 0 0/24px 24px,
        linear-gradient(145deg, #741f42, #4a1028 80%);
}
.login-brand-panel::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    right: -185px;
    top: 24%;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 50%;
    box-shadow: 0 0 0 32px rgba(255,255,255,.025), 0 0 0 64px rgba(255,255,255,.02);
}
.login-brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 180px;
    height: 5px;
    left: 0;
    bottom: 20%;
    background: var(--login-gold);
    opacity: .8;
}
.login-brand-top { display: flex; align-items: center; gap: 15px; }
.login-emblem {
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    color: #f6e9c8;
    border: 1px solid rgba(242,231,201,.42);
    border-radius: 17px;
    background: rgba(255,255,255,.07);
}
.login-emblem svg { width: 39px; height: 39px; }
.login-brand-overline, .login-brand-sub {
    display: block;
    color: rgba(255,255,255,.7);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}
.login-brand-name { display: block; margin: 3px 0; font-size: 27px; line-height: 1; letter-spacing: .08em; }
.login-brand-sub { margin-top: 5px; letter-spacing: .28em; }
.login-brand-copy { max-width: 410px; padding: 48px 0 42px; }
.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    color: #f4e5d9;
    border: 1px solid rgba(242,231,201,.25);
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}
.login-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--login-gold); box-shadow: 0 0 0 4px rgba(199,163,90,.15); }
.login-kicker { margin: 31px 0 11px; color: #e3c36f; font-size: 11px; font-weight: 800; letter-spacing: .19em; }
.login-brand-copy h1 { max-width: 390px; margin: 0; color: #fff; font-size: clamp(30px, 3.1vw, 42px); line-height: 1.12; font-weight: 750; letter-spacing: -.035em; }
.login-brand-description { max-width: 370px; margin: 19px 0 0; color: rgba(255,255,255,.76); font-size: 15px; line-height: 1.8; }
.login-brand-rule { display: flex; gap: 5px; margin: 29px 0 24px; }
.login-brand-rule span:first-child { width: 45px; height: 4px; border-radius: 10px; background: var(--login-gold); }
.login-brand-rule span:last-child { width: 18px; height: 4px; border-radius: 10px; background: rgba(255,255,255,.35); }
.login-brand-note { display: flex; align-items: center; gap: 12px; }
.login-note-icon { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border: 1px solid rgba(255,255,255,.2); border-radius: 11px; color: #f4e5d9; font-weight: 800; }
.login-brand-note strong, .login-brand-note small { display: block; }
.login-brand-note strong { font-size: 12px; }
.login-brand-note small { margin-top: 4px; color: rgba(255,255,255,.65); font-size: 11px; }
.login-brand-footer { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.63); font-size: 11px; line-height: 1.5; }
.login-footer-mark { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; color: #f4e5d9; font-weight: 800; }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(30px, 5vw, 64px); }
.login-form-head { margin-bottom: 30px; }
.login-form-kicker { color: #947437; font-size: 10px; font-weight: 850; letter-spacing: .17em; }
.login-form-head h2 { margin: 12px 0 8px; color: #1e3027; font-size: clamp(27px, 3vw, 34px); line-height: 1.2; letter-spacing: -.035em; }
.login-form-head p { margin: 0; color: var(--login-muted); font-size: 14px; line-height: 1.65; }
.login-error { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 22px; padding: 13px 14px; border: 1px solid #f1c9c5; border-radius: 12px; color: #8b2924; background: #fff4f2; font-size: 13px; line-height: 1.5; }
.login-error-icon { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%; color: #fff; background: #b63b32; font-size: 12px; font-weight: 800; }
.login-form { display: grid; gap: 22px; }
.login-field { min-width: 0; }
.login-field > label { display: block; margin: 0 0 9px; color: #34463c; font-size: 13px; font-weight: 750; }
.login-input-wrap { position: relative; display: flex; align-items: center; min-width: 0; min-height: 58px; border: 1px solid #dce4dd; border-radius: 13px; background: #fbfcfb; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.login-input-wrap:focus-within { border-color: #a74c70; background: #fff; box-shadow: 0 0 0 4px rgba(132,38,75,.12); }
.login-input-icon { display: grid; place-items: center; flex: 0 0 52px; width: 52px; color: #8c2c50; }
.login-input-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-input-wrap input { width: 100%; min-width: 0; min-height: 56px; padding: 14px 13px 14px 0; border: 0 !important; outline: 0 !important; color: #25362d; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 14px; }
.login-input-wrap input::placeholder { color: #9aa59e; opacity: 1; }
.login-show-password { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: 0 0 auto; margin: 0 9px 0 4px; padding: 9px 8px; border: 0; border-left: 1px solid #e5eae6; border-radius: 0; color: #53665b; background: transparent; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.login-show-password:hover { color: #84264b; }
.login-show-password svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-show-password:focus-visible, .login-submit:focus-visible { outline: 3px solid rgba(132,38,75,.3); outline-offset: 3px; }
.login-hint { margin: 8px 0 0; color: #849088; font-size: 11px; line-height: 1.5; }
.login-submit { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 57px; margin-top: 2px; padding: 15px 20px; border: 0; border-radius: 13px; color: #fff; background: linear-gradient(110deg, #681b3a, #92264f); box-shadow: 0 8px 17px rgba(119,31,66,.19); font: inherit; font-size: 13px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.login-submit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.login-submit:hover { filter: brightness(1.05); box-shadow: 0 11px 23px rgba(119,31,66,.25); transform: translateY(-1px); }
.login-submit:hover svg { transform: translateX(3px); }
.login-security-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 24px; color: #718078; font-size: 11px; text-align: center; }
.login-security-note svg { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: #4d8061; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-form-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; margin-top: 28px; padding-top: 18px; border-top: 1px solid #edf0ed; color: #8a958e; font-size: 10px; line-height: 1.5; }
@media (max-width: 800px) {
    .login-page { padding: 18px; align-items: flex-start; }
    .login-shell { grid-template-columns: 1fr; width: min(540px, 100%); min-height: 0; border-radius: 20px; }
    .login-brand-panel { min-height: 250px; padding: 26px 28px 22px; }
    .login-brand-copy { padding: 26px 0 22px; }
    .login-brand-copy h1 { max-width: 460px; font-size: clamp(26px, 6vw, 34px); }
    .login-kicker { margin-top: 22px; }
    .login-brand-description { margin-top: 12px; font-size: 13px; line-height: 1.6; }
    .login-brand-rule { margin: 19px 0 15px; }
    .login-brand-note { display: none; }
    .login-brand-panel::after { bottom: 11%; }
    .login-form-panel { padding: 30px 28px; }
}
@media (max-width: 420px) {
    .login-page { padding: 10px; }
    .login-shell { border-radius: 16px; }
    .login-brand-panel { padding: 22px 20px 18px; }
    .login-emblem { flex-basis: 48px; width: 48px; height: 48px; border-radius: 14px; }
    .login-emblem svg { width: 33px; height: 33px; }
    .login-brand-name { font-size: 23px; }
    .login-brand-copy h1 { font-size: 27px; }
    .login-form-panel { padding: 27px 20px 22px; }
    .login-form-footer { flex-direction: column; }
    .login-show-password { margin-right: 5px; padding-right: 4px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .login-page, .login-shell, .login-brand-panel, .login-form-panel,
    .login-brand-copy, .login-submit, .login-show-password {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}



/* =========================================================
   AJUSTE RESPONSIVO FINAL DEL LOGIN
   Evita recortes y desbordamientos en escritorio y móvil.
   ========================================================= */
html {
    min-height: 100%;
    overflow-x: hidden;
}
body.login-page {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    height: auto !important;
    overflow-x: hidden;
    overflow-y: auto;
    padding: clamp(12px, 2.5vh, 28px) clamp(12px, 3vw, 40px);
    align-items: center;
}
body.login-page .login-shell {
    width: min(1160px, 100%);
    min-height: min(720px, calc(100vh - 56px));
    height: auto;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    margin: auto;
}
body.login-page .login-brand-panel {
    min-height: 0;
    height: 100%;
    padding: clamp(24px, 3.2vw, 46px);
}
body.login-page .login-brand-copy {
    width: 100%;
    max-width: 440px;
    padding: clamp(22px, 3vh, 38px) 0;
    margin: auto 0;
}
body.login-page .login-brand-copy h1 {
    max-width: 100%;
    font-size: clamp(29px, 2.65vw, 39px);
    line-height: 1.12;
    overflow-wrap: anywhere;
}
body.login-page .login-brand-description {
    max-width: 100%;
    font-size: clamp(13px, 1.05vw, 15px);
    line-height: 1.7;
}
body.login-page .login-brand-footer {
    position: relative;
    z-index: 1;
    max-width: 100%;
}
body.login-page .login-form-panel {
    min-width: 0;
    padding: clamp(30px, 4.2vw, 58px);
}
body.login-page .login-form-head {
    margin-bottom: clamp(22px, 3vh, 32px);
}
body.login-page .login-form-head h2 {
    font-size: clamp(28px, 2.5vw, 36px);
}
body.login-page .login-input-wrap,
body.login-page .login-input-wrap input {
    min-width: 0;
}
body.login-page .login-form-footer {
    gap: 8px 14px;
}
@media (min-width: 801px) and (max-height: 760px) {
    body.login-page {
        align-items: flex-start;
        padding-top: 16px;
        padding-bottom: 16px;
    }
    body.login-page .login-shell {
        min-height: 0;
    }
    body.login-page .login-brand-panel,
    body.login-page .login-form-panel {
        padding-top: 26px;
        padding-bottom: 26px;
    }
    body.login-page .login-brand-copy {
        padding: 18px 0;
    }
    body.login-page .login-kicker {
        margin-top: 18px;
    }
    body.login-page .login-brand-description {
        margin-top: 12px;
    }
    body.login-page .login-brand-rule {
        margin: 18px 0 15px;
    }
    body.login-page .login-form-head {
        margin-bottom: 20px;
    }
    body.login-page .login-form {
        gap: 16px;
    }
    body.login-page .login-security-note {
        margin-top: 16px;
    }
    body.login-page .login-form-footer {
        margin-top: 18px;
        padding-top: 13px;
    }
}
@media (max-width: 800px) {
    body.login-page {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 14px;
    }
    body.login-page .login-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: min(540px, 100%);
        min-height: 0;
        height: auto;
        margin: 0 auto;
    }
    body.login-page .login-brand-panel {
        min-height: 0;
        height: auto;
        padding: 24px 26px 20px;
    }
    body.login-page .login-brand-top {
        gap: 12px;
    }
    body.login-page .login-brand-copy {
        padding: 24px 0 18px;
        margin: 0;
    }
    body.login-page .login-brand-copy h1 {
        max-width: 100%;
        font-size: clamp(25px, 5.5vw, 33px);
        line-height: 1.15;
    }
    body.login-page .login-kicker {
        margin-top: 19px;
    }
    body.login-page .login-brand-description {
        max-width: 100%;
        font-size: 13px;
        line-height: 1.6;
    }
    body.login-page .login-brand-note {
        display: none;
    }
    body.login-page .login-brand-panel::after {
        display: none;
    }
    body.login-page .login-brand-footer {
        font-size: 10px;
    }
    body.login-page .login-form-panel {
        padding: 28px 26px 24px;
    }
}
@media (max-width: 480px) {
    body.login-page {
        padding: 8px;
    }
    body.login-page .login-shell {
        border-radius: 15px;
    }
    body.login-page .login-brand-panel {
        padding: 20px 18px 16px;
    }
    body.login-page .login-brand-overline {
        font-size: 8px;
        letter-spacing: .12em;
    }
    body.login-page .login-brand-name {
        font-size: 22px;
    }
    body.login-page .login-brand-copy {
        padding: 20px 0 14px;
    }
    body.login-page .login-eyebrow {
        padding: 7px 10px;
        font-size: 9px;
    }
    body.login-page .login-brand-copy h1 {
        font-size: clamp(24px, 7vw, 29px);
    }
    body.login-page .login-brand-description {
        font-size: 12px;
    }
    body.login-page .login-form-panel {
        padding: 25px 18px 20px;
    }
    body.login-page .login-form-head h2 {
        font-size: 27px;
    }
    body.login-page .login-form-head p {
        font-size: 13px;
    }
    body.login-page .login-input-wrap {
        min-height: 54px;
    }
    body.login-page .login-input-wrap input {
        min-height: 52px;
        font-size: 13px;
    }
    body.login-page .login-input-icon {
        flex-basis: 43px;
        width: 43px;
    }
    body.login-page .login-show-password {
        gap: 4px;
        margin-right: 4px;
        padding: 8px 5px;
        font-size: 10px;
    }
    body.login-page .login-show-password svg {
        width: 16px;
        height: 16px;
    }
    body.login-page .login-submit {
        min-height: 53px;
        padding: 14px;
        font-size: 12px;
    }
    body.login-page .login-form-footer {
        flex-direction: column;
        font-size: 10px;
    }
}
@media (max-width: 350px) {
    body.login-page .login-brand-name {
        font-size: 20px;
    }
    body.login-page .login-brand-copy h1 {
        font-size: 23px;
    }
    body.login-page .login-input-icon {
        flex-basis: 36px;
        width: 36px;
    }
    body.login-page .login-show-password span {
        display: none;
    }
}


/* =========================================================
   FIX V2: LOGIN A MEDIDA DEL VIEWPORT
   Sobrescribe restricciones anteriores del login.
   ========================================================= */
html {
    min-height: 100%;
}
body.login-page {
    isolation: isolate;
}
body.login-page {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    min-height: 100vh !important;
    height: auto !important;
    margin: 0 !important;
    padding: clamp(12px, 2.2vh, 22px) clamp(12px, 2.5vw, 32px) !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}
body.login-page .login-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    width: min(1120px, 100%) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    margin: auto !important;
    overflow: hidden !important;
}
body.login-page .login-brand-panel {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: clamp(16px, 2.4vh, 26px) !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: clamp(24px, 3vw, 40px) !important;
}
body.login-page .login-brand-panel::after {
    display: none !important;
    content: none !important;
}
body.login-page .login-brand-top {
    flex: 0 0 auto !important;
}
body.login-page .login-brand-copy {
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: 430px !important;
    padding: 8px 0 !important;
    margin: 0 !important;
}
body.login-page .login-brand-copy h1 {
    max-width: 100% !important;
    font-size: clamp(27px, 2.6vw, 36px) !important;
    line-height: 1.12 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}
body.login-page .login-brand-description {
    max-width: 100% !important;
    font-size: clamp(13px, 1.05vw, 15px) !important;
    line-height: 1.65 !important;
}
body.login-page .login-brand-footer {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    position: relative !important;
    bottom: auto !important;
    max-width: 100% !important;
}
body.login-page .login-form-panel {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: clamp(28px, 3.5vw, 48px) !important;
}
body.login-page .login-form-head {
    margin-top: 0 !important;
    margin-bottom: clamp(18px, 2.5vh, 26px) !important;
}
body.login-page .login-form {
    gap: clamp(15px, 2.2vh, 21px) !important;
}
body.login-page .login-form-footer {
    margin-top: clamp(18px, 2.5vh, 26px) !important;
}
@media (min-width: 801px) and (max-height: 900px) {
    body.login-page {
        align-items: center !important;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    body.login-page .login-shell {
        min-height: 0 !important;
    }
    body.login-page .login-brand-panel,
    body.login-page .login-form-panel {
        padding-top: clamp(22px, 3vh, 32px) !important;
        padding-bottom: clamp(22px, 3vh, 32px) !important;
    }
    body.login-page .login-brand-panel {
        gap: 14px !important;
    }
    body.login-page .login-kicker {
        margin-top: 14px !important;
    }
    body.login-page .login-brand-description {
        margin-top: 10px !important;
    }
    body.login-page .login-brand-rule {
        margin: 16px 0 !important;
    }
    body.login-page .login-form-head {
        margin-bottom: 18px !important;
    }
    body.login-page .login-form {
        gap: 14px !important;
    }
    body.login-page .login-security-note {
        margin-top: 15px !important;
    }
}
@media (max-width: 800px) {
    body.login-page {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        padding: 12px !important;
    }
    body.login-page .login-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        width: min(540px, 100%) !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 0 auto !important;
        overflow: hidden !important;
    }
    body.login-page .login-brand-panel {
        gap: 12px !important;
        padding: 22px 24px 18px !important;
    }
    body.login-page .login-brand-copy {
        padding: 8px 0 !important;
    }
    body.login-page .login-brand-copy h1 {
        font-size: clamp(25px, 5.5vw, 32px) !important;
    }
    body.login-page .login-brand-note {
        display: none !important;
    }
    body.login-page .login-brand-footer {
        margin-top: 0 !important;
    }
    body.login-page .login-form-panel {
        padding: 26px 24px 22px !important;
    }
}
@media (max-width: 480px) {
    body.login-page {
        padding: 7px !important;
    }
    body.login-page .login-shell {
        width: 100% !important;
        border-radius: 15px !important;
    }
    body.login-page .login-brand-panel {
        padding: 18px 17px 15px !important;
    }
    body.login-page .login-brand-copy h1 {
        font-size: clamp(23px, 7vw, 28px) !important;
    }
    body.login-page .login-brand-description {
        font-size: 12px !important;
        line-height: 1.55 !important;
    }
    body.login-page .login-form-panel {
        padding: 23px 17px 19px !important;
    }
    body.login-page .login-input-wrap {
        min-height: 52px !important;
    }
    body.login-page .login-input-wrap input {
        min-height: 50px !important;
    }
    body.login-page .login-form-footer {
        flex-direction: column !important;
    }
}
@media (max-width: 350px) {
    body.login-page .login-brand-name {
        font-size: 20px !important;
    }
    body.login-page .login-show-password span {
        display: none !important;
    }
}


/* =========================================================
   TEMA INSTITUCIONAL VERDE / DORADO V3
   Unifica el resto del sistema con Generar / subir oficio.
   No altera la lógica ni el diseño aislado de login-page.
   ========================================================= */
body:not(.login-page){
  --r:#235e4e;
  --rd:#18493d;
  --nav:#173f37;
  --navText:#f4faf7;
  --g:#f2f6f2;
  --g2:#eaf1ec;
  --b:#d8e5dd;
  --t:#213d36;
  --m:#7c8c86;
  --shadow:0 8px 28px rgba(28,81,64,.055);
  --shadow2:0 18px 48px rgba(28,81,64,.14);
  background:
    radial-gradient(circle at 96% 5%,rgba(177,132,66,.08),transparent 23rem),
    #f2f6f2;
  color:#213d36;
  font-size:14px;
}
body:not(.login-page) h2{color:#173e38;font-size:30px;letter-spacing:-.55px}
body:not(.login-page) h3{color:#244b41}
body:not(.login-page) .mu,
body:not(.login-page) .page-sub,
body:not(.login-page) .muted-right{color:#7c8c86}
body:not(.login-page) .page-kicker{color:#ad793a;font-size:11px;font-weight:850;letter-spacing:1.55px;margin-bottom:8px}
body:not(.login-page) .page-head{align-items:center;margin-bottom:24px}
body:not(.login-page) .page-head-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

body:not(.login-page) .top{
  height:78px;
  padding:0 26px 0 242px;
  background:rgba(255,255,255,.97);
  border-top:4px solid #b18442;
  border-bottom:1px solid #dce7e0;
  box-shadow:0 4px 20px rgba(28,81,64,.055);
  backdrop-filter:blur(10px);
}
body:not(.login-page) .top::after{left:242px;background:linear-gradient(90deg,rgba(35,94,78,.22),rgba(177,132,66,.08),transparent)}
body:not(.login-page) .tt b{font-size:17px;color:#173e38;font-weight:780}
body:not(.login-page) .tt small{font-size:12px;color:#85938e;margin-top:4px}
body:not(.login-page) .top-actions{gap:9px}
body:not(.login-page) .top-user{display:flex;align-items:center;gap:10px;padding:5px 10px 5px 6px;border:1px solid #e0eae4;border-radius:13px;background:#fbfdfb}
body:not(.login-page) .top-user-avatar{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#e3f0e8;color:#235e4e;font-size:11px;font-weight:850}
body:not(.login-page) .top-user-copy{display:flex;flex-direction:column;min-width:0;line-height:1.2}
body:not(.login-page) .top-user-copy b{max-width:170px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#294a41;font-size:11px}
body:not(.login-page) .top-user-copy small{color:#8a9893;font-size:9px;margin-top:2px}
body:not(.login-page) .bell summary{border-color:#dce7e0;color:#235e4e;background:#fff;border-radius:12px}
body:not(.login-page) .bell summary:hover{background:#f4f9f6}
body:not(.login-page) .bell summary i{background:#a33e48}
body:not(.login-page) .dd{top:49px;border-color:#dbe7df;border-radius:16px;box-shadow:var(--shadow2)}
body:not(.login-page) .dd-head{border-color:#e5ece8}
body:not(.login-page) .dd-head a{color:#235e4e}
body:not(.login-page) .dd>a:hover{background:#f6faf7}
body:not(.login-page) .dd-empty{padding:16px}
body:not(.login-page) .logout{min-height:44px;padding:0 15px;border:1px solid #dce7e0;border-radius:12px;background:#fff;color:#235e4e;box-shadow:none;text-decoration:none}
body:not(.login-page) .logout:hover{background:#f4f9f6;border-color:#c8dcd1}

body:not(.login-page) .side{
  width:242px;
  padding:18px 14px 15px;
  background:
    radial-gradient(circle at 20% 0,rgba(177,132,66,.13),transparent 15rem),
    linear-gradient(180deg,#153c34 0%,#1c4b40 55%,#173f37 100%);
  box-shadow:7px 0 28px rgba(20,63,53,.11);
}
body:not(.login-page) .brand-only-logo{height:116px;min-height:116px;padding:6px 0 12px;margin-bottom:9px;border-bottom-color:rgba(255,255,255,.12)}
body:not(.login-page) .brand-only-logo .brand-logo{width:100px;height:100px;filter:drop-shadow(0 8px 15px rgba(0,0,0,.18))}
body:not(.login-page) .menu-label{color:#d9c599;font-size:9px;letter-spacing:1.45px;padding:5px 12px 7px}
body:not(.login-page) .side a{min-height:42px;gap:11px;padding:7px 11px;margin:2px 0;border-radius:11px;color:#eef7f2;font-size:12px}
body:not(.login-page) .side a:hover{background:rgba(255,255,255,.075)}
body:not(.login-page) .side a.on{background:rgba(255,255,255,.13);box-shadow:inset 0 0 0 1px rgba(230,218,187,.28),0 7px 18px rgba(0,0,0,.08)}
body:not(.login-page) .side a.on::before{background:#d1aa62;top:7px;bottom:7px}
body:not(.login-page) .side .mi{color:#d6e8df;font-size:17px}
body:not(.login-page) .side a.on .mi{color:#f1d8a7}
body:not(.login-page) .side a i{background:#b54955}
body:not(.login-page) .side-footer{color:#e0eee7;border-top-color:rgba(255,255,255,.12);padding:10px 9px 2px}
body:not(.login-page) .side-footer .shield{color:#e0c58e}
body:not(.login-page) .side-footer small{color:#9ebcaf}

body:not(.login-page) main{margin:78px 0 0 242px;padding:32px 34px 52px;min-height:calc(100vh - 78px)}
body:not(.login-page) .backbar{margin-bottom:17px}
body:not(.login-page) .backbar .bt{padding:8px 12px}

body:not(.login-page) .btn{background:#235e4e;border:1px solid #235e4e;border-radius:11px;padding:11px 17px;color:#fff;box-shadow:0 6px 15px rgba(35,94,78,.14)}
body:not(.login-page) .btn:hover{background:#18493d;border-color:#18493d}
body:not(.login-page) .btn.alt{background:#fff;color:#235e4e;border-color:#cbded3;box-shadow:none}
body:not(.login-page) .btn.alt:hover{background:#f4f9f6;border-color:#aac9b9}
body:not(.login-page) .btn.danger{background:#9c3b45;border-color:#9c3b45}
body:not(.login-page) .bt{border-color:#d8e5dd;border-radius:9px;color:#365a50;background:#fff;padding:7px 10px}
body:not(.login-page) .bt:hover{border-color:#b8d0c4;color:#235e4e;background:#f7faf8}
body:not(.login-page) .bt.danger{color:#993c46;border-color:#e3bcc0;background:#fff}
body:not(.login-page) .bt.danger:hover{background:#fff5f5;border-color:#d9a5aa}

body:not(.login-page) .cd{border-color:#d8e5dd;border-radius:18px;padding:18px;box-shadow:var(--shadow);background:#fff}
body:not(.login-page) .welcome{max-width:760px;padding:19px 21px;background:linear-gradient(135deg,#fff 0%,#f7fbf8 100%);border-color:#d8e5dd;border-radius:19px;box-shadow:var(--shadow)}
body:not(.login-page) .welcome::after{background:rgba(177,132,66,.08)}
body:not(.login-page) .welcome-avatar{width:56px;height:56px;border-radius:16px;background:linear-gradient(135deg,#235e4e,#397b68);box-shadow:0 7px 18px rgba(35,94,78,.19)}
body:not(.login-page) .welcome span{color:#84928d}
body:not(.login-page) .welcome strong{color:#24493f}
body:not(.login-page) .welcome small{color:#a47735}
body:not(.login-page) .kp{gap:14px;margin-bottom:21px}
body:not(.login-page) .kp-card{min-height:128px;padding:18px;border-color:#dce8e1}
body:not(.login-page) .kp-card:hover{border-color:#c6dccf;box-shadow:0 12px 30px rgba(28,81,64,.09)}
body:not(.login-page) .kp-top{color:#7a8c86}
body:not(.login-page) .kp-top b{width:35px;height:35px;border-radius:11px;color:#235e4e;background:#e8f3ec}
body:not(.login-page) .kp-card>strong{color:#1b4a3e;font-size:30px}
body:not(.login-page) .kp-card>small{color:#a47735}
body:not(.login-page) .dash-grid{gap:18px}
body:not(.login-page) .section-title{min-height:72px;padding:16px 19px;border-bottom-color:#e2ebe5;background:linear-gradient(180deg,#fff,#f9fbfa)}
body:not(.login-page) .section-title h3{color:#234a40}
body:not(.login-page) .activity-row,body:not(.login-page) .priority-row{padding:14px 18px;border-bottom-color:#ebf0ed}
body:not(.login-page) .activity-row:hover,body:not(.login-page) .priority-row:hover{background:#f8fbf9}
body:not(.login-page) .activity-icon{background:#e7f2eb;color:#235e4e}
body:not(.login-page) .activity-row b,body:not(.login-page) .priority-row b{color:#36554d}

body:not(.login-page) .fm label{color:#466159;font-weight:700}
body:not(.login-page) .fm input:not([type=file]),body:not(.login-page) .fm select,body:not(.login-page) .fm textarea{border-color:#d8e4dd;border-radius:11px;padding:12px 13px;color:#304a43;background:#fff}
body:not(.login-page) .fm input:not([type=file]):focus,body:not(.login-page) .fm select:focus,body:not(.login-page) .fm textarea:focus{border-color:#7eae9b;box-shadow:0 0 0 4px rgba(35,94,78,.09)}
body:not(.login-page) input[type=file]{color:#526a62}

body:not(.login-page) .tw{border-color:#d8e5dd;border-radius:17px;box-shadow:var(--shadow)}
body:not(.login-page) th{background:#f4f8f5;color:#687c75;padding:13px 12px;border-bottom-color:#dce7e0}
body:not(.login-page) td{padding:12px;color:#365149;border-color:#ebf0ed}
body:not(.login-page) tbody tr:hover td{background:#f9fbfa}
body:not(.login-page) .bd{padding:4px 9px;font-size:9px;border-radius:999px}
body:not(.login-page) .bd.r{background:#f9e9eb;color:#9b3743}
body:not(.login-page) .bd.y{background:#fff3dc;color:#85621f}
body:not(.login-page) .bd.v{background:#e4f4e9;color:#22714f}
body:not(.login-page) .bd.g0{background:#e9efeb;color:#60736c}

body:not(.login-page) .al{border-color:#ead3d5;border-left-color:#a33e48;border-radius:12px;padding:13px 16px;background:#fff6f6}
body:not(.login-page) .al.ok{background:#eef8f1;border-color:#c7e2cf;border-left-color:#2c8060}
body:not(.login-page) .notification-list{padding:0;overflow:hidden}
body:not(.login-page) .nl{display:flex;align-items:flex-start;gap:12px;padding:14px 17px;border-bottom-color:#e7ede9;text-decoration:none}
body:not(.login-page) .nl:hover{background:#f8fbf9}
body:not(.login-page) .nl-icon{display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;border-radius:10px;background:#e8f3ec;color:#235e4e}
body:not(.login-page) .nl-copy{min-width:0;display:flex;flex-direction:column}
body:not(.login-page) .nl-copy b{color:#34564d;font-size:12px}
body:not(.login-page) .nl-copy span{color:#7a8b85;font-size:11px;margin-top:2px}
body:not(.login-page) .nl-copy small{color:#a08e6a;font-size:10px;margin-top:3px}
body:not(.login-page) .empty-state{padding:34px 20px;text-align:center;color:#7c8d87}
body:not(.login-page) .empty-state b,body:not(.login-page) .empty-state span{display:block}
body:not(.login-page) .empty-state b{color:#36584f;margin-bottom:5px}
body:not(.login-page) .generated-summary{background:#f7faf8;border-color:#dce7e0;color:#587068}
body:not(.login-page) .generated-summary b{color:#294d43}
body:not(.login-page) .pdf{border-color:#d7e4dc;border-radius:14px;box-shadow:0 8px 24px rgba(28,81,64,.045)}
body:not(.login-page) .oficio-detail-card{padding:20px}

@media(max-width:1100px){
  body:not(.login-page) .top-user-copy{display:none}
  body:not(.login-page) .top-user{padding-right:6px}
}
@media(max-width:820px){
  body:not(.login-page) .top{height:68px;padding:0 14px}
  body:not(.login-page) .top::after{left:0}
  body:not(.login-page) .side{width:278px;padding-top:82px;transform:translateX(-100%);overflow:auto!important}
  body:not(.login-page) #mn:checked~.side{transform:none}
  body:not(.login-page) #mn:checked~.ov{display:block;position:fixed;inset:68px 0 0;background:rgba(18,48,40,.42);z-index:45}
  body:not(.login-page) main{margin-left:0;margin-top:68px;padding:23px 17px 38px}
  body:not(.login-page) .top-user{display:none}
  body:not(.login-page) .page-head{align-items:flex-start;flex-direction:column}
  body:not(.login-page) .page-head-actions{width:100%}
  body:not(.login-page) .page-head-actions .btn{width:100%}
  body:not(.login-page) .kp{grid-template-columns:repeat(2,minmax(0,1fr))}
  body:not(.login-page) .dash-grid{grid-template-columns:1fr}
}
@media(max-width:560px){
  body:not(.login-page) h2{font-size:24px}
  body:not(.login-page) main{padding:19px 12px 32px}
  body:not(.login-page) .kp{grid-template-columns:1fr}
  body:not(.login-page) .cd{border-radius:14px}
  body:not(.login-page) .tw{border-radius:13px}
  body:not(.login-page) table tr{border-bottom-color:#f2f6f2}
  body:not(.login-page) table td::before{color:#83928d}
  body:not(.login-page) .logout span:last-child{display:none}
  body:not(.login-page) .logout{width:42px;padding:0}
}

body:not(.login-page) .side{overflow-y:auto!important;overflow-x:hidden!important;scrollbar-width:none!important}
body:not(.login-page) .side::-webkit-scrollbar{display:none!important}


/* =========================================================
   TEMA INSTITUCIONAL VINO / MORADO V4
   Inspirado en el login institucional. Unifica todas las
   pantallas internas sin cambiar la lógica del sistema.
   ========================================================= */
body:not(.login-page){
  --wine-950:#351020;
  --wine-900:#4a1530;
  --wine-800:#5f1a3b;
  --wine-700:#742047;
  --wine-600:#8a2856;
  --plum-800:#56315f;
  --plum-700:#694071;
  --plum-600:#7c5187;
  --gold:#c7a35a;
  --gold-soft:#f3e5bf;
  --paper:#fff;
  --bg:#f5f0f5;
  --bg-2:#eee7f0;
  --line:#e6d8e4;
  --line-strong:#d7c1d3;
  --ink:#352b38;
  --muted:#807382;
  --soft-wine:#f8edf4;
  --soft-plum:#f2ebf5;
  --r:var(--wine-700);
  --rd:var(--wine-900);
  --nav:var(--wine-950);
  --navText:#fff8fc;
  --g:var(--bg);
  --g2:#f1eaf2;
  --b:var(--line);
  --t:var(--ink);
  --m:var(--muted);
  --shadow:0 10px 30px rgba(75,25,60,.075);
  --shadow2:0 24px 60px rgba(62,19,50,.18);
  color:var(--ink);
  background:
    radial-gradient(circle at 94% 4%,rgba(124,81,135,.12),transparent 25rem),
    radial-gradient(circle at 70% 90%,rgba(199,163,90,.09),transparent 30rem),
    linear-gradient(135deg,#f8f5f8 0%,#f2edf4 52%,#f7f2f5 100%);
}
body:not(.login-page) h2{color:#3a263c;font-size:30px;letter-spacing:-.65px}
body:not(.login-page) h3{color:#4a304d}
body:not(.login-page) .mu,
body:not(.login-page) .page-sub,
body:not(.login-page) .muted-right{color:#837686}
body:not(.login-page) .page-kicker{color:#9f7630;font-size:11px;font-weight:850;letter-spacing:1.65px;margin-bottom:8px}

/* Encabezado */
body:not(.login-page) .top{
  height:78px;
  /* Deja un espacio visual entre el menú lateral y el título del sistema. */
  padding:0 27px 0 294px;
  background:rgba(255,253,255,.94);
  border-top:4px solid var(--wine-700);
  border-bottom:1px solid rgba(113,59,100,.14);
  box-shadow:0 5px 24px rgba(75,25,60,.07);
  backdrop-filter:blur(14px);
}
body:not(.login-page) .top::before{
  content:"";
  position:absolute;
  left:258px;
  right:0;
  top:0;
  height:4px;
  background:linear-gradient(90deg,var(--wine-700),var(--plum-700) 48%,var(--gold));
}
body:not(.login-page) .top::after{left:258px;background:linear-gradient(90deg,rgba(116,32,71,.24),rgba(124,81,135,.08),transparent)}
body:not(.login-page) .tt b{font-size:17px;color:#3b263d;font-weight:800;letter-spacing:-.15px}
body:not(.login-page) .tt small{font-size:12px;color:#8a7a8c;margin-top:4px}
body:not(.login-page) .top-user{display:flex;align-items:center;gap:10px;padding:5px 11px 5px 6px;border:1px solid #e6d9e4;border-radius:14px;background:linear-gradient(135deg,#fff,#fbf5fa);box-shadow:0 4px 12px rgba(80,29,65,.04)}
body:not(.login-page) .top-user-avatar{display:grid;place-items:center;width:35px;height:35px;border-radius:11px;background:linear-gradient(135deg,var(--wine-700),var(--plum-700));color:#fff;font-size:11px;font-weight:850;box-shadow:0 5px 13px rgba(116,32,71,.18)}
body:not(.login-page) .top-user-copy b{color:#4b344d;font-size:11px}
body:not(.login-page) .top-user-copy small{color:#938596;font-size:9px}
body:not(.login-page) .bell summary{border-color:#e4d6e2;color:var(--wine-700);background:#fff;border-radius:12px;box-shadow:0 3px 10px rgba(80,29,65,.03)}
body:not(.login-page) .bell summary:hover{background:#fbf2f8;border-color:#d7bdd0}
body:not(.login-page) .bell summary i{background:#b83e68}
body:not(.login-page) .dd{top:49px;border-color:#e4d6e2;border-radius:17px;box-shadow:var(--shadow2)}
body:not(.login-page) .dd-head{border-color:#eee4ec;background:linear-gradient(180deg,#fff,#fcf8fb)}
body:not(.login-page) .dd-head a{color:var(--wine-700)}
body:not(.login-page) .dd>a:hover{background:#fcf6fa}
body:not(.login-page) .logout{min-height:44px;padding:0 15px;border:1px solid #e4d6e2;border-radius:12px;background:#fff;color:var(--wine-700);box-shadow:0 3px 10px rgba(80,29,65,.03)}
body:not(.login-page) .logout:hover{background:#fbf2f8;border-color:#d6b8cd;color:var(--wine-900)}

/* Menú lateral e identidad */
body:not(.login-page) .side{
  width:258px;
  padding:17px 14px 15px;
  background:
    radial-gradient(circle at 15% 0,rgba(199,163,90,.16),transparent 16rem),
    radial-gradient(circle at 120% 42%,rgba(138,85,150,.20),transparent 18rem),
    linear-gradient(180deg,#3b1028 0%,#541734 45%,#432046 100%);
  box-shadow:8px 0 30px rgba(55,16,44,.16);
}
body:not(.login-page) .app-brand{
  min-height:92px;
  height:auto;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding:12px 10px 16px;
  margin-bottom:9px;
  border-bottom:1px solid rgba(255,255,255,.13);
}
body:not(.login-page) .app-brand .brand-logo{width:52px;height:52px;flex:0 0 52px;object-fit:contain;border-radius:13px;filter:drop-shadow(0 7px 14px rgba(0,0,0,.20))}
body:not(.login-page) .app-brand .emb.sm{width:52px;height:52px;flex:0 0 52px;border-radius:13px;font-size:20px;background:linear-gradient(135deg,#7a244c,#71427c)}
body:not(.login-page) .app-brand-copy{min-width:0;display:flex;flex-direction:column;line-height:1.08}
body:not(.login-page) .app-brand-copy span{color:#dec1d2;font-size:8px;font-weight:800;letter-spacing:1.2px}
body:not(.login-page) .app-brand-copy strong{margin-top:4px;color:#fff;font-size:20px;letter-spacing:1.4px}
body:not(.login-page) .app-brand-copy small{margin-top:5px;color:#d9bbcf;font-size:8px;font-weight:750;letter-spacing:1.15px}
body:not(.login-page) .menu-label{color:#e4c98f;font-size:9px;letter-spacing:1.55px;padding:7px 12px 7px}
body:not(.login-page) .side a{min-height:44px;gap:10px;padding:7px 10px;margin:3px 0;border-radius:12px;color:#faeef7;font-size:12px;font-weight:600;transition:transform .16s ease,background .16s ease,box-shadow .16s ease}
body:not(.login-page) .side a:hover{background:rgba(255,255,255,.09);transform:translateX(2px)}
body:not(.login-page) .side a.on{background:linear-gradient(90deg,rgba(255,255,255,.18),rgba(125,79,137,.28));box-shadow:inset 0 0 0 1px rgba(244,223,235,.25),0 7px 18px rgba(29,6,21,.14)}
body:not(.login-page) .side a.on::before{background:linear-gradient(180deg,#e1be72,#f0d8a5);top:7px;bottom:7px;width:3px}
body:not(.login-page) .side .mi{width:30px;height:30px;display:grid;place-items:center;flex:0 0 30px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:rgba(255,255,255,.055);color:#e9c9dc;font-size:15px}
body:not(.login-page) .side a.on .mi{color:#fff5df;background:rgba(199,163,90,.13);border-color:rgba(229,201,143,.22)}
body:not(.login-page) .side a i{background:#cf4f7b;border-color:rgba(255,255,255,.16)}
body:not(.login-page) .side-footer{color:#f0dfea;border-top-color:rgba(255,255,255,.12);padding:11px 9px 2px}
body:not(.login-page) .side-footer .shield{color:#e4c98f}
body:not(.login-page) .side-footer small{color:#c9a9bd}

/* Área de trabajo */
body:not(.login-page) main{
  margin:78px 0 0 258px;
  padding:34px 36px 54px;
  min-height:calc(100vh - 78px);
  background:
    radial-gradient(circle at 98% 3%,rgba(124,81,135,.08),transparent 22rem),
    radial-gradient(circle at 18% 100%,rgba(116,32,71,.045),transparent 25rem);
}
body:not(.login-page) .page-head{
  position:relative;
  align-items:center;
  margin-bottom:24px;
  padding:21px 23px;
  border:1px solid #e6dae5;
  border-radius:20px;
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(250,244,249,.92));
  box-shadow:0 9px 28px rgba(74,21,48,.06);
  overflow:hidden;
}
body:not(.login-page) .page-head::after{content:"";position:absolute;right:-36px;top:-60px;width:170px;height:170px;border-radius:50%;background:radial-gradient(circle,rgba(124,81,135,.10),rgba(124,81,135,0) 68%);pointer-events:none}
body:not(.login-page) .page-head h2{position:relative;z-index:1}
body:not(.login-page) .page-head .page-sub{position:relative;z-index:1;max-width:760px;margin-top:6px}
body:not(.login-page) .backbar .bt{padding:8px 12px;background:rgba(255,255,255,.82);backdrop-filter:blur(8px)}

/* Botones */
body:not(.login-page) .btn{background:linear-gradient(115deg,var(--wine-700),#6d2c63 62%,var(--plum-700));border:1px solid transparent;border-radius:12px;padding:11px 18px;color:#fff;box-shadow:0 7px 17px rgba(105,31,73,.20);transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
body:not(.login-page) .btn:hover{background:linear-gradient(115deg,var(--wine-900),var(--wine-700) 58%,#5d3566);border-color:transparent;transform:translateY(-1px);box-shadow:0 10px 23px rgba(105,31,73,.24)}
body:not(.login-page) .btn.alt{background:#fff;color:var(--wine-700);border-color:#d8bfd1;box-shadow:0 3px 10px rgba(88,33,72,.035)}
body:not(.login-page) .btn.alt:hover{background:#fcf4f9;border-color:#c99ab9;color:var(--wine-900)}
body:not(.login-page) .btn.danger{background:linear-gradient(135deg,#9b2f49,#7f233b);border-color:transparent}
body:not(.login-page) .bt{border-color:#e1d3df;border-radius:10px;color:#644b64;background:#fff;padding:7px 11px;box-shadow:0 2px 7px rgba(75,25,60,.025)}
body:not(.login-page) .bt:hover{border-color:#cba9c1;color:var(--wine-700);background:#fcf6fa}
body:not(.login-page) .bt.danger{color:#982f4b;border-color:#e7beca;background:#fff}
body:not(.login-page) .bt.danger:hover{background:#fff4f6;border-color:#dba2b2}

/* Tarjetas y dashboard */
body:not(.login-page) .cd{border-color:#e6dae5;border-radius:19px;padding:19px;box-shadow:var(--shadow);background:linear-gradient(180deg,#fff 0%,#fff 95%,#fdfafd 100%)}
body:not(.login-page) .welcome{max-width:820px;padding:20px 22px;background:linear-gradient(135deg,#fff 0%,#fbf2f8 72%,#f3ebf6 100%);border-color:#e3d3df;border-radius:20px;box-shadow:0 12px 32px rgba(75,25,60,.08)}
body:not(.login-page) .welcome::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(180deg,var(--wine-700),var(--plum-600),var(--gold))}
body:not(.login-page) .welcome::after{background:rgba(124,81,135,.10)}
body:not(.login-page) .welcome-avatar{width:58px;height:58px;border-radius:17px;background:linear-gradient(135deg,var(--wine-700),var(--plum-700));box-shadow:0 8px 20px rgba(105,31,73,.22);color:#fff}
body:not(.login-page) .welcome span{color:#8a7b8d}
body:not(.login-page) .welcome strong{color:#432d45}
body:not(.login-page) .welcome small{color:#9c7230}
body:not(.login-page) .kp{gap:15px;margin-bottom:22px}
body:not(.login-page) .kp-card{position:relative;min-height:132px;padding:19px;border-color:#e5d8e3;background:linear-gradient(145deg,#fff,#fcf7fb);overflow:hidden}
body:not(.login-page) .kp-card::after{content:"";position:absolute;right:-24px;bottom:-38px;width:105px;height:105px;border-radius:50%;background:radial-gradient(circle,rgba(124,81,135,.12),rgba(124,81,135,0) 70%)}
body:not(.login-page) .kp-card:hover{border-color:#d5bacf;box-shadow:0 14px 34px rgba(75,25,60,.10);transform:translateY(-3px)}
body:not(.login-page) .kp-top{color:#837586}
body:not(.login-page) .kp-top b{width:37px;height:37px;border-radius:12px;color:var(--wine-700);background:linear-gradient(135deg,#f8e9f2,#f0e8f5);border:1px solid #ead5e4}
body:not(.login-page) .kp-card>strong{color:#4a2a49;font-size:31px}
body:not(.login-page) .kp-card>small{color:#9d7736}
body:not(.login-page) .section-title{min-height:74px;padding:17px 19px;border-bottom-color:#eee4ec;background:linear-gradient(180deg,#fff,#fcf8fb)}
body:not(.login-page) .section-title h3{color:#4b314c}
body:not(.login-page) .activity-row,body:not(.login-page) .priority-row{padding:14px 18px;border-bottom-color:#f0e8ef}
body:not(.login-page) .activity-row:hover,body:not(.login-page) .priority-row:hover{background:#fcf7fb}
body:not(.login-page) .activity-icon{background:linear-gradient(135deg,#f7e8f1,#eee7f5);color:var(--wine-700);border:1px solid #ead7e5}
body:not(.login-page) .activity-row b,body:not(.login-page) .priority-row b{color:#553a54}

/* Formularios */
body:not(.login-page) .fm label{color:#59465b;font-weight:700}
body:not(.login-page) .fm input:not([type=file]),body:not(.login-page) .fm select,body:not(.login-page) .fm textarea{border-color:#e1d4df;border-radius:11px;padding:12px 13px;color:#433445;background:#fff;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}
body:not(.login-page) .fm input:not([type=file]):focus,body:not(.login-page) .fm select:focus,body:not(.login-page) .fm textarea:focus{border-color:#ad7095;box-shadow:0 0 0 4px rgba(116,32,71,.10);background:#fff}
body:not(.login-page) input[type=file]{color:#6e5b70}

/* Tablas */
body:not(.login-page) .tw{border-color:#e5d8e3;border-radius:18px;box-shadow:0 10px 30px rgba(75,25,60,.065);background:#fff}
body:not(.login-page) th{background:linear-gradient(180deg,#faf4f8,#f6eff7);color:#766579;padding:14px 12px;border-bottom-color:#e4d6e1;letter-spacing:.45px}
body:not(.login-page) td{padding:13px 12px;color:#513d51;border-color:#f0e8ef}
body:not(.login-page) tbody tr:nth-child(even) td{background:#fffdfF}
body:not(.login-page) tbody tr:hover td{background:#fbf4f9}
body:not(.login-page) .bd{padding:4px 10px;font-size:9px;border-radius:999px;border:1px solid transparent}
body:not(.login-page) .bd.r{background:#f8e4ec;color:#8f2850;border-color:#f0cfdd}
body:not(.login-page) .bd.y{background:#fff3dc;color:#85621f;border-color:#f0dfb4}
body:not(.login-page) .bd.v{background:#e8f3ed;color:#2a6c52;border-color:#d1e8dc}
body:not(.login-page) .bd.g0{background:#efe9f2;color:#67586b;border-color:#e1d7e5}

/* Alertas, notificaciones y visor */
body:not(.login-page) .al{border-color:#ebcdd8;border-left-color:var(--wine-700);border-radius:13px;padding:13px 16px;background:#fff4f8}
body:not(.login-page) .al.ok{background:#f2f7f4;border-color:#cfe1d7;border-left-color:#4b8168}
body:not(.login-page) .nl{border-bottom-color:#eee4ec}
body:not(.login-page) .nl:hover{background:#fcf6fa}
body:not(.login-page) .nl-icon{background:linear-gradient(135deg,#f7e8f1,#eee7f5);color:var(--wine-700)}
body:not(.login-page) .nl-copy b{color:#563b55}
body:not(.login-page) .nl-copy span{color:#857789}
body:not(.login-page) .nl-copy small{color:#9a793c}
body:not(.login-page) .generated-summary{background:linear-gradient(135deg,#fbf5f9,#f6eff8);border-color:#e3d5e1;color:#665469;border-radius:13px}
body:not(.login-page) .generated-summary b{color:#4a344c}
body:not(.login-page) .pdf{border-color:#e1d4df;border-radius:15px;box-shadow:0 10px 30px rgba(75,25,60,.06)}

/* Generar / subir oficio */
body:not(.login-page) .oficio-create{color:#433445}
body:not(.login-page) .oficio-head{position:relative;padding:23px 25px;margin:4px 0 22px;border:1px solid #e4d6e2;border-radius:21px;background:linear-gradient(135deg,#fff,#fbf3f9);box-shadow:0 10px 30px rgba(75,25,60,.065);overflow:hidden}
body:not(.login-page) .oficio-head::after{content:"";position:absolute;right:-55px;top:-65px;width:200px;height:200px;border-radius:50%;background:radial-gradient(circle,rgba(124,81,135,.12),rgba(124,81,135,0) 70%)}
body:not(.login-page) .oficio-eyebrow{color:#9f7630}
body:not(.login-page) .oficio-head h1{color:#412b43}
body:not(.login-page) .oficio-head p{color:#867888}
body:not(.login-page) .go-btn{border-color:#dbc6d6;border-radius:12px;background:#fff;color:var(--wine-700);box-shadow:0 3px 10px rgba(75,25,60,.035)}
body:not(.login-page) .go-btn:hover{background:#fcf4f9;border-color:#cda9c1}
body:not(.login-page) .go-btn.primary{background:linear-gradient(115deg,var(--wine-700),#6d2c63 62%,var(--plum-700));border-color:transparent;color:#fff;box-shadow:0 7px 18px rgba(105,31,73,.20)}
body:not(.login-page) .go-btn.primary:hover{filter:brightness(.96);box-shadow:0 10px 23px rgba(105,31,73,.24)}
body:not(.login-page) .go-note{border-color:#dfd0e3;background:linear-gradient(135deg,#fbf5fa,#f3edf8);color:#5e4261;border-radius:16px;box-shadow:0 5px 18px rgba(75,25,60,.04)}
body:not(.login-page) .go-note i{background:linear-gradient(135deg,#f1dfeb,#e9e0f2);color:var(--wine-700);border:1px solid #ddc7d9}
body:not(.login-page) .go-note p{color:#7d6d81}
body:not(.login-page) .unified-switch{padding:8px;background:linear-gradient(135deg,#f0e5ed,#eee7f3);border-color:#decfdd;border-radius:17px;box-shadow:inset 0 1px 3px rgba(80,29,65,.04)}
body:not(.login-page) .unified-tab{color:#766678;border-radius:12px;transition:background .16s ease,color .16s ease,transform .16s ease,box-shadow .16s ease}
body:not(.login-page) .unified-tab:hover{color:var(--wine-700);background:rgba(255,255,255,.55)}
body:not(.login-page) .unified-tab.on{background:linear-gradient(115deg,var(--wine-700),#6b356b);color:#fff;box-shadow:0 7px 18px rgba(105,31,73,.19);transform:translateY(-1px)}
body:not(.login-page) .go-card{padding:35px;background:linear-gradient(180deg,#fff,#fff 96%,#fdf9fc);border-color:#e4d7e2;border-radius:22px;box-shadow:0 13px 38px rgba(75,25,60,.07)}
body:not(.login-page) .go-section{border-bottom-color:#eee4ec}
body:not(.login-page) .go-step{background:linear-gradient(135deg,#f3e3ed,#ebe3f2);color:var(--wine-700);border:1px solid #e0cada;box-shadow:0 4px 10px rgba(75,25,60,.055)}
body:not(.login-page) .go-section h3{color:#4a314d}
body:not(.login-page) .go-section p{color:#8a7b8c}
body:not(.login-page) .go-grid label,body:not(.login-page) .upload-grid label{color:#59465c}
body:not(.login-page) .go-card input,body:not(.login-page) .go-card select,body:not(.login-page) .go-card textarea{border-color:#e0d3df;color:#443546;background:#fff;border-radius:11px;transition:border-color .15s ease,box-shadow .15s ease}
body:not(.login-page) .go-card input:focus,body:not(.login-page) .go-card select:focus,body:not(.login-page) .go-card textarea:focus{outline:none;border-color:#aa7094;box-shadow:0 0 0 4px rgba(116,32,71,.10)}
body:not(.login-page) .go-card input:disabled{background:#f7f3f6;color:#887b89}
body:not(.login-page) .go-muted,body:not(.login-page) .pdf-note,body:not(.login-page) .type-note{color:#857788}
body:not(.login-page) .go-actions{border-top-color:#eee4ec}
body:not(.login-page) .membrete-mini,body:not(.login-page) .choice-hint{background:#fbf6fa;border-color:#e8dce6;color:#756578}
body:not(.login-page) .upload-file{border-color:#cfaec5;background:linear-gradient(135deg,#fcf8fb,#f6f0f7)}
body:not(.login-page) .mini-badges span{background:#f2e8f0;color:#6b526b;border:1px solid #e4d4e1}

/* Archivo general AMD / Tesorería */
body:not(.login-page) .archive-stat{padding:19px 20px;border-color:#e4d6e2;border-radius:17px;background:linear-gradient(145deg,#fff,#fbf5fa);box-shadow:0 9px 27px rgba(75,25,60,.06);position:relative;overflow:hidden}
body:not(.login-page) .archive-stat::after{content:"";position:absolute;right:-24px;bottom:-34px;width:90px;height:90px;border-radius:50%;background:radial-gradient(circle,rgba(124,81,135,.11),transparent 70%)}
body:not(.login-page) .archive-stat span{color:#867788}
body:not(.login-page) .archive-stat b{color:#532f50}
body:not(.login-page) .archive-stat small{color:#9f7939}
body:not(.login-page) .admin-oficios-tools input{border-color:#e0d3df;color:#4b3a4d}
body:not(.login-page) .admin-oficios-tools input:focus{border-color:#aa7094;box-shadow:0 0 0 4px rgba(116,32,71,.10)}
body:not(.login-page) .admin-oficios-meta{color:#857788}
body:not(.login-page) .origin-badge{background:#f2e8f0;color:#6b526b;border:1px solid #e4d4e1}
body:not(.login-page) .readonly-note{border-color:#e7d8b7;background:linear-gradient(135deg,#fffaf0,#fffdf8);color:#765e33}
body:not(.login-page) .admin-pages .bt.on{background:linear-gradient(135deg,var(--wine-700),var(--plum-700));color:#fff;border-color:transparent}

/* Detalle del oficio */
body:not(.login-page) .oficio-detail-card{position:relative;padding:21px;border-color:#e3d6e1;background:linear-gradient(135deg,#fff,#fcf7fb)}
body:not(.login-page) .oficio-detail-card::before{content:"";position:absolute;left:0;top:16px;bottom:16px;width:4px;border-radius:0 5px 5px 0;background:linear-gradient(180deg,var(--wine-700),var(--plum-600),var(--gold))}

/* Foco accesible */
body:not(.login-page) :focus-visible{outline:3px solid rgba(116,32,71,.28);outline-offset:2px}

/* Avisos recibidos en segundo plano */
[hidden]{display:none!important}
.live-notification-toast{position:fixed;right:24px;bottom:24px;z-index:250;max-width:min(440px,calc(100vw - 32px));padding:0;border:1px solid #e2c8d9;border-left:5px solid var(--wine-700);border-radius:14px;background:#fff;box-shadow:0 14px 38px rgba(62,27,57,.2);animation:liveNoticeIn .2s ease-out}
.live-notification-toast a{display:block;padding:15px 18px;color:#56324e;font-size:13px;font-weight:750;line-height:1.45;text-decoration:none}
.live-notification-toast a:hover{background:#fcf5fa;border-radius:12px}
@keyframes liveNoticeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.live-notification-toast{right:12px;bottom:14px}}

@media(max-width:1100px){
  body:not(.login-page) .top-user-copy{display:none}
  body:not(.login-page) .top-user{padding-right:6px}
}
@media(max-width:820px){
  body:not(.login-page) .top{height:68px;padding:0 14px}
  body:not(.login-page) .top::before,body:not(.login-page) .top::after{left:0}
  body:not(.login-page) .side{width:286px;padding-top:80px;transform:translateX(-100%);overflow:auto!important}
  body:not(.login-page) #mn:checked~.side{transform:none}
  body:not(.login-page) #mn:checked~.ov{display:block;position:fixed;inset:68px 0 0;background:rgba(52,16,38,.48);backdrop-filter:blur(2px);z-index:45}
  body:not(.login-page) .app-brand{margin-top:0}
  body:not(.login-page) main{margin-left:0;margin-top:68px;padding:23px 17px 38px}
  body:not(.login-page) .top-user{display:none}
  body:not(.login-page) .page-head{align-items:flex-start;flex-direction:column;padding:18px}
  body:not(.login-page) .page-head-actions{width:100%}
  body:not(.login-page) .page-head-actions .btn{width:100%}
}
@media(max-width:560px){
  body:not(.login-page) h2{font-size:24px}
  body:not(.login-page) main{padding:18px 12px 32px}
  body:not(.login-page) .page-head{border-radius:16px;padding:16px}
  body:not(.login-page) .cd{border-radius:15px}
  body:not(.login-page) .tw{border-radius:14px}
  body:not(.login-page) table tr{border-bottom-color:#f4eef4}
  body:not(.login-page) table td::before{color:#8c7d8e}
  body:not(.login-page) .logout span:last-child{display:none}
  body:not(.login-page) .logout{width:42px;padding:0}
  body:not(.login-page) .oficio-head{padding:18px;border-radius:17px}
  body:not(.login-page) .go-card{padding:22px 17px}
}


/* Identidad visual del acceso y el encabezado interno: logo SSO legible. */
body.login-page .login-brand-top{align-items:center;gap:18px}
body.login-page .login-logo-card{display:flex;align-items:center;justify-content:center;flex:0 0 218px;width:218px;height:92px;padding:7px 10px;border:1px solid rgba(255,255,255,.68);border-radius:14px;background:#fff;box-shadow:0 9px 24px rgba(30,5,20,.17)}
body.login-page .login-logo-card img{display:block;width:100%;height:100%;object-fit:contain}
body.login-page .login-brand-identity{min-width:0}
body.login-page .login-brand-overline{font-size:9px;letter-spacing:.12em}
body.login-page .login-brand-name{font-size:23px}
body.login-page .login-brand-sub{font-size:9px}
body:not(.login-page) .app-brand{min-height:132px;flex-direction:column;justify-content:center;gap:9px;padding:14px 10px 16px}
body:not(.login-page) .app-brand .brand-logo{display:block;width:198px;height:83px;flex:0 0 auto;max-width:100%;object-fit:contain;padding:5px 9px;border:1px solid rgba(255,255,255,.78);border-radius:12px;background:#fff;filter:drop-shadow(0 5px 10px rgba(0,0,0,.16))}
body:not(.login-page) .app-brand-copy{align-items:center;text-align:center}
body:not(.login-page) .app-brand-copy span{font-size:7px}
body:not(.login-page) .app-brand-copy strong{font-size:16px}
body:not(.login-page) .app-brand-copy small{font-size:7px}
@media(max-width:800px){
  body.login-page .login-brand-top{gap:13px}
  body.login-page .login-logo-card{flex-basis:190px;width:190px;height:80px}
  body:not(.login-page) .app-brand{min-height:132px}
}
@media(max-width:480px){
  body.login-page .login-brand-top{align-items:flex-start;flex-direction:column;gap:12px}
  body.login-page .login-logo-card{flex-basis:auto;width:min(218px,100%);height:84px}
}


/* Refinamiento visual final del login. */
body.login-page{background:radial-gradient(ellipse at 8% 12%,rgba(173,133,68,.15),transparent 24rem),radial-gradient(ellipse at 96% 88%,rgba(101,54,122,.12),transparent 27rem),#f4f1f5}
body.login-page .login-shell{width:min(1200px,100%);border-color:#e8dfe8;border-radius:26px;box-shadow:0 30px 84px rgba(58,20,50,.16),0 5px 18px rgba(58,20,50,.05)}
body.login-page .login-brand-panel{background:radial-gradient(circle at 84% 18%,rgba(255,255,255,.075) 0 1px,transparent 2px) 0 0/24px 24px,linear-gradient(145deg,#711c47 0%,#501938 52%,#382044 100%)}
body.login-page .login-logo-card{flex-basis:196px;width:196px;height:82px;padding:6px 9px;border:1px solid rgba(255,255,255,.8);border-radius:15px;background:#fff;box-shadow:0 12px 27px rgba(30,5,20,.19)}
body.login-page .login-brand-identity{padding-left:1px}
body.login-page .login-brand-copy h1{max-width:420px;text-wrap:balance}
body.login-page .login-form-panel{position:relative;padding-left:clamp(42px,5vw,76px);padding-right:clamp(42px,5vw,76px)}
body.login-page .login-form-head h2{color:#302335}
body.login-page .login-input-wrap{border-color:#e4dce5;background:#fcfbfd;border-radius:14px}
body.login-page .login-input-wrap:focus-within{border-color:#884568;box-shadow:0 0 0 4px rgba(113,28,71,.12)}
body.login-page .login-submit{background:linear-gradient(110deg,#641938,#852653 58%,#654079);box-shadow:0 10px 24px rgba(91,24,65,.21);border-radius:14px}
body.login-page .login-submit:hover{box-shadow:0 13px 29px rgba(91,24,65,.25)}
@media(max-width:800px){body.login-page .login-logo-card{flex-basis:184px;width:184px;height:77px}}


/* Rediseño de pantalla completa: acceso institucional dividido. */
html:has(body.login-page),body.login-page{min-height:100%;height:auto}
body.login-page{min-height:100vh;padding:0;align-items:stretch;justify-content:stretch;background:#f8f7f9;color:#302634}
body.login-page .login-shell{width:100%;min-height:100vh;height:auto;grid-template-columns:minmax(390px,44%) minmax(0,56%);align-items:stretch;margin:0;border:0;border-radius:0;background:#fff;box-shadow:none;overflow:hidden}
body.login-page .login-brand-panel{min-height:100vh;height:auto;justify-content:space-between;padding:clamp(38px,5.3vw,82px) clamp(34px,6.1vw,92px);background:linear-gradient(150deg,#702044 0%,#55183c 52%,#351c43 100%)}
body.login-page .login-brand-panel::before{z-index:-1;right:-210px;top:auto;bottom:8%;width:470px;height:470px;border-color:rgba(255,255,255,.10);box-shadow:0 0 0 42px rgba(255,255,255,.025),0 0 0 84px rgba(255,255,255,.018)}
body.login-page .login-brand-panel::after{z-index:-1;left:clamp(34px,6.1vw,92px);bottom:auto;top:0;width:76px;height:5px;opacity:1;background:#d8b66b}
body.login-page .login-brand-top{position:relative;z-index:1;align-items:center;gap:0}
body.login-page .login-logo-card{flex:0 1 220px;width:220px;height:92px;padding:8px 12px;border:1px solid rgba(255,255,255,.82);border-radius:13px;background:#fff;box-shadow:0 12px 30px rgba(31,5,23,.18)}
body.login-page .login-brand-copy{position:relative;z-index:1;width:100%;max-width:510px;padding:0;margin:auto 0}
body.login-page .login-eyebrow{padding:0;border:0;border-radius:0;background:transparent;color:rgba(255,255,255,.78);font-size:10px;letter-spacing:.13em}
body.login-page .login-status-dot{width:8px;height:8px;background:#e2c378;box-shadow:0 0 0 5px rgba(226,195,120,.13)}
body.login-page .login-kicker{margin:27px 0 13px;color:#e2c378;font-size:10px;letter-spacing:.2em}
body.login-page .login-brand-copy h1{max-width:500px;font-size:clamp(38px,4.2vw,60px);line-height:1.04;letter-spacing:-.045em;font-weight:760;text-wrap:balance}
body.login-page .login-brand-description{max-width:440px;margin-top:22px;color:rgba(255,255,255,.76);font-size:15px;line-height:1.8}
body.login-page .login-brand-rule{gap:0;margin:30px 0 24px}
body.login-page .login-brand-rule span:first-child{width:52px;height:3px;background:#e2c378}
body.login-page .login-brand-rule span:last-child{display:none}
body.login-page .login-brand-note{gap:13px}
body.login-page .login-note-icon{width:38px;height:38px;flex-basis:38px;border-color:rgba(255,255,255,.2);border-radius:11px;background:rgba(255,255,255,.06)}
body.login-page .login-brand-note strong{font-size:12px;letter-spacing:.01em}
body.login-page .login-brand-note small{font-size:11px}
body.login-page .login-brand-footer{position:relative;z-index:1;color:rgba(255,255,255,.63);font-size:11px}
body.login-page .login-footer-mark{border-color:rgba(255,255,255,.22);color:#e2c378}
body.login-page .login-form-panel{width:100%;max-width:none;min-width:0;justify-content:center;align-items:center;padding:clamp(34px,6vw,90px);background:#fff}
body.login-page .login-form-panel>*{width:min(100%,468px)}
body.login-page .login-form-head{margin-bottom:34px}
body.login-page .login-form-kicker{color:#8c5b76;font-size:10px;letter-spacing:.17em}
body.login-page .login-form-head h2{margin:13px 0 9px;color:#302634;font-size:clamp(32px,3vw,40px);line-height:1.15;letter-spacing:-.04em}
body.login-page .login-form-head p{color:#817783;font-size:14px;line-height:1.65}
body.login-page .login-form{gap:20px}
body.login-page .login-field>label{margin-bottom:8px;color:#403542;font-size:12px;font-weight:700}
body.login-page .login-input-wrap{min-height:58px;border-color:#e7e0e7;border-radius:10px;background:#fff}
body.login-page .login-input-wrap:focus-within{border-color:#8a4268;background:#fff;box-shadow:0 0 0 4px rgba(111,31,68,.09)}
body.login-page .login-input-icon{flex-basis:49px;width:49px;color:#834361}
body.login-page .login-input-wrap input{min-height:56px;font-size:14px}
body.login-page .login-input-wrap input::placeholder{color:#a39aa5}
body.login-page .login-show-password{color:#726875}
body.login-page .login-hint{color:#958b97;font-size:10px}
body.login-page .login-submit{min-height:56px;margin-top:2px;border-radius:10px;background:linear-gradient(105deg,#6d1d43,#84264f 58%,#60406f);box-shadow:0 9px 22px rgba(89,25,64,.16);font-size:12px;letter-spacing:.08em}
body.login-page .login-submit:hover{box-shadow:0 12px 26px rgba(89,25,64,.2)}
body.login-page .login-security-note{margin-top:21px;color:#817783;font-size:10px}
body.login-page .login-security-note svg{stroke:#668775}
body.login-page .login-form-footer{margin-top:27px;padding-top:15px;border-top-color:#eee9ef;color:#9a919d;font-size:9px}
body.login-page .login-error{border-radius:10px}
@media(max-width:900px){
  body.login-page .login-shell{grid-template-columns:minmax(320px,42%) minmax(0,58%)}
  body.login-page .login-brand-panel{padding:38px 32px}
  body.login-page .login-brand-panel::after{left:32px}
  body.login-page .login-brand-copy h1{font-size:clamp(34px,5vw,46px)}
  body.login-page .login-form-panel{padding:42px}
}
@media(max-width:700px){
  body.login-page .login-shell{grid-template-columns:minmax(0,1fr)}
  body.login-page .login-brand-panel{min-height:auto;padding:26px 24px 24px}
  body.login-page .login-brand-panel::before{right:-130px;bottom:-200px;width:330px;height:330px}
  body.login-page .login-brand-panel::after{left:24px}
  body.login-page .login-logo-card{flex-basis:190px;width:190px;height:80px}
  body.login-page .login-brand-copy{margin:28px 0 0}
  body.login-page .login-kicker{margin:17px 0 9px}
  body.login-page .login-brand-copy h1{font-size:clamp(30px,8vw,42px)}
  body.login-page .login-brand-description{margin-top:12px;font-size:13px;line-height:1.6}
  body.login-page .login-brand-rule{margin:18px 0 14px}
  body.login-page .login-brand-note{display:none}
  body.login-page .login-brand-footer{display:none}
  body.login-page .login-form-panel{padding:34px 24px 28px}
  body.login-page .login-form-head{margin-bottom:25px}
  body.login-page .login-form-footer{flex-direction:row}
}
@media(max-width:390px){
  body.login-page .login-brand-panel{padding:22px 19px}
  body.login-page .login-form-panel{padding:29px 19px 23px}
  body.login-page .login-form-footer{flex-direction:column}
  body.login-page .login-show-password{gap:4px;margin-right:4px;padding:8px 5px;font-size:10px}
}


/* Login de acceso en vidrio translúcido, inspirado en la referencia visual. */
body.login-page{--glass-wine:#681c43;--glass-plum:#43234f;position:relative;isolation:isolate;display:grid;place-items:center;min-width:320px;min-height:100vh;margin:0;padding:34px;background:radial-gradient(ellipse at 18% 16%,rgba(190,111,148,.55),transparent 30%),radial-gradient(ellipse at 84% 78%,rgba(114,70,145,.58),transparent 34%),linear-gradient(135deg,#35142f 0%,#681b43 48%,#392044 100%);font-family:Inter,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;color:#fff;overflow-x:hidden}
body.login-page::before,body.login-page::after{content:"";position:fixed;z-index:-1;pointer-events:none;border-radius:50%;filter:blur(2px)}
body.login-page::before{width:430px;height:430px;left:-130px;bottom:-180px;border:1px solid rgba(255,255,255,.1);box-shadow:inset 0 0 80px rgba(255,255,255,.04),0 0 0 34px rgba(255,255,255,.025),0 0 0 72px rgba(255,255,255,.018)}
body.login-page::after{width:300px;height:300px;right:-90px;top:-80px;background:radial-gradient(circle at 35% 35%,rgba(224,185,205,.16),rgba(128,58,111,.025) 67%,transparent 70%)}
body.login-page .glass-login-stage{position:relative;isolation:isolate;display:grid;place-items:center;width:min(1280px,100%);min-height:min(820px,calc(100vh - 68px));padding:36px;overflow:hidden;border:1px solid rgba(255,255,255,.13);border-radius:28px;background:linear-gradient(135deg,rgba(39,12,39,.25),rgba(66,25,66,.12));box-shadow:0 35px 100px rgba(23,5,24,.32),inset 0 1px rgba(255,255,255,.07);backdrop-filter:blur(8px)}
body.login-page .glass-shape{position:absolute;z-index:-1;display:block;pointer-events:none;border-radius:999px;background:linear-gradient(135deg,rgba(255,255,255,.16),rgba(255,255,255,.015));box-shadow:inset 0 1px 1px rgba(255,255,255,.12),0 20px 48px rgba(28,7,33,.12);filter:blur(.2px)}
body.login-page .glass-shape-one{width:330px;height:92px;left:9%;top:31%;transform:rotate(-33deg)}
body.login-page .glass-shape-two{width:260px;height:72px;right:11%;top:23%;transform:rotate(37deg)}
body.login-page .glass-shape-three{width:390px;height:112px;right:9%;bottom:13%;transform:rotate(-28deg);opacity:.75}
body.login-page .glass-login-card{position:relative;width:min(432px,100%);padding:34px 38px 26px;border:1px solid rgba(255,255,255,.29);border-radius:23px;background:linear-gradient(155deg,rgba(255,255,255,.19),rgba(255,255,255,.105));box-shadow:0 22px 60px rgba(25,7,30,.24),inset 0 1px rgba(255,255,255,.17);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
body.login-page .glass-logo-wrap{display:grid;place-items:center;width:190px;height:80px;margin:0 auto 17px;padding:7px 10px;border:1px solid rgba(255,255,255,.8);border-radius:12px;background:#fff;box-shadow:0 8px 22px rgba(36,9,32,.16)}
body.login-page .glass-logo-wrap img{display:block;width:100%;height:100%;object-fit:contain}
body.login-page .glass-institution{margin:0;color:rgba(255,255,255,.78);font-size:9px;font-weight:750;letter-spacing:.15em;text-align:center}
body.login-page .glass-system-name{margin:21px 0 7px;color:#f0d39a;font-size:9px;font-weight:850;letter-spacing:.19em;text-align:center}
body.login-page .glass-login-card h1{margin:0;color:#fff;font-size:30px;font-weight:750;line-height:1.2;letter-spacing:-.035em;text-align:center}
body.login-page .glass-subtitle{margin:8px 0 25px;color:rgba(255,255,255,.73);font-size:12px;line-height:1.6;text-align:center}
body.login-page .glass-login-form{display:grid;gap:17px}
body.login-page .glass-field{display:grid;gap:7px;min-width:0}
body.login-page .glass-field>label{color:rgba(255,255,255,.94);font-size:11px;font-weight:700;letter-spacing:.02em}
body.login-page .glass-field>input,body.login-page .glass-password-wrap{width:100%;min-width:0;height:47px;border:1px solid rgba(255,255,255,.68);border-radius:8px;background:rgba(255,255,255,.95);box-shadow:0 4px 12px rgba(39,12,39,.08);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
body.login-page .glass-field>input{padding:0 13px;color:#352a39;font-size:12px}
body.login-page .glass-field>input::placeholder,body.login-page .glass-password-wrap input::placeholder{color:#9b929e;opacity:1}
body.login-page .glass-field>input:focus,body.login-page .glass-password-wrap:focus-within{outline:0;border-color:#f0d39a;box-shadow:0 0 0 3px rgba(240,211,154,.2),0 5px 14px rgba(39,12,39,.1)}
body.login-page .glass-password-wrap{display:flex;align-items:center;overflow:hidden}
body.login-page .glass-password-wrap input{flex:1;width:0;min-width:0;height:100%;padding:0 13px;border:0;outline:0;color:#352a39;background:transparent;font:inherit;font-size:12px}
body.login-page .glass-show-password{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:32px;margin:0 7px;padding:0 8px;border:0;border-left:1px solid #e7dfe9;border-radius:0;color:#66586a;background:transparent;font:inherit;font-size:10px;font-weight:700;cursor:pointer}
body.login-page .glass-show-password svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.login-page .glass-show-password:focus-visible,body.login-page .glass-submit:focus-visible{outline:3px solid rgba(240,211,154,.55);outline-offset:3px}
body.login-page .glass-submit{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:48px;margin-top:4px;padding:12px 16px;border:1px solid rgba(255,255,255,.14);border-radius:8px;color:#fff;background:linear-gradient(105deg,#4b1537,#76204d 58%,#50305f);box-shadow:0 9px 20px rgba(44,10,38,.24);font:inherit;font-size:11px;font-weight:850;letter-spacing:.08em;text-transform:uppercase;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,filter .16s ease}
body.login-page .glass-submit:hover{transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 13px 25px rgba(44,10,38,.32)}
body.login-page .glass-submit svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body.login-page .glass-security{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:19px;color:rgba(255,255,255,.72);font-size:9px;text-align:center}
body.login-page .glass-security span{color:#e6c982;font-size:14px}
body.login-page .glass-footer{margin-top:21px;padding-top:14px;border-top:1px solid rgba(255,255,255,.17);color:rgba(255,255,255,.55);font-size:8px;text-align:center}
body.login-page .glass-login-error{display:flex;align-items:flex-start;gap:8px;margin:0 0 17px;padding:10px 12px;border:1px solid rgba(255,220,220,.43);border-radius:9px;color:#fff;background:rgba(111,22,46,.3);font-size:11px;line-height:1.45}
body.login-page .glass-login-error span{display:grid;place-items:center;flex:0 0 17px;width:17px;height:17px;border-radius:50%;color:#69213f;background:#ffe2e4;font-weight:900}
@media(max-width:650px){
 body.login-page{padding:15px;background:radial-gradient(ellipse at 14% 10%,rgba(190,111,148,.48),transparent 22rem),radial-gradient(ellipse at 91% 83%,rgba(114,70,145,.5),transparent 24rem),linear-gradient(145deg,#35142f,#681b43 52%,#392044)}
 body.login-page .glass-login-stage{width:100%;min-height:calc(100vh - 30px);padding:18px;border-radius:20px}
 body.login-page .glass-shape-one{left:-16%;top:22%;width:220px;height:62px}
 body.login-page .glass-shape-two{right:-14%;top:16%;width:180px;height:52px}
 body.login-page .glass-shape-three{right:-18%;bottom:11%;width:250px;height:72px}
 body.login-page .glass-login-card{width:min(410px,100%);padding:29px 25px 22px;border-radius:19px}
 body.login-page .glass-logo-wrap{width:174px;height:73px}
 body.login-page .glass-system-name{margin-top:18px}
 body.login-page .glass-login-card h1{font-size:27px}
}
@media(max-width:360px){body.login-page{padding:9px}body.login-page .glass-login-stage{min-height:calc(100vh - 18px);padding:11px}body.login-page .glass-login-card{padding:25px 19px 19px}body.login-page .glass-show-password{gap:3px;margin-right:4px;padding:0 5px;font-size:9px}}
@media(prefers-reduced-motion:reduce){body.login-page *,body.login-page *::before,body.login-page *::after{scroll-behavior:auto!important;transition-duration:.01ms!important}}

/* Centrado real de la tarjeta respecto a la ventana, sin scroll de página. */
body.login-page{display:block!important;width:100%;height:100vh;height:100dvh;min-height:0;padding:0!important;overflow:hidden}
body.login-page .glass-login-stage{position:fixed;inset:0;display:grid;place-items:center;width:auto;height:auto;min-height:0;max-width:none;margin:0;padding:18px;overflow:auto;border:0;border-radius:0;background:transparent;box-shadow:none}
body.login-page .glass-login-card{width:min(432px,100%);max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);margin:auto;padding:24px 32px 19px;overflow-y:auto;overscroll-behavior:contain}
body.login-page .glass-logo-wrap{width:166px;height:70px;margin-bottom:12px}
body.login-page .glass-system-name{margin:15px 0 5px}
body.login-page .glass-login-card h1{font-size:28px}
body.login-page .glass-subtitle{margin:7px 0 19px}
body.login-page .glass-login-form{gap:13px}
body.login-page .glass-field{gap:5px}
body.login-page .glass-field>input,body.login-page .glass-password-wrap{height:43px}
body.login-page .glass-password-wrap input{height:100%}
body.login-page .glass-submit{min-height:45px}
body.login-page .glass-security{margin-top:14px}
body.login-page .glass-footer{margin-top:15px;padding-top:10px}
@media(max-width:650px){
 body.login-page .glass-login-stage{padding:12px}
 body.login-page .glass-login-card{width:min(410px,100%);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:24px 23px 18px}
}
@media(max-width:360px){body.login-page .glass-login-stage{padding:8px}body.login-page .glass-login-card{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);padding:20px 18px 16px}}

/* SSO: consultas, semáforo y trazabilidad */
.sso-filter{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;align-items:end;margin-bottom:18px}.sso-filter label{display:grid;gap:6px;font-weight:700;font-size:13px}.sso-filter input,.sso-filter select{width:100%;min-width:0}.sso-filter .bts{flex-wrap:wrap}.sso-pill{display:inline-block;border-radius:999px;padding:4px 9px;font-size:11px;font-weight:800;white-space:nowrap}.sso-pill.done{background:#e2f1e6;color:#246138}.sso-pill.late{background:#fbe3e5;color:#a32334}.sso-pill.soon{background:#fff0cf;color:#82580a}.sso-pill.neutral{background:#eee9ef;color:#69566b}.sso-report-bars{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-top:15px}.sso-meter{background:#f0e7ee;border-radius:8px;height:9px;margin:6px 0;overflow:hidden}.sso-meter i{display:block;background:#723655;height:100%}.sso-timeline{margin:18px 0;padding:0 0 0 18px;list-style:none;border-left:2px solid #d5b5ca}.sso-timeline li{position:relative;padding:0 0 18px 8px;overflow-wrap:anywhere}.sso-timeline li:before{content:'';position:absolute;left:-25px;top:5px;width:12px;height:12px;border:2px solid white;border-radius:50%;background:#723655}.sso-timeline li small{display:block;color:#756879;margin:4px 0}.sso-timeline li p{margin:4px 0}.sso-filter :focus-visible,.sso-timeline a:focus-visible{outline:3px solid #a67a31;outline-offset:2px}
