/* V406 personal calendar */
.pc-page{display:flex;flex-direction:column;gap:10px;min-height:0;height:calc(100vh - 142px)}
.pc-toolbar,.pc-filters{background:#fff;border:1px solid #e1e7f0;border-radius:14px;display:flex;align-items:center;justify-content:space-between;padding:9px 12px;flex:0 0 auto}
.pc-nav,.pc-actions,.pc-filters{display:flex;align-items:center;gap:8px}
.pc-nav h2{font-size:17px;margin:0 0 0 4px;min-width:245px;color:#1e2b3c}
.pc-arrow{border:0;background:#eef2f7;width:34px;height:34px;border-radius:9px;font-size:23px;cursor:pointer;color:#334155}
.pc-actions .seg-tabs{padding:3px;background:#eef2f7;border-radius:10px}
.pc-actions .seg-tabs button{height:30px;min-width:42px;padding:0 11px;border:0;background:transparent;border-radius:7px;font-weight:700;cursor:pointer}
.pc-actions .seg-tabs button.active{background:#fff;color:#315ed8;box-shadow:0 1px 4px rgba(35,55,90,.12)}
.pc-filters{justify-content:flex-start;min-height:40px;padding:6px 12px;font-size:12px;color:#66758a}
.pc-filters label{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.pc-filters input{width:15px;height:15px}
.pc-filters i{width:8px;height:8px;border-radius:50%}
.pc-filters i.holiday{background:#e05252}.pc-filters i.schedule{background:#3c6ff7}.pc-filters i.anniversary{background:#a855f7}.pc-filters i.reminder{background:#f59e0b}
.pc-lunar-tip{margin-left:auto;color:#8b97aa}
.pc-workspace{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:10px;min-height:0;flex:1}
.pc-calendar,.pc-upcoming{background:#fff;border:1px solid #e1e7f0;border-radius:14px;min-height:0;overflow:hidden}
.pc-calendar{display:flex;flex-direction:column}
.pc-week-head{display:grid;grid-template-columns:repeat(7,1fr);height:34px;border-bottom:1px solid #e6ebf2;background:#f6f8fb;flex:0 0 auto}
.pc-week-head b{display:flex;align-items:center;justify-content:center;font-size:12px;color:#657286;border-right:1px solid #e6ebf2}
.pc-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(6,minmax(88px,1fr));min-height:0;flex:1;overflow:auto}
.pc-day{min-width:0;border-right:1px solid #e7ebf1;border-bottom:1px solid #e7ebf1;padding:5px;background:#fff}
.pc-day.outside{background:#f8fafc;color:#a3acba}.pc-day.today{background:#f2f6ff;box-shadow:inset 0 0 0 1px #7698ff}
.pc-day-head{display:flex;align-items:center;justify-content:space-between;height:23px}
.pc-day-head b{font-size:13px}.pc-day.today .pc-day-head b{background:#3c6ff7;color:#fff;border-radius:50%;width:23px;height:23px;display:grid;place-items:center}
.pc-day-head span{font-size:10px;color:#8d98a8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pc-day-events{display:flex;flex-direction:column;gap:2px;margin-top:3px}
.pc-event{border:0;border-left:3px solid var(--event-color);background:color-mix(in srgb,var(--event-color) 10%,white);border-radius:4px;min-width:0;min-height:20px;padding:2px 5px;display:flex;align-items:center;gap:5px;text-align:left;cursor:pointer;color:#26364c}
.pc-event b{font-size:10px;line-height:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pc-event span,.pc-event small{font-size:10px;color:#748196;flex:0 0 auto}
.pc-event.completed{opacity:.55;text-decoration:line-through}.pc-holiday{--event-color:#e05252}.pc-anniversary{--event-color:#a855f7}.pc-reminder{--event-color:#f59e0b}
.pc-more-events{border:0;background:transparent;color:#5270a8;font-size:10px;text-align:left;cursor:pointer;padding:1px 5px}
.pc-week-grid{display:grid;grid-template-columns:repeat(7,minmax(135px,1fr));min-width:945px;min-height:100%;overflow:auto}
.pc-week-day{border-right:1px solid #e6ebf2;padding:8px;min-height:100%;background:#fff}.pc-week-day.today{background:#f2f6ff}
.pc-week-day-head{text-align:center;border-bottom:1px solid #e7ebf1;padding-bottom:7px;margin-bottom:8px;display:flex;flex-direction:column;gap:2px}
.pc-week-day-head span,.pc-week-day-head small{font-size:10px;color:#7a8798}.pc-week-day-head b{font-size:19px}
.pc-week-day>div{display:flex;flex-direction:column;gap:5px}
.pc-week-day .pc-event{min-height:32px;align-items:flex-start;flex-direction:column;padding:5px 6px}
.pc-day-agenda{height:100%;overflow:auto}.pc-day-agenda-head{height:82px;padding:14px 18px;border-bottom:1px solid #e5eaf1;display:flex;justify-content:space-between;align-items:center}
.pc-day-agenda-head div{display:flex;align-items:baseline;gap:10px}.pc-day-agenda-head b{font-size:32px}.pc-day-agenda-head span,.pc-day-agenda-head p{color:#718096}
.pc-agenda-list{padding:12px 18px}.pc-agenda-list article{display:grid;grid-template-columns:210px 1fr;gap:14px;align-items:center;padding:8px 0;border-bottom:1px solid #edf0f4}
.pc-agenda-list article .pc-event{min-height:38px}.pc-agenda-list article>div b{font-size:13px}.pc-agenda-list article>div p{margin:3px 0 0;color:#7b8797;font-size:11px}
.pc-upcoming{display:flex;flex-direction:column}.pc-upcoming-head{padding:12px;border-bottom:1px solid #e7ebf1}.pc-upcoming h3{font-size:14px;margin:0}.pc-upcoming-head span{display:block;color:#8490a2;font-size:10px;margin-top:3px}
#pcUpcoming{overflow:auto;padding:5px 8px}
#pcUpcoming>button{width:100%;border:0;background:transparent;display:grid;grid-template-columns:36px 7px 1fr;gap:7px;align-items:center;padding:8px 2px;border-bottom:1px solid #edf0f4;text-align:left;cursor:pointer}
#pcUpcoming time{font-size:10px;color:#69768a}#pcUpcoming i{width:7px;height:28px;border-radius:5px}#pcUpcoming span{min-width:0}#pcUpcoming b,#pcUpcoming small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#pcUpcoming b{font-size:11px}#pcUpcoming small{font-size:10px;color:#8591a2;margin-top:2px}
.pc-empty,.pc-empty-large{color:#9aa5b4;font-size:11px;text-align:center;padding:18px 5px}.pc-empty-large{padding:70px 20px}
.pc-event-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pc-event-form>label,.pc-lunar-fields label{display:flex;flex-direction:column;gap:5px;color:#627087;font-size:12px}
.pc-event-form .span2{grid-column:1/-1}.pc-event-form input,.pc-event-form select,.pc-event-form textarea{width:100%;height:38px}.pc-event-form textarea{height:72px;resize:vertical}
.pc-event-form label.check{flex-direction:row;align-items:center}.pc-event-form label.check input{width:16px;height:16px}
.pc-lunar-fields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;padding:10px;background:#fff8eb;border:1px solid #f3dfb8;border-radius:10px}
.pc-country-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.pc-country-grid label{display:grid;grid-template-columns:18px 1fr auto;gap:7px;align-items:center;border:1px solid #e2e7ef;border-radius:10px;padding:10px;cursor:pointer}.pc-country-grid input{width:16px;height:16px}.pc-country-grid b{font-size:12px}.pc-country-grid span{font-size:10px;color:#8b96a6}
.pc-modal-hint{margin:0;color:#738096;font-size:12px}
@media(max-width:1100px){.pc-workspace{grid-template-columns:1fr}.pc-upcoming{display:none}.pc-nav h2{min-width:170px}.pc-toolbar{align-items:flex-start}.pc-actions{flex-wrap:wrap;justify-content:flex-end}}

/* V408: isolate the calendar from global fixed header/scroll styles. */
body.personal-calendar-lock main{overflow:hidden!important}
body.personal-calendar-lock #content{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body.personal-calendar-lock #content>.workspace-bar{flex:0 0 auto}
body.personal-calendar-lock .pc-page{height:auto;flex:1 1 auto;min-height:0}
.pc-workspace.without-upcoming{grid-template-columns:minmax(0,1fr)}
.pc-workspace.without-upcoming .pc-upcoming{display:none}
.pc-week-head.with-week-number{grid-template-columns:52px repeat(7,minmax(0,1fr))}
.pc-month-grid.with-week-number{grid-template-columns:52px repeat(7,minmax(0,1fr))}
.pc-week-number-head{background:#eef2f8;color:#78869a!important}
.pc-week-number{display:flex;align-items:center;justify-content:center;border-right:1px solid #e1e7ef;border-bottom:1px solid #e7ebf1;background:#f7f9fc;color:#7a879a;font-size:11px;font-weight:700}
.pc-day.weekend:not(.outside){background:#fafbfe}
.pc-setting-card{background:#fff;border:1px solid #e1e7f0;border-radius:14px;padding:16px;min-height:0;overflow:auto}
.pc-setting-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid #edf0f4}
.pc-setting-toolbar h3{margin:0;font-size:16px}.pc-setting-toolbar p{margin:4px 0 0;color:#7b8797;font-size:12px}
.pc-setting-list{margin-top:12px;overflow:auto}.pc-setting-table{width:100%}
.pc-country-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;padding-top:14px}
.pc-country-card{border:1px solid #e1e7f0;border-radius:10px;padding:14px;display:flex;flex-direction:column;gap:4px}.pc-country-card span{color:#7b8797;font-size:12px}
.pc-display-settings{max-width:760px;display:flex;flex-direction:column;gap:0}
.pc-display-settings>label{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:15px 4px;border-bottom:1px solid #edf0f4}
.pc-display-settings>label span{display:flex;flex-direction:column;gap:3px}.pc-display-settings>label small{color:#7b8797}
.pc-display-settings>label select{width:180px}.pc-display-settings>label input[type=checkbox]{width:18px;height:18px}
.pc-setting-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:16px}

/* V409 calendar cleanup and alignment */
body.personal-calendar-lock .workspace-bar .query-default-actions,
body.personal-calendar-lock .workspace-bar .query-default-state{display:none!important}
.pc-setting-toolbar{padding-left:12px;padding-right:12px}
.pc-setting-table th,.pc-setting-table td{padding-left:12px!important;text-align:left}
.pc-setting-table th:last-child,.pc-setting-table td:last-child{text-align:right}
