/* Internal download centre: readable form titles and compact file actions. */
.document-register table { min-width: 48rem; table-layout: fixed; }
.document-register th:first-child { width: 36%; }
.document-register th:last-child { width: 18%; }
.document-register td { overflow-wrap: anywhere; white-space: normal; }
.document-summary { margin: .5rem 0 0; color: var(--muted); line-height: 1.65; }
.document-file-actions { display: flex; flex-wrap: wrap; gap: .65rem 1rem; }
.document-page-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.document-filters .field { margin: 0; min-width: 0; flex: 1 1 10rem; }
.document-filters .field :is(input, select) { width: 100%; max-width: none; }
/* Bravoprodigy workshop: deliberate, readable, theme-aware business UI.
   Shared geometry lives here; appearance.css owns personal palettes. */
html[data-ui]{--ui-shadow:none;--ui-link:var(--ink);--control-border:color-mix(in srgb,var(--ink) 52%,var(--surface));--success-ink:#246247;--success-bg:#eaf4ee;--warning-ink:#805313;--warning-bg:#fff3db;--danger-ink:#a02e3a;--danger-bg:#fceef0;--info-ink:#315c91;--info-bg:#edf2fa;--radius:12px}
body{font-family:"PingFang TC","Noto Sans TC","Microsoft JhengHei",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:.9375rem;line-height:1.65;-webkit-font-smoothing:antialiased}
h1,h2,h3{font-family:inherit;overflow-wrap:anywhere;color:var(--ink)}
h1{font-size:clamp(1.5rem,2.4vw,2rem);font-weight:600;letter-spacing:.015em;line-height:1.4;margin-bottom:8px}
h2{font-size:1.0625rem;font-weight:600;line-height:1.5}h3{font-size:.9375rem;line-height:1.5}
p{line-height:1.8}small,.help{font-size:.75rem;line-height:1.65;color:var(--muted)}
html[data-ui] a:not(.button):not(.brand):not(.sidebar-profile):hover{text-decoration:underline;text-underline-offset:4px}
.skip-link{position:fixed;top:-100px;left:16px;z-index:100;padding:12px 20px;background:var(--surface);color:var(--ink);border:2px solid var(--ui-focus);border-radius:8px}.skip-link:focus{top:12px}
#main-content:focus{outline:none}
.brand-row{flex-shrink:0}.menu-toggle[hidden]{display:none!important}.menu-toggle svg{width:20px;height:20px}.module-navigation[hidden]{display:none!important}
.sidebar{width:256px;padding:26px 16px 16px}.workspace{margin-left:256px;min-width:0}.brand.company-brand{margin:0 4px 28px;gap:12px}.company-logo{flex-basis:44px;width:44px;padding:6px;border-radius:7px}.company-logo img{width:32px}.brand-caption{font-size:1.0625rem;font-weight:600;letter-spacing:-.02em}.brand-caption small{font-size:.625rem;letter-spacing:.08em}
html[data-ui] .sidebar .module-navigation .nav-label{font-size:.6875rem;letter-spacing:.1em;font-weight:600;margin:24px 12px 10px}
html[data-ui] .sidebar .module-navigation>.nav-label:first-child{margin-top:0}
html[data-ui] .sidebar .module-navigation>a,html[data-ui] .sidebar .module-navigation .nav-module>summary{min-height:42px;font-size:.8125rem;gap:11px;padding:10px 12px;margin-bottom:3px}
html[data-ui] .sidebar .module-navigation a.selected{box-shadow:inset 3px 0 var(--ui-nav-ink);background:var(--ui-nav-active)}
html[data-ui] .sidebar .module-navigation .nav-module:has(a.selected)>summary{background:transparent}
.sidebar-profile{font-size:.8125rem;gap:10px;padding:16px 4px 0;margin-top:14px}.sidebar-profile>span:nth-child(2){min-width:0;overflow-wrap:anywhere}.sidebar-profile strong{font-weight:600}.sidebar-profile small{font-size:.625rem;line-height:1.7}.sidebar-profile .avatar{width:34px;height:34px}
.topbar{height:68px;padding:0 36px;gap:20px}.topbar>span{font-size:.75rem}.user-menu{gap:12px;min-width:0}.user-menu>a{font-size:.8125rem}.user-menu .notification-bell{border:0;border-radius:9px;width:36px;height:36px;margin:0}.user-menu .avatar{width:30px;height:30px}.text-button{min-height:40px;font-size:.8125rem}.avatar{background:var(--surface-alt);color:var(--ink);border:1px solid var(--line)}
.main-content{padding:32px 36px 56px;max-width:1600px}.page-heading{margin-bottom:28px;align-items:flex-start;gap:24px}.page-heading p{font-size:.875rem;max-width:76ch}.page-heading>.button,.page-heading>.action-group{margin-top:4px}.eyebrow{letter-spacing:normal;font-size:.75rem}.section-heading{gap:16px}.section-heading a{font-size:.8125rem}.section-spacer,.section-gap{margin-top:24px}
html[data-ui] .card{border-radius:var(--radius);box-shadow:none;padding:24px}.card>h2:first-child{margin-bottom:16px}.card p:last-child{margin-bottom:0}.two-columns{gap:24px;align-items:start}.two-columns>*{min-width:0}.form-card{max-width:840px}.log-form,.engineering-form{max-width:1100px}
html[data-ui] .table-card,html[data-ui] .calendar-card{padding:0;overflow:hidden}.table-scroll{overflow:auto;overscroll-behavior-x:contain}table{font-variant-numeric:tabular-nums}th{font-size:.75rem;font-weight:600;padding:13px 20px;color:var(--muted)}td{font-size:.8125rem;padding:16px 20px;vertical-align:top}td small{font-size:.6875rem}.table-card table th{color:var(--muted)}tbody tr:hover{background:var(--surface-alt)}tbody tr:last-child td{border-bottom:0}td .button{padding:6px 12px;min-height:34px}.table-card .section-heading{padding:20px 20px 0}.access-people>.section-heading{padding:20px 20px 0}
html[data-ui] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select,textarea){font-size:.875rem;min-height:42px;border-color:var(--control-border);padding:9px 12px;line-height:1.6}
html[data-ui] input::placeholder,html[data-ui] textarea::placeholder{color:var(--muted);opacity:1}input[type=checkbox]{width:18px;height:18px;flex-shrink:0}input[type=radio]{accent-color:var(--blue)}textarea{min-height:100px}.field{margin-bottom:22px}.field>label,html[data-ui] .field>label{font-size:.8125rem;color:var(--ink);font-weight:600;margin-bottom:8px}.field .help{max-width:72ch}input:focus,select:focus,textarea:focus{border-color:var(--ui-focus)}
html[data-ui] .button{font-size:.8125rem;font-weight:600;min-height:40px;padding:9px 16px;gap:8px;border-color:var(--control-border)}html[data-ui] :is(a,button).button.primary{background:var(--blue);color:var(--accent-fg);border-color:var(--blue)}.button[disabled],button:disabled{opacity:.55;cursor:not-allowed}.button:active:not(:disabled){transform:translateY(1px)}.form-actions{gap:12px;flex-wrap:wrap;align-items:center;padding-top:20px;margin-top:24px}.filter-bar{padding:18px 20px!important;gap:10px;flex-wrap:wrap;border-radius:var(--radius)}.filter-bar :is(input,select){flex:1 1 150px;max-width:260px}.filter-bar input[name=q]{flex:2 1 220px;max-width:360px}.filter-bar :is(input[type=date],select){max-width:200px}.filter-bar a{font-size:.8125rem}.access-filters{padding:18px 20px}.access-filters input,.access-filters select{flex-basis:170px}.result-count{font-size:.75rem}.pagination{gap:12px;font-size:.75rem;flex-wrap:wrap}.pagination>div{flex-wrap:wrap}
html[data-ui] .badge{font-size:.6875rem;padding:3px 9px;border-radius:5px;white-space:normal;line-height:1.55;font-weight:600}.badge.success,.status-approved,.status-closed{background:var(--success-bg);color:var(--success-ink)}.badge.warning,.status-returned{background:var(--warning-bg);color:var(--warning-ink)}.status-rejected{background:var(--danger-bg);color:var(--danger-ink)}.status-review,.status-issued,html[data-ui] .badge.neutral{background:var(--info-bg);color:var(--info-ink)}.status-draft{background:var(--surface-alt);color:var(--muted)}.required,.field-errors,.errorlist,#daily-log-form .errorlist{color:var(--danger-ink)}html[data-ui] .alert.error{background:var(--danger-bg);color:var(--danger-ink)}html[data-ui] .alert.success{background:var(--success-bg);color:var(--success-ink)}html[data-ui] .info-strip{background:var(--surface-alt);color:var(--ink);border-left:3px solid var(--muted);font-size:.8125rem;border-radius:0 var(--ui-input-radius) var(--ui-input-radius) 0;line-height:1.8}
.dashboard-date{font-size:.8125rem;color:var(--muted);padding-top:10px;white-space:nowrap}.stat-grid{gap:16px}.stat>span{font-size:.8125rem}.stat strong{font-size:2rem;font-variant-numeric:tabular-nums;letter-spacing:-.025em;margin:8px 0}.stat strong.stat-text{font-size:1.375rem;line-height:1.9}.stat small{font-size:.75rem}.stat>a{font-size:.75rem}.dashboard-stats{gap:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);overflow:hidden}.dashboard-stats .stat{border:0;border-radius:0;background-image:none;padding:22px 24px;box-shadow:none;border-right:1px solid var(--line)}.dashboard-stats .stat:last-child{border-right:0}.feed-item{padding:16px 0}.feed-item p{font-size:.8125rem}.feed-item small{font-size:.6875rem}.feed-dot{background:var(--ink)}.empty-state{padding:44px 20px;line-height:1.7}.empty-state h3{font-size:1rem}.empty-state p{font-size:.8125rem}.empty-state>span{color:var(--muted);font-size:1.5rem}
.page-tabs{gap:8px;margin:24px 0;flex-wrap:wrap}.page-tabs a{font-size:.875rem;padding:12px 18px}.page-tabs a.active{color:var(--ink);border-color:var(--ink)}.profile-banner{padding:24px!important}.employee-grid{gap:24px 32px}.employee-grid dt{font-size:.75rem}.employee-grid dd{font-size:.9375rem}.detail-list{font-size:.875rem}.preferences-controls{padding-top:20px}.preferences-heading{margin-bottom:20px}.preferences-tag{font-size:.6875rem}.preferences-actions{bottom:12px;box-shadow:0 4px 20px #00000012}.preferences-preview-status{font-size:.8125rem}.theme-swatches button{font-size:.8125rem;min-height:40px}
.access-tabs{gap:8px}.access-tabs a{font-size:.875rem;min-width:130px;flex:1 1 150px;padding:14px 18px;border-radius:var(--ui-input-radius);font-weight:600}.access-tabs a small{font-size:.6875rem;font-weight:400;margin-top:4px}.role-card h3{margin:12px 0 8px}.role-card p{font-size:.8125rem}.capability-list{font-size:.8125rem}.capability-list li:before{color:var(--success-ink)}.access-summary summary{font-size:.8125rem}.access-summary ul{font-size:.8125rem}
html[data-ui] :is(.review-action,.snapshot,.reason-item,.ecr-stage,.change-metadata dt){background:var(--surface-alt);color:var(--ink);border-color:var(--line)}html[data-ui] :is(.review-action,.reason-item){border-radius:var(--ui-input-radius)}.document-text,.change-metadata{font-size:.875rem}.change-metadata dt{font-size:.75rem}.change-metadata dd{min-width:0}.document-section h2{font-size:1rem}.review-action>p{font-size:.875rem}.execution-item textarea{background:var(--surface)}.snapshot,.audit-diff pre{background:var(--surface-alt);color:var(--ink)}.task-link{color:var(--ink)}.task-link strong{font-size:.875rem}.task-link small{font-size:.75rem}
.choice-field label:has(input[type=radio]){min-height:42px;padding:9px 16px}.choice-field label:has(input:checked){color:var(--accent-fg);background:var(--blue)}.item-editor-row>small{color:var(--warning-ink)}.item-editor-row>input[type=text]{min-width:0}.already-carried{color:var(--success-ink)}.note-content{font-size:.9375rem;line-height:1.85}.notebook-row{padding:20px 0}.notebook-add{padding:20px}.note-row-actions button{min-height:36px}.calendar-day{min-height:120px;font-variant-numeric:tabular-nums}.calendar-day.today{background:var(--surface-alt)}.calendar-day.off strong{color:var(--danger-ink)}.calendar-day.outside{opacity:.6}.calendar-day small{font-size:.6875rem}.calendar-tag{color:var(--ink);font-size:.6875rem}.distribution{font-size:.8125rem}
.login-layout{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}.login-story{background:#203653;padding:52px 12%}.login-story h1{color:#fff;font-size:clamp(1.75rem,3vw,2.5rem);line-height:1.65;letter-spacing:.02em}.login-story p{font-size:.9375rem;color:#d0dced}.login-story>small{color:#bdcce0;font-size:.75rem;letter-spacing:normal}.login-story .wordmark span{color:#d0dced;font-size:.75rem;letter-spacing:.08em}.login-form{background:var(--bg)}.login-card{max-width:390px}.login-card h2{font-size:1.625rem}.login-card>p{font-size:.875rem}.login-help{font-size:.75rem!important}.login-company-logo{width:76px}.login-card .full{justify-content:center;margin-top:24px}.story-lines{display:none}
@media(min-width:1600px){.main-content{padding-top:40px}}
@media(max-width:1200px) and (min-width:761px){.sidebar{width:236px;padding:24px 12px 16px}.workspace{margin-left:236px}.main-content{padding:28px 24px 48px}.topbar{padding:0 24px}.brand-caption{font-size:.9375rem}.company-logo{flex-basis:38px;width:38px}.company-logo img{width:28px}.dashboard-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-stats .stat:nth-child(2){border-right:0}.dashboard-stats .stat:nth-child(-n+2){border-bottom:1px solid var(--line)}.employee-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
 .sidebar{position:relative;inset:auto;width:100%;padding:14px 16px 0;border-right:0;border-bottom:1px solid var(--ui-nav-line)}.brand-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:14px}.sidebar .brand.company-brand{margin:0}.brand-caption{font-size:1rem}.company-logo{flex-basis:36px;width:36px;padding:5px}.company-logo img{width:26px}.brand-caption small{font-size:.5625rem;margin-top:2px}.menu-toggle{border-color:var(--ui-nav-line)!important;background:var(--ui-nav-bg)!important;color:var(--ui-nav-ink)!important;font-size:.75rem!important;padding:8px 12px!important;flex-shrink:0}.sidebar .module-navigation{max-height:65vh;overflow-y:auto;padding-bottom:12px}.sidebar .sidebar-profile{display:none}.workspace{margin:0}.topbar{height:54px;padding:0 16px;gap:8px}.topbar>span{font-size:.6875rem}.topbar .divider{padding:0 5px}.user-menu{gap:6px}.user-menu>a{font-size:.75rem;gap:6px}.user-menu .avatar{display:none}.user-menu form{padding-left:8px;margin-left:4px}.user-menu .notification-bell{width:32px;height:32px}.text-button{font-size:.75rem}.main-content{padding:24px 16px 40px}.page-heading{flex-wrap:wrap;gap:14px;margin-bottom:22px}.page-heading>div{min-width:0}.page-heading p{font-size:.8125rem}.dashboard-date{padding-top:0;font-size:.75rem}.page-heading .button{min-height:38px}.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.dashboard-stats{gap:0}.dashboard-stats .stat{padding:18px 16px}.dashboard-stats .stat:nth-child(2){border-right:0}.dashboard-stats .stat:nth-child(-n+2){border-bottom:1px solid var(--line)}.stat strong{font-size:1.75rem}.stat strong.stat-text{font-size:1.125rem}.stat>span,.stat small{font-size:.75rem}.two-columns,.role-grid{grid-template-columns:1fr;gap:20px}html[data-ui] .card{padding:20px}html[data-ui] .table-card,html[data-ui] .calendar-card{padding:0}.form-grid,.employee-grid,.personal-fields{grid-template-columns:1fr}.section-heading{flex-wrap:wrap;align-items:flex-start}.profile-banner{gap:16px}.profile-banner h2{font-size:1.125rem}.profile-banner .badge{margin-left:0}.profile-banner .avatar.large{width:46px;height:46px}.page-tabs{gap:0}.page-tabs a{padding:11px 10px;font-size:.8125rem}.detail-list{grid-template-columns:90px minmax(0,1fr)}.preferences-actions{position:static}.preferences-actions .button{flex:1 1 auto}.preferences-tag{white-space:normal}.notebook-add input[name=content]{min-width:0;flex-basis:100%;order:2}.notebook-add button{order:3}.notebook-add [data-add-errors]{order:4}.notebook-add input[type=date]{width:100%;max-width:none}.notebook-month{gap:8px;padding:12px!important}.notebook-month strong{font-size:.8125rem}.notebook-month .button{font-size:.75rem;padding:8px}.calendar-day{min-height:92px;padding:8px 4px;gap:4px}.calendar-day small{font-size:.625rem}.calendar-day .calendar-tag{display:none}.calendar-day small{overflow-wrap:anywhere}.calendar-weekdays{font-size:.75rem}.date-picker input{flex:1;max-width:100%}.date-picker small{flex-basis:100%}.access-tabs{gap:8px}.access-tabs a{font-size:.8125rem;flex:1 1 130px;min-width:0;padding:12px}.access-summary{min-width:180px}.access-filters :is(input,select){width:100%}.table-card .section-heading{padding:18px 16px 0}td,th{padding:14px 16px}.filter-bar :is(input,select){max-width:none!important}.notification-row{flex-wrap:wrap;padding:8px 0}.notification-row .feed-item{flex:1 1 220px;padding:12px 0}.notification-row .button{margin-bottom:8px}.distribution{grid-template-columns:80px minmax(0,1fr) 24px;gap:10px}.change-metadata{grid-template-columns:90px minmax(0,1fr)}.routing-row,.execution-routing{grid-template-columns:1fr}.login-layout{grid-template-columns:1fr}.login-story{min-height:auto;padding:24px}.login-company-logo{width:44px;margin:0}.login-story .wordmark{display:flex;align-items:center;gap:16px}.login-story>div:nth-child(2),.login-story>small{display:none}.login-form{padding:36px 24px}.login-card h2{font-size:1.375rem}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}.button:active{transform:none}}
@media print{.sidebar,.topbar,.skip-link{display:none!important}.workspace{margin:0}.main-content{padding:0;max-width:none}html[data-ui] body{color:#111;background:#fff}html[data-ui] .card{box-shadow:none;background:#fff;color:#111;border:1px solid #bbb}.preferences-actions{position:static}a{color:inherit}}
/* Keep account actions readable when personal text size is enlarged. */
@media(max-width:760px){.topbar{height:auto;min-height:54px;padding:8px 16px;justify-content:flex-end}.topbar>span{display:none}.user-menu{margin-left:auto}.user-menu>a:last-of-type{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:210px}.user-menu .text-button{white-space:nowrap}}
/* Autosave is a quiet work status, with explicit pending/error states. */
.draft-save-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 20px;padding:14px 18px;border:1px solid var(--line);border-left:3px solid var(--success-ink);border-radius:var(--ui-input-radius);background:var(--surface);color:var(--ink)}.draft-save-bar strong{font-size:.8125rem;font-weight:600}.draft-save-bar p{font-size:.75rem;color:var(--muted);margin:3px 0 0;line-height:1.7}.draft-save-bar[data-autosave-state=pending],.draft-save-bar[data-autosave-state=saving]{border-left-color:var(--muted)}.draft-save-bar:is([data-autosave-state=error],[data-autosave-state=offline],[data-autosave-state=conflict]){border-left-color:var(--danger-ink);background:var(--danger-bg)}.draft-save-bar:is([data-autosave-state=error],[data-autosave-state=offline],[data-autosave-state=conflict]) p{color:var(--danger-ink)}.draft-save-bar button[hidden]{display:none!important}@media(max-width:760px){.draft-save-bar{flex-wrap:wrap;padding:12px 14px}.draft-save-bar .button{margin-left:auto}}
/* Work insights: operational totals first, original work content below. */
.insight-filters{margin-bottom:26px}.insight-filter-main{display:grid;grid-template-columns:130px 170px minmax(160px,1fr) minmax(180px,1.2fr);gap:16px}.insight-filters label{display:block;font-size:.75rem;font-weight:600;margin-bottom:7px}.insight-date-range{display:grid;grid-template-columns:170px 170px;gap:16px;margin-top:16px}.insight-filters [hidden]{display:none!important}.insight-filter-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:20px}.insight-shortcuts{display:flex;gap:18px;margin-right:auto;font-size:.8125rem}.insight-period-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:20px 0 14px}.insight-period-heading h2{margin:0;font-size:1rem;font-variant-numeric:tabular-nums}.insight-period-heading>span{font-size:.75rem}.insight-stats a{text-decoration:none;min-width:0}.insight-stats a:hover{outline:1px solid var(--muted);outline-offset:-1px}.insight-stats .stat strong small{font-size:.8125rem;font-weight:400;margin-left:4px}.insight-count-note{margin-top:-8px;max-width:100ch}.insight-attention-row{display:grid;grid-template-columns:minmax(210px,1fr) minmax(0,2fr) auto;align-items:start;gap:16px;padding:18px 0;border-top:1px solid var(--line)}.insight-attention-row strong{font-size:.8125rem}.insight-attention-row small{display:block;margin-top:6px}.insight-attention-row p{font-size:.875rem;margin:0;overflow-wrap:anywhere}.insight-attention-row>a{font-size:.8125rem;white-space:nowrap}.insight-missing-row{display:flex;gap:12px;align-items:baseline;flex-wrap:wrap;padding:14px 0;border-top:1px solid var(--line);font-size:.8125rem}.insight-missing-row details{flex:1;min-width:150px}.insight-missing-row details p{font-size:.75rem;line-height:1.9;margin:10px 0 0;overflow-wrap:anywhere}.insight-empty{font-size:.875rem;padding:18px 0 4px}.insight-focus-form{display:flex;gap:8px;align-items:center}.insight-focus-form select{min-width:150px}.insight-people-table{min-width:760px}.insight-people-table td:last-child{min-width:200px;max-width:380px}.insight-people-table td:first-child{min-width:180px}.insight-source-list{padding-left:18px;min-width:200px;max-width:360px;white-space:normal}.insight-source-list li{margin:10px 0;overflow-wrap:anywhere}.insight-group{margin-bottom:16px}.insight-group>summary{display:flex;gap:16px;align-items:center;justify-content:space-between;list-style:revert;color:var(--ink);font-size:1rem;cursor:pointer}.insight-group>summary>span{font-size:.75rem;color:var(--muted)}.insight-group>summary::-webkit-details-marker{display:block}.insight-log{margin-top:16px;border-top:1px solid var(--line);padding-top:16px}.insight-log>summary{display:flex;align-items:baseline;gap:16px;flex-wrap:wrap;cursor:pointer;color:var(--ink);font-size:.875rem}.insight-log-author{display:flex;flex-wrap:wrap;gap:10px}.insight-log-author>span{font-size:.75rem;color:var(--muted)}.insight-log-preview{flex:1 1 230px;min-width:0;overflow-wrap:anywhere;color:var(--muted);font-size:.8125rem}.insight-log[open]>summary{padding-bottom:16px}.insight-log-columns{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:32px;padding:20px;background:var(--surface-alt);border-radius:var(--ui-input-radius)}.insight-log-columns h3{font-size:.8125rem;margin-bottom:12px}.insight-log-columns ol{margin:0;padding-left:22px}.insight-log-columns li{font-size:.875rem;line-height:1.85;margin:8px 0;overflow-wrap:anywhere;white-space:normal}.insight-log-footer{display:flex;gap:16px;justify-content:space-between;align-items:center;padding-top:16px;font-size:.8125rem;overflow-wrap:anywhere}.insight-log-footer>span{min-width:0}.insight-distributions>summary{font-size:.875rem;color:var(--ink);cursor:pointer}.insight-distributions .two-columns{margin-top:20px}
@media(max-width:1150px){.insight-filter-main{grid-template-columns:1fr 1fr}.insight-attention-row{grid-template-columns:1fr 1.5fr}.insight-attention-row>a{grid-column:2}.insight-stats .stat{padding:18px}}
@media(max-width:760px){.insight-filter-main{gap:14px}.insight-filter-main>div{min-width:0}.insight-date-range{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.insight-shortcuts{flex-basis:100%;padding:0 0 8px}.insight-filter-actions .button{flex:1}.insight-attention-row{grid-template-columns:minmax(0,1fr);gap:10px}.insight-attention-row>a{grid-column:auto}.insight-focus-form{width:100%}.insight-focus-form select{flex:1;min-width:0}.insight-period-heading{gap:6px}.insight-group>summary{align-items:flex-start;flex-direction:column;gap:8px}.insight-log>summary{gap:8px}.insight-log-preview{flex-basis:100%}.insight-log-columns{grid-template-columns:minmax(0,1fr);gap:20px;padding:16px}.insight-log-footer{flex-direction:column;align-items:flex-start}.insight-count-note{font-size:.6875rem}.insight-missing-row{gap:8px}.insight-missing-row details{flex-basis:100%}}
/* Shared private attachment preview, across engineering and work logs. */
.preview-filename{overflow-wrap:anywhere;word-break:break-word}
.preview-actions{margin:0;padding:0;border:0;flex-wrap:wrap}
.attachment-preview{min-width:0}
.preview-image{display:flex;justify-content:center;align-items:flex-start;overflow:auto;background:var(--surface-alt);padding:16px;border-radius:var(--radius)}
.preview-image img{display:block;max-width:100%;height:auto}
.preview-pdf{display:block;width:100%;height:75vh;min-height:420px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface)}
.preview-text{white-space:pre-wrap;overflow-wrap:anywhere;font-family:inherit;line-height:1.8;margin:0;background:var(--surface-alt);padding:20px;border-radius:var(--radius);max-height:75vh;overflow:auto}
.attachment-preview .table-scroll{max-width:100%;margin-bottom:24px}
.attachment-preview td{max-width:24rem;overflow-wrap:anywhere;white-space:pre-wrap}
@media(max-width:760px){.preview-pdf{min-height:360px}.preview-text{padding:12px}.preview-actions{width:100%}}
/* Named reviewers and release recipients share a readable people chooser. */
+.named-people-field{border:0;padding:0;margin:20px 0;min-width:0}.named-people-field legend{font-size:.875rem;font-weight:600}.routing-people>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:10px 24px}.routing-people label{display:flex;align-items:flex-start;gap:10px;line-height:1.7;overflow-wrap:anywhere;font-size:.875rem}.routing-people input[type=checkbox]{flex:0 0 auto;margin-top:5px}.named-stage>summary{cursor:pointer;color:var(--ink);font-size:1rem;font-weight:600}.named-stage>summary>span{font-size:.8125rem;font-weight:400;margin-left:16px}.named-stage[open]>summary{padding-bottom:12px}

/* Role ordering is explicit and separate from people/approval-stage ordering. */
.role-sort-toolbar,.role-sort-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.role-sort-toolbar{margin-bottom:18px}.role-sort-toolbar p{margin:0}.role-sort-tools{margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid var(--line)}.role-sort-tools>span{display:flex;gap:14px}.role-drag-handle{display:inline-flex;align-items:center;gap:5px;cursor:grab;touch-action:none;user-select:none}.role-drag-handle svg{width:16px;height:24px}.role-dragging{outline:2px solid var(--ui-focus);opacity:.65}.role-dragging .role-drag-handle{cursor:grabbing}.role-delete-link{color:var(--danger-ink)!important}.role-sort-tools button:disabled{opacity:.4;cursor:default}.role-card .form-actions{flex-wrap:wrap}.button.danger{background:var(--danger-bg);border-color:var(--danger-ink);color:var(--danger-ink)}

html[data-ui] .card .form-actions .button.role-delete-confirm{background:var(--danger-bg);border-color:var(--danger-ink);color:var(--danger-ink)}

/* Worklog rows wrap and grow while keeping Enter as the next-item shortcut. */
.item-editor-row{align-items:flex-start;flex-wrap:wrap}.item-editor-row>textarea{flex:1 1 120px;min-width:0;width:0;min-height:42px;box-sizing:border-box;line-height:1.65;resize:none;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere}.item-editor-row:has(input[type=checkbox]:checked)>textarea{text-decoration:line-through;color:var(--muted)}.item-editor-row>[data-item-number]{padding-top:10px}.item-editor-row>input[type=checkbox]{margin-top:12px}.item-editor-row>.item-remove{flex-shrink:0}.item-editor-row>small{align-self:center}
@media(max-width:760px){.item-editor-row>small{order:5;flex-basis:100%;padding-left:30px}}

/* Login installation help follows the active theme and remains readable when enlarged. */
.login-help summary{color:var(--ui-link);text-align:left;}
.login-help[open] p{text-align:left;overflow-wrap:anywhere;}


/* Sidebar release numbers remain legible in every personal theme. */
html[data-ui] .sidebar .module-navigation .module-version{flex:0 0 auto;font-size:.625rem;line-height:1.5;font-variant-numeric:tabular-nums;white-space:nowrap;color:inherit;border:1px solid currentColor;border-radius:4px;padding:1px 4px}
.module-page-version{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:0 0 16px;color:var(--muted);font-size:.75rem}.module-page-version a{color:var(--ui-link)}
.module-version-catalog,.module-version-history{margin-top:24px}.module-release-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.module-release-heading p{margin-bottom:0}
.module-version-table{width:100%}.module-version-table th[scope=row]{font-weight:600;white-space:normal;min-width:10rem}.module-version-table td{white-space:nowrap}.module-version-table td:first-child{color:var(--muted)}
.module-history-filter{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:20px 0 24px}.module-history-filter>div{flex:1 1 220px;max-width:360px}.module-history-filter label{display:block;margin-bottom:7px;font-size:.8125rem;font-weight:600}.module-history-filter select{width:100%}
.module-release-history{border-top:1px solid var(--line);padding:16px 0}.module-release-history>summary{display:flex;justify-content:space-between;gap:16px;cursor:pointer;font-weight:600;color:var(--ink);list-style:none}.module-release-history>summary:before{content:'＋';flex:0 0 auto}.module-release-history[open]>summary:before{content:'−'}.module-release-history>summary>span:first-child{flex:1;min-width:0;overflow-wrap:anywhere}.module-release-history>summary>span:last-child{font-size:.8125rem;font-variant-numeric:tabular-nums;white-space:nowrap}.module-release-history>summary::-webkit-details-marker{display:none}
.module-release-record{padding:18px 0 4px}.module-release-record p,.module-release-record li{overflow-wrap:anywhere;line-height:1.8}.module-release-record h3{font-size:1rem}.module-release-record+.module-release-record{border-top:1px solid var(--line)}
.release-snapshot{margin:16px 0}.release-snapshot summary{cursor:pointer;color:var(--ui-link)}.release-snapshot dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:0 24px;margin-top:12px}.release-snapshot dl>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.release-snapshot dt{overflow-wrap:anywhere}.release-snapshot dd{margin:0;white-space:nowrap;font-variant-numeric:tabular-nums}
@media(max-width:760px){.module-page-version{justify-content:flex-start}.module-history-filter>div{max-width:none}.module-release-heading>.badge{white-space:normal}.module-release-record{padding-top:14px}}

/* Small screens lead with the module and its version; history retains full dates and release context. */
@media(max-width:760px){.module-version-table th:nth-child(1),.module-version-table td:nth-child(1),.module-version-table th:nth-child(4),.module-version-table td:nth-child(4),.module-version-table th:nth-child(5),.module-version-table td:nth-child(5),.module-version-table th:nth-child(6),.module-version-table td:nth-child(6){display:none}.module-version-table th[scope=row]{min-width:0;width:65%;max-width:none}.module-version-table th[scope=col]{white-space:normal}.module-version-table th,.module-version-table td{padding:14px 10px}.module-version-table th[scope=row] a{overflow-wrap:anywhere}}

/* Workspace: actionable queues precede personal records and notifications. */
.workspace-queues{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem;margin-bottom:1.5rem}
.workspace-queue{min-width:0;align-self:start}
.workspace-queue h2{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}
.workspace-item{display:flex;flex-direction:column;gap:.375rem;padding:1rem 0;border-top:1px solid var(--line);color:var(--ink);text-decoration:none;overflow-wrap:anywhere}
.workspace-item:hover .workspace-item-title{text-decoration:underline}
.workspace-item:focus-visible{outline:3px solid var(--ui-link);outline-offset:3px;border-radius:.25rem}
.workspace-item-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;color:var(--muted);font-size:.8125rem}
.workspace-item strong{font-variant-numeric:tabular-nums;color:var(--ui-link)}
.workspace-item-title{line-height:1.65}
.workspace-item-detail,.workspace-queue-footer{font-size:.8125rem;color:var(--muted);line-height:1.65}
.workspace-queue-footer{border-top:1px solid var(--line);padding-top:1rem}
@media(max-width:960px){.workspace-queues{grid-template-columns:minmax(0,1fr)}}

/* Shared mobile drawer: the same permission-filtered navigation as desktop. */
.menu-backdrop[hidden],.menu-toggle[hidden],.menu-close[hidden],.sidebar[hidden]{display:none!important}
.menu-close{display:none}
@media(max-width:760px){
 html[data-ui] .sidebar .module-navigation .nav-label{display:block}
 html.nav-drawer-enabled body.menu-open{overflow:hidden}
 html.nav-drawer-enabled .sidebar{position:fixed;inset:0 auto 0 0;z-index:100;width:min(22rem,calc(100vw - 2rem));height:100vh;height:100dvh;max-height:100dvh;padding:16px;display:flex;flex-direction:column;overflow:hidden;border-right:1px solid var(--ui-nav-line,var(--line));border-bottom:0;box-shadow:6px 0 24px #0003}
 html.nav-drawer-enabled .sidebar .brand-row{flex:0 0 auto;gap:8px}
 html.nav-drawer-enabled .sidebar .brand-caption{min-width:0;overflow-wrap:anywhere}
 html.nav-drawer-enabled .sidebar .brand-caption small{letter-spacing:normal}
 html.nav-drawer-enabled .sidebar .module-navigation{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(16px,env(safe-area-inset-bottom));scrollbar-gutter:stable}
 html.nav-drawer-enabled .sidebar .module-navigation a{white-space:normal;overflow-wrap:anywhere}
 html.nav-drawer-enabled .menu-close{display:inline-flex;flex:0 0 auto;min-height:44px;gap:6px;padding:8px;color:var(--ui-nav-ink,var(--ink));border-color:var(--ui-nav-line,var(--line));background:var(--ui-nav-bg,var(--surface))}
 html.nav-drawer-enabled .menu-backdrop{position:fixed;inset:0;z-index:90;background:#0008;touch-action:none}
 html.nav-drawer-enabled .topbar{position:sticky;top:0;z-index:70;min-height:60px;height:auto;padding:8px 12px;gap:8px}
 html.nav-drawer-enabled .topbar>.platform-caption{display:none}
 html.nav-drawer-enabled .topbar .menu-toggle{display:inline-flex;min-height:44px;gap:6px;padding:8px 10px!important}
 html.nav-drawer-enabled .topbar .menu-toggle svg{width:20px;height:20px;flex:0 0 auto}
 html.nav-drawer-enabled .topbar .user-menu{min-width:0;flex:1;justify-content:flex-end;gap:6px}
 html.nav-drawer-enabled .topbar .user-menu>a:not(.notification-bell){min-width:0;max-width:9rem;overflow-wrap:anywhere}
 html.nav-drawer-enabled .topbar .user-menu form{flex:0 0 auto}
}

@media(max-width:760px){html.nav-drawer-enabled .sidebar .brand.company-brand{min-width:0;flex:1}}

/* Shared mobile drawer: the same permission-filtered navigation as desktop. */
.menu-backdrop[hidden],.menu-toggle[hidden],.menu-close[hidden],.sidebar[hidden]{display:none!important}
.menu-close{display:none}
@media(max-width:760px){
 html[data-ui] .sidebar .module-navigation .nav-label{display:block}
 html.nav-drawer-enabled body.menu-open{overflow:hidden}
 html.nav-drawer-enabled .sidebar{position:fixed;inset:0 auto 0 0;z-index:100;width:min(22rem,calc(100vw - 2rem));height:100vh;height:100dvh;max-height:100dvh;padding:16px;display:flex;flex-direction:column;overflow:hidden;border-right:1px solid var(--ui-nav-line,var(--line));border-bottom:0;box-shadow:6px 0 24px #0003}
 html.nav-drawer-enabled .sidebar .brand-row{flex:0 0 auto;gap:8px}
 html.nav-drawer-enabled .sidebar .brand-caption{min-width:0;overflow-wrap:anywhere}
 html.nav-drawer-enabled .sidebar .brand-caption small{letter-spacing:normal}
 html.nav-drawer-enabled .sidebar .module-navigation{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding-bottom:max(16px,env(safe-area-inset-bottom));scrollbar-gutter:stable}
 html.nav-drawer-enabled .sidebar .module-navigation a{white-space:normal;overflow-wrap:anywhere}
 html.nav-drawer-enabled .menu-close{display:inline-flex;flex:0 0 auto;min-height:44px;gap:6px;padding:8px;color:var(--ui-nav-ink,var(--ink));border-color:var(--ui-nav-line,var(--line));background:var(--ui-nav-bg,var(--surface))}
 html.nav-drawer-enabled .menu-backdrop{position:fixed;inset:0;z-index:90;background:#0008;touch-action:none}
 html.nav-drawer-enabled .topbar{position:sticky;top:0;z-index:70;min-height:60px;height:auto;padding:8px 12px;gap:8px}
 html.nav-drawer-enabled .topbar>.platform-caption{display:none}
 html.nav-drawer-enabled .topbar .menu-toggle{display:inline-flex;min-height:44px;gap:6px;padding:8px 10px!important}
 html.nav-drawer-enabled .topbar .menu-toggle svg{width:20px;height:20px;flex:0 0 auto}
 html.nav-drawer-enabled .topbar .user-menu{min-width:0;flex:1;justify-content:flex-end;gap:6px}
 html.nav-drawer-enabled .topbar .user-menu>a:not(.notification-bell){min-width:0;max-width:9rem;overflow-wrap:anywhere}
 html.nav-drawer-enabled .topbar .user-menu form{flex:0 0 auto}
}

@media(max-width:760px){html.nav-drawer-enabled .sidebar .brand.company-brand{min-width:0;flex:1}}
/* Company calendar: readable month controls and full date notes at large text sizes. */
.company-calendar-filter{display:grid;grid-template-columns:minmax(9rem,1fr) minmax(12rem,1fr) auto auto;gap:.75rem}
.company-calendar-filter :is(input[type=month],select){width:100%;max-width:none;min-width:0}
.calendar-month-controls{display:flex;gap:.5rem;min-width:0}
.calendar-month-controls .button{flex:1;white-space:nowrap}
.calendar-notes{margin-top:1.5rem}
.calendar-notes dl{margin:0}
.calendar-notes dl>div{display:grid;grid-template-columns:minmax(8rem,1fr) minmax(0,3fr);gap:1rem;padding:1rem 0;border-top:1px solid var(--line)}
.calendar-notes dt{display:flex;flex-direction:column;align-items:flex-start;gap:.375rem;font-variant-numeric:tabular-nums}
.calendar-notes dd{margin:0;line-height:1.8;overflow-wrap:anywhere}
@media(max-width:900px){
 .company-calendar-filter{grid-template-columns:minmax(0,1fr)}
 .company-calendar-grid .calendar-day small{display:none}
 .company-calendar-grid .calendar-day.has-note strong::after{content:'•';margin-left:.15rem;font-size:.75em}
 .calendar-notes dl>div{grid-template-columns:minmax(0,1fr);gap:.5rem}
 .calendar-notes dt{flex-direction:row;flex-wrap:wrap;align-items:center}
}

/* Employee dossier: stable identity header and independently authorized sections. */
.personnel-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1rem 1.5rem; }
.personnel-tabs .button { white-space: normal; text-align: center; overflow-wrap: anywhere; }
.personnel-panel, .personnel-record { min-width: 0; overflow-wrap: anywhere; }
.personnel-record { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.personnel-record:last-child { border-bottom: 0; }
.personnel-panel h3 { margin-top: 1.5rem; }

/* Salary and insurance use the same dossier rhythm, with separate bank details. */
.personnel-dossier-form { display: grid; gap: 1.25rem; }
.personnel-section { display: grid; grid-template-columns: minmax(9rem, 1fr) minmax(0, 4fr); gap: 1.5rem; }
.personnel-section > *, .personnel-fields > *, .personnel-item-row > * { min-width: 0; }
.personnel-section h2 { margin-top: 0; }
.personnel-fields { display: grid; gap: 1rem 1.25rem; }
.personnel-fields-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.personnel-fields-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.personnel-fields input, .personnel-fields select, .personnel-fields textarea, .personnel-item-row input { max-width: 100%; width: 100%; box-sizing: border-box; }
.personnel-preset-actions, .personnel-coverage { display: flex; flex-wrap: wrap; gap: .75rem; }
.personnel-preset-actions { margin-bottom: 1rem; }
.personnel-item-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr) minmax(6rem, 1fr); align-items: end; gap: .75rem; padding-block: .75rem; border-top: 1px solid var(--line); }
.personnel-item-row input[type=checkbox], .personnel-coverage input[type=checkbox] { width: auto; flex: 0 0 auto; }
.personnel-coverage { border: 0; padding: 1rem 0; margin: 1rem 0; }
.personnel-coverage legend { font-weight: 600; padding: 0; }
.personnel-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.personnel-facts div, .personnel-bank-summary { min-width: 0; overflow-wrap: anywhere; }
.personnel-facts dt { color: var(--muted); font-size: .875rem; }
.personnel-facts dd { margin: .25rem 0 0; }
.personnel-bank-summary { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .5rem; }
@media (max-width: 960px) { .personnel-section { grid-template-columns: 1fr; gap: .5rem; } .personnel-fields-three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .personnel-item-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .personnel-fields-two, .personnel-fields-three, .personnel-item-row, .personnel-facts { grid-template-columns: minmax(0, 1fr); } .personnel-section { padding: 1rem; } .personnel-preset-actions .button { flex: 1 1 auto; white-space: normal; } }

/* Insurance unit directory and full employee register. */
.insurance-unit-register { margin-bottom: 1.5rem; }
.insurance-unit-register > .section-heading { padding: 1rem 1.25rem; flex-wrap: wrap; gap: 1rem; }
.insurance-unit-tabs { flex-wrap: wrap; gap: .5rem; border: 0; margin-block: 1rem; }
.insurance-unit-tabs a { border: 1px solid var(--line); border-radius: 1.5rem; white-space: normal; overflow-wrap: anywhere; }
.insurance-unit-tabs a[aria-current="page"] { background: var(--blue); color: var(--accent-fg); }
.insurance-register { width: max-content; min-width: 100%; }
.insurance-register :is(th, td) { vertical-align: middle; min-width: 5rem; max-width: 17rem; overflow-wrap: anywhere; }
.insurance-register thead th { text-align: center; }
.insurance-register tbody th { text-align: left; min-width: 12rem; }
.insurance-register small { display: block; color: var(--muted); }
.insurance-register tfoot { font-weight: 600; background: var(--surface-alt); border-top: 2px solid var(--line); }
.insurance-register-scroll:focus-visible { outline: 2px solid var(--ui-link); outline-offset: 2px; }
.insurance-unit-register table { min-width: 76rem; }
.insurance-unit-register td:nth-child(5) { min-width: 18rem; max-width: 24rem; white-space: normal; }
.insurance-unit-register td:not(:nth-child(5)) { white-space: nowrap; }
.insurance-unit-register .action-group { flex-wrap: nowrap; white-space: nowrap; }
html[data-ui] .insurance-unit-tabs a[aria-current="page"] { background: var(--blue); color: var(--accent-fg); }
[data-action-status]{overflow-wrap:anywhere}

/* Site settings: tabs and create action share one desktop row. */
.site-setup-toolbar{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-block:1rem 1.5rem}.site-setup-toolbar .site-setup-tabs{margin:0;flex:1;min-width:0}.site-setup-toolbar .site-create-action{flex:0 0 auto;white-space:normal}
@media(max-width:700px){.site-setup-toolbar{flex-wrap:wrap}.site-setup-toolbar .site-setup-tabs{flex-basis:100%}.site-setup-toolbar .site-create-action{margin-left:auto}}

.site-settings-clock{display:flex;flex-wrap:wrap;align-items:baseline;gap:.75rem;border-block:1px solid var(--line);padding:1rem 0;margin:1rem 0}.site-settings-clock time{font-size:1.25rem;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}

.site-list-filters .field{flex:1 1 14rem;min-width:0}.site-list-filters .field input,.site-list-filters .field select{width:100%;min-width:0}

/* Shared attachment control for every current and future module. Queue ownership stays in adapters. */
.attachment-picker{margin:12px 0 20px;min-width:0}.attachment-picker-controls{position:relative}.attachment-picker .attachment-select-button{display:inline-flex;width:auto;max-width:100%;margin:0;cursor:pointer}html[data-attachment-ui] .attachment-picker [data-attachment-native] input[type=file]{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}.attachment-picker .attachment-select-button:focus-visible,.attachment-picker-controls:has([data-attachment-native] input:focus-visible) .attachment-select-button{outline:2px solid var(--ui-focus);outline-offset:3px}.attachment-paste-target{display:flex;flex-direction:column;gap:6px;border:1px dashed var(--control-border);border-radius:var(--radius);background:var(--surface-alt);color:var(--ink);padding:18px;margin-top:12px;cursor:text}.attachment-paste-target strong{font-size:.875rem}.attachment-paste-target span{font-size:.8125rem;color:var(--muted)}.attachment-paste-target:focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}.attachment-picker [data-file-status]{margin:8px 0;overflow-wrap:anywhere}.attachment-file-queue{display:grid;gap:10px;min-width:0}
@media(max-width:760px){.attachment-paste-target{padding:14px}}

/* Keep record actions aligned with the first row of category tabs. */
.module-tabs-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-block:1rem 1.5rem; }
.module-tabs-toolbar > .personnel-tabs { margin:0; flex:1; min-width:0; }
.module-tabs-toolbar > .module-tabs-action { flex:0 0 auto; }
@media (max-width:700px) {
  .module-tabs-toolbar { flex-wrap:wrap; }
  .module-tabs-toolbar > .personnel-tabs { flex-basis:100%; }
  .module-tabs-toolbar > .module-tabs-action { margin-left:auto; }
}

.attachment-picker[data-drag-over] [data-paste-target]{border-color:var(--ui-link);border-style:solid;background:var(--info-bg);box-shadow:0 0 0 2px var(--ui-link)}

.leave-notice-settings > input[type=search] { width: min(100%, 32rem); margin-block: .5rem 1rem; }
.leave-notice-choices { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; max-height: 24rem; overflow: auto; border: 1px solid var(--line); border-radius: .5rem; padding: 1rem; min-width: 0; }
.leave-notice-choice { display: flex; align-items: flex-start; gap: .75rem; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.leave-notice-choice input { flex: none; margin-top: .25rem; }
.leave-notice-choice[hidden] { display: none; }
@media(max-width:760px) { .leave-notice-choices { grid-template-columns: minmax(0,1fr); } }
.leave-workspace .section-heading { flex-wrap: wrap; gap: .75rem; }

/* Leave balances follow the supplied name / remaining / used layout. */
.leave-balance-head,.leave-balance-row{display:grid;grid-template-columns:minmax(20rem,2.5fr) repeat(3,minmax(6rem,1fr));gap:1.5rem;align-items:start;padding:1.4rem 0;border-bottom:1px solid var(--line)}
.leave-balance-head{font-weight:600;color:var(--muted)}
.leave-balance-row h3{margin:0 0 .4rem}.leave-balance-row p{margin:.4rem 0;max-width:76ch}
.leave-quantity{text-align:right;overflow-wrap:anywhere}.leave-quantity strong{font-size:1.15em}.leave-mobile-label{display:none}
.leave-balances .filter-bar{margin:0}.leave-balances input[name=year]{width:7rem}
.leave-workspace-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.leave-request-form>.card{margin-bottom:1rem}
@media(max-width:1000px){.leave-workspace-grid{grid-template-columns:1fr}.leave-balance-head,.leave-balance-row{grid-template-columns:minmax(14rem,2fr) repeat(3,minmax(5rem,1fr));gap:.8rem}}
@media(max-width:700px){.leave-balance-head{display:none}.leave-balance-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;padding:1.25rem 0}.leave-balance-row>div:first-child{grid-column:1/-1}.leave-quantity{text-align:left}.leave-mobile-label{display:block;color:var(--muted);font-size:.85em;margin-bottom:.4rem}.leave-balances .section-heading{align-items:flex-start;flex-wrap:wrap}}

/* Worklog sequence notices use the personal theme's semantic warning palette. */
html[data-ui] .worklog-continuity{border-left:4px solid var(--warning-ink);margin-bottom:1.5rem;background:var(--warning-bg);overflow-wrap:anywhere}.worklog-continuity h2{margin-top:0}.worklog-continuity p{max-width:70ch}.worklog-continuity .button{white-space:normal;text-align:center}

@media(max-width:760px){html[data-ui] [data-log-date] input[type=date]{flex:1 0 100%;width:100%;max-width:100%;min-width:0}}

/* Stable worklog item identity travels with the complete row during sorting. */
.item-editor-row{display:grid;grid-template-columns:max-content 24px minmax(0,1fr) 42px;gap:6px 10px;padding:6px;border:1px solid transparent;border-radius:var(--radius);position:relative}
.item-sort-controls{grid-column:1;grid-row:1;display:flex;gap:2px;align-items:flex-start}
.item-sort-controls>.button{display:inline-flex;align-items:center;justify-content:center;min-width:36px;width:36px;min-height:42px;padding:4px;color:var(--ink);background:var(--surface);border-color:var(--line);font-size:1rem;line-height:1}
.item-sort-controls>.button:disabled{opacity:.35;cursor:default}
.item-sort-controls>.item-drag-handle{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;font-size:1.5rem}
.item-editor-row>textarea{grid-column:3;grid-row:1;width:100%;min-width:0}
.item-editor-row>[data-item-number],.item-editor-row>input[type=checkbox]{grid-column:2;grid-row:1;justify-self:center}
.item-editor-row>.item-remove{grid-column:4;grid-row:1;min-width:42px;min-height:42px;padding:4px}
.item-editor-row>small{grid-column:3;grid-row:2;white-space:normal;overflow-wrap:anywhere;padding:0}
.item-editor-row.item-sorting{outline:2px solid var(--ui-focus);background:var(--surface-alt);z-index:2}
.item-sorting .item-drag-handle{cursor:grabbing}
@media(max-width:760px){.item-editor-row{grid-template-columns:minmax(0,1fr) 24px 44px;gap:6px;padding:6px 0}.item-sort-controls{grid-column:1;grid-row:1}.item-sort-controls>.button{min-width:44px;width:44px;min-height:44px}.item-editor-row>textarea{grid-column:1/-1;grid-row:2}.item-editor-row>.item-remove{grid-column:3;grid-row:1;min-width:44px;min-height:44px}.item-editor-row>small{grid-column:1/-1;grid-row:3;padding:0}.item-editor-row>[data-item-number],.item-editor-row>input[type=checkbox]{grid-column:2;grid-row:1}}

@media(max-width:760px){html[data-ui] .item-editor .item-sort-controls>.button{min-height:44px;min-width:44px;width:44px}}

/* Shared category navigation and creation actions; permission stays in the source module. */
.module-tabs-toolbar > .module-tabs-nav { margin:0; flex:1; min-width:0; }
.module-tabs-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:flex-start; gap:.5rem; flex:0 0 auto; max-width:100%; margin-left:auto; }
.module-tabs-actions > .button { margin:0; }
@media (max-width:700px) {
  .module-tabs-toolbar > .module-tabs-nav { flex-basis:100%; }
  .module-tabs-toolbar > .module-tabs-actions { margin-left:auto; }
}

/* Personal overview: a compact inbox, followed by personal work and activity. */
.personal-dashboard { min-width:0; }
.personal-dashboard > .card, .personal-dashboard > .two-columns { margin-bottom:1.5rem; }
html[data-ui] .personal-dashboard .dashboard-inbox { padding:0; overflow:hidden; }
.dashboard-inbox > .section-heading { padding:1.25rem 1.5rem; margin:0; border-bottom:1px solid var(--line); }
.dashboard-inbox > .section-heading > .muted { font-size:.75rem; }
.dashboard-queues > .workspace-queue { display:grid; grid-template-columns:11rem minmax(0,1fr); column-gap:1.5rem; padding:1.25rem 1.5rem; border-bottom:1px solid var(--line); }
.dashboard-queues > .workspace-queue:last-child { border-bottom:0; }
.dashboard-queues .section-heading { grid-column:1; grid-row:1 / span 20; align-self:start; margin:0; }
.dashboard-queues h2 { font-size:1rem; margin:0; line-height:1.7; }
.dashboard-queues .workspace-queue > :not(.section-heading) { grid-column:2; min-width:0; }
.dashboard-queues .workspace-empty { margin:0; color:var(--muted); font-size:.8125rem; line-height:1.8; }
.dashboard-queues .workspace-queue-help { margin:0 0 .5rem; font-size:.75rem; color:var(--muted); }
.personal-dashboard a.workspace-item { text-decoration:none; color:var(--ink); }
.personal-dashboard a.workspace-item:hover { background:var(--surface-alt); }
.personal-dashboard a.workspace-item:hover strong { text-decoration:underline; }
.personal-dashboard .workspace-item-meta { font-size:.75rem; }
.personal-dashboard .workspace-item strong { font-size:.875rem; }
.personal-dashboard .workspace-item-title { font-size:.9375rem; }
.personal-dashboard .workspace-item-detail { font-size:.75rem; }
.dashboard-queues .workspace-item:first-of-type { border-top:0; padding-top:.25rem; }
.dashboard-queues .workspace-queue-footer { margin:.5rem 0 0; padding-top:.75rem; }
.dashboard-section-heading { margin:1.75rem 0 .875rem; }
.dashboard-section-heading h2 { font-size:1.125rem; margin:0; }
.personal-dashboard .dashboard-stats { margin-bottom:1rem; }
.personal-dashboard .dashboard-secondary { margin-top:1rem; }
.personal-dashboard .dashboard-activity .empty-state { padding:1.25rem 0; text-align:left; }
.personal-dashboard .feed-item p, .notification-list .feed-item p { overflow-wrap:anywhere; }
.notification-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.75rem; }
.notification-actions form { margin:0; }
.notification-help { font-size:.8125rem; margin-top:-.5rem; margin-bottom:1.25rem; }
.notification-list .notification-row { gap:1rem; }
.notification-list .feed-item { min-width:0; }
.notification-list .notification-row > form { flex-shrink:0; }
@media(max-width:760px) {
 html[data-ui] .personal-dashboard .dashboard-inbox { padding:0; }
 .dashboard-inbox > .section-heading { padding:1rem; }
 .dashboard-queues > .workspace-queue { grid-template-columns:minmax(0,1fr); gap:.625rem; padding:1rem; }
 .dashboard-queues .section-heading { grid-row:auto; }
 .dashboard-queues .workspace-queue > :not(.section-heading) { grid-column:1; }
 .notification-actions { width:100%; justify-content:space-between; }
}

/* Checkbox controls with a separate heading align with adjacent text/date inputs. */
html[data-ui] .field > .checkbox-control { min-height: max(42px, calc(1.4rem + 22px)); margin-bottom: 0; }
.checkbox-control > span { min-width: 0; overflow-wrap: anywhere; }

/* Account footer: deployed site and current route-owned module metadata. */
.sidebar-account{min-width:0;flex-shrink:0}
.sidebar-version-info{display:grid;gap:.2rem;padding:.55rem .25rem 0;color:var(--ui-nav-ink,var(--muted));font-size:.6875rem;line-height:1.6;overflow-wrap:anywhere}
.sidebar-version-info b{font-weight:600;font-variant-numeric:tabular-nums}


/* Figma interaction system: readable feedback, with motion only after an action. */
:root{--motion-feedback:140ms;--motion-travel:180ms;--motion-ease:cubic-bezier(.2,.8,.2,1)}
.preferences-motion{padding-block:1.5rem;border-block:1px solid var(--line);margin-block:1.5rem}
.preferences-motion h3{margin-top:0}.preferences-motion .checkbox-label{display:flex;align-items:center;gap:.75rem;min-height:44px;font-size:1rem;font-weight:600;cursor:pointer}
.preferences-motion .field{margin-bottom:.5rem}.preferences-motion .help{max-width:64ch}.preferences-motion input[type=checkbox]{margin:0;width:20px;height:20px}
.item-drag-preview{position:fixed!important;z-index:300;pointer-events:none;margin:0!important;opacity:1!important;background:var(--surface);border:1px solid var(--ui-focus);box-shadow:0 8px 28px #0003;transform-origin:center;will-change:transform}
.item-drag-source{opacity:.4;border:1px dashed var(--ui-focus)}
.item-drag-preview textarea{pointer-events:none}
.table-scroll:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
.module-tabs-toolbar>.module-tabs-actions{min-height:44px}
.main-content :is(.page-heading,.form-grid,.filter-bar,.module-tabs-toolbar,.form-actions){min-width:0}
@media(prefers-reduced-motion:no-preference){
 html:not([data-reduce-motion=true]) :is(.button,.page-tabs a,.module-tabs-nav a){transition:background-color var(--motion-feedback),border-color var(--motion-feedback),color var(--motion-feedback)}
 html:not([data-reduce-motion=true]) .attachment-paste-target{transition:border-color var(--motion-feedback),background-color var(--motion-feedback),box-shadow var(--motion-feedback)}
 html:not([data-reduce-motion=true]).nav-drawer-enabled .sidebar:not([hidden]){animation:bravo-drawer-in var(--motion-travel) var(--motion-ease)}
 @keyframes bravo-drawer-in{from{opacity:.7;transform:translateX(-16px)}to{opacity:1;transform:translateX(0)}}
}
html[data-reduce-motion=true] *,html[data-reduce-motion=true] *::before,html[data-reduce-motion=true] *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
html[data-reduce-motion=true] :is(.button:active){transform:none!important}
@media(max-width:760px){
 html[data-ui] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]),select,textarea){font-size:max(1rem,16px);min-height:44px}
 .main-content{padding-bottom:max(40px,env(safe-area-inset-bottom))}
 .topbar{padding-top:max(8px,env(safe-area-inset-top))}
 .attachment-select-button{min-height:44px!important}
 .item-drag-preview{padding:6px}
}
@media(min-width:761px){html.nav-drawer-enabled .sidebar{animation:none!important}}
@media(pointer:coarse){html[data-ui] .button,html[data-ui] .text-button{min-height:44px}}
@media(prefers-reduced-motion:reduce){.item-drag-preview{display:none}.item-drag-source{opacity:1}}
@media print{.item-drag-preview{display:none!important}}

/* Glass layout. Geometry stays in this shared stylesheet. */
html[data-ui=glass] body{font-family:-apple-system,BlinkMacSystemFont,'PingFang TC','Noto Sans TC','Microsoft JhengHei',sans-serif}
html[data-ui=glass] .sidebar{inset:12px auto 12px 12px;width:248px;height:calc(100dvh - 24px);border:1px solid var(--ui-nav-line);border-radius:22px;box-shadow:inset 0 1px #fff,0 10px 32px #2525350b;padding:24px 12px 14px;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
html[data-ui=glass] .workspace{margin-left:272px}
html[data-ui=glass] .sidebar .brand{margin:0 8px 28px}
html[data-ui=glass] .sidebar .module-navigation a.selected{box-shadow:inset 0 1px #ffffffb3,0 1px 3px #1717230b;color:var(--ui-link);border-radius:11px;font-weight:600}
html[data-ui=glass] .sidebar .module-navigation :is(>a,.nav-module>summary){border-radius:11px}
html[data-ui=glass] .topbar{background:#f8f8fae6;border-bottom:1px solid #d8d8de;min-height:64px;height:auto;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
html[data-ui=glass] .main-content{padding:32px 32px 56px}
html[data-ui=glass] h1{font-size:1.75rem;letter-spacing:-.025em;font-weight:600}
html[data-ui=glass] h2{letter-spacing:-.015em}
html[data-ui=glass] :is(.card,.role-card,.profile-banner){box-shadow:var(--ui-shadow)}
html[data-ui=glass] :is(.button,.menu-toggle){border-radius:10px;box-shadow:inset 0 1px #ffffff70,0 1px 2px #1212210d}
html[data-ui=glass] .button.primary{box-shadow:inset 0 1px #ffffff40,0 2px 6px #12122117}
html[data-ui=glass] :is(.page-tabs,.access-tabs){border:1px solid var(--line);background:#e7e7ec;gap:4px;padding:4px;border-radius:16px;display:flex;flex-wrap:wrap;align-items:stretch}
html[data-ui=glass] :is(.page-tabs,.access-tabs) a{border:0;background:transparent;border-radius:12px;color:var(--muted);padding:10px 16px;display:flex;align-items:center;justify-content:center;flex:0 1 auto;min-width:0;min-height:40px;white-space:normal;overflow-wrap:anywhere}
html[data-ui=glass] :is(.page-tabs,.access-tabs) :is(a.active,a[aria-current=page]){background:var(--surface);box-shadow:0 1px 4px #24243116;color:var(--ink);border:0;font-weight:600}
html[data-ui=glass] .access-tabs a small{color:inherit}
html[data-ui=glass] th{background:#f5f5f7;color:#616167;border-bottom-color:#d8d8de}
html[data-ui=glass] .table-card{border-radius:18px}
html[data-ui=glass] .badge{border-radius:999px;padding:4px 10px}
html[data-ui=glass] .form-actions{border-color:var(--line)}
html[data-ui=glass] .preferences-actions{background:#f8f8faed;border-radius:18px;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
html[data-ui=glass] .login-story{background:#e6e6ed;color:var(--ink)}
html[data-ui=glass] .login-story :is(h1,p,small,.wordmark span){color:var(--ink)}
@media(min-width:761px) and (max-width:1100px){html[data-ui=glass] .sidebar{width:224px}html[data-ui=glass] .workspace{margin-left:248px}html[data-ui=glass] .main-content{padding:28px 24px 48px}}
@media(max-width:760px){
 html[data-ui=glass] .sidebar{inset:auto;width:100%;height:auto;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;padding:14px 16px 0;backdrop-filter:none;-webkit-backdrop-filter:none}
 html[data-ui=glass] .sidebar .brand{margin:0}
 html[data-ui=glass] .workspace{margin:0}
 html[data-ui=glass] .main-content{padding:24px 16px 40px}
 html[data-ui=glass] h1{font-size:1.5rem}
 html[data-ui=glass] :is(.page-tabs,.access-tabs) a{flex:1 1 auto;padding:9px 12px;min-height:44px}
 html[data-ui=glass].nav-drawer-enabled .sidebar{position:fixed;inset:0 auto 0 0;width:min(22rem,calc(100vw - 2rem));height:100dvh;border-radius:0 22px 22px 0;padding:16px;border-right:1px solid var(--ui-nav-line);background:#f6f6f9}
 html[data-ui=glass] .preferences-actions{backdrop-filter:none;-webkit-backdrop-filter:none}
}
@media(prefers-reduced-transparency:reduce){html[data-ui=glass] :is(.sidebar,.topbar,.preferences-actions){background:#f6f6f9;backdrop-filter:none;-webkit-backdrop-filter:none}}
@media(forced-colors:active){html[data-ui=glass] :is(.page-tabs,.access-tabs) :is(a.active,a[aria-current=page]){outline:2px solid Highlight}html[data-ui=glass] .sidebar .module-navigation a.selected{outline:2px solid Highlight}}
@media print{html[data-ui=glass] .workspace{margin:0}html[data-ui=glass] .main-content{padding:0}html[data-ui=glass] :is(.card,.role-card,.profile-banner){box-shadow:none}}

/* The window content remains opaque for long forms and dense records. */
html[data-ui=glass] body{min-height:100dvh;background-attachment:fixed;background-repeat:no-repeat}
html[data-ui=glass] .workspace{margin:12px 12px 12px 272px;min-height:calc(100dvh - 24px);background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:0 12px 36px #24243108;overflow:clip}
html[data-ui=glass] .topbar{background:#fafafbe6}
html[data-ui=glass] .table-scroll{background:var(--surface);border:1px solid var(--line);border-radius:14px}
html[data-ui=glass] .table-card .table-scroll{border:0;border-radius:0}
html[data-ui=glass] .card{background-color:#fafafb}
@media(min-width:761px) and (max-width:1100px){html[data-ui=glass] .workspace{margin-left:248px}}
@media(max-width:760px){html[data-ui=glass] .workspace{margin:0;border:0;border-radius:0;box-shadow:none;overflow:visible;min-height:100dvh}html[data-ui=glass] body{background:var(--surface)}}
@media print{html[data-ui=glass] .workspace{margin:0;border:0;box-shadow:none;overflow:visible}}

/* Native date/time controls must shrink inside grid and flex fields, including WebKit. */
.field,.form-grid>*,.personal-fields>*{min-width:0}
html[data-ui] input:is([type=date],[type=datetime-local],[type=month],[type=time],[type=week]){-webkit-appearance:none;appearance:none;display:block;box-sizing:border-box;min-width:0;width:100%;max-width:100%;inline-size:100%;max-inline-size:100%}
html[data-ui] input:is([type=date],[type=datetime-local],[type=month],[type=time],[type=week])::-webkit-date-and-time-value{min-width:0;text-align:start}

/* Standalone credential display uses the same theme without management navigation. */
html.standalone-terminal body{min-height:100dvh;margin:0;padding:24px 16px;background-color:var(--bg);color:var(--ink)}
html.standalone-terminal main{box-sizing:border-box;width:min(40rem,100%);margin:0 auto;padding:clamp(20px,4vw,40px);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--ui-shadow);overflow-wrap:anywhere}
html.standalone-terminal :is(h1,p,time){color:var(--ink)}
html.standalone-terminal button{font:inherit;min-height:44px;padding:10px 18px;border:1px solid var(--control-border,var(--line));border-radius:var(--ui-input-radius);background:var(--surface);color:var(--ink)}
html.standalone-terminal .site-qr-image svg{max-width:100%;height:auto;background:#fff}

/* Consistent separation between independent page sections and aligned filter controls. */
.page-stack{display:grid;gap:24px;min-width:0;align-items:start}
.page-stack>*{min-width:0;margin-block:0}
.page-stack>.section-gap,.page-stack>.section-spacer{margin-block:0}
.page-stack>.help{margin-block:-8px 0}
.filter-bar{align-items:flex-end}
.filter-bar .field{margin-bottom:0;min-width:0}
.filter-bar :is(input:not([type=checkbox]):not([type=radio]),select){min-height:44px}
.filter-bar select{height:2.75rem}
.filter-bar>.button{min-height:44px}
.filter-bar>.checkbox-label{display:flex;align-items:center;min-height:44px;align-self:flex-end;gap:8px;flex:0 0 auto;white-space:nowrap}
.filter-bar>.checkbox-label input[type=checkbox]{flex:0 0 auto;width:auto;max-width:none}
.card>form.filter-bar:only-child{padding:0}
.personnel-search .field{flex:0 1 24rem}
.personnel-search input{width:100%;max-width:none!important}
.personnel-summary-table th,.personnel-summary-table td{padding:16px 14px;overflow-wrap:anywhere}
.personnel-summary-table th:first-child{min-width:12rem}
.personnel-summary-table td:last-child{white-space:nowrap}
.personnel-summary-table .personnel-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.personnel-summary-table th{white-space:nowrap}
.personnel-summary-table td:not(:first-child):not(:last-child){min-width:7rem}
.personnel-mobile-list{display:none;list-style:none;padding:0;margin:0}
.personnel-person-card h2{font-size:1rem;margin:0 0 4px}
.personnel-person-card .section-heading p{font-size:.8125rem;margin:0;color:var(--muted)}
.personnel-summary-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 16px;margin:20px 0}
.personnel-summary-fields>div{min-width:0}
.personnel-summary-fields dt{font-size:.75rem;color:var(--muted);margin-bottom:4px}
.personnel-summary-fields dd{font-size:.875rem;margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
@media(max-width:1100px){.personnel-desktop-list{display:none}.personnel-mobile-list{display:grid;gap:16px}.personnel-person-card>.button{margin-top:8px}.personnel-search .field{flex:1 1 100%}.personnel-search>.button{margin-left:auto}}
@media(min-width:761px) and (max-width:1100px){.personnel-summary-fields{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.page-stack{gap:20px}}

/* Shared interaction contract. Colours remain owned by appearance.css. */
:root{--motion-press:90ms;--interaction-gap:12px;--interaction-hover-shadow:0 3px 10px #20202c12}
html[data-ui] :is(.button,.text-button,.menu-toggle,.menu-close,summary){-webkit-tap-highlight-color:transparent;touch-action:manipulation}
html[data-ui] :is(.button,.text-button,.menu-toggle,.menu-close,a,summary,input,select,textarea):focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
html[data-ui] :is(input:not([type=checkbox]):not([type=radio]),select,textarea):focus-visible{border-color:var(--ui-focus)}
html[data-ui] :is(input,select,textarea)[aria-invalid=true]{border-color:var(--danger-ink);outline-color:var(--danger-ink)}
html[data-ui] :is(.card,.interactive-card):focus-within{border-color:var(--ui-focus)}
html[data-ui] :is(.button,.text-button)[aria-busy=true]{cursor:progress;box-shadow:inset 0 0 0 1px var(--ui-focus)}
html[data-ui] :is(.button,.text-button):is(:disabled,[aria-disabled=true]){cursor:not-allowed;transform:none;filter:none;box-shadow:none}
.interaction-disclosing{overflow:hidden;box-sizing:border-box}
@media(hover:hover) and (pointer:fine){
 html[data-ui] .main-content .card:hover{border-color:var(--control-border)}
 html[data-ui] :is(.module-navigation a,.nav-module>summary,.page-tabs a,.access-tabs a,.module-tabs-nav a):hover:not(.selected):not(.active):not([aria-current=page]):not([aria-selected=true]){background:var(--surface-alt);text-decoration:none}
 html[data-ui] :is(.interactive-card,a.workspace-item):hover{border-color:var(--ui-focus);box-shadow:var(--interaction-hover-shadow)}
 html[data-ui] :is(input:not([type=checkbox]):not([type=radio]),select,textarea):hover:not(:disabled):not(:focus){border-color:var(--ui-focus)}
 html[data-ui] .calendar-day:hover{box-shadow:inset 0 0 0 1px var(--control-border)}
}
@media(prefers-reduced-motion:no-preference){
 html:not([data-reduce-motion=true]) :is(.button,.text-button,.menu-toggle,.menu-close,.module-navigation a,.nav-module>summary,.page-tabs a,.access-tabs a,.module-tabs-nav a,.interactive-card,a.workspace-item,input,select,textarea){transition:background-color var(--motion-feedback) var(--motion-ease),border-color var(--motion-feedback) var(--motion-ease),color var(--motion-feedback) var(--motion-ease),box-shadow var(--motion-feedback) var(--motion-ease),transform var(--motion-feedback) var(--motion-ease)}
 html:not([data-reduce-motion=true]) :is(.button,.text-button):active:not(:disabled):not([aria-disabled=true]){transform:translateY(1px) scale(.985);transition-duration:var(--motion-press)}
 @media(hover:hover) and (pointer:fine){
  html:not([data-reduce-motion=true]) :is(.button,.menu-toggle,.menu-close):hover:not(:disabled):not([aria-disabled=true]):not(:active){transform:translateY(-1px);box-shadow:var(--interaction-hover-shadow)}
  html:not([data-reduce-motion=true]) :is(a.interactive-card,a.workspace-item):hover{transform:translateY(-1px)}
 }
}
@media(prefers-reduced-motion:reduce){
 html[data-ui] :is(.button,.text-button,.menu-toggle,.menu-close,.interactive-card,a.workspace-item){transform:none!important;transition:none!important;animation:none!important}
 html[data-ui] .sidebar{animation:none!important}
}
@media(forced-colors:active){html[data-ui] :is(.button,a,summary,input,select,textarea):focus-visible{outline:2px solid Highlight}html[data-ui] [aria-busy=true]{outline:1px dashed Highlight}html[data-ui] [aria-invalid=true]{border-color:Mark!important;outline-color:Highlight!important}}
@media print{.interaction-disclosing{overflow:visible!important}html[data-ui] :is(.button,.interactive-card,a.workspace-item){transform:none!important;box-shadow:none!important;transition:none!important;animation:none!important}}

/* Personnel dossiers size fields from available content width, including enlarged text. */
.personnel-detail { container: personnel-detail / inline-size; }
.personnel-detail .personnel-fields { align-items: start; }
.personnel-personal-fields .field:has(textarea),
.personnel-personal-fields .field:has(input[name="address"], input[name="emergency_address"]) { grid-column: 1 / -1; }
.personnel-detail .personnel-item-row { align-items: start; grid-auto-rows: auto; row-gap: .5rem; }
.personnel-detail .personnel-adjustment-row { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(8rem, 1fr); }
.personnel-detail .personnel-item-row > .field { display: grid; grid-template-rows: subgrid; grid-row: span 3; gap: .5rem; margin-bottom: 0; }
.personnel-detail .personnel-item-row > .field > label { margin-bottom: 0; }
.personnel-detail .personnel-item-row > .field > :is(input, .checkbox-control) { grid-row: 2; }
.personnel-detail .personnel-item-row .field-errors { grid-row: 3; }
.personnel-item-errors { grid-column: 1 / -1; }
.personnel-detail .personnel-coverage { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .5rem 1rem; }
.personnel-detail .personnel-coverage .field { margin-bottom: 0; }
.personnel-detail .personnel-coverage .checkbox-label { min-height: 44px; margin-bottom: 0; }
.personnel-detail .personnel-coverage .field:has(input[name="company_pays_health"]) { grid-column: 1 / -1; }
.personnel-detail .leave-balances, .personnel-detail .leave-balance-grid,
.personnel-detail .leave-balance-row > * { min-width: 0; overflow-wrap: anywhere; }
@container personnel-detail (max-width: 64rem) {
 .personnel-detail .personnel-section { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
 .personnel-detail .personnel-fields-three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .personnel-detail .personnel-item-row, .personnel-detail .personnel-adjustment-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container personnel-detail (max-width: 52rem) {
 .personnel-detail .leave-balance-head { display: none; }
 .personnel-detail .leave-balance-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; padding: 1.25rem 0; }
 .personnel-detail .leave-balance-row > div:first-child { grid-column: 1 / -1; }
 .personnel-detail .leave-quantity { text-align: left; }
 .personnel-detail .leave-mobile-label { display: block; color: var(--muted); font-size: .85em; margin-bottom: .4rem; }
 .personnel-detail .leave-balances .section-heading { flex-wrap: wrap; align-items: flex-start; }
 .personnel-detail .personnel-personal-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container personnel-detail (max-width: 34rem) {
 .personnel-detail .personnel-fields-two, .personnel-detail .personnel-fields-three,
 .personnel-detail .personnel-item-row, .personnel-detail .personnel-adjustment-row,
 .personnel-detail .personnel-personal-fields { grid-template-columns: minmax(0, 1fr); }
 .personnel-detail .personnel-facts { grid-template-columns: minmax(0, 1fr); }
 .personnel-detail .leave-balances .filter-bar { width: 100%; }
 .personnel-detail .leave-balances .filter-bar input { flex: 1 1 6rem; width: 100%; min-width: 0; }
}

/* Payroll reuses the Glass surface, controls and native disclosure states. */
.payroll-definition-table{min-width:58rem}
.payroll-definition-table th:first-child{min-width:9rem}
.payroll-rules-form details{padding:1rem;border:1px solid var(--line);border-radius:var(--radius)}
.payroll-rules-form details>summary{font-weight:600;cursor:pointer}
.payroll-rules-form details>.form-grid{margin-top:1rem}
.payroll-rules-form details:nth-child(2)>.form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:900px){.payroll-rules-form details:nth-child(2)>.form-grid{grid-template-columns:minmax(0,1fr)}}

.payroll-version-filter{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.75rem}
.payroll-version-filter>.field{flex:1 1 22rem;min-width:0}
.payroll-version-filter>.field select{width:100%;max-width:100%}

/* Monthly payroll draft: shared Glass controls, no alternate theme. */
.simulation-toolbar{display:flex;flex-wrap:wrap;gap:.5rem}
.simulation-table{min-width:100rem;font-variant-numeric:tabular-nums}
.simulation-table th,.simulation-table td{white-space:nowrap}
.simulation-table .simulation-total{font-weight:600;background:var(--surface-soft,rgba(90,110,150,.06))}
.simulation-person{font-weight:600}
.simulation-detail{width:min(60rem,calc(100vw - 24rem));max-width:100%;padding:1rem;white-space:normal}
.simulation-breakdown{width:100%;font-variant-numeric:tabular-nums}
.simulation-breakdown th,.simulation-breakdown td{white-space:normal;overflow-wrap:anywhere}
.simulation-breakdown dl{margin:0}.simulation-breakdown dl>div{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;padding:.75rem .5rem;border-bottom:1px solid var(--border,#dde0e6)}.simulation-breakdown dt{font-weight:600;overflow-wrap:anywhere}.simulation-breakdown dd{margin:0;white-space:nowrap;text-align:right}.simulation-breakdown h3{padding:.75rem .5rem;margin:0;background:var(--surface-soft,rgba(90,110,150,.06))}
.simulation-print{margin-bottom:1rem}
@media print{body:has(.simulation-print) .sidebar,body:has(.simulation-print) .topbar,body:has(.simulation-print) .print-hide{display:none!important}body:has(.simulation-print) .main-content{margin:0!important}.simulation-print{break-after:page;box-shadow:none;border:0}.simulation-print a{display:none}}

@media(max-width:900px){.simulation-detail{width:calc(100vw - 4rem)}}

/* Glass navigation accordion: one logical open group; natural height at rest. */
:root{--motion-nav-open:200ms;--motion-nav-close:160ms}
html[data-ui] .sidebar .module-navigation .nav-motion-active{overflow:clip}
html[data-ui] .sidebar .module-navigation .nav-motion-active>summary:focus-visible{outline-offset:-2px}
html[data-ui] .sidebar .module-navigation .nav-module[data-nav-expanded=false]>summary .nav-chevron{transform:rotate(0)}
html[data-ui] .sidebar .module-navigation .nav-module[data-nav-expanded=true]>summary .nav-chevron{transform:rotate(90deg)}

/* Glass long documents: identity, location and a shared section directory. */
.reading-document{--reading-top:0px;--reading-context-height:100px;--reading-offset:180px;min-width:0}
.document-context{position:sticky;top:var(--reading-top);z-index:22;margin:0 0 24px;padding:14px 18px;border:1px solid var(--line,#d8d8df);border-radius:16px;background:var(--surface,#fff);box-shadow:0 4px 16px #18243708;overflow-wrap:anywhere}
.document-context-identity{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;min-width:0}
.document-context-identity>strong{font-size:1rem;letter-spacing:.01em}
.document-context-mode{font-size:.8125rem;color:var(--muted,#626772)}
.document-context-subject{margin:6px 0 0;font-size:.875rem;line-height:1.5;overflow-wrap:anywhere}
.document-context-location{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin-top:8px;border-top:1px solid var(--line,#d8d8df);padding-top:8px;font-size:.8125rem;line-height:1.5}
.document-context-location>span:first-child{color:var(--muted,#626772)}
.document-context-location>strong{font-weight:600}
.reading-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start;min-width:0}
.reading-content{min-width:0}
.document-navigation{position:sticky;top:calc(var(--reading-top) + var(--reading-context-height) + 8px);z-index:21;min-width:0}
.document-navigation details{border:1px solid var(--line,#d8d8df);border-radius:14px;background:var(--surface,#fff);padding:0}
.document-navigation summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;padding:10px 14px;cursor:pointer;font-weight:600;list-style:none}
.document-navigation summary::-webkit-details-marker{display:none}
.document-navigation nav{display:grid;gap:3px;padding:8px;max-height:50dvh;overflow:auto;overscroll-behavior:contain}
.document-navigation a{display:block;padding:10px 12px;border-radius:8px;font-size:.875rem;line-height:1.5;color:var(--ink,#24262b);text-decoration:none;overflow-wrap:anywhere;border-inline-start:3px solid transparent}
.document-navigation a[aria-current="location"]{background:var(--ui-nav-active,#edf2fa);border-inline-start-color:var(--navy,#315fa8);font-weight:600}
.document-navigation a:hover{background:var(--ui-nav-active,#edf2fa)}
.reading-document [data-reading-section]{scroll-margin-top:var(--reading-offset)}
.reading-content>[data-reading-section],.reading-content>form>[data-reading-section]{margin-block:0 24px}
.reading-content [data-reading-section]>h2,.reading-content [data-reading-section]>.section-heading>h2,.reading-content .draft-section-heading>h2{font-size:1.25rem;line-height:1.5;letter-spacing:.01em;margin-bottom:12px}
.reading-content h3{font-size:1rem;line-height:1.6;margin-block:20px 10px}
.reading-content .document-text{font-size:.9375rem;line-height:1.85;max-width:78ch;overflow-wrap:anywhere}
.reading-content .document-section+.document-section{border-top:1px solid var(--line,#d8d8df);padding-top:20px;margin-top:24px}
.reading-content .reason-detail>li{padding-block:18px;border-bottom:1px solid var(--line,#d8d8df)}
.reading-content .reason-detail>li>h3{margin-top:0}
.reading-content .change-metadata{line-height:1.75}
.reading-content .review-nav{gap:12px}
.reading-enhanced .review-nav{display:none}
.reading-comparison:not(:has(.comparison-record)){display:none}
@media(min-width:1200px){
 .reading-enhanced .reading-layout{grid-template-columns:minmax(0,1fr) 210px;grid-template-areas:"content directory";gap:28px}
 .reading-enhanced .reading-content{grid-area:content}
 .document-navigation{grid-area:directory;top:calc(var(--reading-top) + var(--reading-context-height) + 20px)}
 .document-navigation summary{cursor:default;pointer-events:none;font-size:.875rem}
 .document-navigation summary>span{display:none}
 .document-navigation nav{max-height:calc(100dvh - var(--reading-top) - var(--reading-context-height) - 90px)}
}
@media(max-width:1199px){
 .reading-enhanced .document-context{margin-bottom:8px}
 .document-navigation{margin-bottom:0}
 .document-navigation::before{content:"";position:absolute;inset:-8px 0 auto;height:8px;background:var(--surface,#fff);pointer-events:none}
 .document-navigation details[open] nav{position:absolute;top:100%;left:0;right:0;background:var(--surface,#fff);border:1px solid var(--line,#d8d8df);border-radius:12px;box-shadow:0 12px 28px #1824371a}
}
@media(max-width:600px){
 .document-context{padding:10px 12px;border-radius:12px}
 .document-context-subject{display:none}
 .document-context-identity{gap:6px 8px}
 .document-context-identity>strong{font-size:.875rem}
 .document-context-location{gap:3px 7px;margin-top:6px;padding-top:6px}
 .reading-content [data-reading-section]>h2,.reading-content [data-reading-section]>.section-heading>h2,.reading-content .draft-section-heading>h2{font-size:1.125rem}
}
@media print{.document-context,.document-navigation{display:none!important}.reading-layout{display:block!important}.reading-content{width:100%}.reading-enhanced .review-nav{display:none}}

.document-context-location[hidden],.document-navigation[hidden]{display:none!important}


.ecn-source-image {display:block;width:100%;height:auto;object-fit:contain}.reason-item .comparison-item{margin-top:1rem}.reason-item .comparison-columns{align-items:start}

[data-source-locked="true"] .comparison-saved .saved-file{display:block}
[data-source-locked="true"] .comparison-saved img{display:block;width:100%;height:auto;max-height:none;object-fit:contain}



/* Company egress address lists; Glass controls and focus colors remain shared. */
.network-ip-list{min-width:0}.network-ip-row{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.network-ip-row input{flex:1 1 12rem;min-width:0;width:100%}.network-ip-row .button{flex:0 0 auto}.network-ip-list>[data-ip-add]{margin-top:.25rem}.network-ip-list [data-ip-status]:empty{display:none}

.network-addresses>div{min-width:0}.network-addresses dd,.network-site-form>p,.network-current-sites p,.network-current-sites summary,.network-site-form .alert,.network-site-form .field-errors{overflow-wrap:anywhere}

/* Attachment names share Glass typography and wrap long filenames. */
.attachment-name-hits { margin-block:.65rem; padding:.6rem; border-inline-start:3px solid var(--blue); }
.attachment-name-hits a, .attachment-name-hits small, .attachment-original-name { display:block; overflow-wrap:anywhere; }

.attachment-name-summary { margin-block-end:1.25rem; }
.attachment-name-action { display:inline-flex; min-height:44px; align-items:center; padding-inline:.5rem; }
/* Company identity and default attendance, shared by personnel entries. */
.company-basis{margin-bottom:24px}.company-punches{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;list-style:none;padding:0;margin:16px 0}.company-punches li{padding:12px;border:1px solid var(--line);border-radius:var(--ui-input-radius);background:var(--surface-alt)}.company-punches strong{display:block;font-variant-numeric:tabular-nums;margin-top:4px}

/* Glass surface hierarchy: page, section, title band and actionable record.
   Shared by current modules and future cards. Semantic status colors stay owned
   by badges/alerts; the accent and motion preferences remain unchanged. */
@media screen{
 html[data-ui=glass] .workspace{background:var(--bg)}
 html[data-ui=glass] .card{background-color:var(--surface);border-color:var(--section-border);box-shadow:0 1px 3px #25334a06}
 html[data-ui=glass] .card>:is(.section-heading,h2):first-child{background:var(--section-heading-bg);border:1px solid var(--section-border);border-radius:10px;padding:14px 16px;margin:0 0 20px;gap:12px}
 html[data-ui=glass] .card>.section-heading:first-child>:is(h2,h3){margin:0}
 html[data-ui=glass] .table-card>.section-heading:first-child{border-width:0 0 1px;border-radius:var(--radius) var(--radius) 0 0;margin:0;padding:16px 20px}
 html[data-ui=glass] .main-content>.card+.card{margin-top:28px}
 html[data-ui=glass] .page-stack{row-gap:28px}
 html[data-ui=glass] .reading-content>[data-reading-section]{margin-block:0 28px}
 html[data-ui=glass] .personal-dashboard .dashboard-inbox{background:var(--surface);border:1px solid var(--section-border)}
 html[data-ui=glass] .dashboard-inbox>.section-heading:first-child{padding:20px 24px;margin:0;border-width:0 0 1px;border-radius:var(--radius) var(--radius) 0 0}
 html[data-ui=glass] .dashboard-queues{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;padding:24px}
 html[data-ui=glass] .dashboard-queues>.workspace-queue{background:var(--surface-alt);border:1px solid var(--section-border);border-radius:14px;padding:20px;row-gap:0}
 html[data-ui=glass] .dashboard-queues>.workspace-queue:last-child{border-bottom:1px solid var(--section-border)}
 html[data-ui=glass] .dashboard-queues>.workspace-queue.is-empty{background:var(--surface);padding-block:14px}
 html[data-ui=glass] .dashboard-queues h3{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:1rem;line-height:1.7;margin:0}
 html[data-ui=glass] .dashboard-queues .is-empty .badge{background:var(--surface-alt);color:var(--muted);border:1px solid var(--line)}
 html[data-ui=glass] a.workspace-item{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--section-border);border-radius:12px;margin-block:8px;padding:16px;text-decoration:none;color:var(--ink);min-width:0}
 html[data-ui=glass] .personal-dashboard a.workspace-item{text-decoration:none}
 html[data-ui=glass] a.workspace-item:hover{background:var(--surface);border-color:color-mix(in srgb,var(--ui-focus) 50%,var(--ink))}
 html[data-ui=glass] a.workspace-item:hover strong{text-decoration:underline;text-underline-offset:3px}
 html[data-ui=glass] a.workspace-item:focus-visible{outline:3px solid color-mix(in srgb,var(--ui-focus) 50%,var(--ink));outline-offset:3px}
 html[data-ui=glass] .personal-dashboard .badge.neutral,html[data-ui=glass] a.workspace-item strong{color:var(--ink)}
 html[data-ui=glass] .dashboard-queues .workspace-item:first-of-type{padding-top:16px;border-top-width:1px;border-top-style:solid}
 html[data-ui=glass] .personal-dashboard .dashboard-section-heading{margin:32px 0 16px;padding-bottom:10px;border-bottom:1px solid var(--section-border)}
 html[data-ui=glass] .personal-dashboard .dashboard-section-heading h2{font-weight:600}
 html[data-ui=glass] .dashboard-queues .workspace-queue-footer{margin:4px 0 0;padding-top:12px}
}
@media screen and (max-width:1100px){
 html[data-ui=glass] .dashboard-queues>.workspace-queue{grid-template-columns:minmax(0,1fr);row-gap:8px}
 html[data-ui=glass] .dashboard-queues .section-heading{grid-row:auto;grid-column:1}
 html[data-ui=glass] .dashboard-queues .workspace-queue>:not(.section-heading){grid-column:1}
}
@media screen and (max-width:600px){
 html[data-ui=glass] .dashboard-queues{padding:16px;gap:16px}
 html[data-ui=glass] .dashboard-queues>.workspace-queue{padding:16px}
 html[data-ui=glass] .dashboard-inbox>.section-heading:first-child{padding:16px}
 html[data-ui=glass] .card>:is(.section-heading,h2):first-child{padding:12px 14px;margin-bottom:16px}
 html[data-ui=glass] .dashboard-inbox>.section-heading:first-child{margin-bottom:0}
 html[data-ui=glass] .main-content>.card+.card{margin-top:24px}
 html[data-ui=glass] .reading-content>[data-reading-section]{margin-bottom:24px}
}

/* Shared attachment cards: filename first, metadata quiet, original name on demand. */
.attachment-card{display:grid;grid-template-columns:4.5rem minmax(0,1fr);gap:1rem;align-items:start;width:100%;max-width:48rem;box-sizing:border-box;margin:.75rem 0;padding:1rem;border:1px solid var(--line);border-radius:var(--ui-input-radius);background:var(--surface);color:var(--ink)}
.attachment-card-thumbnail{width:4.5rem;height:4.5rem;display:grid;place-items:center;overflow:hidden;background:var(--surface-alt);border:1px solid var(--line);border-radius:.5rem;box-sizing:border-box}
.attachment-card-thumbnail>a{display:flex;width:100%;height:100%;align-items:center;justify-content:center}
.attachment-card .attachment-card-thumbnail img{display:block;width:100%;height:100%;max-width:100%;object-fit:contain;border:0;border-radius:0;background:transparent}
.attachment-card-kind{font-size:.75rem;font-weight:600;color:var(--muted);overflow-wrap:anywhere;padding:.25rem}
.attachment-card-body{min-width:0}.attachment-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.attachment-card-name{min-width:0;flex:1 1 12rem;font-size:.9375rem;font-weight:600;line-height:1.6;overflow-wrap:anywhere;color:var(--ink)}
.attachment-card-state{flex:0 1 auto;font-size:.75rem;line-height:1.7;color:var(--success-ink);white-space:normal;overflow-wrap:anywhere}
.attachment-card-state[data-state=pending]{color:var(--muted)}.attachment-card-state[data-state=error]{color:var(--danger-ink)}.attachment-card-state[data-state=removal]{color:var(--warning-ink)}
.attachment-card .attachment-card-meta{margin:.25rem 0;color:var(--muted);font-size:.8125rem;line-height:1.7;overflow-wrap:anywhere}
.attachment-card-original{margin:.125rem 0;font-size:.75rem;color:var(--muted);min-width:0}.attachment-card-original summary{display:list-item;cursor:pointer;min-height:2.75rem;align-content:center;width:fit-content;max-width:100%;color:var(--muted)}
.attachment-card-original p{margin:0 0 .5rem;font-size:inherit;color:var(--muted);overflow-wrap:anywhere;white-space:normal}
.attachment-card-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .5rem;margin:.25rem -.5rem -.5rem;min-width:0}
.attachment-card-actions>a,.attachment-card-actions>button,.attachment-card-remove{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;min-height:2.75rem;box-sizing:border-box;padding:.375rem .5rem;border-radius:.5rem;font-size:.8125rem;line-height:1.4;text-decoration:none;white-space:normal;overflow-wrap:anywhere}
.attachment-card-actions>a:hover{background:var(--surface-alt)}.attachment-card-actions .attachment-card-remove{margin:0 0 0 auto;flex:none;font-size:.8125rem;color:var(--muted);cursor:pointer}
.attachment-card-remove input[type=checkbox]{margin:0;width:1rem;height:1rem;flex:none}.attachment-card.is-marked-for-removal{border-color:var(--warning-ink)}
.attachment-card :is(a,button,summary,input):focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}
/* 待送出附件的改名（data-attachment-rename 的選取器才會出現）：副檔名固定，只改名稱。 */
html[data-ui] .attachment-card-actions>button.attachment-name-action{border:0;background:none;cursor:pointer;font-family:inherit;color:var(--ui-link)}
html[data-ui] .attachment-card-actions>button.attachment-name-action:hover{background:var(--surface-alt)}
.attachment-rename{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin:.375rem 0 .25rem;min-width:0}
.attachment-rename input[type=text]{flex:1 1 12rem;min-width:0;min-height:2.75rem}
.attachment-rename-extension{color:var(--muted);font-size:.875rem;font-variant-numeric:tabular-nums}
.attachment-rename .button{min-height:2.75rem}
.attachment-rename-error{flex:0 0 100%;margin:0;color:var(--danger-ink);font-size:.8125rem}
.attachment-card.is-renaming .attachment-card-name,.attachment-card.is-renaming .attachment-card-actions{display:none}
@media(max-width:560px){.attachment-rename input[type=text]{flex-basis:100%}}
.saved-files,.attachment-file-queue,[data-comparison-saved]{min-width:0}.attachment-file-queue:empty{display:none}
.attachment-upload-entry{display:grid;grid-template-columns:auto minmax(0,1fr);gap:1rem;align-items:center;border:1px dashed var(--control-border);border-radius:var(--ui-input-radius);background:var(--surface-alt);padding:1rem;min-width:0}
.attachment-upload-entry .attachment-paste-target{border:0;border-radius:.375rem;background:transparent;margin:0;padding:.25rem;min-width:0;min-height:2.75rem}.attachment-upload-entry .attachment-paste-target strong{font-size:.8125rem}.attachment-upload-entry .attachment-paste-target span{font-size:.75rem}
.attachment-upload-entry .attachment-select-button{min-height:2.75rem;font-size:.8125rem}.attachment-upload-entry .attachment-picker-controls{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.attachment-upload-entry .attachment-picker-controls>.button{margin:0;min-height:2.75rem;font-size:.8125rem}@media(max-width:560px){.attachment-upload-entry .attachment-picker-controls>.button{flex:1 1 11rem;justify-content:center}}
@media(max-width:560px){.attachment-card{grid-template-columns:3.5rem minmax(0,1fr);gap:.75rem;padding:.875rem}.attachment-card-thumbnail{width:3.5rem;height:3.5rem}.attachment-card-name{flex-basis:100%}.attachment-card-heading{gap:.125rem}.attachment-upload-entry{grid-template-columns:minmax(0,1fr);gap:.625rem;padding:.875rem}.attachment-card-actions .attachment-card-remove{margin-inline-start:auto}}
@media print{.attachment-card-actions,.attachment-upload-entry{display:none}.attachment-card-original:not([open]){display:none}.attachment-card{break-inside:avoid;box-shadow:none}}
.attachment-card-state[data-state=history]{color:var(--muted)}
/* On phones, give enlarged filenames the full card width. */
@media(max-width:560px){.attachment-card{grid-template-columns:minmax(0,1fr)}.attachment-card-thumbnail{width:3rem;height:3rem}}
