/* ===== Trang đăng nhập / đăng ký (bố cục theo trang mẫu theieltsdictionary.com/login) ===== */
:root {
  --ink: #1e293b;
  --muted: #64748b;
  --soft: #94a3b8;
  --line: #eef2f6;
  --field: #f8fafc;
  --moss: #5B6B37;
  --moss-dark: #1E3006;
  --orange: #F0A22E;
  --font-body: "Quicksand", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  font-family: var(--font-body); color: var(--ink);
  background-color: #FFFDF7;
  background-image: linear-gradient(rgba(30, 48, 6, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(30, 48, 6, .045) 1px, transparent 1px);
  background-size: 48px 48px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.lang {
  position: fixed; top: 16px; right: 16px; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px;
  border: 0; border-radius: 999px; background: rgba(241, 245, 249, .9); color: #334155; font-size: 12px; font-weight: 700;
}
.lang:hover { background: #e2e8f0; }

.wrap { width: min(520px, 100% - 32px); margin: 0 auto; padding: 56px 0 40px; display: flex; flex-direction: column; align-items: center; }

/* mặt trời ló sau thẻ, mắt nhìn theo chuột */
.sun { position: relative; z-index: 0; width: 220px; height: 118px; margin-bottom: -4px; }
.sun::before { content: ""; position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; transform: translate(-50%, -30%); background: radial-gradient(circle, rgba(247, 212, 138, .55), rgba(247, 212, 138, 0) 62%); pointer-events: none; }
.sun svg { position: absolute; left: 50%; top: -34px; width: 220px; height: 220px; transform: translateX(-50%); }
.sun .rays { transform-box: view-box; transform-origin: 32px 32px; animation: sunSpin 40s linear infinite; }
.sun .sun-look { transition: transform .15s ease-out; }
@keyframes sunSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sun .rays { animation: none; } }

.card { position: relative; z-index: 1; width: 100%; border-radius: 32px; background: #fff; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(15, 23, 42, .18), 0 0 0 1px rgba(15, 23, 42, .04); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 24px; color: #fff;
  background: linear-gradient(180deg, #1E3006 0%, #33470f 100%);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--orange); display: grid; place-items: center; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.brand-mark svg { width: 24px; height: 24px; }
.brand-mark rect { stroke: #1E3006; }
.brand-mark path { stroke: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-family: var(--font-display); font-weight: 800; font-size: 15px; white-space: nowrap; }
.brand-text small { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #F7D48A; }
.brand-text small i { width: 6px; height: 6px; border-radius: 50%; background: #8BC34A; }
.tabs { display: flex; flex: none; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .28); }
.tabs button { height: 28px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .8); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--moss-dark); }

.card-body { padding: 28px 28px 22px; }
.auth h1 { margin: 0; font-size: 21px; font-weight: 700; color: var(--ink); }
.sub { margin: 6px 0 22px; font-size: 13px; color: var(--muted); }

.google {
  position: relative; width: 100%; height: 56px; display: flex; align-items: center; justify-content: center; gap: 12px;
  border: 2px solid #e2e8f0; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #e2e8f0;
  font-size: 16px; font-weight: 700; color: var(--ink); transition: transform .12s, box-shadow .12s;
}
.google:hover { border-color: #cbd5e1; }
.google:active { transform: translateY(3px); box-shadow: 0 1px 0 #e2e8f0; }
.rec { position: absolute; top: -10px; right: 16px; padding: 3px 9px; border-radius: 999px; background: #FACC15; color: #422006; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; }

.or { display: flex; align-items: center; gap: 14px; margin: 22px 0 18px; color: #cbd5e1; font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.field { display: block; margin-bottom: 16px; }
.label { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: #475569; }
.label em { flex: 1; margin-left: 6px; font-style: normal; font-weight: 600; letter-spacing: 0; color: var(--soft); font-size: 11px; }
.forgot { letter-spacing: 0; font-size: 12px; color: var(--moss); }
.forgot:hover { text-decoration: underline; }
.input { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1.5px solid transparent; border-radius: 14px; background: var(--field); color: var(--soft); transition: border-color .15s, background .15s; }
.input:focus-within { border-color: var(--moss); background: #fff; color: var(--moss); }
.input input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); }
.input input::placeholder { color: #cbd5e1; font-weight: 500; }
.input.invalid { border-color: #ef4444; background: #fff5f5; }
.eye { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; border: 0; border-radius: 8px; background: none; color: var(--soft); }
.eye:hover { color: var(--ink); background: #eef2f6; }

.agree { display: flex; gap: 10px; align-items: flex-start; margin: 4px 4px 4px; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.agree input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--moss); flex: none; }
.agree.invalid span { color: #dc2626; }

.msg { min-height: 20px; margin: 6px 4px 10px; font-size: 13px; font-weight: 600; color: #dc2626; }
.msg.info { color: #92400e; background: #FFFBEA; border-radius: 12px; padding: 10px 12px; }
.msg.info a { color: var(--moss); text-decoration: underline; font-weight: 700; }
.msg:empty { margin: 0; min-height: 10px; }

.submit {
  width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 16px; background: var(--moss); color: #fff;
  font-size: 15px; font-weight: 700; letter-spacing: .12em; box-shadow: 0 10px 20px -8px rgba(91, 107, 55, .6);
  transition: background .15s, transform .12s;
}
.submit:hover { background: #4d5c2d; }
.submit:active { transform: translateY(1px); }
.submit svg { transition: transform .15s; }
.submit:hover svg { transform: translateX(3px); }

.safe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; color: #cbd5e1; }
.back { margin-top: 26px; font-size: 13.5px; font-weight: 700; color: var(--soft); }
.back:hover { color: var(--moss); }

@media (max-width: 480px) {
  .wrap { padding-top: 40px; }
  .card { border-radius: 26px; }
  .card-head { padding: 16px; }
  .brand-text small { display: none; }
  .tabs button { padding: 0 10px; }
  .card-body { padding: 22px 18px 18px; }
}
