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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1117;
  position: relative;
  /* overflow: hidden o'rniga auto — scroll mumkin bo'lsin */
  overflow-y: auto;
  padding: 12px 0;
}

/* Fon bezaklari */
body::before {
  content: '';
  position: fixed;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31,111,235,0.12) 0%, transparent 70%);
  top: -120px; left: -120px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18,183,106,0.10) 0%, transparent 70%);
  bottom: -80px; right: -80px;
  pointer-events: none;
  z-index: 0;
}

/* ── Sahifa konteyner ── */
.page {
  width: 100%;
  max-width: 420px;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* ── Brand (logo + nom) ── */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 18px;
}

.brand-logo {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1f6feb, #12b76a);
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(31,111,235,0.3);
}

.brand h1 {
  font-size: 20px;
  font-weight: 800;
  color: #e6edf3;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.brand p {
  font-size: 12px;
  color: #7d8fa1;
  margin-top: 2px;
}

/* ── Karta ── */
.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.card-title {
  font-size: 17px;
  font-weight: 700;
  color: #e6edf3;
  margin-bottom: 4px;
}

.card-sub {
  font-size: 13px;
  color: #7d8fa1;
  margin-bottom: 16px;
}

/* ── Rol chiplar ── */
.role-hint {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.role-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid #30363d;
  background: #1c2333;
  color: #7d8fa1;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.role-chip:hover {
  border-color: #1f6feb;
  color: #388bfd;
  background: rgba(31,111,235,0.08);
}

/* ── Xato xabari ── */
.error-box {
  background: rgba(248,81,73,0.1);
  border: 1px solid rgba(248,81,73,0.3);
  border-radius: 8px;
  padding: 8px 12px;
  color: #f85149;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
  align-items: center;
  gap: 8px;
}

/* ── Form maydonlar ── */
.field { margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #8b949e;
  margin-bottom: 6px;
}

.input-wrap { position: relative; }

.input-wrap .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #7d8fa1;
  font-size: 15px;
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 9px;
  padding: 9px 12px 9px 36px;
  color: #e6edf3;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input:focus {
  outline: none;
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31,111,235,0.15);
}

.input-wrap input::placeholder { color: #484f58; }

.toggle-pass {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #7d8fa1;
  cursor: pointer;
  font-size: 15px;
  padding: 0;
  line-height: 1;
}

.toggle-pass:hover { color: #e6edf3; }

/* ── Kirish tugmasi ── */
.btn-login {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #1f6feb, #388bfd);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(31,111,235,0.35); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Spinner ── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: #484f58;
  font-size: 11px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #30363d;
}

/* ── Demo akkountlar ── */
.demo-info {
  background: rgba(31,111,235,0.07);
  border: 1px solid rgba(31,111,235,0.18);
  border-radius: 9px;
  padding: 10px 14px;
}

.demo-info p {
  font-size: 11px;
  color: #7d8fa1;
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.demo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid rgba(48,54,61,0.4);
}

.demo-item:last-child { border-bottom: none; padding-bottom: 0; }

.demo-item .label { font-size: 12px; color: #8b949e; }

.demo-item .val {
  font-size: 12px;
  font-weight: 600;
  color: #388bfd;
  cursor: pointer;
  font-family: monospace;
}

.demo-item .val:hover { color: #79c0ff; }

/* ── Footer ── */
.footer {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: #484f58;
}

.footer a { color: #388bfd; text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 20px; right: 20px;
  background: #3fb950;
  color: #fff;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 7px;
  z-index: 999;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
