/* FYNIA calendar: local read-only view of entries and rules. */
.calendar-dashboard{padding:var(--space-5)}
.calendar-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:16px;align-items:start}
.calendar-main,.calendar-day-panel,.calendar-next-panel{min-width:0}
.calendar-sidebar{display:grid;gap:16px;min-width:0}
.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.calendar-toolbar h2{margin:0;font-size:var(--text-card)}
.calendar-controls{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.calendar-controls button{padding:8px 12px}.calendar-controls button.active{color:var(--green-700);border-color:var(--green-300);background:var(--green-50)}
.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.calendar-weekdays{color:var(--muted);font-size:12px;font-weight:700;text-align:center;margin-bottom:4px}
.calendar-days .calendar-day{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;width:100%;min-width:0;min-height:74px;padding:8px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-size:13px;font-weight:700;text-align:left}
.calendar-day.selected{border-color:var(--green-600);box-shadow:0 0 0 2px var(--green-100)}.calendar-day.today>span:first-child{color:var(--green-700)}
.calendar-dots{display:flex;gap:3px;max-width:100%;overflow:hidden}.calendar-dots i{display:block;width:6px;height:6px;flex:none;border-radius:50%;background:var(--red)}.calendar-dots i.income{background:var(--green-600)}.calendar-dots i.card{background:var(--blue)}
.calendar-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.calendar-totals>span{display:grid;gap:4px;min-width:0}.calendar-totals small{color:var(--muted);font-size:11px}.calendar-totals strong{font-size:clamp(15px,2vw,22px);line-height:1.15;overflow-wrap:anywhere}.calendar-totals strong.negative{color:var(--red)}.calendar-totals strong.positive{color:var(--green-700)}
.calendar-day-panel .calendar-totals{padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:12px}
.calendar-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;padding:12px 0;border-bottom:1px solid var(--line-2);min-width:0}.calendar-item:last-child{border-bottom:0}.calendar-item-main{display:flex;align-items:flex-start;gap:8px;min-width:0}.calendar-item-main>div{min-width:0}.calendar-item strong,.calendar-item small{display:block;overflow-wrap:anywhere}.calendar-item strong{font-size:13px}.calendar-item small{font-size:11px;color:var(--muted)}.calendar-item-icon{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:8px;background:var(--red-soft);color:var(--red)}.calendar-item.income .calendar-item-icon{background:var(--green-50);color:var(--green-700)}.calendar-item.card .calendar-item-icon{background:var(--blue-soft);color:var(--blue)}.calendar-item-icon svg{width:17px;height:17px}.calendar-item-amount{font-size:13px;white-space:nowrap}.calendar-item.income .calendar-item-amount{color:var(--green-700)}.calendar-item-actions{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}.calendar-item-actions button{font-size:11px;min-height:44px}
.calendar-list-day{border-bottom:1px solid var(--line);padding:12px 0}.calendar-list-day h3{margin:0 0 4px;font-size:13px}.calendar-list-day:first-of-type{padding-top:0}
@media(max-width:940px){.calendar-layout{grid-template-columns:1fr}.calendar-sidebar{grid-template-columns:1fr}}
@media(max-width:760px){.calendar-dashboard{padding:16px}.calendar-toolbar{flex-wrap:wrap}.calendar-controls{width:100%;justify-content:space-between}.calendar-weekdays,.calendar-days{gap:2px}.calendar-days .calendar-day{min-height:54px;padding:5px;min-width:0;border-radius:9px}.calendar-totals{gap:8px}.calendar-totals strong{font-size:16px}}
@media(max-width:370px){.calendar-controls{gap:2px}.calendar-controls button{padding:6px 8px}.calendar-totals{grid-template-columns:1fr 1fr}.calendar-totals>span:last-child{grid-column:1/-1}.calendar-days .calendar-day{min-height:48px}}
.calendar-item.credit .calendar-item-amount{color:var(--green-700)}
