:root{color-scheme:light;--bg:#f6f7f9;--surface:#fff;--ink:#282c31;--muted:#616973;--line:#dce0e5;--brand:#ff7d08;--action:#ad4700;--action-hover:#893800;--tint:#fff1e5;--warning:#8a5000;--red:#a52a32;--green:#216049;font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;font-size:14px;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;min-height:44px;padding:10px 15px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--ink);font-weight:600;line-height:1.5}button:hover{background:#f0f2f5;border-color:#aeb5be}button:disabled{cursor:default;opacity:.5}button.primary{background:var(--action);border-color:var(--action);color:#fff}button.primary:hover{background:var(--action-hover)}.quiet{background:transparent;color:var(--muted)}.danger{color:var(--red);border-color:#dfb9be}.text-button{padding:4px 8px;border-color:transparent;background:transparent;color:var(--action);text-decoration:underline;text-underline-offset:3px}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--action);outline-offset:3px}input,select,textarea{border:1px solid #aeb5be;border-radius:6px;padding:10px 12px;width:100%;min-height:44px;background:var(--surface);color:var(--ink)}input[type=search]{padding-left:14px}textarea{resize:vertical;min-height:100px}label{display:flex;flex-direction:column;gap:8px;font-size:13px;font-weight:600;min-width:0}h1{font-size:26px;line-height:1.4;margin:0;font-weight:700}h2{font-size:16px;margin:0 0 14px}p{line-height:1.75}.muted{color:var(--muted);font-weight:400}.skip-link{position:fixed;top:-100px;left:20px;z-index:10;background:var(--surface);color:var(--action);padding:12px}.skip-link:focus{top:8px}
.app-shell{display:grid;grid-template-columns:208px minmax(0,1fr);min-height:100vh}aside{background:var(--surface);border-right:1px solid var(--line);padding:20px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100dvh}.brand{display:block;color:var(--ink);text-decoration:none;padding:0 6px 24px;border-bottom:1px solid var(--line)}.brand img{display:block;width:100%;height:auto}.brand span{display:block;font-size:15px;font-weight:700;margin:3px 8px 0}nav{display:grid;gap:8px;margin-top:24px}.nav{text-align:left;border:1px solid transparent;background:transparent;color:var(--muted);padding:12px 16px;position:relative}.nav:hover{background:var(--bg)}.nav.active{background:var(--tint);color:var(--action);border-color:#f4d8c0}.nav.active::before{content:"";position:absolute;left:-1px;top:12px;bottom:12px;width:3px;border-radius:3px;background:var(--brand)}.sidebar-bottom{margin-top:auto;overflow-wrap:anywhere;padding:28px 6px 0}.sidebar-bottom p{font-size:12px;color:var(--muted);margin-bottom:12px}.sidebar-bottom button{width:100%;text-align:left;font-size:13px}main{padding:32px clamp(20px,2.6vw,42px);min-width:0;width:100%;max-width:1760px;margin-inline:auto}.page-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:26px;min-height:44px}.header-actions{display:flex;align-items:center;gap:10px}.header-actions .primary{padding-inline:22px}
.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--line);border-radius:10px;background:var(--surface);margin-bottom:24px;overflow:hidden}.metric{position:relative;text-align:left;border:0;border-right:1px solid var(--line);border-radius:0;padding:18px 24px;font-weight:400;min-width:0}.metric:last-child{border-right:0}.metric:hover{background:#fffaf5}.metric[aria-pressed=true]{background:var(--tint);box-shadow:inset 0 -3px var(--brand)}.metric>span:first-child{display:block;color:var(--muted);font-size:13px}.metric strong{font-size:30px;display:inline-block;line-height:1.6;margin-right:7px;font-weight:600;font-variant-numeric:tabular-nums}.metric small{font-size:12px;color:var(--muted)}.metric:nth-child(2) strong{color:var(--warning)}.metric:nth-child(3) strong{color:var(--red)}.metric-link{font-size:12px;color:var(--action);float:right;margin-top:22px}
.filter-panel{border:1px solid var(--line);border-radius:10px;padding:20px 20px 8px;background:var(--surface)}.search-filters{display:grid;grid-template-columns:minmax(210px,1.8fr) repeat(4,minmax(110px,1fr));gap:14px}.filter-state{display:flex;gap:12px;justify-content:space-between;align-items:center;min-height:44px;margin-top:4px;font-size:12px;color:var(--muted)}#filter-summary{overflow-wrap:anywhere}.section-caption{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:24px}.result-caption{display:flex;gap:12px;align-items:baseline;white-space:nowrap}.result-caption h2{margin:0}.result-caption .muted{font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap}.actions button{font-size:12px}#employees-export{border-color:#aeb5be}.toolbar{display:flex;gap:16px;justify-content:space-between;flex-wrap:wrap;align-items:flex-end;margin:0 0 24px}.toolbar label{width:min(300px,100%)}.table-wrap{width:100%;overflow:auto;border:1px solid var(--line);border-radius:8px;background:var(--surface);margin-top:14px}table{width:100%;border-collapse:collapse;min-width:800px;font-size:13px;text-align:left}th{padding:13px 16px;background:#eef0f3;font-size:12px;white-space:nowrap;font-weight:600;color:#4f5862}td{padding:18px 16px;border-top:1px solid #e7eaee;vertical-align:top;max-width:220px;overflow-wrap:anywhere;line-height:1.7}tbody tr:hover{background:#fcfcfd}td small{display:block;color:var(--muted);margin-top:3px;font-size:12px}td strong{font-size:14px}.row-actions{display:flex;gap:8px;flex-wrap:wrap;min-width:148px;max-width:190px}.row-actions button{font-size:12px;padding:9px 10px;min-height:44px}.row-actions button:first-child{color:var(--action);border-color:#e9c5a6}.row-actions button:last-child{width:100%}.badge{display:inline-flex;white-space:nowrap;border-radius:4px;padding:3px 8px;font-size:12px;background:#e8f3ef;color:var(--green)}.badge.soon{background:#fff1da;color:var(--warning)}.badge.expired{background:#fce7e8;color:var(--red)}.badge.neutral{background:#eef0f3;color:#515b66}.empty{padding:40px 20px;border:1px dashed #b9c1cb;border-radius:8px;text-align:center;color:var(--muted);background:var(--surface);margin-top:14px}.spaced{margin-top:32px}footer{font-size:12px;color:var(--muted);margin-top:32px}.flash,.notice{background:#f0f7f2;border:1px solid #bdd6c4;color:#285b38;padding:12px 16px;border-radius:7px;line-height:1.8;margin-bottom:20px}.notice{background:#fff7e9;border-color:#e9d1ac;color:#754d17}.flash.error,.form-error{color:var(--red);background:#fff1f1;border-color:#efbabe}
.login-shell{min-height:100dvh;display:grid;place-items:center;padding:24px;background:var(--bg)}.login-panel{max-width:420px;width:100%;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:36px 40px}.login-logo{display:block;width:230px;max-width:100%;height:auto;margin:0 auto 26px}.login-panel h1{font-size:24px;text-align:center;margin-bottom:28px}.login-panel p{color:var(--muted);line-height:1.8;text-align:center}.login-panel button{width:100%}.login-panel .muted{font-size:12px}.login-panel #login-error{color:var(--red)}dialog{border:1px solid var(--line);border-radius:12px;width:min(780px,calc(100% - 32px));padding:0;max-height:90dvh;color:var(--ink);background:var(--surface)}dialog::backdrop{background:#1d273854}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 28px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--surface);z-index:1}.dialog-heading h2{margin:0;font-size:19px;line-height:1.55}.icon-button{font-size:23px;width:44px;flex-shrink:0;padding:4px}#dialog-body{padding:26px 28px 28px}#dialog-body>form{display:flex;flex-direction:column;gap:24px}#dialog-body>form>.hint{margin:0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px 20px}.form-section{grid-column:1/-1;margin:8px 0 0;padding-bottom:12px;border-bottom:1px solid var(--line);font-size:14px}.full{grid-column:1/-1}.checkbox{align-self:end;flex-direction:row;align-items:center;font-weight:400;min-height:44px;gap:10px}.checkbox input{width:20px;height:20px;min-height:20px}.form-footer{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin-top:4px;padding-top:24px;border-top:1px solid var(--line)}.form-footer>.danger{margin-right:auto}.form-error{white-space:pre-line;line-height:1.8;padding:12px;border-radius:6px}.history-section{margin-top:32px;padding-top:28px;border-top:1px solid var(--line)}.history-section h2{margin-bottom:20px}.history-list{padding-left:20px;margin:0;line-height:1.9}.history-list li{padding-left:4px;margin-bottom:18px}.history-list li:last-child{margin-bottom:0}.contract-summary{margin:0 0 26px;padding:16px 18px;background:var(--bg);border-radius:7px;line-height:1.8}.detail{white-space:pre-wrap;font-size:12px;overflow-wrap:anywhere;max-height:220px;overflow:auto}summary{cursor:pointer;min-height:44px;padding-block:10px}.csv-summary{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0}.csv-summary span{padding:8px 12px;background:#eef0f3;border-radius:4px}.hint{font-size:12px;color:var(--muted);line-height:1.8}.scroll-hint{display:none}[hidden]{display:none!important}.pending{opacity:.6;pointer-events:none}
@media(max-width:1180px){.search-filters{grid-template-columns:repeat(4,minmax(0,1fr))}.search-filters label:first-child{grid-column:1/-1}.metric{padding:16px}.metric-link{display:block;float:none;margin:0}.section-caption{align-items:flex-start}.actions{justify-content:flex-end}}
@media(max-width:850px){.app-shell{grid-template-columns:1fr}aside{position:static;height:auto;padding:10px 16px 0;display:grid;grid-template-columns:1fr auto;gap:12px;border-right:0;border-bottom:1px solid var(--line)}.brand{border:0;padding:0;display:flex;align-items:center;gap:12px}.brand img{width:120px;height:auto}.brand span{font-size:13px;margin:0;border-left:1px solid var(--line);padding-left:12px;white-space:nowrap}nav{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0;padding-bottom:10px}.nav{text-align:center;padding:10px 4px;font-size:12px}.nav.active::before{display:none}.sidebar-bottom{grid-row:1;grid-column:2;padding:0}.sidebar-bottom p{display:none}.sidebar-bottom button{font-size:12px;padding:10px}.page-header{margin-bottom:20px;align-items:flex-start}.header-actions{gap:8px}.header-actions .primary{padding-inline:14px}main{padding:24px 16px}h1{font-size:23px}.metrics{margin-bottom:18px}.metric{padding:14px 10px}.metric>span:first-child{font-size:12px;min-height:36px}.metric strong{font-size:26px}.metric-link{font-size:12px;margin-top:2px}.filter-panel{padding:16px 14px 6px}.search-filters{gap:14px 10px;grid-template-columns:repeat(2,minmax(0,1fr))}.filter-state{gap:4px;align-items:flex-start;padding-top:8px}.filter-state .text-button{white-space:nowrap;flex-shrink:0}.section-caption{flex-wrap:wrap;margin-top:22px;gap:12px}.actions{justify-content:flex-start;width:100%}.actions button{flex:1;padding-inline:8px}.row-actions{min-width:0;max-width:none}.row-actions button:last-child{width:auto}.scroll-hint{display:block;color:var(--muted);font-size:12px;margin:12px 0 -5px}.form-grid{grid-template-columns:1fr}.full,.form-section{grid-column:auto}dialog{width:calc(100% - 20px);max-height:94dvh}.dialog-heading{padding:16px}.dialog-heading h2{font-size:17px}#dialog-body{padding:22px 20px 24px}.login-panel{padding:28px}.form-footer button{flex:1}}
@media(max-width:520px){.brand img{width:100px}.brand{gap:8px}.brand span{padding-left:8px;font-size:12px}.sidebar-bottom button{font-size:12px}.header-actions .quiet{padding-inline:8px;font-size:12px}.header-actions .primary{font-size:12px;padding-inline:10px}.page-header{gap:8px;align-items:center}.header-actions{gap:5px}h1{font-size:21px}.metric>span:first-child{font-size:12px}.metric small{font-size:12px}.metric-link{font-size:12px}#employees-table .scroll-hint{display:none}#employees-table .table-wrap{border:0;background:transparent;overflow:visible}#employees-table table{min-width:0;display:block}#employees-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}#employees-table tbody{display:grid;gap:14px}#employees-table tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:16px;gap:14px 12px}#employees-table td{display:block;border:0;padding:0;max-width:none;min-width:0}#employees-table td::before{content:attr(data-label);display:block;font-size:12px;color:var(--muted);margin-bottom:3px}#employees-table td:first-child,#employees-table td:nth-child(6),#employees-table td:last-child{grid-column:1/-1}#employees-table td:first-child::before,#employees-table td:last-child::before{display:none}#employees-table td:first-child strong{font-size:16px}#employees-table td:last-child{padding-top:12px;border-top:1px solid var(--line)}#employees-table .row-actions{gap:8px;display:grid;grid-template-columns:1fr 1fr}#employees-table .row-actions button:last-child{grid-column:1/-1}.login-logo{width:220px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

@media(max-width:520px){.form-footer>.danger{flex:0 0 100%;margin:8px 0 0;order:1}}

.list-controls{display:flex;align-items:center;justify-content:flex-end;gap:16px;flex-wrap:wrap}.sort-controls{display:flex;align-items:center;gap:12px}.sort-controls label{display:flex;flex-direction:row;align-items:center;gap:8px;font-size:12px;white-space:nowrap;width:auto}.sort-controls select{width:auto;min-width:90px}.sort-controls label:first-child select{min-width:132px}
@media(max-width:1180px){.section-caption{flex-wrap:wrap}.list-controls{width:100%;justify-content:space-between}.list-controls .actions{width:auto}}
@media(max-width:850px){.list-controls{gap:12px}.list-controls .actions{width:100%}.sort-controls{width:100%;justify-content:space-between;gap:10px}.sort-controls label{min-width:0}.sort-controls label:first-child{flex:1}.sort-controls label:first-child select{min-width:0;width:100%}.sort-controls select{padding-inline:8px}}

@media(max-width:850px){#dialog-body>form{gap:22px}.history-section{margin-top:28px;padding-top:24px}.contract-summary{padding:14px 16px;margin-bottom:24px}}

#dialog-body>form>div:empty{display:none}#dialog-body .csv-summary,#dialog-body .form-error{margin:0}
