@charset "UTF-8";
svg{width:20px;height:20px;flex-shrink:0}[hidden]{display:none!important}
.demo-banner{background:#eadfbf;color:#675729;text-align:center;padding:7px 15px;font-size:11px;line-height:1.7}
:root{--ink:#233c36;--muted:#78847c;--green:#285c48;--leaf:#e7eee4;--paper:#f7f8f3;--line:#e3e8de;--white:#fff;--amber:#9a6a1f;--red:#a2493c;font-family:"Yu Gothic UI","Meiryo",sans-serif;color:var(--ink);font-size:14px;background:var(--paper)}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible{outline:3px solid #ccad61;outline-offset:3px}a{color:var(--green)}button{border:1px solid var(--line);border-radius:9px;background:white;color:var(--ink);padding:10px 16px;font-weight:600}button:hover:not(:disabled){background:#edf2e9}.primary{background:var(--green);color:white;border-color:var(--green)}.primary:hover:not(:disabled){background:#204a3b}.danger{color:var(--red)}.quiet{background:transparent}.small{padding:6px 10px;font-size:12px}.layout{display:grid;grid-template-columns:228px minmax(0,1fr);min-height:100vh}.sidebar{background:#f0f3ea;border-right:1px solid var(--line);padding:32px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;gap:10px;align-items:center;margin:0 8px 43px}.mark{display:grid;place-items:center;background:var(--green);color:#e4edc2;width:39px;height:39px;border-radius:13px 13px 13px 3px;font-size:23px}.brand strong{display:block;font-size:21px;letter-spacing:2px}.brand small{font-size:9px;letter-spacing:2px;color:var(--muted)}.navlabel,.eyebrow{font-size:10px;letter-spacing:2px;font-weight:bold;color:var(--muted)}.navlabel{margin:0 12px 14px}.nav{display:grid;gap:7px}.nav button{display:flex;align-items:center;gap:13px;border:0;background:transparent;text-align:left;padding:13px 14px;font-weight:500}.nav button.active{background:#dfe8d8;color:#285b41;font-weight:700}.nav svg{width:19px;height:19px}.nav .count{margin-left:auto;font-size:11px;background:var(--green);color:white;border-radius:6px;padding:2px 6px}.sidebottom{margin-top:auto;padding:25px 8px 0}.sidebottom p{font-size:11px;color:var(--muted);line-height:1.8}.profile{display:flex;align-items:center;gap:10px;padding-top:18px;border-top:1px solid #dce3d4}.avatar{background:#d8e3d0;border-radius:50%;width:34px;height:34px;display:grid;place-items:center;font-weight:700}.profile strong{font-size:12px}.profile small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.main{padding:0 42px 40px;max-width:1600px;width:100%;margin:0 auto;align-self:start}.topbar{height:82px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);margin-bottom:30px}.breadcrumb{font-size:12px;color:var(--muted)}.toptools{display:flex;align-items:center;gap:10px}.month-label{font-size:12px;color:var(--muted);font-weight:700}.account-name{font-weight:700;color:var(--ink);max-width:12em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toptools input{width:150px;background:transparent}.topdate{font-size:12px;color:var(--muted)}h1{font-size:27px;font-weight:600;letter-spacing:1px;margin:8px 0}h2{font-size:16px;margin:0 0 6px}h3{font-size:14px}.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px;gap:16px}.intro p{color:var(--muted);font-size:12px;margin:9px 0;line-height:1.7}.pill{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:6px;font-size:11px;white-space:nowrap;background:#eef1eb;color:#60705e}.pill.green{background:#e7f1e8;color:#39724b}.pill.amber{background:#faf0d9;color:#946e2c}.pill.red{background:#f8e9e5;color:#a45141}.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:17px;margin:24px 0}.card{background:white;border:1px solid var(--line);border-radius:13px;padding:23px}.stat-head{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:12px}.stat-head svg{width:19px;height:19px}.stat-number{font-size:30px;letter-spacing:-1px;margin:17px 0 7px;font-weight:600}.stat-number small{font-size:12px;color:var(--muted);margin-left:7px;font-weight:400;letter-spacing:0}.caption{font-size:11px;color:var(--muted);line-height:1.7}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:20px}.clockcard{background:#eaf0e4;border:1px solid #dfe7d6;border-radius:13px;padding:25px}.sectionhead{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:19px}.sectionhead p{margin:6px 0 0}.clock{font-size:49px;font-weight:500;letter-spacing:2px;margin:18px 0 6px;font-variant-numeric:tabular-nums}.clocksec{font-size:24px;color:#84917a}.clockdate{font-size:12px;color:#708267}.punchbuttons{display:flex;gap:10px;flex-wrap:wrap;margin:24px 0 19px}.punchbuttons button{flex:1;min-width:85px;padding:13px}.punchmeta{display:flex;gap:28px;border-top:1px solid #d8e2d0;padding-top:16px;font-size:11px;color:#738368}.punchmeta strong{display:block;margin-top:5px;color:#405b45;font-size:13px}.quick{display:grid;gap:2px}.quick button{display:flex;text-align:left;gap:13px;align-items:center;border:0;border-radius:0;padding:16px 0;border-bottom:1px solid var(--line);font-weight:500}.quick button:last-child{border:0}.quick .iconbox{background:#f0f3e9;border-radius:10px;width:37px;height:37px;display:grid;place-items:center}.quick svg{width:18px;height:18px}.quick small{display:block;color:var(--muted);margin-top:5px;font-size:10px}.arrow{margin-left:auto;color:#9fa99b}.full{margin-top:22px}.tablewrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:12px;text-align:left;white-space:nowrap}th{font-size:11px;font-weight:500;color:var(--muted);padding:12px 13px;background:#f8f9f5;border-bottom:1px solid var(--line)}td{padding:15px 13px;border-bottom:1px solid #edf0e8}tr:last-child td{border-bottom:0}.num{text-align:right;font-variant-numeric:tabular-nums}.rowtitle{max-width:240px;overflow:hidden;text-overflow:ellipsis}.muted{color:var(--muted)}.empty{padding:38px 20px;text-align:center;color:var(--muted);line-height:1.8}.empty strong{display:block;color:#59715e;margin:10px}.notice{background:#eff2e9;border-left:3px solid #a6b68c;padding:12px 15px;font-size:12px;line-height:1.9;margin-bottom:20px;color:#66765e}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.filters{display:flex;gap:7px;margin:18px 0;flex-wrap:wrap}.filters button{font-size:12px}.filters .active{background:var(--green);color:white}.balance{font-size:12px;color:var(--muted)}.auth{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.auth-art{background:#e2ead9;padding:70px;display:flex;flex-direction:column;justify-content:space-between;overflow:hidden;position:relative}.auth-art:after{content:"";position:absolute;right:-180px;bottom:-220px;border:1px solid #b7cba7;width:650px;height:650px;border-radius:50%;box-shadow:0 0 0 70px #d7e2ca,0 0 0 140px #dce6d2}.auth-art .brand{margin:0;z-index:1}.auth-title{z-index:1;margin:80px 0}.auth-title h1{font-size:40px;line-height:1.7;letter-spacing:3px}.auth-title p{line-height:2.1;color:#627457}.auth-art footer{font-size:11px;z-index:1;color:#788c6d}.auth-form{display:flex;align-items:center;justify-content:center;padding:35px}.auth-inner{max-width:380px;width:100%}.auth-inner h1{font-size:23px}.auth-inner>p{font-size:12px;color:var(--muted);line-height:1.9;margin-bottom:28px}label{display:block;font-size:12px;font-weight:600;margin:17px 0 7px}input,select,textarea{border:1px solid #d9e0d3;background:#fff;border-radius:8px;padding:11px 12px;width:100%;color:var(--ink);min-width:0}input:focus,textarea:focus,select:focus{outline:2px solid #92af7c;outline-offset:1px}textarea{min-height:92px;resize:vertical}.auth-form .primary{width:100%;margin-top:24px;padding:13px}.error{color:var(--red);font-size:12px;line-height:1.8;margin:14px 0}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.formactions{display:flex;justify-content:flex-end;gap:9px;margin-top:25px}.help{font-size:11px;line-height:1.8;color:var(--muted);margin-top:6px}.loading{display:grid;min-height:70vh;place-items:center;color:var(--muted)}dialog{border:1px solid var(--line);border-radius:16px;padding:28px;width:min(560px,calc(100% - 28px));max-height:90vh;color:var(--ink);box-shadow:0 20px 100px #1d33252b}dialog::backdrop{background:#20322966;backdrop-filter:blur(3px)}.modalhead{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px}.modalhead h2{font-size:20px}.modalhead button{padding:4px 10px;border:0;font-size:21px}.detailgrid{display:grid;grid-template-columns:90px 1fr;gap:13px;font-size:13px;line-height:1.8}.detailgrid dt{color:var(--muted)}.detailgrid dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.receiptlink{display:inline-block;margin:14px 0}.footnote{font-size:10px;color:#94a08e;margin-top:26px;display:flex;justify-content:space-between}.requestnote{font-size:11px;color:#8b946d}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:13px 22px;background:#294e3c;color:white;border-radius:10px;box-shadow:0 8px 30px #0002;z-index:30;display:none;max-width:90%;font-size:13px}#toast.show{display:block}.logdetail{white-space:normal;overflow-wrap:anywhere;max-width:280px;font-size:11px}.mobilebrand{display:none}
@media(min-width:1500px){.main{padding-left:60px;padding-right:60px}}@media(max-width:1100px){.main{padding:0 24px 30px}.layout{grid-template-columns:190px minmax(0,1fr)}.sidebar{padding:28px 13px}.dashboard-grid{grid-template-columns:1fr}.clockcard{padding:23px}.quick{grid-template-columns:repeat(3,1fr);gap:15px}.quick button{border:0;align-items:flex-start}.quick .arrow{display:none}.quick .iconbox{display:none}.topdate{display:none}.card{padding:19px}}@media(max-width:700px){.layout{display:block}.sidebar{height:auto;position:sticky;top:0;z-index:10;padding:10px 13px;background:#f0f3eaf5;backdrop-filter:blur(8px);border-bottom:1px solid var(--line);border-right:0}.sidebar .brand,.navlabel,.sidebottom{display:none}.mobilebrand{display:flex;font-size:15px;letter-spacing:2px;font-weight:bold;padding:2px 6px 10px;justify-content:space-between;align-items:center}.mobilebrand span{font-size:9px;color:#72806d;letter-spacing:1px}.nav{display:flex;justify-content:space-between;gap:1px}.nav button{flex-direction:column;gap:5px;font-size:10px;padding:8px 10px;flex:1}.nav svg{width:18px;height:18px}.nav .count{display:none}.main{padding:0 16px 26px}.topbar{height:62px;margin-bottom:22px}.toptools{gap:5px}.toptools input{width:137px;font-size:12px;padding:7px}.toptools button{font-size:10px;padding:8px}.breadcrumb{font-size:10px}h1{font-size:23px}.intro{align-items:flex-start}.intro>.pill{display:none}.cards{gap:8px;margin:20px 0}.card{padding:15px}.stat-head{font-size:10px;line-height:1.6}.stat-head svg{display:none}.stat-number{font-size:23px;margin:12px 0 6px}.stat-number small{font-size:9px;margin-left:2px}.caption{font-size:9px}.dashboard-grid{gap:16px}.quick{gap:8px}.quick strong{font-size:11px}.quick small{font-size:9px}.clock{font-size:43px}.clockcard{padding:19px}.sectionhead{align-items:flex-start}.sectionhead .toolbar{justify-content:flex-end}.toolbar button,.toolbar a{font-size:11px}.auth{grid-template-columns:1fr}.auth-art{padding:25px;min-height:auto}.auth-art .brand{margin:0}.auth-title{margin:20px 0 0}.auth-title h1{font-size:23px}.auth-title p,.auth-art footer{display:none}.auth-form{padding:30px 24px;align-items:flex-start}.formgrid{grid-template-columns:1fr}.footnote{line-height:1.8;gap:20px}.rowtitle{max-width:150px}.clockdate{font-size:11px}dialog{padding:22px}.intro .toolbar{max-width:150px;justify-content:flex-end}.intro .toolbar button{padding:9px;font-size:11px}}

.approval-stats{display:flex;gap:18px;flex-wrap:wrap;margin:18px 0;color:#6a7e68;font-size:12px}.approval-stats strong{font-size:22px;margin-left:6px;color:#2d503f}.batch-list{max-height:310px;overflow:auto}.checkline{display:flex;gap:12px;align-items:flex-start;line-height:1.8}.checkline input{width:18px;flex-shrink:0;margin-top:5px}

/* Receipt scanning */
[hidden]{display:none!important}.scan-panel{margin:20px 0;padding:16px;background:#f3f7f4;border:1px solid #d5e3db;border-radius:14px}.scan-panel h3{margin:0 0 10px}.scan-panel [role=status]{font-size:13px;line-height:1.7}.scan-stage{position:relative;margin:24px 14px;max-width:650px}.scan-stage canvas{display:block;width:100%;height:auto}.scan-stage [data-corner]{position:absolute;transform:translate(-50%,-50%);width:36px;height:36px;min-height:36px;padding:0;border-radius:50%;border:2px solid white;background:#087f72;color:white;touch-action:none;cursor:move}.scan-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.scan-preview{display:block;max-width:100%;max-height:440px;object-fit:contain;margin:12px auto;border:1px solid #ccc}.ocr-candidate{margin:10px 0}.ocr-candidate label{display:flex;gap:8px;align-items:center}.ocr-candidate input[type=checkbox]{width:18px;min-height:18px}.scan-panel details{margin:12px 0}.scan-panel details textarea{height:160px}.camera-pick{font-weight:600}.scan-panel .checkline{margin-top:16px}@media(max-width:600px){.scan-panel{padding:12px}.scan-actions button{flex:1 1 45%}}
.scan-stage [data-corner]{width:44px;height:44px;min-height:44px}
/* Daily attendance and review workspace */
.punch-first .clockcard{background:#e5eee7}.punch-first .clock{font-size:64px}.punch-first .punchbuttons button{min-height:64px;font-size:18px}.task-links{display:grid;grid-template-columns:1fr}.task-links .iconbox{display:grid}.task-links button{align-items:center;padding:20px 0}.review-inbox{display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:#fff;border:1px solid var(--line);border-radius:13px;padding:20px}.review-inbox>div{margin-right:auto}.review-inbox strong{font-size:22px}.attendance-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:15px;margin-top:10px;align-items:end}.filter-note{font-weight:700}.apply-row{display:flex;flex-wrap:wrap;align-items:center;gap:14px 18px;margin:18px 0}.apply-label{font-size:22px;font-weight:800;letter-spacing:.06em;color:var(--green);background:var(--leaf);border-left:6px solid var(--green);border-radius:10px;padding:10px 16px;line-height:1.2}.apply-row .toolbar,.apply-row .attendance-filters{flex:1;margin:0}.attendance-filters label{margin:10px 0}.attendance-filters select{margin-top:7px}.who-pick{display:grid;gap:6px;max-width:420px;margin:2px 0 8px;font-weight:600}.who-pick select{margin-top:0;font-weight:500}.attendance-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:14px;margin:24px 0}.attendance-totals>div{padding:16px;background:#f3f6f1;border-radius:10px}.attendance-totals span{display:block;color:var(--muted);font-size:12px}.attendance-totals strong{display:block;font-size:24px;margin-top:8px}.attendance-totals small{font-size:13px;margin-left:5px}.month-switch{display:flex;align-items:center;gap:18px}.month-switch h2{margin:0}.month-switch button{font-size:22px;padding:4px 15px}.month-attendance th{position:sticky;top:0}.month-attendance .is-weekend{background:#f6f8fa}.month-attendance .is-today{background:#edf5e7}.today-tag{font-size:10px;background:var(--green);color:white;padding:3px 6px;border-radius:5px;margin-left:8px}.attendance-comment{white-space:normal;max-width:260px;font-size:12px;margin-top:6px;overflow-wrap:anywhere}.month-attendance td{padding:12px}.tablewrap:focus-visible{outline:2px solid var(--green)}
@media(max-width:700px){.nav button{padding:8px 3px;font-size:10px}.attendance-filters{grid-template-columns:1fr;gap:0}.attendance-totals{grid-template-columns:1fr 1fr;gap:8px}.attendance-totals strong{font-size:20px}.review-inbox{padding:15px}.review-inbox>div{width:100%}.review-inbox button{flex:1;font-size:12px}.punch-first .clock{font-size:50px}.punch-first .punchbuttons button{font-size:16px;padding:10px 5px;min-width:70px}.task-links strong{font-size:14px}.task-links small{font-size:11px}.intro{flex-wrap:wrap}.intro .toolbar{max-width:none;justify-content:flex-start}.sectionhead{flex-wrap:wrap}.month-attendance{min-width:640px}.task-links .arrow{display:block}}
.schedule-grid{max-height:560px}.schedule-grid th:first-child{position:sticky;left:0;z-index:1;background:#f4f7ef;min-width:130px}.schedule-grid td{padding:6px}.schedule-grid td button{width:100%;min-width:100px;min-height:48px;font-size:11px;font-weight:400}.schedule-grid .scheduled{background:#e7f1e8}.pattern-list{display:flex;gap:12px;flex-wrap:wrap;margin:18px 0}.pattern-list>div{background:#f4f7ef;border-radius:10px;padding:16px;min-width:170px}.weekday-picks{display:flex;gap:14px;flex-wrap:wrap}.weekday-picks label{display:flex;gap:5px;align-items:center}.weekday-picks input{width:18px}fieldset{border:1px solid var(--line);border-radius:8px;margin-top:15px}legend{font-size:12px}@media(max-width:700px){.nav{overflow-x:auto;justify-content:flex-start}.nav button{min-width:55px;flex-shrink:0}.schedule-grid th:first-child{min-width:100px}}
@media (max-width:768px){input,select,textarea{font-size:16px}}
dialog .scan-busy{position:fixed;inset:0;z-index:30;background:rgba(32,50,41,.55);display:flex;align-items:center;justify-content:center;padding:24px}dialog .scan-busy[hidden]{display:none!important}.scan-busy-card{background:#fff;color:var(--ink);border-radius:16px;padding:28px 26px;width:min(320px,100%);text-align:center;box-shadow:0 16px 50px #0003}.scan-busy-card p{margin:0;font-size:16px;font-weight:700}.scan-busy-card small{display:block;margin-top:8px;color:var(--muted);font-size:12px}.scan-busy-card button{margin-top:16px}@keyframes scanspin{to{transform:rotate(360deg)}}.camera-pick{display:flex;flex-direction:column;align-items:center;gap:8px;background:var(--green);color:#fff;border-radius:12px;padding:16px;margin:0 0 8px;font-size:16px;font-weight:700}.camera-pick input{background:#fff;color:var(--ink)}.scan-panel{margin-top:0}

.filters.settings-tabs{flex-wrap:wrap;align-items:flex-start}
.settings-tabs button{white-space:nowrap}
.permission-picks{max-height:240px;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:8px 12px;margin-top:8px}
.pattern-list .toolbar{justify-content:flex-start}
.settings-page .intro{align-items:flex-start}
.settings-page .sectionhead{align-items:flex-start}
.settings-page .filters{margin-top:0}

.scan-pick{display:flex;flex-direction:column;gap:10px;margin:12px 0 8px}
.camera-shot{width:100%;background:var(--green);color:#fff;border:0;border-radius:14px;padding:18px 16px;font-size:22px;font-weight:800;letter-spacing:.04em;line-height:1.2}
.camera-shot:hover:not(:disabled){background:#204a3b;color:#fff}
.scan-pick-sub{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.scan-pick-sub button{padding:12px 10px;font-size:13px;font-weight:700;border-radius:12px;background:#fff}
.scan-filename{margin:0;font-size:12px;color:var(--muted);word-break:break-all}
.scan-stage{background:#fff;border:1px solid #d5e3db;border-radius:12px;overflow:visible;min-height:120px}
.scan-preview{background:#fff;border-radius:10px}
dialog{overflow:auto}
.expense-item{margin:0 0 16px;padding:14px 14px 8px;background:#fff;border:1px solid #d5e3db;border-radius:16px}
.expense-item-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.expense-item-head strong{font-size:15px}
.add-receipt{width:100%;margin:4px 0 8px;padding:14px 12px;border:1px dashed #8aa38f;background:#f3f7f4;color:var(--green);font-size:15px;font-weight:800;border-radius:12px}
.add-receipt:hover:not(:disabled){background:#e7eee4}

.attendance-totals em.hint{display:block;margin-top:6px;color:var(--muted);font-size:12px;font-style:normal;font-weight:500;line-height:1.4}.attendance-totals.slim{margin-top:0}.attendance-totals.hours{margin-bottom:10px}.row-actions{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.row-actions .small{margin:0}

.ap-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:4px 0 12px;align-items:stretch}
.ap-card{display:block;width:100%;text-align:left;background:#fff;border:1px solid var(--line);border-radius:12px;padding:8px 12px;font-weight:500}
.ap-card.pick{border:2px solid var(--green);background:#f4f8f2}
.ap-filter{display:flex;flex-direction:column;gap:6px;justify-content:center}
.ap-filter label{display:flex;flex-direction:row;align-items:center;gap:6px;font-size:12px;color:var(--muted);font-weight:700}
.ap-filter select{flex:1;min-width:0;font:inherit;font-weight:600;color:var(--ink);padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:#fff}
.ap-card .k{color:var(--muted);font-size:13px}
.ap-card .n{font-size:22px;line-height:1.1;margin:1px 0 0;font-weight:700;color:var(--ink)}
.ap-card .n small{font-size:14px;margin-left:4px;font-weight:600}
.ap-card p{margin:4px 0 0;color:var(--muted);font-size:12px;line-height:1.45;font-weight:500}
.ap-list{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.ap-listhead{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;padding-right:16px}
.ap-list h2{font-size:16px;margin:0;padding:14px 16px 0}
.ap-list .note{margin:4px 16px 12px;color:var(--muted);font-size:12px;line-height:1.6}
.ap-row{display:grid;grid-template-columns:148px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 16px;border-top:1px solid var(--line)}
.ap-row b{display:block}
.ap-row span{color:var(--muted);font-size:12px}
.ap-kind{display:inline-block;background:var(--leaf);color:var(--green);border-radius:6px;padding:2px 7px;font-size:12px;font-weight:700;margin-right:6px}
.ap-close{margin-top:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;display:flex;align-items:center;gap:16px}
.ap-close p{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.6}
.ap-narrow{margin:0 0 12px}
.ap-narrow summary{cursor:pointer;color:var(--muted);font-size:13px}
@media(max-width:1100px){.ap-cards{grid-template-columns:1fr 1fr}}@media(max-width:800px){.ap-cards,.ap-row{grid-template-columns:1fr}.ap-close,.ap-listhead{flex-direction:column;align-items:stretch}}

.pay-ask{padding:4px 2px 8px}
.pay-choice{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0 8px}
.pay-choice-btn{min-height:56px;font-size:16px;font-weight:700}
@media(max-width:640px){.pay-choice{grid-template-columns:1fr}}

/* Keep the account entry within the mobile header. */
@media(max-width:700px){
 .mobilebrand .mobile-account{min-height:44px;padding:10px 12px;font-size:13px;letter-spacing:0;flex-shrink:0}
 .toptools [data-do="account"],.toptools .account-name{display:none}
 .topbar{height:auto;min-height:62px;flex-wrap:wrap;gap:8px;padding:10px 0}
 .topbar .breadcrumb{width:100%}
 .toptools{max-width:100%;flex-wrap:wrap}
}

.receipt-detail-preview{margin:20px 0;min-width:0}.receipt-detail-preview h3{margin:0 0 10px}.receipt-detail-preview button{margin-bottom:10px}.receipt-detail-preview img{display:block;width:100%;height:auto;max-height:320px;object-fit:contain;background:#fff;cursor:zoom-in;border-radius:8px}.receipt-detail-preview img[hidden],.receipt-detail-preview button[hidden]{display:none}.receipt-detail-preview.is-expanded img{max-height:none;cursor:zoom-out}

.route-summary{width:156px;max-width:100%;font-size:12px}.route-summary .pill{font-size:11px;max-width:100%;white-space:normal}.route-short-line{display:flex;min-width:0;gap:2px}.route-short-line>span:first-child{flex:none}.route-short-line [data-route-names]{display:block;min-width:0;flex:1;white-space:nowrap;overflow:hidden}.approval-route{margin:18px 0;padding-top:14px;border-top:1px solid var(--line,#708478)}.approval-route h3{font-size:15px;margin:0 0 8px}.approval-route-level{padding:10px 0}.approval-route-level .sectionhead{margin-bottom:6px;gap:8px;flex-wrap:wrap}.route-people{display:grid;grid-template-columns:65px minmax(0,1fr);gap:6px;margin:0}.route-people dt{opacity:.75}.route-people dd{margin:0;overflow-wrap:anywhere}.approval-route .help{overflow-wrap:anywhere}

.ap-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.ap-items .ap-compact{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:5px;min-width:0;padding:10px 14px}.ap-items .ap-compact:nth-child(2n){border-left:1px solid var(--line)}.ap-item-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}.ap-item-heading .ap-kind{margin-left:auto;margin-right:0}.ap-item-content{overflow-wrap:anywhere}.ap-item-footer{display:flex;justify-content:space-between;align-items:flex-end;gap:8px;margin-top:auto;padding-top:3px;min-width:0}.ap-item-footer .route-summary{min-width:0;flex:1;max-width:180px}.ap-item-footer>button{flex:none}.ap-items .ap-compact .route-summary .pill{color:var(--ink)}@media(max-width:700px){.ap-items{grid-template-columns:minmax(0,1fr)}.ap-items .ap-compact:nth-child(2n){border-left:0}}

.ap-items .ap-compact{display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,1fr);grid-template-rows:auto 1fr;column-gap:12px;row-gap:3px;padding:10px 14px}.ap-compact .ap-item-heading{grid-column:1;grid-row:1;justify-content:flex-start}.ap-compact .ap-item-heading .ap-kind{margin-left:0}.ap-compact .ap-item-content{grid-column:1;grid-row:2}.ap-compact .ap-item-footer{grid-column:2;grid-row:1 / 3;margin-top:0;padding-top:0;align-self:stretch;align-items:flex-end}.ap-compact .ap-item-footer .route-summary{align-self:center;max-width:none}.ap-compact .ap-item-footer>button{padding:6px 8px}@media(max-width:440px){.ap-items .ap-compact{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:10px}.ap-compact .ap-item-footer{flex-wrap:wrap;gap:5px}.ap-compact .ap-item-footer .route-summary{flex-basis:100%}.ap-compact .ap-item-footer>button{margin-left:auto}.ap-compact .ap-item-heading{gap:4px}}

@media(max-width:700px){.nav button{position:relative;padding-top:12px}.nav .count{display:inline-flex;position:absolute;top:0;right:1px;align-items:center;justify-content:center;margin:0;min-width:16px;min-height:16px;padding:2px 4px;border-radius:8px;font-size:10px;line-height:1.2}}

/* Keep column headings inside the table's own scrolling area. */
.tablewrap{max-height:min(560px,65vh);overflow:auto;isolation:isolate}
.tablewrap table{border-collapse:separate;border-spacing:0}
.tablewrap thead th{position:sticky;top:0;z-index:2}
.schedule-grid tbody th:first-child{position:sticky;left:0;z-index:1}
.schedule-grid thead th:first-child{position:sticky;top:0;left:0;z-index:3}

.mileage-form{display:grid;grid-template-columns:48px auto;gap:6px;align-items:end}.mileage-form label{margin:0}.mileage-form input{width:48px;padding:6px 3px;margin:2px 0 0}.mileage-form button{margin:0;white-space:nowrap}.mileage-form .error{grid-column:1/-1;white-space:normal;max-width:200px}
.mileage-form input[type=hidden]{display:none}.mileage-form label{grid-column:1;grid-row:1}.mileage-form button{grid-column:2;grid-row:1}
.mileage-form input[type=number]{display:block;text-align:right}

.mileage-form{grid-template-columns:48px 48px;justify-content:start}.mileage-form input[type=number],.mileage-form button{box-sizing:border-box;width:48px;min-width:0;height:34px;min-height:0;padding:4px 3px}

.month-attendance .row-actions{white-space:nowrap}.month-attendance .row-actions button{display:inline-block;vertical-align:middle;margin-top:0;margin-bottom:0}.month-attendance .row-actions button+button{margin-left:6px}

.month-attendance .row-actions{display:table-cell;white-space:nowrap}.month-attendance .row-actions button{display:inline-block;vertical-align:middle;margin-top:0;margin-bottom:0}.month-attendance .row-actions button+button{margin-left:6px}

/* Keep each day equally tall; long status and location text stays scrollable. */
.month-attendance tbody td{height:49px;box-sizing:border-box;padding:4px 12px}
.month-attendance .day-cell{max-height:80px;overflow:auto}
.month-attendance .mileage-form{grid-template-columns:48px auto 48px;align-items:center}
.month-attendance .mileage-form .mileage-unit{grid-column:2;grid-row:1}
.month-attendance .mileage-form button{grid-column:3;grid-row:1}
.month-attendance .mileage-form input{margin:0}
.month-attendance .day-cell{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;height:40px;max-height:40px;max-width:420px;white-space:nowrap;overflow:auto}
.month-attendance .day-cell> *{flex-shrink:0}
.month-attendance .day-cell>br{display:none}
.month-attendance .day-cell .caption,.month-attendance .day-cell .attendance-comment{margin:0;white-space:nowrap}
.month-attendance .mileage-form{display:flex;align-items:center;gap:6px;margin:0}
.month-attendance .mileage-form .error:empty{display:none}
.month-attendance .mileage-form .error{white-space:nowrap;margin:0}
.month-attendance .row-actions button+button{margin-left:0}


/* Compact monthly summary only; other tables retain their established layout. */
.monthly-summary{padding:16px}.monthly-summary h2{margin:0 0 6px}.monthly-notes{margin:0 0 8px}.monthly-notes summary{cursor:pointer;font-size:12px;line-height:1.5}.monthly-notes .help{margin:8px 0}.monthly-table th,.monthly-table td{padding:4px 8px;white-space:nowrap;vertical-align:middle;line-height:1.4}.monthly-table tbody tr{height:36px}.monthly-table .small{min-height:28px;padding:4px 8px;line-height:1.4;margin:0}.monthly-table .caption{display:inline}.monthly-summary .tablewrap{max-height:min(680px,70vh)}

.monthly-table .monthly-value,.monthly-table th:nth-child(n+5){text-align:right;font-variant-numeric:tabular-nums}.monthly-table .monthly-duration{display:inline-flex;align-items:baseline;justify-content:flex-end;white-space:nowrap}.monthly-table .monthly-time-unit{font-size:50%;margin-left:1px}.monthly-table .monthly-minutes{display:inline-block;min-width:2ch;text-align:right;margin-left:2px;font-variant-numeric:tabular-nums}

.records-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.records-fields label{min-width:0}.records-fields input,.records-fields select{width:100%;min-width:0}@media(max-width:600px){.records-fields{grid-template-columns:minmax(0,1fr)}}

/* Compact archive search only; receipt correction fields keep their layout. */
[data-records-page]:has([data-records-search]){padding:12px}
[data-records-page]>p.error{margin:0 0 8px;font-size:12px;line-height:1.5}
[data-records-search]{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:0}
[data-records-search] .records-fields{grid-column:1/-1;grid-template-columns:155px 155px 120px 120px minmax(160px,260px);gap:8px;align-items:end}
[data-records-search] .records-fields label{margin:0;font-size:12px;line-height:1.4}
[data-records-search] .records-fields input{box-sizing:border-box;height:34px;min-height:0;padding:5px 8px;margin:3px 0 0;font-size:13px}
[data-records-search] .toolbar{grid-column:1;grid-row:2;margin:0;gap:6px;align-items:center}
[data-records-search] .toolbar button{min-height:0;height:34px;padding:5px 10px;font-size:12px;white-space:nowrap}
[data-records-search]>.checkline{grid-column:2;grid-row:2;align-self:center;justify-self:start;margin:0;font-size:12px;gap:5px}
[data-records-search]>.checkline input{margin:0;width:15px;height:15px}
[data-records-search]>.help{grid-column:1/-1;grid-row:3;margin:0;font-size:11px;line-height:1.5}
[data-records-search]>[data-records-error]:empty{display:none}
[data-records-search]>[data-records-error]{grid-column:1/-1;margin:0}
[data-records-results]{margin-top:8px}
@media(max-width:1150px){[data-records-search] .records-fields{grid-template-columns:repeat(4,minmax(120px,1fr))}[data-records-search] .records-fields label:last-child{grid-column:1/3}}
@media(max-width:700px){[data-records-search] .records-fields{grid-template-columns:repeat(2,minmax(0,1fr))}[data-records-search] .records-fields label:last-child{grid-column:1/-1}[data-records-search]>.checkline{grid-column:1/-1;grid-row:3}[data-records-search]>.help{grid-row:4}[data-records-search] .toolbar{grid-column:1/-1}}

.records-preview{margin:10px 0}.records-preview .toolbar{margin:0 0 6px;gap:6px}.records-preview .toolbar button{padding:5px 9px;min-height:32px}.records-image-scroll{--records-image-height:min(460px,65vh);max-height:var(--records-image-height);overflow:auto;border:1px solid var(--line);border-radius:8px;background:#ececec}.records-image-scroll img{display:block;width:auto;max-width:none;height:auto;margin:0 auto;transform:none;filter:none}.records-image-scroll[data-view="fit"] img{max-width:100%;max-height:calc(var(--records-image-height) - 2px)}.records-auto{border:1px solid var(--line);border-radius:8px;padding:10px;margin:10px 0}.records-auto p{margin:5px 0;font-size:12px}.records-preview .help{margin:5px 0;font-size:12px}

.bugyo-rules input{min-width:70px;max-width:160px}.bugyo-rules select{max-width:240px}[data-bugyo-errors]{white-space:pre-line}[data-records-search] .records-fields{grid-template-columns:145px 145px 110px 110px minmax(130px,1fr) 135px}@media(max-width:1350px){[data-records-search] .records-fields{grid-template-columns:repeat(3,minmax(0,1fr))}[data-records-search] .records-fields label:last-child{grid-column:auto}}@media(max-width:700px){[data-records-search] .records-fields{grid-template-columns:repeat(2,minmax(0,1fr))}[data-records-search] .records-fields label:last-child{grid-column:auto}}

/* Compact monthly shift cells. */
.schedule-grid th,.schedule-grid td{padding:3px 4px;line-height:1.3}.schedule-grid th:first-child{min-width:90px}.schedule-grid td button{min-width:80px;min-height:36px;padding:3px 5px;line-height:1.3;margin:0}.schedule-grid .caption{font-size:10px;line-height:1.3;margin-top:2px}.schedule-grid [data-schedule-leave]{white-space:normal;max-width:120px}

.request-reason{font-size:12px;color:var(--muted);line-height:1.4;white-space:normal;overflow-wrap:anywhere;max-width:420px;margin-top:3px}

.schedule-notes{margin:6px 0 10px}.schedule-notes summary{cursor:pointer;font-size:12px;color:var(--muted)}

.records-fields label:has([name="received_on"]){display:none}

.place-search-results{display:grid;gap:6px;max-height:260px;overflow:auto;margin:0 0 12px}.place-search-results button{text-align:left;white-space:normal;overflow-wrap:anywhere;width:100%;min-height:40px}


/* Compact schedule page: less space above the grid, larger employee names. */
.schedule-intro{margin-bottom:6px;align-items:center}.schedule-intro .eyebrow,.schedule-intro p{display:none}.schedule-intro h1{margin:4px 0}
.schedule-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;margin:0 0 8px}.schedule-filters label{margin:0;font-size:12px}.schedule-filters .checkline{margin-right:auto;align-self:center;align-items:center;gap:6px}.schedule-filters .checkline input{margin:0}.schedule-filters select{margin-top:4px;min-width:220px}
.schedule-card{padding:10px 12px}.schedule-card .sectionhead{margin-bottom:4px}.schedule-card .month-switch{gap:10px}.schedule-card .month-switch h2{font-size:17px}.schedule-card .month-switch button{font-size:16px;padding:2px 11px}.schedule-card .schedule-notes{margin:0 0 6px}
.schedule-grid{max-height:max(360px,calc(100vh - 200px))}.schedule-grid tbody th:first-child{width:1%;white-space:nowrap}
.schedule-person{display:flex;align-items:center;gap:6px}.schedule-name{font-size:16px;font-weight:700;white-space:nowrap}.schedule-grid .schedule-pattern-button{flex-shrink:0;font-size:11px;padding:2px 7px;min-height:0;line-height:1.4;margin:0}
@media(max-width:700px){.schedule-filters .checkline{width:100%;order:3;margin:0}.schedule-filters label:not(.checkline){flex:1;min-width:130px}.schedule-filters select{min-width:0;width:100%}.schedule-name{font-size:15px}}

.clockcard .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.clockstatus{display:flex;align-items:center;gap:12px;margin:-4px 0 12px;padding:9px 16px;border-radius:12px;border:2px solid transparent;line-height:1.2;min-height:56px;box-sizing:border-box}
.clockstatus-dot{flex:0 0 auto;width:16px;height:16px;border-radius:50%;background:currentColor;box-shadow:0 0 0 4px rgba(255,255,255,.55)}
.clockstatus strong{font-size:26px;font-weight:800;letter-spacing:.06em;white-space:nowrap}
.clockstatus small{margin-left:auto;font-size:15px;font-weight:700;white-space:nowrap;opacity:.95}
.clockstatus.is-none{background:#fff4e2;border-color:#e9b45c;color:#8a5212}
.clockstatus.is-working{background:#2f7d4f;border-color:#256840;color:#fff}
.clockstatus.is-working .clockstatus-dot{background:#b8f5c8;animation:clockstatus-pulse 1.8s ease-out infinite}
.clockstatus.is-break{background:#f2b632;border-color:#d99a12;color:#4a3300}
.clockstatus.is-break .clockstatus-dot{background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.4)}
.clockstatus.is-done{background:#e5ebf5;border-color:#a9b9d6;color:#2f4670}
@keyframes clockstatus-pulse{0%{box-shadow:0 0 0 0 rgba(184,245,200,.75)}70%{box-shadow:0 0 0 10px rgba(184,245,200,0)}100%{box-shadow:0 0 0 0 rgba(184,245,200,0)}}
@media (prefers-reduced-motion:reduce){.clockstatus.is-working .clockstatus-dot{animation:none;box-shadow:0 0 0 4px rgba(184,245,200,.35)}}
@media(max-width:600px){.clockstatus{gap:10px;padding:8px 13px;min-height:52px}.clockstatus strong{font-size:24px}.clockstatus small{font-size:14px}.clockstatus-dot{width:14px;height:14px}}
[data-theme="dark"] .clockstatus.is-none{background:#3f2f17;border-color:#a8742a;color:#ffd79a}
[data-theme="dark"] .clockstatus.is-working{background:#2b7a4b;border-color:#45a46b;color:#fff}
[data-theme="dark"] .clockstatus.is-break{background:#c48d14;border-color:#e3ad3a;color:#211600}
[data-theme="dark"] .clockstatus.is-done{background:#26324a;border-color:#4f6590;color:#c9d7f2}
[data-theme="dark"] .clockstatus-dot{box-shadow:0 0 0 4px rgba(255,255,255,.12)}
.mobile-month{display:none}
@media(max-width:700px){
 .main>.topbar{display:none}
 .main{padding-top:18px}
 .mobilebrand .mobile-month{display:flex;align-items:center;gap:2px;margin-left:auto;margin-right:8px;letter-spacing:0;font-weight:normal}
 .mobile-month button{min-height:44px;min-width:34px;padding:0 6px;font-size:20px;line-height:1}
 .mobile-month input{width:116px;min-height:36px;padding:4px 6px;font-size:14px;font-weight:700;text-align:center;background:transparent}
}
@media(max-width:360px){.mobile-month input{width:100px;font-size:13px}.mobile-month button{min-width:28px;padding:0 3px}.mobilebrand .mobile-month{margin-right:4px}}/* トップ画面（.home 以下だけに効く）。色は --home-* 変数にまとめ、テーマ（Komorebi / Light / Dark）は変数の上書きで変える。 */
.home{--home-hero-bg:linear-gradient(160deg,#f4f7ef 0%,#e3ece2 100%);--home-hero-line:#d4e0d0;--home-accent:var(--green);--home-accent-ink:#fff;--home-brass:#9a7a3c;--home-ink:var(--ink);--home-muted:var(--muted);--home-surface:var(--white);--home-line:var(--line);--home-danger-bg:#fcefeb;--home-danger-line:#e5ad9f;--home-danger-ink:var(--red);--home-warn-bg:#fdf5e6;--home-warn-line:#e6c98d;--home-warn-ink:var(--amber);--home-info-bg:#eef3ea;--home-info-line:#c9d8c2;--home-info-ink:var(--green);display:grid;gap:20px}
.home-top{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:20px;align-items:start}
.home .home-clock{background:var(--home-hero-bg);border:1px solid var(--home-hero-line);border-radius:18px;padding:26px 28px;color:var(--home-ink)}
.home-hello{margin:0 0 6px;font-size:13px;color:var(--home-muted)}
.home-clock .clockdate{font-size:14px;color:var(--home-muted);letter-spacing:.04em}
.home-clock .clock{font-size:68px;font-weight:600;line-height:1;margin:6px 0 16px;color:var(--home-accent)}
.home-clock .clocksec{font-size:26px;color:var(--home-brass)}
.home-clock .clockstatus{margin:0 0 10px}
.home-state-msg{margin:0 0 12px;font-size:17px;font-weight:700;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px}
.home-state-msg.is-none{color:var(--home-danger-ink)}
.home-elapsed{font-size:14px;font-weight:600;color:var(--home-muted)}
.home-elapsed strong{font-size:20px;color:var(--home-accent);font-variant-numeric:tabular-nums}
.home-done-range{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin:0 0 12px;font-size:28px;font-variant-numeric:tabular-nums}
.home-done-range span{color:var(--home-muted);font-size:20px}
.home-done-range small{flex-basis:100%;font-size:14px;color:var(--home-muted)}
.home-punch{margin:18px 0 14px}
.home-punch .home-punch-main{flex:1 1 100%;min-height:76px;font-size:24px;font-weight:700;letter-spacing:.4em;border-radius:14px;background:var(--home-accent);border-color:var(--home-accent);color:var(--home-accent-ink);box-shadow:0 6px 18px rgba(31,74,58,.18)}
.home-punch .home-punch-sub{flex:1 1 140px;min-height:48px;font-size:15px}
.home-geo{font-size:11px}
.home-alerts h2,.home-requests h2{margin-top:0}
.home-alerts ul{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.home-alert{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 12px;padding:12px 14px;border-radius:12px;border:1px solid var(--home-info-line);border-left-width:5px;background:var(--home-info-bg)}
.home-alert strong{display:block;font-size:14px;color:var(--home-info-ink)}
.home-alert small{display:block;margin-top:3px;font-size:12px;color:var(--home-muted)}
.home-alert.is-danger{background:var(--home-danger-bg);border-color:var(--home-danger-line)}
.home-alert.is-danger strong{color:var(--home-danger-ink)}
.home-alert.is-warn{background:var(--home-warn-bg);border-color:var(--home-warn-line)}
.home-alert.is-warn strong{color:var(--home-warn-ink)}
.home-alert-actions{display:flex;gap:6px;flex-wrap:wrap}
.home-alerts-none{margin:0}
.home-links{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:12px}
.home-tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px 8px;border:1px solid var(--home-line);border-radius:14px;background:var(--home-surface);text-align:center}
.home-tile-icon svg{width:24px;height:24px;color:var(--home-accent)}
.home-tile strong{font-size:14px}
.home-tile small{font-size:11px;color:var(--home-muted)}
.home-tile .count{position:absolute;top:8px;right:8px;min-width:18px;padding:2px 6px;border-radius:9px;font-size:11px;background:var(--home-danger-ink);color:#fff}
.home-more{display:flex;flex-wrap:wrap;gap:8px;margin-top:-8px}
.home-more .count{margin-left:6px;padding:0 6px;border-radius:8px;font-size:11px;background:var(--home-danger-ink);color:#fff}
@media(max-width:1100px){.home-top{grid-template-columns:1fr}}
@media(max-width:700px){.home{gap:14px}.home-top{gap:14px}.home .home-clock{padding:18px 16px;border-radius:16px}.home-hello{font-size:12px;margin-bottom:2px}.home-clock .clock{font-size:52px;margin:2px 0 12px}.home-clock .clocksec{font-size:20px}.home-state-msg{font-size:16px}.home-done-range{font-size:24px}.home-punch{margin:14px 0 10px}.home-punch .home-punch-main{min-height:68px;font-size:22px}.home-links{grid-template-columns:repeat(3,1fr);gap:8px}.home-tile{padding:12px 4px}.home-tile small{display:none}.home-tile strong{font-size:12px}}
@media(max-width:360px){.home-links{grid-template-columns:repeat(2,1fr)}}
.confirm-dialog{width:min(420px,calc(100% - 28px));text-align:center}.confirm-dialog p{margin:0 0 20px;font-size:17px;line-height:1.7;overflow-wrap:anywhere}.confirm-actions{display:flex;gap:12px;justify-content:center}.confirm-actions button{flex:1;max-width:160px;margin:0;width:auto;padding:12px 16px}
.site-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:0 14px;align-items:end}.site-fields>label{min-width:0}.site-fields select,.site-fields input{box-sizing:border-box;height:44px}

/* Keep the layout and background in place while hiding only the home content. */
.layout:has(.dashboard-page) > .main{transition:opacity .25s ease,visibility 0s .25s}
.layout.home-background-mode > .main{opacity:0;visibility:hidden;pointer-events:none}
.layout:has(.dashboard-page):not(.home-background-mode) > .main{visibility:visible;transition-delay:0s}
@media(prefers-reduced-motion:reduce){.layout:has(.dashboard-page) > .main{transition:none}}

/* Employee audit history: readable cards on desktop and phones. */
.history-row{border-top:1px solid var(--line,#ddd);padding:16px 0;overflow-wrap:anywhere}
.history-row-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px}
.history-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0}
.history-facts div,.history-detail div{min-width:0}
.history-facts dt,.history-detail dt{font-size:12px;opacity:.75}
.history-facts dd,.history-detail dd{margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.history-detail{margin:12px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.history-detail .history-detail{display:block;margin:4px 0}
.employee-history details summary{cursor:pointer}
@media(max-width:700px){.history-facts,.history-detail{grid-template-columns:repeat(2,minmax(0,1fr))}.history-row-head{display:block}.history-row-head time{display:block;margin-top:4px}.employee-history .attendance-filters label{min-width:0;max-width:100%}.employee-history select{max-width:100%}.history-tabs{flex-wrap:wrap}}

.history-detail > .history-wide{grid-column:1 / -1}

/* DEV-018：要確認の原因別まとめと、集計予定時間の詳細 */
.issue-summary{display:grid;gap:6px;overflow-wrap:anywhere}
.issue-summary details{background:transparent;border:1px solid currentColor;border-color:color-mix(in srgb,currentColor 30%,transparent);border-radius:8px;padding:6px 10px}
.issue-summary summary{cursor:pointer;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.issue-summary .issue-kind{font-weight:700}
.issue-summary .issue-count{font-size:11px;background:#faf0d9;color:#946e2c;border-radius:6px;padding:1px 7px}
.issue-summary p{margin:6px 0;white-space:normal}
.estimate-detail{display:grid;grid-template-columns:7.5em minmax(0,1fr);gap:8px 12px;font-size:13px;line-height:1.7;margin:0}
.estimate-detail dt{color:var(--muted)}
.estimate-detail dd{margin:0;overflow-wrap:anywhere}
.monthly-review li{white-space:normal;overflow-wrap:anywhere;margin-bottom:6px}
@media(max-width:700px){.estimate-detail{grid-template-columns:1fr;gap:2px}.estimate-detail dd{margin-bottom:8px}}
.returned-list{list-style:none;margin:8px 0 0;padding:0;display:grid;gap:8px;max-height:24em;overflow:auto}
.returned-list li{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;padding:10px 12px;border:1px solid var(--line);border-left:4px solid var(--red);border-radius:10px}
.returned-list li>div{min-width:0;flex:1 1 14em;overflow-wrap:anywhere}
.returned-list .rowtitle{margin-top:2px}
.home-badge-note{margin:10px 0 0}
/* 登録直後に一度だけ表示する仮パスワード（スマホでも折り返して全部見える） */
.temp-pw-list{list-style:none;margin:12px 0;padding:0;display:grid;gap:10px}.temp-pw-list li{display:grid;gap:4px;padding:10px 12px;border:1px solid var(--line,rgba(127,127,127,.35));border-radius:10px;overflow-wrap:anywhere}.temp-pw-list code{font-size:1.15em;letter-spacing:.06em;user-select:all}
.ia-panel{margin:8px 0 14px;padding:10px 12px;border:1px solid var(--line,#d8d8d0);border-radius:8px}
.ia-panel h3{margin:0 0 8px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.ia-form{margin:8px 0}.ia-form summary{cursor:pointer;font-weight:600;padding:6px 0}
.ia-form .actions{margin-top:8px}
.ia-plan,.ia-steps{margin:4px 0 8px;padding-left:0;list-style:none;display:grid;gap:4px}
.ia-plan li,.ia-steps li{display:flex;gap:8px;flex-wrap:wrap;align-items:baseline}
.ia-steps li.current{font-weight:600}
.ia-user.approved{color:var(--green,#1f7a4d)}.ia-user.returned{color:var(--red,#b3261e)}
.ia-user+.ia-user{margin-left:8px}
.ia-pick{margin:8px 0;border:1px solid var(--line,#d8d8d0);border-radius:6px;padding:6px 10px;display:grid;gap:4px}
.ia-request{padding:6px 0;border-top:1px solid var(--line,#e6e6df)}
.ia-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:16px;align-items:start}
.ia-pdf iframe{width:100%;height:70vh;border:1px solid var(--line,#d8d8d0);border-radius:6px}
@media(max-width:800px){.ia-split{grid-template-columns:minmax(0,1fr)}.ia-pdf iframe{height:60vh}}
.intro-compact{margin-bottom:10px}.intro-compact h1{margin:0}
.seg-switch{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden}.seg-switch button{border:0;border-radius:0;padding:7px 16px;font-size:13px}.seg-switch button[aria-pressed="true"]{background:var(--green);color:#fff}
.seg-switch button[aria-pressed="true"]{background:#e7eee4;color:#233c36;font-weight:700}
.month-attendance tbody td{height:38px;padding:2px 12px}.month-attendance .day-cell{height:34px;max-height:34px}
.month-attendance tr.is-sat>td,.month-attendance tr.is-sun>td{background:rgba(120,150,200,.16)}.month-attendance tr.is-sun>td{background:rgba(210,110,100,.18)}
.month-attendance tr.is-sat>td:first-child{box-shadow:inset 4px 0 #6f9fe0}.month-attendance tr.is-sun>td:first-child{box-shadow:inset 4px 0 #e0766b}
.month-attendance tr.is-sat>td:first-child .day-cell{color:#1f4f9a;font-weight:700}.month-attendance tr.is-sun>td:first-child .day-cell{color:#a62f24;font-weight:700}
[data-theme="dark"] .month-attendance tr.is-sat>td:first-child .day-cell{color:#8db5f2}[data-theme="dark"] .month-attendance tr.is-sun>td:first-child .day-cell{color:#f0958b}
.month-attendance tr.is-today>td{background:rgba(120,190,120,.28)}
.seg-switch button[aria-pressed="true"]{background:#e7eee4!important;color:#233c36!important}
.att-body{display:flex;flex-direction:column;min-height:0;overflow:auto}
.att-body>.tablewrap.fill,.att-body .tablewrap.fill{flex:1 1 auto;min-height:160px;max-height:none}
.att-body>*{flex:none}.att-body>.tablewrap.fill{flex:1 1 auto}
.att-notes{margin:8px 0;font-size:12px}.att-notes>summary{cursor:pointer;color:var(--muted);padding:4px 0}
.seg-switch button{white-space:nowrap}


/* 社員一覧：説明・絞り込みを横へまとめ、一覧の表示領域を確保する。 */
.settings-staff-page .settings-tabs{margin-bottom:10px}
.settings-staff-page .staff-intro{align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.settings-staff-page .staff-title{display:flex;align-items:center;gap:14px;flex-wrap:wrap;min-width:0}
.settings-staff-page .staff-title h1{margin:0}
.settings-staff-page .staff-title p{margin:0;overflow-wrap:anywhere}
.settings-staff-page .staff-intro .toolbar{max-width:none;justify-content:flex-start}
.settings-staff-page .staff-intro .toolbar button{padding:8px 12px}
.settings-staff-page .staff-list{padding:12px 14px}
.settings-staff-page .staff-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:8px}
.settings-staff-page .staff-toolbar .sectionhead{align-items:center;flex:none;gap:8px;margin:0}
.settings-staff-page .staff-toolbar h2{margin:0}
.settings-staff-page .attendance-filters{display:flex;align-items:center;justify-content:flex-end;flex:1;flex-wrap:wrap;gap:8px 12px;margin:0;min-width:0}
.settings-staff-page .attendance-filters label{display:flex;align-items:center;gap:6px;min-width:0;margin:0}
.settings-staff-page .attendance-filters select{width:auto;max-width:200px;min-width:80px;padding:6px 8px;margin:0;font-size:12px}
.settings-staff-page .staff-table th,.settings-staff-page .staff-table td{padding:4px 8px;line-height:1.4;vertical-align:middle}
.settings-staff-page .staff-table tbody tr{height:34px}
.settings-staff-page .staff-table .small{min-height:26px;padding:4px 7px;font-size:11px;line-height:1.4}
.settings-staff-page .staff-table .pill{padding:3px 7px}
.settings-staff-page .staff-table .empty{height:100px}
.settings-staff-page .attendance-filters input[type=month]{width:auto;padding:6px 8px;margin:0;font-size:12px}
.settings-staff-page .mt-freee .mt-freee-note{margin:0;font-size:11px}
#modal:has(.mt-preview){width:min(1200px,calc(100% - 28px))}
#modal .mt-preview-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin:0 0 8px}
#modal .mt-preview-tabs{display:flex;gap:6px}
#modal .mt-preview-table{max-height:60vh;overflow:auto}
#modal .mt-preview-table table{font-size:12px}
#modal .mt-preview-table th,#modal .mt-preview-table td{white-space:nowrap;padding:3px 6px}
#modal .mt-preview-table td.num{text-align:right;font-variant-numeric:tabular-nums}
.settings-staff-page .mt-freee-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:6px 16px;margin:0 0 6px}
.settings-staff-page .mt-freee-bar>.mt-freee-note{flex:1 1 auto;min-width:0}
.settings-staff-page .mt-freee-exports{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px;flex:0 0 auto}
@media(max-width:900px){.settings-staff-page .mt-freee-bar{flex-direction:column-reverse}.settings-staff-page .mt-freee-exports{justify-content:flex-start}}
.mt-depts{display:flex;flex-wrap:wrap;gap:6px 14px;margin:10px 0;border:1px solid var(--line,#ccc);border-radius:8px;padding:8px 12px}
.mt-depts label{display:flex;align-items:center;gap:6px;margin:0}
.mt-depts input{width:auto;margin:0}
.settings-staff-page .mt-freee .staff-table td{white-space:nowrap}
/* 列が多いので、見出しは折り返し、余白と入力欄を詰めて枠に収める。 */
.settings-staff-page .mt-freee .staff-table th{white-space:nowrap;line-height:1.25;font-size:11px;vertical-align:bottom}
.settings-staff-page .mt-freee .staff-table th,.settings-staff-page .mt-freee .staff-table td{padding:3px 4px}
.settings-staff-page .mt-freee .staff-table td.wrap{white-space:normal;min-width:4.5em;line-height:1.25;font-size:12px}
.settings-staff-page .mt-freee .staff-table input[type=checkbox]{width:18px;height:18px}
.settings-staff-page .mt-freee tr.mt-excluded td{opacity:.55}
.settings-staff-page .mt-freee .num{text-align:right;font-variant-numeric:tabular-nums}
.settings-staff-page .mt-freee .mt-care-pdf{display:inline-block;min-width:56px;padding:2px 6px;border-bottom:1px dotted currentColor;cursor:help}
.settings-staff-page .mt-freee-rates{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;font-size:12px;flex:1 1 auto;min-width:0}
.settings-staff-page .mt-freee .staff-toolbar .attendance-filters{flex:0 1 auto;flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:100%;margin-left:auto}
.settings-staff-page .mt-freee-month{display:flex;align-items:center;gap:6px;white-space:nowrap}
.settings-staff-page .mt-freee-month .month-label{font-size:12px}
.settings-staff-page .mt-freee-rates label{display:flex;align-items:center;gap:4px;margin:0;white-space:nowrap}
.settings-staff-page .mt-freee-rates input{width:64px;height:28px;min-height:0;padding:2px 6px;margin:0;font-size:12px}
@media(max-width:700px){.settings-staff-page .mt-freee-rates input{height:34px;font-size:16px}}
.settings-staff-page .mt-freee .staff-table input[data-k=economy],.settings-staff-page .mt-freee .staff-table input[data-k=care_rate]{width:50px}
.settings-staff-page .mt-freee .staff-table input{width:64px;min-height:0;height:26px;padding:2px 6px;margin:0;font-size:12px}
@media(min-width:701px) and (min-height:600px){
 .layout:has(.settings-staff-page){height:100vh;height:100dvh;min-height:0;overflow:auto}
 .layout:has(.settings-staff-page)>.main{display:flex;flex-direction:column;height:100%;min-height:0;align-self:stretch;padding-bottom:12px}
 .layout:has(.settings-staff-page) .topbar{flex-shrink:0;margin-bottom:12px}
 .layout:has(.settings-staff-page) .footnote{flex-shrink:0;margin-top:10px}
 .settings-staff-page{display:flex;flex-direction:column;flex:1}
 .settings-staff-page>.settings-tabs,.settings-staff-page>.intro{flex-shrink:0}
 .settings-staff-page .staff-list{display:flex;flex-direction:column;flex:1}
 .settings-staff-page .staff-toolbar{flex-shrink:0}
 .settings-staff-page .staff-table{flex:1 1 0;min-height:240px;max-height:none;overscroll-behavior:contain}
}
@media(max-width:700px){
 .settings-staff-page .staff-title{gap:4px 10px}
 .settings-staff-page .staff-title p{flex-basis:100%}
 .settings-staff-page .staff-list{padding:10px}
 .settings-staff-page .attendance-filters{flex-basis:100%;justify-content:flex-start;gap:8px}
 .settings-staff-page .attendance-filters label{flex:1 1 calc(50% - 8px);justify-content:space-between;font-size:11px}
 .settings-staff-page .attendance-filters select{width:55%;min-width:0;max-width:none;font-size:16px}
 .settings-staff-page .staff-table .small{min-height:36px;padding:6px 8px}
 .settings-staff-page .attendance-filters input[type=month]{font-size:16px}
 .settings-staff-page .mt-freee .staff-table input{height:34px;font-size:16px}
}
/* Keep daily attendance compact and its request actions reachable. */
.attendance-day-table{table-layout:fixed;min-width:1180px}
.attendance-day-table th,.attendance-day-table tbody td{padding-left:6px;padding-right:6px}
.attendance-day-table th:nth-child(1){width:100px}
.attendance-day-table th:nth-child(2){width:100px}
.attendance-day-table th:nth-child(3),.attendance-day-table th:nth-child(4),.attendance-day-table th:nth-child(5){width:48px}
.attendance-day-table th:nth-child(6),.attendance-day-table th:nth-child(7){width:76px}
.attendance-day-table th:nth-child(8){width:290px}
.attendance-day-table th:nth-child(9){width:82px}
.attendance-day-table th:nth-child(11){width:88px}
.attendance-day-table th:last-child{width:116px;right:0;z-index:4;background:var(--white)}
.attendance-day-table .day-cell{width:100%;max-width:100%;min-width:0}
.attendance-day-table tr>td.row-actions{position:sticky;right:0;z-index:1;background:var(--white);box-shadow:-4px 0 6px rgba(0,0,0,.08)}
.day-requests{display:grid;gap:8px;margin:6px 0 12px}.day-request{border:1px solid var(--line);border-radius:8px;padding:8px 10px;display:grid;gap:3px}.day-request-head{display:flex;align-items:center;gap:8px}.day-request-head button{margin-left:auto}
.attendance-day-table th:nth-child(1){width:140px}
.attendance-day-table td:first-child .day-cell{overflow:visible}
.attendance-day-table th:last-child{width:132px}
.attendance-day-table td.row-actions .day-cell{overflow:auto;justify-content:flex-start}
.attendance-day-table td.row-actions button,.attendance-day-table td.row-actions .act-slot{min-width:52px;box-sizing:border-box;text-align:center}
.attendance-day-table td.row-actions .act-slot{display:inline-block;visibility:hidden}
