:root {
  --auth-red: #e11d2e;
  --auth-red-dark: #b81221;
  --auth-ink: #20232b;
  --auth-muted: #697180;
  --auth-line: #e8eaf0;
}

* { box-sizing: border-box; }

body.backoffice-auth {
  align-items: center;
  background:
    radial-gradient(circle at 15% 12%, rgba(225, 29, 46, .12), transparent 34%),
    linear-gradient(145deg, #f8f9fc 0%, #eef0f5 100%);
  color: var(--auth-ink);
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  padding: 24px;
}

.auth-shell {
  background: #fff;
  border: 1px solid rgba(232, 234, 240, .9);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(32, 35, 43, .13);
  display: grid;
  grid-template-columns: minmax(290px, .9fr) minmax(350px, 1.1fr);
  max-width: 920px;
  min-height: 540px;
  overflow: hidden;
  width: 100%;
}

.auth-brand-panel {
  background: linear-gradient(150deg, #181b22 0%, #292d37 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px;
  position: relative;
}

.auth-brand-panel::after {
  background: var(--auth-red);
  border-radius: 50%;
  bottom: -100px;
  content: "";
  height: 250px;
  opacity: .2;
  position: absolute;
  right: -100px;
  width: 250px;
}

.auth-brand {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-size: 1.12rem;
  font-weight: 800;
  gap: 10px;
  letter-spacing: -.02em;
  text-decoration: none;
}

.auth-brand img {
  background: #fff;
  border-radius: 10px;
  height: 42px;
  object-fit: contain;
  padding: 7px;
  width: 42px;
}

.auth-brand-copy { position: relative; z-index: 1; }
.auth-brand-copy h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin: 0 0 14px; }
.auth-brand-copy p { color: rgba(255, 255, 255, .72); line-height: 1.65; margin: 0; }
.auth-brand-panel small { color: rgba(255, 255, 255, .55); position: relative; z-index: 1; }

.auth-form-panel {
  align-items: center;
  display: flex;
  padding: 54px 64px;
}

.auth-form { max-width: 390px; width: 100%; }
.auth-role { color: var(--auth-red); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-form h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.035em; margin: 7px 0; }
.auth-form > p { color: var(--auth-muted); margin-bottom: 28px; }
.auth-form label { color: #353a45; font-size: .82rem; font-weight: 700; }
.auth-label-row { align-items: center; display: flex; justify-content: space-between; }
.auth-label-row a { color: var(--auth-red-dark); font-size: .8rem; font-weight: 700; }
.auth-input { position: relative; }
.auth-input > i { color: #9aa1ad; left: 15px; position: absolute; top: 14px; }
.auth-input .form-control { border: 1px solid var(--auth-line); border-radius: 10px; height: 46px; padding-left: 42px; }
.auth-input .form-control:focus { border-color: var(--auth-red); box-shadow: 0 0 0 3px rgba(225, 29, 46, .12); }
.auth-submit { background: var(--auth-red); border: 0; border-radius: 10px; color: #fff; font-weight: 800; min-height: 46px; width: 100%; }
.auth-submit:hover, .auth-submit:focus { background: var(--auth-red-dark); color: #fff; }
.auth-helper { border-top: 1px solid var(--auth-line); color: var(--auth-muted); font-size: .82rem; margin-top: 25px; padding-top: 20px; text-align: center; }
.auth-helper a { color: var(--auth-red-dark); font-weight: 700; }

@media (max-width: 767px) {
  body.backoffice-auth { padding: 12px; }
  .auth-shell { display: block; min-height: auto; }
  .auth-brand-panel { min-height: 190px; padding: 28px; }
  .auth-brand-copy h1 { font-size: 1.45rem; margin-bottom: 7px; }
  .auth-brand-panel small { display: none; }
  .auth-form-panel { padding: 34px 26px; }
}
