/* Auth Modal Glassmorphism UI */
#auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}
#auth-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.auth-container {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: linear-gradient(135deg, #0B1B32, #2455C9);
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Glassmorphism inner container */
.auth-content {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
}

/* Scrollbar for auth modal */
.auth-content::-webkit-scrollbar { width: 8px; }
.auth-content::-webkit-scrollbar-track { background: transparent; }
.auth-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.auth-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}
.auth-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}
.auth-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.auth-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
}

/* Role Tabs */
.auth-role-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 30px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.auth-role-tab {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}
.auth-role-tab.active {
  background: #C5A059;
  color: #0B1B32;
  box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

/* Grids */
.am-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.am-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.am-grid-1 { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }

@media (max-width: 900px) {
  .am-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .am-grid-3, .am-grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .auth-content { padding: 30px 20px; }
}

/* Form Elements */
.am-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.am-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.am-form-group input, 
.am-form-group textarea,
.am-form-group select {
  width: 100%;
  padding: 14px 18px;
  background: rgba(11, 27, 50, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}
.am-form-group input::placeholder,
.am-form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
.am-form-group input:focus,
.am-form-group textarea:focus,
.am-form-group select:focus {
  outline: none;
  border-color: #C5A059;
  background: rgba(11, 27, 50, 0.6);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}

.am-select-wrap {
  position: relative;
}
.am-select-wrap::after {
  content: '▼';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
.am-form-group select {
  appearance: none;
  cursor: pointer;
}
.am-form-group select option {
  background: #0B1B32;
  color: #fff;
}

/* Checkboxes */
.am-consent {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 30px;
  text-align: left;
}
.am-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  line-height: 1.4;
}
.am-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.2s;
}
.am-checkbox:checked {
  background: #C5A059;
  border-color: #C5A059;
}
.am-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0B1B32;
  font-size: 0.9rem;
  font-weight: 800;
}

.am-opts {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.am-link {
  color: #C5A059;
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}
.am-link:hover {
  text-decoration: underline;
}

/* Buttons */
.auth-footer {
  text-align: center;
  margin-top: 10px;
}
.am-btn-primary {
  width: 100%;
  padding: 16px;
  background: #C5A059;
  color: #0B1B32;
  font-size: 1.1rem;
  font-weight: 800;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: all 0.3s;
  box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
}
.am-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(197, 160, 89, 0.5);
  background: #D4B271;
}

.am-switch {
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}
