/**
 * Auth Pages Styles
 * 
 * Custom styles for login and registration pages
 */

/* Common styles for auth pages */

.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 1024px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .auth-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Left panel - info panel */

.auth-info-panel {
  background-color: #eef2ff;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.condo-info {
  margin-bottom: 2rem;
}

.condo-name {
  font-size: 1.5rem;
  font-weight: bold;
  color: #4f46e5;
  margin-bottom: 0.5rem;
}

.condo-address {
  color: #6b7280;
  font-size: 0.875rem;
}

.qrcode-container {
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.qrcode-image {
  width: 180px;
  height: 180px;
  max-width: 100%;
}

.info-text {
  margin-top: 1.5rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Right panel - form panel */

.auth-form-panel {
  padding: 2rem;
}

.form-header {
  margin-bottom: 2rem;
  text-align: center;
}

.app-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
}

.form-section {
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

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

.form-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.form-input:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 0px;
  border-color: transparent;
}

.form-input[readonly] {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

.form-select {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  line-height: 1.25rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-select:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 0px;
  border-color: transparent;
}

.form-checkbox {
  margin-right: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  width: 1rem;
  height: 1rem;
}

.form-checkbox:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.checkbox-label {
  font-size: 0.875rem;
  color: #4b5563;
}

.btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-align: center;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #4f46e5;
  color: white;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: #4338ca;
}

.btn-primary:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.btn-link {
  background-color: transparent;
  color: #4f46e5;
  text-decoration: none;
  padding: 0;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-block {
  display: block;
  width: 100%;
}

.form-footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.form-footer a {
  color: #4f46e5;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Alert components */

.alert {
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
}

.alert-icon {
  flex-shrink: 0;
  margin-right: 0.75rem;
  width: 1.25rem;
  height: 1.25rem;
}

.alert-content {
  flex-grow: 1;
}

.alert-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.alert-message {
  font-size: 0.875rem;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.alert-warning {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

.alert-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* Account selection styles */

.account-selection {
  margin-bottom: 2rem;
}

.account-selection-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 1rem;
}

.account-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.account-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.account-card:hover {
  border-color: #4f46e5;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.account-info {
  display: flex;
  align-items: center;
}

.account-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: #4f46e5;
  color: white;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.account-details {
  flex-grow: 1;
}

.account-name {
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.account-email {
  font-size: 0.875rem;
  color: #6b7280;
}

.account-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

.new-account-btn {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #4f46e5;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.new-account-btn:hover {
  text-decoration: underline;
}

/* Language selector */

.language-selector {
  margin-top: 2rem;
  text-align: center;
}

.language-selector a {
  display: inline-block;
  margin: 0 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
}

.language-selector a.active {
  font-weight: bold;
  color: #4f46e5;
}

.language-selector a:hover {
  text-decoration: underline;
}

/* Utilities */

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.space-x-2 > * + * {
  margin-left: 0.5rem;
}