@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

/* Portal Blessed · Design System v5
   Capa visual global, sin cambios de rutas, permisos ni lógica operativa. */
:root{
  --blessed-green:#278f16;
  --blessed-green-700:#1e7311;
  --blessed-green-100:#eaf6e7;
  --blessed-yellow:#ffd400;
  --blessed-red:#f01422;
  --blessed-ink:#18221b;
  --blessed-text:#344039;
  --blessed-muted:#6d776f;
  --blessed-bg:#f5f7f3;
  --blessed-surface:#ffffff;
  --blessed-surface-soft:#fafbf9;
  --blessed-line:#e2e8df;
  --blessed-line-strong:#cfd8cb;
  --blessed-info:#2d6cdf;
  --blessed-warning:#b77900;
  --blessed-danger:#c62828;
  --blessed-success:#278f16;
  --font-display:'Poppins','Segoe UI',system-ui,sans-serif;
  --font-body:'Poppins','Segoe UI',system-ui,sans-serif;
  --shadow-xs:0 1px 2px rgba(24,34,27,.04);
  --shadow-sm:0 8px 24px rgba(24,34,27,.06);
  --shadow-md:0 18px 48px rgba(24,34,27,.10);
  --radius-sm:10px;
  --radius-md:16px;
  --radius-lg:22px;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-7:32px;
  --space-8:40px;
  --content-width:1440px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:150px;background:var(--blessed-bg)}
body{
  margin:0;
  color:var(--blessed-text);
  background:
    radial-gradient(circle at 10% -10%,rgba(255,212,0,.08),transparent 28rem),
    var(--blessed-bg);
  font-family:var(--font-body);
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body,a,button,input,select,textarea{font-family:var(--font-body)}
::selection{background:rgba(39,143,22,.18);color:var(--blessed-ink)}
:focus-visible{outline:3px solid rgba(39,143,22,.28);outline-offset:3px}
a{color:inherit}
.skip-link{
  position:fixed;left:16px;top:-80px;z-index:9999;
  padding:10px 16px;border-radius:10px;background:var(--blessed-ink);color:#fff;
  font-weight:700;text-decoration:none;transition:top .2s;
}
.skip-link:focus{top:16px}

/* Tipografía: títulos en mayúsculas; contenido y subtítulos claros */
h1,h2,h3,h4,.brand-copy strong,.login-brand strong,.category-card>strong{
  color:var(--blessed-ink);
  font-family:var(--font-display);
  font-weight:900;
  letter-spacing:-.025em;
}
h1,h2,.page-title,.panel-title{text-transform:uppercase}
h1{font-size:clamp(28px,3vw,44px);line-height:1.05}
h2{font-size:clamp(21px,2vw,30px);line-height:1.15}
h3{font-size:17px;line-height:1.25}
p,small,label,td,th,input,select,textarea{letter-spacing:0}
.eyebrow{
  margin:0 0 10px;
  color:var(--blessed-green);
  font-family:var(--font-body);
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}

/* Cabecera */
.app-topbar.topbar{
  position:sticky;top:0;z-index:100;
  display:block;width:100%;height:auto;
  padding:0;
  border:0;border-bottom:1px solid rgba(207,216,203,.9);
  background:rgba(255,255,255,.96);
  box-shadow:0 3px 18px rgba(24,34,27,.035);
  backdrop-filter:blur(14px);
}
.app-topbar-row{
  width:min(calc(100% - 40px),var(--content-width));
  min-height:76px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
}
.brand-v4.brand{display:flex;align-items:center;gap:12px;text-decoration:none}
.brand-mark{
  width:42px;height:42px;border-radius:14px;
  display:grid;place-items:center;flex:0 0 auto;
  background:linear-gradient(145deg,var(--blessed-green),var(--blessed-green-700));
  color:#fff;font-family:var(--font-display);font-size:20px;font-weight:900;
  box-shadow:0 8px 18px rgba(39,143,22,.2);
}
.brand-copy{display:flex;flex-direction:column;line-height:1}
.brand-copy strong{font-size:16px;letter-spacing:.08em}
.brand-copy span{margin-top:6px;color:var(--blessed-muted);font-size:9px;font-weight:700;letter-spacing:.18em}
.userbox{display:flex;align-items:center;gap:10px;color:var(--blessed-muted);font-size:12px}
.user-identity{
  display:flex;align-items:center;gap:10px;
  min-height:46px;padding:5px 14px 5px 6px;
  border:1px solid var(--blessed-line);border-radius:14px;background:var(--blessed-surface-soft);
}
.user-avatar{
  width:34px;height:34px;border-radius:11px;display:grid;place-items:center;
  background:var(--blessed-green-100);color:var(--blessed-green-700);
  font-family:var(--font-display);font-weight:900;
}
.user-copy{display:flex;flex-direction:column;line-height:1.2}
.user-name{color:var(--blessed-ink);font-weight:700}
.user-copy .role{margin-top:3px;padding:0;border:0;color:var(--blessed-muted);font-size:10px;font-weight:500}
.security-link,.logout-link{
  min-height:40px;padding:9px 13px;border:1px solid transparent;border-radius:11px;
  display:inline-flex;align-items:center;text-decoration:none;font-weight:700;
}
.security-link:hover{border-color:var(--blessed-line);background:var(--blessed-surface-soft)}
.logout-link{color:var(--blessed-danger)!important}
.logout-link:hover{background:#fff1f1}
.portal-nav{
  width:min(calc(100% - 40px),var(--content-width));
  min-height:48px;margin:0 auto;
  display:flex;align-items:center;gap:5px;
  overflow-x:auto;scrollbar-width:none;
}
.portal-nav::-webkit-scrollbar{display:none}
.portal-nav a{
  min-height:36px;padding:8px 13px;border-radius:10px;
  display:inline-flex;align-items:center;white-space:nowrap;
  color:var(--blessed-muted);font-size:11px;font-weight:700;text-decoration:none;
  transition:background .18s,color .18s,transform .18s;
}
.portal-nav a:hover{background:var(--blessed-green-100);color:var(--blessed-green-700)}
.portal-nav a:active{transform:scale(.98)}
.portal-nav-home{color:var(--blessed-green)!important}
.portal-nav-separator{width:1px;height:20px;margin:0 5px;background:var(--blessed-line)}

/* Contenedor */
body>main,main{
  width:min(calc(100% - 40px),var(--content-width));
  max-width:var(--content-width);
  margin:0 auto;padding:36px 0 76px;
}
main.login-main{width:100%;max-width:none;padding:28px}
.portal-home{max-width:none}
.page-head,.portal-welcome{
  display:flex;align-items:flex-start;justify-content:space-between;gap:28px;
}
.portal-welcome{
  padding:32px 34px;border:1px solid var(--blessed-line);border-radius:var(--radius-lg);
  background:linear-gradient(135deg,#fff 0%,#fbfdf9 72%,rgba(39,143,22,.06) 100%);
  box-shadow:var(--shadow-xs);
}
.portal-welcome h1,.page-head h1,.panel h1,.product-head h1{margin:0 0 10px}
.portal-welcome p,.page-head p,.panel>p{max-width:720px;margin:0;color:var(--blessed-muted)}
.welcome-badge{
  min-width:230px;padding:16px 18px;border-radius:16px;
  display:flex;align-items:center;gap:12px;
  background:var(--blessed-ink);color:#fff;
}
.welcome-badge>span{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
  background:var(--blessed-yellow);color:var(--blessed-ink);font-size:18px;
}
.welcome-badge div{display:flex;flex-direction:column}
.welcome-badge strong{font-weight:700}
.welcome-badge small{margin-top:2px;color:rgba(255,255,255,.64);font-size:10px}

/* Categorías y módulos */
.category-home{margin-top:34px}
.category-heading{display:flex;justify-content:space-between;align-items:end;gap:28px;margin-bottom:18px}
.category-heading h2{margin:0}
.category-heading p{max-width:620px;margin:0;color:var(--blessed-muted);font-size:12px}
.category-grid{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;
}
.category-card,.module-card{
  position:relative;overflow:hidden;
  border:1px solid var(--blessed-line)!important;border-radius:var(--radius-md)!important;
  background:var(--blessed-surface)!important;color:var(--blessed-text);
  box-shadow:var(--shadow-xs);
  transition:transform .2s,border-color .2s,box-shadow .2s;
}
.category-card{
  min-height:245px;padding:22px!important;
  display:flex;flex-direction:column;text-decoration:none;
}
.category-card::before{
  content:"";position:absolute;inset:0 0 auto;height:4px;
  background:var(--card-accent,var(--blessed-green));
}
.category-card--gold{--card-accent:#d8a800}
.category-card--sage{--card-accent:#719a70}
.category-card--blue{--card-accent:#4a7bb7}
.category-card--peach{--card-accent:#d98262}
.category-card--mint{--card-accent:var(--blessed-green)}
.category-card:hover,.module-card:hover{
  transform:translateY(-3px);border-color:var(--blessed-line-strong)!important;
  box-shadow:var(--shadow-sm);
}
.category-icon,.module-icon{
  width:52px!important;height:52px!important;border:0!important;border-radius:16px!important;
  display:grid!important;place-items:center!important;
  background:var(--blessed-green-100)!important;color:var(--blessed-green-700)!important;
}
.category-icon svg,.module-icon svg{
  width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
.category-card>strong{margin-top:22px;font-size:14px;line-height:1.3;text-transform:uppercase}
.category-card>small{margin-top:8px;color:var(--blessed-muted);font-size:11px;line-height:1.55}
.category-action{margin-top:auto;padding-top:18px;color:var(--blessed-green);font-size:11px;font-weight:700}
.category-detail{margin-top:42px}
.category-detail:not(:target){display:none}
.category-detail:target{display:block;animation:section-in .25s ease}
.category-detail-head{display:flex;flex-direction:column;gap:18px;margin-bottom:20px}
.category-detail-head h2{margin:0 0 8px}
.category-detail-head p{margin:0;color:var(--blessed-muted)}
.category-back,.back{
  width:max-content;min-height:38px;padding:8px 13px;border:1px solid var(--blessed-line);
  border-radius:11px;display:inline-flex;align-items:center;
  background:#fff;color:var(--blessed-muted);font-size:11px;font-weight:700;text-decoration:none;
}
.category-back:hover,.back:hover{border-color:var(--blessed-green);color:var(--blessed-green)}
.module-grid,.module-grid-v2{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:24px;
}
.module-card{min-height:220px;padding:21px!important;display:flex;flex-direction:column;text-decoration:none}
.module-card.restricted{opacity:.72;background:#fafbf9!important}
.module-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.module-card h2,.module-card h3{margin:24px 0 8px;font-size:15px;text-transform:uppercase}
.module-card p{margin:0;color:var(--blessed-muted);font-size:11px;line-height:1.6}
.module-footer{
  margin-top:auto;padding-top:18px;display:flex;justify-content:space-between;
  color:var(--blessed-green);font-size:11px;font-weight:700;
}
.access-tag,.status,.badge,.pill{
  min-height:25px;padding:5px 9px;border:1px solid var(--blessed-line);border-radius:999px;
  display:inline-flex;align-items:center;
  background:var(--blessed-surface-soft);color:var(--blessed-muted);
  font-size:9px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap;
}
.role-note{
  margin-top:28px;padding:18px 20px;border:1px solid var(--blessed-line);border-radius:var(--radius-md);
  display:flex;gap:14px;background:#fff;
}
.role-note-icon{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;flex:0 0 auto;
  background:var(--blessed-green-100);color:var(--blessed-green);
}
.role-note strong{color:var(--blessed-ink);font-weight:700}
.role-note p{margin:3px 0 0;color:var(--blessed-muted);font-size:11px}

/* Paneles, formularios y controles */
.panel,.product-shell,.count-card,.knowledge,.login-card,.empty{
  border:1px solid var(--blessed-line)!important;border-radius:var(--radius-md)!important;
  background:var(--blessed-surface)!important;box-shadow:var(--shadow-xs);
}
.panel,.product-shell{padding:clamp(20px,3vw,32px)!important}
label{color:var(--blessed-text);font-size:11px;font-weight:700}
input,select,textarea{
  min-height:46px;padding:11px 13px!important;
  border:1px solid var(--blessed-line-strong)!important;border-radius:11px!important;
  background:#fff!important;color:var(--blessed-ink)!important;font:500 13px/1.45 var(--font-body)!important;
  transition:border-color .18s,box-shadow .18s;
}
textarea{min-height:110px}
input::placeholder,textarea::placeholder{color:#9aa39c}
input:focus,select:focus,textarea:focus{
  border-color:var(--blessed-green)!important;
  box-shadow:0 0 0 4px rgba(39,143,22,.10)!important;outline:0;
}
button,.button,input[type="submit"],.small-link{
  min-height:44px;padding:10px 16px!important;border:1px solid transparent;border-radius:11px!important;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  background:var(--blessed-green);color:#fff;
  font:700 11px/1.2 var(--font-body)!important;text-decoration:none;cursor:pointer;
  transition:background .18s,transform .18s,box-shadow .18s;
}
button:hover,.button:hover,input[type="submit"]:hover{
  background:var(--blessed-green-700);box-shadow:0 8px 18px rgba(39,143,22,.16);
}
button:active,.button:active{transform:translateY(1px)}
button:disabled,.button.disabled{opacity:.45;cursor:not-allowed;box-shadow:none}
.button.secondary,.small-link{
  border-color:var(--blessed-line)!important;background:#fff!important;color:var(--blessed-text)!important;
}
.button.secondary:hover,.small-link:hover{border-color:var(--blessed-green)!important;color:var(--blessed-green)!important}

/* Tablas, filas y listados */
table{width:100%;border-collapse:separate;border-spacing:0;color:var(--blessed-text);font-size:12px}
thead th{
  padding:12px 14px;border-bottom:1px solid var(--blessed-line);
  background:var(--blessed-surface-soft);color:var(--blessed-muted);
  font-size:9px;font-weight:700;letter-spacing:.06em;text-align:left;text-transform:uppercase;
}
tbody td{padding:14px;border-bottom:1px solid var(--blessed-line)}
tbody tr:hover td{background:#fbfdf9}
.product-row{
  min-height:70px;padding:15px 18px!important;border-color:var(--blessed-line)!important;
  border-radius:13px!important;background:#fff!important;
}
.product-row:hover{border-color:var(--blessed-green)!important;box-shadow:var(--shadow-xs)}
.search{gap:10px}
.search input{min-width:0}
.count-card{padding:16px 20px!important}
.count-card strong{color:var(--blessed-ink);font-family:var(--font-display);font-size:24px}
.empty{padding:24px!important;color:var(--blessed-muted)}

/* Alertas y estados */
.flash-stack{position:relative;z-index:20;margin:0 0 18px}
.flash{
  min-height:48px;padding:13px 16px!important;border:1px solid var(--blessed-line)!important;
  border-left:4px solid var(--blessed-green)!important;border-radius:12px!important;
  background:#fff!important;box-shadow:var(--shadow-xs);font-size:12px;
}
.flash.error{border-left-color:var(--blessed-danger)!important;background:#fff7f7!important}
.flash.warning{border-left-color:var(--blessed-yellow)!important;background:#fffdf2!important}
.status.verified,.status.success{border-color:#bcdcb6;background:var(--blessed-green-100);color:var(--blessed-green-700)}
.status.error,.status.danger{border-color:#f3c0c0;background:#fff1f1;color:var(--blessed-danger)}
.status.warning{border-color:#ead391;background:#fff9df;color:#8a6400}

/* Acceso */
.login-main{
  min-height:100vh;display:grid;place-items:center;
  background:
    radial-gradient(circle at 15% 10%,rgba(255,212,0,.14),transparent 26rem),
    radial-gradient(circle at 90% 90%,rgba(39,143,22,.12),transparent 30rem),
    var(--blessed-bg);
}
.login-card{width:min(100%,460px);margin:0!important;padding:36px!important;box-shadow:var(--shadow-md)}
.login-brand{align-items:center!important}
.login-card h1{font-size:30px;text-transform:uppercase}
.login-card>p{color:var(--blessed-muted)}

/* Responsive */
@keyframes section-in{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@media (max-width:1180px){
  .category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .module-grid,.module-grid-v2{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:860px){
  html{scroll-padding-top:125px}
  .app-topbar-row{width:min(calc(100% - 28px),var(--content-width));min-height:68px}
  .brand-copy span{display:none}
  .user-copy{display:none}
  .user-identity{padding:5px}
  .security-link{display:none}
  .portal-nav{width:100%;padding:0 14px;border-top:1px solid var(--blessed-line)}
  body>main,main{width:min(calc(100% - 28px),var(--content-width));padding-top:24px}
  .portal-welcome,.page-head,.category-heading{flex-direction:column;align-items:stretch}
  .welcome-badge{min-width:0;width:100%}
  .category-grid,.module-grid,.module-grid-v2{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:560px){
  body{font-size:13px}
  .app-topbar-row{gap:10px}
  .brand-mark{width:38px;height:38px;border-radius:12px}
  .brand-copy strong{font-size:14px}
  .logout-link{padding:8px!important}
  .portal-nav a{padding-inline:10px}
  body>main,main{width:min(calc(100% - 20px),var(--content-width));padding-bottom:50px}
  .portal-welcome{padding:22px;border-radius:18px}
  .category-grid,.module-grid,.module-grid-v2{grid-template-columns:1fr}
  .category-card{min-height:210px}
  .category-heading p{font-size:11px}
  .page-head{gap:14px}
  .search{flex-direction:column}
  .search button,.search .button{width:100%}
  .panel,.product-shell,.login-card{padding:20px!important}
  .userbox{gap:4px}
  table{display:block;overflow-x:auto;white-space:nowrap}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}
}
@media print{
  body{background:#fff!important}
  .app-topbar,.portal-nav,.skip-link{display:none!important}
  body>main,main{width:100%;max-width:none;margin:0;padding:0}
  .panel,.product-shell{border:0!important;box-shadow:none!important}
}


/* Dashboard de trabajo */
.workflow-overview{
  margin-top:22px;padding:24px;border:1px solid var(--blessed-line);border-radius:var(--radius-lg);
  background:var(--blessed-ink);color:#fff;box-shadow:var(--shadow-sm);
}
.workflow-heading{
  display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:18px;
}
.workflow-heading h2{margin:0 0 6px;color:#fff;font-size:21px}
.workflow-heading p{margin:0;color:rgba(255,255,255,.62);font-size:11px}
.workflow-heading .eyebrow{color:#a9d99f}
.workflow-all{
  min-height:38px;padding:8px 12px;border:1px solid rgba(255,255,255,.14);border-radius:11px;
  display:inline-flex;align-items:center;gap:8px;color:#fff;font-size:10px;font-weight:700;text-decoration:none;
}
.workflow-all:hover{background:rgba(255,255,255,.08)}
.workflow-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.workflow-action{
  position:relative;min-height:142px;padding:16px;border:1px solid rgba(255,255,255,.12);
  border-radius:14px;display:flex;flex-direction:column;background:rgba(255,255,255,.055);
  color:#fff;text-decoration:none;transition:background .18s,transform .18s,border-color .18s;
}
.workflow-action:hover{
  transform:translateY(-2px);border-color:rgba(169,217,159,.45);background:rgba(255,255,255,.09);
}
.workflow-action.restricted{opacity:.55}
.workflow-number{color:#a9d99f;font-family:var(--font-display);font-size:10px;letter-spacing:.08em}
.workflow-copy{margin-top:13px;display:flex;flex-direction:column}
.workflow-copy strong{color:#fff;font-size:12px;font-weight:700;text-transform:uppercase}
.workflow-copy small{
  display:-webkit-box;margin-top:5px;overflow:hidden;color:rgba(255,255,255,.58);
  font-size:9px;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:2;
}
.workflow-arrow{
  position:absolute;right:14px;bottom:12px;color:var(--blessed-yellow);font-size:17px;
}
.workflow-lock{
  position:absolute;right:12px;top:10px;padding:3px 7px;border-radius:999px;
  background:rgba(255,255,255,.1);color:rgba(255,255,255,.65);font-size:8px;text-transform:uppercase;
}
@media (max-width:1000px){.workflow-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){
  .workflow-overview{padding:19px}
  .workflow-heading{align-items:flex-start;flex-direction:column}
  .workflow-grid{grid-template-columns:1fr}
  .workflow-action{min-height:120px}
}


/* Dashboard v5 · portada aprobada */
.portal-welcome-v5{
  position:relative;min-height:260px;overflow:hidden;
  align-items:center;padding:46px 54px;
  background:linear-gradient(115deg,#fff 0 62%,#e6f2e2 62%);
}
.portal-welcome-copy{position:relative;z-index:2}
.portal-welcome-v5 h1{font-size:clamp(34px,4vw,56px);letter-spacing:-.045em}
.portal-welcome-v5 p{font-size:15px}
.portal-welcome-status{
  width:max-content;margin-top:22px;padding:8px 11px;border:1px solid var(--blessed-line);
  border-radius:999px;display:flex;align-items:center;gap:8px;
  background:rgba(255,255,255,.72);color:var(--blessed-muted);font-size:9px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;
}
.portal-welcome-status>span{
  width:7px;height:7px;border-radius:50%;background:var(--blessed-green);
  box-shadow:0 0 0 4px rgba(39,143,22,.12);
}
.portal-welcome-visual{
  position:relative;width:290px;height:180px;display:grid;place-items:center;flex:0 0 290px;
}
.portal-welcome-visual>span{
  position:relative;z-index:2;width:112px;height:112px;border-radius:31px;
  display:grid;place-items:center;background:linear-gradient(145deg,var(--blessed-green),var(--blessed-green-700));
  color:#fff;font:900 70px/1 var(--font-display);box-shadow:0 20px 42px rgba(39,143,22,.26);
  transform:rotate(-5deg);
}
.welcome-ring{position:absolute;border:1px solid rgba(39,143,22,.28);border-radius:50%}
.welcome-ring-one{width:172px;height:172px}
.welcome-ring-two{width:238px;height:238px;opacity:.55}
.category-card{min-height:205px}
.category-card>strong{margin-top:19px}
.category-action{padding-top:14px}
.workflow-overview{padding:27px 31px}
.workflow-action{min-height:128px}
@media(max-width:860px){
  .portal-welcome-v5{min-height:235px;padding:34px 30px;background:linear-gradient(145deg,#fff 0 70%,#e6f2e2 70%)}
  .portal-welcome-visual{width:150px;height:130px;flex-basis:150px}
  .portal-welcome-visual>span{width:78px;height:78px;border-radius:23px;font-size:48px}
  .welcome-ring-one{width:115px;height:115px}.welcome-ring-two{width:150px;height:150px}
}
@media(max-width:560px){
  .portal-welcome-v5{min-height:auto;padding:28px 22px}
  .portal-welcome-visual{display:none}
  .portal-welcome-status{width:100%;line-height:1.45}
  .category-card{min-height:175px}
}


/* Navegación v5 · iconos y cabecera unificada */
@media(min-width:1181px){
  .app-topbar.topbar{
    min-height:82px;padding:0 clamp(24px,3vw,56px);
    display:grid;grid-template-columns:minmax(185px,1fr) auto minmax(185px,1fr);
    align-items:center;gap:18px;
  }
  .app-topbar-row{display:contents}
  .brand-v4.brand{grid-column:1;justify-self:start}
  .portal-nav{grid-column:2;grid-row:1;width:auto;min-height:82px;margin:0;gap:2px}
  .portal-nav a{
    align-self:stretch;min-height:82px;padding:0 11px;border-radius:0;border-bottom:3px solid transparent;
    gap:7px;font-size:9px;
  }
  .portal-nav a:hover,.portal-nav a:focus-visible{
    border-bottom-color:var(--blessed-green);background:#f5faf3;
  }
  .portal-nav-home{border-bottom-color:var(--blessed-green)!important}
  .portal-nav-separator{display:none}
  .userbox{grid-column:3;grid-row:1;justify-self:end}
}
.portal-nav-icon{width:22px;height:22px;display:grid;place-items:center;flex:0 0 auto}
.portal-nav-icon svg{
  width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
@media(max-width:1320px) and (min-width:1181px){
  .portal-nav a{padding-inline:8px}
  .portal-nav a>span:last-child{display:none}
  .portal-nav-icon svg{width:23px;height:23px}
}


/* Etapa aprobada · navegación principal y acceso por perfil */
.portal-nav-primary .portal-nav-home{color:var(--blessed-muted)!important}
.portal-nav-primary a.active{
  color:var(--blessed-green-700)!important;
  background:var(--blessed-green-100);
}
.portal-nav-primary a.active .portal-nav-icon{transform:translateY(-1px)}
.portal-nav-primary a[aria-current="page"]{font-weight:800}
.access-denied-main{max-width:none}
.access-denied-page{max-width:790px;margin:0 auto}
.access-denied-back{
  display:inline-flex;align-items:center;margin:0 0 18px;
  color:var(--blessed-muted);font-size:11px;font-weight:700;text-decoration:none;
}
.access-denied-back:hover{color:var(--blessed-green)}
.access-denied-card{
  min-height:500px;padding:58px 52px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  border:1px solid var(--blessed-line);border-radius:28px;background:#fff;
  box-shadow:0 22px 58px rgba(24,34,27,.07);
}
.access-denied-icon{
  width:84px;height:84px;margin-bottom:24px;border-radius:24px;
  display:grid;place-items:center;background:#fff3bd;color:#6b5700;
}
.access-denied-icon svg,.access-required svg{
  width:36px;height:36px;fill:none;stroke:currentColor;stroke-width:1.8;
  stroke-linecap:round;stroke-linejoin:round;
}
.access-denied-card h1{margin:0;font-size:clamp(34px,5vw,58px);line-height:1}
.access-denied-card>p{max-width:540px;margin:18px auto;color:var(--blessed-muted);font-size:14px;line-height:1.7}
.access-denied-card>p strong{color:var(--blessed-ink)}
.access-required{
  min-width:340px;margin:2px 0 26px;padding:14px 18px;
  display:flex;align-items:center;gap:13px;text-align:left;
  border:1px solid var(--blessed-line);border-radius:14px;background:var(--blessed-surface-soft);
  color:var(--blessed-green);
}
.access-required>span{display:grid;place-items:center}
.access-required svg{width:25px;height:25px}
.access-required div{display:flex;flex-direction:column}
.access-required strong{font-family:var(--font-display);font-size:10px;font-weight:900;letter-spacing:.04em}
.access-required small{margin-top:3px;color:var(--blessed-muted);font-size:10px}
.access-denied-actions{display:flex;flex-direction:column;align-items:center;gap:11px}
.access-denied-actions .button{min-height:44px;padding-inline:20px}
.access-denied-actions>small{color:var(--blessed-muted);font-size:9px}

@media(min-width:1181px){
  .portal-nav-primary a.active{border-bottom-color:var(--blessed-green)!important;background:#f5faf3}
  .portal-nav-primary .portal-nav-home:not(.active){border-bottom-color:transparent!important}
}
@media(max-width:760px){
  html{scroll-padding-top:82px}
  .app-topbar.topbar{min-height:72px}
  .app-topbar-row{min-height:72px}
  .portal-nav-primary{
    position:fixed;left:0;right:0;bottom:0;z-index:120;
    width:100%;min-height:68px;margin:0;padding:0 8px;
    display:flex;align-items:stretch;justify-content:space-around;gap:0;
    border-top:1px solid var(--blessed-line);background:rgba(255,255,255,.98);
    box-shadow:0 -8px 24px rgba(24,34,27,.08);backdrop-filter:blur(14px);
    overflow:visible;
  }
  .portal-nav-primary a{
    min-width:0;min-height:68px;padding:8px 5px 7px;flex:1;
    flex-direction:column;justify-content:center;gap:4px;border-radius:0;
    border-top:3px solid transparent;background:transparent!important;
    color:var(--blessed-muted);font-size:8px;letter-spacing:.02em;text-transform:uppercase;
  }
  .portal-nav-primary a.active{border-top-color:var(--blessed-green);color:var(--blessed-green)!important}
  .portal-nav-primary .portal-nav-icon,.portal-nav-primary .portal-nav-icon svg{width:24px;height:24px}
  body>main,main{padding-bottom:110px}
  .access-denied-card{min-height:430px;padding:42px 24px;border-radius:22px}
  .access-required{width:100%;min-width:0}
}
@media(max-width:420px){
  .portal-nav-primary a{font-size:7px}
  .access-denied-card h1{font-size:34px}
}
