html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

:root {
  --auth-brand: #14487e;
  --auth-brand-2: #1f6feb;
  --auth-bg-1: #ffffff;
  --auth-bg-2: #f3f6ff;

  --theme-surface-1: rgba(255, 255, 255, 0.92);
  --theme-surface-2: rgba(255, 255, 255, 0.98);
  --theme-border-1: rgba(15, 23, 42, 0.12);
  --theme-text-1: rgba(15, 23, 42, 0.92);
  --theme-text-2: rgba(15, 23, 42, 0.68);
}

.auth-body {
  margin-bottom: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 700px at 10% 10%, rgba(31, 111, 235, 0.14), transparent 60%),
    radial-gradient(900px 600px at 90% 20%, rgba(20, 72, 126, 0.12), transparent 55%),
    linear-gradient(160deg, var(--auth-bg-1), var(--auth-bg-2));

  color: var(--theme-text-1);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 32px 0;
}

.auth-container {
  display: flex;
  justify-content: center;
}

.auth-card {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--theme-surface-1);
  backdrop-filter: blur(10px);
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.12),
    0 0 0 1px var(--theme-border-1) inset;
}

.auth-aside {
  background: var(--theme-surface-1);
  color: var(--theme-text-1);
}

.auth-aside-inner {
  width: 100%;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-logo {
  width: 200px;
  height: auto;
  filter: none;
}

.auth-logo-sm {
  width: 84px;
  filter: none;
}

.auth-title {
  margin: 10px 0 0;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0;
  opacity: 0.9;
  line-height: 1.45;
}

.auth-badges {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-aside-footer {
  margin-top: auto;
  opacity: 0.85;
}

.auth-form {
  background: transparent;
}

.auth-form-title {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--theme-text-1);
}

.auth-form-subtitle {
  color: var(--theme-text-2);
}

.auth-primary-btn {
  border: 0;
  padding: 12px 14px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--auth-brand), var(--auth-brand-2));
  box-shadow: 0 10px 18px rgba(31, 111, 235, 0.25);
}

.auth-primary-btn:hover {
  filter: brightness(1.03);
}

.auth-secondary-btn {
  padding: 11px 14px;
}

.auth-link {
  color: var(--auth-brand);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-divider {
  position: relative;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1px;
  background: var(--theme-border-1);
}

.auth-divider span {
  position: relative;
  display: inline-block;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--theme-text-2);
  font-size: 0.9rem;
}

.auth-bottom small {
  color: rgba(15, 23, 42, 0.72) !important;
}

.auth-form .form-control {
  border-radius: 12px;
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.95);
  color: var(--theme-text-1);
}

.auth-form .form-control::placeholder {
  color: rgba(15, 23, 42, 0.45);
}

.auth-form .form-control:focus {
  border-color: rgba(31, 111, 235, 0.55);
  box-shadow: 0 0 0 0.25rem rgba(31, 111, 235, 0.18);
}
/* Dark theme rules kept for optional use */
.theme-dark .container,
.theme-dark .container-fluid {
  color: var(--theme-text-1);
}

.theme-dark .card {
  background: var(--theme-surface-2);
  color: var(--theme-text-1);
  border: 1px solid var(--theme-border-1);
}

.theme-dark .card-footer {
  background: rgba(13, 17, 23, 0.35);
  border-top: 1px solid var(--theme-border-1);
}

.theme-dark .table {
  color: var(--theme-text-1);
}

.theme-dark .table > :not(caption) > * > * {
  background-color: rgba(22, 27, 34, 0.72);
  border-bottom-color: var(--theme-border-1);
}

.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(13, 17, 23, 0.72);
}

.theme-dark .text-muted {
  color: var(--theme-text-2) !important;
}

.theme-dark .form-label {
  color: var(--theme-text-2);
}

.theme-dark .form-control,
.theme-dark textarea.form-control {
  background-color: rgba(13, 17, 23, 0.7);
  color: var(--theme-text-1);
  border-color: rgba(240, 246, 252, 0.14);
}

.theme-dark .form-control:focus,
.theme-dark textarea.form-control:focus {
  background-color: rgba(13, 17, 23, 0.85);
  color: var(--theme-text-1);
}

.auth-token-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
}