/* ============================================
   Solarized Dark — глобальная палитра
   base03: #002b36   base02: #073642
   base01: #586e75   base00: #657b83
   base0:  #839496   base1:  #93a1a1
   yellow: #b58900   orange: #cb4b16
   red:    #dc322f   magenta:#d33682
   violet: #6c71c4   blue:   #268bd2
   cyan:   #2aa198   green:  #859900
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 30% 10%, #073642 0%, #002b36 55%, #001f27 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  color: #93a1a1;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 139, 210, 0.18) 0%, transparent 70%);
  top: -20vmax;
  right: -10vmax;
  animation: float 18s infinite alternate ease-in-out;
}

.glow2 {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 113, 196, 0.16) 0%, transparent 70%);
  bottom: -30vmax;
  left: -20vmax;
  animation: float 24s infinite alternate-reverse ease-in-out;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 8%) scale(1.1); }
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(7, 54, 66, 0.75);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: 48px;
  border: 1px solid rgba(38, 139, 210, 0.35);
  box-shadow: 0 30px 50px -10px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(42, 161, 152, 0.12) inset,
              0 0 40px rgba(38, 139, 210, 0.25);
  padding: 40px 30px 35px;
  transition: transform 0.3s ease, box-shadow 0.4s ease;
}

.login-wrapper:hover {
  box-shadow: 0 40px 60px -12px rgba(38, 139, 210, 0.35),
              0 0 0 1px rgba(42, 161, 152, 0.3) inset,
              0 0 60px rgba(38, 139, 210, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #2aa198, #268bd2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px -5px rgba(38, 139, 210, 0.6), 0 0 20px rgba(42, 161, 152, 0.5);
}

.brand-icon i {
  font-size: 28px;
  color: #fdf6e3;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text .name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #93a1a1, #2aa198);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.2;
  text-shadow: 0 0 20px rgba(42, 161, 152, 0.4);
}

.brand-text .tagline {
  font-size: 12px;
  color: #586e75;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.input-group label {
  font-size: 13px;
  font-weight: 500;
  color: #839496;
  letter-spacing: 0.3px;
  margin-left: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-group label i {
  font-size: 12px;
  color: #268bd2;
}

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

.input-field i {
  position: absolute;
  left: 18px;
  color: #586e75;
  font-size: 16px;
  transition: color 0.2s;
}

.input-field input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  background: #001f27;
  border: 1.5px solid #0a4a5a;
  border-radius: 24px;
  font-size: 15px;
  color: #93a1a1;
  font-weight: 400;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.input-field input::placeholder {
  color: #586e75;
  font-weight: 300;
  font-size: 14px;
}

.input-field input:focus {
  border-color: #2aa198;
  box-shadow: 0 0 0 3px rgba(42, 161, 152, 0.2), 0 8px 20px -6px #268bd2;
  background: #002b36;
  color: #eee8d5;
}

.input-field input:focus + i,
.input-field input:not(:placeholder-shown) + i {
  color: #2aa198;
}

/* Кнопка входа — приглушённый градиент Solarized */
.btn-login {
  margin-top: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #1f6f9e 0%, #268bd2 45%, #2aa198 100%);
  border: 1px solid rgba(147, 161, 161, 0.18);
  border-radius: 40px;
  color: #fdf6e3;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 12px 26px -10px rgba(38, 139, 210, 0.55),
              0 0 0 1px rgba(42, 161, 152, 0.1) inset,
              0 0 18px rgba(42, 161, 152, 0.25);
}

.btn-login i {
  font-size: 18px;
  transition: transform 0.2s;
}

.btn-login:hover {
  background: linear-gradient(135deg, #268bd2 0%, #2aa198 60%, #1f6f9e 100%);
  box-shadow: 0 16px 30px -8px rgba(38, 139, 210, 0.45),
              0 0 0 1px rgba(42, 161, 152, 0.2) inset,
              0 0 26px rgba(42, 161, 152, 0.35);
  transform: scale(1.02);
}

.btn-login:hover i {
  transform: translateX(5px);
}

.btn-login:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, #1a5a80 0%, #1f6f9e 50%, #248a82 100%);
  box-shadow: 0 6px 16px -6px rgba(38, 139, 210, 0.5);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #839496;
  cursor: pointer;
}

.checkbox input {
  accent-color: #2aa198;
  width: 16px;
  height: 16px;
  cursor: pointer;
  filter: drop-shadow(0 0 6px rgba(42, 161, 152, 0.5));
}

.forgot-link {
  color: #268bd2;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, text-shadow 0.2s;
}

.forgot-link:hover {
  color: #2aa198;
  text-shadow: 0 0 12px rgba(42, 161, 152, 0.6);
  text-decoration: underline;
}

.signup-prompt {
  text-align: center;
  margin-top: 25px;
  color: #93a1a1;
  font-size: 14px;
  background: #002b36;
  border: 1px solid #073642;
  border-radius: 16px;
  padding: 16px 18px;
  letter-spacing: 0.2px;
  box-shadow: inset 0 1px 0 rgba(147, 161, 161, 0.08), 0 6px 16px -8px rgba(0, 0, 0, 0.6);
}

.signup-prompt .signup-link {
  color: #268bd2;
  font-weight: 600;
  text-decoration: none;
  margin-left: 6px;
  padding-bottom: 1px;
  border-bottom: 1px dotted #268bd2;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}

.signup-prompt .signup-link:hover {
  color: #2aa198;
  border-bottom-color: #2aa198;
  text-shadow: 0 0 10px rgba(42, 161, 152, 0.6);
}

.signup-prompt .signup-link:active {
  color: #b58900;
  border-bottom-color: #b58900;
}

.demo-hint {
  margin-top: 16px;
  font-size: 12px;
  color: #586e75;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  opacity: 0.85;
}

.demo-hint i {
  margin-right: 4px;
  color: #657b83;
}

.demo-hint .dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #586e75;
  align-self: center;
}

/* ============================================
   Всплывающее сообщение (toast) — Solarized red
   ============================================ */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 1000;
  min-width: 280px;
  max-width: 90vw;
  background: #002b36;
  border: 1.5px solid #dc322f;
  border-left: 5px solid #dc322f;
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #93a1a1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8),
              0 0 0 1px rgba(220, 50, 47, 0.15) inset,
              0 0 30px rgba(220, 50, 47, 0.25);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.35s ease,
              visibility 0.35s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.toast .toast-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(220, 50, 47, 0.15);
  border: 1px solid rgba(220, 50, 47, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc322f;
  font-size: 18px;
}

.toast .toast-content {
  flex: 1;
}

.toast .toast-title {
  color: #dc322f;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.toast .toast-message {
  color: #839496;
  font-weight: 400;
  font-size: 13px;
}

.toast .toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #586e75;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.toast .toast-close:hover {
  color: #93a1a1;
  background: rgba(147, 161, 161, 0.1);
}

/* Адаптив */
@media (max-width: 480px) {
  .login-wrapper {
    padding: 30px 20px 28px;
    border-radius: 36px;
  }
  .brand-icon {
    width: 40px;
    height: 40px;
  }
  .brand-icon i {
    font-size: 22px;
  }
  .brand-text .name {
    font-size: 22px;
  }
  .input-field input {
    padding: 14px 16px 14px 46px;
    font-size: 14px;
  }
  .toast {
    min-width: 260px;
    padding: 14px 16px;
  }
}
