/* ========================================
   Morph Holdings - Premium Auth Styles
   World-Class Investment Portal
   ======================================== */

/* Reset & Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Silver Coin Palette */
  --silver-100: #ffffff;
  --silver-200: #f5f6f7;
  --silver-300: #e8eaec;
  --silver-400: #c8ccd0;
  --silver-500: #a8adb3;
  --silver-600: #71787f;
  --silver-700: #4a5158;
  --silver-800: #2d3238;
  --silver-900: #1a1d21;
  
  /* Premium Gradients */
  --gradient-silver: linear-gradient(135deg, #e8eaec 0%, #d0d4d8 50%, #e8eaec 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(248,249,250,0.9) 100%);
  
  /* Accent Colors */
  --accent-gold: #c9a227;
  --accent-gold-light: #dbb42c;
  --accent-gold-dark: #a88a1f;
  
  /* Effects */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-gold: 0 4px 25px rgba(201, 162, 39, 0.35);
  
  /* Status */
  --error-color: #e53935;
  --success-color: #43a047;
}

/* ============================================
   BODY - UNIFIED SILVER BACKGROUND
   ============================================ */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #c8ccd0 0%, #b8bcc0 25%, #a8adb3 50%, #b8bcc0 75%, #c8ccd0 100%);
  background-attachment: fixed;
  color: var(--silver-900);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

/* Metallic Shine Overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   AUTH CONTAINER - CENTERED CARD LAYOUT
   ============================================ */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Hide branding panel - we'll use unified card design */
.auth-branding {
  display: none;
}

/* ============================================
   AUTH FORM PANEL - PREMIUM GLASS CARD
   ============================================ */
.auth-form-panel {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(145deg, rgba(255,255,255,0.97) 0%, rgba(250,251,252,0.95) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 
    var(--shadow-strong),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 0 0 1px rgba(200, 204, 208, 0.3);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

/* Subtle top accent line */
.auth-form-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  border-radius: 0 0 4px 4px;
}

/* ============================================
   AUTH FORM CONTAINER
   ============================================ */
.auth-form-container {
  width: 100%;
}

/* Logo Section */
.auth-logo-section {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-logo-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.auth-logo {
  width: 120px;
  height: auto;
  animation: logoRotate 20s linear infinite;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.1));
}

@keyframes logoRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Glow ring behind logo */
.auth-logo-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.auth-brand-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--silver-900) 0%, var(--silver-700) 50%, var(--silver-900) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.auth-tagline {
  font-size: 1rem;
  color: var(--silver-600);
  font-weight: 500;
}

/* ============================================
   HEADINGS
   ============================================ */
.auth-form-container h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--silver-900);
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-subtitle {
  color: var(--silver-600);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

/* ============================================
   FORM STYLES - PREMIUM INPUTS
   ============================================ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--silver-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Premium Input Wrapper */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Hide SVG Icons - Clean Modern Look */
.input-icon {
  display: none;
}

/* Premium Input Fields - Minimal Modern Design */
.input-wrapper input,
.input-wrapper select {
  width: 100%;
  padding: 1.1rem 1.25rem;
  background: #fafbfc;
  border: 1.5px solid #e1e4e8;
  border-radius: 8px;
  color: var(--silver-900);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.input-wrapper input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* Focus State - Elegant Gold Border */
.input-wrapper input:focus,
.input-wrapper select:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: #ffffff;
  box-shadow: 
    0 0 0 3px rgba(201, 162, 39, 0.15),
    inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Hover State */
.input-wrapper input:hover:not(:focus),
.input-wrapper select:hover:not(:focus) {
  border-color: #c8ccd0;
  background: #ffffff;
}

/* Select Styling */
.select-wrapper select {
  cursor: pointer;
  appearance: none;
  background-color: #fafbfc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a5158' viewBox='0 0 16 16'%3E%3Cpath d='M8 10.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.select-wrapper select option {
  background: var(--silver-100);
  color: var(--silver-900);
}

/* Textarea */
textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: #fafbfc;
  border: 1.5px solid #e1e4e8;
  border-radius: 8px;
  color: var(--silver-900);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  transition: all 0.25s ease;
  min-height: 100px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

textarea::placeholder {
  color: #9ca3af;
}

textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

/* Toggle Password Button */
.toggle-password {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s ease;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
  color: var(--silver-600);
}

.toggle-password:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ============================================
   FORM OPTIONS - REMEMBER ME & FORGOT PASSWORD
   ============================================ */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
  padding-left: 28px;
  font-size: 0.875rem;
  color: var(--silver-700);
  user-select: none;
}

.remember-me input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.remember-me .checkmark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 18px;
  background: #fafbfc;
  border: 1.5px solid #e1e4e8;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.remember-me:hover .checkmark {
  border-color: var(--accent-gold);
}

.remember-me input:checked ~ .checkmark {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.remember-me .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember-me input:checked ~ .checkmark:after {
  display: block;
}

.remember-text {
  font-weight: 500;
}

.forgot-password {
  font-size: 0.875rem;
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password:hover {
  color: var(--accent-gold-dark);
  text-decoration: underline;
}

/* ============================================
   ERROR & SUCCESS MESSAGES
   ============================================ */
.form-error {
  display: none;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.08) 0%, rgba(229, 57, 53, 0.04) 100%);
  border: 1px solid rgba(229, 57, 53, 0.3);
  border-left: 4px solid var(--error-color);
  border-radius: 10px;
  color: var(--error-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-success {
  display: none;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(67, 160, 71, 0.08) 0%, rgba(67, 160, 71, 0.04) 100%);
  border: 1px solid rgba(67, 160, 71, 0.3);
  border-left: 4px solid var(--success-color);
  border-radius: 10px;
  color: var(--success-color);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================
   BUTTONS - PREMIUM GOLD
   ============================================ */
.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

/* Shine Effect */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #d4af37 0%, #c9a227 40%, #b8960f 100%);
  color: #1a1a1a;
  box-shadow: 
    var(--shadow-gold),
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e5c44d 0%, #d4af37 40%, #c9a227 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 35px rgba(201, 162, 39, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-block {
  width: 100%;
}

/* ============================================
   FOOTER
   ============================================ */
.auth-footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--silver-600);
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--accent-gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.auth-footer a:hover {
  color: var(--accent-gold-dark);
}

/* Back Link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--silver-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--accent-gold);
}

/* ============================================
   APPROVAL NOTICE
   ============================================ */
.approval-notice {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08) 0%, rgba(201, 162, 39, 0.04) 100%);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 12px;
}

.approval-notice h3 {
  color: var(--accent-gold-dark);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.approval-notice p {
  color: var(--silver-700);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 540px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-form-panel {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .auth-logo {
    width: 100px;
  }

  .auth-logo-wrapper::before {
    width: 130px;
    height: 130px;
  }

  .auth-brand-name {
    font-size: 1.5rem;
  }

  .auth-form-container h2 {
    font-size: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .input-wrapper input,
  .input-wrapper select {
    padding: 0.9rem 0.9rem 0.9rem 2.75rem;
  }

  .input-icon {
    left: 0.9rem;
  }
}

@media (max-width: 380px) {
  .auth-form-panel {
    padding: 1.5rem 1.25rem;
  }

  .auth-logo {
    width: 80px;
  }

  .auth-brand-name {
    font-size: 1.35rem;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form-panel {
  animation: fadeInUp 0.6s ease-out;
}
