/* NuRu 界面外壳 v2：只改布局与外观，不改业务。加载顺序：style.css 之后。
   桌面（≥1000px）：顶栏 56px + 左侧分组导航 232px + 内容区。
   窄屏（<1000px）：保持原有顶部横向菜单行为，只精简顶栏。 */
:root{--shell-top:76px;--shell-side:232px;--shell-ink:#1f2733;--shell-muted:#6b7685;--shell-line:#e4e9f0;--shell-active:#e8efff;--shell-primary:#2563eb}

/* 隐藏已停用的日报推送入口，保留原节点以兼容既有初始化。 */
#pushDingtalkBtn{display:none!important}

/* ---------- 顶栏 ---------- */
/* 深海蓝侧栏：只作用桌面导航，内容区、登录页与窄屏不变。 */
@media(min-width:1000px){
  body #stickyMenu{background:linear-gradient(180deg,#101828,#16233c);border-right:1px solid #223148;color:#94a3b8}
  body .topbar .brand{background:#101828;border-color:#223148}
  body .topbar .brand .title{color:#f1f5ff}
  body .topbar .brand .subtitle{color:#91a2bb}
  body #mainTabs{padding:14px 12px 56px;gap:3px;scrollbar-color:#405069 transparent}
  body #mainTabs .nav-group{color:#94a3b8;min-height:44px;margin-top:14px;border-radius:10px;padding:8px 14px}
  body #mainTabs .nav-group:hover{background:rgba(255,255,255,.06);color:#f1f5ff}
  body #mainTabs .nav-group.is-current:not(.is-folded){background:linear-gradient(135deg,#2563eb,#22d3ee);color:#fff;box-shadow:0 6px 16px rgba(37,99,235,.35);border-radius:10px}
  body #mainTabs .nav-group-icon{color:#94a3b8;width:15px;height:15px}
  body #mainTabs .nav-group[data-group=mgmt] .nav-group-icon{color:#8bcca6}
  body #mainTabs .nav-group[data-group=collect] .nav-group-icon{color:#efbf74}
  body #mainTabs .nav-group[data-group=fleet] .nav-group-icon{color:#76acf4}
  body #mainTabs .nav-group[data-group=care] .nav-group-icon{color:#b6a6da}
  body #mainTabs .nav-group[data-group=finance] .nav-group-icon{color:#6bd0b8}
  body #mainTabs .nav-group[data-group=system] .nav-group-icon{color:#a4b7cd}
  body #mainTabs .nav-group.is-current .nav-group-icon{color:#fff}
  body #mainTabs .tab{color:#94a3b8;border-radius:10px;min-height:40px;padding-left:43px}
  body #mainTabs .tab::after{background:#2b3a50}
  body #mainTabs .tab.nav-child-current{background:transparent}
  body #mainTabs .tab:hover{background:rgba(255,255,255,.06);color:#e1e9f7}
  body #mainTabs .tab.active{background:rgba(34,211,238,.1);color:#22d3ee;font-weight:600}
  body #mainTabs .tab.active::after{background:#22d3ee}
  body #mainTabs .nav-fav{border-color:#2b3a50}
  body #mainTabs .nav-fav-head{color:#93a5bf}
  body #mainTabs .nav-fav-item{color:#a6b5cb}
  body #mainTabs .nav-fav-item:hover{background:#223148;color:#fff}
  body #mainTabs .nav-fav-item.active{background:#143444;color:#22d3ee}
  body #mainTabs .nav-star:hover{background:#30405a}
  body #stickyMenu #menuToggle,body #stickyMenu .menu-reset{background:#223148;color:#a6b5cb;border-color:#34445d}
}
.shell-resizer{display:none}
@media(min-width:1000px){
  .shell-resizer{display:block;position:absolute;right:-4px;top:0;bottom:0;width:8px;z-index:35;cursor:col-resize;touch-action:none;outline:none}
  .shell-resizer:hover,.shell-resizer:focus-visible,body.shell-resizing .shell-resizer{background:rgba(34,211,238,.35)}
  #stickyMenu.is-collapsed .shell-resizer{display:none}
  body.shell-resizing{cursor:col-resize;user-select:none}
  body .topbar .brand .title{overflow:hidden;text-overflow:ellipsis}
}
@media print{.shell-resizer{display:none!important}}
.topbar{height:var(--shell-top);padding:0 16px;flex-wrap:nowrap;gap:16px;position:sticky;top:0;z-index:30}
.topbar .brand{gap:10px;min-width:0}
.topbar .brand-logo{width:32px;height:32px;border-radius:8px}
.topbar .title{font-size:15px;font-weight:700;white-space:nowrap}
.topbar .subtitle{display:none}
.shell-crumb{flex:1;min-width:0;display:flex;align-items:center;gap:8px;font-size:14px;color:var(--shell-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shell-crumb b{color:var(--shell-ink);font-weight:700;overflow:hidden;text-overflow:ellipsis}
.shell-crumb i{font-style:normal;color:#b6c0cd}
.top-actions{flex-wrap:nowrap;gap:8px;align-items:center}
.top-actions label{flex-direction:row;align-items:center;gap:6px}
.top-actions label>span{display:none}
.top-actions .lang-picker{width:auto;height:36px;padding:0 28px 0 10px;border-radius:6px}
.account-menu{position:relative}
.account-menu>summary{list-style:none;display:flex;align-items:center;gap:6px;height:36px;padding:0 10px;border:1px solid var(--shell-line);border-radius:6px;background:#fff;cursor:pointer;max-width:320px}
.account-menu>summary::-webkit-details-marker{display:none}
.account-menu>summary::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px);color:var(--shell-muted);flex:none}
.account-menu .whoami{background:none;padding:0;border-radius:0;color:var(--shell-ink);overflow:hidden;text-overflow:ellipsis;max-width:280px}
.account-menu[open]>summary{border-color:#aec7fa;box-shadow:0 0 0 3px #2563eb1a}
.account-pop{position:absolute;right:0;top:calc(100% + 6px);min-width:180px;display:flex;flex-direction:column;padding:4px;background:#fff;border:1px solid var(--shell-line);border-radius:10px;box-shadow:0 12px 32px #0f172a1f;z-index:40}
.account-pop button{all:unset;box-sizing:border-box;display:block;width:100%;height:36px;line-height:36px;padding:0 12px;border-radius:6px;font-size:14px;color:var(--shell-ink);cursor:pointer}
.account-pop button:hover{background:#f1f5f9}
.account-pop button:focus-visible{outline:2px solid var(--shell-primary)}
.account-pop .btn-logout{color:#b91c1c;border-top:1px solid var(--shell-line);border-radius:0 0 6px 6px;margin-top:4px}
.account-pop .btn-logout:hover{background:#fff1f2}

/* ---------- 菜单显示名：data-label 替换原文字（去 emoji），两种布局通用 ---------- */
#mainTabs .tab[data-label],.menu-drag-ghost[data-label]{font-size:0!important}
#mainTabs .tab[data-label]::before,.menu-drag-ghost[data-label]::before{content:attr(data-label);font-size:14px}
@media (max-width:720px){#mainTabs .tab[data-label]::before{font-size:13px}}

/* ---------- 导航分组标题 ---------- */
.nav-group{display:none}
.nav-fav{display:none}

@media (min-width:1000px){
  body{display:grid;grid-template-columns:var(--shell-side) minmax(0,1fr);grid-template-rows:var(--shell-top) auto;min-height:100vh}
  /* 顶栏只覆盖内容区；品牌固定在侧栏顶部 */
  .topbar{grid-column:2;grid-row:1;padding:0 24px}
  .topbar .brand{position:fixed;left:0;top:0;z-index:31;width:var(--shell-side);height:var(--shell-top);padding:0 16px;gap:10px;background:#fff;border-right:1px solid var(--shell-line);border-bottom:1px solid var(--shell-line)}
  .topbar .brand-logo{width:40px;height:40px;border-radius:10px;flex:none}
  .topbar .title{font-size:20px;font-weight:700;letter-spacing:-.4px;line-height:1.25}
  .topbar .brand>div{min-width:0;flex:1}
  .topbar .subtitle{display:block;margin-top:5px;font-size:11px;font-weight:400;line-height:1.4;color:#748197;max-width:162px;letter-spacing:.2px}
  .shell-crumb{font-size:13px}
  #stickyMenu{grid-column:1;grid-row:1/span 2;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:var(--shell-top) 0 0;background:#fff;border-right:1px solid var(--shell-line);box-shadow:none;z-index:20}
  main{grid-column:2;grid-row:2;min-width:0;padding:24px 24px 64px}
  #stickyMenu .tabs{flex:1;max-height:none;overflow-y:auto;flex-direction:column;flex-wrap:nowrap;gap:2px;padding:12px 8px 56px;position:relative}
  .nav-group{display:flex;align-items:center;gap:10px;min-height:40px;margin-top:12px;padding:6px 12px;border-radius:9px;font-size:14px;font-weight:600;letter-spacing:0;color:#526176;user-select:none;cursor:pointer;transition:background .15s,color .15s}
  .nav-group-icon{width:19px;height:19px;flex:none;color:#71829a}
  .nav-group-label{flex:1;min-width:0}
  .nav-group.is-current{background:#f0f5ff;color:#1d4ed8;border-radius:9px 9px 0 0}
  .nav-group.is-current .nav-group-icon{color:#2563eb}
  .nav-group::after{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translate(-2px,-2px);flex:none;transition:transform .15s}
  .nav-group.is-folded::after{transform:rotate(-45deg)}
  .nav-group:hover{background:#F1F3F6;color:#172033}
  .nav-group:focus-visible{outline:2px solid var(--shell-primary);outline-offset:-2px}
  .nav-fav.is-empty+.nav-group{margin-top:0}
  #mainTabs .tab.nav-folded{display:none!important}
  /* 收藏区 */
  .nav-fav{display:flex;flex-direction:column;gap:2px;padding-bottom:8px;margin-bottom:2px;border-bottom:1px solid var(--shell-line)}
  .nav-fav.is-empty{display:none}
  .nav-fav-head{min-height:32px;display:flex;align-items:center;padding:0 12px;font-size:14px;font-weight:600;color:#526176}
  .nav-fav-item{all:unset;box-sizing:border-box;display:flex;align-items:center;min-height:32px;padding:4px 10px;border-radius:6px;font-size:14px;color:#172033;cursor:pointer}
  .nav-fav-item:hover{background:#F1F3F6}
  .nav-fav-item.active{background:#EEF2FB;color:#1d4ed8;font-weight:600}
  .nav-fav-item:focus-visible{outline:2px solid var(--shell-primary);outline-offset:-2px}
  /* 星标：悬停显示，已收藏常亮 */
  #mainTabs .tab{position:relative;padding-right:32px}
  .nav-star{position:absolute;right:6px;top:50%;width:24px;height:24px;margin-top:-12px;display:flex;align-items:center;justify-content:center;border-radius:4px;font-size:14px;line-height:1;color:#9AA3B2;opacity:0;cursor:pointer}
  .nav-star::before{content:"☆"}
  .nav-star.is-on{opacity:1;color:#D97706}
  .nav-star.is-on::before{content:"★"}
  #mainTabs .tab:hover .nav-star{opacity:1}
  .nav-star:hover{background:#E4E8EE;color:#D97706}
  .nav-group.is-empty{display:none!important}
  #mainTabs .tab{display:flex;align-items:center;width:100%;min-height:38px;padding:8px 32px 8px 42px;border-radius:7px;text-align:left;font-size:14px;font-weight:400;color:#334155;line-height:1.4;white-space:normal}
  #mainTabs .tab::after{content:"";position:absolute;left:21px;top:0;bottom:0;width:1px;background:#dce4ee}
  #mainTabs .tab.nav-child-current{background:#f7f9ff}
  #mainTabs .tab:hover{background:#F1F3F6}
  #mainTabs .tab.active{background:#e8efff;color:#1d4ed8;font-weight:600;box-shadow:none}
  #mainTabs .tab.active::after{left:19px;top:9px;bottom:9px;width:3px;border-radius:3px;background:#2563eb}
  #mainTabs .tab:focus-visible{outline:2px solid var(--shell-primary);outline-offset:-2px}
  #menuToggle{position:absolute;left:8px;bottom:8px;width:36px;height:36px;margin:0;border-radius:6px;font-size:13px;box-shadow:none;transform:rotate(-90deg)}
  .menu-reset{right:12px;bottom:8px;width:36px;height:36px;font-size:18px}
  .menu-save-status{left:52px;right:52px;bottom:18px;max-width:none}
  body:has(#stickyMenu.is-collapsed){grid-template-columns:0 minmax(0,1fr)}
  body:has(#stickyMenu.is-collapsed) .topbar .brand{display:none}
  #stickyMenu.is-collapsed{border-right:0;overflow:visible;background:transparent;padding:0}
  #stickyMenu.is-collapsed #menuToggle{position:fixed;left:8px;bottom:8px;z-index:25;background:#fff;border:1px solid var(--shell-line);box-shadow:0 4px 12px #0f172a1a}
  html{scroll-padding-top:calc(var(--shell-top) + 12px)}
  .repair-form,#dtDetail{scroll-margin-top:calc(var(--shell-top) + 12px)}
  #vlTable{max-height:calc(100vh - var(--shell-top) - 80px)}
}

@media (max-width:999px){
  :root{--shell-top:56px}
  .topbar{padding:0 10px;gap:8px}
  .topbar .title{display:none}
  .shell-crumb{font-size:13px}
  .account-menu .whoami{max-width:120px}
}
/* ---------- 窄屏：星标隐藏 ---------- */
.nav-star{display:none}
#retiredDingtalkSettings,#retiredPhotoNotice{display:none!important}
.approval-nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;border-radius:10px;background:#ef4444;color:white;font-size:12px!important;font-weight:700;line-height:20px}
.approval-nav-badge[hidden]{display:none!important}
@media(min-width:1000px){#mainTabs .tab[data-tab="approvals"]{padding-right:65px}#mainTabs .approval-nav-badge{position:absolute;right:34px;top:50%;transform:translateY(-50%)}}
@media(max-width:999px){.approval-nav-badge{margin-left:8px}}
@media (min-width:1000px){.nav-star{display:flex}}

/* ---------- 筛选条：字段名在框内（日期 2026-10-06 / 公司 全部 ▾）。只作用于含下拉/输入框的 label，复选框不受影响 ---------- */
.panel .actions:has(>label>select,>label>input:not([type=checkbox]):not([type=radio])){flex-wrap:wrap;gap:8px;align-items:center}
.panel .actions>label:has(>select,>input:not([type=checkbox]):not([type=radio]):not([type=file])),
.daily-search-row>label{flex-direction:row;align-items:center;gap:8px;height:40px;padding:0 4px 0 12px;border:1px solid #D9DEE7;border-radius:6px;background:#fff;font-size:12px;color:#6B7385;white-space:nowrap;min-width:0}
.panel .actions>label>span,.daily-search-row>label>span{flex:none}
.panel .actions>label>select,.panel .actions>label>input:not([type=checkbox]):not([type=radio]),
.daily-search-row>label>input{width:auto;min-width:0;height:38px;padding:0 8px 0 0;border:0;border-radius:0;background:transparent;font-size:14px;font-weight:600;color:#172033;box-shadow:none}
.panel .actions>label>select{padding-right:4px;cursor:pointer}
.daily-search-row>label>input{flex:1;font-weight:400}
.panel .actions>label:focus-within,.daily-search-row>label:focus-within{border-color:#93B4F5;box-shadow:0 0 0 3px #2563eb1a}
.panel .actions>label>select:focus,.panel .actions>label>input:focus,.daily-search-row>label>input:focus{outline:none}
.panel .actions>.btn-mini,.daily-search-row>.btn-mini{height:40px;padding:0 14px;border-radius:6px;white-space:nowrap;flex:none}

/* ---------- 分段按钮（替代二选一下拉；原下拉隐藏保留） ---------- */
.seg-source{display:none!important}
.seg{display:inline-flex;height:40px;padding:3px;gap:2px;border:1px solid #D9DEE7;border-radius:6px;background:#F5F7FA}
.seg button{all:unset;box-sizing:border-box;display:flex;align-items:center;padding:0 14px;border-radius:4px;font-size:14px;color:#4A5568;cursor:pointer;white-space:nowrap}
.seg button:hover{color:#172033}
.seg button.is-on{background:#fff;color:#1d4ed8;font-weight:600;box-shadow:0 1px 2px #0f172a14,0 0 0 1px #D9DEE7}
.seg button:disabled{opacity:.5;cursor:not-allowed}
.seg button:focus-visible{outline:2px solid var(--shell-primary)}

/* ---------- 状态页签（全部 / 请假 / 待收款 / 欠款 / 已结清） ---------- */
.status-tabs{display:flex;flex-wrap:wrap;gap:4px;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #E4E9F0}
.status-tabs button{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:6px;font-size:14px;color:#4A5568;cursor:pointer}
.status-tabs button b{font-weight:600;font-variant-numeric:tabular-nums}
.status-tabs button:hover{background:#F1F3F6;color:#172033}
.status-tabs button.is-on{background:#172033;color:#fff}
.status-tabs button:focus-visible{outline:2px solid var(--shell-primary)}
.st-hide{display:none!important}
#dailyTable tbody tr[data-st="pending"] td:first-child{box-shadow:inset 3px 0 0 #DC2626}
#dailyTable tbody tr[data-st="owing"] td:first-child{box-shadow:inset 3px 0 0 #D97706}
#dailyTable tbody tr[data-st="leave"]>td{color:#6B7385}

@media print{#stickyMenu,.topbar{display:none!important}body{display:block}}

.charge-todo-hidden{display:none!important}
.charge-todo-fold{display:block;margin:12px auto 0;min-height:36px;padding:6px 18px}
.charge-todo-fold[hidden]{display:none!important}
@media(min-width:1000px){
  body #stickyMenu #menuToggle{position:fixed;left:calc(var(--shell-side) - 8px);top:50vh;bottom:auto;width:18px;height:72px;min-width:0;padding:0;margin:0;border:1px solid #3a506d;border-radius:9px;transform:translateY(-50%) rotate(-90deg);background:#20354e;color:#9edfed;font-size:10px;box-shadow:0 3px 10px #07152633;z-index:40;cursor:pointer;transition:background .15s,color .15s}
  body #stickyMenu #menuToggle{transform:translateY(-50%)}
  body #stickyMenu #menuToggle::before{content:'‹';display:block;font-size:20px;line-height:1}
  body #stickyMenu #menuToggle{font-size:0}
  body #stickyMenu #menuToggle:hover,body #stickyMenu #menuToggle:focus-visible{background:#2563eb;color:#fff;outline:2px solid #22d3ee;outline-offset:2px}
  body #stickyMenu.is-collapsed #menuToggle{left:0;top:50vh;bottom:auto;border-radius:0 9px 9px 0;background:#20354e}
  body #stickyMenu.is-collapsed #menuToggle::before{content:'›'}
}
