.personal-calendar {
  container: calendar / inline-size;
  font-size: 16px;
}
.calendar-head { align-items: center; flex-wrap: wrap; }
.personal-calendar .btn, .calendar-dialog .btn { min-height: 42px; font-size: 14px; }
.calendar-controls{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:21px;flex-wrap:wrap}.calendar-period{display:flex;align-items:center;gap:4px;max-width:100%}.calendar-period h2{font-size:20px;font-weight:600;min-width:174px;text-align:center;line-height:1.5}.calendar-period .icon-btn{width:42px;height:42px}.calendar-today{margin-left:12px}.calendar-modes{display:flex;background:var(--panel);border:1px solid var(--line);border-radius:10px;padding:4px;gap:4px}.calendar-modes button{font-size:14px;min-height:36px;padding:8px 17px;border-radius:7px;color:#94a5bf}.calendar-modes .selected{background:#29436c;color:#d5e5ff;box-shadow:inset 0 0 0 1px #4b84ff45}.calendar-modes button:hover{color:#e0eaff}
.calendar-filters{display:flex;align-items:center;gap:12px;margin-bottom:21px;flex-wrap:wrap}.calendar-filters .search-box{height:44px;max-width:370px;flex:1 1 240px;min-width:205px}.calendar-filters input[type=search]{font-size:14px}.calendar-done-toggle{font-size:14px;display:flex;align-items:center;gap:8px;color:#a4b3ca;cursor:pointer;min-height:40px}.calendar-done-toggle input{width:17px;height:17px;accent-color:#6c98fa}.calendar-timezone{font-size:13px;color:#a4b1c6;margin-left:auto;white-space:nowrap}
.calendar-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,26%);gap:16px;align-items:start}.calendar-surface{border:1px solid var(--line);background:var(--panel);border-radius:14px;overflow:hidden;min-width:0}.calendar-weekdays{display:grid;grid-template-columns:repeat(7,1fr);background:#191e2a;border-bottom:1px solid var(--line)}.calendar-weekdays span{padding:13px 12px;font-size:14px;font-weight:500;color:#a4b4cb}.calendar-weekdays span:nth-last-child(-n+2){color:#8b8fae}.calendar-week-row{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-week-row:not(:last-child){border-bottom:1px solid #293344}.calendar-day{position:relative;min-height:clamp(90px,10vh,104px);border-right:1px solid #293344;min-width:0;padding:6px 4px;cursor:pointer}.calendar-day:last-child{border-right:0}.calendar-day:hover{background:#23314a55}.calendar-day.other-month{background:#0f121a;color:#8292ac}.calendar-day.is-selected{background:#2337568c;box-shadow:inset 0 0 0 1px #5e82b7}.calendar-day-number{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;margin-bottom:6px;padding:0 3px;color:#bac9de;font-size:14px;min-height:28px}.calendar-day-number>span:first-child{display:grid;place-items:center;width:28px;height:28px;border-radius:8px}.calendar-day.other-month .calendar-day-number{color:#8c99ae}.calendar-day.is-today .calendar-day-number>span:first-child{background:#4f80ed;color:#fff;font-weight:600}.calendar-day-number:focus-visible{outline:2px solid #94b8ff;outline-offset:-1px;border-radius:6px}.calendar-cell-items{display:flex;flex-direction:column;gap:5px}.cal-chip{display:flex;align-items:center;gap:4px;width:100%;min-height:25px;text-align:left;padding:4px 6px;border-radius:5px;font-size:13px;line-height:1.4;background:#39315c;border-left:2px solid #ae8aed;color:#d0baff}.cal-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.cal-chip svg{width:13px;height:13px;flex-shrink:0}.cal-chip time{font-size:12px;flex-shrink:0;font-variant-numeric:tabular-nums}.cal-chip.task{background:#263e5b;border-color:#6a9fe7;color:#b5d2ff}.cal-chip.overdue{background:#55303c;border-color:#e78392;color:#f5b4bd}.cal-chip.done{background:#234438;border-color:#71bb96;color:#a0d9ba}.cal-chip.done>span{text-decoration:line-through}.cal-chip:hover{filter:brightness(1.18)}.calendar-more{font-size:12px;color:#9eb4d4;text-align:left;padding:2px 6px;min-height:24px}.calendar-mobile-marks{display:none}
.calendar-agenda{background:var(--panel);border:1px solid var(--line);border-radius:14px;min-width:0;overflow:hidden}.calendar-agenda-head{display:flex;justify-content:space-between;align-items:center;padding:21px 19px;border-bottom:1px solid #30394a}.calendar-agenda-head>div>span{text-transform:capitalize;font-size:13px;color:#8d9fb9}.calendar-agenda-head h3{font-size:21px;font-weight:600;margin-top:5px}.calendar-agenda-items{padding:9px}.calendar-agenda-item{display:flex;gap:11px;width:100%;min-width:0;text-align:left;padding:15px 10px;border-radius:9px}.calendar-agenda-item:hover{background:#27354a77}.calendar-item-symbol{width:31px;height:31px;background:#3c305c;color:#c5a6f4;border-radius:9px;display:grid;place-items:center;flex-shrink:0;margin-top:3px}.calendar-item-symbol svg{width:16px;height:16px}.calendar-agenda-item.task .calendar-item-symbol{background:#273f5b;color:#9cbef0}.calendar-agenda-item.overdue .calendar-item-symbol{background:#50303d;color:#f1a5b2}.calendar-agenda-item.done .calendar-item-symbol{background:#264939;color:#99dbb5}.calendar-item-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.calendar-item-time{font-size:14px;color:#b8a7d6;line-height:1.5}.calendar-agenda-item.task .calendar-item-time{color:#a4bfdf}.calendar-agenda-item.overdue .calendar-item-time{color:#f1a7b2}.calendar-agenda-item.done .calendar-item-time{color:#92c7a8}.calendar-item-copy strong{font-size:16px;font-weight:550;line-height:1.45;overflow-wrap:anywhere;color:#e0e9f8}.calendar-item-copy small{font-size:13px;color:#93a6c3;line-height:1.6;overflow-wrap:anywhere}.calendar-day-empty{padding:18px 12px;font-size:15px;line-height:1.55;color:#a9b7cb}
.calendar-week-view{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));min-height:405px}.calendar-week-day{min-width:0;border-right:1px solid #2a3548;padding-bottom:14px}.calendar-week-day:last-child{border:0}.calendar-week-label{display:flex;flex-direction:column;align-items:center;gap:5px;width:100%;padding:14px 6px 10px;border-bottom:1px solid #2b3547}.calendar-week-label>span{text-transform:capitalize;color:#94a7c4;font-size:14px}.calendar-week-label>strong{font-size:24px;font-weight:500;border-radius:10px;padding:3px 7px;color:#c5d5ee}.calendar-week-label>small{color:#9aaac2;font-size:13px;font-variant-numeric:tabular-nums}.calendar-week-day.is-selected{background:#24365466}.calendar-week-day.is-today .calendar-week-label>strong{background:#4b7de7;color:#fff}.calendar-week-items{display:flex;flex-direction:column;gap:7px;padding:10px 5px}.calendar-week-items .cal-chip{align-items:flex-start;flex-direction:column;padding:7px 5px;font-size:13px}.calendar-week-items .cal-chip>span{white-space:normal;overflow-wrap:anywhere}.calendar-week-items .cal-chip svg{display:none}.calendar-free{font-size:13px;color:#8e9cb4;text-align:center;margin-top:12px}
.calendar-list{border:1px solid #303b4e;border-radius:14px;background:var(--panel);padding:4px 22px}.calendar-list-day{display:grid;grid-template-columns:105px minmax(0,1fr);gap:18px;padding:12px 0}.calendar-list-day:not(:last-child){border-bottom:1px solid #2a3548}.calendar-list-date{padding:12px 6px;color:#b7c8e1}.calendar-list-date>strong{font-size:32px;font-weight:500;display:block;line-height:1.2}.calendar-list-date>span{font-size:14px;text-transform:capitalize;color:#adbbd1;display:block;margin-top:5px;line-height:1.6}.calendar-list-date.is-today>strong{color:#93b8ff}.calendar-list-items .calendar-agenda-item{padding:12px} .calendar-list-items .calendar-item-copy{display:grid;grid-template-columns:125px minmax(0,1fr);flex:1;column-gap:20px}.calendar-list-items .calendar-item-copy small{grid-column:2}.calendar-legend{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-top:20px;font-size:13px;color:#90a3c0;line-height:1.6}.calendar-legend>span{display:flex;align-items:center;gap:7px}.calendar-legend i{display:inline-block;width:9px;height:9px;border-radius:3px}.legend-event{background:#af88e3}.legend-task{background:#739fdf}.legend-overdue{background:#e28494}.legend-done{background:#82c6a1}.calendar-demo-note{font-size:13px;line-height:1.7;color:#889cb9;margin-top:12px}.calendar-loading{padding:100px 20px;text-align:center;font-size:16px;color:#93a7c5;border:1px solid #303b4e;border-radius:14px}.personal-calendar .empty-state{padding:60px 24px;border:1px dashed #38465e;border-radius:14px}.personal-calendar .empty-state p{font-size:14px}
.calendar-dialog form>fieldset{margin:0;padding:0;border:0;min-width:0}.calendar-dialog .field label,.calendar-dialog .field-label{font-size:14px}.calendar-dialog .field input,.calendar-dialog .field textarea{font-size:16px}.calendar-dialog .field textarea{min-height:85px}.calendar-dialog .form-actions{gap:8px;flex-wrap:wrap;margin-top:24px}.calendar-all-day{display:flex;align-items:center;gap:9px;min-height:40px;margin:0 0 12px;font-size:15px;color:#afc1dc}.calendar-all-day input,.calendar-people-list input{width:18px;height:18px;accent-color:#729cf6;flex-shrink:0}.calendar-date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px}.calendar-date-fields .field{min-width:0;margin-bottom:14px}.calendar-date-fields input{min-width:0}.calendar-date-fields input:disabled{opacity:.35}.calendar-form-note{color:#91a6c5;font-size:13px;line-height:1.6;margin:-2px 0 22px}.calendar-participants{border:1px solid #334158;border-radius:10px;margin-top:22px;padding:0 14px}.calendar-participants summary{display:flex;align-items:center;gap:8px;cursor:pointer;min-height:48px;font-size:14px;color:#b8c9e1}.calendar-participants summary>svg{width:18px;height:18px;flex-shrink:0}.calendar-participants summary>span{color:#7f98bc;font-size:13px}.calendar-participants summary:after{content:'+';margin-left:auto;font-size:20px}.calendar-participants[open] summary:after{content:'−'}.calendar-participants .help{font-size:13px;line-height:1.7}.calendar-people-list{max-height:210px;overflow-y:auto;padding:5px 0 10px}.calendar-people-list>label{display:flex;align-items:center;gap:10px;min-height:48px;cursor:pointer;font-size:14px}.calendar-people-list>label>span:last-child{overflow-wrap:anywhere;min-width:0}.calendar-form-error{color:#ffacb7;font-size:14px;line-height:1.7;margin-top:18px}.calendar-form-error:empty{display:none}.calendar-event-title{font-size:24px;font-weight:600;line-height:1.45;overflow-wrap:anywhere}.calendar-detail-when,.calendar-detail-location{display:flex;align-items:flex-start;gap:10px;color:#b5a2d7;line-height:1.7;font-size:15px;margin-top:18px}.calendar-readonly-note{margin:0 0 16px;color:var(--muted);font-size:14px}.calendar-detail-location{color:#a8bedc;overflow-wrap:anywhere}.calendar-detail-when svg,.calendar-detail-location svg{width:18px;height:18px;flex-shrink:0;margin-top:3px}.calendar-description{font-size:16px;color:#b5c6df;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:22px}.calendar-details-people{display:grid;grid-template-columns:95px minmax(0,1fr);gap:14px;font-size:14px;line-height:1.7;margin:25px 0;padding:20px 0;border-top:1px solid #2d3a50;border-bottom:1px solid #2d3a50}.calendar-details-people>span{color:#8fa4c2}.calendar-details-people>strong{color:#c2d3ec;font-weight:500;overflow-wrap:anywhere}.calendar-dialog .help{font-size:13px;line-height:1.7}
@media(max-width:1200px){.calendar-layout{grid-template-columns:minmax(0,1fr)}.calendar-agenda{width:100%}.calendar-agenda-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-day-empty{grid-column:1/-1}.calendar-week-view{min-height:300px}}
@container calendar (max-width:690px){
 .calendar-head{gap:10px}.calendar-head>.btn{min-height:44px;padding-inline:12px}.calendar-controls{gap:10px;margin-bottom:14px}.calendar-period{width:100%;gap:0}.calendar-period h2{font-size:18px;min-width:0;flex:1}.calendar-period .icon-btn{width:40px;min-width:40px;height:44px}.calendar-today{padding:8px 10px;margin-left:6px}.calendar-modes{width:100%}.calendar-modes button{flex:1;min-height:40px}.calendar-filters{gap:6px 10px;margin-bottom:14px}.calendar-filters .search-box{max-width:none;flex-basis:100%;height:46px}.calendar-filters input[type=search]{font-size:16px}.calendar-done-toggle{font-size:14px}.calendar-timezone{font-size:13px}.calendar-weekdays span{padding:12px 0;text-align:center}.calendar-day{min-height:53px;padding:5px 2px;cursor:pointer}.calendar-day-number{padding:0;justify-content:center;margin:0;min-height:32px;font-size:14px}.calendar-day-number>span:first-child{width:30px;height:30px}.calendar-cell-items{display:none}.calendar-mobile-marks{display:flex;align-items:center;justify-content:center;gap:3px;height:15px}.calendar-mobile-marks i{width:5px;height:5px;border-radius:2px;background:#b18ce6}.calendar-mobile-marks i.task{background:#7da9e9}.calendar-mobile-marks i.overdue{background:#ed899c}.calendar-mobile-marks i.done{background:#82c6a1}.calendar-agenda-items{display:block}.calendar-agenda-head{padding:17px 19px}.calendar-agenda-item{padding:15px 12px}.calendar-agenda-head h3{font-size:20px}.calendar-week-view{min-height:0}.calendar-week-day{padding-bottom:0}.calendar-week-items{display:none}.calendar-week-label{padding:10px 0;border-bottom:0}.calendar-week-label>span{font-size:13px}.calendar-week-label>strong{font-size:19px}.calendar-legend{gap:5px 13px;font-size:13px}.calendar-list{padding:0 10px}.calendar-list-day{grid-template-columns:55px minmax(0,1fr);gap:4px}.calendar-list-date{padding:16px 0 8px 3px}.calendar-list-date>strong{font-size:28px}.calendar-list-date>span{font-size:12px}.calendar-list-items .calendar-item-copy{display:flex;gap:7px}.calendar-list-items .calendar-agenda-item{padding:13px 6px}.calendar-list-items .calendar-item-symbol{width:27px;height:27px}.calendar-list-items .calendar-item-copy strong{font-size:16px}.calendar-demo-note{font-size:13px}
}

.calendar-done-toggle[hidden], .calendar-time-field[hidden] { display: none; }
.calendar-period h2 { font-variant-numeric: tabular-nums; }
.calendar-week-day .calendar-week-label:hover { background: #23334a66; }
.calendar-week-day.is-selected { box-shadow: inset 0 0 0 1px #5e82b7; }
.calendar-agenda-head .icon-btn { height: 42px; width: 42px; }
.calendar-list-items .calendar-agenda-item + .calendar-agenda-item { margin-top: 4px; }
.calendar-detail-when { font-variant-numeric: tabular-nums; }
@media (max-width: 800px) {
  .calendar-date-fields { column-gap: 10px; }
  .calendar-dialog .form-actions .btn { min-height: 44px; }
  .calendar-event-title { font-size: 21px; }
}
