:root{font:16px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#172e25;background:#f0f4f1;--muted:#526a60;--line:#dbe5df;--dark:#162720;--accent:#116344}
*{box-sizing:border-box}
body{margin:0}
button,input,select,textarea{font:inherit}
button,select{cursor:pointer}
button,.button{min-height:40px;padding:.5rem .85rem;border:1px solid var(--line);border-radius:9px;color:#20382d;background:#fff;font-weight:650;text-decoration:none}
button:hover{filter:brightness(.96)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #39a67f;outline-offset:2px}
.primary{background:var(--accent);color:white;border-color:var(--accent)}
.danger{color:#a32727}
.shell{display:grid;grid-template-columns:236px minmax(0,1fr);min-height:100dvh}
.sidebar{position:sticky;top:0;align-self:start;height:100dvh;display:flex;flex-direction:column;gap:1.5rem;background:var(--dark);padding:1.45rem;color:#fff}
.brand{display:flex;align-items:center;gap:.65rem;font-size:1.25rem;font-weight:800;letter-spacing:-.03em}
.mark{display:grid;place-items:center;width:2rem;height:2rem;border-radius:9px;background:#bcead2;color:#163b2c;font-weight:900}
nav{display:grid;gap:.4rem}
.sidebar button{background:transparent;border-color:transparent;color:#d0e2d7;text-align:left}
.sidebar button[aria-current="page"]{background:#29453a;color:#fff}
.account{margin-top:auto;border-top:1px solid #385348;padding-top:1rem;overflow-wrap:anywhere}
.account span{display:block;color:#b6cfc0;font-size:.85rem}
.main{width:min(100%,1320px);padding:clamp(1rem,3vw,2.8rem);margin-inline:auto}
.top,.toolbar,.actions,.row,.month-head{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}
.top,.month-head,.row{justify-content:space-between}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(1.65rem,4vw,2.55rem);line-height:1.16;letter-spacing:-.045em}
h2{font-size:1.4rem;line-height:1.2}
h3{font-size:1rem}
.muted,small{color:var(--muted)}
.toolbar{margin:1.25rem 0 0;padding:1rem 0;border-bottom:1px solid var(--line)}
.toolbar select{min-height:40px;padding:.35rem .55rem;color:inherit;border:1px solid var(--line);border-radius:9px;background:white;max-width:100%}
.legend{display:flex;gap:.8rem;flex-wrap:wrap;color:var(--muted);font-size:.875rem;margin-block:.8rem}
.legend span::before{content:"";display:inline-block;width:.65rem;height:.65rem;border-radius:3px;background:var(--chip);margin-right:.35rem}
.airbnb{--chip:#fae0db;--ink:#762e25}
.vrbo{--chip:#dfe8ff;--ink:#304a92}
.direct{--chip:#bdebd6;--ink:#164f39}
.private{--chip:#e3e9e6;--ink:#32443b}
.weekday,.week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.calendar-header{position:sticky;top:0;z-index:3;padding-top:.7rem;background:#f0f4f1;border-bottom:1px solid var(--line)}
.weekday{padding:.6rem 0;text-align:center;color:var(--muted);font-size:.875rem}
.month{margin:.85rem 0 2rem;scroll-margin-top:calc(var(--calendar-header-height, 0px) + .75rem)}
.month-head{padding:0 0 .7rem}
.week{position:relative;grid-template-rows:32px repeat(var(--lanes),28px);min-height:76px;margin-bottom:3px}
.day{grid-row:1/-1;min-width:0;border:1px solid #dce7e0;background:#fff;border-radius:8px;padding:.3rem .5rem;text-align:left;font-size:.9rem;font-weight:600;color:#20382d}
.day.today{background:#e6f7ec;border-color:#81be9c}
.day.empty{visibility:hidden}
.bar{grid-column:var(--start)/span var(--span);grid-row:var(--lane);position:relative;z-index:1;margin:0 2px;min-width:0;min-height:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;padding:0 .35rem;border:0;border-radius:5px;background:var(--chip);color:var(--ink);font-size:.8rem;line-height:26px}
.bar.pending{border:1px dashed #297452}
.cards{display:grid;gap:1rem;margin-top:1.25rem}
.card,.empty-state,.auth{padding:1.2rem;background:#fff;border:1px solid var(--line);border-radius:14px}
.empty-state{margin-top:1.25rem}
.card p,.empty-state p,.auth p{margin:.4rem 0 .85rem}
.badge{border-radius:6px;background:#e3f0e9;color:#22513d;padding:.15rem .5rem;font-size:.85rem}
.stack,form{display:grid;gap:.85rem}
label{display:grid;gap:.25rem;font-weight:650;font-size:.925rem}
input,textarea,form select{width:100%;color:#172e25;border:1px solid #c8d8cf;background:#fff;border-radius:8px;padding:.55rem .65rem;font-size:1rem}
.auth{width:min(460px,calc(100% - 2rem));margin:10dvh auto}
.auth .brand{margin:0 0 1.3rem}
.auth .actions{margin-top:1rem}
dialog{width:min(530px,calc(100% - 1.5rem));max-height:calc(100dvh - 2rem);border:1px solid var(--line);border-radius:16px;padding:1.25rem;color:inherit}
dialog::backdrop{background:#16272078}
dialog form{margin-top:1rem}
.error{color:#9b2929;font-weight:650}
#toast{position:fixed;bottom:1rem;right:1rem;max-width:calc(100vw - 2rem);padding:.65rem 1rem;background:var(--dark);color:white;border-radius:9px;z-index:5}
.loading{padding:2rem}
.control-pair{display:grid;grid-template-columns:1fr 1fr;gap:.65rem}
@media(max-width:700px){
  .shell{display:block}.sidebar{position:static;height:auto;padding:.7rem 1rem;gap:.55rem}
  .sidebar nav{display:flex;flex-wrap:wrap}.sidebar nav button{padding:.25rem .5rem}
  .sidebar .account{display:flex;align-items:center;justify-content:space-between;margin:0;padding:0;border:0}
  .account span{display:none}.main{padding:.85rem}
  .calendar-header{padding-top:.45rem}
  .calendar-header .top{gap:.4rem .65rem}
  .calendar-header .top p{font-size:.875rem}
  .calendar-header .toolbar{gap:.45rem;margin-top:.55rem;padding:.45rem 0}
  .calendar-header .legend{gap:.3rem .65rem;margin:.45rem 0}
  .calendar-header .weekday{padding:.35rem 0}
  .day{padding:.25rem .32rem}.bar{font-size:.72rem;padding:0 .2rem}.week{min-height:63px}
}
