:root{--ink:#302a24;--muted:#746c62;--paper:#f4f1ec;--surface:#fff;--edge:#ded8d0;--tab:#e9e4dc;--gold:#bf9442;--green:#294b3c;--blue:#375779;--pink:#f8e9eb;--warn:#9b4c50}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.48 Arial,Helvetica,sans-serif}
button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}a{color:var(--green)}a:hover{text-decoration:underline}
[hidden]{display:none!important}:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.shell{width:min(1490px,calc(100% - 28px));margin:15px auto 42px}
.header{background:#faf8f3;border-bottom:1px solid #e0dbd3;padding:11px 0}
.header-inner{width:min(1490px,calc(100% - 28px));margin:auto;display:flex;justify-content:space-between;gap:15px;align-items:center;flex-wrap:wrap}
.logo{font:23px Georgia,serif;letter-spacing:5px;color:var(--green)}.logo span{display:block;font:9px Arial,sans-serif;letter-spacing:2px;margin-top:5px}
.head-links{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.head-links a,.head-links button{border:1px solid #a8b4a9;border-radius:9px;padding:8px 12px;background:#fffaf5;text-decoration:none;color:var(--green);font-weight:650}
.topline{display:flex;gap:15px;align-items:center;justify-content:space-between;flex-wrap:wrap;font-size:12px;color:var(--muted);margin-bottom:13px}
.topline strong{color:var(--green)}.readonly{border:1px solid #cfdbcf;background:#ecf5ef;padding:5px 10px;color:var(--green);border-radius:30px;font-weight:700}
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.tabs a,.tabs button{display:inline-block;border:1px solid transparent;border-radius:9px;padding:10px 13px;min-height:40px;background:var(--tab);font-size:13px;font-weight:650;text-decoration:none;color:#171716}
.tabs [aria-current="page"]{background:var(--gold);border-color:#b58c41}.tabs a:hover,.tabs button:hover{background:#d8cdbb}.tabs .outlined{border:2px solid var(--gold);background:#f9f5ec}
.card{background:#fff;border:1px solid var(--edge);border-radius:13px;padding:16px;margin:12px 0;box-shadow:0 2px 6px #302a2408}
.toolbar{display:flex;gap:9px;align-items:end;flex-wrap:wrap;min-height:96px}
.toolbar label{font-size:11px;color:#554d45;font-weight:bold;display:block;margin-bottom:6px}
.toolbar .field input,.toolbar .field select{min-height:40px;border:1px solid #cfc7bd;border-radius:9px;padding:8px 11px;background:#fff;color:var(--ink)}
.toolbar .field{min-width:150px}.toolbar .field.date{min-width:145px}
.button{min-height:39px;border:1px solid #ddd4c9;border-radius:9px;background:#ede8df;color:#111;padding:10px 12px;font-size:13px;font-weight:650;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.button:hover{background:#e1d9ce;text-decoration:none}
.button.dark{background:#171817;color:#fff;border-color:#171817}
.button.outlined{border:2px solid var(--gold);background:#faf7f1}.button.outlined:hover{background:#f2ead9}
.meta{margin-left:auto;font-size:12px;color:#6a6155;padding:7px 0;white-space:nowrap}
.quick{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.quick h2{font-size:15px;margin:0 0 6px}.quick p{margin:0;font-size:12px;color:var(--muted)}
.grid-wrap{overflow:auto;max-height:635px;border:1px solid var(--edge);border-radius:10px;background:#fff;scrollbar-color:#c5bdaf transparent}
table.schedule{border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:880px;width:100%}
.schedule th,.schedule td{border-right:1px solid #d9d5cb;border-bottom:1px solid #d9d5cb;padding:7px 9px;vertical-align:top;text-align:left;font-size:12px}
.schedule th{position:sticky;top:0;z-index:3;background:#ecf1ed;font-size:13px;border-bottom:3px solid #b8cabe}
.schedule th:nth-child(even){background:#e6edf4;border-bottom-color:#b8c8d9;color:var(--blue)}
.schedule th:first-child{left:0;z-index:5;min-width:90px;width:90px;background:#ede9e3;color:var(--ink);border-bottom:3px solid #d7d0c5}
.schedule td:first-child{position:sticky;left:0;z-index:2;min-width:90px;width:90px;background:#f1eee9;font-weight:bold;color:#171717}
.schedule td.slot{height:53px;min-width:175px;background:#fbfbfb}
.schedule td.slot:nth-child(even){background:#f4f6fa}
.schedule td.slot.blocked{background:var(--pink)!important;color:#8d4b50}
.schedule td.slot.closed{background:#f4eded!important;color:#947777}
.schedule td.slot.occupied{background:#e7f1eb!important}
.schedule td.slot.occupied:nth-child(even){background:#e7ebf5!important}
.schedule td.slot.occupied.blocked{background:#f4dede!important}
.schedule .slot-note{font-size:11px;color:#94545b;display:block}
.schedule .item{border-left:3px solid var(--gold);border-radius:5px;background:#fffdfa;margin-bottom:4px;padding:5px 6px;font-size:11px;box-shadow:0 1px 5px #00000010;overflow-wrap:anywhere}
.schedule .item.finalized{border-left-color:#52917b;background:#edf7f0}
.schedule .item.cancelled{border-left-color:#aaa0a7;color:#857b7d;text-decoration:line-through;background:#f3f1f1}
.schedule .item strong,.schedule .item small{display:block}.schedule .item strong{font-size:11px}.schedule .item small{font-size:10px;color:#6e6463}
.schedule .item .collision{display:inline-block;background:#fff0cf;color:#956311;padding:1px 5px;border-radius:6px;margin-top:4px}
.grid-caption{font-size:11px;color:var(--muted);margin:7px 0 15px}
.section-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
h2{font-size:19px;margin:0 0 9px}.subtitle{font-size:12px;color:var(--muted)}
.extra{background:#f8f7f4;border:1px dashed #d6cbbc;border-radius:8px;padding:12px;color:#706b62;font-size:12px}
.summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.metric{border:1px solid var(--edge);border-radius:12px;padding:16px;background:#fff}
.metric span{font-size:12px;color:var(--muted)}.metric strong{display:block;font-size:30px;margin-top:6px;color:var(--green)}
.week-nav{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0}
.week-grid{display:grid;grid-template-columns:repeat(7,minmax(98px,1fr));gap:7px;overflow-x:auto}
.week-grid .day{border:1px solid var(--edge);background:#fff;border-radius:8px;padding:10px;text-align:left;min-height:95px}
.week-grid .day.selected{border:2px solid var(--gold);background:#fff7e9}.week-grid .day.today{outline:2px solid #d9e6d5}
.day .week-name,.day .count,.day .cancel{display:block;font-size:11px;color:var(--muted)}.day strong{display:block;font-size:21px;color:var(--green)}
.appointments{display:grid;gap:8px}.appt{border:1px solid var(--edge);border-left:4px solid #b78d42;border-radius:8px;padding:12px;display:grid;grid-template-columns:92px 1fr auto;gap:12px}
.appt.finalized{border-left-color:#5a9679}.appt.cancelled{border-left-color:#aaa0a7}.appt.matched{box-shadow:inset 0 0 0 1px #e5b353}
.time{font-weight:bold;color:#69533d}.time small{font-size:11px;display:block;color:var(--muted)}
.what{font-weight:700}.who{font-size:12px;color:var(--muted)}
.labels{display:flex;gap:5px;justify-content:flex-end;flex-wrap:wrap}
.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{background:#f2ede7;padding:4px 7px;border-radius:20px;font-size:11px}.chip.warn{background:#fff2cd;color:#8a5d1a}.chip.ok{background:#e8f4e8;color:var(--green)}
.muted{font-size:12px;color:var(--muted)}.note{font-size:12px;color:var(--muted);margin:0}
.failure,#notice.error{color:#963e40;background:#fff0f0;padding:13px;border-radius:10px}
#notice{font-size:12px;margin:11px 0;color:var(--green)}#notice:empty,#day-notice:empty{display:none}
#day-notice{font-size:12px;background:#fff3d9;padding:9px;border-radius:8px;margin:10px 0;color:#8c6519}
.loading{text-align:center;margin:50px;padding:50px;color:var(--muted)}
.period{display:flex;justify-content:space-between;align-items:center;gap:10px}
footer{font-size:11px;text-align:center;padding:25px;color:var(--muted)}
@media(max-width:920px){.header-inner{justify-content:center}.summary{grid-template-columns:repeat(2,1fr)}.meta{margin-left:0;width:100%}.week-grid{min-width:820px}}
@media(max-width:600px){.shell,.header-inner{width:calc(100% - 16px)}.toolbar{gap:7px}.toolbar .field.date{min-width:130px}.button{padding:9px 10px}.tabs{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px}.tabs a,.tabs button{white-space:nowrap}.card{padding:12px}.quick{align-items:flex-start}.summary{grid-template-columns:repeat(2,1fr)}.appt{grid-template-columns:65px 1fr}.appt .labels{grid-column:1/-1;justify-content:flex-start}.week-grid{min-width:790px}}
