/* Visual refinements scoped to Planning; existing layout and interactions remain. */
#page-planejamento .page-heading{position:relative;overflow:hidden;background:linear-gradient(115deg,#e2f5e9,#edf8f1 65%,#d5efdf);border-color:#9ecfb4;padding:25px 28px;border-radius:18px;box-shadow:0 5px 20px #156b4008}
#page-planejamento .page-heading:after{content:'';position:absolute;right:-24px;top:-80px;width:210px;height:210px;border:30px solid #a8dfbc50;border-radius:50%;pointer-events:none}
#page-planejamento .page-heading h1{color:#075e47;font-weight:850;font-size:clamp(25px,3vw,34px);position:relative;z-index:1}
#page-planejamento .panel{border-radius:18px;outline:none;box-shadow:0 5px 22px #14563f07}
#page-planejamento .plan-setup{border:1px solid #a5d5bf;border-top:5px solid #12a478;background:linear-gradient(135deg,#fff,#f3fbf6);padding:26px}
#page-planejamento .plan-setup .panel-head h2{font-size:22px;color:#075e47;font-weight:850}
#page-planejamento .catalog-pill{background:#e9e2ff;border-color:#cdb8ef;color:#7045ab;font-weight:800;padding:8px 12px}
#page-planejamento .plan-fields .field{background:#f4f8ff;padding:15px;border:1px solid #d9e6f9;border-radius:13px;min-width:0}
#page-planejamento .plan-fields .field:nth-child(2){background:#edfaf4;border-color:#c9eadb}
#page-planejamento .plan-fields .field:nth-child(3){background:#fff9e9;border-color:#f3e2b6}
#page-planejamento .plan-fields .field:nth-child(4){background:#fff0f5;border-color:#f1d0df}
#page-planejamento .plan-fields .field:nth-child(5){background:#f5f0ff;border-color:#ded0f2}
#page-planejamento .plan-fields .field label{font-size:13px;line-height:1.5;min-height:38px;color:#34566b}
#page-planejamento .plan-fields .field input,#page-planejamento .plan-fields .field select{width:100%;min-width:0;border-radius:10px}
#page-planejamento .availability-block{padding:20px;background:#f0faf5;border:1px solid #c5e5d3;border-radius:14px;margin-top:20px}
#page-planejamento .availability-title strong{font-size:16px;color:#156d4e}
#page-planejamento .weekday-grid{gap:10px;margin-top:13px}
#page-planejamento .weekday-grid span{height:46px;min-width:62px;border-color:#bbd9ca;color:#3d7660;background:#fff;border-radius:12px}
#page-planejamento .weekday-grid input:checked+span{color:#fff;background:linear-gradient(135deg,#10ac7d,#07855e);border-color:#07855e;box-shadow:0 4px 10px #15956e25}
#page-planejamento .priority-details{padding:17px 19px;background:#f5f1fc;border:1px solid #dfd0ef;border-radius:14px;margin-top:18px}
#page-planejamento .priority-details summary{color:#7146a0;font-size:15px}
#page-planejamento .priority-option{--area:#267cc3}
#page-planejamento .priority-option:nth-child(2){--area:#168d60}#page-planejamento .priority-option:nth-child(3){--area:#864ac0}#page-planejamento .priority-option:nth-child(4){--area:#d43e87}#page-planejamento .priority-option:nth-child(5){--area:#df7e1d}#page-planejamento .priority-option:nth-child(6){--area:#0d949e}
#page-planejamento .priority-option span{border-left:4px solid var(--area);color:var(--area);font-weight:700;background:#fff}
#page-planejamento .priority-option input:checked+span{background:color-mix(in srgb,var(--area) 12%,white);border-color:var(--area);color:var(--area)}
#page-planejamento #generatePlan{background:linear-gradient(135deg,#12aa7a,#087a55);border:1px solid #0c8b62;box-shadow:0 5px 13px #13896025;font-weight:800;padding:14px 22px;border-radius:12px}
#page-planejamento .plan-dashboard{gap:22px;margin-top:22px}
#page-planejamento .plan-stat-grid{gap:18px}
#page-planejamento .plan-stat{position:relative;border:1px solid #bad3f4;border-top:4px solid #408fe1;background:linear-gradient(130deg,#f3f8ff,#fff);border-radius:16px;padding:23px;color:#267ac4}
#page-planejamento .plan-stat:nth-child(2){border-color:#bcdcca;border-top-color:#0caa74;background:linear-gradient(130deg,#effaf4,#fff);color:#088258}
#page-planejamento .plan-stat:nth-child(3){border-color:#dcc9ee;border-top-color:#9864cd;background:linear-gradient(130deg,#f7f1ff,#fff);color:#8551ba}
#page-planejamento .plan-stat span{color:inherit;font-weight:750;font-size:14px}
#page-planejamento .plan-stat strong{color:inherit;font-weight:850;font-size:clamp(25px,2.5vw,34px);margin:12px 0 8px;overflow-wrap:anywhere}
#page-planejamento .phase-roadmap{gap:18px}
#page-planejamento .roadmap-step{padding:21px;border-radius:16px;border:1px solid #b6dfca;border-top:4px solid #1aac78;background:linear-gradient(135deg,#edf9f2,#fff)}
#page-planejamento .roadmap-step.post{border-color:#bad7f4;border-top-color:#458fda;background:linear-gradient(135deg,#edf5ff,#fff)}
#page-planejamento .roadmap-step.sprint{border-color:#f0d3a7;border-top-color:#ef9e2e;background:linear-gradient(135deg,#fff6e7,#fff)}
#page-planejamento .roadmap-dot{width:38px;height:38px;font-size:19px;border-radius:12px;background:#cbefdc;color:#078453}
#page-planejamento .roadmap-step.post .roadmap-dot{background:#d8eaff;color:#277ac5}#page-planejamento .roadmap-step.sprint .roadmap-dot{background:#ffe6b8;color:#bd7400}
#page-planejamento .roadmap-step h3{font-size:19px;color:#265348;margin:5px 0 7px}
#page-planejamento .roadmap-step small{color:#507d6b}
#page-planejamento .plan-progress-panel{background:linear-gradient(120deg,#f0faf4,#fff);border-color:#b5dfc8;padding:25px}
#page-planejamento .plan-progress-top h2{font-size:21px;color:#18583d}
#page-planejamento .plan-progress-top>strong{font-size:42px;font-weight:850;color:#079664}
#page-planejamento .plan-progress-track{height:14px;background:#dbebe2;margin:20px 0 12px}
#page-planejamento .plan-progress-track span{background:linear-gradient(90deg,#009564,#3fce98,#a0e9b7)}
#page-planejamento .weekly-panel{border-color:#c9dced;background:linear-gradient(145deg,#fff,#f7fbff);padding:25px}
#page-planejamento .week-heading h2{font-size:23px;color:#24658e}
#page-planejamento .week-control{background:#eaf3ff;border-color:#bcd4ef;color:#2776b8;border-radius:12px}
#page-planejamento .day-card{border-color:#d6e4ee;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 3px 10px #28536e05}
#page-planejamento .day-head{background:#edf5fe;border-bottom-color:#d8e5f2;color:#286691;padding:14px}
#page-planejamento .day-head strong{color:#286691}
#page-planejamento .day-card.today{border:2px solid #25ad7f;background:#f8fffb}
#page-planejamento .day-card.today .day-head{background:#daf3e6;color:#057948}
#page-planejamento .day-card.today .day-head strong{color:#057948}
#page-planejamento .day-card.rest{background:#f8f6fc;border-color:#e0d8eb}
#page-planejamento .day-card.rest .day-head{background:#f0eaf7;color:#7a6597}
#page-planejamento .theme-actions button{border-radius:9px;color:#157f62;background:#f3fbf6}
#page-planejamento .incidence-badge.alta{background:#ffe3e6;color:#bf3552}#page-planejamento .incidence-badge.média{background:#fff0c6;color:#9c6800}#page-planejamento .incidence-badge.baixa{background:#dcecff;color:#2466a5}
#page-planejamento button:focus-visible{outline:3px solid #569bdf;outline-offset:3px}
@media(max-width:760px){#page-planejamento .plan-setup,#page-planejamento .weekly-panel,#page-planejamento .plan-progress-panel{padding:20px}#page-planejamento .page-heading{padding:22px}#page-planejamento .plan-stat-grid,#page-planejamento .phase-roadmap{gap:14px}#page-planejamento .plan-fields .field{padding:12px}#page-planejamento .plan-stat strong{font-size:29px}}
@media(max-width:480px){#page-planejamento .plan-setup{padding:16px}#page-planejamento .plan-setup .panel-head{flex-wrap:wrap;gap:12px}#page-planejamento .plan-setup .panel-head h2{font-size:20px}#page-planejamento .plan-fields .field label{min-height:0}#page-planejamento .availability-block,#page-planejamento .priority-details{padding:15px}#page-planejamento .weekday-grid span{min-width:0}#page-planejamento .plan-progress-top>strong{font-size:34px}}
/* Weekly cards and full-month export share the existing plan records. */
#page-planejamento .week-list{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;align-items:start}
#page-planejamento .day-card{padding:0 8px 10px;min-width:0}
#page-planejamento .day-head{display:flex;flex-direction:column;gap:6px;margin:0 -8px 10px;padding:12px 8px;min-height:78px}
#page-planejamento .day-head strong{font-size:13px}
#page-planejamento .day-card progress{display:block;width:100%;height:6px;accent-color:#119970;margin-bottom:12px}
#page-planejamento .day-task{display:flex;flex-direction:column;align-items:stretch;padding:12px 9px;margin:10px 0;border:1px solid #c4dbf5;border-left:4px solid #368bda;border-radius:11px;background:#eef6ff;gap:12px;overflow-wrap:anywhere}
#page-planejamento .day-task[data-area="Pediatria"]{background:#fff6e4;border-color:#eed7a6;border-left-color:#e5a323}
#page-planejamento .day-task[data-area="Cirurgia"]{background:#fff0ed;border-color:#f1c5ba;border-left-color:#dc7255}
#page-planejamento .day-task[data-area="Ginecologia"],#page-planejamento .day-task[data-area="Obstetrícia"]{background:#f7efff;border-color:#dcc7f0;border-left-color:#9d68cb}
#page-planejamento .day-task[data-area="Preventiva"]{background:#eafaf6;border-color:#b9e1d7;border-left-color:#1d9d87}
#page-planejamento .day-task.done{background:#e9f8ed;border-color:#a5d8b5;border-left-color:#29935a}
#page-planejamento .theme-actions{justify-content:space-between;flex-wrap:wrap}
#page-planejamento .week-heading{flex-wrap:wrap;gap:15px}
#page-planejamento .week-controls{flex-wrap:wrap}
.plan-month-dialog{box-sizing:border-box;width:min(1400px,96vw);max-width:96vw;max-height:92dvh;overflow:auto;border:2px solid #abd6bf;border-radius:18px;padding:24px;color:#234339;background:#fff}
.plan-month-dialog::backdrop{background:#123c3277}
.month-toolbar,.month-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.month-toolbar h2{font-size:28px;color:#08734e;text-transform:capitalize;margin:8px 0}
.month-toolbar small{font-weight:800;color:#547d6a}
.month-help{font-size:13px;color:#597569}
.plan-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-top:18px}
.month-weekday{padding:10px;text-align:center;background:#dff2e7;border-radius:7px;color:#176649}
.month-day{min-width:0;min-height:120px;border:1px solid #d3e1dc;border-radius:8px;padding:8px;overflow-wrap:anywhere}
.month-outside{background:#f4f7f5;border-color:transparent}
.month-today{border:2px solid #199c6d}
.month-event{background:#eef5ff;border-left:3px solid #408cce;padding:7px;margin-top:7px;border-radius:5px;font-size:11px;line-height:1.4}
.month-event small{display:block;color:#506977;margin-top:4px}
.month-event.done{background:#e8f7ed;border-color:#28a265}
.month-free{display:block;color:#7b8d85;margin-top:12px;font-size:11px}
#planMonthSummary{font-weight:700;color:#11794e}
@media(max-width:1100px) and (min-width:761px){#page-planejamento .weekly-panel{padding:14px}#page-planejamento .theme-name{font-size:12px}#page-planejamento .theme-actions button{font-size:10px;padding:5px}}
@media(max-width:760px){#page-planejamento .week-list{grid-template-columns:1fr}#page-planejamento .day-head{min-height:0;flex-direction:row;align-items:center}#page-planejamento .day-task{padding:14px}.plan-month-dialog{padding:12px}.plan-month-grid{gap:3px}.month-day{padding:4px;min-height:90px}.month-event{font-size:9px;padding:3px;border-left-width:2px}.month-event small{display:none}.month-weekday{font-size:11px;padding:6px 0}.month-toolbar h2{font-size:23px}.month-actions .button{padding:9px;font-size:12px}.month-free{font-size:9px}.month-actions{width:100%}}
@media print{
@page{size:A4 landscape;margin:9mm}
body:has(#planMonthDialog[open]){height:auto!important;overflow:visible!important;background:white!important}
body:has(#planMonthDialog[open]) *{visibility:hidden!important}
body:has(#planMonthDialog[open]) #planMonthDialog,body:has(#planMonthDialog[open]) #planMonthDialog *{visibility:visible!important}
body:has(#planMonthDialog[open]) #planMonthDialog{position:absolute!important;inset:0!important;margin:0!important;width:100%!important;max-width:none!important;max-height:none!important;height:auto!important;overflow:visible!important;border:0!important;border-radius:0!important;padding:0!important;display:block!important}
#planMonthDialog .month-actions,#planMonthDialog .month-help{display:none!important}
#planMonthDialog .plan-month-grid{gap:4px}
#planMonthDialog .month-day{min-height:85px;break-inside:avoid;padding:5px}
#planMonthDialog .month-event{font-size:9px;break-inside:avoid;padding:4px;print-color-adjust:exact}
#planMonthDialog .month-weekday{print-color-adjust:exact}
#planMonthDialog .month-toolbar h2{font-size:22px}
}

.month-orientation-label{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:700}.month-orientation-label select{border:1px solid #abd6bf;border-radius:9px;padding:9px;color:#176649;background:white}
@media print{#planMonthDialog .month-orientation-label{display:none!important}}

/* Compact print layout, measured before printing so all calendar rows fit one sheet. */
.plan-month-dialog.plan-print-measure{width:var(--plan-paper-width)!important;max-width:none!important;max-height:none!important;height:auto!important;overflow:visible!important;padding:0!important;border:0!important;zoom:1!important}
#planMonthDialog.plan-print-measure .month-actions,#planMonthDialog.plan-print-measure .month-help{display:none!important}
#planMonthDialog.plan-print-measure .plan-month-grid{gap:3.6px;margin-top:8px}
#planMonthDialog.plan-print-measure .month-day{min-height:0;padding:4px;border-radius:4px}
#planMonthDialog.plan-print-measure .month-event{font-size:10.8px;line-height:1.3;padding:3.6px;margin-top:3.6px;border-radius:3px}
#planMonthDialog.plan-print-measure .month-event small{display:block;font-size:9.6px;margin-top:2px}
#planMonthDialog.plan-print-measure .month-toolbar h2{font-size:24px;margin:4px 0}
#planMonthDialog.plan-print-measure .month-toolbar small{font-size:12px}
#planMonthDialog.plan-print-measure .month-weekday{padding:4px;font-size:12px}
#planMonthDialog.plan-print-measure #planMonthSummary{margin:6px 0;font-size:12px}
@media print{
#planMonthDialog .plan-month-grid{gap:3.6px!important;margin-top:8px!important}
#planMonthDialog .month-day{min-height:0!important;padding:4px!important;border-radius:4px!important}
#planMonthDialog .month-event{font-size:10.8px!important;line-height:1.3!important;padding:3.6px!important;margin-top:3.6px!important;border-radius:3px!important}
#planMonthDialog .month-event small{display:block!important;font-size:9.6px!important;margin-top:2px!important}
#planMonthDialog .month-toolbar h2{font-size:24px!important;margin:4px 0!important}
#planMonthDialog .month-toolbar small{font-size:12px!important}
#planMonthDialog .month-weekday{padding:4px!important;font-size:12px!important}
#planMonthDialog #planMonthSummary{margin:6px 0!important;font-size:12px!important}
}

#page-planejamento .week-heading h2{font-size:clamp(25px,2.4vw,32px);font-weight:850;color:#075e47;line-height:1.25}
#page-planejamento .week-heading .week-date-range{font-size:17px;font-weight:750;color:#365f54;margin-top:9px}
#page-planejamento .week-control{width:48px;height:48px;background:#087b58;border:2px solid #056344;color:white;font-size:34px;font-weight:800;box-shadow:0 4px 10px #087b582a;display:inline-flex;align-items:center;justify-content:center}
#page-planejamento .week-control:hover:not(:disabled){background:#055f43;box-shadow:0 5px 14px #087b5840}
#page-planejamento .week-control:disabled{background:#e5ece8;border-color:#cfdcd5;color:#93a79c;box-shadow:none;opacity:1}

/* Monthly reference: continuous cells and compact activity strips. */
#planMonthDialog .plan-month-grid{gap:1px;background:#dce2e0;border:1px solid #dce2e0;border-radius:12px;overflow:hidden}
#planMonthDialog .month-weekday{background:#fafbfc;color:#17394b;border-radius:0;font-size:13px;padding:12px 4px}
#planMonthDialog .month-day{background:#f5f5f5;border:0;border-radius:0;min-height:105px;padding:8px}
#planMonthDialog .month-day>strong{font-weight:500;font-size:14px;color:#17394b}
#planMonthDialog .month-outside{background:#f5f5f5}
#planMonthDialog .month-today{background:#e7efff;border:0}
#planMonthDialog .month-today>strong{font-weight:850}
#planMonthDialog .month-event{background:#d9e5f8;color:#173c61;border:0;border-radius:3px;font-size:12px;line-height:1.3;padding:5px 6px;margin-top:6px}
#planMonthDialog .month-event.done{background:#d5ebde;color:#175b37}
#planMonthDialog.plan-print-measure .plan-month-grid{gap:1px}
#planMonthDialog.plan-print-measure .month-day{min-height:90px;padding:7px}
#planMonthDialog.plan-print-measure .month-event{font-size:12px;padding:5px 6px;margin-top:6px}
@media(max-width:760px){#planMonthDialog .month-day{padding:4px;min-height:85px}#planMonthDialog .month-event{font-size:10px;padding:3px;margin-top:4px}#planMonthDialog .month-weekday{font-size:11px}}
@media print{
#planMonthDialog .plan-month-grid{gap:1px!important;print-color-adjust:exact}
#planMonthDialog .month-day{min-height:90px!important;padding:7px!important;border-radius:0!important;print-color-adjust:exact}
#planMonthDialog .month-event{font-size:12px!important;padding:5px 6px!important;margin-top:6px!important;border-radius:3px!important;line-height:1.3!important}
}

/* Monthly reference: continuous cells and compact activity strips. */
#page-planejamento .plan-month-main .plan-month-grid{gap:1px;background:#dce2e0;border:1px solid #dce2e0;border-radius:12px;overflow:hidden}
#page-planejamento .plan-month-main .month-weekday{background:#fafbfc;color:#17394b;border-radius:0;font-size:13px;padding:12px 4px}
#page-planejamento .plan-month-main .month-day{background:#f5f5f5;border:0;border-radius:0;min-height:105px;padding:8px}
#page-planejamento .plan-month-main .month-day>strong{font-weight:500;font-size:14px;color:#17394b}
#page-planejamento .plan-month-main .month-outside{background:#f5f5f5}
#page-planejamento .plan-month-main .month-today{background:#e7efff;border:0}
#page-planejamento .plan-month-main .month-today>strong{font-weight:850}
#page-planejamento .plan-month-main .month-event{background:#d9e5f8;color:#173c61;border:0;border-radius:3px;font-size:12px;line-height:1.3;padding:5px 6px;margin-top:6px}
#page-planejamento .plan-month-main .month-event.done{background:#d5ebde;color:#175b37}
#page-planejamento .plan-month-main .plan-month-grid{gap:1px}
#page-planejamento .plan-month-main .month-day{min-height:90px;padding:7px}
#page-planejamento .plan-month-main .month-event{font-size:12px;padding:5px 6px;margin-top:6px}
@media(max-width:760px){#page-planejamento .plan-month-main .month-day{padding:4px;min-height:85px}#page-planejamento .plan-month-main .month-event{font-size:10px;padding:3px;margin-top:4px}#page-planejamento .plan-month-main .month-weekday{font-size:11px}}
@media print{
#page-planejamento .plan-month-main .plan-month-grid{gap:1px!important;print-color-adjust:exact}
#page-planejamento .plan-month-main .month-day{min-height:90px!important;padding:7px!important;border-radius:0!important;print-color-adjust:exact}
#page-planejamento .plan-month-main .month-event{font-size:12px!important;padding:5px 6px!important;margin-top:6px!important;border-radius:3px!important;line-height:1.3!important}
}

#page-planejamento .week-list[hidden],#page-planejamento .plan-month-main[hidden]{display:none!important}
#page-planejamento #weekTitle{text-transform:capitalize}

#page-planejamento .plan-month-main .month-event{display:flex;align-items:center;justify-content:space-between;gap:5px}.month-done-toggle{flex-shrink:0;width:28px;height:28px;border:1px solid #75aa92;border-radius:50%;background:#fff;color:#167450;cursor:pointer}
/* Weekly view follows the same continuous calendar and activity strips as Month. */
#page-planejamento .week-list{gap:1px;border:1px solid #dce2e0;border-radius:12px;overflow:hidden;background:#dce2e0;align-items:stretch}
#page-planejamento .week-list .day-card{border:0;border-radius:0;box-shadow:none;background:#f5f5f5;padding:0 8px 12px;min-height:210px}
#page-planejamento .week-list .day-head{background:#fafbfc;border:0;margin:0 -8px 8px;padding:12px 8px;min-height:65px;text-align:center;justify-content:center}
#page-planejamento .week-list .day-head strong{font-size:13px;color:#17394b}
#page-planejamento .week-list .day-card.today{background:#e7efff;border:0}
#page-planejamento .week-list .day-card.today .day-head{background:#dde9ff}
#page-planejamento .week-list .day-task{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;padding:6px;margin:7px 0;background:#d9e5f8;border:0;border-radius:3px}
#page-planejamento .week-list .day-task.done{background:#d5ebde}
#page-planejamento .week-list .theme-name{font-size:12px;font-weight:500;line-height:1.35;color:#173c61}
#page-planejamento .week-list .theme-meta{display:none}
#page-planejamento .week-list .theme-actions [data-open-subject]{display:none}
#page-planejamento .week-list .theme-actions .done-toggle{border-radius:50%;width:28px;height:28px;background:white}
#page-planejamento .week-list .day-card progress{margin-bottom:8px;height:4px}
@media(max-width:760px){#page-planejamento .week-list .day-card{min-height:0}#page-planejamento .week-list .day-head{min-height:0;text-align:left;justify-content:space-between}#page-planejamento .week-list .day-task{padding:9px}#page-planejamento .week-list .theme-name{font-size:13px}}

#page-planejamento .plan-setup-details{margin-top:22px;border:1px solid #b8d9c8;border-radius:14px;background:#f0f8f3;padding:15px}#page-planejamento .plan-setup-details>summary{cursor:pointer;font-weight:750;color:#086346;font-size:16px;padding:4px}#page-planejamento .plan-setup-details .plan-setup{margin-top:16px}
