/* Unified authenticating surfaces for login/register/admin */
:root {
  --auth-bg-1: #0f172a;
  --auth-bg-2: #312e81;
  --auth-bg-3: #6d28d9;
  --auth-surface: #ffffff;
  --auth-surface-muted: rgba(255,255,255,0.75);
  --auth-text-strong: #0f172a;
  --auth-text-muted: #475569;
  --auth-outline: rgba(148,163,184,0.35);
  --auth-outline-strong: rgba(148,163,184,0.6);
  --auth-focus: rgba(109, 40, 217, 0.28);
  --auth-primary-1: #6366f1;
  --auth-primary-2: #7c3aed;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 0% 0%, rgba(79,70,229,0.55) 0%, rgba(79,70,229,0) 45%),
              radial-gradient(circle at 100% 0%, rgba(236,72,153,0.40) 0%, rgba(236,72,153,0) 42%),
              linear-gradient(135deg, var(--auth-bg-1) 0%, var(--auth-bg-2) 45%, var(--auth-bg-3) 100%);
  display: flex;
  flex-direction: column;
  color: var(--auth-text-strong);
}

.auth-navbar {
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148,163,184,0.25);
  box-shadow: 0 18px 40px rgba(15,23,42,0.35);
  padding-block: .9rem;
}
.auth-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: .02em;
  color: #f8fafc !important;
}
.auth-navbar .navbar-brand i { font-size: 1.5rem; }

.btn-auth-outline,
.auth-navbar .btn-auth-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid rgba(226,232,240,0.55);
  color: #f8fafc;
  font-weight: 600;
  padding: .55rem 1.35rem;
  transition: all .18s ease;
  background: transparent;
}

.btn-auth-outline:hover,
.auth-navbar .btn-auth-outline:hover {
  color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 10px 22px rgba(15,23,42,0.25);
}

.btn-auth-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: none;
  background: linear-gradient(135deg, var(--auth-primary-1) 0%, var(--auth-primary-2) 100%);
  color: #fff;
  padding: .65rem 1.6rem;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(79,70,229,0.35);
  transition: all .18s ease;
}
.btn-auth-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(79,70,229,0.45);
}

.btn-aggressive-dojo {
  background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
  color: #fff;
}
.btn-aggressive-dojo:hover {
  box-shadow: 0 18px 38px rgba(220,38,38,0.4);
}

.auth-main {
  flex: 1;
  padding: 4.5rem 0 5rem;
}

.auth-intro {
  color: rgba(248,250,252,0.92);
}
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .85rem;
  font-size: .85rem;
  background: rgba(226,232,240,0.18);
  border: 1px solid rgba(226,232,240,0.25);
  color: #e2e8f0;
  margin-bottom: 1rem;
}
.auth-title {
  font-weight: 700;
  font-size: 2.5rem;
  color: #f8fafc;
}
.auth-description {
  color: rgba(241,245,249,0.82);
  max-width: 34rem;
}
.auth-benefits {
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
  display: grid;
  gap: .6rem;
}
.auth-benefits li {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #e2e8f0;
  font-weight: 500;
}
.auth-benefits i { color: #c4b5fd; }

.auth-card {
  background: var(--auth-surface);
  border-radius: 18px;
  border: 1px solid rgba(226,232,240,0.55);
  box-shadow: 0 20px 45px rgba(15,23,42,0.28);
  overflow: hidden;
}

.auth-card-header {
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid rgba(226,232,240,0.45);
  background: rgba(248,250,252,0.9);
}
.auth-card-header h3 {
  margin: 0;
  font-weight: 700;
  color: var(--auth-text-strong);
}
.auth-card-header p {
  margin: .35rem 0 0;
  color: var(--auth-text-muted);
  font-size: .95rem;
}

.auth-card-body {
  padding: 1.75rem;
}
.auth-card-body .form-label {
  font-weight: 600;
  color: var(--auth-text-strong);
}
.auth-card-body .form-text {
  color: var(--auth-text-muted);
}

.auth-card-body .form-control,
.auth-card-body .form-select {
  border-radius: 12px;
  border: 1px solid var(--auth-outline);
  padding: .7rem .95rem;
  transition: all .18s ease;
}
.auth-card-body .form-control:focus,
.auth-card-body .form-select:focus {
  border-color: var(--auth-outline-strong);
  box-shadow: 0 0 0 .2rem var(--auth-focus);
}

.auth-card-body .input-group .form-control { border-right: 0; }
.auth-card-body .input-group .btn {
  border-radius: 0 12px 12px 0;
  border: 1px solid var(--auth-outline);
  border-left: 0;
}

.auth-secondary-link {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--auth-text-muted);
}
.auth-secondary-link a {
  font-weight: 600;
  text-decoration: none;
  color: var(--auth-primary-2);
}
.auth-secondary-link a:hover { text-decoration: underline; }

.auth-cta-stack { display: flex; gap: .9rem; }

@media (max-width: 992px) {
  .auth-main { padding: 3.5rem 0 3.75rem; }
  .auth-intro { text-align: center; margin-bottom: 2.5rem; }
  .auth-benefits { justify-items: center; }
  .auth-card { box-shadow: 0 14px 32px rgba(15,23,42,0.28); }
}

@media (max-width: 576px) {
  .btn-auth-outline,
.auth-navbar .btn-auth-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 1px solid rgba(226,232,240,0.55);
  color: #f8fafc;
  font-weight: 600;
  padding: .55rem 1.35rem;
  transition: all .18s ease;
  background: transparent;
}
  .auth-card-header,
  .auth-card-body { padding: 1.35rem; }
  .auth-card-body .form-control { padding: .65rem .85rem; }
  .auth-main { padding: 2.5rem 0 3rem; }
  .auth-title { font-size: 2rem; }
}

/* Toast notification styles */
.auth-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.auth-toast {
  animation: slideInRight 0.3s ease-out;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #fd7e14;
  min-width: 350px;
  max-width: 500px;
  overflow: hidden;
  margin-bottom: 10px;
}

.auth-toast-error {
  border-left-color: #fd7e14;
  background: linear-gradient(135deg, #fff5f5, #fefefe);
}

.auth-toast-header {
  padding: 12px 15px;
  background: rgba(253, 126, 20, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #d45500;
}

.auth-toast-error .auth-toast-header {
  background: rgba(253, 126, 20, 0.1);
  color: #d45500;
}

.auth-toast-icon {
  font-size: 18px;
}

.auth-toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #d45500;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.auth-toast-close:hover {
  opacity: 1;
}

.auth-toast-body {
  padding: 15px;
  color: #495057;
  line-height: 1.5;
}

.auth-toast-primary-title {
  margin: 0 0 8px 0;
  font-weight: 600;
  color: #212529;
}

.auth-toast-secondary-text {
  margin: 0 0 12px 0;
  color: #6c757d;
  font-size: 14px;
}

.auth-toast-actions {
  display: flex;
  gap: 10px;
}

.btn-toast-action {
  background: none;
  border: 1px solid #fd7e14;
  color: #d45500;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-toast-action:hover {
  background: #fd7e14;
  color: white;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.auth-toast.hidden {
  animation: fadeOut 0.3s ease-out forwards;
}
