/* Shared geometry only. Theme palettes and motion remain independent. */
:root { --page-gutter:clamp(20px,2.6vw,44px); --panel-inset:24px; --page-width:1680px; }
:root{--control-font-size:.8125rem;--control-font-weight:400;--control-line-height:1.25rem;--control-height:44px;--control-padding:16px;--control-gap:8px}
html[data-ui-style] .page :is(.primary-button,.secondary-button,.dark-button,.danger-button,.voice-button,.file-control,.compact-action,.text-link){font-size:var(--control-font-size)!important;font-weight:var(--control-font-weight)!important;line-height:var(--control-line-height)!important;letter-spacing:normal;min-height:var(--control-height);padding:8px var(--control-padding)!important;gap:var(--control-gap);font-family:inherit;white-space:normal;text-wrap:pretty;max-width:100%}
html[data-ui-style] body.auth-surface :is(.primary-button,.secondary-button,.dark-button,.danger-button,.voice-button,.file-control,.compact-action,.text-link){font-size:var(--control-font-size)!important;font-weight:var(--control-font-weight)!important;line-height:var(--control-line-height)!important;letter-spacing:normal;min-height:var(--control-height);padding:8px var(--control-padding)!important;gap:var(--control-gap);font-family:inherit;white-space:normal;max-width:100%}
html[data-ui-style] .page :is(.table-actions,.row-actions,.task-table-actions,td) :is(.primary-button,.secondary-button,.compact-action){min-height:40px}
@media(max-width:820px){html[data-ui-style] .page :is(.table-actions,.row-actions,.task-table-actions,td) :is(.primary-button,.secondary-button,.compact-action){min-height:44px}}
html[data-ui-style] .page { max-width:var(--page-width); padding:28px var(--page-gutter) 44px; }
html[data-ui-style] .context-bar { padding-inline:var(--page-gutter); }
html[data-ui-style] .page:has(> .operation-form) { --page-width:calc(1280px + 2 * var(--page-gutter)); }
html[data-ui-style] .page:has(> .workflow-form) { --page-width:calc(1280px + 2 * var(--page-gutter)); }
/* List shells remain wide; simple editors use a bounded field region. */
html[data-ui-style] .data-surface > .form-grid { max-width:1120px; }
html[data-ui-style] .shared-filter.padded-form { padding:var(--panel-inset); }
html[data-ui-style] .form-grid > button { justify-self:start; align-self:end; }
.employee-directory { max-width:1120px; margin-inline:auto; }
.employee-directory .padded-form { padding:var(--panel-inset); }
.employee-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; }
.employee-fields > label { min-width:0; margin:0; }
.employee-fields :is(input,select) { width:100%; max-width:none; height:44px; min-height:44px; }
.employee-actions { display:flex; justify-content:flex-end; padding-top:20px; }
.employee-actions button,.employee-import-form button { min-height:44px; }
.employee-import-form { display:flex; align-items:end; flex-wrap:wrap; gap:16px; }
.employee-import-form label { flex:0 1 480px; min-width:0; margin:0; }
.employee-import-form input[type=file] { width:100%; min-width:0; height:44px; min-height:44px; padding:8px; }
.employee-search label { max-width:480px; }
.shared-filter.employee-filter{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:end}.shared-filter.employee-filter label{margin:0;max-width:none;min-width:0}.employee-filter :is(input,select){width:100%;height:44px}.employee-filter-actions{grid-column:1/-1;display:flex;gap:10px;justify-content:flex-end;align-items:center}.employee-filter-actions :is(button,a){margin:0;min-height:44px}@media(max-width:900px){.shared-filter.employee-filter{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.shared-filter.employee-filter{grid-template-columns:minmax(0,1fr)}.employee-filter-actions{justify-content:flex-start}.employee-filter :is(input,select){font-size:16px}}
.employee-directory .data-surface { width:100%; }
.employee-directory .panel-heading { align-items:center; }
.employee-entry .employee-fields { grid-template-columns:minmax(140px,220px) minmax(220px,1fr) minmax(160px,240px);gap:24px;align-items:start; }
.employee-directory :is(.employee-fields,.employee-import-form) label { display:flex;flex-direction:column;gap:8px;font-weight:400; }
.employee-directory :is(.employee-fields,.employee-import-form) :is(input,select) { margin-top:0; }
.employee-directory [hidden] { display:none!important; }
.employee-table { table-layout:fixed!important; }
.employee-table :is(th,td) { overflow-wrap:anywhere; }
#employee-import { scroll-margin-top:120px; }
@media(max-width:900px){.employee-fields,.employee-entry .employee-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.employee-fields,.employee-entry .employee-fields{grid-template-columns:minmax(0,1fr)}.employee-import-form{align-items:stretch}.employee-import-form label{flex-basis:100%}.employee-actions{justify-content:flex-start}}
.recipient-picker { display:flex;flex-direction:column;gap:8px;min-width:0; }
.recipient-picker label { margin:0; }
.recipient-picker input { width:100%;min-width:0;margin:0; }
.recipient-picker small { color:var(--muted);font-size:12px; }
.recipient-picker>button { align-self:flex-start;font-size:13px;font-weight:400;min-height:44px; }
.recipient-options { position:fixed;z-index:90;background:var(--paper);color:var(--ink);border:1px solid var(--line-strong,var(--line));border-radius:5px;padding:4px;overflow:auto;box-shadow:0 12px 28px rgba(0,0,0,.18); }
.recipient-options[hidden] { display:none; }
.recipient-options [role=option] { padding:10px 12px;min-height:44px;cursor:pointer;overflow-wrap:anywhere; }
.recipient-options [role=option]:hover,.recipient-options [aria-selected=true] { background:var(--mint-soft); }
.recipient-options small { display:block;color:var(--muted);font-size:12px; }
.employee-create-dialog { width:min(520px,calc(100% - 32px));max-height:calc(100dvh - 48px);overflow:auto;padding:0;background:var(--paper);color:var(--ink);border:1px solid var(--line-strong,var(--line));border-radius:8px; }
.employee-create-dialog::backdrop { background:color-mix(in srgb,var(--navy-950) 65%,transparent); }
.employee-create-dialog .panel-heading { align-items:center;gap:16px; }
.employee-create-body { padding:24px;display:grid;gap:20px; }
.employee-create-body label { margin:0;display:flex;flex-direction:column;gap:8px; }
.employee-create-body :is(input,select) { width:100%;min-height:44px;margin:0; }
.employee-create-body p { margin:0;color:var(--muted); }
.employee-create-body .error { color:var(--red); }
@media(max-width:600px){.employee-create-body{padding:16px}.employee-create-body :is(input,select){font-size:16px}}
html[data-ui-style] .page:has(> .action-confirm-form):not(:has(.mail-preview-surface)) { --page-width:calc(1000px + 2 * var(--page-gutter)); }
html[data-ui-style] .operation-form, html[data-ui-style] .action-confirm-form { width:100%; max-width:none; }
.page-head > div, .panel-heading > div, .form-grid > *, .form-actions > * { min-width:0; }
.page-head p, .panel-heading p { overflow-wrap:anywhere; }
html[data-ui-style] .panel-heading,html[data-ui-style] .section-heading,
html[data-ui-style] :is(.queue-footer,.form-section,.form-actions,.form-grid,.section-copy,.attachment-strip,.record-summary,.notification-rule-head,.notification-rule-actions,.process-list-head,.process-row,.holiday-footer,.selection-head) { padding-inline:var(--panel-inset); }
html[data-ui-style] .form-section > :is(.form-grid,.section-copy),
html[data-ui-style] .operation-form > .form-section > label { padding-inline:0; }
html[data-ui-style] .task-tabs { padding-inline:var(--panel-inset); gap:20px; }
html[data-ui-style] .task-tabs a { padding-inline:0; }
html[data-ui-style] :is(.task-table,.data-table:not(.assistant-table),.holiday-table) :is(th,td):first-child { padding-left:var(--panel-inset); }
html[data-ui-style] :is(.task-table,.data-table:not(.assistant-table),.holiday-table) :is(th,td):last-child { padding-right:var(--panel-inset); }
html[data-ui-style] .task-table td { vertical-align:top; }
html[data-ui-style] .task-table-actions a:first-child { margin-top:0; }
html[data-ui-style] .action-desk-grid { grid-template-columns:minmax(0,1fr) 352px; align-items:stretch; }
html[data-ui-style] .action-desk-main { display:flex; flex-direction:column; gap:24px; }
html[data-ui-style] .action-desk-main > .data-surface:last-child { flex:1; }
html[data-ui-style] .action-desk-grid > .action-flow-rail { position:static; display:flex; flex-direction:column; align-self:stretch; }
html[data-ui-style] .action-desk-grid > .action-flow-rail ol { flex:1; display:flex; flex-direction:column; justify-content:space-between; }
html[data-ui-style] .action-flow-rail :is(.flow-title,.flow-selected-summary,.next-action),
html[data-ui-style] .action-flow-rail ol { padding-inline:var(--panel-inset); }
html[data-ui-style] .action-flow-rail .next-action { margin:0; }
html[data-ui-style] .desk-selection-summary { display:none; }
html[data-ui-style] .assistant-header,
html[data-ui-style] :is(.assistant-composer,.assistant-shortcuts,.assistant-result),
html[data-ui-style] .assistant-context > section { padding:20px var(--panel-inset); }
html[data-ui-style] .return-entry { --surface:var(--paper); --soft:var(--mint-soft); --accent:var(--green); }
html[data-ui-style] .return-entry :is(.return-device,.return-evidence,.return-select-all) { padding-inline:var(--panel-inset); }
html[data-ui-style] .return-proof-grid { padding-inline:var(--panel-inset); }
html[data-ui-style] .holiday-meta { padding-inline:0; }
.data-table-wrap:focus-visible { outline:2px solid var(--green); outline-offset:-2px; }
.data-table .action-column,.task-table .action-column{position:sticky;right:0;z-index:1;background:var(--paper);min-width:160px;border-inline-start:1px solid var(--line)}.data-table th.action-column,.task-table th.action-column{z-index:2}.data-table .action-column a,.task-table .action-column a{max-width:180px}.task-table tr.selected .action-column{background:var(--mint-soft)}
@media(max-width:820px){.data-table .action-column,.task-table .action-column{position:static;min-width:140px}}
/* Later input rules must not expand accessible file-picker inputs off screen. */
html[data-ui-style] input.sr-only { width:1px; min-width:0; max-width:1px; height:1px; min-height:0; padding:0; }
.knowledge-layout > .reminder-rules, .rules-layout > .reminder-rules { grid-column:1 / -1; }
html[data-ui-style] :is(.notification-schedule,.notification-recipients,.notification-job-filters,.sap-queue-head,.sap-queue-row) { padding-inline:var(--panel-inset); }
@media (max-width:1400px) {
  html[data-ui-style] .action-desk-grid, html[data-ui-style] .action-detail-grid { grid-template-columns:minmax(0,1fr); }
  html[data-ui-style] .action-desk-grid > .action-flow-rail { display:none; }
  html[data-ui-style] .desk-selection-summary { display:flex; }
  html[data-ui-style] .action-detail-grid > .action-flow-rail { display:block; position:static; }
}
@media (max-width:820px) {
  :root { --page-gutter:16px; --panel-inset:16px; }
  html[data-ui-style] .page { padding:24px var(--page-gutter) 36px; }
  html[data-ui-style] .task-table :is(th,td):first-child,
  html[data-ui-style] .task-table :is(th,td):last-child { padding-inline:0; }
  html[data-ui-style] .task-table tr { padding-inline:var(--panel-inset); }
  html[data-ui-style] .action-confirm-form { padding:20px var(--panel-inset); }
  html[data-ui-style] .action-confirm-form .form-actions { margin-inline:calc(-1 * var(--panel-inset)); }
  html[data-ui-style] .task-tabs { gap:16px; }
}
.equipment-lines { display:grid; gap:4px; overflow-wrap:anywhere; }
html[data-ui-style] :is(.data-table,.task-table) .equipment-cell { min-width:180px; }
.equipment-count { color:var(--muted); font-size:12px; white-space:nowrap; }
.serial-values { font-variant-numeric:tabular-nums; }
.sap-history,.task-item-table { max-width:100%; overflow:auto; }
.sap-queue [role=row],.sap-history [role=row],.task-item-table [role=row] { min-width:1200px; }
/* Rev1.3: align input tops independently of helper copy and action height. */
html[data-ui-style] .handoff-panel { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
html[data-ui-style] .handoff-dates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
html[data-ui-style] .handoff-dates > label,
html[data-ui-style] .handoff-deadline { display:grid; grid-template-rows:auto 44px auto; align-content:start; gap:8px; margin:0; min-width:0; }
html[data-ui-style] .handoff-dates small { color:var(--muted); font-size:12px; line-height:1.5; }
html[data-ui-style] .handoff-dates input { margin:0; height:44px; min-width:0; }
html[data-ui-style] .deadline-control { display:flex; gap:8px; position:relative; min-width:0; }
html[data-ui-style] .deadline-control > input:first-child { flex:1; width:0; }
html[data-ui-style] .deadline-control button { white-space:nowrap; min-height:44px; padding:0 12px; font-size:13px; }
html[data-ui-style] .deadline-control button[hidden] { display:none; }
html[data-ui-style] .deadline-control .deadline-native-picker { position:absolute; bottom:0; right:0; width:1px; min-width:1px; max-width:1px; height:1px; min-height:1px; padding:0; opacity:0; pointer-events:none; }
html[data-ui-style] .handoff-panel > .check-card { grid-column:1; align-self:center; }
html[data-ui-style] .handoff-panel > button { grid-column:2; grid-row:auto; justify-self:end; }
html[data-ui-style] .inventory-table { min-width:1120px; }
html[data-ui-style] .inventory-table :is(th,td):last-child { min-width:112px; white-space:nowrap; }
html[data-ui-style] .inventory-table .status-pill { white-space:nowrap; }
@media (max-width:700px) {
  html[data-ui-style] .handoff-dates { grid-template-columns:1fr; }
  html[data-ui-style] .handoff-panel { grid-template-columns:1fr; }
  html[data-ui-style] .handoff-panel > button { grid-column:1; width:100%; }
  html[data-ui-style] .holiday-table :is(th,td):first-child,
  html[data-ui-style] .holiday-table :is(th,td):last-child { padding-inline:0; }
}
