:root{--bg:#f4f6fa;--panel:#fff;--ink:#172235;--muted:#657185;--line:#dfe5ed;--blue:#245a9e;--blue-hover:#16447b;--mint:#e9f5ef;--red:#a1222b;--shadow:0 3px 18px rgba(18,42,70,.045)}
*{box-sizing:border-box}body{font-family:system-ui,-apple-system,"Yu Gothic UI","Meiryo",sans-serif;margin:0;background:var(--bg);color:var(--ink);font-size:14px}button,input,select{font:inherit}button{cursor:pointer}.muted{color:var(--muted)}.small{font-size:11px}.topbar{background:#fff;border-bottom:1px solid var(--line)}.topbar-inner{max-width:1450px;padding:14px 28px;margin:auto;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;align-items:center;gap:12px;font-weight:800;font-size:17px}.brand-mark{width:58px;height:58px;border-radius:16px;background:#245a9e;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:17px}.brand-mark.compact{width:38px;height:38px;font-size:12px;border-radius:10px}.app-label{background:#edf2f9;color:#526784;padding:5px 8px;border-radius:7px;font-weight:500;font-size:10px}.userbar{display:flex;align-items:center;gap:17px}.user-name{font-weight:700}.text-link,.link-button{color:var(--blue);font-size:13px;text-decoration:none}.link-button{border:0;background:none;padding:0}.text-link:hover,.link-button:hover{text-decoration:underline}.page{max-width:1450px;margin:28px auto;padding:0 28px 48px}.page-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:22px}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--blue);font-weight:800;margin:0 0 7px}.page-header h1{font-size:28px;letter-spacing:-.5px;margin:0 0 5px}.page-header p{margin:0}.save-indicator{font-size:12px;color:#237346;background:var(--mint);padding:10px 14px;border-radius:8px;white-space:nowrap}.save-indicator.has-unsaved{color:#8a5d0b;background:#fff4d9}.date-strip{display:flex;align-items:center;gap:9px;background:#fff;padding:12px 16px;border-radius:12px;border:1px solid var(--line);margin-bottom:16px;box-shadow:var(--shadow)}.date-form{display:flex;align-items:center;gap:12px}.date-form label{font-size:12px;color:var(--muted)}input[type=date],input[type=number],input[type=text],input[type=password],input:not([type]){padding:9px 10px;border-radius:7px;border:1px solid #cbd5e1;background:#fff;min-width:0;color:#1f2937}input:focus,select:focus{outline:2px solid #a9c9e8;outline-offset:1px}.icon-button{background:#f1f5f9;border:1px solid #e2e8f0;color:#2b4969;text-decoration:none;font-size:24px;width:34px;height:35px;display:flex;justify-content:center;align-items:center;border-radius:8px}.button{padding:9px 14px;border-radius:8px;border:1px solid transparent;font-weight:700;text-decoration:none;white-space:nowrap}.button.primary{background:var(--blue);color:white}.button.primary:hover{background:var(--blue-hover)}.button.outlined{background:#fff;color:var(--blue);border-color:#cdd9e6}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:20px}.metric{padding:22px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}.metric-label{font-size:12px;color:var(--muted);font-weight:650}.metric strong{font-size:31px;letter-spacing:-.6px;display:block;margin-top:8px}.metric strong.good{color:#177341}.metric strong.over{color:var(--red)}.metric-helper{margin:5px 0 0;color:var(--muted);font-size:11px}.unit{font-size:14px;color:#526071;margin-left:4px;font-weight:500}.metric-input{display:flex;align-items:baseline;gap:4px;margin-top:8px}.metric-input input{width:95px;font-weight:800;font-size:26px;padding:2px 6px;border:0;border-bottom:1px solid #cbd5e1;border-radius:0}.metric-input .unit{font-size:14px}.panel{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);overflow:hidden}.panel-title{display:flex;align-items:center;justify-content:space-between;padding:20px 22px 18px;gap:16px}.panel-title h2{font-size:18px;margin:0 0 3px}.panel-title p{margin:0;font-size:12px}.table-scroll{overflow-x:auto}.entry-table{width:100%;min-width:980px;border-collapse:collapse;text-align:left}.entry-table th{background:#f7f9fc;color:#576478;font-size:11px;letter-spacing:.2px;font-weight:700;padding:12px 8px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.entry-table td{padding:9px 7px;border-bottom:1px solid #edf1f6;vertical-align:middle}.entry-table tr:last-child td{border-bottom:none}.entry-table td:first-child,.entry-table th:first-child{padding-left:19px}.entry-table select,.entry-table input{width:100%;font-size:12px;padding:10px 7px;border:1px solid #d7dee8;border-radius:7px;background:#fff;color:#27354a;min-height:37px}.entry-table select{cursor:pointer}.col-major{width:15%}.col-minor{width:24%}.col-details{width:23%}.col-minutes{width:10%}.col-note{width:18%}.col-state{width:120px}.col-delete{width:40px}.row-status{font-size:11px;color:#64748b;line-height:1.4;display:block;min-width:83px}.row-status.saved{color:#217549}.row-status.pending{color:#a46a17}.row-status.busy{color:var(--blue)}.row-status.error{color:var(--red);max-width:125px;overflow-wrap:anywhere}.delete-button{border:0;background:#fff;color:#8694a6;font-size:19px}.delete-button:hover{color:#bd333b}.empty-state{color:var(--muted);text-align:center;padding:25px}.panel-footer{display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:18px 22px;background:#fbfcfe;border-top:1px solid #e7edf5;color:#64748b;font-size:12px}.progress-track{height:8px;width:210px;border-radius:10px;background:#e2e8f0;overflow:hidden}.progress-fill{height:100%;background:#3275b4;border-radius:10px;transition:width .2s}.notice{max-width:920px;margin:22px 0;padding:17px 20px;border:1px solid #dae5ed;background:#eef5f9;border-radius:10px}.notice strong{font-size:13px}.notice p{margin:7px 0 0;color:#506476;line-height:1.7;font-size:12px}.input-error{outline:2px solid #ef4444!important}.login-screen{min-height:100vh;display:flex;justify-content:center;align-items:center;background:linear-gradient(145deg,#e9eef8,#f8fafc)}.login-card{width:min(420px,calc(100% - 32px));padding:35px;background:white;border-radius:16px;border:1px solid #e1e6ec;box-shadow:0 12px 35px rgba(20,38,60,.08)}.login-card .brand-mark{margin-bottom:21px}.login-card h1{font-size:24px;margin:0 0 7px}.login-card form{display:flex;flex-direction:column;margin-top:25px;gap:10px}.login-card label{font-weight:700;font-size:12px}.login-card input{margin-bottom:12px;width:100%;padding:12px}.button.full{width:100%;margin-top:6px}.fineprint{font-size:11px;color:#7b8799;margin-top:25px}.alert{background:#fff1f0;color:#a52c30;padding:12px;margin-top:12px;border-radius:8px}
@media(max-width:750px){.page{padding:0 12px 28px;margin-top:18px}.topbar-inner{padding:10px 12px}.userbar{gap:9px;flex-wrap:wrap;justify-content:flex-end}.user-name{display:none}.metrics{grid-template-columns:1fr;gap:9px}.metric{padding:14px}.metric strong{font-size:24px}.page-header h1{font-size:23px}.date-strip{flex-wrap:wrap}.today-link{margin-left:auto}.panel-title{padding:15px 14px}.panel-title h2{font-size:16px}.panel-title p{max-width:230px}.panel-footer{padding:14px}.progress-track{width:110px}}

/* v0.2 calendar/schedule widgets */
.workday-banner {display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;border:1px solid var(--border, #e2e8f0);border-radius:14px;background:#f8fafc;padding:16px 20px;margin:0 0 16px;}
.workday-summary strong {font-size:16px;color:#0f172a;}
.workday-summary p {margin:5px 0 0;}
.workday-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.workday-actions p {width:100%;margin:0 0 4px;}
.status-pill {font-size:11px;border-radius:999px;padding:4px 9px;background:#e2e8f0;color:#475569;}
.status-pill.pending {background:#fef3c7;color:#92400e;}
.warning-text {color:#9a3412!important;font-weight:600;}
button:disabled {opacity:.43;cursor:not-allowed!important;}
.calendar-grid {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;}
.calendar-cell {min-height:94px;border:1px solid #e2e8f0;border-radius:9px;background:#fff;padding:8px;position:relative;}
.calendar-cell.other-month {opacity:.35;}
.calendar-cell.off {background:#f1f5f9;}
.calendar-cell.changed {border:2px solid #2563eb;}
.calendar-cell.unknown {background:#fff7ed;}
.calendar-cell .day-num {font-weight:700;}
.calendar-cell .day-badge {font-size:11px;display:block;margin-top:5px;}
.calendar-cell .holiday-name {font-size:10px;color:#a16207;display:block;margin-top:4px;}
.calendar-cell .day-reason {font-size:10px;color:#64748b;line-height:1.3;display:block;margin-top:4px;}
.calendar-cell a {font-size:11px;display:inline-block;margin-top:5px;}
.calendar-head {text-align:center;font-weight:600;padding:6px;color:#475569;}
@media(max-width:650px){.calendar-grid{gap:2px}.calendar-cell{min-height:80px;padding:4px}.calendar-cell .day-reason{display:none}}

/* v0.2.1: employee-editable day-status select on scheduled workdays */
.workday-actions label {font-size:12px;font-weight:700;color:#475569;white-space:nowrap;}
.workday-actions select {font-size:13px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;min-width:180px;max-width:100%;color:#27354a;}
.workday-actions .muted {flex-basis:100%;font-size:11px;}
@media(max-width:650px){.workday-actions{width:100%}.workday-actions select{min-width:0;flex:1;}}

/* v0.3: personal calendar and manager dashboard */
.calendar-metrics,.manager-metrics{margin-top:14px}.manager-metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
.pad-panel{padding:20px 22px}.dashboard-section{margin-top:18px}.dash-title{display:flex;align-items:start;justify-content:space-between;margin:0 0 14px}.dash-title h2,.pad-panel h2{margin:0 0 5px;font-size:18px}.dash-title p{font-size:12px;margin:0}
.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:5px 0 17px;flex-wrap:wrap}.month-nav{display:flex;align-items:center;gap:15px}.month-nav strong{font-size:17px}
.calendar-legend{display:flex;align-items:center;gap:9px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin:0 0 13px}.legend-dot{width:10px;height:10px;display:inline-block;border-radius:3px;margin-left:8px}.legend-work{background:#bcd7e8}.legend-off{background:#e4e9f0}.legend-short{background:#f2cb7c}.legend-pending{background:#b19fe3}
.personal-grid{gap:5px}.personal-cell{min-height:138px;padding:9px 8px;overflow:visible}.personal-cell.entry-short{box-shadow:inset 0 0 0 2px #e3ad56}.personal-cell.entry-pending{border-color:#b19fe3}
.calendar-day-top{display:flex;justify-content:space-between;gap:3px;align-items:start}.calendar-date-link{color:var(--blue);font-weight:800;text-decoration:none;font-size:17px}.calendar-date-link:hover{text-decoration:underline}.day-status-text{font-size:12px;font-weight:700;margin:7px 0 2px}.day-minutes{font-size:12px;color:#334155;font-weight:700}.day-minutes.short-label{color:#9a5014}.tiny-tag{font-size:10px;border-radius:5px;padding:2px 4px;white-space:nowrap}.tiny-tag.pending{background:#ede9fe;color:#5b21b6}
.day-preview{margin-top:9px;position:relative}.day-preview summary{font-size:11px;cursor:pointer;color:var(--blue);white-space:nowrap}.day-preview-list{background:#fff;border:1px solid #cbd5e1;border-radius:8px;box-shadow:0 10px 25px rgba(0,0,0,.12);padding:10px;position:relative;z-index:2;min-width:200px;max-width:300px}.day-preview-line{border-bottom:1px solid #edf2f7;padding:5px 0;font-size:11px;display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap}.day-preview-line p{flex-basis:100%;margin:0;color:var(--muted);overflow-wrap:anywhere}.day-preview-line strong{font-weight:700}.day-preview-list>a{font-size:11px;color:var(--blue);display:block;margin-top:6px}.day-add{display:inline-block;margin-top:10px;color:var(--blue)}
.dashboard-table{border-collapse:collapse;width:100%;min-width:700px}.dashboard-table th{text-align:left;background:#f7f9fc;color:#576478;border-bottom:1px solid var(--line);font-size:12px;padding:12px 10px}.dashboard-table td{border-bottom:1px solid #edf1f6;padding:12px 10px;font-size:13px;vertical-align:middle}.dashboard-table tr:last-child td{border-bottom:0}.dashboard-table td form{margin:0}.dashboard-table td .button{font-size:12px;padding:8px 11px}.bad-number{color:var(--red);font-weight:800}.dashboard-links{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.flash-msg{padding:12px 15px;border-radius:8px;margin:9px 0;background:#edf2f8;color:#334155}.flash-success{background:#e8f5ec;color:#1c6637}.flash-error{background:#fff1f0;color:#9f222d}
@media(max-width:850px){.manager-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.personal-cell{min-height:120px;padding:5px}.day-status-text,.day-minutes{font-size:10px}.day-preview summary{font-size:10px}.pad-panel{padding:13px}.calendar-date-link{font-size:14px}}
@media(max-width:540px){.manager-metrics{grid-template-columns:1fr 1fr}.personal-grid{gap:2px}.personal-cell{min-height:100px}.day-preview-list{min-width:175px}.day-add{font-size:10px}}

.panel.pad-panel{overflow:visible}
