/**
 * 파일명: auth.css
 * 파일경로: /home/qrcanvas/public_html/assets/css/
 * 기능: 로그인·회원가입·마이페이지 스타일
 * 작성일: 2026-05-19
 * 수정일: 2026-05-19
 */

/* ── 헤더 nav 추가 요소 ────────────────────────────────────── */
.qrc-nav-user {
    font-size: 14px;
    font-weight: 700;
    color: var(--qrc-text);
    padding: 4px 10px;
    background: var(--qrc-soft);
    border-radius: 999px;
}

.qrc-nav-link-muted {
    font-size: 14px;
    color: var(--qrc-muted) !important;
}

/* .qrc-btn--nav 크기 오버라이드 제거 — main.css .qrc-btn 기본값 사용 */

.qrc-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--qrc-muted);
}

.qrc-footer__links a:hover { color: var(--qrc-primary); }

/* ── 로그인 / 회원가입 폼 ───────────────────────────────────── */
.qrc-auth-wrap {
    min-height: calc(100vh - 144px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

.qrc-auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--qrc-line);
    border-radius: var(--qrc-radius);
    padding: 40px 36px;
    box-shadow: var(--qrc-shadow);
}

.qrc-auth-card h1 {
    margin: 0 0 6px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.qrc-auth-sub {
    margin: 0 0 26px;
    color: var(--qrc-muted);
    font-size: 15px;
}

.qrc-auth-alert {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    word-break: keep-all;
    line-height: 1.5;
}

.qrc-auth-alert.is-error   { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.qrc-auth-alert.is-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

.qrc-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qrc-auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qrc-auth-field span {
    font-size: 13px;
    font-weight: 900;
    color: var(--qrc-muted);
    letter-spacing: 0.01em;
}

.qrc-auth-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--qrc-line);
    border-radius: 12px;
    font: inherit;
    font-size: 15px;
    background: #fff;
    color: var(--qrc-text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.qrc-auth-field input:focus {
    border-color: var(--qrc-primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.10);
}

/* 비밀번호 표시 토글 */
.qrc-pw-field {
    position: relative;
    display: flex;
}

.qrc-pw-field input {
    flex: 1;
    padding-right: 44px;
}

.qrc-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--qrc-muted);
    padding: 4px;
}

.qrc-auth-btn {
    margin-top: 6px;
    display: block;
    width: 100%;
    min-height: 50px;
    padding: 0 20px;
    border: none;
    border-radius: 14px;
    background: var(--qrc-primary);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.qrc-auth-btn:hover:not(:disabled) { background: var(--qrc-primary-dark); }
.qrc-auth-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.qrc-auth-switch {
    margin: 20px 0 0;
    text-align: center;
    font-size: 14px;
    color: var(--qrc-muted);
}

.qrc-auth-switch a { color: var(--qrc-primary); font-weight: 700; }

/* ── 마이페이지 ────────────────────────────────────────────── */
.qrc-mypage {
    padding: 48px 0 72px;
}

.qrc-mypage-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.qrc-mypage-head h1 {
    margin: 0 0 6px;
    font-size: 32px;
    letter-spacing: -0.04em;
}

.qrc-mypage-welcome {
    margin: 0;
    font-size: 15px;
    color: var(--qrc-muted);
}

.qrc-plan-badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--qrc-soft);
    color: var(--qrc-primary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.qrc-plan-badge--pro {
    background: #fef3c7;
    color: #92400e;
}

/* 빈 상태 */
.qrc-mypage-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--qrc-muted);
}

.qrc-mypage-empty p {
    font-size: 18px;
    margin-bottom: 24px;
}

/* 프로젝트 그리드 */
.qrc-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.qrc-project-card {
    background: #fff;
    border: 1px solid var(--qrc-line);
    border-radius: 18px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.qrc-project-card:hover {
    box-shadow: 0 12px 32px rgba(15,23,42,0.10);
    transform: translateY(-2px);
}

.qrc-project-thumb {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--qrc-bg);
}

.qrc-project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qrc-project-thumb-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    color: var(--qrc-line);
    letter-spacing: -0.05em;
}

.qrc-project-info {
    padding: 14px 16px;
}

.qrc-project-type {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--qrc-primary);
}

.qrc-project-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrc-project-title a { color: var(--qrc-text); }
.qrc-project-title a:hover { color: var(--qrc-primary); }

.qrc-project-date {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--qrc-muted);
}

.qrc-project-actions {
    display: flex;
    gap: 8px;
}

.qrc-project-btn {
    flex: 1;
    padding: 7px 0;
    text-align: center;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--qrc-line);
    background: #fff;
    color: var(--qrc-text);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.qrc-project-btn:hover { background: var(--qrc-soft); color: var(--qrc-primary); border-color: var(--qrc-primary); }

.qrc-project-btn--del { color: #dc2626; border-color: #fca5a5; }
.qrc-project-btn--del:hover { background: #fee2e2; color: #dc2626; border-color: #dc2626; }
.qrc-project-btn--del:disabled { opacity: 0.4; cursor: not-allowed; }

/* 페이징 */
.qrc-paging {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.qrc-paging-btn {
    min-width: 40px;
    padding: 8px 12px;
    border: 1px solid var(--qrc-line);
    border-radius: 10px;
    background: #fff;
    color: var(--qrc-muted);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.qrc-paging-btn:hover,
.qrc-paging-btn.is-current {
    background: var(--qrc-primary);
    color: #fff;
    border-color: var(--qrc-primary);
}

/* ── 계정 관리 탭 ───────────────────────────────────────────── */
.qrc-account-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border: 1px solid var(--qrc-line);
    border-radius: var(--qrc-radius);
    padding: 40px 36px;
    box-shadow: var(--qrc-shadow);
}

.qrc-account-card h1 {
    margin: 0 0 24px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.qrc-account-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--qrc-line);
}

.qrc-account-tab {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--qrc-muted);
    text-decoration: none;
    position: relative;
    bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s;
    white-space: nowrap;
}

.qrc-account-tab:hover { color: var(--qrc-primary); }

.qrc-account-tab.is-active {
    color: var(--qrc-primary);
    border-bottom-color: var(--qrc-primary);
}

.qrc-auth-btn--danger {
    background: #dc2626;
}

.qrc-auth-btn--danger:hover:not(:disabled) { background: #b91c1c; }

/* ── 반응형 ────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .qrc-auth-card  { padding: 28px 20px; }
    .qrc-account-card { padding: 28px 20px; }
    .qrc-account-tab { padding: 10px 12px; font-size: 13px; }
    .qrc-project-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .qrc-mypage-head { flex-direction: column; }
}

@media (max-width: 400px) {
    .qrc-project-grid { grid-template-columns: 1fr; }
}

/* ── QR 로그인 (login.php) ──────────────────────────────────── */
.qrc-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 14px;
    color: var(--qrc-muted);
    font-size: 13px;
}

.qrc-auth-divider::before,
.qrc-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--qrc-line);
}

.qrc-auth-btn--ghost {
    background: #fff;
    border: 1.5px solid var(--qrc-line);
    color: var(--qrc-text);
    font-weight: 700;
}

.qrc-auth-btn--ghost:hover:not(:disabled) {
    background: var(--qrc-soft);
    border-color: var(--qrc-primary);
    color: var(--qrc-primary);
}

/* QR 로그인은 크로스 디바이스(PC) 전용 — 모바일에서는 숨김 */
@media (max-width: 768px) {
    .qrc-qr-login { display: none; }
}

.qrc-qr-panel {
    margin-top: 16px;
}

.qrc-qr-panel-guide {
    margin: 0 0 16px;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    text-align: center;
}

.qrc-qr-panel-guide strong {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.qrc-qr-wrap {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 14px;
    border: 1px solid var(--qrc-line);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrc-qr-wrap svg {
    width: 100%;
    height: 100%;
    display: block;
}

.qrc-qr-placeholder {
    font-size: 13px;
    color: var(--qrc-muted);
}

/* 스캔됨 오버레이 */
.qrc-qr-wrap[data-status="scanned"]::after {
    content: '📱 스캔됨';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--qrc-primary);
}

/* 만료 오버레이 */
.qrc-qr-wrap[data-status="expired"]::after {
    content: '만료됨';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--qrc-muted);
}

/* 확인됨 오버레이 */
.qrc-qr-wrap[data-status="confirmed"]::after {
    content: '✓';
    position: absolute;
    inset: 0;
    background: rgba(220,252,231,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #15803d;
}

.qrc-qr-status {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    min-height: 20px;
    margin-bottom: 6px;
    color: var(--qrc-muted);
}

.qrc-qr-status.is-info { color: var(--qrc-primary); }
.qrc-qr-status.is-ok   { color: #15803d; }
.qrc-qr-status.is-warn { color: #dc2626; }

.qrc-qr-timer {
    text-align: center;
    font-size: 12px;
    color: var(--qrc-muted);
    margin-bottom: 10px;
}

.qrc-qr-refresh {
    width: 100%;
    margin-top: 4px;
}

/* ── QR 확인 페이지 (qr_confirm.php) ───────────────────────── */
.qrc-qr-confirm-card {
    text-align: center;
}

.qrc-qr-confirm-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
}

.qrc-qr-confirm-user {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--qrc-soft);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 20px 0;
    text-align: left;
}

.qrc-qr-confirm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--qrc-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    flex-shrink: 0;
}

.qrc-qr-confirm-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--qrc-text);
    margin-bottom: 2px;
}

.qrc-qr-confirm-email {
    font-size: 13px;
    color: var(--qrc-muted);
}

.qrc-auth-btn--ghost + .qrc-auth-btn--ghost,
#cancelBtn {
    margin-top: 10px;
}

.qrc-qr-confirm-warn {
    margin: 18px 0 0;
    font-size: 12px;
    color: var(--qrc-muted);
    line-height: 1.6;
    word-break: keep-all;
}

/* ── 소셜 로그인 버튼 (login.php) ───────────────────────── */
.qrc-social-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 4px;
}

.qrc-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: opacity 0.15s, filter 0.15s;
    border: 1.5px solid transparent;
    cursor: pointer;
}

.qrc-social-btn:hover { opacity: 0.88; filter: brightness(0.97); }

.qrc-social-btn--google {
    background: #fff;
    color: #3c4043;
    border-color: #dadce0;
}

.qrc-social-btn--kakao {
    background: #FEE500;
    color: #191919;
    border-color: #FEE500;
}

.qrc-social-btn--naver {
    background: #03C75A;
    color: #fff;
    border-color: #03C75A;
}

.qrc-social-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

.qrc-social-icon--naver {
    width: 20px;
    height: 20px;
    background: #fff;
    color: #03C75A;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
