/* P3 login sheet, exam-date plans and review reminders. Uses paper_shell tokens. */
body.wq-sheet-open { overflow: hidden; }
.wq-sheet-backdrop { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 11, 15, .62); }
.wq-sheet { width: 100%; max-width: 520px; max-height: calc(100dvh - 24px); overflow-y: auto; box-sizing: border-box; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); background: var(--wq-surface, #20262e); color: var(--wq-text, #e8edf3); border: 1px solid var(--wq-border, #374351); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: var(--wq-shadow-md, 0 6px 16px #00000026); }
.wq-sheet__handle { width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 4px; background: var(--wq-border-strong, #516983); }
.wq-sheet__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.wq-sheet__head h2 { margin: 0; font-size: 1.15rem; line-height: 1.45; color: var(--wq-text, #e8edf3); }
.wq-sheet__x { flex: none; width: 44px; height: 44px; margin: -8px -10px 0 0; border: 0; border-radius: 10px; background: transparent; color: var(--wq-text-muted, #a8b5c5); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.wq-sheet__body p { margin: 0 0 16px; color: var(--wq-text-soft, #c9d3df); line-height: 1.65; }
.wq-sheet__form { margin: 0 0 10px; }
.wq-sheet__primary, .wq-sheet__secondary, .wq-sheet__ghost, .sp-btn { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 48px; padding: 12px 18px; border-radius: 10px; font: inherit; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; }
.wq-sheet__primary, .sp-btn--primary { border: 0; background: var(--wq-primary, #2873dc); color: var(--wq-on-primary, #fff); }
.wq-sheet__primary:hover, .sp-btn--primary:hover { background: var(--wq-primary-hover, #3480e6); }
.wq-sheet__secondary, .sp-btn--ghost { margin: 0 0 10px; border: 1px solid var(--wq-border-strong, #516983); background: var(--wq-surface-2, #29313b); color: var(--wq-text, #e8edf3); }
.wq-sheet__link { display: block; padding: 12px 0; color: var(--wq-accent, #80b8eb); text-align: center; text-decoration: underline; }
.wq-sheet__note { font-size: .88rem; color: var(--wq-text-muted, #a8b5c5) !important; }
.wq-sheet__ghost { border: 0; background: transparent; color: var(--wq-text-muted, #a8b5c5); }
.sp-btn--danger { border: 1px solid #8f4b4b; background: transparent; color: #f2b8b8; }
.sp-btn:disabled { opacity: .55; cursor: not-allowed; }
@media (min-width: 700px) {
    .wq-sheet-backdrop { align-items: center; padding: 24px; }
    .wq-sheet { border-bottom: 1px solid var(--wq-border, #374351); border-radius: 16px; padding-bottom: 22px; }
    .wq-sheet__handle { display: none; }
}

.sp-section { margin: 0 0 20px; padding: 18px 20px; background: var(--wq-surface, #20262e); border: 1px solid var(--wq-border, #374351); border-radius: 14px; }
.sp-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sp-section__head h2 { margin: 0; font-size: 1.1rem; color: var(--wq-text, #e8edf3); }
.sp-section__head .sp-btn { width: auto; min-height: 44px; padding: 10px 16px; margin: 0; }
.sp-section > p { margin: 0; color: var(--wq-text-muted, #a8b5c5); line-height: 1.6; }
.sp-exams { display: grid; gap: 12px; }
.sp-exams:empty { display: none; }
.sp-exam { padding: 14px 16px; background: var(--wq-surface-2, #29313b); border: 1px solid var(--wq-border, #374351); border-radius: 12px; }
.sp-exam.is-ended { opacity: .8; }
.sp-exam__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sp-exam__top h3 { margin: 0; font-size: 1.02rem; color: var(--wq-text, #e8edf3); overflow-wrap: anywhere; }
.sp-exam__dday { flex: none; padding: 3px 10px; border-radius: 999px; background: var(--wq-accent-soft, rgba(128, 184, 235, .12)); color: var(--wq-text-soft); font-weight: 800; font-size: .9rem; }
.sp-exam__meta, .sp-exam__stats { margin: 6px 0 0; color: var(--wq-text-muted, #a8b5c5); font-size: .92rem; }
.sp-exam__plan { margin: 8px 0 0; color: var(--wq-text, #e8edf3); font-weight: 700; line-height: 1.55; }
.sp-exam__actions { display: flex; gap: 8px; margin-top: 12px; }
.sp-exam__actions .sp-btn { width: auto; min-height: 44px; margin: 0; padding: 10px 16px; }
.sp-reminder { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sp-reminder h2 { margin: 0 0 6px; font-size: 1.1rem; color: var(--wq-text, #e8edf3); }
.sp-reminder p { margin: 0; color: var(--wq-text-muted, #a8b5c5); line-height: 1.6; }
.sp-reminder__actions { display: flex; flex: none; gap: 8px; }
.sp-reminder__actions .sp-btn { width: auto; min-height: 44px; margin: 0; padding: 10px 16px; }
.sp-guest-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.sp-guest-actions a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 12px; box-sizing: border-box; border-radius: 10px; border: 1px solid var(--wq-border-strong, #516983); background: var(--wq-surface-2, #29313b); color: var(--wq-text, #e8edf3); font-weight: 700; text-align: center; text-decoration: none; }
.sp-guest-actions a:first-child { border: 0; background: var(--wq-action-fill, #28659b); color: var(--wq-on-action, #f5f8fc); }
.sp-note { margin-top: 10px !important; color: var(--wq-text-soft, #c9d3df) !important; }
@media (max-width: 560px) {
    .sp-reminder { flex-direction: column; align-items: stretch; }
    .sp-reminder__actions .sp-btn { flex: 1; }
    .sp-guest-actions { grid-template-columns: 1fr; }
}

.sp-form { display: grid; gap: 14px; }
.sp-form__lead { margin: 0; color: var(--wq-text-soft, #c9d3df); line-height: 1.6; }
.sp-field { display: grid; gap: 6px; }
.sp-field span, .sp-fieldset legend { color: var(--wq-text-soft, #c9d3df); font-weight: 700; font-size: .92rem; }
.sp-field input, .sp-field select { box-sizing: border-box; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--wq-border-strong, #516983); border-radius: 10px; background: var(--wq-bg, #15191f); color: var(--wq-text, #e8edf3); font: inherit; color-scheme: dark; }
.sp-field input:disabled { opacity: .75; }
.sp-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.sp-fieldset legend { margin-bottom: 8px; padding: 0; }
.sp-form__checks { display: grid; gap: 6px; max-height: 240px; overflow-y: auto; padding-right: 2px; }
.sp-check { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; box-sizing: border-box; border: 1px solid var(--wq-border, #374351); border-radius: 10px; background: var(--wq-surface-2, #29313b); cursor: pointer; }
.sp-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--wq-action-fill, #28659b); }
.sp-check span { color: var(--wq-text, #e8edf3); overflow-wrap: anywhere; }
.sp-check small { color: var(--wq-text-muted, #a8b5c5); white-space: nowrap; }
.sp-check--row small { grid-column: 2 / 4; white-space: normal; }
.sp-form__hint { margin: 0; color: var(--wq-text-muted, #a8b5c5); font-size: .88rem; line-height: 1.6; overflow-wrap: anywhere; }
.sp-form__error { margin: 0; color: #f2b8b8; font-weight: 700; }
.sp-form__actions { display: flex; gap: 10px; }
.sp-form__actions .sp-btn { margin: 0; }
.sp-form [hidden], .sp-section [hidden] { display: none !important; }
