/* isoGo login (isogo=2) — layout screen Sandvik */
.isogo-login {
  --ig-navy: #001a4d;
  --ig-teal: #005b5c;
  --ig-blue: #0057a8;
  --ig-blue-hover: #004889;
  --ig-text: #1a2332;
  --ig-muted: #5a6577;
  --ig-line: #e4e8ee;
  --ig-field: #f3f5f8;
  --ig-radius: 14px;
  position: fixed;
  inset: 0;
  z-index: 1000;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  color: var(--ig-text);
  overflow: hidden;
  background: #0b1a28;
}

.isogo-login * { box-sizing: border-box; }

.isogo-login__stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

.isogo-login__hero {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.isogo-login__hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.28) 42%, rgba(255,255,255,0.08) 62%, transparent 78%),
    linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 28%, transparent 72%, rgba(10,20,30,0.35) 100%);
  pointer-events: none;
}

/* Top bar */
.isogo-login__topbar {
  position: absolute;
  top: 18px;
  left: 28px;
  right: 28px;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.isogo-login__topbar-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.isogo-login__sandvik {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0057a8;
  background: rgba(255,255,255,0.92);
  padding: 6px 14px;
  min-width: 128px;
}

.isogo-login__sandvik span {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: #0057a8;
  line-height: 1;
}

.isogo-login__powered {
  margin: 0;
  font-size: 12px;
  color: #2a3344;
  padding-left: 2px;
}

.isogo-login__powered strong {
  font-weight: 700;
  color: var(--ig-navy);
}

.isogo-login__topbar-chip { display: none !important; }

.isogo-login__chip-site,
.isogo-login__chip-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.isogo-login__chip-site > i:first-child,
.isogo-login__chip-user > i:last-child,
.isogo-login__chip-site > i:last-child {
  color: #6b778c;
  font-size: 16px;
  flex-shrink: 0;
}

.isogo-login__chip-site > i:first-child {
  font-size: 20px;
  color: #3d4a5c;
}

.isogo-login__chip-site div,
.isogo-login__chip-user div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.isogo-login__chip-site strong,
.isogo-login__chip-user strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--ig-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.isogo-login__chip-site span,
.isogo-login__chip-user span {
  font-size: 10px;
  color: var(--ig-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.isogo-login__chip-bell {
  position: relative;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #3d4a5c;
  font-size: 18px;
  flex-shrink: 0;
  cursor: default;
}

.isogo-login__chip-bell em {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #22a06b;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.isogo-login__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dfe7f2;
  color: #0057a8;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Hero copy — aligné screen 2 */
.isogo-login__hero-copy {
  position: absolute;
  left: 72px;
  top: 28%;
  z-index: 3;
  width: min(560px, calc(100% - 460px));
  max-width: 580px;
  pointer-events: none;
}

.isogo-login__headline {
  margin: 0 0 14px;
  font-size: clamp(34px, 3.8vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #1a2332;
}

.isogo-login__headline span {
  color: #007a6e;
}

.isogo-login__lede {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #3a4558;
  max-width: 460px;
}

/* 3 volets — rangée bas, décalés à droite, plus visibles */
.isogo-login__pillars {
  position: absolute;
  left: 120px;
  right: auto;
  bottom: 52px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(680px, calc(100% - 440px));
  gap: 12px 28px;
  pointer-events: none;
}

.isogo-login__pillar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.isogo-login__pillar-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: rgba(0, 40, 60, 0.35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

.isogo-login__pillar-icon svg {
  display: block;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

.isogo-login__pillar-txt {
  min-width: 0;
}

.isogo-login__pillar-txt strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.65), 0 0 1px rgba(0,0,0,0.8);
  margin-bottom: 4px;
  line-height: 1.2;
}

.isogo-login__pillar-txt span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 2px 5px rgba(0,0,0,0.6), 0 0 1px rgba(0,0,0,0.7);
}

/* Panel right */
.isogo-login__panel {
  position: absolute;
  top: 50%;
  right: 36px;
  transform: translateY(-50%);
  z-index: 4;
  width: min(400px, calc(100vw - 48px));
  background: #fff;
  border-radius: var(--ig-radius);
  box-shadow: 0 20px 60px rgba(15, 30, 50, 0.22);
  padding: 20px 28px 22px;
  display: flex;
  flex-direction: column;
}

.isogo-login__panel-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.isogo-login__lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ig-muted);
  font-size: 13px;
}

.isogo-login__lang i { font-size: 15px; }

.isogo-login__lang select {
  border: 0;
  background: transparent;
  color: var(--ig-text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  outline: none;
}

.isogo-login__brand-block {
  text-align: center;
  margin: 4px 0 8px;
}

.isogo-login__logo-img {
  display: inline-block;
  line-height: 0;
}

.isogo-login__logo-img img {
  width: min(240px, 78%);
  height: auto;
  display: block;
  margin: 0 auto;
}

.isogo-login__welcome {
  text-align: center;
  margin: 6px 0 18px;
}

.isogo-login__welcome h2 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 800;
  color: var(--ig-text);
  letter-spacing: -0.02em;
}

.isogo-login__welcome p {
  margin: 0;
  font-size: 13px;
  color: var(--ig-muted);
}

.isogo-login__welcome #mahome_tachycentre {
  margin-top: 8px;
  font-size: 13px;
}

.isogo-login__form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.isogo-login__field-group {
  margin-bottom: 14px;
}

.isogo-login__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ig-text);
}

.isogo-login__field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ig-field);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 12px;
  min-height: 46px;
  transition: border-color 0.15s, background 0.15s;
}

.isogo-login__field:focus-within {
  background: #fff;
  border-color: #9eb8d8;
  box-shadow: 0 0 0 3px rgba(0, 87, 168, 0.12);
}

.isogo-login__field > i {
  color: #8a95a8;
  font-size: 18px;
  flex-shrink: 0;
}

.isogo-login__field input {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--ig-text);
  outline: none;
  min-width: 0;
  padding: 10px 0;
}

.isogo-login__field input::placeholder {
  color: #9aa3b2;
}

.isogo-login__eye {
  border: 0;
  background: transparent;
  color: #8a95a8;
  padding: 4px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.isogo-login__forgot {
  display: block;
  text-align: right;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ig-blue);
  text-decoration: none;
}

.isogo-login__forgot:hover { text-decoration: underline; }

.isogo-login__submit {
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  min-height: 46px;
  background: var(--ig-blue);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.isogo-login__submit:hover { background: var(--ig-blue-hover); }

.isogo-login__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: #9aa3b2;
  font-size: 12px;
}

.isogo-login__or::before,
.isogo-login__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ig-line);
}

.isogo-login__ms {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid #d0d7e2;
  background: #fff;
  color: var(--ig-text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.85;
}

.isogo-login__panel-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ig-muted);
}

.isogo-login__panel-foot a {
  color: var(--ig-blue);
  font-weight: 700;
  text-decoration: none;
}

.isogo-login__panel-foot a:hover { text-decoration: underline; }

.isogo-login__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.78);
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  pointer-events: none;
}

/* Hide default ERP chrome on this page if present */
body.auth-page .isogo-login ~ *,
.auth-page-wrapper:has(.isogo-login) {
  /* no-op fallback */
}

@media (max-width: 1100px) {
  .isogo-login__hero-copy {
    width: min(480px, calc(100% - 400px));
    left: 40px;
    top: 24%;
  }
  .isogo-login__pillars {
    left: 72px;
    width: min(600px, calc(100% - 380px));
    gap: 10px 18px;
  }
  .isogo-login__pillar-icon {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 900px) {
  .isogo-login__hero-copy,
  .isogo-login__pillars { display: none; }
  .isogo-login__panel {
    right: 50%;
    transform: translate(50%, -50%);
  }
  .isogo-login__topbar { right: 16px; left: 16px; }
}

@media (max-width: 480px) {
  .isogo-login__panel {
    width: calc(100vw - 24px);
    padding: 16px 18px 18px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .isogo-login__welcome h2 { font-size: 22px; }
  .isogo-login__sandvik span { font-size: 15px; }
}
