/* ============================================================
   만세케어 — 로그인/회원가입 페이지 전용 스타일
   ============================================================ */

/* 헤더 투명 처리 */
.header { background: #FDCB26; border-bottom: none; backdrop-filter: none; }
.header.scrolled { background: #FDCB26; box-shadow: var(--shadow-sm); }
.header .btn-primary { background: #ED6F23; color: #fff; box-shadow: 0 6px 16px rgba(237,111,35,.3); }
.header .btn-primary:hover { background: #d85f17; }
.header .btn-ghost { border-color: rgba(58,44,0,.28); color: #3a2c00; }
.header .btn-ghost:hover { background: rgba(255,255,255,.4); }

/* 배경 레이아웃 */
.auth-wrap { margin-top: -74px; padding: calc(74px + clamp(56px,7vw,96px)) 0 clamp(56px,7vw,96px); background: var(--bg); position: relative; overflow: hidden; display: flex; align-items: flex-start; min-height: 0; }
.auth-wrap::before { content: ""; position: absolute; width: 38vw; height: 38vw; max-width: 480px; max-height: 480px; border-radius: 50%; background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%); top: -12%; right: -10%; z-index: 0; }
.auth-wrap::after { content: ""; position: absolute; width: 28vw; height: 28vw; max-width: 360px; max-height: 360px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%); bottom: -8%; left: -6%; z-index: 0; }

/* 2컬럼 셸 */
.auth-shell { width: 100%; display: grid; grid-template-columns: 1fr 450px; gap: clamp(40px,6vw,80px); align-items: start; position: relative; z-index: 1; }

/* 좌측 인트로 */
.auth-intro { color: var(--ink); }
.auth-intro h1 { font-size: clamp(34px,5vw,56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 20px 0 0; color: var(--ink); }
.auth-intro h1 .hl { color: var(--primary-deep); }
.auth-intro p { font-size: clamp(16px,1.8vw,19px); font-weight: 600; margin: 18px 0 0; max-width: 480px; line-height: 1.6; color: var(--muted); }
.auth-intro .perks { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 32px; }
.auth-intro .perks .p { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.auth-intro .perks .p:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.auth-intro .perks .p .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-deep); display: grid; place-items: center; font-size: 20px; flex: none; }
.auth-intro .perks .p b { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; }
.auth-intro .perks .p em { font-size: 13px; color: var(--muted); font-weight: 600; font-style: normal; }

/* 로그인 카드 */
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(32px,4vw,44px); box-shadow: 0 20px 50px -20px rgba(32,41,46,.18), 0 6px 18px rgba(32,41,46,.06); }
.auth-card .ac-head { text-align: center; margin-bottom: 30px; }
.auth-card .ac-head h2 { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.auth-card .ac-head p { font-size: 15px; color: var(--muted); margin: 6px 0 0; }

/* 폼 */
.auth-form { display: flex; flex-direction: column; gap: 0px; }

/* 라벨 위 필드 */
.auth-field { display: flex; flex-direction: column; gap: 3px; }
.auth-label { font-size: 13.5px; font-weight: 700; color: #3a474e; }
.auth-input { width: 100%; height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 15px; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
.auth-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(253,203,38,.18); }
.auth-input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #fff inset !important; -webkit-text-fill-color: #111 !important; }
.auth-input.ok { border-color: #2ECC9A; box-shadow: 0 0 0 3px rgba(46,204,154,.12); }
.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 46px; }
.auth-reveal { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; font-size: 17px; }
.auth-input.error { border-color: #E74C3C; box-shadow: 0 0 0 3px rgba(231,76,60,.1); }
.auth-error { font-size: 13px; color: #E74C3C; margin: 0; }

/* 로그인 토스트 */
.login-toast { position: fixed; top: 110px; left: 50%; transform: translateX(-50%) translateY(-16px); background: #E74C3C; color: #fff; padding: 18px 32px; border-radius: 10px; font-size: 16px; font-weight: 600; opacity: 0; transition: opacity .25s, transform .25s; z-index: 9999; white-space: pre-line; text-align: center; max-width: 90vw; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.22); }
.login-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 자동로그인 + 링크 행 */
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--muted); margin-top: 20px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; color: var(--ink); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box { width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; transition: background .15s, border-color .15s; background: #fff; }
.check .box::after { content: ""; width: 11px; height: 6px; border-left: 2.5px solid transparent; border-bottom: 2.5px solid transparent; transform: rotate(-45deg) translate(2px,-1px); transition: border-color .15s; }
.check input:checked + .box { background: #ED6F23; border-color: #ED6F23; }
.check input:checked + .box::after { border-color: #fff; }
.auth-row .links { display: flex; gap: 14px; align-items: center; }
.auth-row .links a { color: var(--muted); font-weight: 600; }
.auth-row .links a:hover { color: var(--primary-deep); }
.auth-row .links .sep { color: var(--line); }

/* 인트로 이미지 */
.auth-intro-img { display: block; width: 900px; margin-top: -120px; margin-left:50px;object-fit: contain; }

/* 케어 카드 그리드 */
.care-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; }
.care-card { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; }
.care-card-tag {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-deep);
    background: var(--primary-soft);
    border-radius: 20px;
    padding: 4px 12px;
    letter-spacing: .02em;
    margin-bottom: 2px;
}
.care-card-icon { display: flex; align-items: center; justify-content: center; position: relative; height: 80px; }
#cc-health .care-card-img  { width: 80px; height: auto; }
#cc-daily .care-card-img { width: 80px; height: auto; }
#cc-nursing .care-card-img { width: 80px; height: auto; }
#cc-housing .care-card-img { width: 80px; height: auto; }
.care-card-list { list-style: none; margin: 6px 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; width: 100%; }
.care-card-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); font-weight: 400; }
.care-card-list .num { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #fee500; color: #3a2c00; font-size: 10px; font-weight: 800; flex: none; }

/* 로그인 버튼 */
.btn-login { width: 100%; height: 50px; font-size: 17px; font-weight: 800; border-radius: 8px; background: #ED6F23; color: #fff; border: none; cursor: pointer; font-family: inherit; letter-spacing: -.01em; transition: background .15s, transform .12s; margin-top: 10px; }
.btn-login:hover { background: #d85f17; color: #fff; }
.btn-login:active { transform: translateY(1px); }

/* 구분선 */
.divider-or { display: flex; align-items: center; gap: 14px; margin: 28px 0 22px; color: var(--muted); font-size: 13.5px; font-weight: 700; letter-spacing: .04em; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* SNS 로그인 */
.social { display: flex; flex-direction: column; gap: 10px; }
.social a { height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 8px; font-weight: 800; font-size: 16px; transition: filter .15s, transform .12s; border: 1px solid transparent; text-decoration: none; }
.social a:active { transform: translateY(1px); }
.social .kakao { background: #FEE500; color: #3C1E1E; }
.social .kakao:hover { filter: brightness(.96); }
.social .naver { background: #03C75A; color: #fff; }
.social .naver:hover { filter: brightness(.94); }
.social .naver-n { font-weight: 900; font-size: 16px; }

/* 하단 회원가입 링크 */
.ac-footer { text-align: center; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.ac-footer a { color: #ed6f23; font-weight: 800; }
.ac-footer a:hover { text-decoration: underline; }

/* 반응형 */
@media (max-width:980px) {
    .auth-shell { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .auth-intro { text-align: center; }
    .auth-intro p { margin-left: auto; margin-right: auto; }
    .auth-intro .perks { display: none; }
    .care-cards { display: none; }
}
@media (max-width:560px) {
    .auth-wrap { padding-top: calc(74px + 20px); }
    .auth-intro { display: none; }
    .auth-row { flex-direction: column; gap: 14px; align-items: stretch; }
    .auth-row .links { justify-content: center; }
}

/* 최근 사용 뱃지 */
.last-login-wrap { position: relative; }
.last-login-callout {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #FF6448;
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 11px;
    border-radius: 20px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
}
.last-login-callout::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #FF6448;
    border-bottom: 0;
}

/* ── FindId / FindPassword 공통 ── */
.fi-row{display:flex;gap:8px;align-items:stretch;}
.fi-row .auth-input{flex:1;min-width:0;}
.fi-otp-btn{flex:none;height:44px;padding:0 16px;background:#ffe86e;color:var(--ink);border:1.5px solid #e6cf00;border-radius:8px;font-family:inherit;font-size:14px;font-weight:800;cursor:pointer;white-space:nowrap;transition:background .15s;}
.fi-otp-btn:hover{background:#ffd700;border-color:#ffd700;}
.fi-otp-btn:disabled{background:#fff8d6;color:#c9a800;border-color:#e6cf00;cursor:not-allowed;}
.fi-otp-btn.sent{background:#f0fdf8;border-color:#2ECC9A;color:#1a9e70;}
.fi-otp-btn.sent:hover{background:#e0faf0;border-color:#2ECC9A;}
.fi-timer{flex:none;align-self:center;font-size:14px;font-weight:700;color:#E74C3C;padding:0 4px;min-width:36px;text-align:center;}
.input-hint{font-size:13px;color:var(--muted);margin-top:2px;line-height:1.3;}
.input-hint.ok{color:#1a9e70;}
.input-hint.error{color:#E74C3C;}
.fi-code-wrap{position:relative;flex:1;}
.fi-code-wrap .auth-input{padding-right:60px;}
.fi-code-wrap .fi-timer{position:absolute;right:12px;top:50%;transform:translateY(-50%);min-width:auto;padding:0;}
.btn-login:disabled{background:#ccc;cursor:not-allowed;}
.auth-field+.auth-field{margin-top:0px;}
/* FindId 전용 */
.fi-result{background:var(--primary-soft);border:1.5px solid var(--primary);border-radius:12px;padding:22px 24px;text-align:center;margin-top:8px;}
.fi-result .rl{font-size:13px;color:var(--muted);font-weight:700;margin-bottom:6px;}
.fi-result .rid{font-size:26px;font-weight:900;color:#3a2c00;letter-spacing:.06em;}
.fi-result .rn{font-size:13px;color:var(--muted);margin-top:6px;}
/* FindPassword 전용 */
.fi-success{background:#f0fdf4;border:1.5px solid #22c55e;border-radius:12px;padding:22px 24px;text-align:center;}
.fi-success p{color:#166534;font-size:15px;font-weight:700;margin:0;line-height:1.6;}
