/*--------------------------------------------------------------------------
  Auth screens — 2026-07 "Login screen modernization" handoff.
  Split layout: dark navy brand panel (logo, floating case-card graphic,
  copyright) + light form panel with a white card. High-fidelity spec:
  colors, radii, shadows and type sizes below are final — reproduce exactly.
  Served under framework.assets.version — bump it on every edit here.
---------------------------------------------------------------------------*/

/* ── Shell ─────────────────────────────────────────────────────────────── */

.cr-auth {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  font-family: "Public Sans", -apple-system, sans-serif;
  background: #f5f5f9;
}

/* ── Brand panel (left) ────────────────────────────────────────────────── */

.cr-auth-brand-panel {
  flex: 1 1 54%;
  background: linear-gradient(160deg, #2b2f4a 0%, #232741 55%, #1d2138 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  position: relative;
  overflow: hidden;
}

.cr-auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 80% 20%, black, transparent 70%);
  mask-image: radial-gradient(ellipse 80% 70% at 80% 20%, black, transparent 70%);
}

.cr-auth-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.cr-auth-brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.cr-auth-graphic-slot {
  position: relative;
  display: flex;
  justify-content: center;
}

.cr-auth-copyright {
  position: relative;
  font-size: 12.5px;
  color: #6f7499;
}

/* ── Floating case-card graphic ────────────────────────────────────────── */

.cr-auth-cards {
  position: relative;
  width: 340px;
  height: 300px;
}

.cr-auth-fcard {
  position: absolute;
  border-radius: 14px;
  background: linear-gradient(150deg, #343a5c, #2a2f4d);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 40px rgba(10, 12, 30, 0.45);
  padding: 20px;
}

.cr-auth-fcard--back {
  left: 0;
  top: 46px;
  width: 180px;
  height: 200px;
  animation: cr-auth-float-a 7s ease-in-out infinite;
}

.cr-auth-fcard--front {
  left: 96px;
  top: 8px;
  width: 210px;
  height: 230px;
  background: linear-gradient(150deg, #3b4166, #2e3355);
  animation: cr-auth-float-b 6s ease-in-out 0.6s infinite;
}

.cr-auth-fcard--chip {
  left: 34px;
  top: 220px;
  width: 150px;
  height: 58px;
  padding: 14px;
  background: linear-gradient(150deg, #40466e, #33395e);
  animation: cr-auth-float-c 8s ease-in-out 1.2s infinite;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.cr-auth-line {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
}

.cr-auth-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cr-auth-fcard--back .cr-auth-tile {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(105, 108, 255, 0.35);
  margin-bottom: 16px;
}

.cr-auth-fcard--front .cr-auth-fcard-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.cr-auth-check-tile {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #696cff;
  display: grid;
  place-items: center;
  flex: none;
}

.cr-auth-fcard-head-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-auth-line--title {
  height: 9px;
  background: rgba(255, 255, 255, 0.55);
}

.cr-auth-line--sub {
  height: 7px;
  background: rgba(255, 255, 255, 0.18);
}

.cr-auth-fcard--front .cr-auth-lines {
  gap: 11px;
}

.cr-auth-status-bar {
  margin-top: 20px;
  height: 30px;
  border-radius: 8px;
  background: rgba(105, 108, 255, 0.28);
  border: 1px solid rgba(105, 108, 255, 0.45);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

.cr-auth-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8ec97e;
  animation: cr-auth-pulse 2.4s ease-in-out infinite;
}

.cr-auth-status-line {
  height: 7px;
  width: 55%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.35);
}

.cr-auth-chip-tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex: none;
}

.cr-auth-chip-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cr-auth-line--chip-title {
  height: 8px;
  width: 80%;
  background: rgba(255, 255, 255, 0.45);
}

.cr-auth-line--chip-sub {
  height: 6px;
  width: 55%;
  background: rgba(255, 255, 255, 0.16);
}

/* ── Form panel (right) ────────────────────────────────────────────────── */

.cr-auth-form-panel {
  flex: 1 1 46%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  position: relative;
}

.cr-auth-form-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(105, 108, 255, 0.14) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 15% 90%, black, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 50% at 15% 90%, black, transparent 70%);
}

.cr-auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  padding: 40px 40px 36px;
  box-shadow: 0 4px 24px rgba(34, 41, 84, 0.10), 0 1px 3px rgba(34, 41, 84, 0.06);
  position: relative;
  animation: cr-auth-card-in 0.45s ease-out both;
}

.cr-auth-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.cr-auth-card-header img {
  flex: none;
}

.cr-auth-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #384551;
}

.cr-auth-card-subtitle {
  font-size: 13px;
  color: #6d757d;
}

/* ── Form elements ─────────────────────────────────────────────────────── */

.cr-auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cr-auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Type converged onto the shared uppercase label spec in caserover-type.css
   (the 11.5px here was an em cascade, not a decision); only the layout
   declaration stays. */
.cr-auth-label {
  margin: 0;
}

.cr-auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.cr-auth-forgot {
  font-size: 13px;
  font-weight: 500;
  color: #5a5de5;
  text-decoration: none;
}

.cr-auth-forgot:hover {
  color: #4b4ec4;
  text-decoration: underline;
}

.cr-auth-input,
.cr-auth-card .form-control.cr-auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-size: 14.5px;
  font-family: inherit;
  line-height: 1.4;
  color: #384551;
  border: 1.5px solid #d9dee3;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  height: auto;
}

.cr-auth-input::placeholder {
  color: #6d757d;
  opacity: 1;
}

.cr-auth-input:hover {
  border-color: #b3b5f5;
}

.cr-auth-input:focus {
  border-color: #696cff;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.16);
}

/* Password field: keep Sneat's .form-password-toggle mechanism (vendor
   main.js flips type + icon on .input-group-text) but restyle the group to
   read as one input with the 34px in-field toggle button from the spec. */
.cr-auth-pw-wrap {
  /* The WRAPPER draws the field border and focus ring; the grouped input
     inside goes borderless (Sneat's input-group-merge styles the control's
     borders itself, so one frame here avoids doubled/stripped edges).
     Note: the spec's 1.5px width snaps to whole device pixels per DPR —
     1px on standard displays, 3 device px on retina; that is expected. */
  position: relative;
  border: 1.5px solid #d9dee3;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cr-auth-pw-wrap:hover {
  border-color: #b3b5f5;
}

.cr-auth-pw-wrap:focus-within {
  border-color: #696cff;
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.16);
}

.cr-auth-pw-wrap .cr-auth-input {
  padding-right: 44px;
}

.cr-auth-pw-wrap .input-group-text {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #6d757d;
  font-size: 18px;
  z-index: 5;
}

.cr-auth-pw-wrap .input-group-text:hover {
  background: #f0f0f6;
  color: #384551;
}

/* neutralize Sneat's input-group frame so the field alone draws the border */
.cr-auth-pw-wrap.input-group,
.cr-auth-pw-wrap.input-group-merge {
  display: block;
}

.cr-auth-card .cr-auth-pw-wrap.input-group-merge .form-control.cr-auth-input,
.cr-auth-card .cr-auth-pw-wrap.input-group .form-control.cr-auth-input {
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  border-radius: 10px;
}

.cr-auth-check {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  margin-top: -4px;
}

.cr-auth-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #5f62f2;
  cursor: pointer;
  margin: 0;
}

.cr-auth-check span {
  font-size: 14px;
  color: #384551;
}

.cr-auth-submit {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #5f62f2;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(95, 98, 242, 0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.cr-auth-submit:hover {
  background: #5457d6;
  box-shadow: 0 4px 12px rgba(95, 98, 242, 0.4);
}

.cr-auth-submit:active {
  background: #4b4ec4;
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(95, 98, 242, 0.3);
}

/* ── Animations, responsive, and motion preferences ────────────────────── */

@keyframes cr-auth-card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes cr-auth-float-a {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-10px) rotate(-4deg); }
}

@keyframes cr-auth-float-b {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

@keyframes cr-auth-float-c {
  0%, 100% { transform: translateY(0) rotate(5deg); }
  50% { transform: translateY(-7px) rotate(5deg); }
}

@keyframes cr-auth-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

@media (max-width: 900px) {
  .cr-auth-brand-panel {
    display: none;
  }

  .cr-auth-form-panel {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cr-auth-card,
  .cr-auth-fcard,
  .cr-auth-status-dot {
    animation: none;
  }
}
