/* 统一交互反馈：仅可操作控件强调悬停，选中态、按下态和键盘焦点分别呈现。 */
.language-picker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #8190a2; }
.language-picker select { padding: 6px 8px; min-width: 80px; }
.dialog-language { display: flex; justify-content: flex-end; margin: -8px 0 18px; }
.top-actions { flex-wrap: wrap; }
.topbar { min-height: 77px; height: auto; padding-top: 14px; padding-bottom: 14px; }
.workspace { margin: 0 auto; align-content: start; }
html[lang="en"] .welcome h2 { max-width: 420px; line-height: 1.3; }
html[lang="en"] .stats article { min-width: 0; }
html[lang="en"] .stats article > div { gap: 6px; line-height: 1.5; }
html[lang="en"] .rightbar strong { overflow-wrap: anywhere; }
@media (max-width: 800px) {
 .sidebar { top: var(--ace-header-height, 77px); }
 .language-picker > span { display: none; }
 .top-actions { row-gap: 8px; }
}
@media (max-width: 540px) {
 .sidebar { top: var(--ace-header-height, 105px); }
 .language-picker select { min-width: 73px; }
 html[lang="en"] .section-head { flex-wrap: wrap; }
 html[lang="en"] .welcome h2 { font-size: 21px; }
 html[lang="en"] .leave-table td { grid-template-columns: 80px minmax(0, 1fr); }
}
[hidden] { display: none !important; }
button, a, input, textarea, select {
 transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .1s ease;
}
button:hover { filter: none; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
button:not(:disabled):active { transform: translateY(1px); }
.text-button { padding: 7px 10px; border-radius: 5px; }
.review-actions { display: flex; gap: 4px; }
.module { border-radius: 6px; }
.todo { border-radius: 6px; }
.leave-help { background: #eef5fc; color: #476d91; }
.countdown { color: #a67c39; white-space: nowrap; font-variant-numeric: tabular-nums; }
.review-summary { padding: 14px; background: #f5f8fc; border-radius: 6px; line-height: 1.9; overflow-wrap: anywhere; }
/* 手机将请假表格重排为记录卡片，撤回和审批按钮无需横向寻找。 */
@media (max-width: 540px) {
 .leave-table thead { display: none; }
 .leave-table, .leave-table tbody { display: block; width: 100%; }
 .leave-table tr { display: block; padding: 14px; border-bottom: 1px solid #e3eaf2; }
 .leave-table tr:last-child { border-bottom: 0; }
 .leave-table td { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 4px 10px; padding: 8px 0; border: 0; min-width: 0; max-width: none; overflow-wrap: anywhere; }
 .leave-table td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / 5; color: #8895a5; font-size: 11px; }
 .leave-table td small { grid-column: 2; margin: 0; }
 .leave-table td .badge, .leave-table td > button { justify-self: start; }
 .leave-table td .review-actions { justify-content: flex-start; }
 .leave-table td .review-actions button, .leave-table td > button { min-height: 42px; padding-left: 13px; padding-right: 13px; }
}
.nav-item.selected { box-shadow: inset 3px 0 #2869a6; }
.primary:active { background: #174e80; }
.secondary:active, .text-button:active { background: #dceaf8; }
.nav-item:active, .module:active, .todo:active { background: #dfeaf6; }
.rail-item:active { background: #ffffff30; }
input:focus, textarea:focus, select:focus { border-color: #6297c7; box-shadow: 0 0 0 3px #2869a612; }
.day-rule:focus-within { border-color: #a3c1dc; background: #f6faff; }
@media (hover: hover) {
 .nav-item:hover { background: #f0f5fb; color: #2869a6; }
 .nav-item.selected:hover { background: #e1edf9; }
 .rail-item:hover { background: #ffffff23; color: white; }
 .rail-item.active:hover { background: #ffffff30; }
 .primary:hover { background: #215b92; border-color: #215b92; box-shadow: 0 3px 9px #2869a621; }
 .secondary:hover { background: #f0f6fc; border-color: #a7c4df; color: #2869a6; }
 .text-button:hover, .menu-button:hover, .close:hover { background: #edf4fc; color: #245f94; }
 .text-button.danger:hover { background: #fff0f0; color: #ae4242; }
 .module:hover { background: #f2f7fc; box-shadow: inset 0 0 0 1px #e4eef8; }
 .module:hover > svg, .todo:hover > svg { color: #2869a6; transform: translateX(2px); }
 .todo:hover { background: #f5f8fc; }
 .shift-delete:hover { color: #a34040; background: #fff8; }
 .brand:hover { color: #e0efff; }
 input:hover, textarea:hover, select:hover { border-color: #a8bfd5; }
 .day-toggle:hover { color: #2869a6; cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) {
 *, *::before, *::after { transition: none !important; animation: none !important; }
 button:not(:disabled):active { transform: none; }
}
/* 公告摘要与完整阅读：正文保留换行，长链接也不会撑破手机页面。 */
.announcement>div{min-width:0;flex:1}.announcement-link{padding:4px 6px;margin-left:-6px;text-align:left;justify-content:flex-start;border-radius:5px;color:var(--blue);line-height:1.7;overflow-wrap:anywhere;max-width:100%}.announcement-link:hover{background:#edf4fb;text-decoration:underline}.announcement .announcement-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere}.announcement-modal{width:800px;overflow-y:auto;overscroll-behavior:contain}.announcement-detail-meta{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:18px 0}.announcement-detail h2{font-size:24px;line-height:1.5;overflow-wrap:anywhere}.announcement-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.95;margin:24px 0;font-size:15px}.announcement-detail .dialog-head{margin-bottom:12px}
/* 账号列表与权限草稿分栏；小屏改为纵向布局。 */
.permissions-layout{display:grid;grid-template-columns:190px minmax(0,1fr);gap:18px}.permissions-layout>div{min-width:0}.account-list{align-self:start}.account-card{display:flex;width:100%;padding:15px;text-align:left;justify-content:space-between;border-bottom:1px solid var(--line);gap:8px}.account-card>span:first-child{min-width:0;overflow-wrap:anywhere}.account-card:hover{background:#f4f8fc}.account-card.selected{background:#eaf3fc;box-shadow:inset 3px 0 var(--blue)}.permission-settings{padding:20px}.permission-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0}.permission-group{min-width:0;border:1px solid var(--line);border-radius:7px;margin:0;padding:12px}.permission-group legend{font-size:12px;font-weight:600;padding:0 5px}.permission-toggle{display:flex;align-items:center;gap:9px;min-height:38px;line-height:1.5;font-size:12px;cursor:pointer}.permission-toggle:hover{background:#f2f7fc}.permission-toggle input{width:17px;height:17px;flex-shrink:0;accent-color:var(--blue)}.permission-settings>.form-hint{margin-top:12px}#permission-feedback{font-size:12px;line-height:1.7;color:#526d8a}.permission-audit{padding:0 20px;list-style:none}.permission-audit li{padding:16px 0;border-bottom:1px solid var(--line);font-size:12px;line-height:1.8;overflow-wrap:anywhere}.permission-audit p{margin-top:5px}
@media(max-width:1000px){.permissions-layout{grid-template-columns:1fr}.account-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.account-list>.section-head{grid-column:1/-1}}
@media(max-width:540px){.permission-grid{grid-template-columns:1fr}.permission-settings{padding:15px}.announcement-detail h2{font-size:21px}.announcement-body{font-size:14px}.account-card{padding:12px 9px;font-size:12px}.account-card .badge{font-size:9px}}
/* 标题按钮的点击区域覆盖整张卡片，原生按钮保留键盘和辅助技术操作。 */
.announcement{position:relative;cursor:pointer;border-radius:6px}.announcement-link::after{content:'';position:absolute;inset:0;border-radius:6px}.announcement:hover{background:#f0f6fc}.announcement:focus-within{outline:2px solid #7db5e9;outline-offset:2px}.announcement-delete{margin-top:16px}.announcement-delete .danger{color:#ad3c3c;border-color:#e4bcbc}.announcement-delete .danger:hover{background:#fff0f0}#announcement-delete-confirm{padding:15px;background:#fff6f3;border:1px solid #efd8d1;border-radius:6px}#announcement-delete-confirm p{line-height:1.7;margin-bottom:12px}#announcement-delete-error{color:#ad3c3c;font-size:12px;margin-top:8px}
/* 防止通用按钮按下位移改变整卡点击覆盖层的定位容器。 */
.announcement .announcement-link,.announcement .announcement-link:not(:disabled):active{transform:none;filter:none}
/* 左下角账号入口：菜单向右弹出，手机仍留在视口内。 */
.account-area{width:100%;padding:12px 5px}.account-trigger{width:100%;display:flex;flex-direction:column;padding:10px 3px;border-radius:8px;color:white;gap:0}.account-trigger:hover,.account-trigger[aria-expanded="true"]{background:#ffffff20}.account-trigger small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rail-avatar{overflow:hidden}.rail-avatar img,.profile-picture img{width:100%;height:100%;object-fit:cover}.account-popover{position:fixed;left:92px;bottom:24px;width:280px;max-width:calc(100vw - 108px);padding:9px;background:white;color:#28374b;border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 48px #183b4f30;text-align:left;z-index:40}.account-summary{display:flex;gap:12px;align-items:center;padding:12px;border-bottom:1px solid var(--line);margin-bottom:6px}.account-summary>div{min-width:0;overflow-wrap:anywhere}.account-summary small{color:var(--muted);margin-top:3px}.account-popover>button{display:flex;width:100%;justify-content:flex-start;border-radius:6px;padding:12px}.account-popover>button:hover{background:#edf4fb}.account-popover>p{font-size:11px;color:var(--muted);padding:12px}.profile-picture{width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:50%;background:#e5eff9;color:var(--blue);overflow:hidden}.profile-picture.large{width:76px;height:76px;font-size:24px}.profile-edit{display:flex;gap:18px;align-items:center;margin-bottom:25px}.profile-edit>div{min-width:0}.avatar-upload{display:block;font-size:13px;color:var(--blue)}.avatar-upload input{display:block;max-width:100%;font-size:11px;margin:9px 0}.account-facts{display:grid;grid-template-columns:100px minmax(0,1fr);gap:14px;padding:20px 0;border-top:1px solid var(--line);margin-top:22px;font-size:13px}.account-facts dt{color:var(--muted)}.account-facts dd{margin:0;overflow-wrap:anywhere}.settings-section{padding:20px 0;border-bottom:1px solid var(--line)}.settings-section p{font-size:12px;line-height:1.8;color:var(--muted);margin:10px 0}.settings-section .language-picker>span{display:inline}#profile-error{color:#ad3c3c;font-size:12px;line-height:1.7}
@media(max-width:800px){.account-popover{left:74px;max-width:calc(100vw - 90px)}}
@media(max-width:540px){.account-popover{left:64px;bottom:14px;max-width:calc(100vw - 78px)}.profile-edit{align-items:flex-start;gap:12px}.profile-picture.large{width:60px;height:60px}}
