:root {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --accent: #22c55e;
  --accent-hover: #16a34a;
  --error-bg: rgba(239, 68, 68, 0.14);
  --error-border: rgba(239, 68, 68, 0.45);
  --error-text: #fca5a5;
  --success-bg: rgba(34, 197, 94, 0.14);
  --success-border: rgba(34, 197, 94, 0.45);
  --success-text: #86efac;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at top, #1e293b 0%, var(--bg-page) 65%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-wrapper {
  width: 100%;
  max-width: 400px;
}

.login-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.brand-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.subtitle strong {
  color: var(--text-main);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

input[type="text"] {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 16px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-primary {
  width: 100%;
  background-color: var(--accent);
  color: #052e16;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s, opacity 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
  color: #ffffff;
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.status-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid transparent;
}

.status-error {
  background-color: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error-text);
}

.status-success {
  background-color: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.login-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
}

.bot-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.avatar-ring {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #22c55e, #38bdf8);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bot-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--bg-input);
  display: block;
}

.avatar-fallback {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--bg-input);
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.bot-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bot-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.bot-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent);
  display: inline-block;
}

@media (max-width: 420px) {
  .login-card {
    padding: 22px 18px;
  }
}