:root {
  color-scheme: light;
  --navy: #073f61;
  --blue: #0586bb;
  --sky: #3fc2df;
  --ink: #153449;
  --muted: #647887;
  --line: rgba(7, 63, 97, 0.13);
  --paper: rgba(255, 255, 255, 0.88);
  --login-header-height: 96px;
  --login-video-height: min(720px, calc(100vh - var(--login-header-height) - 24px));
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 78% 18%, rgba(63, 194, 223, 0.2), transparent 27rem),
    linear-gradient(135deg, #f7fbfd 0%, #eef7fa 55%, #f8fbfc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: linear-gradient(rgba(7, 63, 97, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 63, 97, 0.045) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

[hidden] { display: none !important; }

.login-screen {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: block;
  padding: 0;
  background: #fff;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 55%, rgba(5, 134, 187, 0.055) 55% 100%);
  clip-path: polygon(48% 0, 100% 0, 100% 100%, 66% 100%);
}

.login-card {
  position: relative;
  width: 100%;
  min-height: calc(var(--login-header-height) + var(--login-video-height));
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #dceef4;
  box-shadow: none;
}

.login-brandbar {
  position: relative;
  z-index: 3;
  top: auto;
  left: auto;
  right: auto;
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  width: 100%;
  height: var(--login-header-height);
  padding: 0 clamp(28px, 5vw, 78px);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background: #fff;
  box-shadow: 0 8px 24px rgba(7,63,97,.07);
}

.public-brand { flex: 0 0 auto; display: block; }
.login-brandbar img { width: clamp(145px, 11vw, 188px); height: auto; display: block; }
.public-nav { min-width: 0; display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); overflow-x: auto; scrollbar-width: none; }
.public-nav::-webkit-scrollbar { display: none; }
.public-nav a { flex: 0 0 auto; padding: 10px 0; color: #344a68; font-size: clamp(.74rem, .9vw, .9rem); font-weight: 650; text-decoration: none; transition: color 150ms ease; }
.public-nav a:hover, .public-nav a:focus-visible { color: var(--blue); }
.public-nav .stock-link { color: #ef5b16; }

.login-content {
  position: relative;
  z-index: 2;
  width: min(670px, 55%);
  height: var(--login-video-height);
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(145px, 18vh, 205px) clamp(42px, 6vw, 90px) clamp(46px, 8vh, 86px);
  color: white;
}

.login-card h1 { max-width: 620px; color: white; font-family: "Segoe UI", Arial, sans-serif; font-size: clamp(2.55rem, 4vw, 4.5rem); font-weight: 560; letter-spacing: -.045em; line-height: 1.02; text-shadow: 0 3px 24px rgba(0,0,0,.35); text-wrap: balance; }
.login-card .eyebrow { color: #8de2f5; font-size: .72rem; }
.login-copy { max-width: 540px; margin: 23px 0 29px; color: rgba(255,255,255,.86); font-size: .98rem; line-height: 1.65; text-shadow: 0 2px 16px rgba(0,0,0,.28); }
.login-content .microsoft-button { width: min(340px, 100%); background: white; color: var(--navy); }
.login-content .microsoft-button:hover { background: #eaf7fb; }
.login-content .login-status { width: min(340px, 100%); color: rgba(255,255,255,.78); text-align: left; }

.video-panel { position: absolute; z-index: 0; top: var(--login-header-height); right: 0; left: 0; height: var(--login-video-height); min-height: 560px; overflow: hidden; background: #073f61; }
.login-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.video-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(1,18,31,.62) 0%, rgba(1,22,38,.28) 46%, rgba(1,22,38,.36) 100%),
    rgba(2, 28, 46, .18);
}

.microsoft-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--navy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.microsoft-button:hover { background: #095279; transform: translateY(-1px); }
.microsoft-button:focus-visible, .logout-button:focus-visible { outline: 3px solid rgba(5, 134, 187, 0.3); outline-offset: 3px; }
.microsoft-button:disabled { cursor: wait; opacity: 0.7; transform: none; }

.microsoft-mark { width: 18px; height: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.microsoft-mark i:nth-child(1) { background: #f35325; }
.microsoft-mark i:nth-child(2) { background: #81bc06; }
.microsoft-mark i:nth-child(3) { background: #05a6f0; }
.microsoft-mark i:nth-child(4) { background: #ffba08; }
.login-status { min-height: 20px; margin: 18px 0 0; color: var(--muted); font-size: 0.78rem; text-align: center; }
.login-status.error { color: #a73535; }

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.header-actions { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span:last-child { display: grid; gap: 2px; }
.user-chip strong { max-width: 180px; overflow: hidden; color: var(--navy); font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { max-width: 180px; overflow: hidden; color: var(--muted); font-size: 0.68rem; text-overflow: ellipsis; white-space: nowrap; }
.user-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, var(--blue), var(--navy)); font-size: 0.72rem; font-weight: 800; }
.logout-button { padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--navy); background: rgba(255,255,255,.65); font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; }

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img { width: 174px; height: auto; display: block; }

.brand span { padding-left: 18px; border-left: 1px solid var(--line); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid rgba(5, 134, 187, 0.2);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(5, 134, 187, 0.12);
}

main { flex: 1; display: block; padding: 0; }

.hero {
  width: 100%;
  min-height: min(720px, calc(100vh - 175px));
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: clamp(46px, 7vw, 92px);
  align-items: center;
}

.back-to-portal { display: inline-block; margin-bottom: 24px; color: var(--blue); font-size: .78rem; font-weight: 750; letter-spacing: .05em; text-decoration: none; text-transform: uppercase; }

.departments { padding: 82px 0 92px; border-top: 1px solid var(--line); }
.section-heading { max-width: 720px; margin-bottom: 36px; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(2.1rem, 4vw, 3.5rem); letter-spacing: -.045em; }
.section-heading > p:last-child { margin: 16px 0 0; color: var(--muted); line-height: 1.65; }
.department-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.department-card { min-height: 96px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; padding: 19px; border: 1px solid var(--line); border-radius: 17px; color: inherit; background: rgba(255,255,255,.82); box-shadow: 0 10px 30px rgba(7,63,97,.045); text-decoration: none; transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.department-card:hover, .department-card:focus-visible { transform: translateY(-3px); border-color: rgba(5,134,187,.36); box-shadow: 0 17px 38px rgba(7,63,97,.1); outline: none; }
.department-card > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; color: white; background: linear-gradient(145deg, var(--blue), var(--navy)); font-size: .88rem; font-weight: 800; }
.department-card > div { min-width: 0; display: grid; gap: 5px; }
.department-card strong { overflow: hidden; color: var(--navy); font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.department-card small { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.department-card b { color: var(--blue); font-size: 1.15rem; font-weight: 500; }

.direction-dashboard-grid { grid-template-columns: minmax(260px, 390px); }
.dashboard-report-preview { min-height: 150px; padding: 22px; background: linear-gradient(135deg, #063f62 0%, #087da8 58%, #20b7cd 100%); }
.dashboard-report-preview > span { display: inline-flex; padding: 7px 10px; border-radius: 8px; color: #fff; background: rgba(2, 39, 62, .7); font-size: .68rem; font-weight: 800; letter-spacing: .13em; }

.admin-button, .primary-button, .secondary-button { border: 1px solid #c9dce6; border-radius: 9px; padding: 10px 14px; font: inherit; font-weight: 750; cursor: pointer; }
.admin-button, .secondary-button { color: #06486d; background: rgba(255,255,255,.8); }
.primary-button { color: #fff; border-color: #078db2; background: #078db2; }
.admin-view { width: min(1500px, calc(100% - 40px)); margin: 55px auto 80px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.admin-heading h2 { margin: 4px 0 8px; color: #073f61; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.admin-heading p { margin-bottom: 0; color: #637b8c; }
.admin-heading-actions { display: flex; gap: 10px; }
.admin-status { min-height: 25px; margin-bottom: 10px; color: #16708e; font-weight: 700; }
.admin-status.error { color: #bd3131; }
.admin-layout { display: grid; grid-template-columns: minmax(300px, .72fr) minmax(540px, 1.45fr); gap: 18px; align-items: start; }
.admin-list-card, .admin-form-card { padding: 20px; border: 1px solid #d7e4eb; border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 18px 50px rgba(16,72,101,.08); }
.admin-search { display: grid; gap: 7px; color: #536b7b; font-size: .77rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.admin-search input, .admin-fields input, .admin-fields select, .report-permission select, .delegation-fields input, .delegation-fields select { box-sizing: border-box; width: 100%; border: 1px solid #cadce6; border-radius: 9px; padding: 11px 12px; color: #17394e; background: #fff; font: inherit; }
.admin-user-list { display: grid; gap: 7px; max-height: 660px; margin-top: 15px; overflow: auto; }
.admin-user-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 11px; color: #163f58; background: transparent; text-align: left; cursor: pointer; }
.admin-user-row:hover, .admin-user-row.selected { border-color: #9fcfdf; background: #eef9fc; }
.admin-user-row span:nth-child(2) { display: grid; min-width: 0; }
.admin-user-row small { overflow: hidden; color: #6f8491; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-row i { color: #8b9ca5; font-size: .7rem; font-style: normal; font-weight: 800; }
.admin-user-row i.active { color: #14855a; }
.admin-user-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; color: #fff; background: #087ca3; font-size: .75rem; font-weight: 800; }
.admin-form-card { display: grid; gap: 18px; }
.admin-form-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.admin-form-title h3 { margin: 0; color: #073f61; font-size: 1.3rem; }
.active-toggle { display: flex; gap: 7px; align-items: center; color: #365c71; font-weight: 750; }
.admin-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.admin-fields label { display: grid; gap: 6px; color: #536b7b; font-size: .78rem; font-weight: 750; }
.admin-form-card fieldset { margin: 0; padding: 15px; border: 1px solid #d8e5eb; border-radius: 12px; }
.admin-form-card legend { padding: 0 7px; color: #164e6d; font-weight: 800; }
.permission-options { display: flex; flex-wrap: wrap; gap: 8px; }
.permission-option { display: flex; gap: 7px; align-items: center; padding: 8px 10px; border-radius: 8px; background: #f1f7fa; color: #385b6e; }
.report-permissions { display: grid; gap: 8px; }
.report-permission { display: grid; grid-template-columns: 1fr minmax(150px, .4fr); gap: 12px; align-items: center; padding: 10px; border-radius: 9px; background: #f5f9fb; }
.report-permission > label { display: flex; gap: 9px; align-items: center; }
.report-permission > label span { display: grid; }
.report-permission small { color: #748894; }
.admin-form-actions { display: flex; justify-content: flex-end; }
.empty-admin-list { padding: 25px; color: #708591; text-align: center; }
.delegation-help { margin:0 0 12px; color:#6b808d; font-size:.78rem; }
.delegation-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.delegation-fields label { display:grid; gap:6px; color:#536b7b; font-size:.78rem; font-weight:750; }
.delegation-reason { grid-column:1 / -1; }
.delegation-list { display:grid; gap:8px; margin-top:14px; }
.delegation-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:10px; padding:11px; border:1px solid #d8e5eb; border-radius:10px; background:#f8fcfd; }
.delegation-row div { display:grid; min-width:0; }
.delegation-row span,.delegation-row small { color:#657d8b; }
.delegation-row small { margin-top:3px; }
.delegation-status { padding:5px 8px; border-radius:999px; background:#e5edf1; font-size:.7rem; font-weight:800; }
.delegation-status.active { color:#137852; background:#ddf5e9; }.delegation-status.scheduled { color:#066f94; background:#dff4fb; }.delegation-status.expired,.delegation-status.revoked { color:#7b6d70; background:#ece7e8; }
.delegation-revoke { border:0; color:#b2363f; background:transparent; font:inherit; font-weight:750; cursor:pointer; }

@media (max-width: 900px) {
  .admin-view { width: min(100% - 24px, 700px); margin-top: 30px; }
  .admin-heading, .admin-heading-actions { align-items: stretch; flex-direction: column; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-user-list { max-height: 330px; }
  .admin-fields { grid-template-columns: 1fr; }
  .delegation-fields { grid-template-columns:1fr; }.delegation-reason { grid-column:auto; }.delegation-row { grid-template-columns:1fr auto; }.delegation-row .delegation-revoke { grid-column:1 / -1; justify-self:start; }
}

@media (max-width: 560px) {
  .admin-button { padding: 8px 10px; font-size: .75rem; }
  .report-permission { grid-template-columns: 1fr; }
}
.dashboard-bars { height: 78px; display: flex; align-items: end; gap: 9px; margin-top: 14px; }
.dashboard-bars i { flex: 1; min-width: 18px; border-radius: 5px 5px 0 0; background: rgba(255,255,255,.88); }
.dashboard-bars i:nth-child(1) { height: 34%; }
.dashboard-bars i:nth-child(2) { height: 57%; }
.dashboard-bars i:nth-child(3) { height: 46%; }
.dashboard-bars i:nth-child(4) { height: 77%; }
.dashboard-bars i:nth-child(5) { height: 68%; }
.dashboard-bars i:nth-child(6) { height: 94%; }
.embedded-dashboard-shell { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 18px 55px rgba(7,63,97,.1); }
.embedded-dashboard-heading { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.embedded-dashboard-heading > div { display: grid; gap: 3px; }
.embedded-dashboard-heading span { color: var(--blue); font-size: .65rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.embedded-dashboard-heading h3 { margin: 0; color: var(--navy); font-size: 1rem; }
.embedded-dashboard-heading a { color: var(--blue); font-size: .75rem; font-weight: 750; text-decoration: none; }
.embedded-dashboard { width: 100%; height: 900px; display: block; border: 0; background: #f4f9fb; }
.commercial > span, .production > span { background: linear-gradient(145deg, #f17841, #e94c54); }
.manufacturing > span, .warehouse > span { background: linear-gradient(145deg, #7a62c8, #4e3c99); }
.logistics > span, .engineering > span { background: linear-gradient(145deg, #0d9d9a, #087477); }
.administration > span { background: linear-gradient(145deg, #647b8b, #334b5d); }
.people > span { background: linear-gradient(145deg, #d4679d, #9c3e72); }

.boards-view { width: 50%; min-height: min(720px, calc(100vh - 175px)); padding: 52px 0 72px; }
#directionDashboards {
  width: calc(100vw - 28px);
  max-width: none;
  margin-left: calc(50% - 50vw + 14px);
  margin-right: calc(50% - 50vw + 14px);
}
#directionDashboards > .back-to-portal,
#directionDashboards > .section-heading { margin-left: 18px; margin-right: 18px; }
.boards-view .back-to-portal { margin-bottom: 14px; font-size: .68rem; }
.boards-view .section-heading { margin-bottom: 22px; }
.boards-view .section-heading .eyebrow { margin-bottom: 11px; font-size: .68rem; }
.boards-view .section-heading h2 { font-size: clamp(1.4rem, 2.1vw, 1.8rem); }
.boards-view .section-heading > p:last-child { margin-top: 10px; font-size: .78rem; }
.boards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.board-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; color: inherit; background: rgba(255,255,255,.9); box-shadow: 0 12px 32px rgba(7,63,97,.07); text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
.board-card:hover, .board-card:focus-visible { transform: translateY(-4px); border-color: rgba(5,134,187,.4); box-shadow: 0 20px 44px rgba(7,63,97,.13); outline: none; }
.board-preview { min-height: 82px; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; color: white; background: linear-gradient(135deg, #073f61, #0586bb 58%, #23b7c7); }
.board-preview-alt { background: linear-gradient(135deg, #4d2f87, #7655bd 58%, #e268a1); }
.board-preview-photo { background-position: center; background-size: cover; }
.board-preview-photo > div { display: none; }
.board-preview-photo > span { width: fit-content; padding: 7px 10px; border-radius: 8px; background: rgba(3,34,54,.74); backdrop-filter: blur(5px); }
.board-preview-juta { background-image: linear-gradient(rgba(3,34,54,.12), rgba(3,34,54,.3)), url("assets/juta-ids-2026.jpg"); }
.board-preview-close { background-image: linear-gradient(rgba(3,34,54,.08), rgba(3,34,54,.28)), url("assets/cierre-de-mes.jpg"); }
.board-preview-12min { background-image: linear-gradient(rgba(222,92,35,.12), rgba(3,34,54,.38)), url("assets/juta-ids-2026.jpg"); background-position: center 42%; }
.board-preview > span { font-size: .7rem; font-weight: 800; letter-spacing: .18em; opacity: .85; }
.board-preview > div { display: grid; grid-template-columns: 1.5fr .8fr 1.2fr .65fr; gap: 9px; align-items: end; height: 70px; }
.board-preview i { display: block; border-radius: 7px 7px 2px 2px; background: rgba(255,255,255,.82); }
.board-preview i:nth-child(1) { height: 54%; }
.board-preview i:nth-child(2) { height: 82%; }
.board-preview i:nth-child(3) { height: 68%; }
.board-preview i:nth-child(4) { height: 100%; }
.board-card-copy { position: relative; padding: 18px 13px 14px; }
.link-label { position: absolute; top: -13px; left: 10px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--blue); background: white; font-size: .58rem; font-weight: 750; }
.board-card h3 { margin: 0 0 6px; color: var(--navy); font-size: .78rem; }
.board-card p { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.tool-card { text-decoration: none; }
.tool-card[aria-disabled="true"] { cursor: default; }

.eyebrow {
  margin: 0 0 19px;
  color: var(--blue);
  font-size: 0.79rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 690px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.65rem, 5.4vw, 5rem);
  font-weight: 720;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-text {
  max-width: 620px;
  margin: 28px 0 42px;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  line-height: 1.7;
}

.progress-copy { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 12px; font-size: 0.82rem; }
.progress-copy span { color: var(--muted); }
.progress-copy strong { color: var(--navy); }
.progress-track { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(7, 63, 97, 0.09); }
.progress-track span { display: block; width: 68%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--sky)); }

.hero-panel {
  position: relative;
  padding: clamp(24px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(7, 63, 97, 0.13);
  backdrop-filter: blur(18px);
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -76px;
  top: -96px;
  border-radius: 50%;
  background: rgba(63, 194, 223, 0.12);
}

.panel-label {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tool-grid { display: grid; gap: 12px; }

.tool-card {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.76);
}

.tool-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  font-size: 1rem;
  font-weight: 800;
}

.monday .tool-icon { background: linear-gradient(145deg, #f45c69, #f7a21b); }
.dashboards .tool-icon { background: linear-gradient(145deg, #073f61, #0586bb); }
.sharepoint .tool-icon { background: linear-gradient(145deg, #087b83, #22b8b3); }
.mi-dia-tool .tool-icon { background: linear-gradient(145deg, #0597be, #36c0d5); }
.tool-card h2 { margin: 0 0 4px; color: var(--navy); font-size: 1rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.84rem; }

footer {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

footer p { margin: 0; }

@media (max-width: 820px) {
  :root { --login-header-height: 132px; --login-video-height: calc(100vh - var(--login-header-height)); }
  .login-card { width: 100%; min-height: calc(var(--login-header-height) + var(--login-video-height)); border-radius: 0; }
  .login-brandbar { display: block; height: var(--login-header-height); padding: 18px 28px 12px; }
  .public-brand { margin-bottom: 10px; }
  .public-nav { gap: 22px; padding-top: 9px; border-top: 1px solid var(--line); }
  .login-content { width: min(620px, 100%); height: var(--login-video-height); min-height: 520px; padding: 80px 42px 44px; }
  .video-panel { min-height: 520px; }
  .video-shade { background: rgba(2, 28, 46, .46); }
  .page-shell { width: min(100% - 28px, 650px); }
  .site-header { min-height: 82px; }
  .brand img { width: 144px; }
  .brand span { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; gap: 48px; padding: 72px 0; }
  main { padding: 54px 0; }
  h1 { font-size: clamp(2.65rem, 12vw, 4rem); }
  .department-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .boards-view { width: 100%; }
  .boards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .departments { padding: 64px 0 72px; }
}

@media (max-width: 520px) {
  :root { --login-header-height: 118px; }
  .login-screen { padding: 0; }
  .login-card { border-radius: 0; }
  .login-brandbar { padding: 14px 20px 9px; }
  .login-brandbar img { width: 148px; }
  .public-brand { margin-bottom: 7px; }
  .public-nav { gap: 18px; padding-top: 7px; }
  .public-nav a { font-size: .72rem; }
  .login-content { height: var(--login-video-height); min-height: 520px; padding: 60px 24px 30px; }
  .login-card h1 { font-size: clamp(2.3rem, 13vw, 3.5rem); }
  .login-copy { margin: 18px 0 24px; font-size: .92rem; }
  .user-chip small { display: none; }
  .user-chip strong { max-width: 105px; }
  .hero-panel { border-radius: 21px; }
  .department-grid { grid-template-columns: 1fr; }
  .embedded-dashboard-heading { align-items: flex-start; flex-direction: column; }
  #directionDashboards { width: calc(100vw - 16px); margin-left: calc(50% - 50vw + 8px); margin-right: calc(50% - 50vw + 8px); }
  .embedded-dashboard { height: 760px; }
  .boards-grid { grid-template-columns: 1fr; }
  footer { padding: 22px 0; align-items: flex-start; flex-direction: column; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

.mi-dia-view { width: min(1500px, calc(100vw - 40px)); margin-left: 50%; transform: translateX(-50%); padding: 22px 0 70px; }
.mi-dia-heading { display:flex; justify-content:space-between; align-items:end; gap:28px; margin-bottom:24px; }
.mi-dia-heading h2 { margin:7px 0 5px; color:var(--navy); font-size:clamp(2rem,4vw,3.5rem); }
.mi-dia-heading p { margin:0; color:var(--muted); }
.mi-dia-actions { display:flex; align-items:end; gap:12px; }
.mi-dia-actions label { display:grid; gap:6px; color:var(--muted); font-weight:700; font-size:.75rem; }
.mi-dia-actions input,.mi-dia-actions select { min-width:145px; padding:11px 34px 11px 13px; border:1px solid var(--line); border-radius:11px; background:white; color:var(--navy); font:inherit; }
.mi-admin-filters { display:flex; align-items:end; gap:10px; }
.mi-owner-card { display:flex; align-items:center; gap:12px; width:max-content; margin-top:8px; padding:10px 14px 10px 10px; border:1px solid rgba(8,151,188,.22); border-radius:15px; background:rgba(255,255,255,.78); box-shadow:0 10px 28px rgba(7,63,97,.06); }
.mi-owner-avatar { display:grid; place-items:center; width:43px; height:43px; border-radius:50%; color:white; background:linear-gradient(145deg,#057ca5,#20b7ca); font-size:.78rem; font-weight:800; }
.mi-owner-card strong,.mi-owner-card small { display:block; }.mi-owner-card strong { color:var(--navy); font-size:.96rem; }.mi-owner-card small { max-width:560px; margin-top:3px; color:var(--muted); font-size:.72rem; }
.mi-dia-tabs { display:flex; gap:5px; overflow-x:auto; padding:6px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.76); }
.mi-dia-tabs button { flex:0 0 auto; padding:11px 17px; border:0; border-radius:11px; background:transparent; color:var(--muted); font:inherit; font-weight:750; cursor:pointer; }
.mi-dia-tabs button.active { background:var(--navy); color:white; }
.mi-dia-status { margin:14px 0; padding:11px 15px; border-radius:11px; color:var(--muted); background:rgba(255,255,255,.75); font-size:.82rem; }
.mi-dia-status.ready { color:#08765f; background:#e8f8f3; }.mi-dia-status.warning { color:#8a5a00; background:#fff5db; }.mi-dia-status.error { color:#a52e35; background:#fff0f0; }
.mi-dia-loading { min-height:260px; display:flex; align-items:center; justify-content:center; gap:22px; padding:38px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.82); box-shadow:0 16px 38px rgba(14,78,105,.07); }
.mi-dia-loading strong { display:block; margin-bottom:5px; color:var(--navy); font-size:1.05rem; }
.mi-dia-loading p,.mi-dia-load-error p { margin:0; color:var(--muted); font-size:.82rem; }
.mi-dia-spinner { width:68px; height:68px; flex:0 0 auto; border-radius:50%; background:conic-gradient(#078daf 0 28%,#cceaf0 28% 76%,#eef7f9 76% 100%); -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 7px),#000 0); mask:radial-gradient(farthest-side,transparent calc(100% - 7px),#000 0); animation:mi-dia-spin 1.05s linear infinite; box-shadow:0 0 0 5px rgba(10,146,178,.08); }
.mi-dia-load-error { min-height:180px; display:grid; place-content:center; gap:6px; padding:34px; border:1px solid #f1c7c9; border-radius:16px; background:#fff6f6; text-align:center; }
.mi-dia-load-error strong { color:#a52e35; }
@keyframes mi-dia-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .mi-dia-spinner { animation-duration:2.4s; } }
.mi-kpis { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.mi-kpis-seven { grid-template-columns:repeat(7,minmax(0,1fr)); }
.mi-kpis article,.mi-panel { border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.92); box-shadow:0 14px 40px rgba(7,63,97,.07); }
.mi-kpis article { padding:18px; border-top:4px solid #13a7c6; }.mi-kpis article.risk { border-top-color:#e65c65; }
.mi-kpis span,.mi-kpis small { display:block; color:var(--muted); font-size:.75rem; }.mi-kpis strong { display:block; margin:9px 0 5px; color:var(--navy); font-size:1.3rem; }
.mi-summary-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:14px; }
.mi-panel { min-width:0; padding:20px; }.mi-panel-full { margin-top:14px; }.mi-panel h3 { margin:0 0 16px; color:var(--navy); font-size:1rem; }
.mi-panel-title,.mi-compare { display:flex; justify-content:space-between; align-items:center; gap:20px; }.mi-panel-title b { color:#078bab; }
.mi-progress,.mi-aging { display:flex; height:12px; margin:22px 0 13px; overflow:hidden; border-radius:999px; background:#e8eff2; }.mi-progress span { background:linear-gradient(90deg,#058db0,#32bfd1); }.mi-aging span { background:#44ad82; }.mi-aging i { background:#e65c65; }
.mi-compare span { color:var(--muted); font-size:.78rem; }.mi-compare b { display:block; margin-top:4px; color:var(--navy); font-size:.95rem; }
.mi-table-wrap { width:100%; overflow-x:auto; scrollbar-color:#0b96b6 #e8eff2; scrollbar-width:thin; }.mi-table { min-width:780px; width:100%; table-layout:auto; border-collapse:collapse; white-space:nowrap; font-size:.76rem; }.mi-table th { padding:10px; text-align:left; color:var(--muted); background:#f2f7f9; }.mi-table td { max-width:220px; padding:10px; overflow:hidden; text-overflow:ellipsis; border-top:1px solid var(--line); color:#294d62; }.mi-table td.mi-cell-compact { max-width:170px; }.mi-table-hint { margin:8px 0 0; color:var(--muted); font-size:.68rem; }.mi-empty { padding:36px; text-align:center; color:var(--muted); background:#f5f9fa; border-radius:12px; }
.mi-pagination { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-top:12px; color:var(--muted); font-size:.75rem; }.mi-pagination>div { display:flex; align-items:center; gap:5px; }.mi-pagination button { min-width:30px; height:30px; padding:0 8px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--navy); font:inherit; cursor:pointer; }.mi-pagination button.active { color:white; border-color:#0b94b4; background:#0b94b4; }.mi-pagination button:disabled { opacity:.35; cursor:default; }
.mi-tab-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-top:14px; }.mi-tab-totals article { padding:17px 19px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.92); box-shadow:0 12px 30px rgba(7,63,97,.06); }.mi-tab-totals span { display:block; color:var(--muted); font-size:.73rem; }.mi-tab-totals strong { display:block; margin-top:7px; color:var(--navy); font-size:1.25rem; }
.mi-buckets { display:grid; gap:10px; margin-top:16px; }.mi-buckets>div { display:grid; grid-template-columns:100px 1fr 110px; align-items:center; gap:12px; color:var(--muted); font-size:.75rem; }.mi-buckets i { height:10px; overflow:hidden; border-radius:999px; background:#e9f0f2; }.mi-buckets i b { display:block; height:100%; border-radius:inherit; background:#35abc3; }.mi-buckets i .bucket-2 { background:#86cee0; }.mi-buckets i .bucket-3 { background:#f3bd43; }.mi-buckets i .bucket-4 { background:#e85c62; }.mi-buckets strong { text-align:right; color:var(--navy); }
@media (max-width:1100px){.mi-kpis{grid-template-columns:repeat(3,1fr)}}
@media (max-width:720px){.mi-dia-view{width:calc(100vw - 24px)}.mi-dia-heading{align-items:stretch;flex-direction:column}.mi-dia-actions,.mi-admin-filters{align-items:stretch;flex-direction:column}.mi-dia-actions select{width:100%}.mi-summary-grid{grid-template-columns:1fr}.mi-kpis{grid-template-columns:repeat(2,1fr)}.mi-tab-totals{grid-template-columns:repeat(2,1fr)}.mi-compare{align-items:flex-start;flex-direction:column}.mi-pagination{align-items:flex-start;flex-direction:column}}

.mi-collection-kpis article { position:relative; padding-left:24px; border-top:4px solid #16a5c4; }
.mi-collection-kpis article.risk { border-top-color:#ef765f; }
.mi-collection-kpis article.risk strong { color:#d94a48; }
.mi-collection-panel { padding:22px; }
.mi-collection-toolbar { display:flex; align-items:center; justify-content:space-between; gap:22px; margin-bottom:16px; }
.mi-collection-toolbar h3 { margin:0 0 4px; }
.mi-collection-toolbar p { margin:0; color:var(--muted); font-size:.73rem; }
.mi-collection-toolbar label { display:flex; align-items:center; width:min(310px,100%); padding:0 13px; border:1px solid var(--line); border-radius:11px; background:white; color:var(--muted); }
.mi-collection-toolbar input { width:100%; padding:10px; border:0; outline:0; background:transparent; font:inherit; }
.mi-collection-table { min-width:1180px; }
.mi-collection-table th:not(:first-child),.mi-collection-table td:not(:first-child) { text-align:right; }
.mi-collection-table td:first-child { max-width:280px; font-weight:700; }
.mi-collection-table .mi-money-cell { transition:background .2s; }
.mi-collection-table .healthy { background:rgba(64,188,205,.13); }
.mi-collection-table .watch { background:rgba(245,194,78,.13); }
.mi-collection-table .warning { background:rgba(245,168,59,.16); }
.mi-collection-table .danger { background:rgba(234,91,91,.16); color:#bd333b; font-weight:700; }
.mi-collection-table .total { font-weight:750; }
.mi-collection-table .mi-zero { color:#9bb0bc; }
.mi-collection-table tfoot th { padding:12px 10px; color:white; background:#07516e; border:0; }
.mi-collection-table tfoot th:first-child { border-radius:0 0 0 10px; text-align:left; }
.mi-collection-table tfoot th:last-child { border-radius:0 0 10px 0; }
.mi-collection-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-top:12px; }
.mi-collection-footer .mi-pagination { padding:0; }
.mi-risk-legend { display:flex; flex-wrap:wrap; gap:16px; color:var(--muted); font-size:.7rem; }
.mi-risk-legend span { display:flex; align-items:center; gap:6px; }
.mi-risk-legend i { width:13px; height:13px; border-radius:4px; background:rgba(64,188,205,.25); }
.mi-risk-legend i.warning { background:rgba(245,168,59,.35); }
.mi-risk-legend i.danger { background:rgba(234,91,91,.35); }
.mi-area-rac-panel { margin-top:14px; }
.mi-area-rac-panel .mi-panel-title p { margin:4px 0 0; color:var(--muted); font-size:.72rem; }
.mi-area-rac-panel .mi-table-wrap { max-height:66vh; overflow:auto; scrollbar-gutter:stable; }
.mi-area-rac-table { min-width:1240px; table-layout:fixed; }
.mi-area-rac-table col:nth-child(1) { width:78px; }
.mi-area-rac-table col:nth-child(2) { width:250px; }
.mi-area-rac-table col:nth-child(3) { width:175px; }
.mi-area-rac-table col:nth-child(4) { width:140px; }
.mi-area-rac-table col:nth-child(5) { width:112px; }
.mi-area-rac-table col:nth-child(6) { width:128px; }
.mi-area-rac-table col:nth-child(7) { width:130px; }
.mi-area-rac-table col:nth-child(8) { width:140px; }
.mi-area-rac-table col:nth-child(9) { width:105px; }
.mi-area-rac-table thead th { position:sticky; top:0; z-index:4; padding:8px 10px; color:#0b4b68; background:#d9f1f6; border-right:1px solid #c3e4eb; border-bottom:1px solid #9dced9; box-shadow:0 1px 0 rgba(11,75,104,.08); font-size:.7rem; font-weight:760; }
.mi-area-rac-table thead th:last-child { border-right:0; }
.mi-area-rac-table th:not(:nth-child(2)),.mi-area-rac-table td:not(:nth-child(2)) { text-align:right; }
.mi-area-rac-table th:first-child,.mi-area-rac-table td:first-child { text-align:left; }
.mi-area-rac-table td { padding-top:8px; padding-bottom:8px; line-height:1.2; vertical-align:middle; border-top-color:#e3edf1; border-right:1px solid #edf3f5; font-variant-numeric:tabular-nums; }
.mi-area-rac-table td:last-child { border-right:0; }
.mi-area-rac-table td:nth-child(2) { min-width:220px; max-width:260px; font-weight:650; }
.mi-rac-name { display:block; padding-left:7px; color:var(--navy); font-weight:720; white-space:normal; overflow-wrap:anywhere; }
.mi-rac-pill { display:inline-grid; min-width:42px; padding:5px 8px; place-items:center; border-radius:999px; color:white; background:#14809d; font-size:.68rem; font-weight:800; }
.mi-area-rac-table .good { color:#16865f; }.mi-area-rac-table .watch { color:#b27b0b; }.mi-area-rac-table .bad { color:#cf4651; }
.mi-area-rac-table .mi-area-group td { padding:8px 12px; color:#0b526d; background:#c9ebf1; border-top:1px solid #a9d9e2; border-bottom:1px solid #b5dfe7; text-align:left!important; }
.mi-area-rac-table .mi-area-group strong { font-size:.74rem; letter-spacing:.045em; text-transform:uppercase; }
.mi-area-rac-table .mi-area-group span { margin-left:9px; color:#4d7e91; font-size:.68rem; font-weight:650; }
.mi-area-rac-table .mi-rac-row td:first-child { padding-left:18px; }
.mi-area-rac-table .mi-area-subtotal td { padding:8px 10px; color:#0b4b68; background:#e5f4f7; border-top:1px solid #9bd3dc; font-weight:760; text-align:right!important; }
.mi-area-rac-table .mi-area-subtotal td:first-child { padding-left:10px; text-align:center!important; }
.mi-area-rac-table .mi-area-subtotal strong { font-weight:820; }
.mi-rac-chart-panel { margin-top:14px; }
.mi-rac-chart-panel .mi-panel-title p { margin:4px 0 0; color:var(--muted); font-size:.72rem; }
.mi-chart-legend { display:flex; gap:14px; color:var(--muted); font-size:.7rem; }.mi-chart-legend span { display:flex; align-items:center; gap:6px; }.mi-chart-legend i { width:18px; height:7px; border-radius:99px; background:#12a5c2; }.mi-chart-legend span:last-child i { background:#dfecef; }
.mi-rac-chart { display:grid; gap:14px; margin-top:20px; }.mi-rac-chart-row { display:grid; grid-template-columns:58px 1fr; align-items:center; gap:13px; }.mi-rac-chart-label { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:6px; }.mi-rac-chart-label strong { color:var(--navy); font-size:.78rem; }.mi-rac-chart-label span { color:var(--muted); font-size:.7rem; }.mi-rac-chart-label .good { color:#16865f; }.mi-rac-chart-label .watch { color:#b27b0b; }.mi-rac-chart-label .bad { color:#cf4651; }
.mi-rac-budget-bar { position:relative; height:12px; overflow:hidden; border-radius:999px; background:#edf3f5; }.mi-rac-budget-bar i { position:absolute; inset:0; background:#dfecef; }.mi-rac-budget-bar b { position:absolute; inset:0 auto 0 0; border-radius:inherit; background:linear-gradient(90deg,#078daf,#2bb9cc); }
@media (max-width:720px){.mi-collection-toolbar,.mi-collection-footer{align-items:stretch;flex-direction:column}.mi-collection-toolbar label{width:100%}}

.soporte-tool .tool-icon{background:linear-gradient(145deg,#087da5,#23b7c7)}.soporte-view{width:min(1440px,calc(100% - 32px));margin:24px auto 40px}.soporte-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:16px}.soporte-heading h2{margin:8px 0 0;color:#073f61;font-size:clamp(1.8rem,3vw,2.7rem)}.soporte-frame{display:block;width:100%;height:calc(100vh - 230px);min-height:680px;border:1px solid #c9dce7;border-radius:18px;background:#f7fbfd;box-shadow:0 20px 50px rgba(7,63,97,.09)}@media(max-width:700px){.soporte-heading{align-items:flex-start;flex-direction:column}.soporte-frame{height:760px;min-height:0}}


/* soporte-pantalla-completa-v24-2 */
.soporte-view{width:100vw!important;margin:0 0 0 calc(50% - 50vw)!important}.soporte-heading{display:none!important}.soporte-frame{display:block;width:100%!important;height:calc(100vh - 100px)!important;min-height:720px!important;border:0!important;border-radius:0!important;box-shadow:none!important}
