.primary-button,
.text-button-link,
.workspace-signout {
  text-decoration: none;
}

.text-button-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.workspace-signout {
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 40px;
  color: var(--text-secondary);
  border-radius: 5px;
  padding: 10px 16px;
}

.workspace-signout:hover,
.workspace-signout:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  outline: none;
}

.workspace-sidebar nav form,
.workspace-sidebar nav button {
  width: 100%;
}

.client-selector {
  margin-top: 1rem;
}

.client-selector label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.client-selector select {
  width: 100%;
  border: 1px solid rgba(196, 196, 196, 0.28);
  background: rgba(9, 13, 27, 0.92);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.error-page {
  min-height: 100svh;
}

.error-shell {
  width: min(620px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(64px, 11vh, 120px) 0;
}

.error-code {
  border: 1px solid var(--danger);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--danger);
  margin-bottom: 24px;
  font-size: 1.5rem;
  font-weight: 800;
}

.error-shell h1 {
  width: 132%;
  margin-right: -32%;
}

.error-return {
  width: min(100%, 360px);
  margin-top: 34px;
}

.request-id {
  color: var(--text-muted);
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: .72rem;
}

@media (width <= 840px) {
  .workspace-sidebar nav form {
    flex: 0 0 auto;
  }

  .workspace-sidebar nav button {
    min-width: max-content;
  }
}

.powerbi-page { height: 100svh; background: var(--canvas-deep); overflow: hidden; }
.powerbi-stage { height: calc(100svh - 80px); position: relative; background: #fff; }
.powerbi-report, .powerbi-report iframe { width: 100%; height: 100%; border: 0; }
.powerbi-status { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-secondary); background: var(--canvas); }
.mobile-report-hint { display: none; }
.topbar-client-selector { display: flex; align-items: center; gap: 8px; }
.topbar-client-selector label { color: var(--text-muted); text-transform: uppercase; letter-spacing: .12em; font-size: .65rem; }
.topbar-client-selector select { min-height: 40px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); padding: 0 32px 0 12px; }
.topbar-client-selector select:focus-visible { border-color: var(--cyan); outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (width <= 560px) {
  .workspace-topbar { padding-inline: 16px; }
  .workspace-client, .account-email, .status-divider { display: none; }
  .wordmark { font-size: 1.05rem; }
  .topbar-client-selector label { display: none; }
  .topbar-client-selector select { max-width: 150px; }
}

@media (width <= 840px) and (orientation: portrait) {
  .powerbi-page {
    height: auto;
    min-height: 100svh;
    overflow: hidden;
    background: var(--canvas-deep);
  }

  .workspace-topbar {
    height: 64px;
    padding-inline: 16px;
  }

  .workspace-account {
    gap: 8px;
  }

  .workspace-client,
  .account-email,
  .status-divider {
    display: none;
  }

  .brand-logo {
    width: 120px;
  }

  .brand-portal-label,
  .topbar-client-selector label {
    display: none;
  }

  .topbar-client-selector select {
    width: 100px;
    max-width: 100px;
    min-height: 36px;
    padding-inline: 8px 24px;
    font-size: 0.75rem;
  }

  .workspace-signout {
    min-height: 36px;
    padding: 8px 10px;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .powerbi-stage {
    height: calc(56.25vw + 56px);
    min-height: 250px;
    max-height: 380px;
  }

  .mobile-report-hint {
    min-height: calc(100svh - 64px - 56.25vw - 56px);
    padding: 32px 24px 40px;
    color: var(--text-secondary);
    background: linear-gradient(180deg, #0d1426, var(--canvas-deep));
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    text-align: center;
    display: flex;
  }

  .mobile-report-hint strong {
    color: var(--text);
    font-family: "Archivo", Helvetica, Arial, sans-serif;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .mobile-report-hint > span:last-child {
    font-size: 0.86rem;
  }

  .rotate-phone {
    width: 28px;
    height: 42px;
    margin-bottom: 10px;
    border: 2px solid var(--text-secondary);
    border-radius: 5px;
    position: relative;
    transform: rotate(-18deg);
  }

  .rotate-phone::before {
    content: "";
    width: 8px;
    height: 2px;
    border-radius: 2px;
    background: var(--text-secondary);
    position: absolute;
    bottom: 4px;
    left: 8px;
  }

  .rotate-phone::after {
    content: "";
    width: 52px;
    height: 52px;
    border: 1px solid rgba(196, 196, 196, 0.45);
    border-left-color: transparent;
    border-radius: 50%;
    position: absolute;
    inset: -7px auto auto -14px;
  }
}

@media (width <= 960px) and (orientation: landscape) {
  .powerbi-page {
    height: 100svh;
    overflow: hidden;
  }

  .workspace-topbar {
    height: 56px;
    padding-inline: 16px;
  }

  .brand-logo {
    width: 135px;
  }

  .brand-portal-label,
  .workspace-client,
  .account-email,
  .status-divider,
  .topbar-client-selector label {
    display: none;
  }

  .workspace-account {
    gap: 8px;
  }

  .topbar-client-selector select,
  .workspace-signout {
    min-height: 36px;
  }

  .powerbi-stage {
    height: calc(100svh - 56px);
    min-height: 0;
  }

  .mobile-report-hint {
    display: none;
  }
}

/* Tektrans brand system: Lato headings/body, Archivo accents, navy and silver palette. */
:root {
  --canvas: #090d1b;
  --canvas-deep: #090d1b;
  --surface: #162041;
  --surface-raised: #162041;
  --grid-line: rgba(196, 196, 196, 0.08);
  --border: #233367;
  --border-strong: #909292;
  --cyan: #c4c4c4;
  --cyan-hover: #ffffff;
  --cyan-pressed: #aaabab;
  --teal: #c4c4c4;
  --text: #f4f4f4;
  --text-secondary: #c4c4c4;
  --text-muted: #909292;
}

body,
button,
input,
select {
  font-family: "Lato", Arial, sans-serif;
}

h1,
.workspace-heading h2 {
  width: auto;
  max-width: 620px;
  margin-right: 0;
  font-family: "Lato", Helvetica, Arial, sans-serif;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transform: none;
}

.eyebrow,
.brand-portal-label,
.access-form label,
.primary-button,
.topbar-client-selector,
.workspace-account {
  font-family: "Archivo", Helvetica, Arial, sans-serif;
}

.error-shell h1 {
  width: auto;
  margin-right: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(180px, 17vw, 250px);
  height: auto;
}

.brand-portal-label {
  border-left: 1px solid var(--border-strong);
  padding-left: 16px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar,
.workspace-topbar {
  background: #000;
}

@media (width <= 560px) {
  .brand-logo { width: 145px; }
  .brand-portal-label { display: none; }
}

/* Responsive public-page artwork. The desktop view keeps the split layout;
   smaller screens use a compact banner so the sign-in form remains easy to use. */
.hero-panel {
  min-width: 0;
  height: calc(100svh - 142px);
  min-height: 0;
  margin: 26px 26px 26px 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(144, 146, 146, 0.62);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: inset 0 0 70px rgba(9, 13, 27, 0.18), 0 28px 80px rgba(0, 0, 0, 0.34);
}

.hero-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 63% center;
  filter: saturate(0.96) contrast(1.05) brightness(0.9);
}

.hero-vignette {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 13, 27, 0.42), transparent 38%),
    linear-gradient(0deg, rgba(9, 13, 27, 0.3), transparent 48%);
  box-shadow: inset 0 0 90px 10px rgba(3, 6, 15, 0.42);
}

.hero-corner {
  pointer-events: none;
  width: 55px;
  height: 55px;
  position: absolute;
}

.hero-corner-a {
  top: 18px;
  left: 18px;
  border-top: 1px solid rgba(196, 196, 196, 0.72);
  border-left: 1px solid rgba(196, 196, 196, 0.72);
}

.hero-corner-b {
  right: 18px;
  bottom: 18px;
  border-right: 1px solid rgba(196, 196, 196, 0.72);
  border-bottom: 1px solid rgba(196, 196, 196, 0.72);
}

@media (width <= 840px) {
  .access-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 78px);
  }

  .hero-panel {
    order: -1;
    flex: 0 0 clamp(190px, 32svh, 300px);
    width: 100%;
    height: clamp(190px, 32svh, 300px);
    min-height: 190px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    box-shadow: inset 0 0 60px rgba(3, 6, 15, 0.28);
  }

  .hero-panel img {
    object-position: 68% 61%;
  }

  .hero-vignette {
    background: linear-gradient(0deg, rgba(9, 13, 27, 0.72), transparent 58%);
    box-shadow: none;
  }

  .hero-corner {
    display: none;
  }

  .access-panel {
    min-height: auto;
    padding: 40px 28px 48px;
  }

  .access-panel::before,
  .access-panel::after {
    display: none;
  }

  .access-content {
    width: min(100%, 560px);
  }

  h1 {
    font-size: clamp(2.9rem, 11.5vw, 4.65rem);
  }
}

@media (width <= 560px) {
  .hero-panel {
    flex-basis: clamp(175px, 28svh, 230px);
    height: clamp(175px, 28svh, 230px);
    min-height: 175px;
  }

  .access-panel {
    padding: 32px 20px 42px;
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 3.8rem);
    line-height: 0.98;
  }

  .intro {
    font-size: 1rem;
  }

  .access-form {
    margin-top: 28px;
  }

  .access-form input,
  .primary-button {
    min-height: 56px;
    height: 56px;
  }

  .trust-line {
    display: grid;
    grid-template-columns: 30px 1fr 30px;
    gap: 5px 12px;
    white-space: normal;
  }

  .trust-line i {
    display: none;
  }

  .trust-line > span:not(.shield):not(.trust-check) {
    grid-column: 2;
  }

  .trust-line .shield,
  .trust-line .trust-check {
    grid-row: 1 / 4;
    align-self: center;
  }

  .trust-line .shield {
    grid-column: 1;
  }

  .trust-line .trust-check {
    grid-column: 3;
    margin-left: 0;
  }
}

/* Final dashboard-only sizing overrides after the public-page rules. */
@media (width <= 840px) and (orientation: portrait) {
  .powerbi-page .brand-logo { width: 120px; }
}

@media (width <= 960px) and (orientation: landscape) {
  .powerbi-page .brand-logo { width: 135px; }
}
