/* ── 12. MODAL, TOAST, CONFIRM ────────────────────────────────────────── */
.modal-content { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-3); }
.modal-header { border-bottom: 1px solid var(--border); padding: 18px 22px; align-items: flex-start; }
.modal-title { font-size: 17px; font-weight: 700; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 20px 22px; }
.modal-footer { border-top: 1px solid var(--border); padding: 14px 22px; gap: 8px; }
.modal-backdrop { background-color: var(--backdrop) !important; }
.modal-backdrop.show { opacity: 1; background: var(--backdrop); }
.modal-backdrop { --bs-backdrop-opacity: 1; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.preview-body { background: var(--inset); min-height: 300px; display: grid; place-items: center; padding: 16px; }
.preview-body img { max-width: 100%; max-height: 72vh; border-radius: 10px; box-shadow: var(--shadow-2); }
.preview-body iframe { width: 100%; height: 72vh; border: 0; border-radius: 10px; background: #fff; }
.confirm-icon { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto; display: grid; place-items: center; font-size: 26px; background: var(--primary-soft); color: var(--primary-text); }
.confirm-icon.danger { background: var(--danger-soft); color: var(--danger-text); }
.confirm-icon.warning { background: var(--warning-soft); color: var(--warning-text); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 3500; display: flex; flex-direction: column; gap: 10px; max-width: 380px; width: calc(100% - 40px); pointer-events: none; }
.toast-ui { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; box-shadow: var(--shadow-3); padding: 12px 14px; animation: toastIn .28s var(--ease); font-size: 13.5px; }
.toast-ui.out { animation: toastOut .2s ease forwards; }
.toast-ui i.lead { font-size: 18px; margin-top: 1px; }
.toast-ui.success { border-left-color: var(--success); } .toast-ui.success i.lead { color: var(--success-text); }
.toast-ui.danger { border-left-color: var(--danger); } .toast-ui.danger i.lead { color: var(--danger-text); }
.toast-ui.warning { border-left-color: var(--warning); } .toast-ui.warning i.lead { color: var(--warning-text); }
.toast-ui.info i.lead { color: var(--primary-text); }
.toast-ui strong { display: block; font-size: 13.5px; }
.toast-ui .x { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 16px; padding: 0 2px; }
.toast-ui .undo { background: none; border: 0; color: var(--primary-text); font-weight: 700; font-size: 12.5px; padding: 0; margin-top: 4px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.print-frame { position: fixed; width: 0; height: 0; border: 0; right: 0; bottom: 0; visibility: hidden; }

/* ── 13. FOOTER, BOTTOM NAV, SHEET ────────────────────────────────────── */
.app-footer { max-width: 1600px; margin: 0 auto; padding: 18px var(--page-x) 24px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--border); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-2); }
.bottom-nav { display: none; }
.sheet-backdrop { position: fixed; inset: 0; background: var(--backdrop); z-index: 1060; opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }
.bottom-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1070; background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-3); padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 86vh; overflow: auto; transform: translateY(105%); transition: transform .3s var(--ease); }
.bottom-sheet.show { transform: none; }
.sheet-handle { width: 42px; height: 5px; border-radius: 9px; background: var(--border-strong); margin: 4px auto 12px; }
.sheet-profile { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--inset); margin-bottom: 12px; }
.sheet-profile strong { display: block; }
.sheet-profile small { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.sheet-group { margin-bottom: 10px; }
.sheet-group .micro { padding: 6px 4px; display: block; }
.sheet-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sheet-link { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 12px; background: var(--inset-2); border: 1px solid var(--border); color: var(--text); font-size: 12px; font-weight: 600; text-align: center; min-height: 72px; justify-content: center; }
.sheet-link i { font-size: 20px; color: var(--primary-text); }
.sheet-link.active { border-color: var(--primary); background: var(--primary-soft); }
.sheet-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 6px; }

