* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --htc-blue: #003399;
  --htc-blue-dark: #002266;
  --htc-blue-light: #0066CC;
  --htc-orange: #FF6600;
  --htc-orange-light: #FF8533;
  --white: #ffffff;
  --gray-100: #f8fafc;
  --gray-200: #f1f5f9;
  --gray-300: #e2e8f0;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.3);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  position: relative;
}

/* ===== BACKGROUND ===== */
.login-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,51,153,0.85) 0%, rgba(0,34,102,0.9) 50%, rgba(0,51,153,0.85) 100%);
}

/* ===== HEADER ===== */
.login-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px 48px;
  z-index: 10;
}

.header-logo-no-bg {
  height: 100px;
  width: auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

/* Language Selector - Modern */
.language-selector {
  position: absolute;
  top: 20px;
  right: 40px;
  z-index: 20;
}

.language-selector select {
  background: white;
  border: 2px solid var(--htc-blue);
  border-radius: 25px;
  padding: 10px 36px 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--htc-blue);
  cursor: pointer;
  outline: none;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23003399' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 120px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.language-selector select:hover {
  background-color: var(--htc-blue-light);
  box-shadow: 0 4px 16px rgba(0,51,153,0.25);
  transform: translateY(-1px);
}

.language-selector select:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 0 0 3px rgba(255,102,0,0.2);
}

@media (max-width: 768px) {
  .language-selector {
    top: 12px;
    right: 12px;
  }
  
  .language-selector select {
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    min-width: 100px;
  }
}


/* ===== CONTENT ===== */
.login-content {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ===== LEFT SIDE ===== */
.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 120px 60px 60px;
}

.welcome-text {
  max-width: 600px;
  color: var(--white);
}

.welcome-text h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.welcome-text h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--htc-orange);
  margin-top: 16px;
  border-radius: 2px;
}

.welcome-text > p {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 48px;
  opacity: 0.95;
}

/* ===== FEATURES LIST ===== */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 18px;
  font-weight: 500;
}

.feature-item svg {
  width: 28px;
  height: 28px;
  color: var(--htc-orange);
  background: rgba(255,255,255,0.15);
  padding: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== RIGHT SIDE ===== */
.login-right {
  width: 480px;
  min-width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 40px 40px;
  position: relative;
}

.login-card {
  width: 100%;
  background: rgba(255,255,255,0.98);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.card-header {
  text-align: center;
  margin-bottom: 32px;
}

.card-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--htc-blue);
  margin-bottom: 8px;
}

.card-header p {
  font-size: 15px;
  color: var(--gray-500);
}

/* ===== TABS ===== */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  background: var(--gray-100);
  padding: 6px;
  border-radius: var(--radius);
}

.tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s;
}

.tab:hover {
  color: var(--htc-blue);
}

.tab.active {
  background: var(--white);
  color: var(--htc-blue);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ===== FORM ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.input-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
}

.email-input,
.password-input {
  display: flex;
  align-items: center;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  width: 100%;
  min-width: 320px;
}

.email-input:focus-within,
.password-input:focus-within {
  border-color: var(--htc-blue);
  box-shadow: 0 0 0 4px rgba(0,51,153,0.1);
}

.email-input input,
.password-input input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  font-size: 15px;
  outline: none;
  background: transparent;
}

/* Standard text input (for Full Name, etc) */
.input-group input[type="text"]:not(.email-input input):not(.password-input input) {
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  background: var(--white);
  transition: all 0.3s;
  width: 100%;
  box-sizing: border-box;
}

.input-group input[type="text"]:not(.email-input input):not(.password-input input):focus {
  border-color: var(--htc-blue);
  box-shadow: 0 0 0 4px rgba(0,51,153,0.1);
}

.domain-tag {
  background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
  color: white;
  padding: 14px 6px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 0 10px 10px 0;
  flex-shrink: 0;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
  letter-spacing: -0.3px;
}

.toggle-pass {
  padding: 12px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  transition: color 0.3s;
}

.toggle-pass:hover {
  color: var(--htc-blue);
}

.input-hint {
  font-size: 12px;
  color: var(--gray-400);
}

/* Password Strength */
.password-strength {
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== BUTTON ===== */
.btn-primary {
  background: linear-gradient(135deg, var(--htc-orange) 0%, var(--htc-orange-light) 100%);
  color: white;
  border: none;
  padding: 16px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255,102,0,0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-loader {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.hidden {
  display: none !important;
}

/* Error Message */
.error-msg {
  color: #ef4444;
  font-size: 13px;
  text-align: center;
  margin-top: -8px;
}

/* ===== FOOTER ===== */
.login-footer {
  margin-top: 32px;
  text-align: center;
}

.login-footer p {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .login-content {
    flex-direction: column;
  }
  
  .login-left {
    padding: 100px 40px 40px;
    text-align: center;
  }
  
  .welcome-text h1 {
    font-size: 36px;
  }
  
  .login-right {
    width: 100%;
    min-width: auto;
    padding: 40px;
  }
  
  .features-list {
    display: none;
  }
}

@media (max-width: 640px) {
  .login-header {
    padding: 16px 24px;
  }
  
  .header-logo {
    height: 48px;
  }
  
  .login-left {
    padding: 80px 24px 32px;
  }
  
  .welcome-text h1 {
    font-size: 28px;
  }
  
  .welcome-text > p {
    font-size: 16px;
  }
  
  .login-right {
    padding: 24px;
  }
  
  .login-card {
    padding: 28px;
  }
}
