/* Agenda */

#screen-agenda{
            width: 100%;
            max-width: none;
            margin: 18px auto 0;
            padding: 0;
            background: transparent;
            border: 0;
            box-shadow: none;
        }

.agenda-web-shell{ display: grid; gap: 14px; position:relative; }

.agenda-toolbar{ display:flex; align-items:center; justify-content:center; gap:14px; padding:4px 0; }

.agenda-web-top{
            display: flex; align-items: center; justify-content: space-between; gap: 16px;
            padding: 19px 21px; background: #fff; border: 1px solid var(--line);
            border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
        }

.agenda-web-brand h2{ margin: 0; color: var(--primary); font-size: 22px; }

.agenda-web-brand p{ margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.agenda-web-actions{ display:flex; gap:9px; align-items:center; }

.agenda-web-actions .btn{ min-width:118px; width:auto; }

.agenda-web-nav{
            display: grid; grid-template-columns: 46px minmax(260px, 1fr) 46px;
            align-items: center; gap: 10px; width: min(100%, 560px); margin: 0;
        }

.agenda-date-main{
            min-height: 51px; border: 1px solid var(--line); border-radius: 14px;
            background: #fff; color: var(--primary); font-weight: 850; cursor: pointer;
        }

.agenda-date-main small{ display: block; color: var(--primary-2); font-size: 9px; text-transform: uppercase; }

.agenda-date-main strong{ display: block; margin-top: 2px; font-size: 15px; }

.agenda-nav-arrow,
.agenda-today{
            min-height: 46px; border: 1px solid var(--line); border-radius: 12px;
            background: #fff; color: var(--primary); font-weight: 900; cursor: pointer;
        }

.agenda-today{ padding: 0 17px; }

.agenda-summary-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }

.agenda-summary-floating{
            position:fixed; left:12px; top:50%; transform:translateY(-50%);
            z-index:30; width:168px; grid-template-columns:1fr; gap:8px;
        }

.agenda-summary-floating .agenda-summary-card{ padding:10px 11px; gap:9px; box-shadow:0 8px 22px rgba(16,48,82,.12); }

.agenda-summary-floating .agenda-summary-icon{ width:34px; height:34px; border-radius:10px; font-size:16px; }

.agenda-summary-floating .agenda-summary-card strong{ font-size:17px; }

.agenda-summary-floating .agenda-summary-card span{ font-size:8px; }

.agenda-summary-card{
            padding: 17px 18px; display: flex; align-items: center; gap: 13px;
            background: #fff; border: 1px solid var(--line); border-radius: 16px;
            box-shadow: var(--shadow-sm);
        }

.agenda-summary-icon{
            width: 43px; height: 43px; display: grid; place-items: center;
            border-radius: 13px; background: var(--primary-soft); color: var(--primary-2);
            font-size: 30px; font-weight: 900;
        }

.agenda-summary-card strong{ display: block; color: var(--primary); font-size: 22px; }

.agenda-summary-card span{ display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.agenda-web-card{
            background: #fff; border: 1px solid var(--line); border-radius: 20px;
            box-shadow: var(--shadow-sm); overflow: hidden;
        }

.agenda-web-card-head{
            padding: 18px 21px; border-bottom: 1px solid var(--line);
            display: flex; justify-content: space-between; align-items: center; gap: 14px;
        }

.agenda-web-card-head h3{ margin: 0; color: var(--primary); font-size: 17px; }

.agenda-web-card-head p{ margin: 4px 0 0; color: var(--muted); font-size: 10px; }

.agenda-legend{ display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 9px; }

.agenda-legend i{ width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; }

.agenda-legend .wait{ background: #d88d12; }

.agenda-legend .confirmed{ background: #6658dc; }

.agenda-legend .done{ background: #168b60; }

.agenda-timeline{ padding: 14px 20px 22px; }

.agenda-slot{ display: grid; grid-template-columns: 78px 1fr; gap: 12px; align-items: stretch; min-height: 61px; }

.agenda-slot-time{ padding-top:16px; color:#587088; text-align:right; font-size:11px; font-weight:850; }

.agenda-slot-custom .agenda-slot-time{ color:var(--primary-2); }

.agenda-slot-custom .agenda-slot-body{ background:linear-gradient(90deg, rgba(15,95,156,.035), transparent); }

.agenda-slot-body{ padding: 7px 0; border-bottom: 1px solid #edf1f5; }

.agenda-free,
.agenda-appointment{
            width: 100%; min-height: 47px; border-radius: 13px; cursor: pointer;
        }

.agenda-free{
            padding: 0 13px; display: flex; align-items: center; justify-content: space-between;
            color: #7890a7; background: #fbfdff; border: 1px dashed #cadbea;
            font-size: 10px; font-weight: 750;
        }

.agenda-free b{
            width: 28px; height: 28px; display: grid; place-items: center;
            border: 1px solid #d1deea; border-radius: 9px; font-size: 17px;
        }

.agenda-appointment{
            padding: 10px 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
            background: #fff; border: 1px solid #d9e4ee; border-left: 4px solid #d88d12;
            text-align: left;
        }

.agenda-appointment.confirmada{ border-left-color: #6658dc; }

.agenda-appointment.realizada{ border-left-color: #168b60; }

.agenda-appointment.cancelada,
.agenda-appointment.faltou{ opacity: .65; border-left-color: #cf5656; }

.agenda-appt-main strong{ display: block; color: #18263a; font-size: 12px; text-transform: uppercase; }

.agenda-appt-main span{ display: block; margin-top: 4px; color: #66809a; font-size: 9px; text-transform: uppercase; }

.agenda-status{
            padding: 6px 9px; border-radius: 999px; color: #9a650c; background: #fff5e4;
            font-size: 8px; font-weight: 900; white-space: nowrap;
        }

.agenda-status.confirmada{ color: #5749c8; background: #f0edff; }

.agenda-status.realizada{ color: #147451; background: #eaf8f1; }

.agenda-status.cancelada,
.agenda-status.faltou{ color: #a73f3f; background: #fff0f0; }

.agenda-loading{ padding: 38px; color: var(--muted); text-align: center; }

.agenda-modal-backdrop{
            position: fixed; inset: 0; z-index: 150; display: none; place-items: center;
            padding: 18px; background: rgba(9, 28, 48, .58); backdrop-filter: blur(7px);
        }

.agenda-modal-backdrop.open{ display: grid; }

.agenda-modal{
            width: min(100%, 700px); max-height: calc(100vh - 36px); overflow: auto;
            background: #fff; border: 1px solid var(--line); border-radius: 22px;
            box-shadow: 0 28px 80px rgba(0,0,0,.27);
        }

.agenda-modal.small{ width: min(100%, 560px); }

.agenda-modal-head{
            padding: 21px 24px 17px; display: flex; justify-content: space-between; gap: 15px;
            border-bottom: 1px solid var(--line);
        }

.agenda-modal-head small{ color: var(--primary-2); font-size: 10px; font-weight: 850; text-transform: uppercase; }

.agenda-modal-head h3{ margin: 5px 0 0; color: var(--primary); font-size: 21px; }

.agenda-modal-close{ width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; }

.agenda-form{ padding: 20px 24px 24px; }

.agenda-form-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

.agenda-form-grid .wide{ grid-column: 1 / -1; }

.agenda-client-wrap{ position: relative; }

.agenda-client-results{
            position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% - 8px);
            max-height: 220px; overflow: auto; background: #fff; border: 1px solid var(--line);
            border-radius: 12px; box-shadow: var(--shadow-md);
        }

.agenda-client-option{
            width: 100%; padding: 11px 13px; border: 0; border-bottom: 1px solid #edf1f5;
            background: #fff; text-align: left; cursor: pointer;
        }

.agenda-client-option strong{ display: block; color: var(--primary); font-size: 11px; }

.agenda-client-option span{ color: var(--muted); font-size: 9px; }

.agenda-form textarea{ width: 100%; padding: 11px 13px; border: 1px solid #cfdae7; border-radius: 12px; resize: vertical; font: inherit; }

.agenda-modal-actions{ display: flex; justify-content: flex-end; gap: 9px; margin-top: 19px; }

.agenda-details{ padding: 20px 24px 24px; }

.agenda-details-row{ display: flex; justify-content: space-between; gap: 15px; margin-bottom: 18px; color: var(--muted); font-size: 11px; }

.agenda-detail-actions{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.agenda-detail-actions button{ min-height: 48px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--primary); font-weight: 850; cursor: pointer; }

.agenda-details-notes{ margin-top: 18px; padding-top: 17px; border-top: 1px solid var(--line); }

.agenda-details-notes-head{ display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }

.agenda-details-notes-head label{ margin: 0; color: var(--primary); font-size: 11px; font-weight: 850; }

.agenda-details-notes-head button{ min-width: 74px; min-height: 34px; padding: 7px 13px; border: 1px solid #bfd0e1; border-radius: 10px; background: #fff; color: var(--primary); font-size: 10px; font-weight: 850; cursor: pointer; }

.agenda-details-notes-head button:hover{ background: var(--primary-soft); }

.agenda-details-notes-head button:disabled{ opacity: .6; cursor: wait; }

#agenda-details-notes{ width: 100%; min-height: 92px; padding: 11px 13px; color: var(--text); background: #fff; border: 1px solid #cfdae7; border-radius: 12px; resize: vertical; font: inherit; line-height: 1.45; }

#agenda-details-notes[readonly]{ color: #5f7186; background: #f6f9fc; cursor: default; resize: none; }

#agenda-details-notes:not([readonly]):focus{ border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(15, 95, 156, .10); outline: none; }

.agenda-detail-status{ display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }

.agenda-detail-status button{ min-height: 43px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-weight: 850; cursor: pointer; }

.agenda-detail-status .confirm{ color: #6658dc; background: #f1efff; }

.agenda-detail-status .done{ color: #168b60; background: #edf9f3; }

.agenda-detail-status .missed{ color: #a66a05; background: #fff7e9; }

.agenda-detail-status .cancel{ color: #bb4242; background: #fff1f1; }

.agenda-toast{
            position: fixed; right: 20px; bottom: 20px; z-index: 220;
            max-width: 390px; padding: 13px 15px; border-radius: 13px;
            background: #15324f; color: #fff; box-shadow: var(--shadow-md);
            font-size: 11px; font-weight: 750; display: none;
        }

.agenda-toast.show{ display: block; }

@media (max-width: 980px){
.agenda-summary-floating{ position:static; transform:none; width:auto; grid-template-columns:repeat(4,1fr); }
}

@media (max-width: 760px){
#screen-agenda{ margin: 9px 5px; width: auto; }
.agenda-toolbar{ align-items:stretch; flex-direction:column; }
.agenda-web-actions{ width: 100%; }
.agenda-web-actions .btn{ flex: 1; }
.agenda-web-nav{ width:100%; grid-template-columns:42px 1fr 42px; }
.agenda-summary-floating{ grid-template-columns:repeat(2,1fr); }
.agenda-web-card-head{ align-items: flex-start; flex-direction: column; }
.agenda-slot{ grid-template-columns: 55px 1fr; gap: 8px; }
.agenda-timeline{ padding-left: 9px; padding-right: 11px; }
.agenda-form-grid{ grid-template-columns: 1fr; }
.agenda-form-grid .wide{ grid-column: auto; }
}

#screen-agenda.screen.active{
            animation: none;
            transform: none;
        }

.agenda-summary-floating{
            left: 14px;
        }

.agenda-delete-wrap{
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--line);
        }

.agenda-delete-wrap button{
            width: 100%;
            min-height: 42px;
            border: 1px solid #efc7c7;
            border-radius: 12px;
            background: #fff7f7;
            color: #b23e3e;
            font-weight: 850;
            cursor: pointer;
        }

.agenda-delete-wrap button:hover{
            background: #ffecec;
            border-color: #e8aaaa;
        }

.agenda-summary-card{
            font: inherit;
            text-align: left;
            cursor: pointer;
            transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
        }

.agenda-summary-card:hover{
            transform: translateX(3px);
            border-color: #aacbe4;
            box-shadow: 0 12px 28px rgba(16,48,82,.16);
        }

.agenda-summary-card.active{
            border-color: var(--primary-2);
            box-shadow: 0 0 0 3px rgba(15,95,156,.10), 0 12px 28px rgba(16,48,82,.14);
        }

.agenda-filter-head{ align-items: center; }

.agenda-filter-back{ width: auto; min-width: 190px; }

.agenda-filter-list{
            padding: 14px 18px 20px;
            display: grid;
            gap: 10px;
        }

.agenda-filter-item{
            width: 100%;
            padding: 14px 16px;
            display: grid;
            grid-template-columns: 72px minmax(0,1fr) auto;
            align-items: center;
            gap: 14px;
            border: 1px solid var(--line);
            border-left: 4px solid #d88d12;
            border-radius: 14px;
            background: #fff;
            text-align: left;
            cursor: pointer;
        }

.agenda-filter-item:hover{ box-shadow: var(--shadow-sm); transform: translateY(-1px); }

.agenda-filter-item.confirmada{ border-left-color: #6658dc; }

.agenda-filter-item.realizada{ border-left-color: #168b60; }

.agenda-filter-time{ color: var(--primary); font-size: 16px; font-weight: 900; }

.agenda-filter-main strong{
            display: block; color: #18263a; font-size: 13px; text-transform: uppercase;
        }

.agenda-filter-main span{
            display: block; margin-top: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase;
        }

.agenda-filter-empty{ padding: 36px 18px; color: var(--muted); text-align: center; }

@media (max-width: 700px){
.agenda-filter-head{ align-items: stretch; flex-direction: column; }
.agenda-filter-back{ width: 100%; }
.agenda-filter-item{ grid-template-columns: 58px minmax(0,1fr); }
.agenda-filter-item .agenda-status{ grid-column: 1 / -1; justify-self: start; margin-left: 72px; }
}

@media (max-width: 700px){
.agenda-modal-backdrop{
                align-items: stretch;
                justify-items: stretch;
                padding: 0;
                overflow-x: hidden;
            }
.agenda-modal,
.agenda-modal.small{
                width: 100%;
                max-width: 100%;
                min-width: 0;
                min-height: 100%;
                max-height: none;
                margin: 0;
                border-left: 0;
                border-right: 0;
                border-radius: 0;
                overflow-x: hidden;
                box-shadow: none;
            }
.agenda-modal-head,
.agenda-form,
.agenda-details{
                width: 100%;
                max-width: 100%;
                min-width: 0;
                padding-left: 16px;
                padding-right: 16px;
            }
.agenda-form-grid,
.agenda-form-grid > *,
.agenda-client-wrap,
.agenda-modal input,
.agenda-modal select,
.agenda-modal textarea,
.agenda-modal button{
                min-width: 0;
                max-width: 100%;
            }
.agenda-modal input,
.agenda-modal select,
.agenda-modal textarea{
                width: 100%;
                box-sizing: border-box;
            }
.agenda-client-results{
                left: 0;
                right: 0;
                width: auto;
                max-width: 100%;
            }
.agenda-modal-actions{
                width: 100%;
                display: grid;
                grid-template-columns: 1fr;
            }
.agenda-modal-actions .btn{
                width: 100%;
            }
}

.agenda-date-picker-wrap{ position: relative; min-width: 0; }

.agenda-date-picker-wrap .agenda-date-main{ width: 100%; }

#agenda-date-input{
            position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0;
            padding: 0; border: 0; border-radius: 14px; opacity: 0; cursor: pointer; z-index: 2;
        }

#agenda-date-input::-webkit-calendar-picker-indicator{
            position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer;
        }

.agenda-horizontal-layout{
            display: grid;
            grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
            align-items: start;
            gap: 16px;
        }

.agenda-left-column{
            min-width: 0;
            display: grid;
            gap: 14px;
            position: sticky;
            top: 14px;
        }

.agenda-right-column{
            min-width: 0;
            display: grid;
            gap: 14px;
        }

.agenda-left-column .agenda-summary-floating{
            position: static;
            left: auto;
            top: auto;
            width: 100%;
            transform: none;
            z-index: auto;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

.agenda-left-column .agenda-summary-card{
            min-width: 0;
            min-height: 88px;
            padding: 13px;
            transform: none;
        }

.agenda-left-column .agenda-summary-card:hover{
            transform: translateY(-2px);
        }

.agenda-left-column .agenda-summary-icon{
            width: 38px;
            height: 38px;
            flex: 0 0 auto;
        }

.agenda-client-search-card{
            min-width: 0;
            padding: 17px;
            background: #fff;
            border: 1px solid var(--line);
            border-radius: 18px;
            box-shadow: var(--shadow-sm);
        }

.agenda-client-search-head h3{
            margin: 0;
            color: var(--primary);
            font-size: 16px;
        }

.agenda-client-search-head p{
            margin: 4px 0 14px;
            color: var(--muted);
            font-size: 10px;
            line-height: 1.45;
        }

.agenda-history-client-wrap{
            position: relative;
            min-width: 0;
        }

.agenda-history-search-btn{
            width: 100%;
            margin-top: 9px;
        }

.agenda-client-history{
            max-height: calc(100vh - 390px);
            min-height: 90px;
            margin-top: 13px;
            overflow-y: auto;
            overflow-x: hidden;
            border-top: 1px solid var(--line);
            padding-top: 10px;
        }

.agenda-history-empty{
            padding: 18px 8px;
            color: var(--muted);
            text-align: center;
            font-size: 10px;
            line-height: 1.5;
        }

.agenda-history-count{
            margin-bottom: 8px;
            color: var(--muted);
            font-size: 9px;
            font-weight: 750;
        }

.agenda-history-item{
            width: 100%;
            min-width: 0;
            margin-bottom: 8px;
            padding: 11px;
            display: grid;
            grid-template-columns: 48px minmax(0, 1fr);
            gap: 9px;
            border: 1px solid var(--line);
            border-left: 4px solid #d88d12;
            border-radius: 12px;
            background: #fff;
            color: var(--text);
            text-align: left;
            cursor: pointer;
        }

.agenda-history-item.confirmada{ border-left-color: #6658dc; }

.agenda-history-item.realizada{ border-left-color: #168b60; }

.agenda-history-item.cancelada,
.agenda-history-item.faltou{
            border-left-color: #cf5656;
            opacity: .72;
        }

.agenda-history-date{
            color: var(--primary);
            font-size: 10px;
            font-weight: 900;
            line-height: 1.25;
        }

.agenda-history-date strong{
            display: block;
            font-size: 13px;
        }

.agenda-history-main{
            min-width: 0;
        }

.agenda-history-main strong{
            display: block;
            overflow: hidden;
            color: var(--primary);
            font-size: 10px;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-transform: uppercase;
        }

.agenda-history-main span{
            display: block;
            margin-top: 3px;
            overflow: hidden;
            color: var(--muted);
            font-size: 8px;
            text-overflow: ellipsis;
            white-space: nowrap;
            text-transform: uppercase;
        }

.agenda-history-main .agenda-status{
            display: inline-flex;
            margin-top: 7px;
        }

@media (max-width: 980px){
.agenda-horizontal-layout{
                display: flex;
                flex-direction: column;
            }
.agenda-left-column{
                width: 100%;
                position: static;
                order: 1;
            }
.agenda-right-column{
                width: 100%;
                order: 2;
            }
.agenda-left-column .agenda-summary-floating{
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
.agenda-client-search-card{
                order: 2;
            }
.agenda-client-history{
                max-height: 360px;
            }
}

@media (max-width: 520px){
.agenda-horizontal-layout{
                gap: 10px;
            }
.agenda-left-column{
                gap: 10px;
            }
.agenda-client-search-card{
                margin: 0;
                padding: 14px;
                border-radius: 16px;
            }
.agenda-left-column .agenda-summary-card{
                min-height: 78px;
                padding: 10px;
            }
}

@media (min-width: 981px){
#screen-agenda{
                width: calc(100% - 28px);
                max-width: none;
                margin-left: 14px;
                margin-right: 14px;
            }
.agenda-web-shell{
                width: 100%;
                max-width: none;
            }
.agenda-toolbar{
                width: 100%;
            }
.agenda-horizontal-layout{
                width: 100%;
                grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
                gap: 14px;
            }
.agenda-left-column,
.agenda-right-column,
.agenda-web-card,
.agenda-client-search-card{
                max-width: none;
            }
}

@media (min-width: 981px){
.card > #screen-agenda.screen.active{
                width: 100% !important;
                max-width: none !important;
                margin: 14px 0 0 !important;
                padding: 0 !important;
                border: 0 !important;
                background: transparent !important;
                box-shadow: none !important;
            }
#screen-agenda .agenda-web-shell,
#screen-agenda .agenda-toolbar,
#screen-agenda .agenda-horizontal-layout{
                width: 100% !important;
                max-width: none !important;
            }
#screen-agenda .agenda-horizontal-layout{
                grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
            }
.agenda-history-client-wrap{
                z-index: 40;
            }
#agenda-history-client-results{
                z-index: 100;
            }
}

.agenda-horizontal-layout,
.agenda-left-column,
.agenda-right-column,
.agenda-client-search-card{
            display: contents !important;
        }

.agenda-toolbar{
            display: grid;
            grid-template-columns: minmax(210px, 280px) minmax(420px, 560px) auto;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }

.agenda-toolbar-search{
            position: relative;
            min-width: 0;
        }

.agenda-toolbar-search input[type="search"]{
            width: 100%;
            height: 46px;
            min-width: 0;
            padding: 0 14px;
            border: 1px solid #cfdae7;
            border-radius: 12px;
            background: #fff;
            color: var(--text);
            font: inherit;
        }

.agenda-toolbar-search input[type="search"]:focus{
            outline: 0;
            border-color: var(--primary-2);
            box-shadow: 0 0 0 4px rgba(15,95,156,.10);
        }

.agenda-toolbar-search .agenda-client-results{
            top: calc(100% + 6px);
            z-index: 120;
        }

.agenda-summary-floating .agenda-summary-card{
            min-height: 0 !important;
            padding: 10px 11px !important;
        }

#screen-agenda{
            width: calc(100% - 28px) !important;
            max-width: none !important;
            margin-left: 14px !important;
            margin-right: 14px !important;
        }

@media (max-width: 980px){
.agenda-toolbar{
                grid-template-columns: 1fr;
            }
.agenda-toolbar-search{
                order: 1;
                width: 100%;
            }
.agenda-web-nav{
                order: 2;
                width: 100%;
            }
.agenda-web-actions{
                order: 3;
                width: 100%;
            }
.agenda-summary-floating{
                position: static !important;
                left: auto !important;
                top: auto !important;
                width: auto !important;
                transform: none !important;
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
}

.agenda-top-row{
            width: 100%;
            display: grid;
            align-items: center;
            gap: 10px;
        }

.agenda-top-row-compact{
            grid-template-columns: minmax(220px, 1.35fr) minmax(0, 3fr);
        }

.agenda-top-row-main{
            grid-template-columns: minmax(420px, 1fr) auto;
        }

.agenda-top-row-compact .agenda-toolbar-search input[type="search"]{
            height: 38px;
            padding: 0 12px;
            border-radius: 10px;
            font-size: 12px;
        }

.agenda-summary-inline{
            position: static !important;
            left: auto !important;
            top: auto !important;
            width: auto !important;
            transform: none !important;
            z-index: auto !important;
            grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
            gap: 8px !important;
        }

.agenda-summary-inline .agenda-summary-card{
            min-height: 42px !important;
            padding: 6px 9px !important;
            gap: 7px !important;
            border-radius: 11px !important;
            box-shadow: var(--shadow-sm);
        }

.agenda-summary-inline .agenda-summary-icon{
            width: 28px !important;
            height: 28px !important;
            border-radius: 8px !important;
            font-size: 13px !important;
        }

.agenda-summary-inline .agenda-summary-card strong{
            font-size: 14px !important;
            line-height: 1;
        }

.agenda-summary-inline .agenda-summary-card span{
            margin-top: 2px !important;
            font-size: 7px !important;
            line-height: 1.15;
        }

.agenda-top-row-main .agenda-web-nav{
            width: 100%;
            max-width: none;
            grid-template-columns: 46px minmax(260px, 1fr) 46px;
        }

.agenda-top-row-main .agenda-date-main{
            min-height: 50px;
        }

.agenda-top-row-main .agenda-web-actions{
            justify-content: flex-end;
        }

@media (max-width: 980px){
.agenda-top-row-compact,
.agenda-top-row-main{
                grid-template-columns: 1fr;
            }
.agenda-summary-inline{
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
.agenda-top-row-main .agenda-web-actions{
                width: 100%;
            }
}

.agenda-filter-item{
            grid-template-columns: 118px minmax(0, 1fr) auto !important;
            gap: 16px !important;
            align-items: center !important;
        }

.agenda-filter-time{
            display: block;
            min-width: 0;
            color: var(--primary);
            font-size: 13px;
            font-weight: 900;
            line-height: 1.25;
            white-space: normal;
        }

.agenda-filter-main{
            min-width: 0;
            overflow: hidden;
        }

.agenda-filter-main strong,
.agenda-filter-main span{
            display: block;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

.agenda-filter-main strong{
            font-size: 12px;
        }

.agenda-filter-main span{
            margin-top: 4px;
            font-size: 9px;
        }

.agenda-filter-item .agenda-status{
            justify-self: end;
            align-self: center;
        }

.agenda-summary-inline .agenda-summary-card{
            display: grid !important;
            grid-template-columns: 28px auto minmax(0, 1fr) !important;
            align-items: center !important;
            column-gap: 7px !important;
        }

.agenda-summary-inline .agenda-summary-card > div:last-child{
            display: contents;
        }

.agenda-summary-inline .agenda-summary-card strong{
            grid-column: 2;
            font-size: 15px !important;
            line-height: 1 !important;
            margin: 0 !important;
        }

.agenda-summary-inline .agenda-summary-card span{
            grid-column: 3;
            margin: 0 !important;
            font-size: 10px !important;
            line-height: 1.1 !important;
            color: var(--muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

@media (max-width: 700px){
.agenda-filter-item{
                grid-template-columns: 92px minmax(0, 1fr) !important;
            }
.agenda-filter-item .agenda-status{
                grid-column: 2;
                justify-self: start;
                margin-top: 6px;
            }
.agenda-summary-inline .agenda-summary-card{
                grid-template-columns: 28px auto minmax(0, 1fr) !important;
            }
}

@media (min-width: 981px){
body.logged-app #screen-agenda{ margin-top:0; }
}

@media (min-width: 981px){
body.logged-app #screen-agenda{ padding-top:0 !important; }
body.logged-app .agenda-web-shell{ gap:12px !important; }
body.logged-app .agenda-web-top{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    padding:0 2px 2px !important;
    border-radius:0 !important;
  }
body.logged-app .agenda-web-brand h2{ font-size:30px !important; line-height:1.05 !important; letter-spacing:-.04em !important; color:#0f2d5c !important; }
body.logged-app .agenda-web-brand p{ margin-top:8px !important; font-size:14px !important; color:#516985 !important; }
body.logged-app .agenda-web-card{
    border:1px solid #e3ebf4 !important;
    border-radius:18px !important;
    box-shadow:0 10px 30px rgba(20,42,74,.06) !important;
    background:#fff !important;
  }
body.logged-app .agenda-web-card{ padding:20px 22px !important; }
body.logged-app .agenda-summary-card{
    border:1px solid #e3ebf4 !important;
    border-radius:16px !important;
    box-shadow:0 8px 24px rgba(20,42,74,.06) !important;
    background:#fff !important;
  }
body.logged-app .agenda-web-actions .btn,
body.logged-app .agenda-web-nav button,
body.logged-app .agenda-today,
body.logged-app .agenda-web-card .btn{
    border-radius:13px !important;
  }
}

@media (min-width: 981px){
body.logged-app .agenda-web-brand h2{
    font-size:26px !important;
  }
body.logged-app .agenda-web-brand p{
    margin-top:6px !important;
    font-size:12px !important;
  }
body.logged-app #screen-agenda{
    width:auto !important;
    max-width:none !important;
    margin-top:0 !important;
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
  }
body.logged-app .agenda-web-card{
    border:1px solid #dde7f1 !important;
    border-radius:14px !important;
    box-shadow:none !important;
    background:#fff !important;
  }
body.logged-app .agenda-web-top{
    min-height:54px !important;
    padding:0 2px 4px !important;
  }
body.logged-app .agenda-summary-card{
    border:1px solid #dde7f1 !important;
    border-radius:12px !important;
    box-shadow:none !important;
  }
body.logged-app .agenda-web-card{ padding:0 !important; }
body.logged-app .agenda-web-card-head{ padding:14px 17px !important; }
body.logged-app .agenda-timeline{ padding:10px 16px 18px !important; }
}

@media (max-width: 980px){
body.logged-app #screen-agenda{
    margin:0 !important;
    max-width:none !important;
    width:auto !important;
  }
body.logged-app .agenda-web-shell{
    gap:10px !important;
  }
body.logged-app .agenda-web-top{
    background:transparent !important;
    border:0 !important;
    box-shadow:none !important;
    border-radius:0 !important;
    padding:0 2px 2px !important;
    align-items:flex-start !important;
    flex-direction:column !important;
  }
body.logged-app .agenda-web-brand h2{
    font-size:22px !important;
    line-height:1.1 !important;
  }
body.logged-app .agenda-web-brand p{
    font-size:13px !important;
    margin-top:6px !important;
  }
body.logged-app .agenda-web-actions{
    width:100% !important;
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
  }
body.logged-app .agenda-web-actions .btn{
    width:100% !important;
  }
body.logged-app .agenda-web-card{
    width:100% !important;
    max-width:none !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
  }
body.logged-app .agenda-form-grid{
    grid-template-columns:minmax(0,1fr) !important;
  }
body.logged-app .agenda-form-grid > *{
    min-width:0 !important;
  }
body.logged-app .agenda-toolbar{ align-items:stretch !important; flex-direction:column !important; gap:10px !important; }
body.logged-app .agenda-web-actions{ grid-template-columns:1fr 1fr !important; }
body.logged-app .agenda-web-nav{ width:100% !important; grid-template-columns:42px minmax(0,1fr) 42px !important; }
body.logged-app .agenda-summary-floating,
body.logged-app .agenda-summary-grid{
    position:static !important;
    transform:none !important;
    width:auto !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }
body.logged-app .agenda-summary-card{
    min-width:0 !important;
    padding:10px !important;
  }
body.logged-app .agenda-web-card{ overflow:hidden !important; }
body.logged-app .agenda-web-card-head{
    padding:14px 14px 8px !important;
    align-items:flex-start !important;
    flex-direction:column !important;
    gap:6px !important;
  }
body.logged-app .agenda-legend{ gap:8px !important; }
body.logged-app .agenda-timeline{ padding:10px 12px 16px !important; }
body.logged-app .agenda-slot{
    grid-template-columns:54px minmax(0,1fr) !important;
    gap:8px !important;
    min-height:0 !important;
  }
body.logged-app .agenda-slot-time{ padding-top:14px !important; font-size:10px !important; }
body.logged-app .agenda-slot-body,
body.logged-app .agenda-appointment,
body.logged-app .agenda-free{ min-width:0 !important; }
body.logged-app .agenda-appointment{
    padding:10px 10px !important;
    align-items:flex-start !important;
    gap:8px !important;
  }
body.logged-app .agenda-appt-main,
body.logged-app .agenda-appt-main strong,
body.logged-app .agenda-appt-main span{
    min-width:0 !important;
    overflow-wrap:anywhere !important;
    white-space:normal !important;
  }
body.logged-app .agenda-modal{
    width:100% !important;
    max-width:100vw !important;
    min-height:auto !important;
    border-radius:16px 16px 0 0 !important;
  }
}

body.logged-app.theme-dark .agenda-web-brand h2{
  color: #edf4ff !important;
}

body.logged-app.theme-dark .agenda-web-brand p{
  color: #90a3bf !important;
}

body.logged-app.theme-dark .agenda-web-card,
body.logged-app.theme-dark .agenda-modal{
  background: #0b1728 !important;
  border-color: #1f3048 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .24) !important;
}

body.logged-app.theme-dark .agenda-summary-card{
  background: #0e1b2d !important;
  border-color: #1f3048 !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .20) !important;
}

body.logged-app.theme-dark .agenda-summary-card strong,
body.logged-app.theme-dark .agenda-summary-card span{
  color: #edf4ff !important;
}

body.logged-app.theme-dark .agenda-detail-actions button,
body.logged-app.theme-dark .agenda-detail-status button{
  background: #091220 !important;
  color: #edf4ff !important;
  border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-nav-arrow,
body.logged-app.theme-dark .agenda-today{
  background: #0f1e33 !important;
  color: #d8e7fa !important;
  border-color: #29415f !important;
}

body.logged-app.theme-dark .agenda-nav-arrow:hover,
body.logged-app.theme-dark .agenda-today:hover{
  background: #142840 !important;
}

body.logged-app.theme-dark .agenda-free{
  background: #0f1d31 !important;
  border-color: #29415f !important;
  color: #9eb4d1 !important;
}

body.logged-app.theme-dark .agenda-free b{
  background: #13233a !important;
  border-color: #29415f !important;
  color: #8fbcff !important;
}

body.logged-app.theme-dark .agenda-appointment{
  background: #0d1a2d !important;
  border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-slot-body{
  border-bottom-color: #1c2d44 !important;
}

body.logged-app.theme-dark .agenda-date-main,
body.logged-app.theme-dark .agenda-web-card,
body.logged-app.theme-dark .agenda-summary-card,
body.logged-app.theme-dark .agenda-nav-arrow,
body.logged-app.theme-dark .agenda-today,
body.logged-app.theme-dark .agenda-modal,
body.logged-app.theme-dark .agenda-modal-close,
body.logged-app.theme-dark .agenda-client-results,
body.logged-app.theme-dark .agenda-client-option{
  background: #0b1728 !important;
  color: #edf4ff !important;
  border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-modal-head{
  border-bottom-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-web-card-head p,
body.logged-app.theme-dark .agenda-legend,
body.logged-app.theme-dark .agenda-slot-time,
body.logged-app.theme-dark .agenda-appt-main span,
body.logged-app.theme-dark .agenda-date-main small{
  color: #8ea5c3 !important;
}

body.logged-app.theme-dark .agenda-web-card-head h3,
body.logged-app.theme-dark .agenda-appt-main strong,
body.logged-app.theme-dark .agenda-date-main strong{
  color: #edf4ff !important;
}

@media (max-width: 980px){
body.logged-app .agenda-top-row-main .agenda-web-actions{
    width: 100% !important;
    display: grid !important;
    grid-template-columns: auto 46px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
  }
body.logged-app #agenda-today{
    width: auto !important;
    min-width: 64px !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
  }
body.logged-app #agenda-refresh{
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
body.logged-app #agenda-refresh .agenda-refresh-text{
    display: none !important;
  }
body.logged-app #agenda-refresh .agenda-refresh-icon{
    display: inline-block !important;
    font-size: 21px !important;
    line-height: 1 !important;
  }
body.logged-app #agenda-new{
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    height: 42px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }
}

@media (max-width: 980px){
body.logged-app .agenda-top-row-main{
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }
body.logged-app .agenda-top-row-main .agenda-web-actions{
    order: 1 !important;
  }
body.logged-app .agenda-top-row-main .agenda-web-nav{
    order: 2 !important;
  }
}

@media (max-width: 980px){
body.logged-app.theme-dark .agenda-web-top{
    background: transparent !important;
  }
}

@media (max-width: 980px){
body.logged-app .agenda-top-row-main .agenda-web-actions{
    grid-template-columns: auto minmax(0, 1fr) 46px !important;
    grid-template-areas: "today new refresh" !important;
    gap: 8px !important;
    align-items: center !important;
  }
body.logged-app #agenda-today{
    grid-area: today !important;
  }
body.logged-app #agenda-new{
    grid-area: new !important;
    justify-self: stretch !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
body.logged-app #agenda-refresh{
    grid-area: refresh !important;
  }
}

.agenda-package-summary{margin:0 0 14px;padding:12px 14px;border:1px solid #cfe0ee;border-radius:13px;background:#f2f8fd;color:var(--primary);font-size:11px;font-weight:850;text-align:center}

.agenda-detail-actions-three{grid-template-columns:repeat(3,1fr)}

.agenda-add-package-btn{width:100%;min-height:42px;margin-top:10px;border:1px dashed #93bddb;border-radius:12px;background:#f5fbff;color:var(--primary-2);font-weight:850;cursor:pointer}

.agenda-package-client{margin-bottom:15px;padding:12px 14px;border-radius:12px;background:var(--surface-2);color:var(--primary);font-weight:850;text-transform:uppercase}

#agenda-prontuario-text{min-height:260px;line-height:1.55}

@media (max-width:700px){
.agenda-detail-actions-three{grid-template-columns:1fr}
.agenda-detail-actions-three button{min-height:46px}
.agenda-package-summary{font-size:10px}
}

.agenda-form-package-box{width:100%;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border:1px solid #cfe0ee;border-radius:13px;background:#f2f8fd}

.agenda-form-package-box span{display:block;color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase}

.agenda-form-package-box strong{display:block;margin-top:4px;color:var(--primary);font-size:12px}

.agenda-form-package-box button{flex:0 0 auto;min-height:38px;padding:8px 12px;border:1px solid #b9d4e8;border-radius:10px;background:#fff;color:var(--primary-2);font-size:10px;font-weight:900;cursor:pointer}

.agenda-form-package-box button:disabled{opacity:.45;cursor:default}

@media (max-width:700px){
.agenda-form-package-box{align-items:stretch;flex-direction:column}
.agenda-form-package-box button{width:100%}
}

#agenda-prontuario-text[readonly]{background:var(--surface-2);color:var(--text);cursor:default;box-shadow:none}

.agenda-filter-head-actions{display:flex;align-items:center;gap:9px;margin-left:auto}

.agenda-filter-prontuarios{width:auto;min-width:130px}

.agenda-package-paid-field{display:flex;align-items:flex-end}

.agenda-package-paid-check{width:100%;min-height:45px;margin:0;padding:10px 13px;display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);cursor:pointer}

.agenda-package-paid-check input{width:18px;min-height:18px;height:18px;margin:0;flex:0 0 auto}

.agenda-package-paid-check span{color:var(--primary);font-size:11px;font-weight:800}

.agenda-package-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:12px}

.agenda-package-actions .hidden + .agenda-package-paid-btn.hidden{display:none}

.agenda-package-paid-btn{min-height:42px;border:1px solid #b9e1cf;border-radius:12px;background:#edf9f3;color:#16724f;font-weight:850;cursor:pointer}

.agenda-client-prontuario-card{padding:15px 16px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}

.agenda-client-prontuario-card header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--line)}

.agenda-client-prontuario-card header strong{color:var(--primary);font-size:12px}

.agenda-client-prontuario-card header span{color:var(--muted);font-size:11px}

.agenda-client-prontuario-card header b{color:var(--primary-2);font-size:10px}

.agenda-client-prontuario-card>div{padding:13px 0;color:var(--text);font-size:12px;line-height:1.55;white-space:pre-wrap}

.agenda-client-prontuario-card>button{border:0;background:transparent;color:var(--primary-2);font-size:10px;font-weight:850;cursor:pointer;padding:0}

@media (max-width:700px){
.agenda-filter-head-actions{width:100%;display:grid;grid-template-columns:1fr}
.agenda-filter-prontuarios,
.agenda-filter-back{width:100%}
.agenda-client-prontuario-card header{grid-template-columns:1fr}
.agenda-package-actions{grid-template-columns:1fr}
}

.agenda-whatsapp-btn{background:#eaf8ef!important;border-color:#9ed8b2!important;color:#128c4a!important;display:flex!important;align-items:center;justify-content:center;gap:9px}

.agenda-whatsapp-btn:hover{background:#dff5e7!important}

.agenda-whatsapp-icon{width:24px;height:24px;display:inline-flex}

.agenda-whatsapp-icon svg{width:100%;height:100%}

.agenda-whatsapp-btn>span:last-child{display:flex;flex-direction:column;line-height:1.15}

.agenda-whatsapp-btn small{display:block;margin-top:3px;color:#3d7c57}

.agenda-status-wrap{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}

.agenda-prontuario-tag{padding:5px 8px;border-radius:999px;font-size:8px;font-weight:900;white-space:nowrap}

.agenda-prontuario-tag.ok{color:#176f55;background:#eaf8f1;border:1px solid #bfe6d2}

.agenda-prontuario-tag.missing{color:#a73f3f;background:#fff0f0;border:1px solid #efcaca}

.agenda-prontuarios-filters{padding:16px 20px;display:grid;grid-template-columns:180px minmax(300px,1fr) auto;gap:12px;align-items:end;border-bottom:1px solid var(--line)}

.agenda-prontuarios-filters .field{margin:0}

.agenda-prontuarios-periodo{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(170px,220px));gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}

.agenda-prontuarios-periodo.hidden{display:none!important}

.agenda-prontuarios-list{padding:16px 20px;display:grid;gap:11px}

.agenda-prontuario-list-card{padding:15px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface);display:grid;gap:10px}

.agenda-prontuario-list-head{display:flex;justify-content:space-between;gap:14px}

.agenda-prontuario-list-head strong{color:var(--primary);font-size:12px}

.agenda-prontuario-list-head span{color:var(--muted);font-size:10px}

.agenda-prontuario-list-text{white-space:pre-wrap;color:var(--text);font-size:11px;line-height:1.55}

.agenda-prontuario-list-card button{justify-self:end;border:1px solid var(--line);border-radius:9px;background:var(--primary-soft);color:var(--primary);padding:7px 12px;font-weight:800;cursor:pointer}

.agenda-prontuarios-open{width:auto!important;min-width:110px!important}

@media (max-width:760px){
.agenda-prontuarios-filters{grid-template-columns:1fr}
.agenda-prontuario-list-head{flex-direction:column}
.agenda-status-wrap{justify-content:flex-start}
.agenda-appointment .agenda-status-wrap{justify-content:flex-end}
.agenda-web-actions{flex-wrap:wrap}
.agenda-prontuarios-open{order:4;flex:1 1 100%!important}
}

body.logged-app.theme-dark .agenda-prontuario-list-card{background:var(--surface)}

body.logged-app.theme-dark .agenda-whatsapp-btn{background:#153c2a!important;border-color:#2d6847!important;color:#6ce39d!important}

.agenda-status-wrap{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}

.agenda-payment-tag{padding:5px 8px;border-radius:999px;font-size:8px;font-weight:900;white-space:nowrap;border:1px solid transparent}

.agenda-payment-tag.paid{color:#0b5d3b;background:#dff4e9;border-color:#9dd6b7}

.agenda-payment-tag.open{color:#9a4e00;background:#fff0d8;border-color:#efc27f}

body.logged-app.theme-dark .agenda-payment-tag.paid{color:#75e6ac;background:#123d2b;border-color:#286647}

body.logged-app.theme-dark .agenda-payment-tag.open{color:#ffc06a;background:#4b2d0b;border-color:#81531c}

@media (max-width:760px){
.agenda-status-wrap{justify-content:flex-end}
.agenda-filter-item .agenda-status-wrap{grid-column:1/-1;justify-self:end;margin-left:0}
}

.agenda-toolbar-client-group{
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(170px, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.agenda-toolbar-client-group .agenda-toolbar-search{ min-width: 0; }

.agenda-toolbar-client-group .agenda-prontuarios-open{
    width: auto !important;
    min-width: 102px !important;
    min-height: 38px;
    padding: 7px 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border: 0;
    box-shadow: 0 8px 18px rgba(11,42,74,.16);
}

.agenda-summary-inline{ gap: 6px !important; }

.agenda-summary-inline .agenda-summary-card{
    min-height: 38px !important;
    padding: 4px 6px !important;
    grid-template-columns: 24px auto minmax(0,1fr) !important;
    column-gap: 5px !important;
}

.agenda-summary-inline .agenda-summary-icon{
    width: 24px !important;
    height: 24px !important;
    border-radius: 7px !important;
    font-size: 11px !important;
}

.agenda-summary-inline .agenda-summary-card strong{ font-size: 13px !important; }

.agenda-summary-inline .agenda-summary-card span{ font-size: 8.5px !important; }

.agenda-package-actions{
    display: flex !important;
    justify-content: center;
    align-items: stretch;
    gap: 9px;
}

.agenda-package-actions .agenda-add-package-btn,
.agenda-package-actions .agenda-receipt-btn,
.agenda-package-actions .agenda-package-paid-btn{
    width: auto;
    flex: 1 1 0;
    max-width: 280px;
    margin-top: 10px;
}

.agenda-package-paid-btn{
    min-height: 44px;
    padding: 10px 18px;
    background: #eaf8f1;
    border-color: #9ed8b8;
    color: #126844;
}

.agenda-package-paid-btn:hover{ background: #dcf3e7; }

@media (max-width: 760px){
.agenda-toolbar-client-group{ grid-template-columns: minmax(0,1fr) auto; }
.agenda-toolbar-client-group .agenda-prontuarios-open{
        min-width: 88px !important;
        padding-left: 9px;
        padding-right: 9px;
        font-size: 10px;
    }
.agenda-summary-inline{ grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
.agenda-summary-inline .agenda-summary-card{
        grid-template-columns: 20px auto !important;
        grid-template-rows: auto auto;
        padding: 4px !important;
        column-gap: 4px !important;
    }
.agenda-summary-inline .agenda-summary-card > div:last-child{ display: block; min-width: 0; }
.agenda-summary-inline .agenda-summary-card strong{ display:block; font-size:12px !important; }
.agenda-summary-inline .agenda-summary-card span{ display:block; font-size:7px !important; white-space:normal; }
.agenda-summary-inline .agenda-summary-icon{ width:20px !important; height:20px !important; font-size:10px !important; }
}

.agenda-dictation-bar{
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-2);
}

.agenda-dictation-btn{
    width: auto;
    flex: 0 0 auto;
    min-height: 39px;
    padding: 8px 13px;
}

.agenda-dictation-btn.listening{
    color: #a83232;
    background: #fff0f0;
    border-color: #e8b9b9;
}

.agenda-dictation-status{
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.35;
}

.agenda-dictation-status.listening{
    color: #a83232;
    font-weight: 800;
}

@media (max-width: 700px){
.agenda-dictation-bar{ align-items: stretch; flex-direction: column; }
.agenda-dictation-btn{ width: 100%; }
}

.agenda-prontuarios-head-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}

.agenda-model-checkbox{display:flex;align-items:center;gap:9px;margin:0 0 10px;padding:11px 13px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);color:var(--primary);font-size:11px;font-weight:850;cursor:pointer}

.agenda-model-checkbox input{width:18px;height:18px;min-height:0;margin:0;accent-color:var(--primary-2)}

.agenda-modelo-help{margin:0 0 15px;color:var(--muted);font-size:11px;line-height:1.5}

.agenda-modelo-campos{display:grid;gap:9px}

.agenda-modelo-row{display:grid;grid-template-columns:minmax(0,1fr) 90px 38px;gap:9px;align-items:end;padding:10px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}

.agenda-modelo-row .field{margin:0}

.agenda-modelo-remove{width:38px;height:45px;border:1px solid #efc7c7;border-radius:10px;background:#fff5f5;color:#b23e3e;font-size:20px;cursor:pointer}

.agenda-modelo-add{width:100%;margin-top:11px}

@media (max-width:700px){
.agenda-prontuarios-head-actions{width:100%;display:grid;grid-template-columns:1fr}
.agenda-prontuarios-head-actions .btn{width:100%}
.agenda-modelo-row{grid-template-columns:minmax(0,1fr) 75px 38px}
.agenda-modelo-linhas-field input{padding-left:8px;padding-right:8px}
}

.agenda-prontuario-model-fields{
    display: grid;
    gap: 12px;
}

.agenda-prontuario-model-row{
    overflow: hidden;
    border: 1px solid #cfdae7;
    border-radius: 12px;
    background: #fff;
}

.agenda-prontuario-model-label{
    padding: 10px 13px 8px;
    color: var(--primary);
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 900;
    user-select: none;
}

.agenda-prontuario-model-answer{
    min-height: calc(var(--modelo-linhas, 1) * 24px + 22px);
    padding: 11px 13px;
    color: var(--text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    outline: none;
    line-height: 24px;
    font-size: 14px;
}

.agenda-prontuario-model-answer[contenteditable="true"]:focus{
    box-shadow: inset 0 0 0 2px rgba(15, 95, 156, .20);
    background: #fbfdff;
}

.agenda-prontuario-model-answer[contenteditable="false"]{
    background: #fbfdff;
}

.agenda-prontuario-template-bar{display:grid;grid-template-columns:90px minmax(150px,1fr) minmax(170px,1fr) auto;gap:9px;align-items:center;margin:10px 0;padding:10px;background:var(--surface-2);border:1px solid var(--line);border-radius:12px}

.agenda-prontuario-template-bar label{margin:0}

.agenda-favorite-check{display:flex;align-items:center;gap:7px;padding:10px 12px;border:1px solid #e4c35a;border-radius:11px;background:#fff9dc;color:#755900;font-weight:800}

.agenda-favorite-check input{width:auto;min-height:0}

.agenda-model-preview{display:flex;gap:10px;overflow-x:auto;margin:10px 0;padding:10px;background:#f7f9fc;border:1px solid var(--line);border-radius:14px}

.agenda-model-preview img{max-width:100%;max-height:360px;object-fit:contain;border-radius:8px;background:#fff;box-shadow:var(--shadow-sm)}

.agenda-model-toolbar{display:grid;grid-template-columns:1fr auto auto;gap:8px;margin-bottom:12px}

.agenda-modelo-delete{color:#b23e3e!important}

.agenda-prontuario-list-card.favorite{order:-1;background:linear-gradient(145deg,#fffdf2,#fff4c8);border-color:#dfbf4d;box-shadow:0 0 0 2px rgba(223,191,77,.12),var(--shadow-sm)}

.agenda-prontuario-list-card.favorite .agenda-prontuario-list-head strong{color:#7a5b00}

@media (max-width:700px){
.agenda-prontuario-template-bar{grid-template-columns:1fr}
.agenda-model-toolbar{grid-template-columns:1fr 1fr}
.agenda-model-toolbar select{grid-column:1/-1}
.agenda-model-preview img{max-height:250px}
}

.agenda-prontuario-modal-card{width:min(100%,1040px)!important}

.agenda-structured-form{display:grid!important;gap:18px;margin-top:12px}

.agenda-structured-page{overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow-sm)}

.agenda-structured-page-head{padding:17px 19px;border-bottom:1px solid var(--line);background:linear-gradient(135deg,var(--surface-2),var(--surface))}

.agenda-structured-page-head span{display:block;color:var(--primary-2);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}

.agenda-structured-page-head h4{margin:5px 0 0;color:var(--primary);font-size:18px}

.agenda-structured-page-head p{margin:5px 0 0;color:var(--muted);font-size:10px}

.agenda-structured-page-body{display:grid;gap:15px;padding:18px}

.agenda-structured-basic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}

.agenda-structured-basic-field{display:grid;gap:6px;margin:0}

.agenda-structured-basic-field.span-2{grid-column:span 2}

.agenda-structured-basic-field strong{color:var(--primary);font-size:10px}

.agenda-structured-question,
.agenda-structured-pulse,
.agenda-structured-image-answer,
.agenda-structured-gallery-section{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}

.agenda-structured-question h5,
.agenda-structured-pulse h5,
.agenda-structured-image-answer h5,
.agenda-structured-gallery-section>h5{margin:0 0 10px;color:var(--primary);font-size:12px;line-height:1.45}

.agenda-structured-question textarea,
.agenda-structured-image-response textarea,
.agenda-structured-gallery-card textarea{width:100%;resize:vertical;line-height:1.55;background:var(--surface);color:var(--text);border:1px solid #cfdae7;border-radius:11px;padding:11px 12px;font:inherit;font-size:12px}

.agenda-structured-pulse-table{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}

.agenda-structured-pulse-table>*{min-width:0;border-bottom:1px solid var(--line)}

.agenda-structured-pulse-table>*:nth-child(odd){border-right:1px solid var(--line)}

.agenda-structured-pulse-table>*:nth-last-child(-n/**/+2){border-bottom:0}

.agenda-structured-image-answer-content{display:grid;grid-template-columns:minmax(220px,.85fr) minmax(260px,1.15fr);gap:15px;align-items:stretch}

.agenda-structured-image-answer.below .agenda-structured-image-answer-content{grid-template-columns:1fr}

.agenda-structured-image-answer img{width:100%;max-height:390px;object-fit:contain;border:1px solid var(--line);border-radius:12px;background:#fff;padding:8px}

.agenda-structured-image-response{display:flex;flex-direction:column;gap:7px}

.agenda-structured-image-response strong{color:var(--muted);font-size:10px}

.agenda-structured-image-response textarea{flex:1;min-height:130px}

.agenda-structured-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}

.agenda-structured-gallery-card{padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--surface)}

.agenda-structured-gallery-card h6{margin:0 0 9px;color:var(--primary);font-size:12px}

.agenda-structured-gallery-content{display:grid;grid-template-columns:130px minmax(0,1fr);gap:10px;align-items:stretch}

.agenda-structured-gallery-content img{width:100%;height:210px;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:#fff;padding:5px}

.agenda-structured-gallery-content textarea{min-height:210px}

.agenda-structured-form.is-readonly input,
.agenda-structured-form.is-readonly textarea{background:#f5f7fa!important;color:var(--text);cursor:default}

.agenda-structured-form input:focus,
.agenda-structured-form textarea:focus{border-color:var(--primary-2);box-shadow:0 0 0 3px rgba(15,95,156,.1);outline:none}

.agenda-model-fixed-notice{display:flex;flex-direction:column;gap:4px;padding:13px 14px;border:1px solid #a9cdea;border-radius:13px;background:#edf7ff;color:var(--primary)}

.agenda-model-fixed-notice strong{font-size:12px}

.agenda-model-fixed-notice span{font-size:10px;color:var(--muted)}

.agenda-model-fixed-page{margin-top:10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}

.agenda-model-fixed-page h5{margin:0 0 8px;color:var(--primary);font-size:12px}

.agenda-model-fixed-page div{display:flex;flex-wrap:wrap;gap:6px}

.agenda-model-fixed-page span{padding:6px 8px;border-radius:8px;background:var(--surface);border:1px solid var(--line);color:var(--muted);font-size:9px}

body.logged-app.theme-dark .agenda-structured-image-answer img,
body.logged-app.theme-dark .agenda-structured-gallery-content img{background:#fff}

body.logged-app.theme-dark .agenda-model-fixed-notice{background:#102a44;border-color:#2b6088}

@media (max-width:760px){
.agenda-prontuario-modal-card{width:100%!important}
.agenda-structured-page-body{padding:12px}
.agenda-structured-basic-grid{grid-template-columns:1fr}
.agenda-structured-basic-field.span-2{grid-column:auto}
.agenda-structured-image-answer-content,
.agenda-structured-gallery{grid-template-columns:1fr}
.agenda-structured-gallery-content{grid-template-columns:110px minmax(0,1fr)}
.agenda-structured-gallery-content img,
.agenda-structured-gallery-content textarea{height:180px;min-height:180px}
.agenda-structured-page-head{padding:14px}
}

@media (max-width:480px){
.agenda-structured-gallery-content{grid-template-columns:1fr}
.agenda-structured-gallery-content img{height:170px}
.agenda-structured-gallery-content textarea{min-height:120px;height:auto}
.agenda-structured-pulse-table{font-size:9px}
}

.agenda-prontuario-actions{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

#agenda-prontuario-pdf{ color: #0f5f9c; border-color: #9dc7e6; background: #edf7fd; }

#agenda-prontuario-pdf:hover{ background: #dceffc; }

#agenda-prontuario-resumo{
 color:#176f55;
 border-color:#9fd8c1;
 background:#effaf5;
}

#agenda-prontuario-resumo:hover{ background:#dff5eb; }

.agenda-prontuario-resumo-card{
 width:min(92vw,900px)!important;
 max-height:min(88vh,820px);
 overflow:hidden;
 display:flex;
 flex-direction:column;
}

.agenda-prontuario-resumo-card > .agenda-modal-head,
.agenda-prontuario-resumo-card > .agenda-prontuario-resumo-actions{
 flex:0 0 auto;
}

.agenda-prontuario-resumo-body{
 flex:1 1 auto;
 min-height:0;
 overflow-y:auto;
 overflow-x:hidden;
 overscroll-behavior:contain;
 padding:18px 20px 14px;
 background:var(--surface);
}

.agenda-prontuario-resumo-meta{
 margin-bottom:12px;
 padding:10px 12px;
 border:1px solid var(--line);
 border-radius:11px;
 background:var(--surface-2);
 color:var(--muted);
 font-size:11px;
 font-weight:750;
 line-height:1.45;
}

.agenda-prontuario-resumo-texto{
 margin:0;
 min-height:240px;
 padding:16px 17px;
 border:1px solid var(--line);
 border-radius:13px;
 background:var(--surface-2);
 color:var(--text);
 font:600 12px/1.7 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 white-space:pre-wrap;
 overflow-wrap:anywhere;
}

.agenda-prontuario-resumo-actions{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:9px;
 margin-top:0;
 padding:0 20px 20px;
}

.agenda-prontuario-resumo-actions .btn{width:100%}

body.logged-app.theme-dark #agenda-prontuario-pdf{
 color:#a9d6f4;
 border-color:#295e85;
 background:#102a44;
}

body.logged-app.theme-dark #agenda-prontuario-pdf:hover{ background:#173a5d; }

body.logged-app.theme-dark #agenda-prontuario-resumo{
 color:#9de2c4;
 border-color:#286b52;
 background:#12372b;
}

body.logged-app.theme-dark #agenda-prontuario-resumo:hover{ background:#184937; }

@media (max-width: 700px){
.agenda-prontuario-actions{ grid-template-columns: 1fr; }
.agenda-prontuario-resumo-card{width:100%!important;min-height:0!important;height:94vh;max-height:94vh}
.agenda-prontuario-resumo-body{padding:14px;overflow-y:auto;-webkit-overflow-scrolling:touch}
.agenda-prontuario-resumo-texto{min-height:200px;font-size:11px;padding:13px}
.agenda-prontuario-resumo-actions{grid-template-columns:1fr}
}

.agenda-prontuario-list-compact{grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:13px 16px}

.agenda-prontuario-list-info{display:grid;grid-template-columns:minmax(190px,1.5fr) minmax(125px,.7fr) minmax(160px,1fr);align-items:center;gap:14px;min-width:0}

.agenda-prontuario-list-info strong,
.agenda-prontuario-list-info b,
.agenda-prontuario-list-info span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.agenda-prontuario-list-info strong{font-size:12px;color:var(--text)}

.agenda-prontuario-list-info span{font-size:11px;color:var(--muted)}

.agenda-prontuario-list-info b{font-size:11px;color:var(--primary)}

.agenda-prontuario-star{justify-self:auto!important;border:0!important;background:transparent!important;padding:3px!important;font-size:25px!important;line-height:1;color:#a7b0bf!important;cursor:pointer}

.agenda-prontuario-star.active{color:#e0ad00!important}

.agenda-prontuario-list-actions{display:grid;grid-template-columns:78px 78px 88px;gap:8px;justify-content:end;min-width:260px}

.agenda-prontuario-list-actions button{justify-self:auto!important;min-width:0;width:100%}

.agenda-prontuario-action-placeholder{display:block;width:88px;visibility:hidden;pointer-events:none}

.agenda-input-locked{background:var(--surface-2)!important;color:var(--muted)!important;cursor:not-allowed}

@media (max-width:760px){
.agenda-prontuario-list-compact{grid-template-columns:auto 1fr}
.agenda-prontuario-list-info{grid-template-columns:1fr;gap:4px}
.agenda-prontuario-list-actions{grid-column:1/-1;width:100%;min-width:0;grid-template-columns:repeat(3,minmax(0,1fr))}
.agenda-prontuario-list-actions button{width:100%}
.agenda-prontuario-action-placeholder{width:100%}
}

.agenda-prontuario-list-info .agenda-prontuario-session{font-weight:800;color:var(--primary-2)}

.agenda-image-marker{display:flex;flex-direction:column;gap:8px;min-width:0}

.agenda-image-marker-toggle{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:800;color:var(--primary);cursor:pointer;user-select:none}

.agenda-image-marker-toggle input{width:16px;height:16px;accent-color:var(--primary)}

.agenda-image-marker-stage{position:relative;width:100%;min-width:0;background:#fff;border:1px solid var(--line);border-radius:12px;overflow:hidden}

.agenda-image-marker-stage>img{display:block;width:100%!important;height:auto!important;max-height:390px;object-fit:contain;border:0!important;border-radius:0!important;background:#fff!important;padding:8px!important;box-sizing:border-box}

.agenda-image-marker-layer{position:absolute;inset:0;cursor:crosshair}

.agenda-image-marker-toggle:has(input:not(:checked))+.agenda-image-marker-stage .agenda-image-marker-layer{cursor:default}

.agenda-image-point{position:absolute;z-index:2;transform:translate(-50%,-50%);width:25px;height:25px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 6px rgba(0,0,0,.38);color:#fff;font-size:10px;font-weight:900;display:grid;place-items:center;padding:0;cursor:pointer}

.agenda-image-point:disabled{cursor:default;opacity:1}

.agenda-image-point-delete{position:absolute;z-index:5;transform:translate(10px,-50%);white-space:nowrap;border:0;border-radius:8px;background:#9d2020;color:#fff;font-size:10px;font-weight:800;padding:7px 9px;box-shadow:0 3px 12px rgba(0,0,0,.28);cursor:pointer}

.agenda-image-marker-legend{display:flex;flex-direction:column;gap:6px}

.agenda-image-marker-legend-row{display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:7px}

.agenda-image-marker-legend-row>span{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:9px;font-weight:900;box-shadow:0 1px 4px rgba(0,0,0,.22)}

.agenda-image-marker-legend-row input{width:100%;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:8px 9px;font:inherit;font-size:11px;font-weight:700}

.agenda-structured-gallery-content>.agenda-image-marker{min-height:210px}

.agenda-structured-gallery-content>.agenda-image-marker .agenda-image-marker-stage{flex:1}

.agenda-structured-gallery-content>.agenda-image-marker .agenda-image-marker-stage>img{height:210px!important;max-height:210px}

body.logged-app.theme-dark .agenda-image-marker-stage,
body.logged-app.theme-dark .agenda-image-marker-stage>img{background:#fff!important}

@media (max-width:760px){
.agenda-image-marker-stage>img{max-height:300px}
.agenda-structured-gallery-content>.agenda-image-marker .agenda-image-marker-stage>img{height:180px!important;max-height:180px}
}

.agenda-settings-open{min-width:46px;padding-inline:13px;font-size:18px}

.agenda-settings-body{padding:18px;display:grid;gap:12px}

.agenda-setting-row{display:flex;align-items:center;justify-content:space-between;gap:18px;border:1px solid var(--line,#d9e3ef);border-radius:14px;padding:14px 16px;cursor:pointer}

.agenda-setting-row span{display:grid;gap:3px}

.agenda-setting-row small{color:#64748b;font-size:12px}

.agenda-setting-row input{width:20px;height:20px}

.agenda-packages-control-open{margin-top:4px;width:100%}

.agenda-status-alert{position:fixed;z-index:10050;left:50%;top:18px;transform:translate(-50%,-140%);opacity:0;pointer-events:none;min-width:min(560px,calc(100vw - 30px));max-width:760px;background:#123f67;color:#fff;border-radius:14px;padding:13px 18px;box-shadow:0 12px 36px rgba(15,23,42,.25);display:flex;justify-content:center;gap:7px;transition:.22s ease}

.agenda-status-alert.show{transform:translate(-50%,0);opacity:1}

.agenda-status-alert strong{font-weight:800}

.agenda-status-alert span{font-weight:600}

.agenda-packages-control-card{width:min(1120px,calc(100vw - 28px));max-height:88vh;display:flex;flex-direction:column}

.agenda-packages-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) 210px auto;gap:12px;align-items:end;padding:16px 18px;border-bottom:1px solid var(--line,#d9e3ef)}

.agenda-packages-list{padding:14px 18px 20px;overflow:auto;display:grid;gap:10px}

.agenda-package-control-item{display:grid;grid-template-columns:minmax(240px,1.5fr) minmax(260px,1fr) minmax(130px,.55fr) auto;align-items:center;gap:14px;border:1px solid #d8e2ee;border-left:5px solid #1f6fa8;border-radius:14px;padding:13px 14px;background:#fff}

.agenda-package-control-item.encerrado{border-left-color:#64748b}

.agenda-package-control-item.cancelado{border-left-color:#dc2626;opacity:.82}

.agenda-package-control-main{display:grid;gap:3px}

.agenda-package-control-main span{font-size:12px;color:#64748b}

.agenda-package-control-numbers{display:flex;gap:12px;flex-wrap:wrap}

.agenda-package-control-numbers span{font-size:12px;color:#64748b}

.agenda-package-control-numbers b{color:#0f2942;font-size:15px}

.agenda-package-control-value{display:grid;gap:4px}

.agenda-package-control-value span{font-size:12px;font-weight:700}

.agenda-package-control-value .paid{color:#16814b}

.agenda-package-control-value .open{color:#b35b00}

@media (max-width:820px){
.agenda-packages-toolbar{grid-template-columns:1fr}
.agenda-package-control-item{grid-template-columns:1fr}
.agenda-status-alert{top:10px;flex-direction:column;text-align:center}
.agenda-toolbar-client-group{grid-template-columns:minmax(0,1fr) auto auto}
}

body.logged-app.theme-dark .agenda-setting-row,
body.logged-app.theme-dark .agenda-package-control-item{background:#13283d;border-color:#2a455f;color:#e8f0f7}

body.logged-app.theme-dark .agenda-package-control-main span,
body.logged-app.theme-dark .agenda-package-control-numbers span,
body.logged-app.theme-dark .agenda-setting-row small{color:#a9bbcb}

body.logged-app.theme-dark .agenda-package-control-numbers b{color:#fff}

.agenda-top-row-compact{grid-template-columns:minmax(300px,.9fr) minmax(620px,1.9fr) auto!important;gap:8px!important;position:relative}

.agenda-toolbar-client-group{grid-template-columns:minmax(170px,1fr) auto!important}

.agenda-summary-inline{grid-template-columns:repeat(4,minmax(120px,1fr))!important}

.agenda-summary-inline .agenda-summary-card{min-width:0!important;padding:4px 5px!important}

.agenda-summary-inline .agenda-summary-card span{font-size:10.5px!important;font-weight:800!important;white-space:nowrap}

.agenda-summary-inline .agenda-summary-card strong{font-size:14px!important}

.agenda-toolbar-actions{display:flex;align-items:center;gap:6px;justify-content:flex-end}

.agenda-icon-action{position:relative;width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;display:grid!important;place-items:center;font-size:17px!important;border-radius:11px!important}

.agenda-settings-open{min-width:40px!important;padding:0!important;font-size:17px!important}

.agenda-notifications-wrap{position:relative}

.agenda-notifications-badge{position:absolute;right:-4px;top:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#c62828;color:#fff;font-size:10px;font-weight:900;display:grid;place-items:center;border:2px solid var(--surface,#fff)}

.agenda-notifications-panel{position:absolute;z-index:10020;right:0;top:48px;width:min(470px,calc(100vw - 28px));max-height:420px;background:var(--surface,#fff);border:1px solid var(--line,#d9e3ef);border-radius:14px;box-shadow:0 16px 40px rgba(15,23,42,.22);overflow:hidden}

.agenda-notifications-panel header{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line,#d9e3ef)}

.agenda-notifications-panel header button{border:0;background:transparent;font-size:22px;line-height:1;cursor:pointer;color:inherit}

.agenda-notifications-list{max-height:330px;overflow-y:auto;overflow-x:hidden;padding:7px;scrollbar-gutter:stable}

.agenda-notification-item{display:grid;grid-template-columns:92px minmax(0,1fr);gap:10px;padding:10px;border-radius:10px;border-bottom:1px solid var(--line,#e5edf5)}

.agenda-notification-item:last-child{border-bottom:0}

.agenda-notification-item time{font-size:10px;font-weight:800;color:var(--muted,#64748b);line-height:1.35}

.agenda-notification-item div{font-size:12px;line-height:1.35}

.agenda-notification-item strong{font-weight:900}

.agenda-notification-item span{display:block;margin-top:2px;color:var(--muted,#64748b)}

.agenda-notification-item{min-height:62px}

.agenda-notifications-list::-webkit-scrollbar{width:8px}

.agenda-notifications-list::-webkit-scrollbar-thumb{background:rgba(100,116,139,.38);border-radius:999px}

body.logged-app.theme-dark .agenda-notifications-panel{background:#13283d;border-color:#2a455f;color:#e8f0f7}

@media (max-width:1150px){
.agenda-top-row-compact{grid-template-columns:minmax(250px,.9fr) minmax(470px,1.6fr) auto!important}
.agenda-summary-inline .agenda-summary-card span{font-size:9px!important}
.agenda-summary-inline{grid-template-columns:repeat(4,minmax(95px,1fr))!important}
}

@media (max-width:820px){
.agenda-top-row-compact{grid-template-columns:1fr!important}
.agenda-toolbar-actions{position:absolute;right:8px;top:8px}
.agenda-summary-inline{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.agenda-summary-inline .agenda-summary-card span{font-size:8px!important;white-space:normal}
}

#agenda-settings-open{font-size:26px!important;line-height:1!important;font-weight:700!important}

#agenda-settings-open:not(:disabled){display:inline-grid!important;place-items:center!important}

.agenda-notification-item{position:relative;padding-right:38px}

.agenda-notification-delete{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:var(--muted,#64748b);font-size:20px;line-height:1;cursor:pointer}

.agenda-notification-delete:hover{background:rgba(198,40,40,.10);color:#c62828}

.agenda-notifications-footer{padding:9px;border-top:1px solid var(--line,#d9e3ef);background:var(--surface,#fff)}

.agenda-notifications-footer button{width:100%;min-height:38px;border:1px solid #efb4b4;border-radius:10px;background:#fff7f7;color:#b83232;font-weight:800;cursor:pointer}

.agenda-notifications-footer button:hover{background:#fdeaea}

body.logged-app.theme-dark .agenda-notifications-footer{background:#13283d;border-color:#2a455f}

body.logged-app.theme-dark .agenda-notifications-footer button{background:#2d1d25;border-color:#70404a;color:#ffb4b4}

.agenda-export-modal-card{max-width:760px;width:min(760px,calc(100vw - 28px));}

.agenda-export-body{padding:18px;display:grid;gap:16px;}

.agenda-export-summary{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:12px 14px;background:var(--card-soft,#f4f8fc);border:1px solid var(--border,#d7e2ed);}

.agenda-export-summary span{font-size:12px;color:var(--muted,#64748b);}

.agenda-export-list{display:grid;gap:8px;max-height:350px;overflow-y:auto;padding-right:4px;}

.agenda-export-item{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:center;padding:11px 12px;border:1px solid var(--border,#d7e2ed);background:var(--card,#fff);cursor:pointer;}

.agenda-export-item:hover{background:var(--card-soft,#f7fafc);}

.agenda-export-item input{width:18px;height:18px;}

.agenda-export-item-info{display:grid;gap:3px;}

.agenda-export-item-info strong{font-size:13px;}

.agenda-export-item-info span{font-size:12px;color:var(--muted,#64748b);}

.agenda-export-actions{display:flex;justify-content:flex-end;gap:10px;}

.agenda-export-empty{padding:24px;text-align:center;color:var(--muted,#64748b);border:1px dashed var(--border,#d7e2ed);}

@media (max-width:640px){
.agenda-export-summary{align-items:flex-start;flex-direction:column}
.agenda-export-actions{display:grid;grid-template-columns:1fr 1fr}
.agenda-prontuarios-head-actions{flex-wrap:wrap}
}

.agenda-prontuarios-head-actions{
    flex-wrap:nowrap;
    justify-content:flex-end;
}

.agenda-prontuarios-head-actions .btn{
    width:auto !important;
    min-width:0 !important;
    flex:0 0 auto;
    padding-left:14px;
    padding-right:14px;
    white-space:nowrap;
}

@media (max-width:700px){
.agenda-prontuarios-head-actions{
        width:100%;
        display:flex;
        flex-wrap:wrap;
        justify-content:flex-start;
    }
.agenda-prontuarios-head-actions .btn{width:auto !important;}
}

@media (max-width:640px){
.agenda-export-actions{grid-template-columns:1fr;}
}

@media (max-width: 820px){
.agenda-top-row-compact{
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 10px 8px !important;
        align-items: center !important;
    }
.agenda-toolbar-client-group{
        grid-column: 1;
        grid-row: 1;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 6px !important;
        min-width: 0;
    }
.agenda-toolbar-search,
#agenda-history-client-name{
        min-width: 0 !important;
        width: 100% !important;
    }
.agenda-toolbar-client-group .agenda-prontuarios-open{
        min-width: 78px !important;
        padding-left: 7px !important;
        padding-right: 7px !important;
        font-size: 9px !important;
        white-space: nowrap !important;
    }
.agenda-toolbar-actions{
        position: static !important;
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        display: flex !important;
        gap: 5px !important;
    }
.agenda-icon-action{
        width: 40px !important;
        min-width: 40px !important;
        height: 40px !important;
    }
.agenda-summary-inline{
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 430px){
.agenda-top-row-compact{ gap: 9px 6px !important; }
.agenda-toolbar-client-group{ gap: 5px !important; }
.agenda-toolbar-client-group .agenda-prontuarios-open{
        min-width: 72px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        font-size: 8.5px !important;
    }
.agenda-toolbar-actions{ gap: 4px !important; }
.agenda-icon-action{
        width: 38px !important;
        min-width: 38px !important;
        height: 38px !important;
    }
}

@media (max-width: 980px){
body.logged-app #agenda-date-actions-row.hidden{
    display: none !important;
  }
body.logged-app #agenda-toolbar-row.hidden{
    display: none !important;
  }
}

.agenda-summary-inline{ grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }

.agenda-client-scheduled-item{ grid-template-columns: 70px minmax(0,1fr) auto !important; }

.agenda-client-open-label{ color: var(--primary); font-weight: 900; font-size: 11px; }

@media (max-width: 980px){
.agenda-summary-inline{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
.agenda-summary-inline .agenda-summary-card:last-child{ grid-column: 1 / -1; }
}

@media (max-width: 700px){
.agenda-client-scheduled-item{ grid-template-columns: 52px minmax(0,1fr) auto !important; }
}

.agenda-comparador-modal-card{ width:min(100%, 900px); }

.agenda-comparador-body{ padding:20px 24px 24px; }

.agenda-comparador-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }

.agenda-comparador-summary{ display:flex; align-items:center; justify-content:space-between; gap:14px; margin:2px 0 12px; padding:11px 13px; border:1px solid var(--line); border-radius:12px; background:var(--surface-2); }

.agenda-comparador-summary strong{ color:var(--primary); font-size:12px; white-space:nowrap; }

.agenda-comparador-summary span{ color:var(--muted); font-size:10px; line-height:1.45; text-align:right; }

.agenda-comparador-datas{ max-height:360px; overflow-y:auto; border:1px solid var(--line); border-radius:14px; background:#fbfdff; }

.agenda-comparador-item{ display:grid; grid-template-columns:auto 1fr; gap:11px; align-items:center; padding:13px 14px; border-bottom:1px solid #e7eef5; cursor:pointer; }

.agenda-comparador-item:last-child{ border-bottom:0; }

.agenda-comparador-item:hover{ background:#f3f8fc; }

.agenda-comparador-item input{ width:18px; height:18px; min-height:0; margin:0; }

.agenda-comparador-item-info strong{ display:block; color:var(--primary); font-size:12px; }

.agenda-comparador-item-info span{ display:block; margin-top:3px; color:var(--muted); font-size:10px; }

.agenda-comparador-actions{ display:flex; justify-content:flex-end; gap:9px; margin-top:16px; }

.agenda-comparador-actions .btn{ width:auto; }

@media (max-width:700px){
.agenda-comparador-grid{ grid-template-columns:1fr; gap:0; }
.agenda-comparador-summary{ align-items:flex-start; flex-direction:column; }
.agenda-comparador-summary span{ text-align:left; }
.agenda-comparador-actions{ display:grid; grid-template-columns:1fr; }
.agenda-comparador-actions .btn{ width:100%; }
.agenda-prontuarios-head-actions{ flex-wrap:wrap; }
}

.agenda-prontuario-foto{margin-top:18px;padding:16px;border:1px solid var(--line);border-radius:14px;background:#f8fbfe}

.agenda-prontuario-foto-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}

.agenda-prontuario-foto-head strong{color:var(--primary)}

.agenda-prontuario-foto-head small{color:var(--muted);font-size:9px}

.agenda-prontuario-foto-grid{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end}

.agenda-prontuario-foto-actions{display:flex;gap:8px;margin-bottom:14px}

.agenda-prontuario-foto-actions .btn{width:auto;white-space:nowrap}

.agenda-prontuario-foto-preview{display:flex;align-items:center;gap:12px;margin-top:8px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:12px}

.agenda-prontuario-foto-preview img{width:110px;height:110px;object-fit:contain;border-radius:8px;background:#eef3f7}

.agenda-prontuario-foto-preview span{font-size:10px;color:var(--muted)}

@media (max-width:650px){
.agenda-prontuario-foto-head{align-items:flex-start;flex-direction:column}
.agenda-prontuario-foto-grid{grid-template-columns:1fr}
.agenda-prontuario-foto-actions{margin-top:-8px}
.agenda-prontuario-foto-preview img{width:90px;height:90px}
}

body.logged-app.theme-dark .agenda-form-package-box,
body.logged-app.theme-dark .agenda-prontuario-foto{
    background: var(--surface-2) !important;
    border-color: var(--line) !important;
}

body.logged-app.theme-dark .agenda-form-package-box button,
body.logged-app.theme-dark .agenda-prontuario-foto-preview{
    background: var(--surface) !important;
    border-color: var(--line) !important;
}

body.logged-app.theme-dark .agenda-form-package-box span,
body.logged-app.theme-dark .agenda-prontuario-foto-head small,
body.logged-app.theme-dark .agenda-prontuario-foto-preview span{
    color: var(--muted) !important;
}

body.logged-app.theme-dark .agenda-form-package-box strong,
body.logged-app.theme-dark .agenda-prontuario-foto-head strong{
    color: var(--text) !important;
}

body.logged-app.theme-dark .agenda-prontuario-foto-preview img{
    background: #ffffff !important;
}

body.logged-app.theme-dark .agenda-package-summary{
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
    box-shadow: none !important;
}

.agenda-notifications-panel{
    display: flex;
    flex-direction: column;
    max-height: min(420px, calc(100vh - 150px));
    overflow: hidden;
}

.agenda-notifications-list{
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.agenda-notifications-footer{
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

@media (max-width: 700px){
.agenda-notifications-panel{
        max-height: calc(100vh - 110px);
    }
}

#agenda-form-package-status.paid{color:#168b60}

#agenda-form-package-status.open{color:#c46b0a}

.agenda-package-edit-actions{align-items:center}

.agenda-package-edit-actions .agenda-modal-actions-spacer{flex:1}

.agenda-package-edit-actions .btn-danger{width:auto}

@media (max-width:620px){
.agenda-package-edit-actions{display:grid;grid-template-columns:1fr 1fr}
.agenda-package-edit-actions .agenda-modal-actions-spacer{display:none}
.agenda-package-edit-actions #agenda-package-edit-delete{grid-column:1/-1}
}

#screen-agenda.screen.active{
    animation: none;
}

.agenda-web-nav{ grid-template-columns:46px minmax(210px,1fr) 46px 46px; }

.agenda-view-toggle{
    width:46px; min-height:46px; padding:0; display:grid; place-items:center;
    border:1px solid var(--line); border-radius:12px; background:#fff; color:var(--primary);
    cursor:pointer; transition:.16s ease;
}

.agenda-view-toggle svg{ width:22px; height:22px; }

.agenda-view-toggle:hover,
.agenda-view-toggle.active{ background:var(--primary); color:#fff; border-color:var(--primary); }

.agenda-week-scroll{ width:100%; overflow:auto; }

.agenda-week-grid{
    min-width:980px; display:grid; grid-template-columns:74px repeat(7,minmax(125px,1fr));
    background:#fff;
}

.agenda-week-grid > *{ border-right:1px solid #e5edf4; border-bottom:1px solid #e5edf4; }

.agenda-week-corner,
.agenda-week-day{
    position:sticky; top:0; z-index:4; min-height:64px; padding:10px 8px;
    display:flex; flex-direction:column; justify-content:center; align-items:center;
    background:#f5f9fc; color:var(--primary);
}

.agenda-week-corner{ left:0; z-index:5; font-size:10px; font-weight:850; }

.agenda-week-day strong{ font-size:11px; text-transform:uppercase; }

.agenda-week-day span{ margin-top:4px; color:var(--muted); font-size:9px; }

.agenda-week-day.today{ background:var(--primary-soft); color:var(--primary-2); }

.agenda-week-time{
    position:sticky; left:0; z-index:3; min-height:84px; padding:14px 10px;
    background:#fbfdff; color:#587088; text-align:right; font-size:10px; font-weight:850;
}

.agenda-week-cell{ min-height:84px; padding:5px; background:#fff; }

.agenda-week-free{
    width:100%; height:100%; min-height:72px; border:1px dashed transparent; border-radius:10px;
    background:transparent; color:#aac0d2; font-size:20px; cursor:pointer; opacity:.42;
}

.agenda-week-cell:hover .agenda-week-free{ opacity:1; border-color:#bcd2e4; background:#f6fbff; color:var(--primary-2); }

.agenda-week-appointment{
    width:100%; margin-bottom:4px; padding:7px 8px; display:block; text-align:left;
    border:1px solid #dbe5ee; border-left:4px solid #d88d12; border-radius:9px;
    background:#fff; cursor:pointer;
}

.agenda-week-appointment:last-child{ margin-bottom:0; }

.agenda-week-appointment.confirmada{ border-left-color:#6658dc; background:#faf9ff; }

.agenda-week-appointment.realizada{ border-left-color:#168b60; background:#f6fcf9; }

.agenda-week-appointment.cancelada,
.agenda-week-appointment.faltou{ border-left-color:#cf5656; opacity:.65; }

.agenda-week-appointment strong{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#18263a; font-size:9px; text-transform:uppercase; }

.agenda-week-appointment span{ display:block; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#698096; font-size:8px; text-transform:uppercase; }

@media (max-width:700px){
.agenda-web-nav{ grid-template-columns:40px minmax(0,1fr) 40px 40px !important; gap:6px; }
.agenda-view-toggle{ width:40px; min-height:42px; }
.agenda-date-main strong{ font-size:12px; }
.agenda-week-head .agenda-legend{ display:none; }
.agenda-week-grid{ min-width:900px; }
}

body.logged-app .agenda-top-row-main .agenda-web-nav,
body.logged-app .agenda-web-nav{
    grid-template-columns: 42px minmax(220px, 1fr) 42px 42px !important;
    width: min(100%, 610px) !important;
    flex: 1 1 610px;
}

body.logged-app .agenda-top-row-main{
    flex-wrap: nowrap !important;
}

body.logged-app .agenda-top-row-main .agenda-web-actions{
    flex: 0 0 auto;
}

.agenda-week-corner,
.agenda-week-day{
    min-height: 46px;
    padding: 6px 7px;
}

.agenda-week-day strong{ font-size: 10px; }

.agenda-week-day span{ margin-top: 2px; font-size: 8px; }

.agenda-week-time{
    min-height: 43px;
    padding: 13px 8px 6px;
    font-size: 9px;
}

.agenda-week-cell{
    min-height: 43px;
    padding: 3px;
}

.agenda-week-free{
    min-height: 35px;
    height: 35px;
    border-radius: 7px;
    font-size: 16px;
}

.agenda-week-appointment{
    margin-bottom: 2px;
    padding: 4px 6px;
    border-left-width: 3px;
    border-radius: 6px;
    line-height: 1.05;
}

.agenda-week-appointment strong{ font-size: 8px; }

.agenda-week-appointment span{ margin-top: 1px; font-size: 7px; }

@media (max-width: 1100px){
body.logged-app .agenda-top-row-main{
        flex-wrap: wrap !important;
    }
body.logged-app .agenda-top-row-main .agenda-web-nav{
        flex: 1 1 100%;
        width: 100% !important;
    }
}

@media (max-width: 700px){
body.logged-app .agenda-top-row-main .agenda-web-nav,
body.logged-app .agenda-web-nav{
        grid-template-columns: 40px minmax(0, 1fr) 40px 40px !important;
        width: 100% !important;
    }
}

body.logged-app #agenda-date-actions-row .agenda-web-nav{
    display: grid !important;
    grid-template-columns: 42px minmax(220px, 1fr) 42px 42px !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    gap: 8px !important;
    width: min(100%, 610px) !important;
}

body.logged-app #agenda-date-actions-row #agenda-prev{ grid-column: 1 !important; grid-row: 1 !important; }

body.logged-app #agenda-date-actions-row .agenda-date-picker-wrap{ grid-column: 2 !important; grid-row: 1 !important; min-width: 0 !important; }

body.logged-app #agenda-date-actions-row #agenda-next{ grid-column: 3 !important; grid-row: 1 !important; }

body.logged-app #agenda-date-actions-row #agenda-view-toggle{ grid-column: 4 !important; grid-row: 1 !important; }

@media (max-width: 980px){
body.logged-app #agenda-date-actions-row .agenda-web-nav{
        grid-template-columns: 40px minmax(0, 1fr) 40px 40px !important;
        width: 100% !important;
    }
}

body.logged-app #agenda-date-actions-row .agenda-web-nav{
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    grid-template-rows: 40px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    gap: 8px !important;
    align-items: center !important;
    flex: 1 1 auto !important;
}

body.logged-app #agenda-date-actions-row #agenda-prev{
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 38px !important;
    min-height: 38px !important;
}

body.logged-app #agenda-date-actions-row .agenda-date-picker-wrap{
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
}

body.logged-app #agenda-date-actions-row .agenda-date-main{
    min-height: 40px !important;
}

body.logged-app #agenda-date-actions-row .agenda-next-tools{
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 7px !important;
    width: auto !important;
    min-width: max-content !important;
}

body.logged-app #agenda-date-actions-row .agenda-next-tools #agenda-next,
body.logged-app #agenda-date-actions-row .agenda-next-tools #agenda-view-toggle{
    position: static !important;
    float: none !important;
    margin: 0 !important;
    width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    flex: 0 0 38px !important;
    grid-column: auto !important;
    grid-row: auto !important;
}

body.logged-app #agenda-date-actions-row .agenda-next-tools #agenda-view-toggle{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

body.logged-app #agenda-date-actions-row .agenda-next-tools #agenda-view-toggle svg{
    width: 19px !important;
    height: 19px !important;
    pointer-events: none !important;
}

@media (max-width: 1100px){
body.logged-app #agenda-date-actions-row{
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 8px !important;
    }
body.logged-app #agenda-date-actions-row .agenda-web-nav{
        width: 100% !important;
        flex: none !important;
    }
body.logged-app #agenda-date-actions-row .agenda-web-actions{
        width: auto !important;
        flex-wrap: nowrap !important;
    }
}

@media (max-width: 760px){
body.logged-app #agenda-date-actions-row{
        grid-template-columns: 1fr !important;
    }
body.logged-app #agenda-date-actions-row .agenda-web-actions{
        width: 100% !important;
    }
}

.agenda-detail-actions.agenda-detail-actions-three{grid-template-columns:repeat(4,minmax(0,1fr))}

.agenda-receipt-settings{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);display:grid;gap:9px}

.agenda-receipt-settings>strong{color:var(--primary);font-size:12px}

.agenda-receipt-settings .field{margin:0}

.agenda-receipt-settings input{min-height:40px;font-size:13px}

@media (max-width:700px){
.agenda-detail-actions.agenda-detail-actions-three{grid-template-columns:1fr 1fr}
}

.agenda-receipt-btn{min-height:42px;padding:9px 16px;border:1px solid #9fc9e6;border-radius:12px;background:#eef8ff;color:var(--primary-2);font-weight:850;cursor:pointer}

.agenda-receipt-btn:hover{background:#e1f2fd;border-color:#75b3dc}

.agenda-company-data-open{width:100%;min-height:46px}

.agenda-company-data-card .agenda-settings-body{padding:20px 24px 24px}

.agenda-company-data-card .agenda-receipt-settings{border:0;padding:0;background:transparent}

.agenda-company-logo-row{display:grid;grid-template-columns:92px minmax(0,1fr);gap:14px;align-items:center}

.agenda-company-logo-preview{width:92px;height:92px;border:1px solid var(--line);border-radius:18px;background:#f7fafd;display:grid;place-items:center;overflow:hidden;color:var(--muted);font-size:10px;text-align:center}

.agenda-company-logo-preview img{width:100%;height:100%;object-fit:contain;background:#fff}

.agenda-company-logo-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}

.agenda-company-logo-actions .btn{width:auto;min-width:130px}

.agenda-company-logo-actions small{flex-basis:100%;color:var(--muted);font-size:9px;line-height:1.45}

@media (max-width:520px){
.agenda-company-logo-row{grid-template-columns:72px minmax(0,1fr)}
.agenda-company-logo-preview{width:72px;height:72px;border-radius:15px}
.agenda-company-logo-actions .btn{width:100%}
}

@media (max-width:560px){
.agenda-package-actions{flex-wrap:wrap}
.agenda-package-actions .agenda-add-package-btn,
.agenda-package-actions .agenda-receipt-btn,
.agenda-package-actions .agenda-package-paid-btn{min-width:calc(50% - 5px)}
}

.agenda-detail-actions.agenda-detail-actions-three{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.agenda-detail-actions.agenda-detail-actions-three > button{
    min-height: 58px !important;
    padding: 11px 12px !important;
    font-size: 12px !important;
}

.agenda-detail-actions.agenda-detail-actions-three > button small{
    font-size: 9px !important;
}

.agenda-week-cell{
    padding: 2px !important;
}

.agenda-week-cell{
    padding: 1px !important;
    display: flex;
    align-items: stretch;
}

.agenda-week-cell > *{
    width: 100%;
}

.agenda-week-appointment{
    min-height: 41px !important;
    height: 100% !important;
    flex: 1 1 auto;
    margin-bottom: 0 !important;
    padding: 4px 7px 4px !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 1px;
    overflow: hidden;
    border-left-width: 3px !important;
    border-right: 3px solid #d88d12 !important;
}

.agenda-week-appointment.confirmada{ border-right-color:#6658dc !important; }

.agenda-week-appointment.realizada{ border-right-color:#168b60 !important; }

.agenda-week-appointment.cancelada,
.agenda-week-appointment.faltou{ border-right-color:#cf5656 !important; }

.agenda-week-appointment .agenda-week-hour{
    display: block;
    width: 100%;
    text-align: center;
    color: #304d68;
    font-size: 10px !important;
    font-weight: 900;
    line-height: 1.0 !important;
    letter-spacing: .01em;
}

.agenda-week-appointment strong{
    width: 100%;
    text-align: center;
    font-size: 11.4px !important;
    line-height: 1.02 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: center;
}

.agenda-week-appointment span{
    width: 100%;
    text-align: center;
    margin-top: 1px !important;
    font-size: 8.2px !important;
    line-height: 1.05 !important;
}

#agenda-details-notes{
    min-height: 46px !important;
    max-height: 84px !important;
    overflow-y: auto;
    resize: none;
}

@media (max-width: 700px){
.agenda-detail-actions.agenda-detail-actions-three{
        grid-template-columns: 1fr !important;
    }
}

.agenda-week-corner,
.agenda-week-day{
    min-height: 58px !important;
    padding: 7px 6px !important;
}

.agenda-week-day strong{
    font-size: 13px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: .01em;
}

.agenda-week-day span{
    margin-top: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1.0 !important;
    color: #5f7388 !important;
}

.agenda-image-marker-body{display:flex;flex-direction:column;gap:8px;min-width:0}

.agenda-image-marker.legend-side .agenda-image-marker-body{display:grid;grid-template-columns:minmax(220px,.95fr) minmax(170px,.7fr);gap:14px;align-items:start}

.agenda-image-marker.legend-side .agenda-image-marker-legend{margin-top:0;align-self:stretch}

.agenda-image-marker.legend-side .agenda-image-marker-legend-row{grid-template-columns:24px minmax(0,1fr)}

.agenda-image-marker.legend-side .agenda-image-marker-stage>img{max-height:370px}

.agenda-structured-image-answer.answer-below{display:grid;gap:10px}

.agenda-structured-image-answer.answer-below .agenda-structured-image-answer-content{grid-template-columns:1fr!important}

.agenda-structured-image-answer.answer-below .agenda-structured-image-response{margin-top:0}

.agenda-structured-image-answer.answer-below .agenda-structured-image-response textarea{min-height:84px!important;max-height:84px!important;resize:none}

@media (max-width:760px){
.agenda-image-marker.legend-side .agenda-image-marker-body{grid-template-columns:1fr}
.agenda-structured-image-answer.answer-below .agenda-structured-image-response textarea{max-height:none}
}

.agenda-structured-gallery-card{display:grid;gap:10px}

.agenda-structured-gallery-content{grid-template-columns:1fr!important;gap:10px!important}

.agenda-structured-gallery-card .agenda-image-marker.legend-side .agenda-image-marker-body{grid-template-columns:minmax(180px,.95fr) minmax(150px,.75fr)}

.agenda-structured-gallery-card .agenda-image-marker-stage>img{max-height:260px!important;height:auto!important}

.agenda-structured-gallery-response{display:flex;flex-direction:column;gap:7px}

.agenda-structured-gallery-response strong{color:var(--muted);font-size:10px}

.agenda-structured-gallery-response textarea{width:100%;min-height:84px!important;max-height:84px!important;resize:none;line-height:1.55;background:var(--surface);color:var(--text);border:1px solid #cfdae7;border-radius:11px;padding:11px 12px;font:inherit;font-size:12px}

.agenda-structured-image-answer.answer-below .agenda-image-marker.legend-side .agenda-image-marker-body{grid-template-columns:minmax(220px,.95fr) minmax(170px,.7fr)}

@media (max-width:760px){
.agenda-structured-gallery-card .agenda-image-marker.legend-side .agenda-image-marker-body,
.agenda-structured-image-answer.answer-below .agenda-image-marker.legend-side .agenda-image-marker-body{grid-template-columns:1fr}
.agenda-structured-gallery-response textarea,
.agenda-structured-image-answer.answer-below .agenda-structured-image-response textarea{max-height:none}
}

.agenda-structured-form.is-readonly .pulse-head-field input{background:#f5f7fa!important}

.agenda-web-shell.agenda-week-active #agenda-toolbar-row{display:none!important}

.agenda-week-prontuarios-slot{display:none}

.agenda-web-shell.agenda-week-active .agenda-week-prontuarios-slot{display:block}

.agenda-web-shell.agenda-week-active #agenda-prontuarios-open{min-height:36px!important;padding:7px 12px!important;font-size:11px!important;min-width:auto!important}

.agenda-web-shell.agenda-week-active .agenda-week-head{padding:7px 12px!important;min-height:0!important}

.agenda-web-shell.agenda-week-active .agenda-week-head h3{font-size:13px!important;margin:0!important}

.agenda-web-shell.agenda-week-active .agenda-week-head p{display:none!important}

.agenda-web-shell.agenda-week-active .agenda-week-head .agenda-legend{font-size:9px!important;gap:8px!important}

.agenda-week-time,
.agenda-week-cell{min-height:28px!important;height:28px!important}

.agenda-week-time{padding:8px 6px 4px!important;font-size:8px!important}

.agenda-week-cell{position:relative!important;padding:1px!important;overflow:visible!important}

.agenda-week-free{min-height:24px!important;height:24px!important;font-size:13px!important;border-radius:5px!important}

.agenda-week-cell.occupied{background:#fbfdff}

.agenda-week-appointment{position:absolute!important;z-index:3;left:1px;right:1px;top:1px;width:auto!important;height:calc((28px * var(--agenda-week-span, 1)) - 2px)!important;min-height:24px!important;padding:2px 5px!important;justify-content:center!important;gap:1px!important;box-sizing:border-box;overflow:hidden!important}

.agenda-week-meta{display:flex!important;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0;line-height:1!important}

.agenda-week-meta .agenda-week-hour{width:auto!important;flex:0 0 auto;font-size:8px!important}

.agenda-week-meta em{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#698096;font-style:normal;font-size:7px!important;text-transform:uppercase}

.agenda-week-appointment strong{font-size:9.5px!important;line-height:1!important;-webkit-line-clamp:1!important;white-space:nowrap!important;display:block!important}

.agenda-web-shell:not(.agenda-week-active) #agenda-toolbar-row{display:grid!important}

.agenda-web-shell:not(.agenda-week-active) .agenda-week-prontuarios-slot{display:none!important}

.agenda-web-shell.agenda-week-active .agenda-week-corner,
.agenda-web-shell.agenda-week-active .agenda-week-day{
    min-height:38px!important;
    height:38px!important;
    padding:4px 5px!important;
}

.agenda-web-shell.agenda-week-active .agenda-week-day strong{
    font-size:11.5px!important;
    line-height:1!important;
}

.agenda-web-shell.agenda-week-active .agenda-week-day span{
    margin-top:2px!important;
    font-size:9px!important;
    line-height:1!important;
}

#agenda-prontuarios-origin{display:none!important}

.agenda-web-shell:not(.agenda-week-active) .agenda-toolbar-client-group{
    grid-template-columns:minmax(170px,1fr) auto!important;
}

.agenda-web-shell:not(.agenda-week-active) .agenda-toolbar-client-group .agenda-prontuarios-open{
    grid-column:2!important;
    grid-row:1!important;
    width:auto!important;
    min-width:102px!important;
}

#screen-agenda:has(.agenda-web-shell.agenda-week-active){
    margin-top:0!important;
}

.agenda-web-shell.agenda-week-active{
    align-content:start;
}

#screen-agenda.screen.active:has(.agenda-web-shell.agenda-week-active){
    position:relative!important;
    top:-24px!important;
    margin-bottom:-24px!important;
}

.agenda-payment-lock-note{margin-top:4px;padding:10px 12px;border:1px solid #f0d99c;border-radius:11px;background:#fff9e8;color:#7a5a08;font-size:10px;line-height:1.45}

#agenda-session-paid-btn{min-height:42px;border:1px solid #b9e1cf;border-radius:12px;background:#edf9f3;color:#16724f;font-weight:850;cursor:pointer}

#agenda-package-edit-delete:disabled{opacity:.45;cursor:not-allowed}

#agenda-package-edit-value[readonly],
#agenda-package-edit-service[readonly]{background:var(--surface-2);cursor:not-allowed}

.agenda-week-appointment[draggable="true"]{cursor:grab;user-select:none}

.agenda-week-appointment[draggable="true"]:active{cursor:grabbing}

.agenda-week-appointment.dragging{opacity:.38;transform:scale(.98)}

.agenda-week-grid.is-dragging .agenda-week-free{pointer-events:none}

.agenda-week-cell.drag-valid{background:#f3fbf7!important;box-shadow:inset 0 0 0 1px rgba(22,139,96,.22)}

.agenda-week-cell.drag-invalid{background:#fff7f7!important;box-shadow:inset 0 0 0 1px rgba(207,86,86,.16)}

.agenda-week-cell.drag-over{background:#dcf7e9!important;box-shadow:inset 0 0 0 2px #168b60!important}

.agenda-week-cell.appointment-start{z-index:8!important}

.agenda-week-cell.appointment-start .agenda-week-appointment{z-index:20!important}

.agenda-week-cell.occupied:not(.appointment-start){z-index:1}

.agenda-week-appointment{
    height:calc((28px * var(--agenda-week-span, 1)) - 2px)!important;
    max-height:none!important;
}

.agenda-week-grid{isolation:isolate}

.agenda-week-cell.blocked{background:#fff0f0!important;border-color:#efb8b8!important}

.agenda-week-blocked{width:100%;height:100%;border:0;background:transparent;color:#b42318;font-size:8px;font-weight:900;letter-spacing:.04em;cursor:context-menu}

.agenda-blocked-slot{width:100%;min-height:47px;padding:0 13px;display:flex;align-items:center;justify-content:space-between;border:1px solid #efb8b8;border-radius:13px;background:#fff0f0;color:#b42318;font-size:10px;font-weight:850;cursor:context-menu}

.agenda-blocked-slot b{font-size:16px}

.agenda-slot-blocked .agenda-slot-time{color:#b42318}

#agenda-form-time option[data-time-state="occupied"],
#agenda-form-time option[data-time-state="blocked"]{color:#9aa4b2;background:#f0f2f5}

#agenda-form-time option[data-time-state="free"]{color:#172033;background:#fff}

.agenda-week-cell.blocked.drag-valid{background:#fff0f0!important}

.agenda-week-day{
    appearance: none;
    width: 100%;
    font: inherit;
    cursor: pointer;
}

.agenda-week-day:hover{
    background: #fff1f1;
    border-color: #e5aaaa;
}

.agenda-week-day{
    border-top: 0 !important;
    border-left: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

.agenda-week-day:hover,
.agenda-week-day:focus,
.agenda-week-day:focus-visible,
.agenda-week-day:active{
    outline: none !important;
    box-shadow: none !important;
    border-top-color: transparent !important;
    border-left-color: transparent !important;
    background: #f5f9fc !important;
    color: var(--primary) !important;
}

.agenda-week-day.today,
.agenda-week-day.today:hover,
.agenda-week-day.today:focus,
.agenda-week-day.today:focus-visible,
.agenda-week-day.today:active{
    background: var(--primary-soft) !important;
    color: var(--primary-2) !important;
}

.agenda-week-grid > .agenda-week-day,
.agenda-week-grid > .agenda-week-day:hover,
.agenda-week-grid > .agenda-week-day:focus,
.agenda-week-grid > .agenda-week-day:focus-visible,
.agenda-week-grid > .agenda-week-day:active{
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 1px solid #e5edf4 !important;
    border-bottom: 1px solid #e5edf4 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: #f5f9fc !important;
    color: var(--primary) !important;
}

.agenda-week-grid > .agenda-week-day.today,
.agenda-week-grid > .agenda-week-day.today:hover,
.agenda-week-grid > .agenda-week-day.today:focus,
.agenda-week-grid > .agenda-week-day.today:focus-visible,
.agenda-week-grid > .agenda-week-day.today:active{
    background: var(--primary-soft) !important;
    color: var(--primary-2) !important;
    border-right-color: #e5edf4 !important;
    border-bottom-color: #e5edf4 !important;
}

.agenda-week-cell.blocked,
.agenda-week-cell.blocked:hover,
.agenda-week-cell.blocked:focus-within{
    background: #fff0f0 !important;
    border-color: #efb8b8 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.agenda-week-blocked,
.agenda-week-blocked:hover,
.agenda-week-blocked:focus,
.agenda-week-blocked:focus-visible,
.agenda-week-blocked:active{
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #b42318 !important;
    transform: none !important;
    filter: none !important;
}

.agenda-blocked-slot,
.agenda-blocked-slot:hover,
.agenda-blocked-slot:focus,
.agenda-blocked-slot:focus-visible,
.agenda-blocked-slot:active{
    border: 1px solid #efb8b8 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: #fff0f0 !important;
    color: #b42318 !important;
    transform: none !important;
    filter: none !important;
}

.agenda-week-cell.blocked,
.agenda-week-cell.blocked:hover,
.agenda-week-cell.blocked:focus,
.agenda-week-cell.blocked:focus-within,
.agenda-week-cell.blocked:active{
    background: #fff0f0 !important;
    border-top-color: #e5edf4 !important;
    border-right-color: #e5edf4 !important;
    border-bottom-color: #e5edf4 !important;
    border-left-color: #e5edf4 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.agenda-week-blocked,
.agenda-week-blocked:hover,
.agenda-week-blocked:focus,
.agenda-week-blocked:focus-visible,
.agenda-week-blocked:active{
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.agenda-week-appointment{
    padding: 1px 3px !important;
    gap: 0 !important;
}

.agenda-week-meta{
    gap: 3px !important;
    line-height: .95 !important;
}

.agenda-week-meta .agenda-week-hour{
    font-size: 10px !important;
    line-height: .95 !important;
}

.agenda-week-meta em{
    font-size: 9px !important;
    line-height: .95 !important;
}

.agenda-week-appointment strong{
    font-size: 11.5px !important;
    line-height: .98 !important;
    margin: 0 !important;
}

.agenda-week-time{
    font-size: 10px !important;
    line-height: 1 !important;
    padding: 7px 4px 3px !important;
}

.agenda-week-time,
.agenda-week-cell{
    min-height: 23px !important;
    height: 23px !important;
}

.agenda-week-time{
    font-size: 12px !important;
    line-height: 1 !important;
    padding: 4px 3px 1px !important;
}

.agenda-week-cell{
    padding: 1px !important;
}

.agenda-week-free{
    min-height: 19px !important;
    height: 19px !important;
    line-height: 1 !important;
}

.agenda-week-appointment{
    height: calc((23px * var(--agenda-week-span, 1)) - 2px) !important;
    min-height: 19px !important;
    padding: 0 2px !important;
    gap: 0 !important;
}

.agenda-week-meta{
    gap: 2px !important;
    line-height: .9 !important;
}

.agenda-week-meta .agenda-week-hour{
    font-size: 12px !important;
    line-height: .9 !important;
}

.agenda-week-meta em{
    font-size: 11px !important;
    line-height: .9 !important;
}

.agenda-week-appointment strong{
    font-size: 13.5px !important;
    line-height: .92 !important;
    margin: 0 !important;
}

.agenda-week-blocked{
    font-size: 10px !important;
    line-height: 1 !important;
}

.agenda-week-time,
.agenda-week-cell{
    min-height: 25px !important;
    height: 25px !important;
}

.agenda-week-free{
    min-height: 21px !important;
    height: 21px !important;
}

.agenda-week-appointment{
    height: calc((25px * var(--agenda-week-span, 1)) - 2px) !important;
    min-height: 21px !important;
}

.agenda-web-shell.agenda-week-active .agenda-week-head{
    min-height: 15px !important;
    height: 15px !important;
    padding: 1px 8px !important;
    justify-content: flex-end !important;
    border-bottom: 1px solid #e5edf4 !important;
    background: #fff !important;
}

.agenda-web-shell.agenda-week-active .agenda-week-head > div:first-child{
    display: none !important;
}

.agenda-web-shell.agenda-week-active .agenda-week-head .agenda-legend{
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    font-size: 7px !important;
    line-height: 1 !important;
    height: 12px !important;
    margin: 0 !important;
}

.agenda-web-shell.agenda-week-active .agenda-week-head .agenda-legend span{
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

.agenda-web-shell.agenda-week-active .agenda-week-head .agenda-legend i{
    width: 6px !important;
    height: 6px !important;
    margin-right: 3px !important;
}

.agenda-settings-card{ width: min(100%, 720px) !important; }

.agenda-whatsapp-template-settings{
    padding: 14px;
    background: #f8fbfe;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.agenda-whatsapp-template-head strong{ display:block; color:var(--primary); font-size:12px; }

.agenda-whatsapp-template-head small{ display:block; margin-top:3px; color:var(--muted); font-size:9px; }

.agenda-whatsapp-chips{ display:flex; flex-wrap:wrap; gap:6px; margin:11px 0 9px; }

.agenda-whatsapp-chips button{
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #bcd1e4;
    border-radius: 999px;
    background: #fff;
    color: var(--primary-2);
    font-size: 9px;
    font-weight: 850;
    cursor: pointer;
}

.agenda-whatsapp-chips button:hover{ background: var(--primary-soft); }

#agenda-whatsapp-template{
    width:100%; min-height:138px; padding:11px 12px; resize:vertical;
    border:1px solid #cfdae7; border-radius:12px; background:#fff;
    color:var(--text); font:inherit; font-size:12px; line-height:1.5;
}

#agenda-whatsapp-template:focus{ outline:none; border-color:var(--primary-2); box-shadow:0 0 0 4px rgba(15,95,156,.10); }

.agenda-whatsapp-template-actions{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:9px; }

.agenda-whatsapp-template-actions .btn{ width:100%; }

@media (max-width: 600px){
.agenda-whatsapp-template-actions{ grid-template-columns:1fr; }
}

.agenda-repeat-package-wrap{ margin-top: -2px; }

.agenda-repeat-package-check{
    display:flex; align-items:flex-start; gap:11px; margin:0; padding:13px 14px;
    border:1px solid #cfe0ee; border-radius:14px; background:#f4f9fd; cursor:pointer;
}

.agenda-repeat-package-check input{ width:19px; height:19px; min-height:0; margin:1px 0 0; flex:0 0 auto; }

.agenda-repeat-package-check span{ min-width:0; }

.agenda-repeat-package-check strong{ display:block; color:var(--primary); font-size:12px; }

.agenda-repeat-package-check small{ display:block; margin-top:4px; color:var(--muted); font-size:10px; line-height:1.4; }

.agenda-repeat-body{ padding:20px 24px 24px; }

.agenda-repeat-body > p{ margin:0 0 13px; color:var(--muted); font-size:11px; line-height:1.5; }

.agenda-repeat-list{ max-height:330px; overflow:auto; display:grid; gap:8px; }

.agenda-repeat-item{ display:flex; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid var(--line); border-radius:12px; background:#fff; }

.agenda-repeat-item strong{ color:var(--primary); font-size:11px; }

.agenda-repeat-item span{ font-size:10px; font-weight:850; white-space:nowrap; }

.agenda-repeat-item.available span{ color:#168b60; }

.agenda-repeat-item.unavailable{ background:#fff7f7; border-color:#efcccc; }

.agenda-repeat-item.unavailable span{ color:#b14343; }

.agenda-repeat-warning{ margin-top:12px; padding:10px 12px; border-radius:11px; background:#fff7df; border:1px solid #ead89d; color:#765c08; font-size:10px; line-height:1.45; }

@media (max-width:700px){
.agenda-repeat-body{padding:17px;}
.agenda-repeat-item{align-items:flex-start; flex-direction:column; gap:4px;}
}

.agenda-structured-pontos-cruz-section{display:grid;gap:10px;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}

.agenda-structured-pontos-cruz-section>h5{margin:0 0 10px;color:var(--primary);font-size:12px;line-height:1.45}

.agenda-structured-pontos-layout{display:grid;grid-template-columns:minmax(300px,420px) minmax(180px,260px);gap:18px;align-items:center}

.agenda-structured-pontos-cruz{position:relative;display:grid;grid-template-columns:repeat(2,minmax(170px,190px));justify-content:center;gap:18px 28px;max-width:420px;padding:18px 0 0;margin:0 auto}

.agenda-structured-pontos-cruz::before,
.agenda-structured-pontos-cruz::after{content:"";position:absolute;background:#111;border-radius:999px;pointer-events:none;z-index:0}

.agenda-structured-pontos-cruz::before{width:3px;top:6px;bottom:-6px;left:50%;transform:translateX(-50%)}

.agenda-structured-pontos-cruz::after{height:3px;left:50%;width:calc(100% - 88px);top:calc(50% + 9px);transform:translate(-50%,-50%)}

.agenda-structured-pontos-box{position:relative;z-index:1;display:grid;align-content:start}

.agenda-structured-pontos-box.has-top-label{padding-top:16px}

.agenda-structured-pontos-box.is-1,
.agenda-structured-pontos-box.is-2{transform:translateY(-6px)}

.agenda-structured-pontos-label{position:absolute;top:0;left:0;right:0;display:block;color:var(--primary,#0f2942);font-size:11px;font-weight:800;line-height:1.1;text-align:center}

.agenda-structured-pontos-box textarea{width:100%;min-height:84px;resize:none;line-height:1.55;background:var(--surface);color:var(--text);border:1px solid #cfdae7;border-radius:11px;padding:11px 12px;font:inherit;font-size:12px;box-shadow:none}

.agenda-structured-pontos-box textarea::placeholder{color:#a0adbc}

.agenda-structured-pontos-box textarea:focus{border-color:var(--primary-2,#0f5f9c);box-shadow:0 0 0 3px rgba(15,95,156,.10);background:var(--surface)}

.agenda-structured-pontos-side{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);display:grid;gap:10px;align-self:center}

.agenda-structured-pontos-side-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;margin:0}

.agenda-structured-pontos-side-row strong{color:var(--primary);font-size:11px;white-space:nowrap}

.agenda-structured-pontos-side-row input{min-height:38px;padding:9px 11px}

.agenda-structured-pontos-cruz-section textarea[readonly],
.agenda-structured-pontos-side-row input[readonly]{cursor:default}

body.logged-app.theme-dark .agenda-structured-pontos-label{color:#e7f1f9}

body.logged-app.theme-dark .agenda-structured-pontos-box textarea,
body.logged-app.theme-dark .agenda-structured-pontos-side{background:#091220;color:#edf4ff;border-color:#223550}

@media (max-width:760px){
.agenda-structured-pontos-layout{grid-template-columns:1fr}
.agenda-structured-pontos-side-row{grid-template-columns:1fr;gap:5px}
}

@media (max-width:640px){
.agenda-structured-pontos-cruz{grid-template-columns:repeat(2,minmax(130px,1fr));max-width:100%;gap:14px 22px;padding-top:18px}
.agenda-structured-pontos-cruz::before{top:6px;bottom:-4px}
.agenda-structured-pontos-cruz::after{width:calc(100% - 56px);top:calc(50% + 9px)}
.agenda-structured-pontos-box textarea{min-height:78px;font-size:11px;padding:8px 9px}
}

.agenda-lingua-section{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}

.agenda-lingua-section>h5{margin:0 0 10px;color:var(--primary);font-size:12px;line-height:1.45}

.agenda-lingua-layout{display:grid;grid-template-columns:minmax(240px,.95fr) minmax(240px,.75fr);gap:14px;align-items:start}

.agenda-lingua-image-wrap .agenda-image-marker-stage>img{max-height:300px!important}

.agenda-lingua-side{padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);display:grid;gap:10px;align-self:start}

.agenda-lingua-side-row{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:8px;margin:0}

.agenda-lingua-side-row strong{color:var(--primary);font-size:11px;white-space:nowrap}

.agenda-lingua-side-row input{min-height:38px;padding:9px 11px}

@media (max-width:760px){
.agenda-lingua-layout{grid-template-columns:1fr}
.agenda-lingua-side-row{grid-template-columns:1fr;gap:5px}
}

.agenda-lingua-side-row.is-textarea{grid-template-columns:1fr;gap:6px}

.agenda-lingua-side-row.is-textarea textarea{width:100%;min-height:62px;resize:none;line-height:1.55;background:var(--surface);color:var(--text);border:1px solid #cfdae7;border-radius:11px;padding:11px 12px;font:inherit;font-size:12px}

.agenda-lingua-side-row.is-textarea textarea::placeholder{color:#a0adbc}

.agenda-lingua-legend-wrap{display:grid;gap:8px;padding-top:2px}

.agenda-lingua-legend-wrap .agenda-image-marker-legend{display:flex;flex-direction:column;gap:7px}

.agenda-lingua-side{margin-top:64px}

@media (max-width:760px){
.agenda-lingua-side{margin-top:0}
.agenda-prontuarios-periodo{grid-template-columns:1fr}
}

.agenda-prontuarios-filters{
    grid-template-columns:180px minmax(380px,470px) minmax(190px,1fr) auto!important;
    align-items:end!important;
}

.agenda-prontuarios-periodo{
    grid-column:auto!important;
    grid-template-columns:repeat(2,minmax(170px,1fr))!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    align-items:end!important;
}

.agenda-prontuarios-periodo .field{min-width:0}

.agenda-prontuarios-periodo input[type="date"]{width:100%;min-width:0}

.agenda-lingua-layout{align-items:start!important}

.agenda-lingua-side{margin-top:0!important;align-self:start!important}

.agenda-lingua-image-wrap{align-self:start!important}

@media (max-width:1050px){
.agenda-prontuarios-filters{grid-template-columns:180px minmax(340px,1fr) minmax(190px,1fr)!important}
.agenda-prontuarios-filters>#agenda-prontuarios-filtrar{grid-column:1/-1}
}

@media (max-width:760px){
.agenda-prontuarios-filters{grid-template-columns:1fr!important}
.agenda-prontuarios-periodo{grid-template-columns:1fr 1fr!important}
.agenda-prontuarios-filters>#agenda-prontuarios-filtrar{grid-column:auto}
}

.agenda-prontuarios-filters > #agenda-prontuarios-filtrar{
    width:160px !important;
    min-width:160px !important;
    max-width:160px !important;
    justify-self:start !important;
    align-self:end !important;
    padding-left:18px !important;
    padding-right:18px !important;
}

@media (max-width:760px){
.agenda-prontuarios-filters > #agenda-prontuarios-filtrar{
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
        justify-self:stretch !important;
    }
}

#agenda-delete:disabled{
    cursor:not-allowed !important;
    opacity:.68;
    color:#6b7280 !important;
    background:#f3f4f6 !important;
    border-color:#d1d5db !important;
}

#agenda-delete:disabled:hover{
    transform:none !important;
    background:#f3f4f6 !important;
}

.agenda-rich-text{
    width: 100%;
    min-height: calc(var(--rich-lines, 2) * 1.35em + 22px);
    padding: 10px 12px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    color: var(--text);
    background: #fff;
    border: 1px solid #cfdae7;
    border-radius: 12px;
    outline: none;
    font: inherit;
    line-height: 1.35;
}

.agenda-rich-text[contenteditable="true"]:focus{
    border-color: var(--primary-2);
    box-shadow: 0 0 0 4px rgba(15,95,156,.10);
}

.agenda-rich-text[contenteditable="false"]{ background: #f8fafc; }

.agenda-prontuario-modal-head{
    align-items: flex-start;
}

.agenda-prontuario-head-actions{
    display: flex;
    align-items: flex-start;
    gap: 9px;
    flex: 0 0 auto;
}

.agenda-last-prontuario-btn{
    min-height: 38px;
    max-width: 220px;
    padding: 7px 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    border: 1px solid #b9cfe2;
    border-radius: 11px;
    background: #f7fbff;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    line-height: 1.05;
    text-align: left;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
}

.agenda-last-prontuario-btn:hover{
    background: var(--primary-soft);
    border-color: #96b9d5;
    transform: translateY(-1px);
}

.agenda-last-prontuario-btn > span{
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.agenda-last-prontuario-btn > small{
    display: block;
    margin: 0;
    color: #6b7f94;
    font-size: 8.5px;
    font-weight: 750;
    text-transform: none;
    white-space: nowrap;
}

@media (max-width: 700px){
.agenda-prontuario-modal-head{
        gap: 10px;
    }
.agenda-prontuario-head-actions{
        gap: 6px;
    }
.agenda-last-prontuario-btn{
        max-width: 170px;
        padding: 6px 9px;
    }
.agenda-last-prontuario-btn > span{
        font-size: 9px;
    }
.agenda-last-prontuario-btn > small{
        font-size: 7.5px;
    }
}

.agenda-terms-btn{
    position: relative;
    color: var(--primary) !important;
    background: linear-gradient(180deg, #ffffff, #f6faff) !important;
}

.agenda-terms-btn::after{
    content: "";
    position: absolute;
    right: 10px;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary-2);
    box-shadow: 0 0 0 4px rgba(15,95,156,.09);
}

.agenda-terms-models-open{ width: 100%; min-height: 46px; }

.agenda-terms-models-card{ width: min(100%, 860px); }

.agenda-terms-models-body,
.agenda-terms-patient-body{ padding: 20px 24px 24px; }

.agenda-terms-model-toolbar{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.agenda-terms-model-toolbar .field{ margin-bottom: 0; }

.agenda-terms-model-toolbar .btn{ width: auto; min-width: 105px; }

#agenda-terms-model-content{
    width: 100%;
    min-height: 330px;
    padding: 13px 14px;
    border: 1px solid #cfdae7;
    border-radius: 13px;
    outline: none;
    resize: vertical;
    color: var(--text);
    background: #fff;
    font: inherit;
    font-size: 13px;
    line-height: 1.6;
}

#agenda-terms-model-content:focus{
    border-color: var(--primary-2);
    box-shadow: 0 0 0 4px rgba(15,95,156,.10);
}

.agenda-terms-version-note{
    margin-top: -3px;
    padding: 11px 13px;
    color: #61748a;
    background: #f7fafd;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.5;
}

.agenda-terms-model-actions .btn{ width: auto; }

.agenda-modal-actions-spacer{ flex: 1; }

.agenda-terms-patient-card{ width: min(100%, 800px); }

.agenda-terms-generate-card{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 11px;
    align-items: end;
    padding: 15px;
    background: #f7fafd;
    border: 1px solid var(--line);
    border-radius: 15px;
}

.agenda-terms-generate-card .field{ margin: 0; }

.agenda-terms-generate-card .btn{ width: auto; min-width: 170px; }

.agenda-terms-generate-card > small{
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.agenda-terms-history{ margin-top: 18px; }

.agenda-terms-history-head{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.agenda-terms-history-head strong{ color: var(--primary); font-size: 13px; }

.agenda-terms-history-head span{ color: var(--muted); font-size: 9px; }

.agenda-terms-patient-list{ display: grid; gap: 9px; }

.agenda-term-item{
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.agenda-term-item-main{ min-width: 0; }

.agenda-term-item-main strong{
    display: block;
    color: var(--primary);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-term-item-meta{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 9px;
}

.agenda-term-status{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
}

.agenda-term-status::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }

.agenda-term-status.pendente{ color:#9a650c; background:#fff5e4; }

.agenda-term-status.assinado{ color:#147451; background:#eaf8f1; }

.agenda-term-status.cancelado,
.agenda-term-status.expirado{ color:#a73f3f; background:#fff0f0; }

.agenda-term-item-actions{ display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.agenda-term-item-actions button,
.agenda-term-item-actions a{
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #cfdbe8;
    border-radius: 9px;
    background: #fff;
    color: var(--primary);
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.agenda-term-item-actions button:hover,
.agenda-term-item-actions a:hover{ background: var(--primary-soft); }

.agenda-term-item-actions .danger{ color:#a73f3f; border-color:#efcccc; }

.agenda-term-item-actions .primary{ color:#fff; background:var(--primary); border-color:var(--primary); }

.agenda-term-code{
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .03em;
}

@media (max-width: 700px){
.agenda-terms-models-body,
.agenda-terms-patient-body{ padding: 16px; }
.agenda-terms-model-toolbar,
.agenda-terms-generate-card{ grid-template-columns: 1fr; }
.agenda-terms-model-toolbar .btn,
.agenda-terms-generate-card .btn{ width: 100%; }
.agenda-terms-generate-card > small{ grid-column: auto; }
#agenda-terms-model-content{ min-height: 280px; }
.agenda-terms-history-head{ align-items: flex-start; flex-direction: column; }
.agenda-term-item{ grid-template-columns: 1fr; }
.agenda-term-item-actions{ justify-content: flex-start; }
.agenda-term-item-actions button,
.agenda-term-item-actions a{ flex: 1 1 auto; text-align:center; }
}

.agenda-details-service-line{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.agenda-terms-inline-btn{
    appearance: none;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
    line-height: 1.1;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.agenda-terms-inline-btn.pending{
    color: #b63838;
    background: #fff0f0;
    border-color: #f0c9c9;
}

.agenda-terms-inline-btn.signed{
    color: #147451;
    background: #eaf8f1;
    border-color: #c7ead9;
}

.agenda-terms-inline-btn:hover{ filter: brightness(.98); }

.agenda-terms-inline-btn:focus-visible{
    outline: 2px solid rgba(15,95,156,.28);
    outline-offset: 2px;
}

@media (max-width: 520px){
.agenda-details-row{ align-items: center; }
.agenda-details-service-line{ gap: 8px; }
.agenda-terms-inline-btn{ font-size: 10px; }
}

#screen-dashboard{ width:min(100%, 1400px); }

.dash-hero{
  position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:24px;
  min-height:154px; padding:28px 30px; border:1px solid var(--line); border-radius:24px; background:var(--surface);
  box-shadow:var(--shadow-sm);
}

.dash-hero::after{ content:""; position:absolute; width:280px; height:180px; right:-70px; top:-72px; border-radius:50%; background:rgba(43,159,202,.10); pointer-events:none; }

.dash-hero-copy,
.dash-hero-actions{position:relative;z-index:1}

.dash-hero-copy{min-width:0}

.dash-eyebrow{ display:block; margin-bottom:7px; color:var(--primary-2); font-size:11px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }

.dash-hero h1{ margin:0; color:var(--primary); font-size:clamp(27px,3vw,39px); letter-spacing:-.045em; }

.dash-hero p{ margin:8px 0 0; color:var(--muted); font-size:13px; }

.dash-hero-actions{ display:flex; flex-wrap:wrap; gap:9px; }

.dash-filter-card{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:11px 13px; border:1px solid var(--line); border-radius:17px; background:var(--surface); box-shadow:var(--shadow-sm); }

.dash-period-buttons{ display:flex; flex-wrap:wrap; gap:7px; }

.dash-period-buttons button{ min-height:38px; padding:0 13px; border:1px solid transparent; border-radius:11px; color:#536b84; background:transparent; font-size:11px; font-weight:800; cursor:pointer; }

.dash-period-buttons button:hover{ background:var(--surface-2); color:var(--primary); }

.dash-period-buttons button.active{ color:#fff; background:var(--primary); box-shadow:0 7px 16px rgba(11,42,74,.13); }

.dash-custom-range{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; }

.dash-custom-range label{ display:flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; font-weight:800; }

.dash-custom-range input{ min-height:38px; padding:7px 9px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); font-size:11px; }

.dash-custom-range .btn{ min-height:38px; padding:8px 12px; }

.dash-status{ padding:11px 14px; border-radius:13px; background:#eef6ff; border:1px solid #cfe2f5; color:#315b82; font-size:11px; font-weight:700; }

.dash-status.error{ background:#fff1f1; border-color:#efcccc; color:#a33d3d; }

.dash-kpi-grid{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }

.dash-kpi{ min-width:0; min-height:124px; display:grid; grid-template-columns:42px minmax(0,1fr); gap:13px; align-items:start; padding:19px; border:1px solid var(--line); border-radius:18px; background:var(--surface); box-shadow:0 8px 22px rgba(16,48,82,.055); }

.dash-kpi-icon{ width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:var(--primary-soft); color:var(--primary-2); font-size:12px; font-weight:900; }

.dash-kpi small{ display:block; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.015em; }

.dash-kpi strong{ display:block; margin-top:5px; overflow:hidden; text-overflow:ellipsis; color:var(--primary); font-size:clamp(20px,2.2vw,29px); line-height:1.05; letter-spacing:-.035em; white-space:nowrap; }

.dash-kpi em{ display:block; margin-top:6px; color:#8a9aae; font-size:9px; font-style:normal; line-height:1.35; }

.dash-kpi.is-warning{ border-color:var(--line); background:var(--surface); box-shadow:0 8px 22px rgba(16,48,82,.055); }

.dash-kpi.is-warning .dash-kpi-icon{ background:var(--primary-soft); color:var(--primary-2); }

.dash-kpi.is-warning strong{ color:#8a6300; }

.dash-chart-grid{ display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:14px; }

.dash-lower-grid{ display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); gap:14px; }

.dash-panel{ min-width:0; padding:20px; border:1px solid var(--line); border-radius:20px; background:var(--surface); box-shadow:0 8px 22px rgba(16,48,82,.055); }

.dash-panel > header{ min-height:44px; display:flex; align-items:flex-start; justify-content:space-between; gap:13px; margin-bottom:14px; }

.dash-panel > header small{ display:block; color:#7c8fa4; font-size:9px; font-weight:850; letter-spacing:.07em; text-transform:uppercase; }

.dash-panel > header h2{ margin:4px 0 0; color:var(--primary); font-size:16px; letter-spacing:-.025em; }

.dash-panel > header > span{ color:var(--primary-2); font-size:10px; font-weight:850; white-space:nowrap; }

.dash-chart-wrap{ position:relative; height:285px; min-width:0; }

.dash-empty{ min-height:285px; display:grid; place-items:center; color:var(--muted); font-size:11px; text-align:center; }

.dash-empty.inline{ min-height:80px; }

.dash-current-badge{ padding:7px 9px; border-radius:999px; background:var(--surface-2); border:1px solid var(--line); color:var(--muted)!important; }

.dash-inactive-summary{ display:grid; grid-template-columns:repeat(3,1fr); gap:9px; margin-bottom:13px; }

.dash-inactive-summary > div{ padding:12px; border:1px solid var(--line); border-radius:14px; background:var(--surface-2); text-align:center; }

.dash-inactive-summary strong{ display:block; color:var(--primary); font-size:22px; }

.dash-inactive-summary span{ color:var(--muted); font-size:9px; font-weight:750; }

.dash-inactive-list{ display:grid; gap:5px; }

.dash-inactive-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 3px; border-bottom:1px solid var(--line); }

.dash-inactive-row:last-child{ border-bottom:0; }

.dash-inactive-row div{ min-width:0; }

.dash-inactive-row strong{ display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); font-size:11px; }

.dash-inactive-row small{ display:block; margin-top:3px; color:var(--muted); font-size:9px; }

.dash-inactive-row > span{ flex:0 0 auto; padding:5px 7px; border-radius:8px; background:#fff5dd; color:#8e6a11; font-size:9px; font-weight:850; }

.dash-payment-list{ display:grid; gap:15px; padding-top:2px; }

.dash-payment-row{ display:grid; gap:6px; }

.dash-payment-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--text); font-size:11px; }

.dash-payment-head strong{ color:var(--primary); }

.dash-payment-track{ height:8px; overflow:hidden; border-radius:999px; background:var(--surface-2); border:1px solid var(--line); }

.dash-payment-track i{ display:block; height:100%; min-width:2px; border-radius:inherit; background:var(--primary-2); }

.dash-payment-row small{ color:var(--muted); font-size:9px; }

.dash-config-backdrop{ position:fixed; inset:0; z-index:10000; display:grid; place-items:center; padding:20px; background:rgba(7,23,40,.48); backdrop-filter:blur(5px); }

.dash-config-card{ width:min(720px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:24px; border-radius:22px; background:var(--surface); border:1px solid var(--line); box-shadow:0 25px 70px rgba(4,22,40,.25); }

.dash-config-card > header{ display:flex; justify-content:space-between; gap:14px; align-items:flex-start; }

.dash-config-card > header small{ color:var(--primary-2); font-size:9px; font-weight:850; letter-spacing:.08em; text-transform:uppercase; }

.dash-config-card h2{ margin:4px 0 0; color:var(--primary); font-size:20px; }

.dash-config-card > p{ margin:10px 0 18px; color:var(--muted); font-size:11px; line-height:1.55; }

.dash-config-close{ width:38px; height:38px; border:0; border-radius:11px; background:var(--surface-2); color:var(--muted); font-size:23px; cursor:pointer; }

.dash-config-options{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }

.dash-config-options label{ min-height:45px; display:flex; align-items:center; gap:9px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; color:var(--text); background:var(--surface-2); font-size:11px; font-weight:700; cursor:pointer; }

.dash-config-options input{ width:17px; height:17px; accent-color:var(--primary-2); }

.dash-config-card > footer{ display:grid; grid-template-columns:auto 1fr auto auto; gap:9px; align-items:center; margin-top:20px; padding-top:16px; border-top:1px solid var(--line); }

body.logged-app.theme-dark .dash-hero,
body.logged-app.theme-dark .dash-filter-card,
body.logged-app.theme-dark .dash-kpi,
body.logged-app.theme-dark .dash-panel,
body.logged-app.theme-dark .dash-config-card{ background:#172331; border-color:#2d4052; box-shadow:none; }

body.logged-app.theme-dark .dash-hero h1,
body.logged-app.theme-dark .dash-kpi strong,
body.logged-app.theme-dark .dash-panel > header h2,
body.logged-app.theme-dark .dash-inactive-summary strong,
body.logged-app.theme-dark .dash-payment-head strong,
body.logged-app.theme-dark .dash-config-card h2{ color:#e8f2fb; }

body.logged-app.theme-dark .dash-hero p,
body.logged-app.theme-dark .dash-kpi small,
body.logged-app.theme-dark .dash-kpi em,
body.logged-app.theme-dark .dash-panel > header small,
body.logged-app.theme-dark .dash-inactive-row small,
body.logged-app.theme-dark .dash-payment-row small,
body.logged-app.theme-dark .dash-config-card > p{ color:#94aabe; }

body.logged-app.theme-dark .dash-kpi-icon{ background:#1e3a53; color:#69b3ed; }

body.logged-app.theme-dark .dash-kpi.is-warning{ background:#172331; border-color:#2d4052; box-shadow:none; }

body.logged-app.theme-dark .dash-kpi.is-warning .dash-kpi-icon{ background:#1e3a53; color:#69b3ed; }

body.logged-app.theme-dark .dash-kpi.is-warning strong{ color:#f1cf67; }

body.logged-app.theme-dark .dash-period-buttons button{ color:#a9bdcf; }

body.logged-app.theme-dark .dash-period-buttons button:hover,
body.logged-app.theme-dark .dash-inactive-summary > div,
body.logged-app.theme-dark .dash-config-options label,
body.logged-app.theme-dark .dash-current-badge{ background:#1c2b3a; border-color:#34495d; color:#d7e5f0; }

body.logged-app.theme-dark .dash-period-buttons button.active{ background:#176ab3; color:#fff; }

body.logged-app.theme-dark .dash-custom-range input{ background:#12202d; border-color:#34495d; color:#e7f0f7; }

body.logged-app.theme-dark .dash-inactive-row strong,
body.logged-app.theme-dark .dash-payment-head{ color:#dce8f2; }

body.logged-app.theme-dark .dash-inactive-row,
body.logged-app.theme-dark .dash-config-card > footer{ border-color:#2d4052; }

body.logged-app.theme-dark .dash-payment-track{ background:#12202d; border-color:#34495d; }

@media (max-width:1100px){
.dash-kpi-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
.dash-chart-grid,
.dash-lower-grid{ grid-template-columns:1fr; }
}

@media (max-width:760px){
#screen-dashboard{ padding:0!important; background:transparent!important; border:0!important; box-shadow:none!important; }
.dash-hero{ min-height:0; padding:20px; border-radius:18px; align-items:flex-start; flex-direction:column; }
.dash-hero-actions{ width:100%; }
.dash-hero-actions .btn{ flex:1 1 130px; }
.dash-filter-card{ align-items:stretch; flex-direction:column; padding:10px; }
.dash-period-buttons{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.dash-period-buttons button{ padding:0 8px; }
.dash-custom-range{ align-items:stretch; flex-direction:column; }
.dash-custom-range label{ display:grid; grid-template-columns:28px minmax(0,1fr); }
.dash-custom-range input{ width:100%; min-width:0; }
.dash-kpi-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.dash-kpi{ min-height:112px; grid-template-columns:34px minmax(0,1fr); gap:9px; padding:14px; }
.dash-kpi-icon{ width:34px; height:34px; border-radius:10px; font-size:10px; }
.dash-kpi strong{ font-size:20px; }
.dash-panel{ padding:16px; border-radius:17px; }
.dash-chart-wrap{ height:250px; }
.dash-inactive-summary{ gap:6px; }
.dash-config-options{ grid-template-columns:1fr; }
.dash-config-card > footer{ grid-template-columns:1fr 1fr; }
.dash-config-card > footer span{ display:none; }
}

@media (max-width:410px){
.dash-kpi-grid{ grid-template-columns:1fr; }
.dash-kpi{ min-height:92px; }
.dash-period-buttons{ grid-template-columns:1fr 1fr; }
.dash-inactive-summary strong{ font-size:19px; }
}

/* Prontuário: cabeçalho e ações fixos; somente o conteúdo central rola. */
#agenda-prontuario-modal .agenda-prontuario-modal-card{
    height: calc(100vh - 36px);
    max-height: calc(100vh - 36px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#agenda-prontuario-modal .agenda-prontuario-modal-head{
    flex: 0 0 auto;
    background: var(--surface, #fff);
    z-index: 3;
}

#agenda-prontuario-modal .agenda-prontuario-form-layout{
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#agenda-prontuario-modal .agenda-prontuario-actions{
    flex: 0 0 auto;
    margin: 0;
    padding: 11px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    border-top: 1px solid var(--line);
    background: var(--surface, #fff);
    box-shadow: 0 -5px 14px rgba(12, 43, 70, .035);
    z-index: 2;
}

#agenda-prontuario-modal .agenda-prontuario-actions .btn{
    min-width: 104px;
}

#agenda-prontuario-modal .agenda-prontuario-scroll{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 24px 24px;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

@media (max-width: 700px){
    #agenda-prontuario-modal .agenda-prontuario-modal-card{
        height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
    }
    #agenda-prontuario-modal .agenda-prontuario-actions{
        padding: 10px 14px;
        gap: 7px;
        flex-wrap: wrap;
    }
    #agenda-prontuario-modal .agenda-prontuario-actions .btn{
        flex: 1 1 120px;
        min-width: 0;
    }
    #agenda-prontuario-modal .agenda-prontuario-scroll{
        padding: 16px 14px 18px;
    }
}

/* Ajuste do modal de detalhes: sem scroll em telas 1366x768 ou maiores e cantos preservados */
#agenda-details-modal .agenda-modal{
    width: min(100%, 780px);
    max-height: min(calc(100vh - 28px), 710px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
}

#agenda-details-modal .agenda-modal-head{
    flex: 0 0 auto;
    padding: 18px 22px 15px;
}

#agenda-details-modal .agenda-details{
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 22px 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#agenda-details-modal .agenda-details > *{
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

#agenda-details-modal .agenda-details-row{
    align-items: center;
    gap: 12px;
}

#agenda-details-modal .agenda-package-summary{
    padding: 10px 14px;
    font-size: 10.5px;
    min-height: 0;
}

#agenda-details-modal .agenda-detail-actions.agenda-detail-actions-three{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

#agenda-details-modal .agenda-detail-actions.agenda-detail-actions-three > button{
    min-height: 60px !important;
    padding: 10px 10px !important;
}

#agenda-details-modal .agenda-package-actions{
    margin-top: 0;
    gap: 10px;
}

#agenda-details-modal .agenda-package-actions .agenda-add-package-btn,
#agenda-details-modal .agenda-package-actions .agenda-receipt-btn,
#agenda-details-modal .agenda-package-actions .agenda-package-paid-btn{
    min-height: 52px;
}

#agenda-details-modal .agenda-detail-status{
    margin-top: 0;
    gap: 10px;
}

#agenda-details-modal .agenda-detail-status button{
    min-height: 42px;
}

#agenda-details-modal .agenda-details-notes{
    padding-top: 14px;
}

#agenda-details-modal #agenda-details-notes{
    min-height: 46px !important;
    max-height: 74px !important;
}

#agenda-details-modal .agenda-delete-wrap{
    padding-top: 10px;
}

#agenda-details-modal .agenda-delete-wrap button{
    min-height: 40px;
}

/* Fallback para telas menores: rola só o conteúdo interno e mantém os cantos arredondados */
@media (max-height: 720px), (max-width: 900px){
    #agenda-details-modal .agenda-modal{
        max-height: calc(100vh - 20px);
    }
    #agenda-details-modal .agenda-details{
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
        overscroll-behavior: contain;
    }
}

@media (max-width: 700px){
    #agenda-details-modal .agenda-modal{
        width: 100%;
        border-radius: 20px;
    }
    #agenda-details-modal .agenda-modal-head{
        padding: 16px 16px 14px;
    }
    #agenda-details-modal .agenda-details{
        padding: 14px 16px 16px;
        gap: 10px;
    }
    #agenda-details-modal .agenda-detail-actions.agenda-detail-actions-three,
    #agenda-details-modal .agenda-package-actions,
    #agenda-details-modal .agenda-detail-status{
        grid-template-columns: 1fr 1fr !important;
    }
    #agenda-details-modal .agenda-details-row{
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Scrollbars padronizados da Agenda: finos, arredondados e sem cantos quadrados */
body.logged-app .agenda-modal,
body.logged-app .agenda-modal *,
body.logged-app .agenda-web-shell,
body.logged-app .agenda-web-shell *,
body.logged-app .agenda-notifications-panel,
body.logged-app .agenda-notifications-panel *,
body.logged-app .agenda-packages-control-card,
body.logged-app .agenda-packages-control-card *{
    scrollbar-width: thin;
    scrollbar-color: rgba(91, 116, 143, .46) transparent;
}

body.logged-app .agenda-modal::-webkit-scrollbar,
body.logged-app .agenda-modal *::-webkit-scrollbar,
body.logged-app .agenda-web-shell::-webkit-scrollbar,
body.logged-app .agenda-web-shell *::-webkit-scrollbar,
body.logged-app .agenda-notifications-panel::-webkit-scrollbar,
body.logged-app .agenda-notifications-panel *::-webkit-scrollbar,
body.logged-app .agenda-packages-control-card::-webkit-scrollbar,
body.logged-app .agenda-packages-control-card *::-webkit-scrollbar{
    width: 8px;
    height: 8px;
}

body.logged-app .agenda-modal::-webkit-scrollbar-track,
body.logged-app .agenda-modal *::-webkit-scrollbar-track,
body.logged-app .agenda-web-shell::-webkit-scrollbar-track,
body.logged-app .agenda-web-shell *::-webkit-scrollbar-track,
body.logged-app .agenda-notifications-panel::-webkit-scrollbar-track,
body.logged-app .agenda-notifications-panel *::-webkit-scrollbar-track,
body.logged-app .agenda-packages-control-card::-webkit-scrollbar-track,
body.logged-app .agenda-packages-control-card *::-webkit-scrollbar-track{
    background: transparent;
    border-radius: 999px;
    margin-block: 9px;
    margin-inline: 9px;
}

body.logged-app .agenda-modal::-webkit-scrollbar-thumb,
body.logged-app .agenda-modal *::-webkit-scrollbar-thumb,
body.logged-app .agenda-web-shell::-webkit-scrollbar-thumb,
body.logged-app .agenda-web-shell *::-webkit-scrollbar-thumb,
body.logged-app .agenda-notifications-panel::-webkit-scrollbar-thumb,
body.logged-app .agenda-notifications-panel *::-webkit-scrollbar-thumb,
body.logged-app .agenda-packages-control-card::-webkit-scrollbar-thumb,
body.logged-app .agenda-packages-control-card *::-webkit-scrollbar-thumb{
    min-height: 34px;
    background: rgba(91, 116, 143, .46);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

body.logged-app .agenda-modal::-webkit-scrollbar-thumb:hover,
body.logged-app .agenda-modal *::-webkit-scrollbar-thumb:hover,
body.logged-app .agenda-web-shell::-webkit-scrollbar-thumb:hover,
body.logged-app .agenda-web-shell *::-webkit-scrollbar-thumb:hover,
body.logged-app .agenda-notifications-panel::-webkit-scrollbar-thumb:hover,
body.logged-app .agenda-notifications-panel *::-webkit-scrollbar-thumb:hover,
body.logged-app .agenda-packages-control-card::-webkit-scrollbar-thumb:hover,
body.logged-app .agenda-packages-control-card *::-webkit-scrollbar-thumb:hover{
    background: rgba(66, 94, 124, .68);
    border: 2px solid transparent;
    background-clip: padding-box;
}

body.logged-app .agenda-modal::-webkit-scrollbar-corner,
body.logged-app .agenda-modal *::-webkit-scrollbar-corner,
body.logged-app .agenda-web-shell::-webkit-scrollbar-corner,
body.logged-app .agenda-web-shell *::-webkit-scrollbar-corner,
body.logged-app .agenda-notifications-panel::-webkit-scrollbar-corner,
body.logged-app .agenda-notifications-panel *::-webkit-scrollbar-corner,
body.logged-app .agenda-packages-control-card::-webkit-scrollbar-corner,
body.logged-app .agenda-packages-control-card *::-webkit-scrollbar-corner{
    background: transparent;
}

body.logged-app .agenda-modal::-webkit-scrollbar-button,
body.logged-app .agenda-modal *::-webkit-scrollbar-button,
body.logged-app .agenda-web-shell::-webkit-scrollbar-button,
body.logged-app .agenda-web-shell *::-webkit-scrollbar-button,
body.logged-app .agenda-notifications-panel::-webkit-scrollbar-button,
body.logged-app .agenda-notifications-panel *::-webkit-scrollbar-button,
body.logged-app .agenda-packages-control-card::-webkit-scrollbar-button,
body.logged-app .agenda-packages-control-card *::-webkit-scrollbar-button{
    display: none;
    width: 0;
    height: 0;
}

body.logged-app.theme-dark .agenda-modal,
body.logged-app.theme-dark .agenda-modal *,
body.logged-app.theme-dark .agenda-web-shell,
body.logged-app.theme-dark .agenda-web-shell *,
body.logged-app.theme-dark .agenda-notifications-panel,
body.logged-app.theme-dark .agenda-notifications-panel *,
body.logged-app.theme-dark .agenda-packages-control-card,
body.logged-app.theme-dark .agenda-packages-control-card *{
    scrollbar-color: rgba(126, 156, 190, .52) transparent;
}

body.logged-app.theme-dark .agenda-modal::-webkit-scrollbar-thumb,
body.logged-app.theme-dark .agenda-modal *::-webkit-scrollbar-thumb,
body.logged-app.theme-dark .agenda-web-shell::-webkit-scrollbar-thumb,
body.logged-app.theme-dark .agenda-web-shell *::-webkit-scrollbar-thumb,
body.logged-app.theme-dark .agenda-notifications-panel::-webkit-scrollbar-thumb,
body.logged-app.theme-dark .agenda-notifications-panel *::-webkit-scrollbar-thumb,
body.logged-app.theme-dark .agenda-packages-control-card::-webkit-scrollbar-thumb,
body.logged-app.theme-dark .agenda-packages-control-card *::-webkit-scrollbar-thumb{
    background: rgba(126, 156, 190, .52);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* =========================================================
   Modais da Agenda — recorte correto dos cantos + miolo rolável
   ========================================================= */

/* O recorte acompanha o border-radius real do card. Assim nenhuma
   scrollbar/track pode aparecer além dos cantos arredondados. */
body.logged-app .agenda-modal{
    clip-path: inset(0 round 22px);
}
body.logged-app .agenda-modal.small{
    clip-path: inset(0 round 22px);
}


/* Exportar prontuários: filtros e e-mail ficam fixos; somente a lista rola. */
#agenda-export-modal .agenda-export-filters{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:minmax(0,1fr) 190px;
    gap:12px;
    padding:14px 20px;
    border-bottom:1px solid var(--line);
    background:var(--surface,#fff);
    z-index:2;
}
#agenda-export-modal .agenda-export-periodo{
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
}
#agenda-export-modal .agenda-export-periodo.hidden{display:none!important;}
#agenda-export-modal .agenda-export-email-row{
    flex:0 0 auto;
    padding:12px 20px 0;
    background:var(--surface,#fff);
}
#agenda-export-modal .agenda-export-email-row .field{margin:0;}
#agenda-export-modal .agenda-export-email-row input{width:100%;}

/* Exportar prontuários: cabeçalho e rodapé fixos; só o centro rola. */
#agenda-export-modal .agenda-export-modal-card{
    height: min(720px, calc(100vh - 36px));
    max-height: calc(100vh - 36px);
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
}
#agenda-export-modal .agenda-modal-head{
    flex: 0 0 auto;
    background: var(--surface, #fff);
    z-index: 2;
}
#agenda-export-modal .agenda-export-body{
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}
#agenda-export-modal .agenda-export-scroll{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 20px 20px;
    display: grid;
    align-content: start;
    gap: 16px;
    overscroll-behavior: contain;
}
#agenda-export-modal .agenda-export-list{
    max-height: none;
    overflow: visible;
    padding-right: 0;
}
#agenda-export-modal .agenda-export-actions{
    flex: 0 0 auto;
    margin: 0;
    padding: 12px 20px;
    border-top: 1px solid var(--line);
    background: var(--surface, #fff);
    box-shadow: 0 -5px 14px rgba(12,43,70,.035);
}

/* Modelo de prontuário: mesmo comportamento do modal de prontuário. */
#agenda-modelo-modal .agenda-modal{
    height: min(720px, calc(100vh - 36px));
    max-height: calc(100vh - 36px);
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
}
#agenda-modelo-modal .agenda-modal-head{
    flex: 0 0 auto;
    background: var(--surface, #fff);
    z-index: 2;
}
#agenda-modelo-modal .agenda-modelo-form-layout{
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#agenda-modelo-modal .agenda-modelo-scroll{
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 18px 24px 22px;
    overscroll-behavior: contain;
}
#agenda-modelo-modal .agenda-modelo-actions{
    flex: 0 0 auto;
    margin: 0;
    padding: 12px 24px;
    border-top: 1px solid var(--line);
    background: var(--surface, #fff);
    box-shadow: 0 -5px 14px rgba(12,43,70,.035);
    z-index: 2;
}

/* Scrollbars só nos miolos dos modais fixos. Track recuado para nunca
   encostar visualmente no canto superior/inferior do card. */
#agenda-export-modal .agenda-export-scroll,
#agenda-modelo-modal .agenda-modelo-scroll,
#agenda-prontuario-modal .agenda-prontuario-scroll{
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(91,116,143,.46) transparent;
}
#agenda-export-modal .agenda-export-scroll::-webkit-scrollbar,
#agenda-modelo-modal .agenda-modelo-scroll::-webkit-scrollbar,
#agenda-prontuario-modal .agenda-prontuario-scroll::-webkit-scrollbar{
    width: 8px;
}
#agenda-export-modal .agenda-export-scroll::-webkit-scrollbar-track,
#agenda-modelo-modal .agenda-modelo-scroll::-webkit-scrollbar-track,
#agenda-prontuario-modal .agenda-prontuario-scroll::-webkit-scrollbar-track{
    background: transparent;
    margin-block: 12px;
}
#agenda-export-modal .agenda-export-scroll::-webkit-scrollbar-thumb,
#agenda-modelo-modal .agenda-modelo-scroll::-webkit-scrollbar-thumb,
#agenda-prontuario-modal .agenda-prontuario-scroll::-webkit-scrollbar-thumb{
    background: rgba(91,116,143,.46);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

@media (max-width: 700px){
    body.logged-app .agenda-modal,
    body.logged-app .agenda-modal.small{
        clip-path: inset(0 round 16px);
    }
    #agenda-export-modal .agenda-export-modal-card,
    #agenda-modelo-modal .agenda-modal{
        height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 16px;
    }
    #agenda-export-modal .agenda-export-scroll,
    #agenda-modelo-modal .agenda-modelo-scroll{
        padding: 14px 14px 16px;
    }
    #agenda-export-modal .agenda-export-actions,
    #agenda-modelo-modal .agenda-modelo-actions{
        padding: 10px 14px;
        gap: 7px;
        flex-wrap: wrap;
    }
    #agenda-export-modal .agenda-export-actions .btn,
    #agenda-modelo-modal .agenda-modelo-actions .btn{
        flex: 1 1 130px;
    }
}

/* Detalhes do agendamento — ajuste fino somente em telas com pouca altura.
   Evita o resumo da sessão ficar espremido quando o modal entra no modo compacto. */
@media (max-height: 720px){
    #agenda-details-modal .agenda-package-summary{
        flex: 0 0 auto;
        min-height: 30px;
        padding: 6px 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1.2;
        position: relative;
        top: -3px;
    }
}

/* ================== HUB DE TERMOS DE CONSENTIMENTO ================== */
.agenda-terms-hub-card{
    width:min(100%, 980px);
    height:min(86vh, 760px);
    max-height:calc(100vh - 32px);
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr) auto;
    overflow:hidden;
}
.agenda-terms-hub-head{ flex:0 0 auto; }
.agenda-terms-hub-filters{
    display:flex;
    gap:8px;
    align-items:center;
    padding:14px 22px 12px;
    border-bottom:1px solid var(--border);
    background:#fff;
}
.agenda-terms-hub-filter{
    appearance:none;
    border:1px solid var(--border);
    background:#fff;
    color:var(--muted);
    min-height:36px;
    padding:0 14px;
    border-radius:10px;
    font:inherit;
    font-weight:700;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap:8px;
}
.agenda-terms-hub-filter span{
    min-width:22px;
    height:22px;
    padding:0 6px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#eef3f8;
    color:#597086;
    font-size:10px;
}
.agenda-terms-hub-filter.active{
    border-color:var(--primary);
    background:var(--primary-soft);
    color:var(--primary);
}
.agenda-terms-hub-filter.active span{
    background:var(--primary);
    color:#fff;
}
.agenda-terms-hub-scroll{
    min-height:0;
    overflow-y:auto;
    overflow-x:hidden;
    padding:14px 22px 18px;
    scrollbar-gutter:stable;
}
.agenda-terms-hub-list{
    display:flex;
    flex-direction:column;
}
.agenda-term-hub-item{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:18px;
    align-items:center;
    padding:16px 10px;
    border:0;
    border-bottom:1px solid #dce5ef;
    border-radius:0;
    background:#fff;
}
.agenda-term-hub-item:first-child{
    border-top:1px solid #dce5ef;
}
.agenda-term-hub-info{ min-width:0; }
.agenda-term-hub-info > strong{
    display:block;
    color:var(--primary);
    font-size:13px;
    line-height:1.25;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.agenda-term-hub-title{
    display:block;
    margin-top:3px;
    color:#40556b;
    font-size:11px;
    font-weight:600;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.agenda-term-hub-date,
.agenda-term-hub-opened,
.agenda-term-hub-signed-at{
    margin-top:5px;
    color:var(--muted);
    font-size:9.5px;
    line-height:1.35;
}
.agenda-term-hub-opened{ color:#9a650c; font-weight:700; }
.agenda-term-hub-signed-at{ color:#147451; font-weight:700; }
.agenda-term-hub-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    flex-wrap:wrap;
    gap:8px;
}
.agenda-term-hub-action{
    border:1px solid #bfd0e2;
    background:#f7faff;
    color:#1f5f96;
    min-height:34px;
    padding:0 12px;
    border-radius:9px;
    text-decoration:none;
    font:inherit;
    font-size:10px;
    font-weight:800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transition:background .15s ease, border-color .15s ease, color .15s ease;
}
.agenda-term-hub-action:hover{
    background:#eaf3fb;
    border-color:#8fb3d4;
}
.agenda-term-hub-action[href]{
    color:#fff;
    border-color:#1f5f96;
    background:#1f5f96;
}
.agenda-term-hub-action[href]:hover{
    border-color:#184d79;
    background:#184d79;
}
.agenda-term-hub-action.whatsapp{
    color:#147451;
    border-color:#9fd3bd;
    background:#effaf5;
}
.agenda-term-hub-action.whatsapp:hover{
    border-color:#70bb9a;
    background:#e2f5ec;
}
.agenda-term-hub-action[data-hub-copy]{
    color:#35516f;
    border-color:#c5d2df;
    background:#f8fafc;
}
.agenda-term-hub-action[data-hub-copy]:hover{
    border-color:#9fb1c3;
    background:#eef3f7;
}
.agenda-term-hub-action.danger{
    color:#a73f3f;
    border-color:#e5b6b6;
    background:#fff5f5;
}
.agenda-term-hub-action.danger:hover{
    border-color:#d88f8f;
    background:#fde8e8;
}
.agenda-terms-hub-footer{
    min-height:68px;
    padding:12px 22px;
    border-top:1px solid var(--border);
    background:#fff;
    display:flex;
    align-items:center;
    gap:10px;
}
.agenda-terms-hub-footer .btn{ width:auto; min-width:120px; }

.agenda-terms-new-card{
    width:min(100%, 600px);
    max-height:calc(100vh - 32px);
    display:grid;
    grid-template-rows:auto minmax(0,1fr) auto;
    overflow:hidden;
}
.agenda-terms-new-body{ padding:20px 22px; overflow:visible; }
.agenda-terms-new-client-wrap{ position:relative; }
.agenda-terms-new-client-wrap .agenda-client-results{
    left:0;
    right:0;
    top:calc(100% - 2px);
    z-index:20;
}
.agenda-terms-new-note{
    margin-top:8px;
    padding:10px 12px;
    border-radius:10px;
    background:#f5f8fb;
    color:var(--muted);
    font-size:10px;
    line-height:1.45;
}

@media (max-width: 700px), (max-height: 720px){
    .agenda-terms-hub-card{ height:calc(100vh - 16px); max-height:calc(100vh - 16px); }
    .agenda-terms-hub-filters{ padding:10px 14px; }
    .agenda-terms-hub-scroll{ padding:10px 14px 12px; }
    .agenda-terms-hub-footer{ min-height:58px; padding:9px 14px; }
    .agenda-term-hub-item{ grid-template-columns:1fr; gap:10px; padding:12px; }
    .agenda-term-hub-actions{ justify-content:flex-start; }
    .agenda-term-hub-action{ flex:1 1 auto; }
}

/* =========================================================
   MODO NOTURNO — pente fino da Agenda
   Somente dark mode. Mantém o tema claro intacto.
   ========================================================= */
body.logged-app.theme-dark .agenda-view-toggle,
body.logged-app.theme-dark .agenda-icon-action,
body.logged-app.theme-dark .agenda-settings-open,
body.logged-app.theme-dark .agenda-details-notes-head button,
body.logged-app.theme-dark .agenda-form-package-box button,
body.logged-app.theme-dark .agenda-whatsapp-chips button,
body.logged-app.theme-dark .agenda-term-item-actions button,
body.logged-app.theme-dark .agenda-term-item-actions a,
body.logged-app.theme-dark .agenda-terms-hub-filter,
body.logged-app.theme-dark .agenda-term-hub-action,
body.logged-app.theme-dark .agenda-terms-hub-footer .btn{
    background: #0f1e33 !important;
    color: #d8e7fa !important;
    border-color: #29415f !important;
}

body.logged-app.theme-dark .agenda-view-toggle:hover,
body.logged-app.theme-dark .agenda-icon-action:hover,
body.logged-app.theme-dark .agenda-settings-open:hover,
body.logged-app.theme-dark .agenda-details-notes-head button:hover,
body.logged-app.theme-dark .agenda-form-package-box button:hover,
body.logged-app.theme-dark .agenda-whatsapp-chips button:hover,
body.logged-app.theme-dark .agenda-term-item-actions button:hover,
body.logged-app.theme-dark .agenda-term-item-actions a:hover,
body.logged-app.theme-dark .agenda-terms-hub-filter:hover,
body.logged-app.theme-dark .agenda-term-hub-action:hover{
    background: #142840 !important;
}

body.logged-app.theme-dark .agenda-view-toggle.active,
body.logged-app.theme-dark .agenda-view-toggle.active:hover,
body.logged-app.theme-dark .agenda-terms-hub-filter.active{
    background: linear-gradient(135deg, #0d4a92, #1f84ff) !important;
    color: #fff !important;
    border-color: transparent !important;
}

/* Agenda semanal */
body.logged-app.theme-dark .agenda-week-grid,
body.logged-app.theme-dark .agenda-week-cell,
body.logged-app.theme-dark .agenda-week-cell.occupied{
    background: #0b1728 !important;
}

body.logged-app.theme-dark .agenda-week-grid > *{
    border-right-color: #1f3048 !important;
    border-bottom-color: #1f3048 !important;
}

body.logged-app.theme-dark .agenda-week-corner,
body.logged-app.theme-dark .agenda-week-day,
body.logged-app.theme-dark .agenda-week-grid > .agenda-week-day,
body.logged-app.theme-dark .agenda-week-grid > .agenda-week-day:hover,
body.logged-app.theme-dark .agenda-week-grid > .agenda-week-day:focus,
body.logged-app.theme-dark .agenda-week-grid > .agenda-week-day:focus-visible,
body.logged-app.theme-dark .agenda-week-grid > .agenda-week-day:active{
    background: #101f33 !important;
    color: #edf4ff !important;
    border-right-color: #1f3048 !important;
    border-bottom-color: #1f3048 !important;
}

body.logged-app.theme-dark .agenda-week-day.today,
body.logged-app.theme-dark .agenda-week-day.today:hover,
body.logged-app.theme-dark .agenda-week-day.today:focus,
body.logged-app.theme-dark .agenda-week-day.today:focus-visible,
body.logged-app.theme-dark .agenda-week-day.today:active,
body.logged-app.theme-dark .agenda-week-grid > .agenda-week-day.today{
    background: #12345a !important;
    color: #8fbcff !important;
}

body.logged-app.theme-dark .agenda-week-time{
    background: #0e1b2d !important;
    color: #9eb4d1 !important;
}

body.logged-app.theme-dark .agenda-week-free{
    color: #55708f !important;
}

body.logged-app.theme-dark .agenda-week-cell:hover .agenda-week-free{
    background: #10233b !important;
    border-color: #29415f !important;
    color: #8fbcff !important;
}

body.logged-app.theme-dark .agenda-week-appointment,
body.logged-app.theme-dark .agenda-week-appointment.confirmada,
body.logged-app.theme-dark .agenda-week-appointment.realizada{
    background: #0f1d31 !important;
    border-color: #29415f !important;
}

body.logged-app.theme-dark .agenda-week-appointment strong{
    color: #edf4ff !important;
}

body.logged-app.theme-dark .agenda-week-appointment span,
body.logged-app.theme-dark .agenda-week-meta em{
    color: #8ea5c3 !important;
}

/* Prontuários */
body.logged-app.theme-dark #agenda-details-notes,
body.logged-app.theme-dark .agenda-rich-text,
body.logged-app.theme-dark .agenda-rich-text[contenteditable="false"],
body.logged-app.theme-dark .agenda-client-prontuario-card,
body.logged-app.theme-dark .agenda-prontuario-foto-preview,
body.logged-app.theme-dark .agenda-repeat-item{
    background: #091220 !important;
    color: #edf4ff !important;
    border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-last-prontuario-btn{
    background: #0f1e33 !important;
    color: #edf4ff !important;
    border-color: #29415f !important;
}

body.logged-app.theme-dark .agenda-last-prontuario-btn:hover{
    background: #142840 !important;
    border-color: #345178 !important;
}

body.logged-app.theme-dark .agenda-last-prontuario-btn > small{
    color: #90a3bf !important;
}

/* Configurações > mensagem do WhatsApp */
body.logged-app.theme-dark .agenda-whatsapp-template-settings,
body.logged-app.theme-dark .agenda-repeat-package-check{
    background: #0e1b2d !important;
    border-color: #223550 !important;
}

body.logged-app.theme-dark #agenda-whatsapp-template{
    background: #091220 !important;
    color: #edf4ff !important;
    border-color: #223550 !important;
}

/* Configurações > controle de pacotes */
body.logged-app.theme-dark .agenda-package-control-item,
body.logged-app.theme-dark .agenda-setting-row{
    background: #0e1b2d !important;
    color: #edf4ff !important;
    border-color: #29415f !important;
}

body.logged-app.theme-dark .agenda-package-control-main span,
body.logged-app.theme-dark .agenda-package-control-numbers span,
body.logged-app.theme-dark .agenda-setting-row small{
    color: #90a3bf !important;
}

body.logged-app.theme-dark .agenda-package-control-numbers b{
    color: #edf4ff !important;
}

/* Configurações > termos de consentimento */
body.logged-app.theme-dark .agenda-terms-btn{
    background: #0f1e33 !important;
    color: #edf4ff !important;
    border-color: #29415f !important;
}

body.logged-app.theme-dark #agenda-terms-model-content,
body.logged-app.theme-dark .agenda-term-item,
body.logged-app.theme-dark .agenda-terms-hub-filters,
body.logged-app.theme-dark .agenda-term-hub-item,
body.logged-app.theme-dark .agenda-terms-hub-footer{
    background: #0b1728 !important;
    color: #edf4ff !important;
    border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-terms-version-note,
body.logged-app.theme-dark .agenda-terms-generate-card{
    background: #0e1b2d !important;
    color: #d8e7fa !important;
    border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-term-hub-item,
body.logged-app.theme-dark .agenda-term-hub-item:first-child{
    border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-term-hub-title{
    color: #c9d8ee !important;
}

body.logged-app.theme-dark .agenda-terms-hub-filter span{
    background: #13233a !important;
    color: #9eb4d1 !important;
}

body.logged-app.theme-dark .agenda-terms-hub-filter.active span{
    background: rgba(255,255,255,.16) !important;
    color: #fff !important;
}

/* Corrige seletores antigos que usavam body.dark-mode, enquanto o app usa theme-dark. */
body.logged-app.theme-dark .agenda-package-control-value,
body.logged-app.theme-dark .agenda-package-control-main,
body.logged-app.theme-dark .agenda-package-control-numbers{
    color: #edf4ff !important;
}

body.logged-app.theme-dark .agenda-web-shell.agenda-week-active .agenda-week-head{
    background: #0b1728 !important;
    border-bottom-color: #1f3048 !important;
}

body.logged-app.theme-dark .agenda-structured-pontos-box textarea,
body.logged-app.theme-dark .agenda-structured-pontos-side{
    background: #091220 !important;
    color: #edf4ff !important;
    border-color: #223550 !important;
}

body.logged-app.theme-dark .agenda-structured-pontos-box textarea::placeholder{
    color: #7388a8 !important;
}


/* =========================================================
   MODO NOTURNO — ajuste fino complementar (21/09)
   - agenda semanal mantém borda/coloração por status
   - botões semânticos escuros
   ========================================================= */
body.logged-app.theme-dark .agenda-week-appointment{
    background: #0f1d31 !important;
    border-top-color: #29415f !important;
    border-bottom-color: #29415f !important;
    border-left-color: #d88d12 !important;
    border-right-color: #d88d12 !important;
}

body.logged-app.theme-dark .agenda-week-appointment.agendada{
    border-left-color: #d88d12 !important;
    border-right-color: #d88d12 !important;
}

body.logged-app.theme-dark .agenda-week-appointment.confirmada{
    border-left-color: #6658dc !important;
    border-right-color: #6658dc !important;
}

body.logged-app.theme-dark .agenda-week-appointment.realizada{
    border-left-color: #168b60 !important;
    border-right-color: #168b60 !important;
}

body.logged-app.theme-dark .agenda-week-appointment.cancelada,
body.logged-app.theme-dark .agenda-week-appointment.faltou{
    border-left-color: #cf5656 !important;
    border-right-color: #cf5656 !important;
}

body.logged-app.theme-dark .agenda-status.agendada{
    color: #ffd38b !important;
    background: #4a3110 !important;
    border: 1px solid #8d5a17 !important;
}

body.logged-app.theme-dark .agenda-status.confirmada{
    color: #c9c1ff !important;
    background: #231f47 !important;
    border: 1px solid #5448b8 !important;
}

body.logged-app.theme-dark .agenda-status.realizada{
    color: #93e8bf !important;
    background: #143826 !important;
    border: 1px solid #2e7b58 !important;
}

body.logged-app.theme-dark .agenda-status.cancelada,
body.logged-app.theme-dark .agenda-status.faltou{
    color: #ffb3b3 !important;
    background: #431b1f !important;
    border: 1px solid #9e4141 !important;
}

body.logged-app.theme-dark .agenda-detail-status .confirm{
    background: #221f45 !important;
    color: #c9c1ff !important;
    border-color: #5448b8 !important;
}

body.logged-app.theme-dark .agenda-detail-status .done{
    background: #143826 !important;
    color: #93e8bf !important;
    border-color: #2e7b58 !important;
}

body.logged-app.theme-dark .agenda-detail-status .missed{
    background: #47300f !important;
    color: #ffd38b !important;
    border-color: #8d5a17 !important;
}

body.logged-app.theme-dark .agenda-detail-status .cancel{
    background: #431b1f !important;
    color: #ffb3b3 !important;
    border-color: #9e4141 !important;
}

body.logged-app.theme-dark .agenda-detail-status .confirm:hover{
    background: #2b2554 !important;
}

body.logged-app.theme-dark .agenda-detail-status .done:hover{
    background: #19452f !important;
}

body.logged-app.theme-dark .agenda-detail-status .missed:hover{
    background: #553913 !important;
}

body.logged-app.theme-dark .agenda-detail-status .cancel:hover{
    background: #552126 !important;
}

/* =========================================================
   Agenda semanal — refinamentos de grade (22/09)
   ========================================================= */
.agenda-week-grid{
    position:relative;
}

/*
   A grade usa blocos de 30 minutos. O border-bottom do bloco :00 cai
   exatamente na meia hora (:30), enquanto o border-bottom do bloco :30
   cai na hora cheia seguinte. Assim, meia hora = pontilhado claro e
   hora cheia = linha mais escura.
*/
.agenda-week-time.half-boundary,
.agenda-week-cell.half-boundary{
    border-bottom:1px dotted #dce5ed !important;
}

.agenda-week-time.hour-boundary,
.agenda-week-cell.hour-boundary{
    border-bottom:1px solid #bccbd8 !important;
}

/* O dia atual fica discretamente destacado também no corpo da agenda. */
.agenda-week-cell.today,
.agenda-week-cell.today.occupied{
    background:#f4f6f8 !important;
}

/* Horários vazios continuam clicáveis, mas sem o "+" em cada bloco. */
.agenda-week-cell:not(.occupied):not(.blocked){
    cursor:pointer;
}

/* Ao arrastar, não pinta de verde todos os horários disponíveis. */
.agenda-week-cell.drag-valid{
    background:inherit !important;
    box-shadow:none !important;
}

/*
   Deixa uma pequena folga vertical/lateral entre sessões consecutivas.
   --agenda-week-offset permite horários quebrados, como 09:40.
*/
.agenda-week-appointment{
    left:2px !important;
    right:2px !important;
    top:calc(var(--agenda-week-offset, 0px) + 2px) !important;
    height:calc(var(--agenda-week-height, 28px) - 4px) !important;
    min-height:20px !important;
    border-radius:7px !important;
}

/* Linha da hora atual atravessando toda a grade semanal. */
.agenda-week-now-line{
    position:absolute;
    left:0;
    right:0;
    z-index:6;
    height:0;
    border-top:1px solid rgba(31,132,255,.72);
    pointer-events:none;
}

.agenda-week-now-line span{
    position:absolute;
    left:4px;
    top:0;
    transform:translateY(-50%);
    min-width:43px;
    padding:2px 6px;
    border-radius:9px;
    background:#1f84ff;
    color:#fff;
    font-size:8px;
    font-weight:900;
    line-height:1.2;
    text-align:center;
    letter-spacing:.01em;
    box-shadow:0 1px 3px rgba(12,80,150,.20);
}

body.logged-app.theme-dark .agenda-week-cell.today,
body.logged-app.theme-dark .agenda-week-cell.today.occupied{
    background:#101d2f !important;
}

body.logged-app.theme-dark .agenda-week-time.half-boundary,
body.logged-app.theme-dark .agenda-week-cell.half-boundary{
    border-bottom-color:#26384f !important;
}

body.logged-app.theme-dark .agenda-week-time.hour-boundary,
body.logged-app.theme-dark .agenda-week-cell.hour-boundary{
    border-bottom-color:#41536b !important;
}


/* =========================================================
   Agenda semanal — coluna de horários + marcador da hora atual
   ========================================================= */
/* Horários fixos ficam mais à esquerda, liberando o lado direito
   da primeira coluna para o marcador azul da hora atual. */
.agenda-week-time{
    text-align:left !important;
    padding-left:8px !important;
    padding-right:34px !important;
}

/* Posiciona a "pílula" da hora atual no lado direito da coluna de horários,
   como na referência do PsicoManager. */
.agenda-week-now-line span{
    left:38px !important;
    min-width:34px !important;
    padding:2px 4px !important;
}


/* Agenda semanal — horários de meia hora (:30) reduzidos para 9px */
.agenda-week-time.hour-boundary{
    font-size:9px !important;
}


/* =========================================================
   Novo horário — Observação recolhível
   ========================================================= */
.agenda-notes-field{
    min-width:0;
}

.agenda-notes-toggle{
    width:100%;
    min-height:38px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:9px 11px;
    border:1px solid #cfdae7;
    border-radius:11px;
    background:#fff;
    color:var(--primary);
    cursor:pointer;
    text-align:left;
    font:inherit;
}

.agenda-notes-toggle span{
    font-size:11px;
    font-weight:800;
}

.agenda-notes-toggle small{
    color:var(--primary-2);
    font-size:9px;
    font-weight:800;
}

.agenda-notes-toggle:hover{
    background:#f7fbff;
    border-color:#b9d4e8;
}

.agenda-notes-wrap{
    margin-top:8px;
}

.agenda-notes-wrap.hidden{
    display:none !important;
}

body.logged-app.theme-dark .agenda-notes-toggle{
    background:#0b1728;
    color:#edf4ff;
    border-color:#223550;
}

body.logged-app.theme-dark .agenda-notes-toggle:hover{
    background:#0f1d31;
    border-color:#34506f;
}

body.logged-app.theme-dark .agenda-notes-toggle small{
    color:#8fbdff;
}


/* =========================================================
   Agenda do dia — cartões agrupados por hora
   ========================================================= */
#agenda-timeline.agenda-day-hours{
    position:relative;
}

.agenda-day-hour{
    display:grid;
    grid-template-columns:78px 1fr;
    gap:12px;
    height:var(--agenda-day-row-height, 96px);
    position:relative;
}

.agenda-day-hour-time{
    height:var(--agenda-day-card-height, 88px);
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    align-items:flex-end;
    padding:8px 0 8px;
    color:#587088;
    text-align:right;
    font-size:11px;
    font-weight:850;
}

.agenda-day-hour-time .half{
    font-size:11px;
    font-weight:850;
    color:#587088;
}

.agenda-day-hour-card{
    position:relative;
    height:var(--agenda-day-card-height, 88px);
    border:1px solid #dbe6ef;
    border-radius:13px;
    background:#fbfdff;
    overflow:hidden;
}

.agenda-day-half{
    position:absolute;
    left:0;
    right:0;
    height:50%;
}

.agenda-day-half-first{
    top:0;
}

.agenda-day-half-second{
    bottom:0;
    border-top:1px dashed #cfdae5;
}

.agenda-day-half-free{
    width:100%;
    height:100%;
    border:0;
    background:transparent;
    padding:0 13px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    color:#7890a7;
    cursor:pointer;
    font-size:9px;
    font-weight:750;
    text-align:left;
}

.agenda-day-half-free b{
    width:25px;
    height:25px;
    display:grid;
    place-items:center;
    border:1px solid #d1deea;
    border-radius:8px;
    font-size:15px;
    background:#fff;
}

.agenda-day-half-free:hover{
    background:rgba(15,95,156,.035);
}

.agenda-day-half.blocked{
    display:flex;
    align-items:center;
    padding:0 13px;
    color:#9a6670;
    background:rgba(207,86,86,.055);
    font-size:9px;
    font-weight:800;
    cursor:context-menu;
}

.agenda-day-half.occupied{
    background:transparent;
}

.agenda-day-appointments-layer{
    position:absolute;
    top:0;
    left:90px;
    right:0;
    pointer-events:none;
    z-index:4;
}

.agenda-appointment.agenda-day-positioned{
    position:absolute;
    left:8px;
    right:8px;
    width:auto;
    min-height:0;
    margin:0;
    pointer-events:auto;
    z-index:5;
    overflow:hidden;
}

/* Dá um pequeno respiro entre sessões consecutivas. */
.agenda-appointment.agenda-day-positioned + .agenda-appointment.agenda-day-positioned{
    margin-top:0;
}

body.logged-app.theme-dark .agenda-day-hour-time{
    color:#a8bdd2;
}

body.logged-app.theme-dark .agenda-day-hour-time .half{
    color:#8fa6bd;
}

body.logged-app.theme-dark .agenda-day-hour-card{
    background:#0b1728;
    border-color:#223550;
}

body.logged-app.theme-dark .agenda-day-half-second{
    border-top-color:#2c4059;
}

body.logged-app.theme-dark .agenda-day-half-free{
    color:#8fa6bd;
}

body.logged-app.theme-dark .agenda-day-half-free b{
    background:#101f32;
    border-color:#304760;
    color:#b8c9d9;
}

body.logged-app.theme-dark .agenda-day-half-free:hover{
    background:#0f1d31;
}

body.logged-app.theme-dark .agenda-day-half.blocked{
    background:rgba(207,86,86,.10);
    color:#e0a6ad;
}

@media (max-width: 700px){
    .agenda-day-hour{
        grid-template-columns:52px 1fr;
        gap:8px;
        height:var(--agenda-day-row-height, 96px);
    }

    .agenda-day-appointments-layer{
        left:60px;
    }

    .agenda-day-hour-time{
        font-size:10px;
    }
}


/* Segmentos de um mesmo horário quando atravessam a troca de hora.
   Cada pedaço permanece dentro do card correspondente. */
.agenda-appointment.agenda-day-segment.continues{
    border-bottom-left-radius:8px;
    border-bottom-right-radius:8px;
}

.agenda-appointment.agenda-day-segment.continuation{
    border-top-left-radius:8px;
    border-top-right-radius:8px;
}

.agenda-appointment.agenda-day-segment.continuation:empty{
    padding:0;
}

/* No modo escuro, :30 usa a mesma leitura visual dos horários cheios. */
body.logged-app.theme-dark .agenda-day-hour-time .half{
    color:#a8bdd2;
}


/* =========================================================
   CORREÇÃO FINAL — agenda diária
   ========================================================= */

/* :00 e :30 exatamente com a mesma fonte/peso */
.agenda-day-hour-time .full,
.agenda-day-hour-time .half{
    font-size:11px !important;
    font-weight:850 !important;
    line-height:1 !important;
    color:#587088 !important;
}

/* O atendimento pode atravessar o pequeno gap entre uma hora e outra.
   O conteúdo base continua dentro do card; apenas o agendamento posicionado
   pode avançar visualmente quando a sessão segue após a hora cheia. */
.agenda-day-hour-card{
    overflow:visible !important;
}

.agenda-day-hour-card .agenda-appointment.agenda-day-positioned{
    position:absolute !important;
    left:6px !important;
    right:6px !important;
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    min-height:0 !important;
    box-sizing:border-box !important;
    margin:0 !important;
    padding:5px 10px !important;
    z-index:5 !important;
    overflow:hidden !important;
    align-items:center !important;
}

.agenda-day-hour-card .agenda-appointment.agenda-day-continuous{
    z-index:12 !important;
}

/* Trechos muito pequenos não deixam conteúdo escapar verticalmente. */
.agenda-day-hour-card .agenda-day-segment .agenda-appt-main{
    min-width:0 !important;
    overflow:hidden !important;
}

.agenda-day-hour-card .agenda-day-segment .agenda-appt-main strong,
.agenda-day-hour-card .agenda-day-segment .agenda-appt-main span{
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
}

body.logged-app.theme-dark .agenda-day-hour-time .full,
body.logged-app.theme-dark .agenda-day-hour-time .half{
    color:#a8bdd2 !important;
}


/* Agenda do dia — horários centralizados no centro de cada meia hora */
.agenda-day-hour-time{
    display:grid !important;
    grid-template-rows:1fr 1fr !important;
    align-items:center !important;
    justify-items:center !important;
    padding:0 !important;
    text-align:center !important;
}

.agenda-day-hour-time .full,
.agenda-day-hour-time .half{
    align-self:center !important;
    justify-self:center !important;
    width:100% !important;
    text-align:center !important;
}


/* =========================================================
   AJUSTES MOBILE — Agenda
   ========================================================= */
@media (max-width: 760px){

    /* Topo: busca | prontuários | sino | configurações */
    body.logged-app #agenda-toolbar-row{
        display:grid !important;
        grid-template-columns:minmax(0,1fr) 68px 38px 38px !important;
        grid-template-rows:40px !important;
        gap:6px !important;
        align-items:center !important;
        position:relative !important;
    }

    body.logged-app #agenda-toolbar-row .agenda-toolbar-client-group{
        display:contents !important;
    }

    body.logged-app #agenda-toolbar-row .agenda-toolbar-search{
        grid-column:1 !important;
        grid-row:1 !important;
        min-width:0 !important;
        width:100% !important;
    }

    body.logged-app #agenda-toolbar-row #agenda-history-client-name{
        width:100% !important;
        min-width:0 !important;
        height:40px !important;
        box-sizing:border-box !important;
    }

    body.logged-app #agenda-toolbar-row .agenda-prontuarios-open{
        grid-column:2 !important;
        grid-row:1 !important;
        width:68px !important;
        min-width:68px !important;
        max-width:68px !important;
        height:40px !important;
        min-height:40px !important;
        padding:0 5px !important;
        font-size:8px !important;
        line-height:1 !important;
        white-space:nowrap !important;
        overflow:hidden !important;
    }

    body.logged-app #agenda-toolbar-row .agenda-toolbar-actions{
        display:contents !important;
        position:static !important;
    }

    body.logged-app #agenda-toolbar-row .agenda-notifications-wrap{
        grid-column:3 !important;
        grid-row:1 !important;
        width:38px !important;
        min-width:38px !important;
    }

    body.logged-app #agenda-toolbar-row #agenda-settings-open{
        grid-column:4 !important;
        grid-row:1 !important;
    }

    body.logged-app #agenda-toolbar-row .agenda-icon-action{
        width:38px !important;
        min-width:38px !important;
        height:40px !important;
        min-height:40px !important;
        padding:0 !important;
    }

    /* Os indicadores saem do topo e vão para o fim da página. */
    body.logged-app .agenda-summary-inline.agenda-summary-mobile-bottom{
        display:flex !important;
        flex-wrap:wrap !important;
        gap:7px !important;
        width:100% !important;
        margin:12px 0 4px !important;
        padding:0 !important;
    }

    body.logged-app .agenda-summary-inline.agenda-summary-mobile-bottom .agenda-summary-card{
        flex:1 1 calc(33.333% - 7px) !important;
        min-width:96px !important;
        min-height:42px !important;
        padding:6px 7px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        gap:5px !important;
    }

    body.logged-app .agenda-summary-inline.agenda-summary-mobile-bottom .agenda-summary-icon{
        width:20px !important;
        height:20px !important;
        min-width:20px !important;
        font-size:10px !important;
    }

    body.logged-app .agenda-summary-inline.agenda-summary-mobile-bottom .agenda-summary-card strong{
        font-size:11px !important;
        line-height:1 !important;
    }

    body.logged-app .agenda-summary-inline.agenda-summary-mobile-bottom .agenda-summary-card span{
        font-size:7.5px !important;
        line-height:1.1 !important;
        white-space:normal !important;
    }

    /* ---------------------------------------------------------
       Fileira de ações e navegação:
       1ª linha: Recarregar | Novo horário | Hoje (2 colunas)
       2ª linha: <          | Data         | > | Calendário
       --------------------------------------------------------- */
    body.logged-app #agenda-date-actions-row{
        display:grid !important;
        grid-template-columns:40px minmax(0,1fr) 40px 40px !important;
        grid-template-rows:42px 42px !important;
        gap:6px !important;
        width:100% !important;
        align-items:stretch !important;
    }

    body.logged-app #agenda-date-actions-row .agenda-web-actions,
    body.logged-app #agenda-date-actions-row .agenda-web-nav,
    body.logged-app #agenda-date-actions-row .agenda-next-tools{
        display:contents !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-week-prontuarios-slot{
        display:none !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-refresh{
        grid-column:1 !important;
        grid-row:1 !important;
        width:40px !important;
        min-width:40px !important;
        max-width:40px !important;
        height:42px !important;
        min-height:42px !important;
        padding:0 !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-refresh .agenda-refresh-text{
        display:none !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-refresh .agenda-refresh-icon{
        font-size:18px !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-new{
        grid-column:2 !important;
        grid-row:1 !important;
        width:100% !important;
        min-width:0 !important;
        height:42px !important;
        min-height:42px !important;
        padding:0 8px !important;
        font-size:11px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-today{
        grid-column:3 / 5 !important;
        grid-row:1 !important;
        width:100% !important;
        min-width:0 !important;
        height:42px !important;
        min-height:42px !important;
        margin:0 !important;
        padding:0 6px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-prev{
        grid-column:1 !important;
        grid-row:2 !important;
        width:40px !important;
        min-width:40px !important;
        height:42px !important;
        min-height:42px !important;
        margin:0 !important;
    }

    body.logged-app #agenda-date-actions-row .agenda-date-picker-wrap{
        grid-column:2 !important;
        grid-row:2 !important;
        width:100% !important;
        min-width:0 !important;
        height:42px !important;
    }

    body.logged-app #agenda-date-actions-row .agenda-date-main{
        width:100% !important;
        min-width:0 !important;
        height:42px !important;
        min-height:42px !important;
        margin:0 !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-next{
        grid-column:3 !important;
        grid-row:2 !important;
        width:40px !important;
        min-width:40px !important;
        height:42px !important;
        min-height:42px !important;
        margin:0 !important;
    }

    body.logged-app #agenda-date-actions-row #agenda-view-toggle{
        grid-column:4 !important;
        grid-row:2 !important;
        width:40px !important;
        min-width:40px !important;
        height:42px !important;
        min-height:42px !important;
        margin:0 !important;
        padding:0 !important;
    }

    /* Campo Dia do modal "Agendar cliente": nunca ultrapassa a coluna. */
    body.logged-app #agenda-form-modal .agenda-form-grid,
    body.logged-app #agenda-form-modal .agenda-form-grid > *,
    body.logged-app #agenda-form-modal .field{
        min-width:0 !important;
        max-width:100% !important;
    }

    body.logged-app #agenda-form-date{
        display:block !important;
        width:100% !important;
        min-width:0 !important;
        max-width:100% !important;
        inline-size:100% !important;
        box-sizing:border-box !important;
    }
}

/* =========================================================
   EXPORTAR PRONTUÁRIOS — modo escuro
   Desktop + celular
   ========================================================= */
body.logged-app.theme-dark #agenda-export-modal .agenda-export-modal-card,
body.logged-app.theme-dark #agenda-export-modal .agenda-modal-head,
body.logged-app.theme-dark #agenda-export-modal .agenda-export-body,
body.logged-app.theme-dark #agenda-export-modal .agenda-export-scroll,
body.logged-app.theme-dark #agenda-export-modal .agenda-export-actions{
    background:#0b1728 !important;
    color:#edf4ff !important;
    border-color:#223550 !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-summary{
    background:#0f1e33 !important;
    color:#edf4ff !important;
    border-color:#29415f !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-summary strong{
    color:#edf4ff !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-summary span{
    color:#9db1ca !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-item,
body.logged-app.theme-dark #agenda-export-modal .agenda-export-empty{
    background:#0f1e33 !important;
    color:#edf4ff !important;
    border-color:#29415f !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-item:hover{
    background:#142840 !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-item-info strong{
    color:#edf4ff !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-item-info span,
body.logged-app.theme-dark #agenda-export-modal .agenda-export-empty{
    color:#9db1ca !important;
}

body.logged-app.theme-dark #agenda-export-modal .field label{
    color:#d8e7fa !important;
}

body.logged-app.theme-dark #agenda-export-modal input[type="email"]{
    background:#0f1e33 !important;
    color:#edf4ff !important;
    border-color:#29415f !important;
    box-shadow:none !important;
}

body.logged-app.theme-dark #agenda-export-modal input[type="email"]::placeholder{
    color:#7188a4 !important;
}


/* =========================================================
   MOBILE — correções finais da Agenda semanal / modal
   ========================================================= */
@media (max-width: 760px){

    /* A agenda semanal não sobe por baixo do menu superior. */
    #screen-agenda.screen.active:has(.agenda-web-shell.agenda-week-active){
        top:0 !important;
        margin-bottom:0 !important;
    }

    #screen-agenda .agenda-web-shell.agenda-week-active{
        margin-top:12px !important;
    }

    /* Mantém a coluna de horários SEMPRE por cima dos chips ao deslizar
       horizontalmente os dias. Assim o chip passa por trás de 09:30/10:00,
       nunca por cima do texto do horário. */
    #agenda-week-grid .agenda-week-time{
        position:sticky !important;
        left:0 !important;
        z-index:60 !important;
    }

    #agenda-week-grid .agenda-week-corner{
        position:sticky !important;
        left:0 !important;
        top:0 !important;
        z-index:70 !important;
    }

    body.logged-app:not(.theme-dark) #agenda-week-grid .agenda-week-time{
        background:#fbfdff !important;
    }

    body.logged-app.theme-dark #agenda-week-grid .agenda-week-time{
        background:#0b1728 !important;
    }

    /* Garante que o chip continue dentro da largura da coluna do dia. */
    #agenda-week-grid .agenda-week-appointment{
        left:3px !important;
        right:3px !important;
        width:auto !important;
        max-width:calc(100% - 6px) !important;
        box-sizing:border-box !important;
    }

    /* Campo Dia no iPhone: remove o tamanho mínimo intrínseco do input date. */
    body.logged-app #agenda-form-modal .agenda-form-grid{
        width:100% !important;
        grid-template-columns:minmax(0,1fr) !important;
        overflow:hidden !important;
    }

    body.logged-app #agenda-form-modal .agenda-form-grid > .field{
        width:100% !important;
        min-width:0 !important;
        max-width:100% !important;
        overflow:hidden !important;
        box-sizing:border-box !important;
    }

    body.logged-app #agenda-form-date{
        -webkit-appearance:none !important;
        appearance:none !important;
        display:block !important;
        width:calc(100% - 2px) !important;
        inline-size:calc(100% - 2px) !important;
        min-width:0 !important;
        min-inline-size:0 !important;
        max-width:calc(100% - 2px) !important;
        max-inline-size:calc(100% - 2px) !important;
        box-sizing:border-box !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
        font-size:16px !important;
        margin:0 !important;
    }

    body.logged-app #agenda-form-date::-webkit-date-and-time-value{
        min-width:0 !important;
        width:100% !important;
        text-align:left !important;
    }
}


/* =========================================================
   PRONTUÁRIO — campos de edição no modo escuro
   Corrige campos brancos com texto claro ao editar modelos.
   ========================================================= */
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-model-fields input[data-structured-field],
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-model-fields select[data-structured-field],
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-model-fields textarea[data-structured-field],
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-model-fields .agenda-rich-text[data-structured-field],
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-model-fields .agenda-image-marker-legend-row input,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-name,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-use-model,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-foto-tag,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-text{
    background:#091220 !important;
    color:#edf4ff !important;
    border-color:#29415f !important;
    box-shadow:none !important;
    caret-color:#edf4ff !important;
}

body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-model-fields input[data-structured-field]::placeholder,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-model-fields textarea[data-structured-field]::placeholder,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-name::placeholder,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-foto-tag::placeholder,
body.logged-app.theme-dark #agenda-prontuario-modal
#agenda-prontuario-text::placeholder{
    color:#7188a4 !important;
    opacity:1 !important;
}

/* Campos somente leitura também precisam permanecer escuros. */
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-structured-form.is-readonly input[data-structured-field],
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-structured-form.is-readonly textarea[data-structured-field],
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-structured-form.is-readonly .agenda-rich-text[data-structured-field],
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-structured-form.is-readonly .pulse-head-field input{
    background:#0b1728 !important;
    color:#cfdced !important;
    border-color:#223550 !important;
}

/* Blocos que contêm os campos estruturados. */
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-page,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-question,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-pulse,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-image-answer,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-gallery-section,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-gallery-card,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-pulse-table{
    background:#0e1b2d !important;
    border-color:#223550 !important;
}

/* Cabeçalho das páginas do modelo. */
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-page-head{
    background:linear-gradient(135deg,#10213a,#0b1728) !important;
    border-color:#223550 !important;
}

/* Labels/títulos continuam legíveis no escuro. */
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-basic-field strong,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-question h5,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-pulse h5,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-image-answer h5,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-gallery-section > h5,
body.logged-app.theme-dark #agenda-prontuario-modal .agenda-structured-gallery-card h6{
    color:#dce9f7 !important;
}

/* Selects nativos ficam coerentes com o tema escuro. */
body.logged-app.theme-dark #agenda-prontuario-modal select{
    color-scheme:dark;
}


/* =========================================================
   PRONTUÁRIO — modelos simples/legados no modo escuro
   Campos como "Evolução", "Conduta" etc.
   ========================================================= */
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-prontuario-model-answer,
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-prontuario-model-answer[contenteditable="true"],
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-prontuario-model-answer[contenteditable="false"]{
    background:#091220 !important;
    color:#edf4ff !important;
    border-color:#29415f !important;
    caret-color:#edf4ff !important;
    box-shadow:none !important;
}

/* Ao clicar para editar, não volta para o fundo branco. */
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-prontuario-model-answer[contenteditable="true"]:focus{
    background:#0d1b2d !important;
    color:#ffffff !important;
    border-color:#3d6388 !important;
    box-shadow:inset 0 0 0 2px rgba(85,155,220,.16) !important;
    outline:none !important;
}

/* Título/faixa de cada campo do modelo. */
body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-prontuario-model-row{
    border-color:#29415f !important;
    background:#0e1b2d !important;
}

body.logged-app.theme-dark #agenda-prontuario-modal
.agenda-prontuario-model-label{
    background:#102239 !important;
    color:#edf4ff !important;
    border-color:#29415f !important;
}


/* =========================================================
   AGENDA SEMANAL — eventos de 30 min com tipografia menor
   Para chips que ocupam apenas 1 bloco de 30 minutos.
   ========================================================= */
.agenda-week-appointment[style*="--agenda-week-span:1"]{
    padding:1px 4px !important;
    gap:0 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] .agenda-week-meta{
    gap:3px !important;
    line-height:.92 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] .agenda-week-hour{
    font-size:8px !important;
    line-height:.92 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] .agenda-week-meta em{
    font-size:6px !important;
    line-height:.92 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] strong{
    font-size:7.2px !important;
    line-height:.92 !important;
    margin-top:0 !important;
    -webkit-line-clamp:1 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] span{
    font-size:6px !important;
    line-height:.92 !important;
    margin-top:0 !important;
}


/* Ajuste fino — chips de 30 min ainda mais compactos */
.agenda-week-appointment[style*="--agenda-week-span:1"]{
    padding:0 3px !important;
    gap:0 !important;
    align-content:center !important;
    justify-content:center !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] .agenda-week-meta{
    gap:2px !important;
    line-height:.82 !important;
    margin:0 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] .agenda-week-hour{
    font-size:7px !important;
    line-height:.82 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] .agenda-week-meta em{
    font-size:5.5px !important;
    line-height:.82 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] strong{
    font-size:6.6px !important;
    line-height:.84 !important;
    margin:0 !important;
    white-space:nowrap !important;
    -webkit-line-clamp:1 !important;
}

.agenda-week-appointment[style*="--agenda-week-span:1"] span{
    margin:0 !important;
}


/* =========================================================
   AGENDA SEMANAL — chip de até 30 min realmente compacto
   Usa classe aplicada pelo JS conforme a duração real.
   ========================================================= */
.agenda-week-appointment.is-30min{
    padding:0 3px !important;
    gap:0 !important;
    justify-content:center !important;
    align-content:center !important;
}

.agenda-week-appointment.is-30min .agenda-week-meta{
    gap:2px !important;
    margin:0 !important;
    line-height:.82 !important;
}

.agenda-week-appointment.is-30min .agenda-week-hour{
    font-size:7px !important;
    line-height:.82 !important;
}

.agenda-week-appointment.is-30min .agenda-week-meta em{
    font-size:5.5px !important;
    line-height:.82 !important;
}

.agenda-week-appointment.is-30min strong{
    font-size:6.6px !important;
    line-height:.84 !important;
    margin:0 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    -webkit-line-clamp:1 !important;
}

.agenda-week-appointment.is-30min span{
    margin-top:0 !important;
}


/* Ajuste fino — tamanho intermediário para chips de 30 min */
.agenda-week-appointment.is-30min{
    padding:1px 4px !important;
    gap:0 !important;
}

.agenda-week-appointment.is-30min .agenda-week-meta{
    gap:3px !important;
    line-height:.92 !important;
}

.agenda-week-appointment.is-30min .agenda-week-hour{
    font-size:8px !important;
    line-height:.92 !important;
}

.agenda-week-appointment.is-30min .agenda-week-meta em{
    font-size:6.5px !important;
    line-height:.92 !important;
}

.agenda-week-appointment.is-30min strong{
    font-size:8.2px !important;
    line-height:.94 !important;
    margin:0 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    -webkit-line-clamp:1 !important;
}

.agenda-week-appointment.is-30min span{
    margin-top:0 !important;
}


/* Ajuste fino adicional — aumentar só um pouco os chips de 30 min */
.agenda-week-appointment.is-30min{
    padding:1px 4px !important;
}

.agenda-week-appointment.is-30min .agenda-week-meta{
    gap:3px !important;
    line-height:.94 !important;
}

.agenda-week-appointment.is-30min .agenda-week-hour{
    font-size:8.5px !important;
    line-height:.94 !important;
}

.agenda-week-appointment.is-30min .agenda-week-meta em{
    font-size:6.8px !important;
    line-height:.94 !important;
}

.agenda-week-appointment.is-30min strong{
    font-size:8.7px !important;
    line-height:.96 !important;
    margin:0 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    -webkit-line-clamp:1 !important;
}

.agenda-week-appointment.is-30min span{
    margin-top:0 !important;
}


/* Ajuste fino — chips de 30 min: aumentar apenas o nome */
.agenda-week-appointment.is-30min strong{
    font-size:9.1px !important;
}

body.logged-app.theme-dark #agenda-export-modal .agenda-export-filters,
body.logged-app.theme-dark #agenda-export-modal .agenda-export-email-row{
    background:var(--surface,#172331);
    border-color:var(--line);
}
@media (max-width:700px){
    #agenda-export-modal .agenda-export-filters{grid-template-columns:1fr;padding:12px 14px;}
    #agenda-export-modal .agenda-export-periodo{grid-template-columns:1fr;}
    #agenda-export-modal .agenda-export-email-row{padding:10px 14px 0;}
}

/* Sessões avulsas pendentes no pacote */
.agenda-package-pending-box{margin-top:4px;border:1px solid #d8e2ee;border-radius:14px;background:#f8fbfe;overflow:hidden}
.agenda-package-pending-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid #e3ebf3}
.agenda-package-pending-head>div{display:grid;gap:3px}
.agenda-package-pending-head strong{font-size:13px;color:#0f2942}
.agenda-package-pending-head span,.agenda-package-pending-head small{font-size:11px;color:#64748b}
.agenda-package-pending-head small{white-space:nowrap;font-weight:700}
.agenda-package-pending-list{max-height:210px;overflow:auto;padding:8px;display:grid;gap:6px}
.agenda-package-pending-item{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid #e1e9f1;border-radius:10px;background:#fff;cursor:pointer}
.agenda-package-pending-item:hover{border-color:#a9c5de;background:#f5faff}
.agenda-package-pending-item input{width:17px;height:17px;flex:0 0 auto}
.agenda-package-pending-item span{display:grid;gap:2px;min-width:0}
.agenda-package-pending-item strong{font-size:12px;color:#18354f}
.agenda-package-pending-item small{font-size:11px;color:#64748b;white-space:normal}
.agenda-package-pending-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-top:1px solid #e3ebf3;background:#fff}
.agenda-package-pending-footer>span{font-size:11px;font-weight:700;color:#64748b}
.agenda-package-pending-footer .btn{width:auto}
body.logged-app.theme-dark .agenda-package-pending-box{background:#102338;border-color:#2a455f}
body.logged-app.theme-dark .agenda-package-pending-head{border-color:#2a455f}
body.logged-app.theme-dark .agenda-package-pending-head strong,.logged-app.theme-dark .agenda-package-pending-item strong{color:#eef6ff}
body.logged-app.theme-dark .agenda-package-pending-head span,body.logged-app.theme-dark .agenda-package-pending-head small,body.logged-app.theme-dark .agenda-package-pending-item small,body.logged-app.theme-dark .agenda-package-pending-footer>span{color:#aabed0}
body.logged-app.theme-dark .agenda-package-pending-item{background:#13283d;border-color:#2a455f}
body.logged-app.theme-dark .agenda-package-pending-item:hover{background:#17314a;border-color:#426886}
body.logged-app.theme-dark .agenda-package-pending-footer{background:#13283d;border-color:#2a455f}
@media(max-width:700px){.agenda-package-pending-head,.agenda-package-pending-footer{align-items:stretch;flex-direction:column}.agenda-package-pending-footer .btn{width:100%}}
