:root {
  --bg: #0A0A14;
  --card: #14142B;
  --border: #2A2A45;
  --muted: #7A7A95;
  --text: #E8E8F0;
  --cyan: #3FB8FF;
  --error: #FF5C7A;
  --gradient: linear-gradient(135deg, #3FB8FF 0%, #2C5BFF 50%, #5B2EE0 100%);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.brand {
  text-align: center;
  margin-bottom: 32px;
}

.logo-img {
  display: block;
  margin: 0 auto 20px;
  max-height: 100px;
  width: auto;
}

.logo {
  margin: 0;
  line-height: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}

.logo-brand {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.logo-module {
  font-size: 24px;
  font-weight: 400;
  color: var(--cyan);
  letter-spacing: 0.01em;
}

.tagline {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(63, 184, 255, 0.15);
}

input::placeholder {
  color: #4A4A65;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}

.eye-btn:hover {
  color: var(--cyan);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.remember input {
  accent-color: var(--cyan);
  cursor: pointer;
}

.forgot {
  color: var(--cyan);
  text-decoration: none;
}

.forgot:hover {
  text-decoration: underline;
}

.btn-primary {
  background: var(--gradient);
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  margin-top: 6px;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(63, 184, 255, 0.25);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  cursor: wait;
  opacity: 0.8;
}

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-primary.loading .spinner {
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  display: none;
  color: var(--error);
  font-size: 13px;
  text-align: center;
  background: rgba(255, 92, 122, 0.08);
  border: 1px solid rgba(255, 92, 122, 0.2);
  border-radius: 8px;
  padding: 10px 12px;
}

.error.visible {
  display: block;
}

.footer {
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
