/* ARTEL Fintech - Auth Styles */
/* Modern light theme inspired by ARTEL Education & IT */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-page: #f5f7fb;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;
  --border: #e5e7eb;
  --border-focus: #6366f1;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-light: rgba(99, 102, 241, 0.1);
  --accent: #f97316;
  --accent-light: rgba(249, 115, 22, 0.1);
  --success: #22c55e;
  --error: #ef4444;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

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

body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}

/* Animated Background */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(249, 115, 22, 0.05), transparent);
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 30s linear infinite;
}

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

.bg-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  animation: glowPulse 8s ease-in-out infinite;
}

.glow-1 {
  background: rgba(99, 102, 241, 0.1);
  top: -100px;
  left: -100px;
}

.glow-2 {
  background: rgba(249, 115, 22, 0.08);
  bottom: -100px;
  right: -100px;
  animation-delay: -4s;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

/* Auth Card */
.auth-card {
  position: relative;
  z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.02);
  animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.auth-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo {
  position: relative;
  display: inline-flex;
  margin-bottom: 20px;
}

.auth-logo img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.logo-pulse {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--primary);
  border-radius: 20px;
  opacity: 0;
  animation: logoPulse 2s ease-out infinite;
}

@keyframes logoPulse {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.3); }
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.pro-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  color: white;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field label svg {
  opacity: 0.6;
}

.form-field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 15px;
  transition: all 0.2s ease;
}

.form-field input::placeholder {
  color: var(--text-muted);
}

.form-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  background: var(--bg-card);
}

/* Password wrapper */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 52px;
}

.btn-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  transition: color 0.2s;
}

.btn-eye:hover {
  color: var(--text-secondary);
}

/* Error */
.form-error {
  display: none;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 10px;
  color: var(--error);
  font-size: 14px;
  text-align: center;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Submit Button */
.btn-submit {
  position: relative;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--accent), #fb923c);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-top: 8px;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-submit:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s;
}

.btn-arrow {
  transition: transform 0.3s ease;
}

.btn-submit:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-submit.loading .btn-content {
  opacity: 0;
}

.btn-submit.loading .btn-loader {
  opacity: 1;
}

.btn-submit:disabled {
  cursor: not-allowed;
}

.spinner {
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

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

.btn-submit.error {
  animation: buttonShake 0.6s ease;
  background: linear-gradient(135deg, var(--error), #dc2626);
}

@keyframes buttonShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.btn-submit.success {
  background: linear-gradient(135deg, var(--success), #16a34a);
}

/* Features */
.auth-features {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.feature-icon {
  font-size: 20px;
}

.feature span:last-child {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Footer */
.auth-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.auth-footer a:hover {
  opacity: 0.8;
}

.divider {
  color: var(--text-muted);
}

/* Connection Indicator */
.connection-indicator {
  position: fixed;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-muted);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  transition: background 0.3s;
}

.connection-indicator.online .conn-dot {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
    border-radius: 20px;
  }
  
  .auth-title {
    font-size: 24px;
  }
  
  .auth-features {
    gap: 16px;
  }
  
  .feature span:last-child {
    font-size: 10px;
  }
}
