.history-nav{position:relative}
.history-nav summary{display:flex;align-items:center;min-height:42px;padding:8px 11px;color:#d9f0ff;font-size:11px;font-weight:800;cursor:pointer}
.history-nav summary::after{content:"▾";margin-left:7px}
.history-nav-links{position:absolute;top:100%;left:0;z-index:5;min-width:125px;padding:5px;background:#083560;border-radius:10px;box-shadow:0 8px 20px #001b4055}
.schedule-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.schedule-navigation>.schedule-arrows{display:flex;gap:6px}
.schedule-calendar{position:relative;display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 32px)/3);gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.schedule-calendar::-webkit-scrollbar{display:none}
.schedule-month{scroll-snap-align:start}
.schedule-day-off .schedule-date,.schedule-holiday-name{color:#8e1726}
.schedule-holiday-name{display:block;font-size:9px;overflow-wrap:anywhere;padding:0 2px 3px}
@media(max-width:960px){.schedule-calendar{grid-auto-columns:calc((100% - 16px)/2)}}
@media(max-width:620px){.schedule-calendar{grid-auto-columns:100%}}
.schedule-month{min-width:0;padding:16px}
.schedule-month h2{margin:0 0 12px;font-size:16px}
.schedule-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center}
.schedule-weekday{font-size:11px;color:#45617b;padding:4px 0}
.schedule-day{--date-hover-color:rgba(23,107,162,.24);min-width:0;min-height:48px;border-radius:7px;background:#eef5fb}
.schedule-date{display:block;width:100%;min-height:33px;border:0;border-radius:7px;background:transparent;color:#123f63;font-weight:700;cursor:pointer}
.schedule-day.schedule-saturday{background:rgba(23,107,162,.13)}
.schedule-day.schedule-day-off{--date-hover-color:rgba(184,36,54,.24);background:rgba(184,36,54,.16)}
.schedule-day:hover,.schedule-day:focus-within,.schedule-day.schedule-day-off:hover,.schedule-day.schedule-day-off:focus-within{background:var(--date-hover-color)}
.schedule-count{display:block;color:#123f63;font-size:9px;text-decoration:none}
.schedule-day.schedule-today{--date-hover-color:#123f63;background:#174f78}
.schedule-day.schedule-today:hover,.schedule-day.schedule-today:focus-within{background:var(--date-hover-color)}
.schedule-day.schedule-today.schedule-day-off,
.schedule-day.schedule-today.schedule-day-off:hover,
.schedule-day.schedule-today.schedule-day-off:focus-within{--date-hover-color:#b32235;background:var(--date-hover-color)}
.schedule-today .schedule-date,.schedule-today .schedule-holiday-name{color:#fff}
.schedule-completion[hidden]{display:none!important}
.schedule-completion input[type=checkbox]{width:auto;min-height:0;height:auto;margin-right:6px}
.service-date-filter{margin:12px}
.history-graph{padding:18px}
@media(max-width:1100px),(hover:none) and (pointer:coarse){
  .app-header .hamburger{display:grid}
  .app-header .main-nav{position:absolute;top:100%;left:12px;right:12px;display:none;grid-template-columns:minmax(0,1fr);max-height:75vh;overflow:auto;padding:12px;border-radius:0 0 14px 14px;background:#083560;text-align:left}
  .app-header .main-nav.open{display:grid}
  .app-header .main-nav a,.app-header .main-nav span{justify-content:flex-start}
  .history-nav-links{position:static;padding:0 0 0 14px;box-shadow:none}
}
.machine-expense-charts{display:grid;gap:16px}
.machine-expense-charts h2{margin:0;font-size:18px;overflow-wrap:anywhere}
.machine-chart-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.machine-chart{min-width:0;padding:14px;border:1px solid #dce7ee;border-radius:12px;background:#f7fbff}
.machine-chart h3{margin:0;font-size:15px}
.machine-chart p{margin:6px 0 10px}
.machine-chart strong{text-align:right}
@media(max-width:640px){.machine-chart-pair{grid-template-columns:minmax(0,1fr)}}

.machine-line-scroll{overflow-x:auto}
.machine-line{display:block;width:100%;height:auto;color:#48647a}
.machine-line text{font-size:10px;fill:currentColor}
.machine-line-grid{stroke:#d6e3ed}
.machine-line-series{fill:none;stroke:#176ba2;stroke-width:2}
.machine-line-point{fill:#176ba2;stroke:#fff;stroke-width:1.2}
.machine-type-chart .machine-line-series{stroke:#087b68}
.machine-type-chart .machine-line-point{fill:#087b68}
.machine-line-values{margin-top:8px;font-size:.88rem}
.machine-line-values summary{cursor:pointer;font-weight:700}
.machine-line-values ol{padding-left:1.5rem}
.machine-line-values li{padding:3px 0;overflow-wrap:anywhere}
.machine-line-values strong{margin-left:6px}

body.page-schedule{display:flex;flex-direction:column;height:100vh;height:100dvh;min-height:0;overflow:hidden}
.page-schedule .app-header{flex-shrink:0}
.schedule-page{display:flex;flex-direction:column;min-height:0;flex:1;padding:30px 0 clamp(4px,2vh,20px)}
.schedule-page .schedule-navigation{flex-shrink:0}
@media(max-width:560px){.schedule-page .schedule-navigation{flex-direction:row;align-items:flex-end}}
@media(max-height:480px){.schedule-page{padding-top:8px}.schedule-page .schedule-navigation{margin-bottom:6px}}
.schedule-page .schedule-calendar{flex:0 1 auto;min-height:0;grid-template-rows:minmax(0,1fr);overflow-y:hidden}
.schedule-page .schedule-month{display:flex;flex-direction:column;min-height:0;padding:clamp(3px,1vw,12px)}
.schedule-page .schedule-month h2{margin:0 0 clamp(2px,1vh,8px)}
.schedule-page .schedule-days{flex:1;min-height:0;grid-template-rows:auto repeat(6,minmax(0,1fr));gap:clamp(1px,.55vh,4px)}
.schedule-page .schedule-day{display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;min-height:0;overflow:hidden;cursor:pointer;padding:2px 4px;text-align:left}
.schedule-page .schedule-date{min-height:0;padding:0;line-height:1.2;text-align:left}
.schedule-page .schedule-day-labels{position:relative;bottom:10%;display:grid;justify-items:center;width:100%;min-width:0;margin-top:auto;text-align:center}
.schedule-page .schedule-holiday-name,.schedule-page .schedule-count{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0;line-height:1.15}
.schedule-page .schedule-count{max-width:100%;padding:1px 4px;border-radius:999px;background:var(--date-hover-color)}
.schedule-page .schedule-today .schedule-count{color:#fff;outline:1px solid #ffffff60}
.schedule-day-dialog{margin:auto;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);background:#fff}
.schedule-day-dialog header{align-items:center;background:#fff;color:#163a5b;border-bottom:1px solid #dce7ee;padding:16px}
.schedule-day-dialog header h2{margin:0;font-size:clamp(14px,3.5vw,20px)}
.schedule-day-dialog header>button{flex:0 0 32px;background:#edf5fb;color:#174f78}
.schedule-day-content{min-height:0;overflow-y:auto;overscroll-behavior-y:contain}
.schedule-day-content [data-schedule-empty]:not([hidden]){display:grid;place-items:center;min-height:86px}
.schedule-day-content p{text-align:center;margin:0}
.schedule-day-content ul{padding-left:24px;margin:0;overflow-wrap:anywhere}
.schedule-day-dialog footer{justify-content:space-between;flex-wrap:wrap;padding:12px 16px}
.schedule-day-dialog footer .secondary{background:#fff;color:#174f78;border:1px solid #174f78}
@media(max-height:390px){
  .schedule-page .schedule-weekday{padding:0}
  .schedule-page .schedule-date{font-size:11px}
  .schedule-page .schedule-holiday-name,.schedule-page .schedule-count{display:none}
}

.modal.schedule-day-dialog{width:min(511.2px,calc(100% - 30px));border-radius:22px;overflow:hidden}
.modal.schedule-day-dialog[open]{display:flex;flex-direction:column}
.schedule-day-dialog>header,.schedule-day-dialog>footer{flex-shrink:0}
.schedule-day-dialog header,.schedule-day-dialog footer{padding:16px 20px}
.schedule-day-dialog header h2{font-size:clamp(17px,3vw,25px)}
.schedule-day-dialog header>button{flex-basis:40px;height:40px}
.schedule-day-content{padding:12px clamp(12px,3vw,24px) 8px}
.schedule-day-content [data-schedule-list]{list-style:none;padding:0}
.schedule-day-content [data-schedule-list]>li{
  padding:20px clamp(14px,4vw,32px) 26px;
  border-left:8px solid #123f63;
  background:#ebebfb;
  color:#10151b;
}
.schedule-day-content [data-schedule-list]>li+li{margin-top:10px}
.schedule-day-content li h3{margin:0 0 6px;font-size:clamp(13.2px,2.4vw,20.4px);letter-spacing:.04em}
.schedule-day-content li p{text-align:left;font-size:clamp(8.4px,1.5vw,12px);line-height:1.3;letter-spacing:.035em}
