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

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border: #30363d;
  --text-primary: #f0f6fc;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --blue: #58a6ff;
  --red: #ef4444;
  --green: #4caf50;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ── Background ── */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  pointer-events: none;
}

.c1 {
  width: 500px;
  height: 500px;
  background: var(--blue);
  top: -150px;
  left: -150px;
}

.c2 {
  width: 400px;
  height: 400px;
  background: #a78bfa;
  bottom: -100px;
  right: -100px;
}

.c3 {
  width: 300px;
  height: 300px;
  background: var(--green);
  top: 50%;
  left: 60%;
}

/* ── Card ── */
.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

/* ── Logo ── */
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 28px;
}

.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
}

.logo-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

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

/* ── Headings ── */
.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  text-align: center;
}

.login-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: center;
}

/* ── Form ── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--blue);
}

.input-icon {
  font-size: 14px;
  margin-right: 8px;
  flex-shrink: 0;
}

.input-wrap input:not(.otp-box) {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  padding: 12px 0;
}

.input-wrap input::placeholder {
  color: var(--text-muted);
}

.input-toggle {
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.input-toggle:hover {
  opacity: 1;
}

/* ── Row ── */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--blue);
  width: 14px;
  height: 14px;
}

.forgot-link {
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* ── Error ── */
.error-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

/* ── Login Button ── */
.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-login:hover {
  opacity: 0.88;
}

.btn-login:active {
  transform: scale(0.98);
}

/* ── Footer ── */
.login-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Phone hint ── */
.input-hint {
  font-size: 11px;
  margin-top: 5px;
  min-height: 16px;
}

/* ── OTP Boxes ── */
.otp-wrap {
  padding: 8px 12px;
  gap: 8px;
  align-items: center;
}

.otp-box {
  flex: 1;
  height: 28px;
  width: 28px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  caret-color: transparent;
  padding: 0;
}

.otp-box:focus {
  border-color: var(--blue);
  background: #1c2333;
}

.otp-box:not(:placeholder-shown) {
  border-color: #58a6ff99;
  background: #1a2744;
}
