.module-shell {
  margin: 0;
  overflow: hidden;
  background: #02090d;
}

.module-shell iframe {
  display: block;
  width: 100%;
  height: 100vh;
  border: 0;
  background: #02090d;
}

.form-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.form-grid.compact .span-2 {
  grid-column: span 2;
}

.form-grid.compact .span-3 {
  grid-column: span 3;
}

.field-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.field-action button {
  height: 44px;
}

.dialog.compact {
  width: min(880px, calc(100% - 30px));
}

.dialog.compact .dialog-body {
  padding: 19px;
}

.currency {
  text-align: right;
}

.brand.logo-full {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 22px;
}

.brand.logo-full img {
  width: 160px;
  height: 112px;
  object-fit: contain;
}

.login-card.login-wide {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr);
  padding: 0;
  overflow: hidden;
}

.login-brand {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 470px;
  padding: 38px;
  text-align: center;
  background: radial-gradient(circle, rgba(124, 242, 0, .12), transparent 58%), #041116;
  border-right: 1px solid var(--line);
}

.login-brand img {
  width: min(260px, 100%);
  max-height: 270px;
  object-fit: contain;
}

.login-brand p {
  margin: 8px 0 0;
  color: var(--muted);
}

.login-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px;
}

.login-form-side h1 {
  font-size: 2.2rem;
  margin: 6px 0;
}

.portal-header {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: #041016;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-logo {
  display: block;
  flex: 0 0 auto;
}

.header-logo img {
  display: block;
  width: 132px;
  height: 84px;
  object-fit: contain;
}

.header-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  text-align: right;
}

.header-user div {
  display: grid;
  margin-right: 6px;
}

.header-user small {
  color: var(--green);
  font-weight: 900;
  letter-spacing: .12em;
}

.portal-content {
  width: min(1380px, 100%);
  margin: 0 auto;
  padding: 30px clamp(18px, 4vw, 52px) 60px;
}

.portal-content,
.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.portal-header+.portal-content {
  min-height: calc(100vh - 112px);
}

.portal-content>section>h1 {
  margin: 0;
  font-size: 2.2rem;
}

.portal-content #cliente-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.station-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
}

.horizontal-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.horizontal-nav button {
  white-space: nowrap;
}

.disclosure {
  padding: 0;
  overflow: hidden;
}

.disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary span:first-child {
  display: grid;
  gap: 5px;
}

.disclosure summary b {
  font-size: 1.35rem;
}

.disclosure summary small {
  color: var(--muted);
  font-weight: 500;
}

.disclosure-icon {
  color: var(--green);
  font-size: 1.7rem;
  transition: transform .2s ease;
}

.disclosure[open] .disclosure-icon {
  transform: rotate(180deg);
}

.disclosure-content {
  padding: 4px 20px 22px;
  border-top: 1px solid var(--line);
}

.portal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  margin-top: auto;
  padding: 22px 0 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

.login-footer {
  min-height: 58px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: #041016;
}

.login-shell:has(+ .login-footer) {
  min-height: calc(100vh - 58px);
}

.operation-mode-panel { border-color: #315667; background: linear-gradient(135deg, #0b2530, #081a22); }
.operation-mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 12px; align-items: stretch; }
.operation-mode-options label { position: relative; display: block; cursor: pointer; }
.operation-mode-options input { position: absolute; opacity: 0; pointer-events: none; }
.operation-mode-options label span { display: grid; gap: 5px; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #06151c; transition: .18s ease; }
.operation-mode-options label b { color: var(--text); font-size: 1rem; }
.operation-mode-options label small { color: var(--muted); font-weight: 500; }
.operation-mode-options input:checked+span { border-color: var(--green); box-shadow: 0 0 0 3px #79ff0018; background: #10281b; }
.operation-mode-options button { align-self: center; }

@media (max-width: 760px) {
  .form-grid.compact {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid.compact .span-3 {
    grid-column: span 2;
  }

  .login-card.login-wide {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 22px;
  }

  .login-brand img {
    width: 170px;
    height: 160px;
  }

  .login-form-side {
    padding: 30px;
  }

  .portal-header,
  .station-header {
    position: static;
    display: flex;
    flex-wrap: wrap;
    min-height: auto;
    padding: 12px 16px;
  }

  .header-logo img {
    width: 100px;
    height: 65px;
  }

  .horizontal-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .portal-content #cliente-cards {
    grid-template-columns: 1fr;
  }

  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .operation-mode-options { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .form-grid.compact {
    grid-template-columns: 1fr;
  }

  .form-grid.compact .span-2,
  .form-grid.compact .span-3 {
    grid-column: auto;
  }

  .field-action {
    grid-template-columns: 1fr;
  }
}
