/* Shared EHS surfaces */
.gd-heading-actions{display:flex;flex-wrap:wrap;gap:8px}
.gd-heading-actions .button{white-space:nowrap}
.gd-export{align-items:center;margin-bottom:4px}.gd-export [hidden]{display:none}.gd-export label,.gd-export-select{display:flex;align-items:center;gap:8px}.gd-export input[type=checkbox],.gd-export-select input[type=checkbox]{width:17px;height:17px;flex:none;margin:0}.gd-export-select{overflow-wrap:anywhere;cursor:pointer}
body .board-table.gd-system-table{min-width:0}
.gd-system-table td:nth-child(2){white-space:nowrap}
.gd-family summary,.gd-category-section{padding-right:4px}
.gd-catalog-tools .gd-export{margin-bottom:0}
.gd-folder-family{display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:6px;border-bottom:1px solid #d7d7d7}
.gd-folder-family>.gd-family{grid-column:2;border:0;padding:0;min-width:0}
.gd-folder-family summary{padding-block:8px;overflow-wrap:anywhere}
.gd-folder-check{display:grid;place-items:center;flex:none;width:36px;min-height:36px;cursor:pointer}
.gd-folder-check input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--gd-orange)}
.gd-folder-name{display:flex;align-items:center;gap:6px;min-width:0;overflow-wrap:anywhere}
.gd-category-section{font-size:14px;margin:12px 0 3px 6px;color:#514438}
.gd-category-item.gd-line{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:5px 9px 5px 19px}
.gd-category-item[hidden]{display:none}
.gd-category-item>small{white-space:nowrap;font-variant-numeric:tabular-nums}
.gd-category-item:hover{background:#f8f5ef;border-radius:5px}
.gd-originals{margin:5px 0;font-size:13px}
.gd-originals summary{cursor:pointer}
.gd-originals ul{margin:6px 0;padding-inline-start:18px}
.gd-originals a{overflow-wrap:anywhere}
:root{--gd-orange:#eb9d32;--gd-ink:#29292b;--gd-line:#c7c8c9;--gd-paper:#fff;--gd-muted:#595b5e}
.gd-heading h1{margin:0 0 1rem;color:var(--gd-ink);font-size:clamp(1.5rem,3vw,2rem)}
.gd-card,.portal-body .panel,.fire-main .panel,.workspace .ws-card,.fire-main .fire-card{background:#fff;border:1px solid var(--gd-line);border-radius:12px}
.gd-card{padding:clamp(14px,2vw,24px);margin-bottom:16px}.gd-card h2,.panel>h2,.panel-head h2,.ws-card>h2,.fire-card>h2{font-size:1.05rem;color:var(--gd-ink);border-inline-start:4px solid var(--gd-orange);padding-inline-start:9px;margin:0 0 14px}
.gd-tiles{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
.gd-tiles a,.gd-chips a,.gd-path{color:var(--gd-ink);background:#faf9f7;border:1px solid #d8d5cf;border-radius:8px}
.gd-tiles a{display:flex;align-items:center;gap:10px;text-decoration:none;padding:14px 10px;font-weight:650;min-height:50px}.gd-tiles a:hover,.gd-chips a:hover{border-color:#b57216;background:#fff4e2}
.gd-tiles svg,.gd-icon,.gd-tools svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.75;flex:none}
.gd-tiles svg{color:#915609}.gd-filters,.gd-chips{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.gd-filters label{display:grid;gap:5px;max-width:100%}.gd-filters input,.gd-filters select{max-width:100%}
.gd-chips a,.gd-path{display:inline-block;font-size:.87rem;padding:5px 9px;text-decoration:none}.gd-result,.gd-family{padding:12px 0;border-bottom:1px solid #d7d7d7}.gd-result>strong,.gd-result>small,.gd-line{display:block;overflow-wrap:anywhere}.gd-result>small,.gd-family small{color:var(--gd-muted);margin:4px 0}.gd-path{margin:4px 4px 4px 0}.gd-line{padding:8px 4px}.gd-edit summary,.gd-family summary,.gd-card>summary{font-weight:650;cursor:pointer}.gd-edit{margin-top:8px}
.gd-open,.gd-chat{box-sizing:border-box;font:inherit;color:var(--gd-ink)}
.gd-open{position:fixed;right:0;top:54%;z-index:75;display:grid;justify-items:center;gap:2px;border:1px solid #5c4a2f;border-right:0;border-radius:13px 0 0 13px;background:#29292b;color:white;padding:8px 5px;font-size:12px;cursor:pointer;box-shadow:0 2px 9px #17171730}.gd-open svg{width:22px;height:22px;fill:none;stroke:var(--gd-orange);stroke-width:1.8;stroke-linejoin:round}.gd-open:focus-visible,.gd-chat :focus-visible{outline:3px solid #af6a0e;outline-offset:2px}
dialog.gd-chat{position:fixed;inset:0 0 0 auto;margin:0;padding:0;width:min(430px,100vw);height:100%;height:100dvh;max-width:100vw;max-height:100dvh;border:0;border-left:1px solid #a6a5a3;border-radius:0;background:#f4f3f1;box-shadow:-8px 0 38px #25222233;overflow:hidden}
.gd-chat[open]{display:flex;flex-direction:column}.gd-chat::backdrop{background:#25252632}.gd-chat>header{display:flex;align-items:center;justify-content:space-between;flex:none;background:#29292b;color:white;padding:12px 16px}.gd-chat-heading{display:flex;align-items:center;gap:9px}.gd-chat-heading>span{border-radius:3px;background:var(--gd-orange);height:21px;width:5px}.gd-chat h2{margin:0;font-size:18px;color:inherit}.gd-chat button,.gd-edit button{font:inherit;cursor:pointer;border-radius:7px;border:1px solid #bfc0c0;padding:6px 11px;color:var(--gd-ink);background:white}.gd-chat button:disabled,.gd-edit button:disabled{opacity:.55;cursor:wait}
.gd-chat #gd-close{background:transparent;color:white;border-color:#717173;min-width:42px;font-size:23px;line-height:1}.gd-messages{overflow-y:auto;min-height:0;flex:1;padding:16px;overscroll-behavior:contain}.gd-messages article{margin:0 0 14px}.gd-bubble,.gd-self{width:fit-content;max-width:100%;overflow-wrap:anywhere;white-space:pre-line;border-radius:11px;padding:9px 12px;margin:5px 0;font-size:14px}.gd-bubble{background:white;border:1px solid var(--gd-line)}.gd-self{margin-left:auto;border:1px solid #ebba72;background:#ffebcd}.gd-bubble a{display:inline-block;margin:5px 8px 2px 0;max-width:100%}.gd-file{margin:8px 0;padding:10px;border:1px solid #c7c8c9;border-radius:8px;background:#fff}.gd-file strong{overflow-wrap:anywhere}.gd-file .gd-path{display:block}
.gd-options label{display:flex;align-items:flex-start;gap:6px;cursor:pointer;padding:5px 0;font-size:13px;line-height:1.45}.gd-options input[type=checkbox]{width:17px;height:17px;flex:none;margin:2px 0}.gd-options input[type=search]{width:100%;margin:5px 0}.gd-options details{padding:6px 0}.gd-options summary{cursor:pointer}.gd-options .gd-manual{max-height:180px;overflow-y:auto}.gd-confirm{background:#ffe3b9!important}.gd-done{color:#354339;font-size:13px}
.gd-options label span{min-width:0;overflow-wrap:anywhere}.gd-filing-guide{display:block;color:#56514a;font-size:12px}
#gd-compose{border-top:1px solid #b9b9b9;background:white;margin:0;padding:10px 14px max(10px,env(safe-area-inset-bottom));flex:none}#gd-text{width:100%;box-sizing:border-box;border:1px solid #bbb;border-radius:8px;resize:vertical;max-height:23vh;min-height:44px;background:#fff;color:var(--gd-ink);padding:8px}.gd-tools{display:flex;gap:6px;align-items:center}.gd-tools button{min-height:38px;min-width:38px;line-height:1;display:inline-grid;place-items:center}.gd-tools button.gd-send{margin-inline-start:auto;background:var(--gd-orange);border-color:#af6f1b;font-weight:700}.gd-chat #gd-status,.gd-local-status{font-size:13px;color:#5a4121;margin:4px 0 0;overflow-wrap:anywhere}#gd-attachments{font-size:12px;overflow-wrap:anywhere;margin:3px 0}.gd-sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}.gd-chat [hidden],.gd-card [hidden]{display:none!important}
@media(max-width:650px){.gd-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.gd-tiles a{flex-direction:column;gap:7px;font-size:14px;text-align:center;justify-content:center;padding:11px 2px}.gd-card{margin-bottom:12px}.gd-filters>*{max-width:100%}.portal-header .desktop-nav{display:none}}
@media(prefers-reduced-motion:no-preference){.gd-chat[open]{animation:gd-enter .16s ease-out}@keyframes gd-enter{from{transform:translateX(24px);opacity:.7}to{transform:translateX(0);opacity:1}}}
/* On narrow screens the assistant has its own place in the navigation. */
.mobile-nav .gd-nav-open {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:3px; min-width:60px; min-height:48px; padding:4px 7px;
  border:0; border-radius:8px; background:none; color:#664a26;
  font:inherit; font-size:12px; white-space:nowrap; cursor:pointer;
}
.gd-nav-open svg {
  width:22px; height:22px; fill:none; stroke:currentColor;
  stroke-width:1.8; stroke-linejoin:round;
}
.gd-nav-open:focus-visible {outline:2px solid #af6a0e; outline-offset:2px}
.gd-nav-open:disabled {opacity:.55; cursor:progress}
@media(max-width:640px) {
  .gd-open {display:none}
  html[data-assistant-dock] {scroll-padding-bottom:calc(76px + env(safe-area-inset-bottom))}
}
@media(min-width:641px) and (max-width:900px) {
  .ehs-workspace .gd-open {display:none}
}
@media(min-width:641px) {
  html[data-assistant-dock="phone"] {scroll-padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  html[data-assistant-dock="phone"] .gd-open {display:none}
  .mobile-nav[data-assistant-dock] {
    position:fixed; inset:auto 0 0; height:calc(68px + env(safe-area-inset-bottom));
    padding:8px 8px calc(8px + env(safe-area-inset-bottom)); margin:0;
    display:flex; align-items:center; justify-content:space-around;
    border-top:1px solid #e9edf2; background:#fff; z-index:50;
  }
  .mobile-nav[data-assistant-dock] a {
    display:flex; flex-direction:column; align-items:center;
    gap:3px; min-width:60px; padding:5px 13px; font-size:12px;
  }
  .mobile-nav[data-assistant-dock] a svg {width:22px; height:22px}
  html[data-assistant-dock="phone"] :is(.workspace,.fire-main) {
    padding-bottom:calc(80px + env(safe-area-inset-bottom));
  }
}
@media print{.gd-open,.gd-nav-open,.gd-chat{display:none!important}}

.gd-open:disabled{opacity:.55;cursor:progress}
.gd-attachment {display:inline-flex; align-items:center; gap:5px; max-width:100%; margin:2px 4px 3px 0; padding:2px 5px; border:1px solid #ded8cc; border-radius:6px; background:#faf8f3;}
.gd-attachment img {width:28px; height:28px; object-fit:cover; border-radius:4px;}
.gd-attachment span {overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:180px;}
.gd-attachment button {padding:1px 5px; min-height:25px; line-height:1;}
#gd-compose .gd-tools {flex-wrap:wrap;}
.gd-drop-hint{
  margin:3px 0 0;
  font-size:12px;
  color:var(--gd-muted);
}
.gd-chat.gd-dragging::after{
  content:"松开即可添加附件";
  position:absolute;
  inset:56px 8px 8px;
  z-index:1;
  display:grid;
  place-items:center;
  border:2px dashed #a66010;
  border-radius:10px;
  background:#fff8ebf2;
  color:#563007;
  font-weight:650;
  pointer-events:none;
}
