/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

/* Auth Page Styles */
.auth-page {
  background: #f5f7fa;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Header Styles */
.app-navbar {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  width: 100vw;
  margin: 0;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.app-navbar .wrap {
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo a {
  text-decoration: none;
  color: #1a202c;
  font-weight: 700;
  font-size: 1.5rem;
  transition: color 0.2s;
}

.logo a:hover {
  color: #667eea;
}

.logo-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-page {
  padding: 0;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}

/* Two-column layout container */
.auth-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Benefits Section */
.auth-benefits {
  padding: 2rem 0;
}

.benefits-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.benefits-subtitle {
  font-size: 1.2rem;
  color: #4a5568;
  margin-bottom: 2.5rem;
  line-height: 1.5;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.benefit-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.benefit-text h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.benefit-text p {
  font-size: 0.95rem;
  color: #718096;
  margin: 0;
  line-height: 1.4;
}

/* Form Section */
.auth-form {
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-card {
  background: white;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 400px;
}

.form-card h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 2rem;
  text-align: center;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
  box-sizing: border-box;
  text-align: left;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  background: white;
}

/* Button Styles */
.btn-login {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.btn-login:hover {
  background: #5a67d8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

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

/* Form Links */
.form-links {
  text-align: center;
}

.forgot-password {
  display: block;
  color: #667eea;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.forgot-password:hover {
  color: #5a67d8;
  text-decoration: underline;
}

.register-link {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

.register-link a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.register-link a:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* Error Messages */
.form-group .errorlist {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0 0;
}

.form-group .errorlist li {
  color: #e53e3e;
  font-size: 0.875rem;
  background: #fed7d7;
  padding: 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1rem;
    min-height: 100vh;
    align-items: center;
  }
  
  /* Форма должна быть первой на мобильных */
  .auth-form {
    order: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
  }
  
  /* Преимущества должны быть вторыми на мобильных */
  .auth-benefits {
    order: 2;
  }
  
  .benefits-content h1 {
    font-size: 2rem;
  }
  
  .benefits-subtitle {
    font-size: 1.1rem;
  }
  
  .form-card {
    padding: 2rem;
  }
  
  .benefit-item {
    padding: 0.875rem;
  }
  
  .benefit-icon {
    font-size: 1.5rem;
  }
  
  .benefit-text h3 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .app-page {
    padding: 1rem 0;
  }
  
  .form-card {
    padding: 1.5rem;
  }
  
  .benefits-content h1 {
    font-size: 1.75rem;
  }
}