/* =========================================================
   제로투맥스 회원 — 로그인/회원가입/마이페이지/프로필 드롭다운
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
a { text-decoration: none; color: inherit; }
:root {
  --brand: #2962ff; --brand-ink: #1b4ed8; --navy: #0b1326;
  --ink: #101828; --ink2: #475467; --ink3: #98a2b3;
  --line: #eaecf2; --bg-soft: #f6f8fb; --bad: #e11d48; --good: #12b76a;
}
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 18px; background: radial-gradient(1200px 600px at 50% -10%, #eef3ff 0%, #f6f8fb 55%, #f6f8fb 100%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 40px 36px 34px; box-shadow: 0 24px 60px rgba(16,24,40,.10); }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 24px; text-decoration: none; }
.auth-brand img { height: 26px; width: auto; }
.auth-brand b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.auth-title { font-size: 27px; font-weight: 900; letter-spacing: -.02em; color: var(--ink); }
.auth-sub { font-size: 13.5px; color: var(--ink2); margin-top: 12px; line-height: 1.55; }

.auth-form { margin-top: 26px; }
.fld { margin-bottom: 16px; }
.fld label { display: block; font-size: 12.5px; font-weight: 800; color: var(--ink); margin-bottom: 7px; }
.fld label .req { color: var(--brand); }
.fld input { width: 100%; height: 50px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 15px; font-family: inherit; font-size: 15px; background: #f7f9fc; outline: none; transition: border-color .14s, background .14s; }
.fld input:focus { border-color: var(--brand); background: #fff; }
.fld input::placeholder { color: #b6bdca; }
.fld .hint { font-size: 11.5px; color: var(--ink3); margin-top: 6px; }
.fld.err input { border-color: var(--bad); background: #fff5f7; }
.fld .err-msg { display: none; font-size: 11.5px; color: var(--bad); margin-top: 6px; font-weight: 600; }
.fld.err .err-msg { display: block; }

.auth-btn { width: 100%; height: 54px; border: 0; border-radius: 13px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; transition: background .14s, transform .12s; margin-top: 8px; }
.auth-btn:hover { background: var(--brand-ink); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .6; cursor: wait; }

.auth-alert { display: none; margin-top: 14px; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 11px 13px; line-height: 1.5; }
.auth-alert.err { display: block; color: var(--bad); background: #fef2f4; border: 1px solid #fbdbe2; }
.auth-alert.ok { display: block; color: #067647; background: #e9f8f0; border: 1px solid #c7ecd8; }

.auth-foot { text-align: center; margin-top: 22px; font-size: 13.5px; color: var(--ink2); }
.auth-foot a { color: var(--brand); font-weight: 800; }
.auth-foot a:hover { text-decoration: underline; }
.auth-foot .sep { display: block; margin-top: 12px; }
.auth-foot .muted { color: var(--ink3); font-weight: 600; }
.auth-foot .muted:hover { color: var(--ink2); text-decoration: underline; }

/* 약관 동의 */
.consent { margin-top: 6px; border: 1px solid var(--line); border-radius: 14px; padding: 6px 4px; }
.consent .crow { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; }
.consent .crow.all { border-bottom: 1px solid var(--line); }
.consent .crow.all b { font-size: 14px; font-weight: 800; }
.consent .crow.all .mini { font-size: 11.5px; color: var(--ink3); font-weight: 600; margin-left: 6px; }
.consent .crow.sub { padding-left: 26px; }
.consent input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; border: 1.5px solid #cdd5e2; border-radius: 6px; margin-top: 1px; cursor: pointer; position: relative; transition: background .12s, border-color .12s; }
.consent input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
.consent input[type="checkbox"]:checked::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.consent .ctext { font-size: 13px; color: var(--ink); line-height: 1.5; }
.consent .ctext .tag { font-weight: 800; color: var(--brand); }
.consent .ctext .tag.opt { color: var(--ink3); }
.consent .ctext a { text-decoration: underline; color: var(--ink2); font-weight: 700; }
.consent .cdesc { font-size: 11px; color: var(--ink3); line-height: 1.6; margin-top: 5px; }
.consent .cdesc .dot { color: #cdd5e2; margin: 0 5px; }
.consent .bene { display: inline-block; font-size: 10.5px; font-weight: 800; color: #b26a00; background: #fff4e0; border-radius: 6px; padding: 2px 7px; margin-left: 6px; }

/* =========================================================
   프로필 드롭다운 (헤더 우측)
   ========================================================= */
.auth-slot { display: inline-flex; align-items: center; gap: 10px; }
.auth-login-link { font-weight: 700; font-size: 13.5px; color: var(--ink2); }
.auth-login-link:hover { color: var(--ink); }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; position: relative; background: none; }
.avatar-btn .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; background: linear-gradient(150deg, #1b3aa0, #2962ff); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #dfe7ff; }

.profile-menu { position: fixed; z-index: 200; width: 264px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 50px rgba(16,24,40,.18); padding: 8px; opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .14s, transform .14s; }
.profile-menu.on { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.pm-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 14px; }
.pm-head .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 17px; background: linear-gradient(150deg, #1b3aa0, #2962ff); flex: none; }
.pm-head .who { min-width: 0; }
.pm-head .who b { display: block; font-size: 14.5px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-head .who span { display: block; font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-div { height: 1px; background: var(--line); margin: 4px 6px; }
.pm-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 0; background: none; padding: 11px 12px; border-radius: 11px; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; font-family: inherit; }
.pm-item:hover { background: var(--bg-soft); }
.pm-item .ic { width: 20px; text-align: center; font-size: 15px; flex: none; }
.pm-item .badge { margin-left: auto; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--bg-soft); color: var(--ink3); }
.pm-item .badge.soon { background: #fff4e0; color: #b26a00; }
.pm-item.danger { color: var(--bad); }
.pm-item.danger:hover { background: #fef2f4; }

/* 마이페이지 */
.me-wrap { max-width: 640px; margin: 0 auto; padding: 40px 20px 80px; }
.me-head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.me-head .av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 26px; background: linear-gradient(150deg, #1b3aa0, #2962ff); flex: none; }
.me-head h1 { font-size: 22px; letter-spacing: -.01em; }
.me-head .em { font-size: 13.5px; color: var(--ink3); margin-top: 3px; }
.me-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px 6px; margin-bottom: 16px; }
.me-card h2 { font-size: 13px; color: var(--ink3); font-weight: 800; padding: 12px 14px 6px; }
.me-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-top: 1px solid #f0f3f9; font-size: 14px; }
.me-row:first-of-type { border-top: 0; }
.me-row .k { color: var(--ink3); font-weight: 700; }
.me-row .v { color: var(--ink); font-weight: 700; }
.me-empty { text-align: center; color: var(--ink3); font-size: 13.5px; padding: 34px 0; }
.me-logout { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--bad); font-weight: 800; font-size: 14px; cursor: pointer; }
.me-logout:hover { background: #fef2f4; border-color: #fbdbe2; }

@media (max-width: 480px) {
  .auth-card { padding: 32px 22px 28px; border-radius: 18px; }
  .auth-title { font-size: 24px; }
  .profile-menu { width: min(264px, calc(100vw - 24px)); }
}
