/* 动效与系统通知。内容从不依赖动画才可见；减少动态效果和打印时全部关闭。 */
@keyframes fx-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fx-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-ripple { from { opacity: .32; transform: scale(0); } to { opacity: 0; transform: scale(1); } }
@keyframes fx-toast { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } to { opacity: 1; } }
@keyframes fx-shine { from { background-position: 180% 0; } to { background-position: -40% 0; } }
@keyframes fx-bell { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 45% { transform: rotate(-11deg); } 70% { transform: rotate(6deg); } }
@keyframes fx-pulse { 0% { box-shadow: 0 0 0 0 rgba(214, 57, 57, .5); } 100% { box-shadow: 0 0 0 7px rgba(214, 57, 57, 0); } }

dialog[open] { animation: fx-pop .24s cubic-bezier(.2, .9, .3, 1.15); }
dialog[open]::backdrop { animation: fx-fade .2s ease; backdrop-filter: blur(3px); background: rgba(24, 36, 51, .42); }
#toast:not([hidden]) { animation: fx-toast .22s cubic-bezier(.2, .9, .3, 1.2); }
.fx-ripple-host { position: relative; overflow: hidden; }
.fx-ripple { position: absolute; border-radius: 50%; background: currentColor; pointer-events: none; animation: fx-ripple .6s ease-out; }
:is(button.btn, a.btn, .hx-btn, .dt-btn, .auth-primary, .notice-ok) { transition: transform .12s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease; }
:is(button.btn, a.btn, .hx-btn, .dt-btn, .auth-primary, .notice-ok):active:not(:disabled) { transform: translateY(1px) scale(.985); }
:is(button.btn, .auth-primary, .notice-ok):hover:not(:disabled) { box-shadow: 0 4px 14px rgba(6, 111, 209, .24); }
.school-table tbody tr, .tbl tbody tr { transition: background-color .14s ease; }
.school-table tbody tr:hover { background: #f4f8fd; }
.school-kpis > div, .phone-tile { transition: transform .18s ease, box-shadow .18s ease; }
.school-kpis > div:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(24, 36, 51, .08); }
.school-kpis b { font-variant-numeric: tabular-nums; }
.school-quick button { transition: background-color .15s ease, color .15s ease, transform .12s ease; }

#view.fx-on { position: relative; isolation: isolate; }
.fx-band { position: absolute; inset: 0 0 auto 0; height: 320px; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }

.fx-skeleton { display: grid; gap: 10px; padding: 8px 0; }
.fx-skeleton i { display: block; height: 14px; border-radius: 4px; background: linear-gradient(90deg, #edf0f4 30%, #f8fafc 50%, #edf0f4 70%); background-size: 200% 100%; animation: fx-shine 1.3s linear infinite; }
.fx-skeleton i:nth-child(3n) { width: 72%; } .fx-skeleton i:nth-child(3n+2) { width: 88%; }

/* -- 系统通知 ----------------------------------------------------------------------------------------------- */
.notice-modal { width: min(560px, calc(100vw - 32px)); max-height: min(82vh, 700px); padding: 0; border: 0; border-radius: 14px; color: #182433; box-shadow: 0 24px 60px rgba(24, 36, 51, .28); overflow: hidden; }
.notice-modal article { display: flex; flex-direction: column; max-height: inherit; border-top: 4px solid #066fd1; }
.notice-modal article[data-level="important"] { border-top-color: #d63939; }
.notice-modal article[data-level="news"] { border-top-color: #0ca678; }
.notice-modal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; }
.notice-modal time { color: #667382; font-size: 13px; }
.notice-tag { display: inline-block; padding: 2px 10px; border-radius: 12px; background: #e7f1fb; color: #066fd1; font-size: 12px; font-weight: 600; }
article[data-level="important"] .notice-tag { background: #fbebeb; color: #d63939; }
article[data-level="news"] .notice-tag { background: #e6f7f2; color: #0a8f66; }
.notice-modal h2 { margin: 10px 22px 8px; font-size: 19px; font-weight: 650; line-height: 1.35; }
.notice-panel h2 { margin: 0; }
.notice-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 22px 8px; font-size: 14.5px; line-height: 1.7; overflow-wrap: anywhere; }
.notice-body p { margin: 0 0 8px; } .notice-body ul { margin: 0 0 8px; padding-left: 20px; }
.notice-modal footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid #eef1f5; }
.notice-count { color: #667382; font-size: 13px; }
.notice-ok { min-width: 112px; height: 40px; border: 0; border-radius: 8px; background: #066fd1; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.notice-ok:disabled { opacity: .6; }
.notice-close { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; font-size: 20px; cursor: pointer; }
.notice-close:hover { background: #f1f4f8; }
.notice-list { overflow: auto; padding: 8px 22px calc(18px + env(safe-area-inset-bottom)); }
.notice-item { border-bottom: 1px solid #eef1f5; }
.notice-item summary { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; cursor: pointer; list-style: none; }
.notice-item summary::-webkit-details-marker { display: none; }
.notice-item summary b { font-weight: 600; } .notice-item summary small { color: #667382; }
.notice-item .notice-body { padding: 0 0 10px; }
.notice-bell { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: inherit; font-size: 19px; cursor: pointer; }
.notice-bell:hover { background: rgba(120, 140, 170, .14); }
.notice-bell:has(b:not([hidden])) i { animation: fx-bell 1.1s ease 2; transform-origin: 50% 10%; }
.notice-bell b { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #d63939; color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; animation: fx-pulse 1.6s ease-out infinite; }
.notice-bell b[hidden] { display: none; }
.notice-admin { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 18px; }
.notice-admin form { display: grid; gap: 12px; } .notice-admin label { display: grid; gap: 4px; }
.notice-admin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.notice-tenants { display: flex; flex-wrap: wrap; gap: 6px 16px; } .notice-tenants label { display: inline-flex; gap: 6px; align-items: center; }
.notice-admin .btn { justify-self: start; }
.notice-preview { padding: 16px 18px; border: 1px solid #dce1e7; border-top: 4px solid #066fd1; border-radius: 10px; background: #fff; }
.notice-preview h3 { margin: 10px 0 6px; font-size: 17px; } .notice-preview .notice-body { padding: 0; }

@media (max-width: 640px) {
  .notice-modal:not(.notice-panel), .notice-panel { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 86vh; }
  dialog.notice-modal[open] { animation: fx-sheet .28s cubic-bezier(.2, .85, .3, 1); }
  .notice-ok { flex: 1; height: 46px; }
  .notice-admin { grid-template-columns: minmax(0, 1fr); }
  .notice-admin-row { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .fx-band, .fx-ripple, .notice-bell { display: none !important; } *, *::before, *::after { animation: none !important; transition: none !important; } }

html body.console .hx-top-actions .notice-bell { display: inline-grid !important; width: 34px; height: 34px; }
