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

:root {
  --accent:       #7c6ff7;
  --accent-glow:  rgba(124, 111, 247, 0.22);
  --card-bg:      rgba(255, 255, 255, 0.82);
  --card-border:  rgba(0, 0, 0, 0.07);
  --text:         #1a1a2e;
  --text-muted:   #7c7c9a;
  --input-bg:     rgba(255, 255, 255, 0.75);
  --input-border: rgba(0, 0, 0, 0.13);
  --radius:       14px;
  --radius-sm:    8px;
}

/* ── Background — same as other pages ──────────────────── */
html, body {
  min-height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: url('images/bg.png') center / cover fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ── Card ───────────────────────────────────────────────── */
.login-card {
  width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 44px 40px 40px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.8) inset,
    0 24px 56px -8px rgba(0, 0, 0, 0.18),
    0 8px 16px -4px rgba(0, 0, 0, 0.08);
  animation: cardIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Brand mark ─────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #7c6ff7, #38bdf8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(124,111,247,0.35);
  flex-shrink: 0;
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ── Headings ───────────────────────────────────────────── */
.card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  line-height: 1.2;
}

.card-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

/* ── Fields ─────────────────────────────────────────────── */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #4b4b6a;
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.input-wrap {
  position: relative;
}

.input-wrap input,
.field > input {
  width: 100%;
  height: 44px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  caret-color: var(--accent);
}

.input-wrap input {
  padding-right: 44px;
}

.input-wrap input:focus,
.field > input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrap input::placeholder,
.field > input::placeholder {
  color: #b0b0c8;
}

/* password toggle */
.toggle-pw {
  position: absolute;
  right: 0;
  top: 0;
  height: 44px;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #b0b0c8;
  transition: color 0.15s;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.toggle-pw:hover { color: var(--text-muted); }

/* select */
.field select {
  width: 100%;
  height: 44px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  padding: 0 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c7c9a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.field select:focus {
  border-color: var(--accent);
  background-color: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field select option {
  background: #fff;
  color: var(--text);
}

/* ── Forgot link ────────────────────────────────────────── */
.recover {
  text-align: right;
  margin: -4px 0 20px;
}

.recover a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.recover a:hover { opacity: 1; text-decoration: underline; }

/* ── Primary button ─────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(124,111,247,0.35);
}

.btn-primary:hover {
  background: #8b80f9;
  box-shadow: 0 6px 22px rgba(124,111,247,0.45);
}

.btn-primary:active {
  transform: scale(0.985);
}

/* ── Divider ────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
  margin: 24px 0;
}

/* ── Switch link ────────────────────────────────────────── */
.switch-link {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.switch-link button {
  background: none;
  border: none;
  color: var(--accent);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.9;
  transition: opacity 0.15s;
}

.switch-link button:hover { opacity: 1; text-decoration: underline; }
