:root{--bg:#f3f5f6;--ink:#202326;--muted:#70787d;--line:#dfe4e6;--cell:92px;--crew:220px;--row:58px;--green:#57bf64;--blue:#4f8fea;--purple:#9b6be8;--red:#e65353;--pink:#f28ab2;--yellow:#f2c94c;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#202326;background:#f3f5f6}*{box-sizing:border-box}html,body{margin:0;min-width:320px;min-height:100%;background:var(--bg)}button,input,select,textarea{font:inherit}.app-shell{min-height:100vh;padding-bottom:18px}.topbar{display:flex;min-height:74px;align-items:center;justify-content:space-between;gap:18px;padding:12px 22px;border-bottom:1px solid #e2e6e7;background:#fff}.brand,.top-actions,.profile,.toolbar,.date-nav,.legend{display:flex;align-items:center}.brand{gap:12px}.brand img{width:60px;height:46px;object-fit:contain;padding:4px;border:1px solid #d9e4e0;border-radius:12px;background:#fff;box-shadow:0 6px 18px #202e2918}.brand h1{margin:0;font-size:19px;font-weight:600;letter-spacing:-.02em}.brand p{margin:2px 0 0;color:#7c8489;font-size:13px}.top-actions{justify-content:flex-end;gap:9px}.button{display:inline-flex;min-height:38px;align-items:center;justify-content:center;padding:8px 13px;border:1px solid #d8dddf;border-radius:9px;background:#fff;color:#30363a;text-decoration:none;cursor:pointer}.button:hover{background:#f2f4f5}.button.primary{border-color:#202326;background:#202326;color:#fff}.button.primary:hover{background:#34383c}.button.danger{border-color:#efc3c3;background:#fff5f5;color:#b63232}.button.icon{width:38px;padding:0;font-size:25px;line-height:1}.profile{min-width:205px;gap:9px;margin-left:3px;padding:5px;border:1px solid #e1e5e6;border-radius:12px;background:#f8f9f9}.profile>span{display:flex;width:34px;height:34px;align-items:center;justify-content:center;border-radius:9px;background:#dff5e2;color:#245b2c;font-weight:700}.profile>div{display:flex;min-width:0;flex:1;flex-direction:column}.profile strong{overflow:hidden;font-size:13px;font-weight:550;text-overflow:ellipsis;white-space:nowrap}.profile small{color:#7b8388;font-size:11px}.profile form{margin:0}.profile form button{padding:5px;border:0;background:transparent;color:#777;font-size:12px;cursor:pointer}.toolbar{justify-content:space-between;gap:16px;padding:14px 22px 10px}.date-nav{gap:8px}.date-nav>span{margin-left:8px;color:#566066;font-size:13px}.date-nav select{height:38px;margin-left:4px;padding:0 28px 0 10px;border:1px solid #d8dddf;border-radius:9px;background:#fff}.legend{flex-wrap:wrap;justify-content:flex-end;gap:7px 14px;color:#646c71;font-size:12px}.legend span{display:flex;align-items:center;gap:6px;white-space:nowrap}.legend i{width:8px;height:8px;border-radius:50%}.standard{background:var(--green)}.nonstandard{background:var(--blue)}.penal{background:var(--purple)}.complaint{background:var(--red)}.day_off{background:var(--pink)}.extra_materials{background:var(--yellow)}.schedule-frame{margin:0 22px;overflow:hidden;border:1px solid #dce1e3;border-radius:15px;background:#fff;box-shadow:0 10px 30px #242b2f12}.schedule-scroll{max-height:calc(100vh - 158px);overflow:auto;overscroll-behavior:contain;scrollbar-color:#c5cbce #f4f5f5}.schedule-table{position:relative;min-height:180px}.loading{padding:50px;text-align:center;color:#778086}.schedule-header,.schedule-row{display:flex}.schedule-header{position:sticky;z-index:20;top:0;height:96px;border-bottom:1px solid #dfe3e4;background:#f8f9f9}.crew-header,.crew-name{position:sticky;left:0;width:var(--crew);flex:0 0 var(--crew);border-right:1px solid #dfe3e4}.crew-header{z-index:22;display:flex;align-items:center;justify-content:space-between;padding:0 18px;background:#202326;color:#fff;font-size:14px;font-weight:550}.crew-header small{padding:5px 8px;border-radius:7px;background:#34383b;color:#bdc3c6;font-size:11px}.timeline-header{height:96px;cursor:grab;touch-action:none}.timeline-header.panning{cursor:grabbing}.months-row{display:flex;height:32px;border-bottom:1px solid #dfe3e4;background:#eef1f2}.month-block{display:flex;flex:none;align-items:center;padding:0 13px;border-right:1px solid #cfd5d7;color:#4c555a;font-size:13px;text-transform:capitalize}.days-grid,.row-grid{display:grid}.days-grid{height:64px}.day-header{display:flex;flex-direction:column;align-items:center;justify-content:center;border-right:1px solid #e3e6e7;background:#f8f9f9}.day-header span{margin-bottom:2px;color:#8a9296;font-size:11px;text-transform:uppercase}.day-header strong{font-size:14px;font-weight:500}.day-header.weekend{background:#fff7f7}.day-header.weekend span,.day-header.weekend strong{color:#c75c5c}.day-header.today{box-shadow:inset 0 -3px 0 #65d672}.schedule-row{position:relative;height:var(--row);border-bottom:1px solid #e6e9ea}.schedule-row:last-child{border-bottom:0}.crew-name{z-index:8;display:flex;align-items:center;gap:10px;padding:0 16px;background:#fff;cursor:help}.crew-name em{color:#adb4b7;font-size:11px;font-style:normal}.crew-name strong{overflow:hidden;font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}.row-track{position:relative;height:var(--row);flex:none}.row-grid{height:100%}.schedule-cell{border:0;border-right:1px solid #eceeef;background:#fff;cursor:pointer}.schedule-cell:hover{background:#f1faf2}.schedule-cell.weekend{background:#fffafa}.schedule-cell.today{background:#f4fbf5}.orders-layer{position:absolute;inset:0;pointer-events:none}.order-bar{position:absolute;top:7px;height:44px;display:flex;align-items:center;overflow:hidden;border:1px solid #ffffff88;border-radius:7px;color:#fff;box-shadow:0 2px 5px #2023261c;pointer-events:auto;touch-action:none;user-select:none;cursor:grab}.order-bar[data-status="standard"]{background:var(--green)}.order-bar[data-status="nonstandard"]{background:var(--blue)}.order-bar[data-status="penal"]{background:var(--purple)}.order-bar[data-status="complaint"]{background:var(--red)}.order-bar[data-status="day_off"]{background:var(--pink);color:#522239}.order-bar[data-status="extra_materials"]{background:var(--yellow);color:#493b05}.order-bar.busy{background:repeating-linear-gradient(135deg,#cfd4d6,#cfd4d6 7px,#dde1e2 7px,#dde1e2 14px);color:#7a8185;filter:blur(.45px);cursor:not-allowed}.order-bar.dragging{z-index:50;opacity:.88;box-shadow:0 10px 26px #20232638}.order-bar.invalid{outline:3px solid #c72d2d}.order-content{min-width:0;flex:1;padding:0 12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.order-content strong{font-weight:600}.resize-handle{width:9px;height:100%;flex:none;cursor:ew-resize;background:#ffffff25}.floating-card{position:fixed;z-index:100;max-width:330px;padding:12px 14px;border:1px solid #cfe0d9;border-radius:11px;background:#f2fbf7;color:#274038;box-shadow:0 12px 32px #23382f2b;font-size:13px;line-height:1.45;pointer-events:none}.floating-card strong{display:block;margin-bottom:4px;color:#1f312b}.floating-card dl{display:grid;grid-template-columns:auto 1fr;gap:3px 10px;margin:0}.floating-card dt{color:#728078}.floating-card dd{margin:0}.toast-stack{position:fixed;z-index:200;right:18px;bottom:18px;display:grid;gap:8px}.toast{max-width:340px;padding:11px 14px;border:1px solid #cddbd5;border-radius:10px;background:#f2fbf7;color:#263b34;box-shadow:0 10px 30px #20232620;font-size:13px}.toast.error{border-color:#e6c1c1;background:#fff3f3;color:#8d2e2e}.modal{width:min(720px,calc(100vw - 28px));max-height:90vh;padding:0;border:1px solid #d8e2de;border-radius:15px;background:#f8fcfa;color:#202326;box-shadow:0 24px 70px #18221e55}.modal::backdrop{background:#1a211f66;backdrop-filter:blur(3px)}.modal>form,.modal>div{display:flex;max-height:90vh;flex-direction:column}.modal header{display:flex;align-items:flex-start;justify-content:space-between;padding:20px 22px 14px;border-bottom:1px solid #dfe9e4}.modal h2{margin:0;font-size:20px;font-weight:600}.modal header p{margin:4px 0 0;color:#718078;font-size:13px}.close{width:34px;height:34px;border:0;border-radius:8px;background:#e9f2ee;color:#52635c;font-size:24px;cursor:pointer}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:20px 22px;overflow:auto}.form-grid label,.compact-form label,.auth-card label{display:grid;gap:6px;color:#53615b;font-size:13px}.form-grid .wide{grid-column:1/-1}input,select,textarea{width:100%;min-height:39px;padding:8px 10px;border:1px solid #ccd7d2;border-radius:8px;background:#fff;color:#202326;outline:none}textarea{resize:vertical}input:focus,select:focus,textarea:focus{border-color:#67bd76;box-shadow:0 0 0 3px #65d67222}.modal footer{display:flex;align-items:center;gap:10px;padding:14px 22px;border-top:1px solid #dfe9e4}.modal footer span{flex:1}.form-error,.form-success{margin:0 22px 12px;padding:10px 12px;border-radius:8px;background:#fff0f0;color:#9f3131;font-size:13px}.form-success{margin:10px 0;background:#ebf8ee;color:#286033}.admin-modal{width:min(900px,calc(100vw - 28px))}.tabs{display:flex;gap:4px;padding:12px 22px 0}.tabs button{padding:9px 14px;border:0;border-radius:8px;background:transparent;color:#66716b;cursor:pointer}.tabs button.active{background:#e5f3e9;color:#24532c}.compact-form{display:grid;grid-template-columns:1.1fr 1.3fr 1fr .8fr auto;align-items:end;gap:10px;padding:16px 22px}.crew-form{grid-template-columns:1fr 1fr 1fr 1.5fr auto}.settings-list{max-height:45vh;overflow:auto;border-top:1px solid #e1e8e5}.settings-item{display:grid;grid-template-columns:1.3fr 1.3fr .9fr auto;align-items:center;gap:12px;padding:12px 22px;border-bottom:1px solid #e8eeeb;background:#fff}.settings-item strong{font-size:13px;font-weight:550}.settings-item small{display:block;margin-top:2px;color:#818b86;font-size:11px}.settings-item .actions{display:flex;justify-content:flex-end;gap:7px}.settings-item .button{min-height:32px;padding:6px 9px;font-size:12px}.badge{display:inline-flex;width:max-content;padding:4px 7px;border-radius:999px;background:#eef1f2;color:#5f686c;font-size:11px}.badge.active{background:#e4f6e7;color:#286232}.invite-result{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;margin:0 22px 14px;padding:12px;border:1px solid #cce1d4;border-radius:10px;background:#effaf3}.invite-result strong{font-size:13px}.invite-result input{font-size:12px}.auth-page{display:grid;min-height:100vh;place-items:center;padding:20px;background:radial-gradient(circle at 50% 0,#e5f5e8,#f3f5f6 50%)}.auth-card{width:min(420px,100%);padding:30px;border:1px solid #d8e2de;border-radius:18px;background:#fff;box-shadow:0 20px 60px #202e2920}.auth-logo{display:block;width:86px;height:62px;margin:0 auto 18px;object-fit:contain}.auth-card h1{margin:0;text-align:center;font-size:24px}.auth-card>p{margin:8px 0 22px;color:#707a75;text-align:center}.auth-card form{display:grid;gap:14px}.auth-card .button{width:100%;margin-top:4px}.auth-card .form-error,.auth-card .form-success{margin:0 0 14px}.auth-card>a.button{display:flex;margin-top:18px}.empty-row .crew-name{color:#98a09c;font-style:italic}.empty-row .schedule-cell{background:#fbfcfc}.empty-row .schedule-cell:hover{background:#f1faf2}@media(max-width:1050px){.topbar{align-items:flex-start}.top-actions{flex-wrap:wrap}.legend{display:none}.toolbar{padding-top:10px}.profile{min-width:180px}}@media(max-width:760px){.topbar{padding:10px 12px}.brand p,.profile>div,.top-actions>.button:not(.primary){display:none}.profile{min-width:0;width:auto}.profile form button{font-size:0}.profile form button::after{content:'↪';font-size:18px}.toolbar{padding:10px 12px}.date-nav>span{display:none}.schedule-frame{margin:0 8px}.schedule-scroll{max-height:calc(100vh - 132px)}:root{--crew:150px;--cell:82px}.crew-header,.crew-name{padding:0 10px}.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}.compact-form,.crew-form{grid-template-columns:1fr 1fr}.compact-form .button{grid-column:1/-1}.settings-item{grid-template-columns:1fr}.settings-item .actions{justify-content:flex-start}.invite-result{grid-template-columns:1fr}.modal{max-height:96vh}.modal>form,.modal>div{max-height:96vh}}
