/* auth.css - auth/account/privacy pages. Uses variables from modern.css */
.auth-container { padding: 24px 0; min-height: calc(100vh - 160px); }
.auth-card { max-width: 440px; padding: 40px; border-radius: 20px; box-shadow: var(--shadow-soft); }
.auth-card h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; margin-bottom: 8px; }
.auth-card .auth-lead { color: var(--text-secondary); margin-bottom: 28px; line-height: 1.5; }
.auth-card p { line-height: 1.55; }
.auth-card .accent, .auth-card p a { color: var(--accent-color); text-underline-offset: 3px; }

.auth-card .form-group { margin-bottom: 18px; }
.auth-card .form-group label { font-size: 14px; margin-bottom: 8px; }
.auth-card .form-control { min-height: 48px; font-size: 16px; /* 16px stops iOS zoom */ }
.auth-card .form-control:hover { border-color: rgba(245, 158, 11, 0.35); }
.auth-card .form-control:focus,
.auth-card .form-control:focus-visible { outline: none; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28); }
.auth-card .form-control[aria-invalid="true"] { border-color: var(--danger-color); }
.auth-card .form-control[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.28); }

.password-field { position: relative; }
.password-field .form-control { padding-right: 52px; }
.password-toggle { position: absolute; top: 0; right: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 0 10px 10px 0; color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.password-toggle:hover { color: var(--text-primary); }
.password-toggle:focus-visible { outline: 2px solid var(--accent-color); outline-offset: -2px; }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle .icon-hide { display: none; }
.password-toggle[aria-pressed="true"] .icon-show { display: none; }
.password-toggle[aria-pressed="true"] .icon-hide { display: block; }

.auth-card .form-error { margin-top: 6px; font-size: 13px; line-height: 1.4; }
.auth-card .form-error.form-error--box { margin: 0 0 18px; padding: 12px 14px; font-size: 14px;
    background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.35); border-radius: 10px; }
.auth-card .form-text { margin-top: 6px; line-height: 1.45; }
.auth-card .form-text ul { list-style: none; padding: 0; }
.auth-card .form-text li { padding-left: 14px; position: relative; margin-top: 2px; }
.auth-card .form-text li::before { content: '\2022'; position: absolute; left: 2px; color: var(--accent-color); }

.auth-card .btn { min-height: 48px; font-size: 15px; }
.auth-card .full-width { width: 100%; }
.auth-card .btn:focus-visible, .auth-links a:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 3px; }
.auth-card .btn[disabled], .auth-card .btn.is-loading { opacity: 0.75; cursor: progress; transform: none; box-shadow: none; }
.auth-card .btn.is-loading::before { content: ''; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: auth-spin 0.7s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
.auth-form { margin-bottom: 22px; }
.auth-links { font-size: 14px; line-height: 1.6; }
.auth-links a { display: inline-block; padding: 10px 4px; }

/* Destructive pages */
.danger-title { color: var(--danger-color); }
.danger-notice { margin: 0 0 22px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 1.55;
    color: var(--text-primary); background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.4); }
.danger-notice strong { color: var(--danger-color); }
.btn.danger-btn { background: var(--danger-color); color: #fff; border: 1px solid transparent; }
.btn.danger-btn:hover { background: #dc2626; box-shadow: 0 0 22px rgba(239, 68, 68, 0.4); transform: translateY(-2px); }
.btn.danger-btn:focus-visible { outline-color: #fca5a5; }
.confirm-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.confirm-actions .btn { width: 100%; }
@media (min-width: 520px) {
    .confirm-actions { flex-direction: row; }
    .confirm-actions .btn { flex: 1; }
}
.auth-card.confirm-card { max-width: 500px; }

/* Privacy policy */
.policy-container { padding: 40px; max-width: 900px; margin: 0 auto; border: 1px solid var(--border-glass); border-radius: 20px; }
.policy-header { margin-bottom: 24px; }
.policy-header h1 { font-size: 34px; font-weight: 800; line-height: 1.15; margin-bottom: 8px; letter-spacing: -0.5px;
    background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.policy-header .subtitle { color: var(--text-secondary); font-size: 14px; }
.policy-content { line-height: 1.75; color: var(--text-primary); }
.policy-content > p, .policy-section p, .policy-section ul { max-width: 70ch; }
.policy-section { margin-bottom: 40px; scroll-margin-top: 80px; }
.policy-section h2 { color: var(--accent-color); margin-bottom: 18px; font-size: 24px; font-weight: 700; letter-spacing: -0.3px; line-height: 1.3; }
.policy-section h3 { font-size: 19px; margin: 25px 0 12px; font-weight: 600; }
.policy-section p { margin-bottom: 16px; color: var(--text-secondary); font-size: 16px; }
.policy-section ul { list-style: none; padding-left: 0; margin-bottom: 20px; }
.policy-section li { margin-bottom: 12px; position: relative; padding-left: 26px; color: var(--text-secondary); font-size: 16px; }
.policy-section li::before { content: ''; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-gradient); box-shadow: 0 0 8px var(--accent-color); }
.policy-section li strong, .policy-section p strong { color: var(--text-primary); }
.policy-divider { border: 0; height: 1px; background: linear-gradient(to right, transparent, var(--border-glass), transparent); margin: 32px 0; }
.intro-text { font-size: 1.1rem; margin-bottom: 1.2rem; color: var(--text-primary); }
.policy-content a.accent, .policy-content p a { color: var(--accent-color); text-underline-offset: 3px; word-break: break-word; }
.policy-content a:hover { color: #fff; }
.policy-content a:focus-visible, .policy-toc a:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; border-radius: 4px; }
.service-group { margin-bottom: 28px; padding: 20px; background: rgba(255, 255, 255, 0.03); border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.06); }
.policy-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }

.policy-toc { margin: 0 0 32px; padding: 18px 22px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-glass); }
.policy-toc-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 6px; font-weight: 600; }
.policy-toc ol { list-style: none; padding: 0; margin: 0; }
.policy-toc a { display: block; padding: 10px 0; min-height: 44px; color: var(--text-primary); text-decoration: none; font-size: 15px; line-height: 1.4; }
.policy-toc a:hover { color: var(--accent-color); }

@media (max-width: 768px) {
    .auth-container { padding: 8px 0; align-items: flex-start; }
    .auth-card { padding: 28px 20px; border-radius: 16px; }
    .auth-card h1 { font-size: 23px; }
    .policy-container { padding: 22px 18px; border-radius: 16px; }
    .policy-header h1 { font-size: 26px; }
    .policy-section h2 { font-size: 21px; }
    .policy-section p, .policy-section li { font-size: 15px; }
}
@media (min-width: 900px) { .policy-toc ol { columns: 2; column-gap: 32px; } .policy-toc li { break-inside: avoid; } }
@media (prefers-reduced-motion: reduce) {
    .auth-card *, .policy-container * { transition: none !important; }
    .auth-card .btn.is-loading::before { animation-duration: 3s; }
    .btn.danger-btn:hover, .auth-card .primary-btn:hover { transform: none; }
}
