/* Auth Modal - Yumman Agency Login/Register */
/* ScrollX-inspired 2-Column Layout */

.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11000;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-modal.active {
  display: flex;
}

.auth-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Main Container - 2 Column Layout */
.auth-modal__container {
  position: relative;
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Close Button */
.auth-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.05);
  border: none;
  color: #666;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.2s;
  z-index: 100;
}

.auth-modal__close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* LEFT COLUMN */
.auth-modal__left {
  display: flex;
  flex-direction: column;
  padding: 32px 40px;
  overflow-y: auto;
  max-height: 90vh;
}

/* Logo */
.auth-modal__logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.auth-modal__logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal__logo-icon svg {
  width: 22px;
  height: 22px;
  color: #000;
}

.auth-modal__logo-img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.auth-modal__logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

/* Form Wrapper */
.auth-modal__form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 360px;
  margin: 0 auto;
  width: 100%;
}

/* Form Content */
.auth-form-content {
  width: 100%;
}

.auth-form__title {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}

.auth-form__subtitle {
  font-size: 15px;
  color: #666;
  margin: 0 0 32px;
}

/* Google/Apple Buttons (ScrollX style) */
.auth-google-btn {
  width: 100%;
  height: 44px;
  background: transparent;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-google-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: #333;
}

.auth-google-btn svg {
  width: 18px;
  height: 18px;
}

/* Separator */
.auth-separator {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #444;
  font-size: 13px;
}

.auth-separator__line {
  flex: 1;
  height: 1px;
  background: #1a1a1a;
}

/* Input Fields */
.auth-input-group {
  margin-bottom: 16px;
}

.auth-input-group__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  margin-bottom: 8px;
}

.auth-input-group__label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.auth-input-group__forgot {
  font-size: 12px;
  color: #22c55e;
  text-decoration: none;
}

.auth-input-group__forgot:hover {
  text-decoration: underline;
}

.auth-input-group__input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  background: #111;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  transition: all 0.2s;
}

.auth-input-group__input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.auth-input-group__input::placeholder {
  color: #444;
}

/* Submit Button */
.auth-submit {
  width: 100%;
  height: 44px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-submit__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid #000;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -10px;
  margin-top: -10px;
}

.auth-submit.loading .auth-submit__spinner {
  display: block;
}

.auth-submit.loading .auth-submit__text {
  opacity: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toggle Link */
.auth-form__toggle {
  text-align: center;
  margin-top: 20px;
  color: #666;
  font-size: 14px;
}

.auth-form__toggle a {
  color: #22c55e;
  text-decoration: none;
  font-weight: 500;
}

.auth-form__toggle a:hover {
  text-decoration: underline;
}

/* Phone Link */
.auth-form__phone-link {
  text-align: center;
  margin-top: 12px;
}

.auth-form__phone-link a {
  color: #666;
  text-decoration: none;
  font-size: 13px;
}

.auth-form__phone-link a:hover {
  color: #22c55e;
}

/* Phone Input */
.auth-phone-input {
  display: flex;
  gap: 8px;
}

.auth-phone-input__country {
  width: 100px;
  height: 44px;
  padding: 0 12px;
  background: #111;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.auth-phone-input__number {
  flex: 1;
}

/* OTP Input */
.auth-otp {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.auth-otp__input {
  width: 44px;
  height: 52px;
  background: #111;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
}

.auth-otp__input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Back Button */
.auth-social__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 44px;
  background: transparent;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  color: #888;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-social__btn:hover {
  background: #111;
  color: #fff;
}

.auth-social__btn svg {
  width: 18px;
  height: 18px;
}

/* Error Message */
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* User Info View */
.auth-user {
  text-align: center;
  padding: 20px 0;
}

.auth-user__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  overflow: hidden;
  font-weight: 700;
  color: #000;
}

.auth-user__name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.auth-user__email {
  font-size: 14px;
  color: #666;
  margin-bottom: 32px;
}

.auth-user__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-user__btn {
  height: 44px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.auth-user__btn--primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #000;
}

.auth-user__btn--secondary {
  background: transparent;
  border: 1px solid #333;
  color: #fff;
}

.auth-user__btn:hover {
  transform: translateY(-1px);
}

/* RIGHT COLUMN - MotionGrid & Visuals */
.auth-modal__right {
  position: relative;
  background: #050505;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* MotionGrid Background */
.motion-grid {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motion-grid__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 125% at 50% 10%, rgba(34, 197, 94, 0.4) 0%, transparent 60%);
}

.motion-grid__lines {
  position: absolute;
  inset: -50%;
  background-image: 
    repeating-linear-gradient(45deg, rgba(34, 197, 94, 0.1) 0, rgba(34, 197, 94, 0.1) 1px, transparent 1px, transparent 30px),
    repeating-linear-gradient(-45deg, rgba(34, 197, 94, 0.1) 0, rgba(34, 197, 94, 0.1) 1px, transparent 1px, transparent 30px);
  background-size: 60px 60px;
  animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, 30px); }
}

/* Testimonial Card */
.testimonial-card {
  position: relative;
  z-index: 10;
  width: 85%;
  max-width: 340px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 28px;
}

.testimonial-card__tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.testimonial-card__tag {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.testimonial-card__quote {
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  line-height: 1.5;
  margin-bottom: 24px;
}

.testimonial-card__author-role {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.testimonial-card__author-company {
  font-size: 14px;
  font-weight: 600;
  color: #22c55e;
  margin: 4px 0 0;
}

/* Decorative 3D Blocks */
.auth-blocks {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  transform: rotate(45deg);
}

.auth-blocks--back {
  top: -20%;
  right: -20%;
  opacity: 0.3;
  z-index: 1;
}

.auth-blocks--front {
  top: 0;
  right: -10%;
  opacity: 0.15;
  z-index: 1;
}

.auth-block {
  width: 60px;
  height: 60px;
  background: #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 2px 0 0 #222 inset;
}

/* User Dropdown Menu */
.user-menu-container {
  position: relative;
  display: inline-block;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 10000;
  overflow: hidden;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, transparent 100%);
}

.user-dropdown__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}

.user-dropdown__info {
  flex: 1;
  min-width: 0;
}

.user-dropdown__name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown__email {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown__divider {
  height: 1px;
  background: #1a1a1a;
  margin: 8px 0;
}

.user-dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: #aaa;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.user-dropdown__item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.user-dropdown__item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.user-dropdown__item--danger {
  color: #ef4444;
}

.user-dropdown__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Responsive */
@media (max-width: 900px) {
  .auth-modal__container {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  
  .auth-modal__right {
    display: none;
  }
  
  .auth-modal__left {
    padding: 24px;
  }
  
  .auth-modal__logo-wrap {
    margin-bottom: 24px;
  }
}

@media (max-width: 480px) {
  .auth-modal__container {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .auth-modal__left {
    padding: 20px;
    max-height: 100vh;
  }
  
  .auth-form__title {
    font-size: 24px;
  }
  
  .user-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
  }
  
  .user-dropdown.active {
    transform: translateY(0);
  }
}

/* Scrollbar */
.auth-modal__left::-webkit-scrollbar {
  width: 6px;
}

.auth-modal__left::-webkit-scrollbar-track {
  background: transparent;
}

.auth-modal__left::-webkit-scrollbar-thumb {
  background: #1a1a1a;
  border-radius: 3px;
}
