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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0e1a;
  position: relative;
}

.login-container {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  position: relative;
  z-index: 1;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px 32px;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.6s ease-out;
  margin: auto;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #246fe0, #1a5bc4);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 32px rgba(36, 111, 224, 0.3);
}

.logo-icon svg {
  width: 32px;
  height: 32px;
}

.login-header h1 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 400;
}

/* Tab Switcher */
.tab-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 20px;
  gap: 3px;
}

.tab {
  flex: 1;
  padding: 9px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border-radius: 7px;
  transition: all 0.2s;
}

.tab:hover { color: rgba(255, 255, 255, 0.6); }
.tab.active { background: rgba(36, 111, 224, 0.3); color: #ffffff; }

/* Forms */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.field-hint {
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
}

.form-description {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: rgba(255, 255, 255, 0.3);
  pointer-events: none;
  transition: color 0.2s;
  width: 18px;
  height: 18px;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}

.input-wrapper input::placeholder { color: rgba(255, 255, 255, 0.25); }

.input-wrapper input:focus {
  border-color: #246fe0;
  background: rgba(36, 111, 224, 0.08);
  box-shadow: 0 0 0 3px rgba(36, 111, 224, 0.15);
}

.input-wrapper:focus-within .input-icon { color: #246fe0; }

.toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.toggle-password:hover { color: rgba(255, 255, 255, 0.6); }

.toggle-password svg {
  width: 18px;
  height: 18px;
}

/* Links */
.forgot-link {
  text-align: center;
  margin-top: 2px;
}

.forgot-link a,
.back-link a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-link a:hover,
.back-link a:hover { color: #246fe0; }

.back-link { margin-bottom: 4px; }
.back-link a { font-size: 13px; color: rgba(255, 255, 255, 0.5); }

/* Messages */
.error-message {
  color: #ff6b6b;
  font-size: 12px;
  text-align: center;
  min-height: 0;
  overflow: hidden;
  transition: all 0.3s;
  opacity: 0;
  max-height: 0;
}

.error-message.show {
  opacity: 1;
  max-height: 60px;
  padding: 6px 0;
}

.success-message {
  color: #51cf66;
  font-size: 12px;
  text-align: center;
  min-height: 0;
  overflow: hidden;
  transition: all 0.3s;
  opacity: 0;
  max-height: 0;
}

.success-message.show {
  opacity: 1;
  max-height: 60px;
  padding: 6px 0;
}

/* Button */
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #246fe0, #1a5bc4);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.btn-login:hover:not(:disabled) {
  background: linear-gradient(135deg, #2d7bf0, #1e65d4);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(36, 111, 224, 0.35);
}

.btn-login:active:not(:disabled) { transform: translateY(0); }
.btn-login:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-loading { display: flex; align-items: center; }
.spinner { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

/* Background */
.background-decoration {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

.circle { position: absolute; border-radius: 50%; filter: blur(80px); }

.circle-1 {
  width: 400px; height: 400px;
  background: rgba(36, 111, 224, 0.15);
  top: -100px; right: -100px;
  animation: float 8s ease-in-out infinite;
}

.circle-2 {
  width: 300px; height: 300px;
  background: rgba(111, 36, 224, 0.1);
  bottom: -50px; left: -50px;
  animation: float 10s ease-in-out infinite reverse;
}

.circle-3 {
  width: 200px; height: 200px;
  background: rgba(36, 224, 180, 0.08);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -30px); }
  66% { transform: translate(-20px, 20px); }
}

/* ===== RESPONSIVE ===== */

/* Small phones */
@media (max-width: 380px) {
  .login-container { padding: 8px; }
  .login-card {
    padding: 28px 20px;
    border-radius: 18px;
  }
  .logo-icon { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 12px; }
  .logo-icon svg { width: 28px; height: 28px; }
  .login-header h1 { font-size: 20px; }
  .subtitle { font-size: 12px; }
  .login-form { gap: 12px; }
  .input-wrapper input { padding: 11px 12px 11px 38px; font-size: 13px; border-radius: 8px; }
  .input-icon { left: 12px; width: 16px; height: 16px; }
  .btn-login { padding: 12px; font-size: 13px; border-radius: 8px; }
  .tab { padding: 8px; font-size: 12px; }
  .form-group label { font-size: 11px; }
}

/* Regular phones */
@media (max-width: 480px) {
  .login-container { padding: 12px; }
  .login-card {
    padding: 32px 24px;
    border-radius: 20px;
    max-width: 100%;
  }
  .logo-icon { width: 56px; height: 56px; margin-bottom: 14px; }
  .login-header { margin-bottom: 20px; }
  .login-header h1 { font-size: 22px; }
  .login-form { gap: 12px; }
  .input-wrapper input { padding: 11px 14px 11px 40px; font-size: 14px; }
}

/* Landscape phones / short screens */
@media (max-height: 700px) {
  .login-container {
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .login-card { padding-top: 28px; padding-bottom: 28px; }
  .login-header { margin-bottom: 16px; }
  .logo-icon { width: 48px; height: 48px; margin-bottom: 10px; }
  .logo-icon svg { width: 26px; height: 26px; }
  .login-header h1 { font-size: 20px; margin-bottom: 2px; }
  .login-form { gap: 10px; }
  .input-wrapper input { padding: 10px 12px 10px 38px; }
  .btn-login { padding: 11px; }
  .login-footer { margin-top: 14px; padding-top: 10px; }
  .tab-switcher { margin-bottom: 14px; }
}

/* Very short screens (landscape phone) */
@media (max-height: 550px) {
  .login-header { margin-bottom: 12px; }
  .logo-icon { width: 40px; height: 40px; margin-bottom: 8px; border-radius: 10px; }
  .logo-icon svg { width: 22px; height: 22px; }
  .login-header h1 { font-size: 18px; }
  .subtitle { display: none; }
  .login-form { gap: 8px; }
  .input-wrapper input { padding: 9px 10px 9px 36px; font-size: 13px; }
  .btn-login { padding: 10px; font-size: 13px; }
  .login-footer { display: none; }
}

/* App Download Badges */
.app-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.app-badges a {
  display: inline-flex;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.app-badges a:hover {
  opacity: 1;
}

.app-badges img {
  height: 36px;
  border-radius: 6px;
}

@media (max-width: 380px) {
  .app-badges { gap: 8px; }
  .app-badges img { height: 30px; }
}

@media (max-height: 550px) {
  .app-badges { display: none; }
}
