/* Auth Page - Đăng nhập / Đăng ký */

.auth-main {
  min-height: calc(100vh - 200px);
  padding: 60px 0 80px;
}

.auth-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 56px;
  background: linear-gradient(135deg, #fff9f0 0%, #ffffff 100%);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #cd3333, #ffd591, #cd3333);
}

.auth-page-title {
  font-size: 36px;
  font-weight: 900;
  color: #cd3333;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 40px;
  line-height: 1.2;
}

/* Turnstile */
.auth-turnstile-wrapper {
  margin: 8px 0 12px;
  display: flex;
  justify-content: center;
}

.auth-turnstile-wrapper > div {
  min-height: 65px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 2px solid #e8e8e8;
}

.auth-tab {
  flex: 1;
  padding: 16px 24px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.auth-tab:hover {
  color: #cd3333;
}

.auth-tab.active {
  color: #cd3333;
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #cd3333;
}

/* Form panels */
.auth-form-panel {
  display: none;
}

.auth-form-panel.active {
  display: block;
}

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

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

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.form-group input {
  padding: 14px 18px;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #cd3333;
}

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

.form-group-checkbox {
  flex-direction: row;
  align-items: flex-start;
}

.form-group-checkbox .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.form-group-checkbox .checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
}

.form-group-checkbox .checkbox-label a {
  color: #cd3333;
  text-decoration: underline;
}

.form-group-checkbox .checkbox-label a:hover {
  color: #b21c24;
}

.form-message {
  min-height: 24px;
  font-size: 16px;
  padding: 4px 0;
}

.form-message.error {
  color: #b21c24;
}

.form-message.success {
  color: #2e7d32;
}

.auth-submit-btn {
  padding: 18px 28px;
  background: linear-gradient(135deg, #cd3333, #b21c24);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #b21c24, #8b1519);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(178, 28, 36, 0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Logged in state */
.auth-logged-in {
  padding: 20px 0;
}

.user-greeting {
  font-size: 22px;
  color: #333;
  margin-bottom: 24px;
  text-align: center;
}

.user-greeting strong {
  color: #cd3333;
}

.user-profile-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
}

.user-profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 16px;
}

.user-profile-row:last-child {
  border-bottom: none;
}

.user-profile-label {
  font-size: 16px;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
}

.user-profile-value {
  font-size: 16px;
  color: #333;
  text-align: right;
  word-break: break-word;
}

.user-profile-value:empty::before {
  content: "—";
  color: #999;
}

.auth-logout-wrapper {
  text-align: right;
}

.auth-logout-btn {
  background: linear-gradient(135deg, #ffd591, #fed187);
  color: #333;
}

.auth-logout-btn:hover {
  background: linear-gradient(135deg, #fed187, #f5c97a);
  color: #333;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-main {
    padding: 40px 0 60px;
  }

  .auth-wrapper {
    padding: 40px 24px;
    margin: 0 16px;
  }

  .auth-page-title {
    font-size: 28px;
    margin-bottom: 28px;
  }

  .auth-tab {
    font-size: 14px;
    padding: 12px 16px;
  }

  .form-group input {
    padding: 12px 16px;
    font-size: 16px;
  }

  .auth-submit-btn {
    padding: 14px 20px;
    font-size: 15px;
  }

  .user-profile-card {
    padding: 18px;
  }

  .user-profile-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .user-profile-value {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .auth-wrapper {
    padding: 30px 20px;
    margin: 0 12px;
  }

  .auth-page-title {
    font-size: 24px;
    margin-bottom: 24px;
  }
}
