/* Shared portal workspace: typography, density and semantic states. */
:root{--work-space:12px;--work-radius:10px;--work-font:14px}
.page{font-family:var(--font-text);font-size:var(--work-font);line-height:1.45}.page h1{font-size:26px;line-height:1.2}.page h2{font-size:18px;line-height:1.3}.page h3{font-size:15px}.page .hint,.page .page-sub{font-size:13px;line-height:1.4}.page .panel{border-radius:var(--work-radius)}.page .btn,.page .tab,.page button,.page input,.page select,.page textarea{font-family:var(--font-text)}.page .btn,.page .tab{font-size:14px;min-height:32px;padding:6px 11px}.page table{font-size:14px}.page th{font-size:13px;letter-spacing:normal}.page td{vertical-align:middle}.work-page{max-width:1660px;margin:0 auto}.work-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.work-head h1,.work-head p{margin:0}.work-head p{color:var(--text2);font-size:14px;margin-top:7px}.work-fresh{text-align:right;color:var(--text2);font-size:13px;white-space:nowrap}.work-fresh span{display:block;font-size:12px;margin-top:4px}.work-panel,.business-kpi{background:var(--card);border:1px solid var(--border);border-radius:var(--work-radius);padding:14px}.work-panel{margin-bottom:14px}.work-panel h2{margin:0 0 10px}.work-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}.work-section-head h2{margin:0}.work-counter{font-size:17px;font-weight:700;color:var(--accent)}.work-tabs{display:flex;gap:4px;flex-wrap:wrap;margin:8px 0}.work-tabs a{border:1px solid var(--border);border-radius:7px;padding:6px 10px;color:var(--text2);background:var(--card);text-decoration:none;font-size:14px}.work-tabs .active{background:var(--accent);border-color:var(--accent);color:#fff}.work-filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;padding:11px 12px;margin:10px 0 14px;background:var(--card);border:1px solid var(--border);border-radius:var(--work-radius)}.work-filters label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--text2)}.work-filters input,.work-filters select,.work-edit-form input,.work-edit-form select,.work-edit-form textarea{font:inherit;font-size:14px;border:1px solid var(--border-hi);background:var(--input-bg);color:var(--text);border-radius:6px;padding:6px 9px;min-height:33px;box-sizing:border-box}.work-search{flex:1 1 260px}.work-filters input[type=number]{width:90px}.work-edit-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:12px 0}.work-edit-form>div{display:flex;flex-direction:column;gap:4px;font-size:13px}.work-edit-form textarea{min-height:70px}.work-edit-form .errorlist{color:var(--red);padding-left:16px}.work-edit-form button{align-self:end;justify-self:start}.work-create{margin:10px 0}.work-create>summary{display:inline-flex;cursor:pointer}.work-table-wrap{overflow:auto;border:1px solid var(--border);border-radius:var(--work-radius);background:var(--card)}.work-panel .work-table-wrap{border:0;border-radius:0}.work-table{width:100%;border-collapse:collapse;text-align:left}.work-table th{font-weight:600;color:var(--text2);background:var(--input-bg);padding:9px 11px;white-space:nowrap}.work-table td{padding:9px 11px;border-top:1px solid var(--border);line-height:1.35}.work-table tbody>tr:hover{background:var(--accent-glow)}.work-table small,.work-secondary{display:block;color:var(--text2);font-size:13px;margin-top:4px}.work-nowrap{white-space:nowrap}.work-table .work-empty,.work-empty{text-align:center;padding:28px 12px;color:var(--text2)}.backlog-table{min-width:900px}.backlog-table th:first-child{width:46%}.backlog-detail>summary{cursor:pointer;list-style:none;position:relative;padding-left:17px}.backlog-detail>summary:before{content:'›';position:absolute;left:0;color:var(--accent);font-size:20px;line-height:1}.backlog-detail[open]>summary:before{transform:rotate(90deg)}.backlog-detail>summary::-webkit-details-marker{display:none}.backlog-editor{padding:8px 0}.backlog-editor .work-edit-form{grid-template-columns:1fr 1fr}.backlog-editor .work-edit-form>div:first-child,.backlog-editor .work-edit-form>div:last-of-type{grid-column:1/-1}.work-status{display:inline-flex;border:1px solid currentColor;border-radius:6px;padding:2px 7px;font-size:12px;line-height:1.4;white-space:nowrap;color:var(--text2)}.work-status.inbox,.work-status.neutral,.work-status.cancelled{color:var(--gray)}.work-status.waiting,.work-status.warning{color:var(--orange)}.work-status.active,.work-status.planned,.work-status.factory{color:var(--accent)}.work-status.done,.work-status.success,.positive{color:var(--green)}.work-status.danger,.negative{color:var(--red)}.work-feedback{border-radius:7px;background:var(--green-soft);color:var(--green);padding:8px 12px}.work-source{color:var(--text2);font-size:13px;margin:10px 0}.work-source summary{cursor:pointer;color:var(--accent)}.work-source p{margin:8px 0;overflow-wrap:anywhere}.work-page-footer{display:flex;gap:12px;justify-content:space-between;align-items:center;margin:10px 0;font-size:13px;color:var(--text2)}.work-page-footer>div{display:flex;gap:8px;align-items:center}.work-period-label{display:flex;flex-wrap:wrap;gap:8px 20px;margin:10px 0 12px;font-size:13px;color:var(--text2)}.work-period-label b{color:var(--text)}.work-select{position:relative;align-self:flex-end}.work-select summary{cursor:pointer;border:1px solid var(--border-hi);border-radius:6px;padding:6px 10px;min-height:33px;background:var(--input-bg);box-sizing:border-box}.work-select>div{position:absolute;z-index:25;right:0;min-width:225px;max-height:300px;overflow:auto;background:var(--card);border:1px solid var(--border-hi);border-radius:8px;padding:8px;box-shadow:var(--shadow-card)}.work-select>div label{flex-direction:row;align-items:center;font-size:14px;padding:5px}.work-select input[type=checkbox]{min-height:0}.business-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.business-kpi>span{display:block;font-size:13px;color:var(--text2)}.business-kpi>strong{display:block;font-family:var(--font-brand);font-size:25px;line-height:1.2;margin:9px 0}.business-kpi small{display:block;font-size:13px;color:var(--text2);margin-top:5px}.business-kpi>a{display:inline-block;font-size:12px;margin-top:5px}.work-trend{font-weight:600;font-size:14px}.work-meter{height:5px;background:var(--card2);border-radius:4px;overflow:hidden;margin:7px 0}.work-meter i{display:block;height:100%;background:var(--accent);border-radius:4px}.channel-meter{width:150px;max-width:100%;height:4px}.work-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:var(--text2)}.work-legend span:before{content:'';display:inline-block;width:8px;height:8px;border-radius:2px;background:var(--gray);margin-right:5px}.work-legend .current:before{background:var(--accent)}.work-legend .previous:before{background:var(--gray)}.work-legend .negative:before{background:var(--red)}.work-legend .unlabeled:before{background:var(--orange)}.business-chart{display:flex;gap:8px;height:160px;align-items:stretch;padding-top:12px}.business-bar{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center}.bar-pair{display:flex;align-items:flex-end;gap:2px;height:128px;width:100%;border-bottom:1px solid var(--border)}.bar-pair i{flex:1;min-height:1px;border-radius:3px 3px 0 0}.bar-before{background:var(--gray);opacity:.45}.bar-now{background:var(--accent)}.bar-now.negative{background:var(--red)}.business-bar>span{font-size:10px;color:var(--text2);margin-top:5px;white-space:nowrap}.business-columns{display:grid;grid-template-columns:2fr 1fr;gap:14px}.business-columns .work-panel{min-width:0}.business-attention{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);font-size:14px;text-decoration:none}.business-attention>b{font-size:22px}.business-attention>span:last-child{margin-left:auto}.business-next{display:block;padding:9px 0;border-bottom:1px solid var(--border);font-size:13px;text-decoration:none}.business-next .work-status{margin-right:6px}.quality-toolbar{display:flex;gap:10px 18px;flex-wrap:wrap;align-items:center}.quality-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}.quality-kpis>div{display:flex;gap:12px;align-items:center;padding:10px 12px;background:var(--card);border:1px solid var(--border);border-radius:8px}.quality-kpis b{font-size:25px;font-family:var(--font-brand)}.quality-kpis span{color:var(--text2);font-size:13px}.quality-table{min-width:1050px;table-layout:fixed}.quality-table th:first-child{width:34%}.quality-table th:nth-child(2){width:17%}.quality-table th:nth-child(3){width:17%}.quality-table th:nth-child(4){width:17%}.quality-product{display:flex;gap:10px;align-items:center}.quality-product>div{min-width:0}.quality-photo{width:56px;height:56px;object-fit:contain;flex:none;background:#fff;border:1px solid var(--border);border-radius:7px}.no-photo{display:flex;align-items:center;justify-content:center;font-size:11px;text-align:center;background:var(--card2);color:var(--text2)}.quality-product-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:600;text-decoration:none}.quality-product .work-status{margin-top:5px}.quality-rate{font-size:22px}.quality-rate-meter{max-width:130px}.quality-rate-meter i{background:var(--orange)}.quality-stack{display:flex;background:var(--card2);height:7px;overflow:hidden;border-radius:4px;width:100%;margin-bottom:6px}.quality-stack i{display:block;height:100%}.quality-stack .negative{background:var(--red)}.quality-stack .unlabeled{background:var(--orange)}.quality-trend{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.quality-trend svg{width:85px;height:30px}.quality-trend.danger{color:var(--red)}.quality-trend.warning{color:var(--orange)}.quality-trend.success{color:var(--green)}.quality-trend.neutral{color:var(--gray)}.quality-detail-link{display:block;margin-top:6px;font-size:13px}.quality-executive .filter-bar{margin:8px 0}.bell-wrap{position:relative;display:flex;align-items:center}.bell-preview{position:absolute;top:100%;right:0;z-index:100;width:360px;max-width:calc(100vw - 28px);background:var(--card);color:var(--text);border:1px solid var(--border-hi);border-radius:10px;box-shadow:var(--shadow-card);padding:8px;margin-top:4px;font-size:14px}.bell-wrap:after{position:absolute;content:'';top:100%;right:0;height:8px;width:100%}.bell-preview-head{display:grid;gap:4px;padding:7px 8px 10px;font-size:14px;line-height:1.3}.bell-preview-head b,.bell-preview-head .hint{display:block;margin:0;min-width:0;white-space:normal;word-break:normal}.bell-preview-head .hint{font-size:12px;line-height:1.4}.bell-preview-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;border-top:1px solid var(--border);padding:9px 8px 3px}.bell-preview-footer form{margin:0}.bell-preview-footer .btn{white-space:nowrap}.bell-preview-footer .bell-preview-all{border:0;padding:4px 0;font-size:13px;text-align:left}.bell-preview-status{margin:4px 8px 2px;font-size:12px;line-height:1.35}.bell-preview button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.bell-preview-list{padding:0;margin:0;list-style:none;max-height:400px;overflow:auto}.bell-preview-list a{display:block;padding:9px 8px;border-top:1px solid var(--border);text-decoration:none;color:var(--text);line-height:1.4}.bell-preview-list a:hover{background:var(--card2);border-radius:6px}.bell-preview-label{display:block;font-size:12px;color:var(--accent);font-weight:600}.bell-preview-list time{display:block;color:var(--text2);font-size:12px;margin-top:4px}.bell-preview-empty{padding:15px 8px;color:var(--text2)}.bell-preview-all{display:block;text-align:center;border-top:1px solid var(--border);padding:10px 6px 5px;font-weight:600}.note-row{gap:10px;padding:10px 8px!important;font-size:14px}.note-row>span:last-child{min-width:0}.note-row .hint{display:block}.page [hidden]{display:none!important}.work-page a:focus-visible,.bell-preview a:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:1150px){.business-columns{grid-template-columns:1fr}.quality-kpis{grid-template-columns:repeat(2,1fr)}.business-kpi>strong{font-size:21px}.business-chart{gap:4px}.business-bar>span{font-size:9px}}@media(max-width:700px){.work-head{align-items:flex-start;flex-direction:column}.work-fresh{text-align:left}.business-kpis{grid-template-columns:repeat(2,1fr)}.work-edit-form{grid-template-columns:1fr}.work-head h1{font-size:23px}.business-chart{overflow:auto;min-width:0}.business-bar{min-width:22px}.work-page-footer{flex-wrap:wrap}.quality-kpis span{font-size:12px}.quality-kpis b{font-size:21px}.work-filters label{flex:1 1 130px}.work-select>div{left:0;right:auto}.bell-preview{position:fixed;top:54px;right:12px}}
body.theme-light{--green:#047857;--orange:#946200;--red:#be123c}.business-bar>span{font-size:11px}.work-filters [hidden]{display:none!important}

.business-factory{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px;padding:10px 0;border-bottom:1px solid var(--border);font-size:13px}.business-factory b,.business-factory small{grid-column:1/-1}.business-factory small{color:var(--text2)}

.page .filter-bar label,.page .filter-bar summary,.page .status,.page .chip,.page .reply-template-item small,.page .template-save,.page .reply-check-note{font-size:13px}.page .filter-bar input,.page .filter-bar select,.page .filter-bar button{font-size:14px}.page .reply-template-item{line-height:1.45}

.work-edit-form input,.work-edit-form select,.work-edit-form textarea{width:100%;min-width:0;font-size:15px;line-height:1.5}.work-edit-form textarea.backlog-description{min-height:148px;resize:vertical;white-space:pre-wrap}

.backlog-table th:first-child{width:30%}.backlog-dialog-column{width:15%}.backlog-dialog a{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;line-height:1.4}.backlog-dialog a+a{margin-top:5px}

/* Heading roles override per-module typography, not table widths or data alignment.
   Compact service controls remain a separate role to preserve their dense layout. */
.app-main .page :is(h1, h2, h3) {
  font-family: var(--heading-font);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: -.3px;
  text-transform: none;
  color: var(--text);
  overflow-wrap: anywhere;
  min-width: 0;
}
.app-main .page h1 { font-size: var(--heading-page-size); }
.app-main .page h2 { font-size: var(--heading-section-size); }
.app-main .page h3 { font-size: var(--heading-subsection-size); }
.app-main .page :is(.panel-head, .work-section-head) :is(h2, h3) { margin: 0; }
.app-main .page .service-detail :is(.service-side > .fold > summary, .chat-panel > .panel-head, #customer-reply > .panel-head, #internal-work) h2 {
  font-family: var(--font-text);
  font-size: var(--heading-compact-size);
  line-height: var(--heading-line-height);
}
/* Numeric header cells inherit the same type as text header cells.
   Their existing right alignment and column sizing are preserved. */
.app-main .page table thead th,
.app-main .page .table thead th.num {
  font-family: var(--font-text);
  font-size: var(--heading-table-size);
  font-weight: var(--heading-weight);
  line-height: var(--heading-line-height);
  letter-spacing: normal;
  text-transform: var(--heading-table-case);
  color: var(--heading-table-color);
  padding: 8px 9px;
  vertical-align: bottom;
}
.app-main .page table thead th :is(a, button) {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

/* Keep notification actions reachable in short windows and at browser zoom. */
.bell-preview{box-sizing:border-box;max-height:calc(100vh - 76px);max-height:calc(100dvh - 76px);overflow-y:auto}
