body.auth-pending {
  min-height: 100vh;
  overflow: hidden;
  background: #f4f7fb;
}

body.auth-pending .app-shell,
body.auth-pending .access-portal {
  display: none;
}

body.auth-locked {
  min-height: 100vh;
  overflow: hidden;
  background: #f4f7fb;
}

body.auth-locked .app-shell {
  display: none;
}

.access-portal {
  min-height: 100vh;
  color: #071a3d;
  background:
    linear-gradient(180deg, #f8fbff 0, #f4f7fb 155px, #ffffff 155px, #ffffff 100%);
}

.access-header {
  height: 96px;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 70px);
  border-bottom: 1px solid #e4e9f2;
  background: #f8fafc;
}

.access-header img {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.access-content {
  width: min(1120px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 48px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 74px;
  align-items: start;
}

.access-hero {
  min-height: 520px;
  padding-top: 8px;
}

.access-kicker {
  margin: 0 0 22px;
  color: #ef1736;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-hero h1 {
  max-width: 490px;
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 850;
}

.access-copy {
  max-width: 560px;
  margin: 18px 0 28px;
  color: #52627a;
  font-size: 15px;
  line-height: 1.55;
}

.access-tagline {
  margin: 8px 0 0;
  color: #102040;
  font-size: 20px;
  font-weight: 800;
}

.access-preview {
  position: relative;
  width: min(560px, 100%);
  height: 210px;
  margin: 18px 0 38px;
}

.access-stock-card,
.access-pallet,
.access-scan-card {
  display: none;
}

.access-monitor {
  position: absolute;
  left: 94px;
  top: 18px;
  width: 345px;
  height: 190px;
  border: 10px solid #111827;
  border-radius: 9px;
  background:
    linear-gradient(#0ea5b7 0 30px, transparent 30px),
    linear-gradient(90deg, #edf4fb 0 90px, #ffffff 90px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.access-monitor span,
.access-phone span {
  display: block;
  height: 10px;
  margin: 16px;
  border-radius: 999px;
  background: #dbe5f1;
}

.access-monitor div {
  height: 16px;
  margin: 13px 18px 0 116px;
  border-radius: 4px;
  background: #e8eef7;
}

.access-monitor div:nth-child(3) {
  width: 58%;
  background: #cfe0f5;
}

.access-monitor div:nth-child(4) {
  width: 72%;
}

.access-phone {
  position: absolute;
  left: 395px;
  top: 68px;
  width: 88px;
  height: 136px;
  border: 8px solid #111827;
  border-radius: 14px;
  background: linear-gradient(#0ea5b7 0 24px, #ffffff 24px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

.access-phone div {
  width: 50px;
  height: 26px;
  margin: 11px auto 0;
  border-radius: 5px;
  background: #eaf1fb;
}

.access-phone div:nth-child(3) {
  background: #d6e6fb;
}

.access-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 54px;
  max-width: 660px;
}

.access-benefits article {
  display: grid;
  gap: 10px;
}

.access-benefits strong {
  font-size: 16px;
}

.access-benefits span {
  color: #334155;
  line-height: 1.45;
}

.access-card {
  margin-top: 4px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.28);
  border: 1px solid #dfe5ee;
  overflow: hidden;
}

.access-card-title {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-bottom: 1px solid #e1e6ee;
  background: #f8fafc;
}

.access-card-title h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.access-user-icon,
.access-field-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: currentColor;
  color: #0b2247;
  mask: radial-gradient(circle at 50% 35%, #000 0 27%, transparent 28%), radial-gradient(ellipse at 50% 84%, #000 0 44%, transparent 45%);
}

.access-card label:not(.access-remember) {
  display: grid;
  gap: 8px;
  margin: 26px 14px 0;
  color: #12213b;
  font-weight: 700;
}

.access-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px 40px;
  border: 1px solid #9eb6d6;
  background: #eef4fc;
}

.access-input input {
  width: 100%;
  min-height: 34px;
  border: 0;
  padding: 0 10px;
  outline: none;
  color: #071a3d;
  background: transparent;
}

.access-field-icon {
  align-self: center;
  justify-self: center;
  color: #7b8797;
}

.access-field-icon.lock {
  mask:
    linear-gradient(#000 0 0) center 58% / 58% 45% no-repeat,
    radial-gradient(circle at 50% 38%, transparent 0 31%, #000 32% 48%, transparent 49%);
}

.password-toggle {
  position: relative;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  align-self: center;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.password-toggle::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 11px;
  width: 20px;
  height: 13px;
  border: 2px solid #64748b;
  border-radius: 50%;
}

.password-toggle::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.password-toggle.is-visible {
  background: #e6f0ff;
}

.access-error {
  margin: 10px 14px 0;
  color: #ef1736;
  font-weight: 800;
}

.access-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 14px 28px;
  color: #1f2937;
}

.access-remember input {
  width: 18px;
  height: 18px;
}

.access-submit {
  width: 104px;
  height: 36px;
  margin: 0 14px 16px auto;
  display: block;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #1f73ad;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(31, 115, 173, 0.28);
}

.access-submit:hover {
  background: #075a9c;
}

.logout-action {
  width: 84px;
  height: 50px;
  min-height: 50px;
  border-radius: 8px;
}

@media (min-width: 981px) {
  body.auth-locked {
    background: #ffffff;
  }

  .access-portal {
    min-height: 100vh;
    overflow: hidden;
    background:
      radial-gradient(circle at 98% 11%, rgba(11, 99, 223, 0.22) 0 2px, transparent 3px) 0 0 / 18px 18px,
      radial-gradient(circle at 87% 18%, rgba(226, 234, 246, 0.82), transparent 25%),
      radial-gradient(circle at 82% -2%, rgba(220, 232, 249, 0.86), transparent 32%),
      #ffffff;
  }

  .access-header {
    position: absolute;
    z-index: 3;
    top: 2px;
    left: 2px;
    width: min(58vw, 1120px);
    height: 118px;
    padding: 40px 0 0 clamp(50px, 4.2vw, 76px);
    border: 0;
    background: transparent;
  }

  .access-header img {
    width: 190px;
    filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.18));
  }

  .access-content {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(820px, 58vw) minmax(500px, 1fr);
    gap: clamp(34px, 3.8vw, 74px);
    align-items: stretch;
  }

  .access-hero {
    position: relative;
    min-height: 100vh;
    padding: 156px clamp(44px, 5.2vw, 104px) 42px clamp(58px, 5.2vw, 112px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: #ffffff;
    overflow: hidden;
    border-radius: 32px 184px 184px 32px;
    background:
      radial-gradient(circle at 76% 14%, rgba(20, 112, 225, 0.2), transparent 18%),
      radial-gradient(circle at 22% 72%, rgba(25, 120, 237, 0.22), transparent 34%),
      linear-gradient(137deg, #04163b 0%, #062b66 44%, #073f8d 100%);
    box-shadow: 30px 0 70px rgba(4, 22, 59, 0.16);
  }

  .access-hero::before {
    content: "";
    position: absolute;
    inset: 8% -11% 0 12%;
    pointer-events: none;
    opacity: 0.42;
    background:
      radial-gradient(circle at 78% 8%, rgba(10, 101, 225, 0.42) 0 2px, transparent 3px) 0 0 / 18px 18px,
      repeating-radial-gradient(circle at 28% 80%, rgba(92, 158, 255, 0.22) 0 1px, transparent 1px 10px);
    mask-image: linear-gradient(90deg, transparent, #000 18%, #000 80%, transparent);
  }

  .access-hero::after {
    content: "";
    position: absolute;
    right: -74px;
    bottom: -96px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 26px solid rgba(239, 23, 54, 0.96);
    opacity: 0.95;
  }

  .access-kicker,
  .access-hero h1,
  .access-tagline,
  .access-copy,
  .access-preview,
  .access-benefits {
    position: relative;
    z-index: 1;
  }

  .access-kicker {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .access-kicker::before {
    content: "";
    display: inline-block;
    width: 42px;
    height: 4px;
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 999px;
    background: #ef1736;
  }

  .access-hero h1 {
    max-width: 720px;
    margin: 0;
    color: #ef1736;
    font-size: clamp(58px, 5.1vw, 88px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: 0;
    text-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  }

  .access-hero h1 span {
    color: #ffffff;
  }

  .access-tagline {
    margin: 14px 0 0;
    color: #ffffff;
    font-size: clamp(25px, 1.75vw, 32px);
    font-weight: 850;
  }

  .access-copy {
    max-width: 570px;
    margin: 28px 0 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 16px;
    line-height: 1.5;
  }

  .access-preview {
    width: min(800px, 100%);
    height: 380px;
    margin: 8px 0 28px;
  }

  .access-monitor {
    left: 168px;
    top: 66px;
    width: min(610px, calc(100% - 182px));
    height: 286px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    transform: rotate(-1.6deg);
    background:
      linear-gradient(90deg, #061b47 0 98px, transparent 98px),
      linear-gradient(#ffffff 0 100%);
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.32);
  }

  .access-monitor::before {
    content: "WMS DAMASA";
    position: absolute;
    left: 21px;
    top: 19px;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
  }

  .access-monitor::after {
    content: "";
    position: absolute;
    right: 26px;
    bottom: 23px;
    width: 216px;
    height: 142px;
    border-radius: 14px;
    background:
      linear-gradient(135deg, transparent 17px, #dfe7f2 18px 42px, transparent 43px),
      linear-gradient(45deg, #eef3fa 0 25%, #dce6f2 25% 50%, #f8fafc 50% 75%, #dce6f2 75%);
    box-shadow: inset 0 0 0 1px #e0e8f3;
    opacity: 0.95;
  }

  .access-monitor span {
    width: 202px;
    height: 14px;
    margin: 30px 0 18px 130px;
    background: #edf3fb;
  }

  .access-monitor div {
    width: 164px;
    height: 46px;
    margin: 11px 0 0 130px;
    border-radius: 10px;
    background: #f5f8fc;
    box-shadow: inset 0 0 0 1px #e2eaf5;
  }

  .access-monitor div:nth-child(3) {
    width: 202px;
    background: #f5f8fc;
  }

  .access-monitor div:nth-child(4) {
    width: 228px;
  }

  .access-phone {
    left: auto;
    right: 8px;
    top: 126px;
    width: 82px;
    height: 142px;
    border-width: 8px;
    border-radius: 16px;
    background: linear-gradient(#16bfd0 0 25px, #ffffff 25px);
    transform: rotate(-1.5deg);
  }

  .access-stock-card,
  .access-pallet,
  .access-scan-card {
    display: block;
    position: absolute;
    z-index: 3;
  }

  .access-stock-card {
    right: 66px;
    top: 20px;
    min-width: 166px;
    padding: 15px 18px 16px;
    border-radius: 12px;
    color: #071638;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 40px rgba(2, 12, 35, 0.24);
    transform: rotate(-2deg);
  }

  .access-stock-card strong,
  .access-stock-card span {
    display: block;
  }

  .access-stock-card strong {
    font-size: 22px;
    font-weight: 950;
  }

  .access-stock-card span {
    margin-top: 2px;
    color: #52627a;
    font-size: 11px;
    font-weight: 800;
  }

  .access-stock-card::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 15px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eaf2ff;
  }

  .access-pallet {
    left: 0;
    bottom: 42px;
    width: 154px;
    height: 138px;
    border-radius: 14px;
    background:
      linear-gradient(90deg, transparent 0 12px, rgba(0, 0, 0, 0.1) 12px 14px, transparent 14px),
      linear-gradient(180deg, #f1bd72 0 38px, #d8943f 38px 42px, #e4a851 42px 82px, #b9792f 82px 86px, #ca8637 86px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  }

  .access-pallet::before {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -13px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, #965f28 0 28%, transparent 28% 38%, #965f28 38% 66%, transparent 66% 76%, #965f28 76%);
  }

  .access-scan-card {
    right: 2px;
    bottom: 34px;
    min-width: 184px;
    padding: 14px 17px 16px;
    border-radius: 14px;
    color: #071638;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 42px rgba(2, 12, 35, 0.24);
  }

  .access-scan-card strong {
    display: block;
    margin-bottom: 9px;
    font-size: 12px;
  }

  .access-scan-card span {
    display: block;
    height: 42px;
    background:
      repeating-linear-gradient(90deg, #071638 0 2px, transparent 2px 6px, #071638 6px 8px, transparent 8px 13px),
      linear-gradient(#ef1736 0 0) center / 100% 2px no-repeat;
  }

  .access-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 820px;
    margin-top: auto;
    padding-bottom: 24px;
  }

  .access-benefits article {
    position: relative;
    min-height: 88px;
    padding-left: 82px;
    gap: 5px;
  }

  .access-benefits article::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  }

  .access-benefits article::after {
    content: "";
    position: absolute;
    left: 19px;
    top: 23px;
    width: 26px;
    height: 26px;
    background: #0b63df;
    mask: var(--access-benefit-icon) center / contain no-repeat;
  }

  .access-benefits article:nth-child(1) {
    --access-benefit-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M21 8l-9-5-9 5 9 5 9-5z'/%3E%3Cpath d='M3 8v8l9 5 9-5V8'/%3E%3Cpath d='M12 13v8'/%3E%3C/g%3E%3C/svg%3E");
  }

  .access-benefits article:nth-child(2) {
    --access-benefit-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 2v4M12 18v4M2 12h4M18 12h4'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/g%3E%3C/svg%3E");
  }

  .access-benefits article:nth-child(3) {
    --access-benefit-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h11v10H3z'/%3E%3Cpath d='M14 10h4l3 3v4h-7z'/%3E%3Ccircle cx='7' cy='19' r='2'/%3E%3Ccircle cx='18' cy='19' r='2'/%3E%3C/g%3E%3C/svg%3E");
  }

  .access-benefits strong {
    color: #ffffff;
    font-size: 18px;
    line-height: 1.1;
  }

  .access-benefits span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.35;
  }

  .access-card {
    align-self: start;
    width: min(526px, calc(100% - 80px));
    min-height: 770px;
    margin: 156px auto 0;
    padding: 60px 56px 44px;
    border: 1px solid rgba(214, 224, 238, 0.92);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 34px 86px rgba(7, 22, 56, 0.18);
    backdrop-filter: blur(16px);
  }

  .access-card-title {
    min-height: auto;
    display: grid;
    justify-items: center;
    gap: 12px;
    margin-bottom: 34px;
    border: 0;
    background: transparent;
    text-align: center;
  }

  .access-card-title h2 {
    font-size: 34px;
    line-height: 1.05;
    font-weight: 920;
    color: #071638;
  }

  .access-card-title::after {
    content: "Accede a tu cuenta de WMS DAMASA";
    color: #52627a;
    font-size: 16px;
    font-weight: 650;
  }

  .access-user-icon {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #eef5ff;
    color: #0b63df;
    mask: none;
    position: relative;
  }

  .access-user-icon::before {
    content: "";
    position: absolute;
    inset: 22px;
    background: currentColor;
    mask:
      linear-gradient(#000 0 0) center 58% / 58% 45% no-repeat,
      radial-gradient(circle at 50% 38%, transparent 0 31%, #000 32% 48%, transparent 49%);
  }

  .access-card label:not(.access-remember) {
    gap: 10px;
    margin: 24px 0 0;
    color: #071638;
    font-size: 14px;
    font-weight: 850;
  }

  .access-input {
    grid-template-columns: 46px minmax(0, 1fr) 44px;
    min-height: 54px;
    border: 1px solid #d5deeb;
    border-radius: 9px;
    background: #ffffff;
    overflow: hidden;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
  }

  .access-input:focus-within {
    border-color: #0b63df;
    box-shadow: 0 0 0 4px rgba(11, 99, 223, 0.12);
  }

  .access-input input {
    min-height: 52px;
    padding: 0 8px 0 0;
    font-size: 15px;
    font-weight: 750;
  }

  .access-field-icon {
    order: -1;
    width: 21px;
    height: 21px;
    color: #6b7890;
  }

  .access-error {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff1f3;
  }

  .access-remember {
    margin: 20px 0 30px;
    color: #263653;
    font-size: 14px;
    font-weight: 650;
  }

  .access-submit {
    width: 100%;
    height: 66px;
    margin: 0 0 26px;
    border-radius: 13px;
    background: linear-gradient(135deg, #ef1736, #d60927);
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 18px 34px rgba(239, 23, 54, 0.28);
  }

  .access-submit::after {
    content: "->";
    margin-left: 18px;
  }

  .access-submit:hover {
    background: linear-gradient(135deg, #f32543, #c90824);
  }

  .access-card::after {
    content: "Acceso seguro para operadores y administradores";
    display: block;
    margin-top: 24px;
    padding-top: 26px;
    border-top: 1px solid #e6edf6;
    color: #52627a;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
  }

  .access-remember::after {
    content: "Olvidaste tu clave?";
    margin-left: auto;
    color: #0b63df;
    font-weight: 800;
  }
}

@media (min-width: 981px) and (max-width: 1366px) {
  .access-content {
    grid-template-columns: minmax(700px, 56vw) minmax(420px, 1fr);
    gap: 28px;
  }

  .access-header {
    padding-left: 46px;
  }

  .access-header img {
    width: 162px;
  }

  .access-hero {
    padding: 132px 48px 30px 54px;
    border-radius: 24px 148px 148px 24px;
  }

  .access-hero h1 {
    font-size: 54px;
  }

  .access-tagline {
    font-size: 23px;
  }

  .access-copy {
    max-width: 500px;
    margin-bottom: 12px;
  }

  .access-preview {
    height: 315px;
    margin-bottom: 18px;
  }

  .access-monitor {
    left: 124px;
    top: 50px;
    width: calc(100% - 150px);
    height: 238px;
  }

  .access-pallet {
    width: 128px;
    height: 114px;
    bottom: 38px;
  }

  .access-phone {
    top: 104px;
    right: 0;
  }

  .access-stock-card {
    right: 40px;
  }

  .access-scan-card {
    right: 0;
    bottom: 26px;
  }

  .access-benefits {
    gap: 12px;
    padding-bottom: 10px;
  }

  .access-benefits article {
    padding-left: 70px;
  }

  .access-benefits article::before {
    width: 56px;
    height: 56px;
  }

  .access-benefits article::after {
    left: 16px;
    top: 20px;
    width: 24px;
    height: 24px;
  }

  .access-card {
    width: min(430px, calc(100% - 42px));
    min-height: 640px;
    margin-top: 112px;
    padding: 44px 40px 34px;
  }

  .access-user-icon {
    width: 70px;
    height: 70px;
  }

  .access-card-title {
    margin-bottom: 24px;
  }

  .access-card-title h2 {
    font-size: 28px;
  }

  .access-submit {
    height: 56px;
  }
}

body.auth-ready .access-portal {
  display: none;
}

@media (max-width: 980px) {
  .access-content {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .access-hero {
    min-height: auto;
  }

  .access-card {
    width: min(420px, 100%);
  }
}

@media (max-width: 640px) {
  body.auth-locked {
    overflow: auto;
    background: #ffffff;
  }

  .access-portal {
    min-height: 100vh;
    overflow-x: hidden;
    background: #ffffff;
  }

  .access-header {
    position: absolute;
    z-index: 3;
    top: 46px;
    left: 0;
    width: 100%;
    height: auto;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .access-header img {
    width: min(210px, 54vw);
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.24));
  }

  .access-content {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
  }

  .access-hero {
    position: relative;
    min-height: 68vh;
    padding: 128px 26px 132px;
    overflow: hidden;
    color: #ffffff;
    border-radius: 0 0 44px 44px;
    background:
      radial-gradient(circle at 84% 9%, rgba(16, 105, 230, 0.45) 0 2px, transparent 3px) 0 0 / 18px 18px,
      radial-gradient(circle at 20% 58%, rgba(12, 103, 230, 0.28), transparent 31%),
      linear-gradient(145deg, #04163b 0%, #062b66 48%, #073f8d 100%);
    box-shadow: 0 22px 54px rgba(4, 22, 59, 0.26);
  }

  .access-hero::before {
    content: "";
    position: absolute;
    inset: 42% -42% -12% -28%;
    pointer-events: none;
    opacity: 0.55;
    background: repeating-radial-gradient(circle at 24% 74%, rgba(65, 143, 255, 0.25) 0 1px, transparent 1px 10px);
  }

  .access-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -70px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 18px solid rgba(239, 23, 54, 0.95);
    opacity: 0.96;
  }

  .access-kicker {
    display: none;
  }

  .access-hero h1,
  .access-tagline,
  .access-copy,
  .access-preview {
    position: relative;
    z-index: 1;
  }

  .access-hero h1 {
    max-width: none;
    margin: 0;
    color: #ef1736;
    font-size: clamp(46px, 15vw, 66px);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: 0;
    text-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
  }

  .access-hero h1 span {
    display: inline;
    color: #ffffff;
  }

  .access-tagline {
    margin: 16px 0 0;
    color: #ffffff;
    font-size: clamp(22px, 6.5vw, 31px);
    line-height: 1.12;
    font-weight: 850;
  }

  .access-tagline::after {
    content: "";
    display: block;
    width: 54px;
    height: 5px;
    margin: 18px 0 0;
    border-radius: 999px;
    background: #ef1736;
  }

  .access-copy {
    max-width: 100%;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.42;
  }

  .access-preview {
    display: block;
    width: 100%;
    height: 300px;
    margin: 18px 0 0;
  }

  .access-stock-card {
    display: none;
  }

  .access-pallet,
  .access-scan-card {
    display: block;
    position: absolute;
    z-index: 4;
  }

  .access-pallet {
    left: -8px;
    bottom: 8px;
    width: 114px;
    height: 106px;
    border-radius: 11px;
    background:
      linear-gradient(90deg, transparent 0 10px, rgba(0, 0, 0, 0.1) 10px 12px, transparent 12px),
      linear-gradient(180deg, #f1bd72 0 34px, #d8943f 34px 38px, #e4a851 38px 72px, #b9792f 72px 76px, #ca8637 76px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  }

  .access-pallet::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -12px;
    height: 16px;
    border-radius: 2px;
    background: linear-gradient(90deg, #965f28 0 28%, transparent 28% 38%, #965f28 38% 66%, transparent 66% 76%, #965f28 76%);
  }

  .access-monitor {
    left: 88px;
    top: 28px;
    width: calc(100% - 116px);
    height: 224px;
    border: 0;
    border-radius: 17px;
    background:
      linear-gradient(90deg, #ffffff 0 100%),
      #ffffff;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.32);
  }

  .access-monitor::before {
    content: "Resumen operativo";
    position: absolute;
    left: 56px;
    top: 22px;
    color: #071638;
    font-size: 12px;
    font-weight: 900;
  }

  .access-monitor::after {
    content: "";
    position: absolute;
    right: 18px;
    bottom: 20px;
    width: 142px;
    height: 96px;
    border-radius: 12px;
    background:
      linear-gradient(135deg, transparent 15px, #dfe7f2 16px 38px, transparent 39px),
      linear-gradient(45deg, #eef3fa 0 25%, #dce6f2 25% 50%, #f8fafc 50% 75%, #dce6f2 75%);
    box-shadow: inset 0 0 0 1px #e0e8f3;
  }

  .access-monitor span {
    width: 32px;
    height: 32px;
    margin: 14px 0 0 14px;
    border-radius: 10px;
    background: #f2f6fb;
  }

  .access-monitor div {
    width: 30%;
    height: 56px;
    margin: 48px 0 0 16px;
    display: inline-block;
    border-radius: 10px;
    background: #f8fafc;
    box-shadow: inset 0 0 0 1px #e2eaf5;
  }

  .access-monitor div:nth-child(3) {
    width: 30%;
    margin-left: 8px;
    background: #f8fafc;
  }

  .access-monitor div:nth-child(4) {
    width: 30%;
    margin-left: 8px;
  }

  .access-phone {
    display: none;
  }

  .access-scan-card {
    right: -4px;
    bottom: -18px;
    min-width: 156px;
    padding: 12px 14px 14px;
    border-radius: 14px;
    color: #071638;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 34px rgba(2, 12, 35, 0.24);
  }

  .access-scan-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 900;
  }

  .access-scan-card span {
    display: block;
    height: 42px;
    background:
      repeating-linear-gradient(90deg, #071638 0 2px, transparent 2px 6px, #071638 6px 8px, transparent 8px 13px),
      linear-gradient(#ef1736 0 0) center / 100% 2px no-repeat;
  }

  .access-benefits {
    display: none;
  }

  .access-card {
    position: relative;
    z-index: 5;
    width: calc(100% - 32px);
    margin: -84px auto 20px;
    padding: 34px 28px 28px;
    border: 0;
    border-radius: 34px;
    background: #ffffff;
    box-shadow: 0 -10px 48px rgba(7, 22, 56, 0.16);
    overflow: visible;
  }

  .access-card-title {
    display: none;
  }

  .access-card label:not(.access-remember) {
    gap: 12px;
    margin: 0 0 26px;
    color: #071638;
    font-size: 22px;
    font-weight: 900;
  }

  .access-card label:not(.access-remember) + label {
    margin-top: 4px;
  }

  .access-input {
    grid-template-columns: 50px minmax(0, 1fr) 40px;
    min-height: 62px;
    border: 1px solid #d4deea;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
  }

  .access-input:focus-within {
    border-color: #0b63df;
    box-shadow: 0 0 0 4px rgba(11, 99, 223, 0.12);
  }

  .access-input input {
    min-height: 60px;
    padding: 0 10px 0 0;
    color: #071638;
    font-size: 20px;
    font-weight: 760;
  }

  .access-input input::placeholder {
    color: #8a96ad;
  }

  .access-field-icon {
    order: -1;
    width: 24px;
    height: 24px;
    color: #64748b;
    align-self: center;
    justify-self: center;
  }

  .access-card label:nth-of-type(2) .access-input:not(:has(.password-toggle))::after {
    content: "";
    width: 24px;
    height: 24px;
    align-self: center;
    justify-self: center;
    background: #64748b;
    mask: radial-gradient(ellipse at center, transparent 0 20%, #000 21% 28%, transparent 29%), radial-gradient(ellipse at center, #000 0 54%, transparent 55%);
  }

  .access-error {
    margin: -8px 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff0f3;
    color: #ef1736;
    font-size: 14px;
  }

  .access-remember {
    margin: -4px 0 26px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #071638;
    font-size: 18px;
    font-weight: 760;
  }

  .access-remember input {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    accent-color: #0b63df;
  }

  .access-remember::after {
    content: "Olvidaste tu clave?";
    margin-left: auto;
    color: #0b63df;
    font-weight: 850;
    white-space: nowrap;
  }

  .access-submit {
    width: 100%;
    height: 70px;
    margin: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, #ef1736 0%, #d60927 100%);
    color: #ffffff;
    font-size: 24px;
    font-weight: 950;
    box-shadow: 0 18px 32px rgba(239, 23, 54, 0.26);
  }

  .access-submit::after {
    content: "->";
    float: right;
    margin-right: 12px;
  }

  .access-card::after {
    content: "Acceso seguro para operadores y administradores";
    display: block;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #e8eef6;
    color: #52627a;
    font-size: 16px;
    font-weight: 760;
    text-align: center;
  }
}

/* Sidebar compact navigation */
.sidebar {
  padding: 0 12px 30px;
  gap: 8px;
}

.brand {
  height: auto;
  min-height: 94px;
  padding: 12px 8px 8px;
  gap: 6px;
}

.brand-logo {
  width: 122px;
  height: 70px;
}

.brand span {
  font-size: 10px;
}

.sidebar-user {
  min-height: 34px;
  margin: 0 -12px 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 11, 36, 0.22);
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
}

.sidebar-user span {
  font-weight: 700;
}

.sidebar-user strong {
  font-weight: 900;
}

.menu-tree {
  gap: 7px;
  margin-top: 0;
}

.menu-group {
  gap: 0;
}

.menu-group-title {
  height: 42px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 8px;
  gap: 10px;
  font-size: 12px;
  line-height: 1;
}

.menu-group.active > .menu-group-title,
.menu-group.open > .menu-group-title,
.menu-group-title:hover {
  background: #ef1736;
  box-shadow: 0 9px 18px rgba(239, 23, 54, 0.2);
}

.menu-group-direct .menu-group-title {
  cursor: pointer;
  background: transparent;
  box-shadow: none;
}

.menu-group-direct .menu-group-title.active {
  background: transparent;
  box-shadow: none;
}

.menu-group-direct .menu-group-title:hover {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.menu-icon {
  width: 21px;
  height: 21px;
}

.menu-icon::before {
  width: 17px;
  height: 17px;
}

.menu-arrow {
  width: 16px;
  height: 16px;
}

.menu-arrow::before {
  width: 7px;
  height: 7px;
}

.menu-branch {
  margin: 4px 0 1px 34px;
  gap: 2px;
}

.menu-child {
  min-height: 27px;
  padding: 5px 8px 5px 18px;
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.1;
}

.nav-tab:hover,
.nav-tab.active {
  background: rgba(255, 255, 255, 0.12);
}

.menu-icon-reports {
  --dm-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5'/%3E%3Cpath d='M20 19H4'/%3E%3Cpath d='M8 16V9'/%3E%3Cpath d='M13 16V6'/%3E%3Cpath d='M18 16v-4'/%3E%3C/g%3E%3C/svg%3E");
}

.menu-icon-account {
  --dm-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='8' r='4'/%3E%3Cpath d='M14 14l6 6'/%3E%3Cpath d='M18 18l2-2'/%3E%3Cpath d='M15 21l2-2'/%3E%3C/g%3E%3C/svg%3E");
}

.menu-icon-personal {
  --dm-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/g%3E%3C/svg%3E");
}

@media (max-width: 1366px) and (min-width: 981px) {
  :root {
    --dm-topbar-height: 92px;
    --dm-work-x: 18px;
    --dm-work-top: 14px;
    --dm-work-bottom: 16px;
  }

  .app-shell {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 10px;
  }

  .brand {
    min-height: 76px;
    padding-top: 8px;
  }

  .brand-logo {
    width: 104px;
    height: 58px;
  }

  .topbar {
    padding-inline: var(--dm-work-x);
  }

  #refreshBtn {
    width: 108px;
    height: 44px;
    min-height: 44px;
  }
}
