* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e0e0e0;
}
.login-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 40px;
  width: 380px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}
.login-card h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 600;
}
.login-card .sub {
  text-align: center;
  color: #888;
  margin-bottom: 30px;
  font-size: 14px;
}
.form-group {
  margin-bottom: 18px;
  position: relative;
}
.form-group label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-input:focus {
  border-color: #7c5cbf;
  box-shadow: 0 0 0 3px rgba(124, 92, 191, 0.2);
  background: rgba(255, 255, 255, 0.1);
}
.form-input::placeholder { color: #555; }

/* Стилизованный input телефона */
.phone-wrap {
  position: relative;
}
.phone-wrap .form-input {
  padding-left: 40px;
}
.phone-flag {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 17px;
  pointer-events: none;
  font-weight: 500;
}

.password-wrap {
  position: relative;
}
.toggle-pwd {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color 0.15s;
}
.toggle-pwd:hover { color: #7c5cbf; }

.login-card button[type="submit"] {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.15s, opacity 0.15s;
  margin-top: 4px;
}
.login-card button[type="submit"]:hover { transform: translateY(-1px); opacity: 0.9; }
.login-card button[type="submit"]:active { transform: translateY(0); }

.error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
  color: #ff6b6b;
  font-size: 14px;
  text-align: center;
}
.link-btn {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: #888;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.15s;
  background: none;
  border: none;
  width: 100%;
  padding: 8px;
}
.link-btn:hover { color: #7c5cbf; }

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 20px 0 16px;
  gap: 12px;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.divider-text {
  color: #555;
  font-size: 12px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: #1e1e36;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 30px;
  width: 420px;
  max-width: 90vw;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}
.modal h2 { margin-bottom: 20px; font-size: 18px; font-weight: 600; }
.modal .form-group { margin-bottom: 14px; }
.modal .form-group:last-of-type { margin-bottom: 0; }
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  justify-content: flex-end;
}
.modal-actions .btn {
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.modal-actions .btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}
.modal-actions .btn-primary:hover { opacity: 0.9; }
.modal-actions .btn-cancel {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #999;
}
.modal-actions .btn-cancel:hover { border-color: #888; color: #eee; }
