:root{--ink:#1d2229;--muted:#647083;--line:#e4e7eb;--red:#d92d25;--paper:#fff;--surface:#f4f5f7;--blue:#247ed7;--purple:#854ed0;--orange:#f29a25;--green:#2eaa67}*{box-sizing:border-box}body{margin:0;background:var(--surface);font:14px/1.42 -apple-system,BlinkMacSystemFont,Segoe UI,Arial,sans-serif;color:var(--ink)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #82b7f3;outline-offset:2px}.app{min-height:100vh}.top{display:flex;align-items:center;justify-content:space-between;gap:22px;background:#fff;border-bottom:1px solid var(--line);padding:16px 24px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:20px;min-width:270px}.brand img{width:176px;height:auto;display:block;object-fit:contain}.brandline{height:46px;border-left:1px solid var(--line)}.brand h1{font-weight:780;font-size:21px;letter-spacing:-.6px;margin:0}.brand p{margin:2px 0 0;color:var(--muted);font-size:12px}.actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.btn{border:1px solid #d5dbe2;border-radius:8px;padding:10px 13px;background:#fff;color:#202932;font-weight:650;min-height:40px}.btn:hover{background:#f7f8fa}.btn.primary{background:var(--red);color:#fff;border-color:var(--red)}.btn.primary:hover{background:#b8241e}.btn.icon{font-size:21px;line-height:1;padding:7px 13px}.period{text-align:center;min-width:195px}.period strong{font-size:17px;display:block}.period small{color:var(--muted)}main{padding:22px 24px;max-width:1860px;margin:auto}.toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:15px}.legend{display:flex;gap:12px 19px;flex-wrap:wrap}.legend span{display:flex;align-items:center;gap:6px;font-size:12px;color:#4a5360}.dot{display:inline-block;width:11px;height:11px;border-radius:4px}.hint{font-size:12px;color:var(--muted);margin:0}.sample{display:flex;align-items:center;gap:10px;border:1px solid #e9d6ab;background:#fff9e8;padding:11px 14px;border-radius:9px;margin-bottom:14px;color:#755321;font-size:13px}.sample button{border:none;background:transparent;text-decoration:underline;color:#66430c;font-weight:700;white-space:nowrap}.frame{background:#fff;border:1px solid #dfe3e8;border-radius:12px;overflow:hidden;box-shadow:0 4px 16px #1c293610}.tableview{min-width:850px}.gridhead,.gridrow{display:grid;grid-template-columns:270px minmax(0,1fr)}.gridhead{background:#f7f8fa;border-bottom:2px solid #dfe3e8}.headproject{padding:16px 18px;font-weight:750;border-right:1px solid var(--line)}.days{display:grid;grid-template-columns:repeat(7,1fr)}.day{padding:11px 2px;text-align:center;border-right:1px solid var(--line);font-weight:700;min-height:60px}.day:last-child{border-right:none}.day small{display:block;color:var(--muted);font-weight:500;margin-top:2px}.day.weekend{background:#f1f3f5}.day.today{background:#fff2f1;color:#a7241c}.gridrow{border-bottom:1px solid var(--line);min-height:77px}.gridrow:last-child{border-bottom:0}.project{padding:14px 18px;display:flex;flex-direction:column;justify-content:center;gap:3px;border-right:1px solid var(--line);background:#fff}.project b{font-weight:760;font-size:14px;line-height:1.2}.project small{color:var(--muted);font-size:12px}.stagegrid{display:grid;grid-template-columns:repeat(7,1fr);position:relative;min-height:75px;background:#fff}.dcell{grid-row:1/-1;z-index:0;border-right:1px solid #e9ecf1;background:#fff}.dcell.weekend{background:#fafafb}.dcell.today{background:#fff8f8}.stagebar{z-index:2;align-self:center;text-align:left;display:flex;align-items:center;border:0;border-radius:6px;height:32px;white-space:nowrap;min-width:0;padding:0 10px;margin:4px 3px;overflow:hidden;text-overflow:ellipsis;color:#fff;font-weight:720;box-shadow:0 1px 3px #0000001c;transition:filter .13s,transform .13s;justify-content:flex-start}.stagebar:hover{filter:brightness(.92);transform:translateY(-1px)}.stagebar span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stagebar[data-phase=Betonointi]{background:var(--red)}.stagebar[data-phase=Raudoitus]{background:var(--purple)}.stagebar[data-phase=Valuvalmistelut]{background:var(--blue)}.stagebar[data-phase="Hionta ja sahaus"]{background:var(--orange);color:#272018}.stagebar[data-phase=Viimeistelyt]{background:var(--green)}.stagebar.preliminary{background-image:repeating-linear-gradient(125deg,transparent,transparent 10px,#ffffff2b 10px,#ffffff2b 15px)}.stagebar.selected{outline:3px solid #232c38;outline-offset:1px}.empty{padding:55px 20px;text-align:center;color:var(--muted)}.empty b{color:var(--ink)}.bottom{display:flex;justify-content:space-between;gap:16px;font-size:12px;color:var(--muted);margin-top:13px;flex-wrap:wrap}.veil{position:fixed;top:0;right:0;bottom:0;left:0;background:#14202d80;z-index:30;display:none}.veil.open{display:block}.drawer{position:fixed;top:0;right:0;height:100vh;width:min(490px,100%);z-index:31;background:#fff;box-shadow:-10px 0 35px #0002;transform:translate(105%);transition:transform .18s ease;display:flex;flex-direction:column}.drawer.open{transform:translate(0)}.drawhead{padding:22px 24px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.drawhead h2{font-size:22px;letter-spacing:-.5px;margin:0}.drawhead p{color:var(--muted);margin:5px 0 0}.close{border:none;background:transparent;font-size:27px;line-height:1;color:#586374;padding:0 5px}.drawbody{padding:23px 24px;overflow:auto;flex:1}.phasehero{padding:13px 15px;color:#fff;border-radius:9px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-weight:750;margin-bottom:22px}.phasehero[data-phase=Betonointi]{background:var(--red)}.phasehero[data-phase=Raudoitus]{background:var(--purple)}.phasehero[data-phase=Valuvalmistelut]{background:var(--blue)}.phasehero[data-phase="Hionta ja sahaus"]{background:var(--orange);color:#272018}.phasehero[data-phase=Viimeistelyt]{background:var(--green)}.details{display:grid;grid-template-columns:145px minmax(0,1fr);gap:14px 8px}.details dt{color:var(--muted)}.details dd{margin:0;overflow-wrap:anywhere;font-weight:560}.details .long{white-space:pre-wrap}.status{display:inline-block;background:#eef3f7;color:#334354;padding:4px 9px;border-radius:99px;font-size:12px;font-weight:700}.status.confirmed{background:#daf4e6;color:#14683f}.status.preliminary{background:#fff2d7;color:#825304}.status.progress{background:#e2ecff;color:#2457a8}.status.done{background:#e6e8eb;color:#4b535d}.drawfoot{display:flex;gap:10px;padding:18px 24px;border-top:1px solid var(--line)}.drawfoot .btn{flex:1}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.field{display:flex;flex-direction:column;gap:5px}.field.full{grid-column:1/-1}.field label{font-size:12px;font-weight:750;color:#435063}.field input,.field select,.field textarea{background:#fff;border:1px solid #cfd5dc;border-radius:7px;padding:10px 11px;min-width:0;width:100%;color:#242a31}.field textarea{resize:vertical;min-height:75px}.error{color:#ad2020;font-size:13px;padding-top:10px;min-height:20px}.delete{color:#a82020;border-color:#eccaca}.mobile-scroll{overflow-x:auto}.notice{font-size:12px;color:#7b5c31;background:#fff7eb;border-radius:8px;padding:10px 13px;margin-bottom:15px}.focusproject{outline:2px solid #d9e1e9;outline-offset:-2px}@media(max-width:1000px){.top{padding:12px 15px}.brand img{width:135px}.brand h1{font-size:17px}.brandline{height:33px}.gridhead,.gridrow{grid-template-columns:205px minmax(0,1fr)}.tableview{min-width:920px}main{padding:15px}}@media(max-width:600px){.brandline,.brand p{display:none}.brand{min-width:auto}.brand h1{font-size:15px}.brand img{width:130px}.top{gap:10px}.actions{gap:6px}.period{min-width:145px}.period strong{font-size:14px}.btn{padding:9px 10px;font-size:12px}.legend{gap:8px 12px}.gridhead,.gridrow{grid-template-columns:185px minmax(0,1fr)}.tableview{min-width:1040px}main{padding:12px}.details{grid-template-columns:120px minmax(0,1fr)}.drawbody,.drawhead,.drawfoot{padding-left:17px;padding-right:17px}.formgrid{gap:10px}}.connection{font-size:12px;color:#626c76;display:flex;gap:8px;align-items:center;white-space:nowrap}.connection .lamp{width:9px;height:9px;border-radius:50%;background:#f09a2c;display:inline-block}.connection.online .lamp{background:#31a968}.connection.error .lamp{background:#d92d25}.errorbanner{background:#fff1f0;border:1px solid #efbab6;color:#962a26;border-radius:8px;padding:10px 14px;margin-bottom:16px;display:none}.errorbanner.visible{display:block}.top .actions{margin-left:auto}@media(max-width:1000px){.top .connection{order:3;width:100%}}
