:root {
  --auth-primary: #173a63;
  --auth-primary-dark: #153356;
  --auth-body: #182433;
  --auth-muted: #6c7a8c;
  --auth-danger: #d63939;
  --auth-border: #d9e0e9;
  --auth-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--auth-body);
  background: #edf2f8;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: inherit;
  font-size: 0.75rem;
  line-height: inherit;
  color: var(--auth-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.24), transparent 72%);
  opacity: 0.28;
}

button,
input {
  margin: 0;
  font: inherit;
}

button {
  text-transform: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.auth-page {
  background:
    radial-gradient(circle at top right, rgba(201, 154, 45, 0.18), transparent 22%),
    radial-gradient(circle at bottom left, rgba(23, 58, 99, 0.22), transparent 30%),
    linear-gradient(180deg, #f4f7fb 0%, #edf2f8 100%);
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.page-center,
.auth-page-shell {
  min-height: 100vh;
}

.page-center {
  justify-content: center;
}

.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 0.78rem;
  padding-left: 0.78rem;
}

.container-tight {
  max-width: 30rem;
}

.py-4 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.auth-brand-row {
  display: flex;
  justify-content: flex-start;
}

.admin-brand,
.admin-brand-with-logo,
.admin-brand-logo-shell {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.auth-brand {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  color: var(--auth-body);
  text-align: left;
}

.auth-brand .admin-brand-logo-shell {
  min-width: 0;
  padding: 0;
}

.auth-brand .admin-brand-logo {
  display: block;
  width: auto;
  max-width: min(22rem, 84vw);
  height: auto;
  max-height: 2rem;
  object-fit: contain;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  color: var(--auth-body);
  word-wrap: break-word;
  background: rgba(255, 255, 255, 0.84);
  background-clip: border-box;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.auth-card {
  width: 100%;
  max-width: 25.5rem;
  margin-left: auto;
  border-radius: 1.18rem;
  backdrop-filter: blur(18px);
  box-shadow: var(--auth-shadow);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.24rem;
  background: linear-gradient(90deg, rgba(23, 58, 99, 0.96), rgba(201, 154, 45, 0.82));
}

.card-body {
  flex: 1 1 auto;
}

.auth-card .card-body {
  padding: 1.35rem;
}

.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--auth-muted);
}

.card-title {
  margin-top: 0;
  color: var(--auth-body);
  font-size: 1.06rem;
  font-weight: 600;
  line-height: 1.5;
}

.form-label {
  display: block;
  margin-bottom: 0.22rem;
  color: #17314d;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.form-control {
  display: block;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.45rem 0.75rem;
  color: var(--auth-body);
  background: #fff;
  background-clip: padding-box;
  border: 1px solid var(--auth-border);
  border-radius: 0.76rem;
  outline: 0;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#username,
#password {
  min-height: 3rem;
  font-size: 1rem;
}

.form-control:focus {
  border-color: rgba(23, 58, 99, 0.36);
  box-shadow: 0 0 0 0.22rem rgba(23, 58, 99, 0.08);
}

.form-footer {
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.82rem;
  color: var(--auth-body);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 0.95rem;
  appearance: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 0.16rem solid rgba(23, 58, 99, 0.35);
  outline-offset: 0.12rem;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--auth-primary) 0%, #234f86 100%);
  box-shadow: 0 16px 32px rgba(23, 58, 99, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, var(--auth-primary-dark) 0%, #21497b 100%);
  box-shadow: 0 20px 42px rgba(23, 58, 99, 0.22);
}

.btn-outline-secondary {
  color: var(--auth-body);
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(209, 217, 229, 0.95);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #122d4d;
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(23, 58, 99, 0.18);
}

.alert {
  position: relative;
  margin-bottom: 1rem;
  padding: 0.75rem 2.6rem 0.75rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 1rem;
}

.alert-danger {
  color: #841f2a;
  background: #fbeaec;
  border-color: #f4c9ce;
}

.alert-success {
  color: #1d6b2a;
  background: #eaf7ed;
  border-color: #c6e9cd;
}

.alert-warning {
  color: #755000;
  background: #fff5d9;
  border-color: #f7dfa2;
}

.alert-info {
  color: #245b7d;
  background: #eaf4fb;
  border-color: #c8e2f3;
}

.btn-close {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  width: 1rem;
  height: 1rem;
  padding: 0;
  color: inherit;
  cursor: pointer;
  background: transparent;
  border: 0;
  opacity: 0.55;
  transform: translateY(-50%);
}

.btn-close::before,
.btn-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.btn-close::before {
  transform: rotate(45deg);
}

.btn-close::after {
  transform: rotate(-45deg);
}

.d-flex {
  display: flex;
}

.d-grid {
  display: grid;
}

.align-items-start {
  align-items: flex-start;
}

.gap-2 {
  gap: 0.5rem;
}

.w-100 {
  width: 100%;
}

.icon,
.alert-icon {
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
}

.icon {
  vertical-align: -0.2em;
  stroke-width: 1.5;
}

@media (max-width: 991.98px) {
  .auth-brand-row {
    justify-content: center;
    margin-bottom: 1.25rem;
  }

  .auth-brand {
    align-items: center;
    text-align: center;
  }

  .auth-card {
    max-width: none;
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
