/* Agenda inspired by the reference screens: compact day columns and editable color tags. */
.reference-agenda{border-radius:7px;background:#fff;overflow:auto;box-shadow:0 2px 10px rgba(29,48,43,.04)}
.reference-calendar{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));min-width:1020px;align-items:stretch}
.reference-day{min-width:0;border-right:1px solid #dce4e1;background:#fff}
.reference-day:last-child{border-right:0}
.reference-day-head{height:43px;padding:7px 9px;background:#1685bd;color:white;display:flex;align-items:center;gap:7px;position:sticky;top:0;z-index:2}
.reference-day-head b{font-size:13px;letter-spacing:.1px}
.reference-day-head small{font-size:12px;opacity:.88}
.reference-day-head.today{background:#e8873e}
.day-add{margin-left:0;width:22px;height:22px;border:1px solid rgba(255,255,255,.45);border-radius:5px;background:rgba(255,255,255,.12);color:white;font-weight:700;line-height:1}
.day-menu-wrap{position:relative;margin-left:auto}
.day-menu{width:22px;height:22px;border:1px solid rgba(255,255,255,.45);border-radius:5px;background:rgba(255,255,255,.12);color:#fff;font-size:19px;line-height:1;cursor:pointer}
.day-menu-popover{position:absolute;right:0;top:27px;z-index:20;width:210px;padding:5px;background:#fff;border:1px solid #dce4e1;border-radius:8px;box-shadow:0 10px 24px #18352b26;display:grid;gap:2px;color:#263b34}
.day-menu-popover[hidden]{display:none}
.day-menu-popover button{border:0;border-radius:5px;background:#fff;text-align:left;padding:8px 9px;color:#263b34;font:inherit;font-size:15px;cursor:pointer}
.day-menu-popover button:hover{background:#eef6f2;color:#126b50}
.agenda-context-menu{position:fixed;z-index:10000;width:242px;max-height:min(80vh,700px);overflow:auto;padding:5px;background:#fff;border:1px solid #d7dfdc;border-radius:6px;box-shadow:0 10px 28px rgba(24,43,36,.24);color:#283a33;font:15px Arial,sans-serif}.agenda-context-menu[hidden]{display:none}.agenda-context-menu button{display:grid;grid-template-columns:18px 1fr auto;align-items:center;gap:7px;width:100%;min-height:26px;padding:4px 7px;border:0;border-radius:3px;background:#fff;color:inherit;text-align:left;font:inherit;cursor:pointer}.agenda-context-menu button>span{color:#258153;font-size:16px;text-align:center}.agenda-context-menu button:hover,.agenda-context-menu button:focus{outline:0;background:#edf5f1;color:#126b50}.agenda-context-menu kbd{color:#77847e;font:13px Arial,sans-serif}.agenda-context-menu hr{height:1px;margin:4px 3px;border:0;background:#e5eae7}
.reference-slots{padding:3px 4px 7px}
.reference-slot{display:flex;flex-direction:column;gap:1px;margin:0 0 1px}
.agenda-commitment,.agenda-blocked{display:flex;align-items:center;gap:8px;min-height:24px;padding:3px 6px;border:1px solid #ded1a5;border-radius:3px;background:#fff3cd;color:#725515;text-align:left;font:14px Arial,sans-serif;cursor:pointer}.agenda-commitment time,.agenda-blocked time{min-width:38px;font-weight:600}.agenda-commitment span,.agenda-blocked span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.agenda-commitment:hover,.agenda-blocked:hover{filter:brightness(.97)}.agenda-blocked{border-color:#e0c7c7;background:#f8e8e8;color:#8e4141}
.reference-appointment,.reference-open-slot{width:100%;height:25px;min-height:25px;border:0;border-radius:1px;display:flex;align-items:center;gap:5px;text-align:left;padding:0 4px;overflow:hidden;font-family:Arial,sans-serif;font-size:12px;line-height:1.1}
.reference-appointment{color:#073d88;background:#b8ddf3}
.reference-appointment:hover{filter:brightness(.97);outline:1px solid rgba(36,83,128,.24);position:relative;z-index:1}
.reference-appointment time,.reference-open-slot time{flex:0 0 38px;font-size:12px;font-weight:500;font-variant-numeric:tabular-nums}
.reference-appointment span,.reference-open-slot span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reference-appointment.pink{background:#f6c5ce;color:#174c83}
.reference-appointment.sand,.reference-appointment.peach{background:#dfd0bd;color:#354642}
.reference-appointment.gray{background:#d5d8da;color:#354642}
.reference-appointment.orange{background:#f6a2a0;color:#7d322e}
.reference-open-slot{background:#f1f2f2;color:#6c7b76;border-bottom:1px solid #d9dfdc}
.reference-open-slot:hover{background:#f8fbf9;color:#287653}
.agenda-legend{display:flex;align-items:center;gap:14px;padding:10px 3px;color:#75837d;font-size:12px}
.agenda-legend span{display:inline-flex;align-items:center;gap:5px}
.agenda-legend i{width:10px;height:10px;border-radius:2px;background:#b8ddf3;border:1px solid rgba(40,70,80,.08)}
.agenda-legend i.pink{background:#f6c5ce}
.agenda-legend i.sand{background:#dfd0bd}
.agenda-legend i.gray{background:#d5d8da}
.agenda-legend i.orange{background:#f6a2a0}
.agenda-legend small{margin-left:auto;color:#8b9691;font-size:12px}
@media(max-width:700px){.reference-calendar{min-width:1020px}.agenda-legend{flex-wrap:wrap}.agenda-legend small{flex-basis:100%;margin-left:0}}
.agenda-toolbar{display:flex;align-items:center;gap:5px;padding:7px 8px;background:#fff;border:1px solid #e2e9e6;border-bottom:0;border-radius:7px 7px 0 0}
.agenda-action{width:30px;height:29px;display:grid;place-items:center;border:1px solid #e1e8e4;border-radius:5px;background:#fff;color:#64746d;font-size:19px;line-height:1}
.agenda-action:hover:not(:disabled){background:#f1f7f3;border-color:#c9ded3;color:#176b53}
.agenda-action:disabled{opacity:.38;cursor:not-allowed}
.agenda-action.confirm-action,.agenda-action.add-action{color:#24774f;font-weight:700}
.agenda-action.add-action{font-size:22px}
.agenda-action.danger-action{color:#a45d59}
.agenda-action-separator{width:1px;height:21px;background:#e4eae7;margin:0 4px}
.agenda-selection{margin-left:5px;display:flex;align-items:center;gap:8px;min-width:0;overflow:hidden;color:#7e8b85;font-size:12px;white-space:nowrap;text-overflow:ellipsis}
.agenda-selection b{color:#33443e;font-size:13px}
.agenda-selection span{overflow:hidden;text-overflow:ellipsis}
.agenda-selection em{font-style:normal;color:#4d876d;background:#edf6f1;padding:3px 7px;border-radius:10px;font-size:12px}
.reference-agenda{border-radius:0 0 7px 7px}
.reference-appointment.selected{outline:2px solid #267eb0;outline-offset:-2px;position:relative;z-index:1}
@media(max-width:700px){.agenda-toolbar{flex-wrap:wrap}.agenda-selection{flex-basis:100%;margin:2px 0 0}}

.patient-modal{width:min(900px,100%)}.patient-modal .modal-body{max-height:72vh;overflow:auto;padding:10px 16px}.patient-tabs{display:flex;gap:4px;overflow-x:auto;padding:3px 0 10px;border-bottom:1px solid #e4eae7}.patient-tab{white-space:nowrap;border:1px solid #e1e8e4;border-radius:5px 5px 0 0;background:#f7f9f8;padding:7px 9px;font-size:12px;color:#66756e}.patient-tab.active{background:#e9f4ef;color:#176b53;border-color:#c9ded3;font-weight:700}.patient-form{display:grid;grid-template-columns:112px 1fr;gap:15px;padding:8px 2px}.patient-photo{height:140px;border:1px solid #dfe7e3;background:#f8faf9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#668073}.patient-photo span{font-size:37px}.patient-photo small{text-align:center;font-size:12px}.patient-fields .form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.patient-checks{display:flex;flex-wrap:wrap;gap:12px}.patient-checks label{display:flex;align-items:center;gap:4px;font-size:12px}.patient-list{display:grid;gap:8px;padding:14px 4px}.patient-list>div{display:grid;gap:5px;padding:10px;border:1px solid #e5ebe8;border-radius:6px;font-size:13px}.patient-list span,.patient-placeholder span{color:#7a8982;font-size:12px}.patient-placeholder{display:grid;gap:8px;padding:35px 10px;text-align:center;font-size:14px}@media(max-width:700px){.patient-form{grid-template-columns:1fr}.patient-photo{height:90px}.patient-fields .form-grid{grid-template-columns:1fr 1fr}}

.agenda-action{width:33px;height:32px;border-color:#dfe7e4;background:linear-gradient(#fff,#f8faf9);box-shadow:0 1px 2px rgba(30,55,45,.08);transition:transform .12s ease,box-shadow .12s ease,border-color .12s ease}.agenda-action:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 3px 7px rgba(30,55,45,.14)}.agenda-icon{width:23px;height:23px;display:block;filter:drop-shadow(0 1px 0 rgba(255,255,255,.55))}.agenda-action:disabled .agenda-icon{filter:grayscale(.55);opacity:.65}.agenda-action.status-confirm,.agenda-action.status-cancel,.agenda-action.status-absent,.agenda-action.payment-action,.agenda-action.whatsapp-action{background:linear-gradient(#fff,#fbfcfb)}

.reference-appointment.green{background:#c8e6ce;color:#245d36}.reference-appointment.purple{background:#ddd0f2;color:#59427c}.reference-appointment.teal{background:#bce7e1;color:#235f5a}.reference-appointment.yellow{background:#f5e6a7;color:#735b18}.reference-appointment.red{background:#f0b9b4;color:#783b35}.agenda-legend i.green,.procedure-swatch.green{background:#7fb98a}.agenda-legend i.purple,.procedure-swatch.purple{background:#a58acb}.agenda-legend i.teal,.procedure-swatch.teal{background:#62b7aa}.agenda-legend i.yellow,.procedure-swatch.yellow{background:#e4c64e}.agenda-legend i.red,.procedure-swatch.red{background:#d87870}.procedure-color-preview{display:flex;align-items:center;gap:8px;min-height:34px;padding:7px 10px;border-radius:6px;background:#f4f7f5;color:#52645c;font-size:13px}.procedure-color-preview:before{content:'';width:12px;height:12px;border-radius:4px;background:#b8ddf3}.procedure-color-preview.pink:before{background:#f6c5ce}.procedure-color-preview.sand:before{background:#dfd0bd}.procedure-color-preview.gray:before{background:#d5d8da}.procedure-color-preview.orange:before{background:#f6a2a0}.procedure-color-preview.green:before{background:#c8e6ce}.procedure-color-preview.purple:before{background:#ddd0f2}.procedure-color-preview.teal:before{background:#bce7e1}.procedure-color-preview.yellow:before{background:#f5e6a7}.procedure-color-preview.red:before{background:#f0b9b4}.procedure-modal{width:min(600px,100%)}.procedure-modal .modal-body{max-height:70vh;overflow:auto}.procedure-settings{display:grid;gap:8px}.procedure-setting-head,.procedure-setting-row{display:grid;grid-template-columns:1.2fr 1fr;gap:12px;align-items:center}.procedure-setting-head{color:#687871;font-size:13px;padding:3px 2px}.procedure-setting-row input,.procedure-setting-row select{width:100%;min-width:0;border:1px solid #dfe7e3;border-radius:6px;padding:8px 9px;font-size:13px;background:white}.procedure-color-cell{display:flex;align-items:center;gap:8px}.procedure-swatch{display:inline-block;flex:none;width:17px;height:17px;border-radius:5px;background:#b8ddf3;border:1px solid rgba(40,70,80,.12)}.procedure-swatch.pink{background:#f6c5ce}.procedure-swatch.sand{background:#dfd0bd}.procedure-swatch.gray{background:#d5d8da}.procedure-swatch.orange{background:#f6a2a0}.new-procedure-label{margin-top:8px;color:#246b50}.procedure-setting-row .procedure-color-cell select{flex:1}
.appointment-status-letter{flex:0 0 16px;width:16px;height:16px;margin-left:auto;border-radius:50%;display:grid;place-items:center;font:700 13px/1 Arial,sans-serif;background:#fff}.appointment-status-letter.confirmed{color:#21834a;background:#e5f5e9}.appointment-status-letter.cancelled{color:#b76c12;background:#fff1d9}.appointment-status-letter.absent{color:#ba3f39;background:#fde9e7}.absence-appointment{display:grid;gap:4px;margin-bottom:14px;padding:11px 12px;border:1px solid #e1e9e4;border-radius:7px;background:#f7faf8}.absence-appointment b{color:#34473e;font-size:15px}.absence-appointment small{color:#75847c;font-size:13px}
.reference-appointment .appointment-patient-name.confirmed{color:#21834a}.reference-appointment .appointment-patient-name.cancelled{color:#b76c12}.reference-appointment .appointment-patient-name.absent{color:#ba3f39}

.room-modal{width:min(520px,100%)}.room-settings{display:grid;gap:10px}.room-setting-row{display:grid;grid-template-columns:110px 1fr;align-items:center;gap:12px}.room-setting-row label{font-size:13px;font-weight:600;color:#687871}.room-setting-row input{width:100%;border:1px solid #dfe7e3;border-radius:6px;padding:9px 10px;font-size:14px}.new-room-row{border-top:1px solid #e7ece9;padding-top:12px}
.appointment-modal{width:min(820px,100%)}.appointment-modal .modal-body{max-height:74vh;overflow:auto}.appointment-form-grid{gap:12px 16px}.appointment-form-grid .field input,.appointment-form-grid .field select,.appointment-form-grid .field textarea{width:100%;border:1px solid #dfe7e3;border-radius:6px;padding:8px 10px;font-size:14px;background:#fff;color:#34443e}.appointment-form-grid .field textarea{resize:vertical;font-family:inherit}.appointment-status-row{display:flex;align-items:center;gap:12px;padding:0 0 12px;margin-bottom:12px;border-bottom:1px solid #e7ece9}.appointment-status-row label{font-size:13px;font-weight:700;color:#596a62}.appointment-status-row select{border:1px solid #dfe7e3;border-radius:5px;background:#fff;padding:6px 9px;font-size:13px}.appointment-status-row small{margin-left:auto;color:#8a9691;font-size:12px}.time-duration-row>div{display:flex;align-items:center;gap:6px}.time-duration-row input{min-width:0}.time-duration-row input[name="time"],.time-duration-row input[name="endTime"]{width:94px}.time-duration-row input[name="endTime"]{background:#f4f7f5}.time-duration-row input[name="duration"]{width:62px}.time-duration-row span{font-size:13px;color:#78877f}.inline-link{padding:0;border:0;background:transparent;color:#278154;text-decoration:underline;font-size:13px;text-align:left}
.patient-search-bar{margin-top:6px}.patient-total{font-size:13px;color:#76847e}.patient-table .patient-open{white-space:nowrap}.patient-table .patient-row{cursor:pointer}.patient-table .patient-row:hover{background:#f6faf7}.patient-active-field{align-content:center}.patient-active-field label{display:flex;align-items:center;gap:6px}.patient-active-field input,.patient-checks input{accent-color:#378763}.patient-form .field select{width:100%;border:1px solid #dfe7e3;border-radius:6px;padding:8px 10px;font-size:14px;background:#fff;color:#34443e}.patient-form .field input[type=checkbox]{width:auto}.patient-form .field.full{grid-column:1/-1}.patient-modal .patient-form .form-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.patient-search-bar .search-wrap{max-width:500px}@media(max-width:900px){.patient-modal .patient-form .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.patient-modal .patient-form .form-grid{grid-template-columns:1fr}}

.patient-subpanel{display:grid;gap:13px;padding:18px 5px}.patient-subpanel h3,.patient-modal #patient-tab-content h3{margin:7px 0 0;color:#29463b;font-size:16px}.patient-subpanel p,.patient-subtoolbar>span{margin:0;color:#78877f;font-size:13px}.patient-inline-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}.patient-inline-field{display:grid;gap:5px;min-width:0;color:#63736b;font-size:13px;font-weight:600}.patient-inline-field input,.patient-inline-field select,.patient-inline-field textarea{width:100%;min-width:0;border:1px solid #dfe7e3;border-radius:6px;padding:8px 10px;background:white;color:#34443e;font:inherit;font-size:14px}.patient-inline-field textarea{resize:vertical}.patient-inline-field.full{grid-column:1/-1}.patient-subpanel>.primary-button{justify-self:end}.patient-subtoolbar{display:flex;align-items:end;gap:8px;flex-wrap:wrap;padding:12px 3px}.patient-subtoolbar .patient-inline-field{min-width:130px}.patient-table-wrap{max-height:45vh;overflow:auto;border:1px solid #e4eae7;border-radius:6px}.patient-data-table{width:100%;border-collapse:collapse;font-size:13px}.patient-data-table th{position:sticky;top:0;background:#f3f7f5;color:#56675f;text-align:left}.patient-data-table th,.patient-data-table td{padding:8px;border-bottom:1px solid #e9eeeb;white-space:nowrap}.patient-data-table tbody tr:hover{background:#f8fbf9}.empty-state.compact{padding:12px}.patient-notes-area{width:100%;min-height:260px;border:1px solid #dfe7e3;border-radius:6px;padding:12px;font:inherit;font-size:15px;line-height:1.5;resize:vertical}.patient-gallery{display:flex;flex-wrap:wrap;gap:10px;padding:5px}.patient-photo-card{width:130px;padding:5px;border:1px solid #e0e8e4;border-radius:7px;background:#fff;color:#61726a}.patient-photo-card.selected{outline:2px solid #27805d}.patient-photo-card img{display:block;width:118px;height:100px;object-fit:cover;border-radius:4px}.patient-photo-card small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:5px 2px}.patient-weekdays{grid-column:1/-1;display:flex;gap:12px;border:1px solid #e2e9e5;border-radius:6px;padding:10px}.patient-weekdays legend{color:#63736b;font-size:13px}.patient-weekdays label{display:flex;align-items:center;gap:4px;font-size:13px}.patient-editor-actions{grid-column:1/-1;display:flex;gap:6px;flex-wrap:wrap}.patient-editor-actions button{font-size:12px}.patient-modal #patient-tab-content>.empty-state{padding:28px;text-align:center;color:#829089;font-size:13px}.patient-modal #patient-tab-content .field-hint{display:block;margin:5px;color:#829089;font-size:12px}.patient-modal #patient-tab-content .patient-list{padding:8px 3px}.patient-modal #patient-tab-content .patient-subtoolbar .patient-inline-field input{padding:6px}
.patient-credit-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 3px;padding:14px 16px;border:1px solid #dce9df;border-radius:8px;background:#f3f8f4}.patient-credit-panel>div:first-child{display:grid;gap:5px}.patient-credit-panel b{color:#4d5f55;font-size:14px}.patient-credit-panel strong{color:#27744f;font-size:23px;font-variant-numeric:tabular-nums}.patient-credit-panel small{color:#87938d;font-size:12px}.patient-credit-actions{display:flex;gap:7px;flex-wrap:wrap}.patient-credit-actions button{white-space:nowrap}@media(max-width:600px){.patient-credit-panel{align-items:flex-start;flex-direction:column}}
.patient-picker-field{position:relative}.patient-picker-control{display:flex;gap:6px}.patient-picker-control input{flex:1;min-width:0}.patient-picker-control button{flex:none;padding:7px 9px}.patient-picker-results{position:absolute;top:100%;left:0;right:0;z-index:30;max-height:330px;overflow:hidden;margin-top:4px;padding:5px;border:1px solid #dce6e1;border-radius:7px;background:#fff;box-shadow:0 8px 22px rgba(31,54,45,.16)}.patient-picker-search{position:sticky;top:0;width:100%;margin-bottom:5px;padding:8px 9px;border:1px solid #dfe7e3;border-radius:5px;background:white;color:#34443e;font:inherit;font-size:13px}.patient-picker-list{max-height:280px;overflow-y:auto}.patient-picker-option{display:flex;width:100%;flex-direction:column;gap:3px;padding:8px 9px;border:0;border-radius:5px;background:#fff;text-align:left;color:#34443e}.patient-picker-option:hover,.patient-picker-option:focus{background:#eef6f1;outline:0}.patient-picker-option b{font-size:13px}.patient-picker-option small,.patient-picker-empty{color:#7a8982;font-size:12px}.patient-picker-empty{padding:12px}
.agenda-patient-summary{display:flex;align-items:center;gap:18px;margin:0 0 8px;padding:9px 12px;border:1px solid #dce9e2;border-radius:7px;background:#f5faf7;color:#687a71;font-size:13px}.agenda-patient-summary[hidden]{display:none}.agenda-patient-summary>span:not(.summary-patient-name){display:flex;flex-direction:column;gap:3px}.agenda-patient-summary small{color:#84928b;font-size:12px}.agenda-patient-summary b{color:#27744f;font-size:15px;font-variant-numeric:tabular-nums}.agenda-patient-summary .summary-patient-name{margin-right:auto;color:#354a40;font-weight:700;font-size:14px}@media(max-width:700px){.agenda-patient-summary{gap:10px;flex-wrap:wrap}.agenda-patient-summary .summary-patient-name{flex-basis:100%}}
.appointment-alerts{display:inline-flex!important;align-items:center;gap:2px;flex:none!important;overflow:visible!important}.appointment-alert{width:14px;height:14px;display:inline-grid;place-items:center;flex:none;border:1px solid currentColor;border-radius:50%;background:#fff;font-family:Arial,sans-serif;font-size:9px;font-style:normal;font-weight:700;line-height:1}.appointment-alert.evolution{color:#5684b2}.appointment-alert.lastPackage{color:#c98634}.appointment-alert.lastPatient{color:#8468ad}.appointment-alert.openSession,.appointment-alert.overdueAccount{color:#c15e4c}.appointment-alert.closedPlan{color:#7e6a97}.appointment-alert.birthdays{width:16px;border:0;background:transparent;font-size:12px}
