/* Home baseline: 1500px border box minus 34px each side = 1432px content.
   Only outer page width/horizontal padding; preserve vertical spacing, tables and print. */
@media screen {
 body[data-dashboard-original]{--sg-page-max:1500px;--sg-page-gutter:34px}
 body[data-dashboard-original] #root.gw-route-content :is(.gw-dashboard-page .gw-content,
  .node-personnel-directory>.people-wrap,
  .appointment-page>.people-wrap,
  .attendance-page>.people-wrap,
  .receivables-page>.people-wrap,
  main.meta-updates-page,
  .contract-management:not(:has(.contract-print-report)),
  .successor-page,
  .award-wrap,
  .training-page,
  .cashbook-page,
  .account-route:not(.account-route-person),
  .independent-shell>.independent-main:not(.person-detail-design)){box-sizing:border-box;width:100%;max-width:var(--sg-page-max);margin-inline:auto;padding-inline:var(--sg-page-gutter);min-width:0}
 /* Flatten only the preview-control wrapper; keep all labels and handlers intact. */
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact .dash-preview-controls{display:contents}
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact .dash-preview-search-status{position:static;width:auto;height:auto;overflow:visible;clip-path:none;white-space:nowrap}
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact .dash-preview-controls>input{flex:none}
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact .dash-preview-controls>label{flex-wrap:nowrap;white-space:nowrap}
}
@media screen and (min-width:1200px){
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact{flex-wrap:nowrap}
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact .dash-preview-controls>label{flex:none}
}
@media screen and (max-width:720px){body[data-dashboard-original]{--sg-page-gutter:16px}}
@media screen and (max-width:600px){
 body[data-dashboard-original]{--sg-page-gutter:12px}
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact .dash-preview-controls{display:flex;flex-wrap:wrap}
 body[data-dashboard-original] #root.gw-route-content .dash-profile-compact .dash-preview-controls>label{white-space:normal;flex-wrap:wrap}
}

.home-period-title{display:flex!important;align-items:center;gap:10px;flex-wrap:nowrap}.home-period-control{display:inline-flex!important;align-items:center;gap:3px;font-size:13px;font-weight:500;white-space:nowrap;color:#395d59;flex-shrink:0}.home-period-control>button{width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important;padding:0!important;margin:0!important;border:1px solid #d4dfdc!important;border-radius:6px!important;background:#fff!important;color:#30564f!important;box-shadow:none!important;font-size:22px!important;line-height:24px!important}.home-period-control>button:disabled{opacity:.35}.home-period-control>span{min-width:53px;text-align:center}@media(max-width:420px){.home-period-title{gap:7px!important}.home-period-control{font-size:12px;gap:2px}.home-period-control>button{width:28px!important;min-width:28px!important}.home-period-control>span{min-width:48px}}@media(max-width:380px){.management-db-heading .home-period-title{white-space:nowrap;flex-shrink:0;gap:5px!important;font-size:13px!important}.management-db-heading .home-period-control>button{width:26px!important;min-width:26px!important}.management-db-heading .home-period-control>span{min-width:45px}.management-db-heading>span{font-size:11px!important;white-space:nowrap}}

/* selection and report styling: external for production CSP */
.sg-selection{border:1px solid #dfe5ed;border-radius:14px;padding:18px 20px;margin:14px 0;background:#fff;box-shadow:0 5px 24px #172c4810}.sg-selection summary{cursor:pointer;font-size:18px;font-weight:700;color:#1a2638}.sg-selection p{margin:8px 0;color:#68768a;font-size:13px;line-height:1.5}.sg-selection label{display:block}.sg-selection input[type=search]{box-sizing:border-box;max-width:420px;width:100%;padding:10px 12px;border:1px solid #d9e1ec;background:#fafbfd;border-radius:8px}.sg-selection-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.sg-selection-actions button{padding:9px 12px;border:1px solid #d6deea;border-radius:8px;color:#34445a;background:#fff;font-weight:600}.sg-selection-actions [data-save]{background:#315f9f;color:#fff;border-color:#315f9f}.sg-selection-list{max-height:360px;overflow:auto;border:1px solid #e9edf3;border-radius:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.sg-selection-column{min-width:0;padding:14px 16px}.sg-selection-column:nth-child(2){border-left:1px solid #e9edf3}.sg-selection-column h4{margin:0 0 10px;font-size:14px;color:#354960}.sg-selection-column[data-division=unknown]{grid-column:1/-1;border-top:1px solid #e9edf3}.sg-selection-row{display:flex;align-items:flex-start;gap:4px;border-radius:6px}.sg-selection-row:hover{background:#f4f7fb}.sg-selection-row>button,.sg-selection-spacer{width:28px;height:34px;flex:0 0 28px}.sg-selection-row>button{border:0;background:transparent;cursor:pointer}.sg-selection-list label{display:flex;gap:9px;align-items:flex-start;min-height:38px;padding:8px 0;font-size:14px;line-height:1.4}.sg-selection-list label span{overflow-wrap:anywhere}.sg-selection-list input[type=checkbox]{accent-color:#315f9f;width:16px;height:16px;flex:none}.sg-selection-list small{color:#64748b}.sg-selection [data-review]{color:#92400e}.sg-selection button:focus-visible,.sg-selection input:focus-visible{outline:2px solid #2563eb;outline-offset:2px}@media(max-width:700px){.sg-selection{padding:14px}.sg-selection-list{max-height:45vh;grid-template-columns:minmax(0,1fr)}.sg-selection-column:nth-child(2){border-left:0;border-top:1px solid #e9edf3}.sg-selection-actions button{min-height:38px}}
.report-builder-dialog{width:min(960px,calc(100vw - 32px))!important;max-width:960px!important;max-height:calc(100dvh - 32px);overflow:auto}.report-builder-body{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}.report-selection-panel{min-width:0}.report-selection-shortcuts{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}.report-selection-shortcuts button,.report-select-toggle{border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#334155;padding:6px 10px;cursor:pointer}.report-selection-search{display:grid;gap:5px;margin-bottom:10px;font-weight:600}.report-selection-search input{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:6px;padding:8px}.report-selection-tree{max-height:360px;overflow:auto;border:1px solid #e9edf3;border-radius:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0}.report-selection-column{min-width:0;padding:14px 16px}.report-selection-column:nth-child(2){border-left:1px solid #e9edf3}.report-selection-column h4{margin:0 0 10px;font-size:14px;color:#354960}.report-select-row{display:flex;align-items:center;gap:7px;min-height:38px;padding:2px 4px;border-radius:6px}.report-select-row:hover{background:#f4f7fb}.report-select-row input[type=checkbox]{accent-color:#315f9f;width:16px;height:16px;flex:none}.report-select-toggle,.report-select-spacer{width:28px;height:28px;flex:0 0 28px;display:inline-flex;align-items:center;justify-content:center;padding:0}.report-select-row label{display:flex;align-items:flex-start;gap:8px;min-width:0;cursor:pointer}.report-select-row label span{overflow-wrap:anywhere}.report-select-row small{margin-left:6px;color:#64748b}.report-select-children{margin-left:15px;padding-left:9px;border-left:1px solid #e2e8f0}.report-builder-result{min-width:0}.report-selection-summary{display:grid;gap:4px;margin-bottom:10px}.report-selection-help{font-size:12px;color:#64748b}.report-select-toggle:focus-visible,.report-selection-shortcuts button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}@media(max-width:700px){.report-builder-dialog{width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)}.report-builder-body{grid-template-columns:minmax(0,1fr);gap:12px}.report-selection-tree{max-height:45vh;grid-template-columns:minmax(0,1fr)}.report-selection-column:nth-child(2){border-left:0;border-top:1px solid #e9edf3}.report-selection-shortcuts button{min-height:36px}}
.sg-selection-row.sg-depth-2{padding-inline-start:16px}.sg-current-roster{font-size:12px;white-space:nowrap;color:#526981;margin-inline-start:6px}

.division-overview-table,.performance-table{width:100%!important;min-width:0!important;table-layout:fixed}.division-overview-table th:nth-child(1){width:7%}.division-overview-table th:nth-child(2){width:25%}.division-overview-table th:nth-child(3){width:11%}.division-overview-table th:nth-child(4){width:22%}.division-overview-table th:nth-child(5){width:23%}.division-overview-table th:nth-child(6){width:12%}.division-overview-table td,.performance-table td{overflow-wrap:anywhere}.sg-roster-count{text-align:right;white-space:nowrap}

.division-overview-table th:first-child,.performance-table th:first-child{text-align:left}.division-overview-table .division-child th:first-child{padding-inline-start:12px}.performance-table tr.kind-센터 th:first-child{padding-inline-start:10px}.performance-table tr.kind-팀 th:first-child{padding-inline-start:16px}.performance-table th:nth-child(1){width:5%}.performance-table th:nth-child(2){width:20%}.performance-table th:nth-child(3){width:10%}.performance-table th:nth-child(4),.performance-table th:nth-child(5),.performance-table th:nth-child(6){width:9%}.performance-table th:nth-child(7){width:8%}.performance-table th:nth-child(8),.performance-table th:nth-child(9){width:15%}

.division-overview-table .gw-list-number,.performance-table .gw-list-number{min-width:0;max-width:none;padding-inline:2px;text-align:center;white-space:nowrap}.division-overview-table th,.division-overview-table td{min-width:0;overflow-wrap:anywhere}.division-overview-table .division-org-name{min-width:0}.division-overview-table .division-org-link{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}

.person-detail-card .person-basic-eight{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.person-basic-eight>div,.person-basic-address>div{min-width:0}.person-basic-eight dd,.person-basic-address dd{overflow-wrap:anywhere}.person-basic-address{display:grid;grid-template-columns:minmax(0,1fr)}@media(max-width:700px){.person-detail-card .person-basic-eight{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:380px){.person-detail-card .person-basic-eight{grid-template-columns:minmax(0,1fr)}}

.cashbook-page .cb-form .cb-wide input[type=file]{box-sizing:border-box;width:100%;max-width:100%;height:auto;min-height:38px;padding:5px 8px;line-height:1.4}.cashbook-page .cb-form .cb-wide input[type=file]::file-selector-button{box-sizing:border-box;max-width:100%;margin-inline-end:8px;padding:4px 9px;line-height:1.35;white-space:normal}

.person-detail-card .person-basic-eight [data-real-birthday-slot] .real-birthday-editor:not(:has(form)){justify-content:flex-start;gap:6px}.person-detail-card .person-basic-eight [data-real-birthday-slot] .real-birthday-editor>button{flex:none}.person-detail-card .person-basic-eight>div:has([data-real-birthday-slot] .real-birthday-editor form){grid-column:1/-1}.person-detail-card .person-basic-eight [data-real-birthday-slot]{min-width:0;max-width:100%}

/* Direct attendance: five balanced desktop metrics, responsive for smaller screens. */
@media (min-width:900px){body[data-dashboard-original] .dash-attendance-overview .dash-attendance-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}body[data-dashboard-original] .dash-attendance-overview .dash-attendance-grid article{display:flex;flex-direction:column;align-items:flex-start;min-width:0}body[data-dashboard-original] .dash-attendance-overview .dash-attendance-grid article>span{min-height:2.8em;line-height:1.4;margin-bottom:4px}body[data-dashboard-original] .dash-attendance-overview .dash-attendance-grid article>b{font-variant-numeric:tabular-nums;line-height:1.4}}

/* Home notice and request cards: match attendance outer card. */
@media screen { body[data-dashboard-original] #root.gw-route-content .sales-common-side > :is(.sales-common-notices,.home-request-connections){box-sizing:border-box;background:#fbfcfd;border:1px solid #dce7ec;border-radius:9px;min-width:0} }

/* Home notice and work-request cards only. */
.sales-common-grid .sales-common-side > .sales-common-notices,
.sales-common-grid .sales-common-side > #work-contacts.home-request-connections { border-radius: 14px !important; }

/* Read-only schedule detail. Editor controls and other dialogs are unchanged. */
@media screen {
 .dash-editor-dialog .dash-schedule-detail {color:#173f50;background:#fff;min-width:0;font-size:14px;line-height:1.6;}
 .dash-schedule-detail-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:24px;border-bottom:1px solid #dce6ec;}
 .dash-schedule-detail-heading>div {min-width:0;}
 .dash-schedule-detail-kicker {margin:0 0 6px;color:#607f90;font-size:13px;}
 .dash-schedule-detail-heading h2 {margin:0;font-size:20px;line-height:1.45;overflow-wrap:anywhere;}
 .dash-schedule-detail-heading .dash-editor-mode {flex:none;}
 .dash-schedule-detail-body {padding:24px;display:grid;gap:24px;}
 .dash-schedule-detail-facts {margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px;}
 .dash-schedule-detail-facts>div {min-width:0;display:grid;grid-template-columns:84px minmax(0,1fr);gap:12px;align-items:start;}
 .dash-schedule-detail-facts>div:first-child {grid-column:1/-1;}
 .dash-schedule-detail-facts dt {color:#607f90;}
 .dash-schedule-detail-facts dd {margin:0;overflow-wrap:anywhere;}
 .dash-schedule-detail h3 {margin:0 0 12px;font-size:15px;line-height:1.5;}
 .dash-schedule-detail-notes,.dash-schedule-detail-files {border-top:1px solid #dce6ec;padding-top:20px;min-width:0;}
 .dash-schedule-detail-notes>div {white-space:pre-wrap;overflow-wrap:anywhere;}
 .dash-schedule-detail-files ul {margin:0;padding:0;list-style:none;}
 .dash-schedule-detail-files li {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid #e5edf1;}
 .dash-schedule-detail-file-name {display:grid;gap:4px;min-width:0;overflow-wrap:anywhere;}
 .dash-schedule-detail-file-name small {color:#607f90;font-size:12px;}
 .dash-schedule-detail-file-actions {display:flex;flex:none;gap:8px;}
 .dash-schedule-detail-file-actions a {display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 10px;border:1px solid #c8dce6;border-radius:6px;color:#17607e;text-decoration:none;white-space:nowrap;font-size:13px;}
 .dash-schedule-detail-actions {display:flex;justify-content:flex-end;padding:16px 24px;border-top:1px solid #dce6ec;background:#f7fafc;}
 .dash-schedule-detail-actions button {min-height:44px;min-width:80px;}
}
@media screen and (max-width:599px) {
 .dash-editor-dialog .dash-schedule-detail-heading {padding:20px 16px;gap:12px;}
 .dash-schedule-detail-heading h2 {font-size:18px;}
 .dash-schedule-detail-body {padding:20px 16px;gap:20px;}
 .dash-schedule-detail-facts {grid-template-columns:minmax(0,1fr);gap:14px;}
 .dash-schedule-detail-facts>div {grid-template-columns:76px minmax(0,1fr);gap:12px;}
 .dash-schedule-detail-files li {align-items:flex-start;flex-direction:column;gap:10px;}
 .dash-schedule-detail-file-actions {align-self:flex-end;}
 .dash-schedule-detail-actions {padding:14px 16px;}
}

/* Keep the read-only calendar header and close action inside the viewport. */
@media screen {
 .dash-editor-dialog:has(> .dash-schedule-detail) {overflow:hidden;}
 .dash-editor-dialog > .dash-schedule-detail {display:flex;flex-direction:column;height:100%;max-height:100%;min-height:0;}
 .dash-schedule-detail > .dash-schedule-detail-heading {flex:0 0 auto;}
 .dash-schedule-detail > .dash-schedule-detail-body {flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;}
 .dash-schedule-detail > .dash-schedule-detail-actions {flex:0 0 auto;}
}
@media screen and (max-width:599px) {
 .dash-schedule-detail > .dash-schedule-detail-actions {padding-bottom:max(14px,env(safe-area-inset-bottom));}
}
