[hidden] { display: none !important; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.cal-side { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-bar h2 { margin-left: 10px; font-size: 18px; white-space: nowrap; }

.cal-filter { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 14px; }
.cal-filter input { width: auto; }
.cal-filter i { width: 9px; height: 9px; border-radius: 50%; }

.up-item, .ag-item { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; font: inherit; color: var(--text); background: none; border: 0; border-left: 3px solid var(--c); padding: 6px 10px; margin-bottom: 8px; cursor: pointer; border-radius: 0 6px 6px 0; }
.up-item:hover, .ag-item:hover { background: var(--surface-2); }
.up-item span { font-size: 12px; }

.m-head, .m-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.m-head div { font-size: 12px; color: var(--muted); padding: 0 8px 8px; }
.m-grid { border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.m-cell { min-height: 108px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.m-cell:hover { background: var(--surface-2); }
.m-cell.out { opacity: .45; }
.m-num { font-size: 12px; color: var(--muted); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.m-cell.today .m-num { background: var(--primary); color: var(--on-primary, #fff); font-weight: 600; }

.chip { display: block; width: 100%; text-align: left; border: 0; font: inherit; font-size: 12px; color: var(--text); padding: 2px 6px; border-radius: 4px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 2px solid var(--c); }
.chip i { font-style: normal; color: var(--muted); margin-right: 5px; }
.chip:hover { background: color-mix(in srgb, var(--c) 28%, transparent); }
.more { border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); text-align: left; cursor: pointer; padding: 0 6px; }
.more:hover { color: var(--text); }

.t-head, .t-allday, .t-body { display: grid; }
.t-head button { background: none; border: 0; font: inherit; color: var(--text); padding: 6px 0 10px; display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.t-head small { color: var(--muted); font-size: 12px; }
.t-head b { font-size: 18px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-weight: 500; }
.t-head .today b { background: var(--primary); color: var(--on-primary, #fff); }
.t-allday { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); min-height: 34px; }
.t-allday > div { padding: 4px; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--border); }
.t-allday > div:first-child { border-left: 0; font-size: 11px; align-self: center; }
.t-body { max-height: 620px; overflow-y: auto; }
.t-hours div { position: relative; }
.t-hours span { position: absolute; top: -8px; right: 8px; font-size: 11px; color: var(--muted); }
.t-hours div:first-child span { display: none; }
.t-col { position: relative; border-left: 1px solid var(--border); background-image: linear-gradient(var(--border) 1px, transparent 1px); background-size: 100% 48px; cursor: pointer; }
.block { position: absolute; left: 3px; right: 3px; display: flex; flex-direction: column; text-align: left; font: inherit; font-size: 12px; color: var(--text); border: 0; border-left: 3px solid var(--c); border-radius: 6px; padding: 3px 7px; overflow: hidden; cursor: pointer; background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.block span { color: var(--muted); font-size: 11px; }
.block:hover { background: color-mix(in srgb, var(--c) 30%, var(--surface)); }
.now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; }

.ag-day { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.ag-date { display: flex; flex-direction: column; }
.ag-date b { font-size: 24px; font-weight: 600; }
.ag-date span { font-size: 12px; color: var(--muted); }
.ag-date.today b { color: var(--primary); }
.ag-item { flex-direction: row; align-items: center; gap: 14px; }
.ag-time { width: 80px; font-size: 12px; color: var(--muted); flex: none; }
.ag-item .muted { flex: 1; font-size: 13px; }
.ag-amt { font-variant-numeric: tabular-nums; }
