/* === Auth Page - Split Layout === */

:root {
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --primary: #0071e3;
  --primary-hover: #0077ed;
  --border: rgba(0, 0, 0, 0.08);
  --input-border: #d2d2d7;
  --input-focus: #0071e3;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Split Layout === */

.auth-layout {
  display: flex;
  min-height: 100vh;
}

.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.auth-right {
  flex: 1;
  background: linear-gradient(135deg, #1d1d1f 0%, #2d2d30 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

/* === Logo === */

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 48px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--text);
  color: var(--surface);
  font-size: 18px;
  font-weight: 700;
  border-radius: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  display: inline-block;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.brand-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* === Form Container === */

.auth-form-container {
  width: 100%;
  max-width: 380px;
}

.auth-form-container h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0 0 32px;
}

/* === Form === */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.form-group input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--input-border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s ease;
  outline: none;
}

.form-group input::placeholder {
  color: #c7c7cc;
}

.form-group input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

/* === Field Errors === */

.form-group input.input-error {
  border-color: #dc2626;
}

.form-group input.input-error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-error {
  font-size: 12px;
  color: #dc2626;
  min-height: 0;
  line-height: 1.3;
}

/* === Button States === */

.btn-primary {
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
  margin-top: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-text {
  display: inline-block;
}

.btn-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* === Divider === */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 13px;
  color: var(--text-secondary);
}

/* === Google Button === */

.google-btn-wrapper {
  display: flex;
  justify-content: center;
}

/* === Switch link === */

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 24px;
}

.auth-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* === Error === */

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
}

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

/* === Right Panel === */

.auth-right-content {
  text-align: center;
  color: #fff;
  max-width: 400px;
}

.auth-right-text h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.auth-right-text p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 48px;
}

/* === Mockup === */

.auth-right-mockup {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.mockup-bar {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mockup-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.mockup-body {
  display: flex;
  gap: 24px;
  padding: 28px 24px;
  justify-content: center;
}

.mockup-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mockup-stat strong {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.mockup-stat span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* === Responsive === */

@media (max-width: 900px) {
  .auth-right {
    display: none;
  }

  .auth-left {
    padding: 32px 20px;
  }
}
