:root {
  --bg: #0f131a;
  --panel: #171d28;
  --border: #273142;
  --text: #e6edf7;
  --muted: #8b9bb4;
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --red: #f87171;
  --red-bg: rgba(220, 38, 38, 0.14);
  --green: #4ade80;
}

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

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg);
}

.auth-brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.auth-brand-sub {
  font-size: 12px;
  color: var(--muted);
}

h1 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 6px;
}

.subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.45;
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

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

input[type="text"],
input[type="password"] {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #3b82f6;
}

.pw-toggle {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 6px;
  cursor: pointer;
}

.pw-toggle:hover {
  color: var(--text);
  background: transparent;
}

.btn-primary {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.user-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(37, 99, 235, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}

.link-btn {
  background: transparent;
  border: none;
  color: #93c5fd;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.link-btn:hover {
  text-decoration: underline;
  background: transparent;
}

.error-box {
  display: none;
  background: var(--red-bg);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: var(--red);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.footer-link {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
