:root {
  --auth-blue: #005bac;
  --auth-blue-deep: #003d7a;
  --auth-blue-soft: #e9f4ff;
  --auth-sky: #19a7e0;
  --auth-ink: #13243a;
  --auth-muted: #64758b;
  --auth-line: #d8e4f2;
  --auth-panel-bg: #ffffff;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-ink);
  background:
    linear-gradient(135deg, rgba(247,250,255,.98), rgba(236,246,255,.98)),
    repeating-linear-gradient(90deg, rgba(0,91,172,.055) 0, rgba(0,91,172,.055) 1px, transparent 1px, transparent 68px),
    repeating-linear-gradient(0deg, rgba(0,91,172,.04) 0, rgba(0,91,172,.04) 1px, transparent 1px, transparent 68px);
  font-family: "Source Sans 3", "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", Meiryo, sans-serif;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
  color: #b6c1cd !important;
  opacity: 1;
}

.auth-shell {
  position: relative;
  z-index: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 56px);
  isolation: isolate;
}

.auth-shell::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(118deg, transparent 0 12%, rgba(0,91,172,.1) 12% 12.45%, transparent 12.45%),
    linear-gradient(118deg, transparent 0 19%, rgba(25,167,224,.13) 19% 19.45%, transparent 19.45%),
    linear-gradient(118deg, transparent 0 76%, rgba(0,91,172,.08) 76% 76.45%, transparent 76.45%);
}

.auth-panel {
  width: min(100%, 960px);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  overflow: hidden;
  background: var(--auth-panel-bg);
  border: 1px solid rgba(216,228,242,.95);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(19,36,58,.16);
}

.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  overflow: hidden;
  background: linear-gradient(150deg, #052f66 0%, var(--auth-blue) 56%, var(--auth-sky) 100%);
}

.auth-brand::before {
  position: absolute;
  inset: -14%;
  content: "";
  background:
    repeating-linear-gradient(138deg, rgba(255,255,255,.16) 0, rgba(255,255,255,.16) 1px, transparent 1px, transparent 18px),
    linear-gradient(90deg, rgba(255,255,255,.2), transparent 42%);
  opacity: .85;
}

.auth-brand::after {
  position: absolute;
  right: -72px;
  bottom: -72px;
  width: 240px;
  height: 240px;
  content: "";
  border: 34px solid rgba(255,255,255,.18);
  transform: rotate(18deg);
}

.auth-logo-plate {
  position: relative;
  z-index: 1;
  width: min(100%, 292px);
  padding: 28px 26px;
  background: #fff;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 8px;
  box-shadow: 0 24px 54px rgba(2,25,66,.28);
}

.auth-logo-plate img,
.auth-mobile-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.auth-form-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(30px, 5vw, 62px);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
}

.auth-card {
  width: min(100%, 420px);
}

.auth-card-head {
  margin-bottom: 28px;
}

.auth-mobile-logo {
  display: none;
  max-width: 220px;
  margin-bottom: 26px;
}

.auth-card h1 {
  margin: 0;
  color: #0f1f35;
  font-size: 2.1rem;
  line-height: 1.2;
  font-weight: 900;
}

.auth-lead {
  margin: .55rem 0 0;
  color: var(--auth-muted);
  font-size: .96rem;
  font-weight: 700;
}

.auth-error .alert,
.auth-alert {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  margin-bottom: 22px;
  border-radius: 8px;
}

.auth-error .message {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: .85rem 1rem;
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f1aeb5;
  border-radius: 8px;
  font-weight: 700;
}

.auth-error .message i {
  margin-top: .15rem;
}

.auth-form {
  display: grid;
  gap: 18px;
}

.auth-field .form-label {
  margin-bottom: .45rem;
  color: #2b3d55;
  font-size: .94rem;
  font-weight: 800;
}

.auth-field .input-group {
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(19,36,58,.06);
}

.auth-field .input-group-text,
.auth-field .form-control,
.auth-password-toggle {
  min-height: 50px;
  border-color: var(--auth-line);
}

.auth-field .input-group-text {
  color: var(--auth-blue);
  background: #f6faff;
}

.auth-field .form-control {
  color: #16253a;
  font-weight: 700;
}

.auth-field .form-control:focus {
  border-color: #75b8f0;
  box-shadow: 0 0 0 .2rem rgba(0,91,172,.14);
}

.auth-password-toggle {
  color: #4d5c70;
  background: #fff;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  color: var(--auth-blue);
  background: var(--auth-blue-soft);
  border-color: #b7d7f6;
}

.auth-turnstile {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  overflow: hidden;
  background: #f7fbff;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3b4e66;
  font-weight: 700;
}

.auth-options .form-check-input:checked {
  background-color: var(--auth-blue);
  border-color: var(--auth-blue);
}

.auth-submit {
  min-height: 52px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-blue), var(--auth-blue-deep));
  border: 0;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(0,91,172,.28);
}

.auth-submit:hover,
.auth-submit:focus {
  color: #fff;
  background: linear-gradient(135deg, #00519a, #00356b);
  box-shadow: 0 18px 38px rgba(0,91,172,.34);
}

.auth-submit .bi {
  font-size: 1.45rem;
}

.auth-submit.is-secondary {
  color: var(--auth-blue);
  background: #fff;
  border: 1px solid #bdd8f5;
  box-shadow: none;
}

.auth-submit.is-secondary:hover,
.auth-submit.is-secondary:focus {
  color: var(--auth-blue-deep);
  background: var(--auth-blue-soft);
  border-color: #8ec1f1;
}

.auth-back {
  color: var(--auth-muted);
  font-weight: 800;
  text-decoration: none;
}

.auth-back:hover,
.auth-back:focus {
  color: var(--auth-blue);
}

@media (max-width: 767.98px) {
  .auth-shell {
    align-items: flex-start;
    padding: 18px;
  }

  .auth-panel {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-form-area {
    min-height: calc(100vh - 36px);
    padding: 34px 22px;
  }

  .auth-mobile-logo {
    display: block;
  }
}

@media (max-width: 420px) {
  .auth-shell {
    padding: 10px;
  }

  .auth-form-area {
    min-height: calc(100vh - 20px);
    padding: 26px 18px;
  }

  .auth-card h1 {
    font-size: 1.9rem;
  }

  .auth-field .input-group-text {
    padding-right: .65rem;
    padding-left: .65rem;
  }
}
