/* Auth Pages Styles */
:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --secondary: #0f172a;
  --text-dark: #1e293b;
  --text-light: #94a3b8;
  --bg-light: #f8fafc;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #f8fffe 0%, #f0fdf9 100%);
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  margin: 0;
}

/* Auth Container */
.auth-container {
  width: 100%;
  max-width: 520px;
  display: flex;
  margin-bottom: 35px;
  align-items: center;
  justify-content: center;
}

.auth-card {
  background: white;
  border-radius: 24px;
  padding: 20px 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 520px;
  border: 1px solid rgba(0,0,0,0.05);
}

/* Logo and header layout */
.auth-header-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.auth-logo {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.auth-logo:hover {
  transform: scale(1.05);
}

.auth-logo img {
  height: 87px;
  width: auto;
}

.auth-header-text {
  flex: 1;
  text-align: left;
}

.auth-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
  margin: 0px;
  text-align: left;
}

.auth-card .subtitle {
  text-align: left;
  color: var(--text-light);
  margin-bottom: 0;
  margin-top: 0;
  font-size: 0.9rem;
  line-height: 1.3;
}

/* Form Styles */
.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.auth-form label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* Input wrapper for clear button and password toggle */
.input-wrapper {
  position: relative;
  width: 100%;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  padding-right: 40px; /* Space for clear icon */
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.auth-form input[type="password"] {
  padding-right: 80px; /* Space for both clear and eye icon */
}

.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Clear button (X) */
.input-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: color 0.2s;
  z-index: 2;
  width: 24px;
  height: 24px;
}

.input-clear-btn:hover {
  color: var(--text-dark);
}

.input-clear-btn.show {
  display: flex;
}

/* Password toggle button (eye icon) */
.password-toggle-btn {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: color 0.2s;
  z-index: 2;
  width: 24px;
  height: 24px;
}

.password-toggle-btn:hover {
  color: var(--text-dark);
}


.auth-form input::placeholder {
  color: var(--text-light);
}

/* Role Selection */
.role-selection {
  margin-bottom: 16px;
}

.role-selection label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.role-option {
  position: relative;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.role-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: white;
  text-align: left;
  gap: 12px;
}

.role-option input[type="radio"]:checked + .role-label {
  border-color: var(--primary);
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.role-icon {
  font-size: 1.8rem;
  color: var(--primary);
  flex-shrink: 0;
}

.role-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.role-title {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 1rem;
  margin: 0;
}

.role-description {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.3;
  margin: 0;
}

/* Submit Button */
.auth-form .btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  margin-top: 4px;
}

.auth-form .btn-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Error Messages */
.errorlist {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.errorlist li {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 4px;
}

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.form-errors ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.form-errors li {
  color: #dc2626;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.form-errors li:last-child {
  margin-bottom: 0;
}

/* Terms Acceptance */
.terms-acceptance {
  margin-top: 12px;
  margin-bottom: 12px;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.terms-checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.terms-checkbox label {
  font-size: 0.9rem;
  color: var(--text-dark);
  line-height: 1.4;
  cursor: pointer;
  margin: 0;
}

.terms-checkbox label a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.terms-checkbox label a:hover {
  text-decoration: underline;
}

/* Links */
.auth-links {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-links p {
  color: var(--text-light);
  margin-bottom: 8px;
}

/* Success Messages */
.success-message {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 24px;
}

.success-message h3 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.success-message p {
  color: var(--text-dark);
  margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
  body {
    padding: 10px;
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }
  
  .auth-card {
    padding: 24px 20px;
  }
  
  .auth-header-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .auth-logo img {
    height: 40px;
  }
  
  .auth-header-text {
    text-align: center;
  }
  
  .auth-card h2 {
    text-align: center;
    font-size: 1.4rem;
  }
  
  .auth-card .subtitle {
    text-align: center;
  }
  
  .auth-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }
  
  .role-options {
    grid-template-columns: 1fr;
  }
}
