/* ============================================================
   BarberPro — Login Page
   ============================================================ */

/* ---------- Layout ---------- */
.login-wrapper {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-primary, #0d0d0d);
}

/* ---------- LEFT PANEL — Brand ---------- */
.login-brand-panel {
  position: relative;
  flex: 0 0 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3rem;
}

/* Animated gradient background */
.brand-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    #0d0d0d 0%,
    #14120f 25%,
    #1a1610 50%,
    #0f0d0a 75%,
    #0d0d0d 100%
  );
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  z-index: 0;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating shapes - Removed */
.floating-shapes,
.shape {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.shape--1 {
  width: 320px; height: 320px;
  top: -80px; left: -60px;
  animation: floatShape 18s ease-in-out infinite;
}
.shape--2 {
  width: 200px; height: 200px;
  bottom: 10%; right: 15%;
  animation: floatShape 22s ease-in-out infinite reverse;
}
.shape--3 {
  width: 120px; height: 120px;
  top: 40%; left: 55%;
  animation: floatShape 15s ease-in-out infinite 2s;
}
.shape--4 {
  width: 80px; height: 80px;
  top: 20%; right: 20%;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: floatShape 20s ease-in-out infinite 4s;
}
.shape--5 {
  width: 160px; height: 160px;
  bottom: -40px; left: 30%;
  animation: floatShape 25s ease-in-out infinite 1s;
}
.shape--6 {
  width: 60px; height: 60px;
  top: 60%; left: 10%;
  border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%;
  animation: floatShape 17s ease-in-out infinite 3s;
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25%      { transform: translate(30px, -40px) rotate(5deg) scale(1.05); }
  50%      { transform: translate(-20px, 20px) rotate(-3deg) scale(0.97); }
  75%      { transform: translate(15px, 30px) rotate(4deg) scale(1.03); }
}

/* Brand content */
.brand-content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  animation: fadeInUp .8s ease both;
}

/* Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  color: var(--accent, #c9a84c);
}

.brand-logo-icon svg {
  width: 100%;
  height: 100%;
}

.brand-logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-logo-text .accent {
  color: var(--accent, #c9a84c);
}

/* Tagline */
.brand-tagline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.65;
  margin-bottom: 2.5rem;
  max-width: 420px;
}

/* Features */
.brand-features {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.brand-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
  font-weight: 500;
}

.brand-feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent, #c9a84c);
  flex-shrink: 0;
}

/* Demo info */
.brand-demo-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(201, 168, 76, 0.15);
  color: var(--accent, #c9a84c);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-demo-info code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
}

/* ---------- RIGHT PANEL — Form ---------- */
.login-form-panel {
  flex: 0 0 40%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.015);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2.5rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: fadeIn .6s ease both .15s;
}

.login-card-header {
  margin-bottom: 1.75rem;
}

.login-card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.login-card-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ---------- Form Elements ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.3s ease;
}

.input-wrapper .form-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.92rem;
  font-family: 'Barlow', sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.input-wrapper .form-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.input-wrapper .form-input:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.input-wrapper .form-input:focus {
  border-color: var(--accent, #c9a84c);
  background: rgba(201, 168, 76, 0.04);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.input-wrapper:focus-within .input-icon {
  color: var(--accent, #c9a84c);
}

/* Select styling */
.form-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 2.5rem !important;
}

.form-select option {
  background: #1a1a1a;
  color: #fff;
}

/* Password toggle */
.password-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

.password-toggle:hover {
  color: var(--accent, #c9a84c);
}

/* Checkbox */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--bg-primary, #0d0d0d);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease;
}

.checkbox-wrapper input:checked + .checkbox-custom {
  background: var(--accent, #c9a84c);
  border-color: var(--accent, #c9a84c);
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
  transform: rotate(45deg) scale(1);
}

.checkbox-label {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Error Message ---------- */
.login-error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  animation: shakeError 0.5s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  10%, 50%, 90% { transform: translateX(-4px); }
  30%, 70% { transform: translateX(4px); }
}

/* ---------- Buttons ---------- */
.btn-login {
  position: relative;
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #0d0d0d;
  font-size: var(--text-lg);
  font-weight: 400;
  font-family: 'Bebas Neue', sans-serif;
  cursor: pointer;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.btn-login:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.25);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-login.loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn-login.loading .btn-text {
  display: none;
}

.btn-login.loading .btn-loader {
  display: flex !important;
}

/* Spinner */
.spinner {
  animation: spin 0.8s linear infinite;
}

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

/* Register button */
.btn-register {
  width: 100%;
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.01em;
}

.btn-register:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(201, 168, 76, 0.3);
  color: var(--accent, #c9a84c);
  transform: translateY(-1px);
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

.login-divider span {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Back link */
.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--accent, #c9a84c);
}

.back-link svg {
  transition: transform 0.3s ease;
}

.back-link:hover svg {
  transform: translateX(-3px);
}

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  border-radius: 24px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

/* Modal scrollbar */
.modal-card::-webkit-scrollbar {
  width: 4px;
}

.modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.modal-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.4);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.modal-header {
  margin-bottom: 1.75rem;
}

.modal-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.modal-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.4);
}

.modal-error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  animation: shakeError 0.5s ease;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ---------- RESPONSIVE ---------- */

/* Tablets */
@media (max-width: 1024px) {
  .login-brand-panel {
    flex: 0 0 50%;
  }
  .login-form-panel {
    flex: 0 0 50%;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column-reverse;
    min-height: auto;
  }

  .login-brand-panel {
    flex: none;
    padding: 2rem 1.5rem 2.5rem;
  }

  .login-form-panel {
    flex: none;
    padding: 2rem 1.5rem 1rem;
    border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .login-card {
    max-width: 100%;
    padding: 1.75rem;
    border-radius: 20px;
  }

  .brand-tagline {
    font-size: 1.75rem;
  }

  .brand-subtitle {
    font-size: 0.92rem;
    margin-bottom: 1.5rem;
  }

  .brand-features {
    gap: 0.6rem;
    margin-bottom: 1.5rem;
  }

  .form-row-2col {
    grid-template-columns: 1fr;
  }

  .modal-card {
    padding: 1.75rem;
    border-radius: 20px;
  }

  .shape--1 { width: 180px; height: 180px; }
  .shape--2 { width: 120px; height: 120px; }
  .shape--3 { width: 80px; height: 80px; }
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem;
  }

  .brand-logo-text {
    font-size: 1.4rem;
  }

  .brand-tagline {
    font-size: 1.5rem;
  }

  .brand-demo-info {
    font-size: 0.75rem;
  }
}
