/* public/css/auth.css */
:root {
  --deep: #080e18;
  --panel: #080d18;
  --orange: #e87b20;
  --blue: #5aadcf;
  --white: #f0f4f8;
  --muted: rgba(240, 244, 248, 0.42);
  --error: #cf5a5a;
  --success: #5acf88;
}

body {
  margin: 0;
  font-family: 'Barlow', sans-serif;
  background-color: var(--deep);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
}

/* Auth Header / Navbar */
.auth-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: rgba(6, 9, 15, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(240, 244, 248, 0.08);
  display: flex;
  align-items: center;
  padding: 0 28px;
  z-index: 200;
}

.auth-header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.auth-header-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.auth-header-logo img {
  height: 34px;
  width: auto;
  filter: brightness(0.95);
  transition: transform 0.2s ease;
}

.auth-header-logo:hover img {
  transform: scale(1.03);
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(240, 244, 248, 0.06);
  border: 1px solid rgba(240, 244, 248, 0.12);
  color: var(--white);
  text-decoration: none;
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.25s ease;
}

.btn-back-home:hover {
  background: rgba(232, 123, 32, 0.15);
  border-color: var(--orange);
  color: var(--orange);
  transform: translateX(-2px);
}

/* Authentication Page Wrapper */
.auth-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 90px 1rem 3rem 1rem;
  background: radial-gradient(circle at center, rgba(13, 21, 39, 0.8), var(--deep) 85%);
  min-height: calc(100vh - 68px);
  box-sizing: border-box;
}

.auth-card-container {
  width: 100%;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-bottom-nav {
  margin-top: 20px;
  text-align: center;
  width: 100%;
}

.auth-centered-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(240, 244, 248, 0.04);
  border: 1px solid rgba(240, 244, 248, 0.08);
}

.auth-centered-back-btn:hover {
  color: var(--orange);
  background: rgba(232, 123, 32, 0.1);
  border-color: rgba(232, 123, 32, 0.3);
  transform: translateY(-1px);
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: rgba(8, 14, 24, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(240, 244, 248, 0.1);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo h2 {
  color: var(--orange);
  margin: 0;
  font-size: 2rem;
  letter-spacing: 2px;
}

.auth-tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(240, 244, 248, 0.1);
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 1rem;
  font-size: 1rem;
  font-family: 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-tab.active {
  color: var(--white);
  border-bottom: 2px solid var(--orange);
}

.auth-tab:hover:not(.active) {
  color: var(--white);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(240, 244, 248, 0.1);
  border-radius: 6px;
  color: var(--white);
  font-family: 'Barlow', sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(90, 173, 207, 0.2);
}

.btn {
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #c46416);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(232, 123, 32, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f08933, var(--orange));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 123, 32, 0.4);
}

.btn-google {
  background: var(--white);
  color: #333;
  margin-top: 1rem;
  font-family: 'Barlow', sans-serif;
  text-transform: none;
  font-weight: 500;
}

.btn-google:hover {
  background: #f8f9fa;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(240, 244, 248, 0.1);
}

.divider:not(:empty)::before {
  margin-right: .5em;
}

.divider:not(:empty)::after {
  margin-left: .5em;
}

.message-area {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
  display: none;
}

.message-area.error {
  display: block;
  background: rgba(207, 90, 90, 0.1);
  color: var(--error);
  border: 1px solid rgba(207, 90, 90, 0.3);
}

.message-area.success {
  display: block;
  background: rgba(90, 207, 136, 0.1);
  color: var(--success);
  border: 1px solid rgba(90, 207, 136, 0.3);
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 14, 24, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(240, 244, 248, 0.1);
  border-radius: 50%;
  border-top-color: var(--orange);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .auth-card {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .auth-header {
    padding: 0 14px;
    height: 56px;
  }
  .auth-header-logo img {
    height: 26px;
  }
  .btn-back-home {
    padding: 6px 10px;
    font-size: 0.8rem;
    gap: 5px;
  }
  .auth-wrapper {
    padding: 72px 1rem 2rem 1rem;
  }
  .auth-card {
    padding: 1.5rem 1.25rem;
  }
  .auth-logo h2 {
    font-size: 1.6rem;
  }
  .btn {
    font-size: 1rem;
  }
}
