/**
 * Login page – Tattoo Projects-inspired bold split layout
 */

.login-body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--color-dark);
  height: 100vh;
  overflow: hidden;
}

.login-scanlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px
  );
  pointer-events: none;
}

/* ===== Split layout ===== */
.login-page {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* Left brand panel */
.login-brand {
  flex: 1;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(84,119,146,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  max-width: 480px;
}

.login-logo img {
  height: 80px;
  width: auto;
  margin-bottom: 48px;
  display: block;
}

.login-brand-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 24px 0;
}

.text-accent {
  color: var(--color-accent);
}

.login-brand-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  margin: 0 0 48px 0;
}

.login-brand-deco {
  display: flex;
  align-items: center;
  gap: 16px;
}

.deco-line {
  width: 40px;
  height: 1px;
  background: var(--color-accent);
}

.deco-text {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}

/* Right form panel */
.login-form-panel {
  flex: 1;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
}

.login-box {
  max-width: 420px;
  width: 100%;
}

.login-header {
  margin-bottom: 32px;
}

.login-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.label-line {
  width: 32px;
  height: 1px;
  background: var(--color-accent);
}

.login-box h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.2;
}

/* Tabs */
.login-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.login-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.login-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.login-tab:hover {
  color: var(--text-primary);
}

.login-tab.active {
  color: var(--text-primary);
}

.login-tab.active::after {
  transform: scaleX(1);
}

.login-tab i {
  font-size: 0.8rem;
}

.login-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 8px 0 20px;
}

/* Error */
.login-error {
  display: block;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(198,40,40,0.08);
  color: #c62828;
  border-left: 3px solid #c62828;
  font-size: 0.9rem;
}

.login-error[hidden] {
  display: none;
}

/* Form */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-box input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(250,185,91,0.15);
}

.login-box input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.forgot-password {
  margin-bottom: 20px;
}

/* Login button */
.btn-login {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 24px;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(250,185,91,0.35);
}

.btn-login:hover::before {
  transform: translateX(100%);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-login i {
  font-size: 0.85rem;
  transition: transform 0.3s ease;
}

.btn-login:hover i {
  transform: translateX(4px);
}

/* Also support the old .btn class name from login.js */
.login-box .btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 24px;
}

.login-box .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(250,185,91,0.35);
}

.login-box .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Footer links */
.login-footer-links {
  text-align: center;
}

.login-footer-links p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

.login-footer-links a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.login-footer-links a:hover {
  color: var(--color-mid);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

.home-link:hover {
  color: var(--color-accent) !important;
}

/* Old class compat */
.home-button {
  text-decoration: none;
  color: var(--color-accent);
}

.register-prompt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.register-prompt a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .login-page {
    flex-direction: column;
  }

  .login-brand {
    padding: 48px 32px;
    min-height: auto;
  }

  .login-brand-title {
    font-size: 2rem;
  }

  .login-brand-sub {
    margin-bottom: 24px;
  }

  .login-form-panel {
    padding: 40px 24px;
  }
}

@media (max-width: 480px) {
  .login-brand {
    padding: 32px 24px;
  }

  .login-brand-title {
    font-size: 1.6rem;
  }

  .login-logo img {
    height: 60px;
    margin-bottom: 24px;
  }

  .login-form-panel {
    padding: 32px 20px;
  }

  .login-tab {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .login-tab i {
    display: none;
  }
}
