/* account.css — 로그인 · 마이페이지 · 주문조회 공용 스타일
   style.css 의 브랜드 토큰(--cuddles-*, --text-brown ...)을 그대로 씁니다. */

.auth-page {
    min-height: 70vh;
    padding: 120px 0 80px;
    background: linear-gradient(180deg, var(--bg-cream) 0%, var(--bg-warm) 240px);
}

.auth-card {
    max-width: 440px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 20px;
    padding: 36px 32px 32px;
    box-shadow: 0 4px 28px rgba(74, 59, 50, .08);
}
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; letter-spacing: -.02em; }
.auth-card .auth-sub { color: var(--text-light); font-size: .92rem; margin-bottom: 26px; }

/* 로그인 / 회원가입 전환 */
.auth-tabs { display: flex; gap: 4px; background: var(--bg-cream); border-radius: 12px; padding: 4px; margin-bottom: 26px; }
.auth-tabs button {
    flex: 1; border: 0; background: transparent; cursor: pointer;
    font-family: inherit; font-size: .95rem; font-weight: 600; color: var(--text-light);
    padding: 10px; border-radius: 9px; transition: all .18s;
}
.auth-tabs button.active { background: var(--white); color: var(--text-brown); box-shadow: 0 1px 4px rgba(74, 59, 50, .1); }

.auth-field { margin-bottom: 16px; }
.auth-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; }
.auth-field input {
    width: 100%; padding: 13px 14px; border: 1.5px solid #E8DED4; border-radius: 11px;
    font-family: inherit; font-size: 16px; /* iOS 자동확대 방지 — 16px 미만이면 확대됩니다 */
    background: var(--white); color: var(--text-brown); transition: border-color .18s;
}
.auth-field input:focus { outline: 0; border-color: var(--cuddles-coral); }
.auth-field .hint { font-size: .78rem; color: var(--text-light); margin-top: 6px; }

.auth-btn {
    width: 100%; padding: 14px; border: 0; border-radius: 11px; cursor: pointer;
    font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--white);
    background: var(--cuddles-coral); transition: filter .18s, opacity .18s;
}
.auth-btn:hover:not(:disabled) { filter: brightness(1.06); }
.auth-btn:disabled { opacity: .55; cursor: default; }
.auth-btn.secondary { background: transparent; color: var(--text-brown); border: 1.5px solid #E8DED4; }

.auth-links { display: flex; justify-content: space-between; margin-top: 16px; font-size: .85rem; }
.auth-links a { color: var(--text-light); cursor: pointer; }
.auth-links a:hover { color: var(--cuddles-coral); text-decoration: underline; }

.auth-msg { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; font-size: .87rem; line-height: 1.55; }
.auth-msg.err { background: #FDECEC; color: #A3323F; }
.auth-msg.ok { background: #EAF7F4; color: #23695E; }
.auth-msg.info { background: var(--bg-cream); color: var(--text-brown); }

/* 소셜 로그인 */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 20px; color: var(--text-light); font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #EDE3D9; }

.social-grid { display: grid; gap: 9px; }
.social-btn {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    width: 100%; padding: 12px; border-radius: 11px; cursor: pointer;
    font-family: inherit; font-size: .93rem; font-weight: 600;
    border: 1.5px solid #E8DED4; background: var(--white); color: var(--text-brown);
    transition: filter .18s, background .18s;
}
.social-btn:hover { filter: brightness(.97); }
.social-btn i, .social-btn svg { font-size: 1.05rem; }
.social-btn.kakao { background: #FEE500; border-color: #FEE500; color: #191600; }
.social-btn.naver { background: #03C75A; border-color: #03C75A; color: #fff; }
.social-btn.apple { background: #000; border-color: #000; color: #fff; }
.social-btn.facebook { background: #1877F2; border-color: #1877F2; color: #fff; }

/* ── 마이페이지 ───────────────────────────────────────────────────────── */
.account-page { padding: 118px 0 80px; min-height: 70vh; }
.account-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.account-head h1 { font-size: 1.8rem; letter-spacing: -.02em; }
.account-head .who { color: var(--text-light); font-size: .92rem; margin-top: 4px; }
.account-head .who b { color: var(--text-brown); }

.account-tabs { display: flex; gap: 6px; border-bottom: 1.5px solid #EDE3D9; margin: 26px 0 28px; overflow-x: auto; }
.account-tabs button {
    border: 0; background: transparent; cursor: pointer; white-space: nowrap;
    font-family: inherit; font-size: .96rem; font-weight: 600; color: var(--text-light);
    padding: 11px 16px; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; transition: all .18s;
}
.account-tabs button.active { color: var(--cuddles-coral); border-bottom-color: var(--cuddles-coral); }

.panel { display: none; }
.panel.active { display: block; }

.card {
    background: var(--white); border: 1.5px solid #F0E7DD; border-radius: 16px;
    padding: 22px 24px; margin-bottom: 14px;
}
.card-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.card-top h3 { font-size: 1.05rem; }
.card .meta { color: var(--text-light); font-size: .84rem; }

.badge {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: .74rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
}
.badge.paid { background: #EAF7F4; color: #23695E; }
.badge.preparing { background: #FFF3E0; color: #8A5A16; }
.badge.shipped { background: #E7F1FA; color: #2A5C82; }
.badge.delivered { background: #EAF7F4; color: #23695E; }
.badge.canceled, .badge.refunded, .badge.partial_refunded { background: #F3EFEC; color: #7A6B62; }
.badge.active { background: #EAF7F4; color: #23695E; }
.badge.past_due { background: #FDECEC; color: #A3323F; }
.badge.completed { background: #F3EFEC; color: #7A6B62; }
.badge.service { background: #F1EDF7; color: #56479B; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: .9rem; }
.kv dt { color: var(--text-light); }
.kv dd { text-align: right; }

.track-row {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
    margin-top: 14px; padding-top: 14px; border-top: 1px dashed #EDE3D9; font-size: .89rem;
}
.track-row .tno { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }

.mini-btn {
    padding: 8px 14px; border-radius: 9px; border: 1.5px solid #E8DED4; background: var(--white);
    font-family: inherit; font-size: .85rem; font-weight: 600; color: var(--text-brown); cursor: pointer;
}
.mini-btn:hover { background: var(--bg-cream); }
.mini-btn.danger { border-color: #E8C4C4; color: #A3323F; }
.mini-btn.danger:hover { background: #FDECEC; }

.empty { text-align: center; padding: 54px 20px; color: var(--text-light); }
.empty .big { font-size: 2.2rem; margin-bottom: 12px; }

.notice-bar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
    background: #FFF6E6; border: 1.5px solid #F3E0BC; border-radius: 13px;
    padding: 14px 18px; margin-bottom: 20px; font-size: .89rem; line-height: 1.55;
}
.notice-bar.good { background: #EAF7F4; border-color: #C6E7E0; }

/* 해지 확인 모달 */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(40, 30, 25, .5);
    display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1200;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--white); border-radius: 20px; padding: 30px 28px;
    max-width: 480px; width: 100%; max-height: 88vh; overflow-y: auto;
}
.modal-box h3 { font-size: 1.2rem; margin-bottom: 12px; }
.modal-box p { font-size: .92rem; line-height: 1.65; margin-bottom: 12px; }
.penalty-box { background: var(--bg-cream); border-radius: 13px; padding: 18px; margin: 16px 0; }
.penalty-box .amount { font-size: 1.7rem; font-weight: 800; color: var(--cuddles-coral); margin: 6px 0 10px; }
.penalty-box .calc { font-size: .82rem; color: var(--text-light); line-height: 1.7; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; }

.agree-line { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; margin-top: 14px; line-height: 1.55; }
.agree-line input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--cuddles-coral); flex-shrink: 0; }

/* 주문서 이메일 칸 안내 — 정기결제를 고르면 강조로 바뀝니다. */
.field-help {
    font-size: .82rem; line-height: 1.6; color: var(--text-light);
    margin: 8px 2px 0;
}
.field-help b { color: var(--text-brown); font-weight: 700; }
.field-help.emphasis {
    background: var(--bg-cream); border-left: 3px solid var(--cuddles-peach);
    border-radius: 0 9px 9px 0; padding: 10px 13px; margin-top: 10px; color: var(--text-brown);
}

/* 로그인 안내 배너 (주문서 상단) */
.login-nudge {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
    background: var(--bg-cream); border: 1.5px solid #EFE2D4; border-radius: 13px;
    padding: 14px 18px; margin-bottom: 20px; font-size: .89rem; line-height: 1.5;
}
.login-nudge.signed { background: #EAF7F4; border-color: #C6E7E0; }
.login-nudge a { font-weight: 700; color: var(--cuddles-coral); white-space: nowrap; }

@media (max-width: 600px) {
    .auth-page { padding-top: 100px; }
    .auth-card { padding: 28px 22px 26px; border-radius: 16px; }
    .account-page { padding-top: 100px; }
    .card { padding: 18px 16px; }
    .kv { grid-template-columns: 1fr; gap: 3px 0; }
    .kv dd { text-align: left; margin-bottom: 8px; font-weight: 600; }
}
