/* TRIMR unified login presentation layer.
   Authentication remains two separate server-side flows: /login and /abra-login. */

body.auth-unified-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(55, 65, 160, .10), transparent 34rem),
    linear-gradient(180deg, #f7f8fc 0%, #eef2f8 100%);
}

.auth-unified-card {
  width: min(680px, calc(100vw - 32px));
  margin-left: auto;
  margin-right: auto;
  border: 1px solid #d8dfeb !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 55px rgba(19, 34, 68, .10) !important;
  overflow: hidden;
}

.auth-unified-card > h1:first-of-type,
.auth-unified-card > h2:first-of-type {
  margin-bottom: 8px;
}

.auth-flow-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px 0 24px;
}

.auth-flow-step {
  min-height: 94px;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  padding: 14px 15px;
  background: #f9fafc;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.auth-flow-step.is-active {
  border-color: #3d46aa;
  background: #f2f3ff;
  box-shadow: inset 0 0 0 1px rgba(61, 70, 170, .08);
}

.auth-flow-step.is-done {
  border-color: #b9d7c4;
  background: #f4fbf6;
}

.auth-flow-step.is-pending {
  opacity: .72;
}

.auth-flow-logo {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid #dce2ec;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.auth-flow-logo.trimr-wordmark {
  color: #3038a7;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .3px;
}

.auth-flow-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

.auth-flow-kicker {
  font-size: 12px;
  color: #667085;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}

.auth-flow-title {
  font-size: 16px;
  font-weight: 800;
  color: #101828;
}

.auth-flow-state {
  margin-top: 4px;
  font-size: 12px;
  color: #667085;
}

.auth-flow-step.is-active .auth-flow-state {
  color: #3038a7;
  font-weight: 700;
}

.auth-flow-step.is-done .auth-flow-state {
  color: #237a46;
  font-weight: 700;
}

.auth-context-banner {
  margin: -2px 0 18px;
  padding: 13px 15px;
  border-radius: 12px;
  border-left: 4px solid #3d46aa;
  background: #f5f6ff;
  color: #344054;
}

.auth-context-banner strong {
  color: #101828;
  display: block;
  margin-bottom: 3px;
}

.auth-context-banner.is-abra {
  border-left-color: #1769aa;
  background: #f2f8fd;
}

.auth-unified-card form button[type="submit"],
.auth-unified-card form input[type="submit"] {
  min-height: 44px;
  font-weight: 800;
}

@media (max-width: 650px) {
  .auth-flow-map {
    grid-template-columns: 1fr;
  }
  .auth-flow-step {
    min-height: 82px;
  }
}

/* AUTH_HIERARCHY_V3
   Active identity is the only large primary card.
   Pending/completed identity is intentionally compact and subdued.
   Presentation only; authentication behavior is unchanged. */

.auth-flow-map {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

.auth-flow-step {
  width: 100%;
  box-sizing: border-box;
  transition:
    opacity .16s ease,
    border-color .16s ease,
    background-color .16s ease,
    box-shadow .16s ease,
    min-height .16s ease,
    padding .16s ease;
}

.auth-flow-step.is-active {
  min-height: 124px;
  padding: 20px 22px;
  opacity: 1;
  border: 2px solid #3038a7;
  border-left-width: 7px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f4ff 56%, #eaecff 100%);
  box-shadow:
    0 14px 34px rgba(48, 56, 167, .18),
    inset 0 0 0 1px rgba(48, 56, 167, .05);
}

.auth-flow-step.is-active .auth-flow-logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border-color: #aeb4ef;
  box-shadow: 0 6px 16px rgba(48, 56, 167, .13);
}

.auth-flow-step.is-active .auth-flow-kicker {
  color: #3038a7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
}

.auth-flow-step.is-active .auth-flow-title {
  color: #11165f;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 900;
  margin-top: 2px;
}

.auth-flow-step.is-active .auth-flow-state {
  margin-top: 7px;
  color: #3038a7;
  font-size: 13px;
  font-weight: 800;
}

.auth-flow-step.is-pending,
.auth-flow-step.is-done {
  min-height: 56px;
  padding: 9px 12px;
  opacity: .34;
  border: 1px dashed #cfd5df;
  background: rgba(248, 249, 252, .72);
  box-shadow: none;
  transform: scale(.985);
  transform-origin: center;
}

.auth-flow-step.is-pending .auth-flow-logo,
.auth-flow-step.is-done .auth-flow-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  filter: grayscale(.55);
  opacity: .76;
  box-shadow: none;
}

.auth-flow-step.is-pending .auth-flow-kicker,
.auth-flow-step.is-done .auth-flow-kicker {
  font-size: 10px;
  color: #98a2b3;
  margin-bottom: 1px;
}

.auth-flow-step.is-pending .auth-flow-title,
.auth-flow-step.is-done .auth-flow-title {
  color: #667085;
  font-size: 13px;
  font-weight: 750;
}

.auth-flow-step.is-pending .auth-flow-state,
.auth-flow-step.is-done .auth-flow-state {
  margin-top: 2px;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 600;
}

.auth-flow-step.is-done::after {
  content: "✓";
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  background: #e8f4ec;
  color: #237a46;
  opacity: .9;
}

.auth-flow-step.is-pending::after {
  content: "další krok";
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Home approval is a normal app tile, not a separate banner. */
.approval-home-tile {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  min-height: 100%;
}

.approval-home-tile .approval-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  margin: 0;
}

.approval-home-tile .approval-home-icon {
  display: none !important;
}

@media (max-width: 650px) {
  .auth-flow-step.is-active {
    min-height: 108px;
    padding: 16px;
  }

  .auth-flow-step.is-active .auth-flow-logo {
    width: 60px;
    height: 60px;
  }

  .auth-flow-step.is-active .auth-flow-title {
    font-size: 18px;
  }

  .auth-flow-step.is-pending::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-flow-step {
    transition: none;
  }
}


/* Unified single-login provider explanation and explicit retry choice. */
.login-provider-guide {
  margin: 12px 0 18px;
  border: 1px solid #d9dff2;
  border-radius: 12px;
  padding: 13px 15px;
  background: #f7f8ff;
}
.login-provider-guide-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 7px 0;
}
.login-provider-guide-row + .login-provider-guide-row {border-top: 1px solid #e0e4f0;}
.login-provider-guide-row > strong {flex: 0 0 40%;}
.login-provider-guide-row span {flex: 1;}
.login-provider-guide-note {margin: 8px 0 0; font-size: .88rem; color: #586579;}
.login-method-choice {border-left: 4px solid #3744a6; padding: 10px 14px; background: #f7f8ff; margin: 12px 0;}
.login-method-choice p {margin: 5px 0 0; font-size: .9rem; color: #4f5f7a;}
.login-method-actions {display: grid; grid-template-columns: 1fr 1fr; gap: 10px;}
.login-method-actions button {width: 100%; white-space: normal; min-height: 48px;}
@media(max-width: 540px) {
  .login-provider-guide-row {display: block;}
  .login-provider-guide-row > strong {display: block; padding-bottom: 3px;}
  .login-method-actions {grid-template-columns: 1fr;}
}
