/* Agenda uses the shared Mecaunt controls; only calendar layout is local. */
.agenda-view {max-width:1360px;margin:0 auto;min-width:0;container:agenda/inline-size;font-size:14px;}
.agenda-view *, .agenda-modal * {box-sizing:border-box;}
.agenda-toolbar {align-items:center;flex-wrap:wrap;}
.agenda-view .page-header p {color:#64748b;}
.agenda-filters,.agenda-overdue {background:#fff;border:1px solid #dbe3ef;border-radius:14px;padding:18px 20px;box-shadow:0 1px 2px rgb(15 23 42 / 3%);}
.agenda-filters {display:flex;gap:16px;flex-wrap:wrap;align-items:end;margin-bottom:20px;}
.agenda-month-nav {display:flex;align-items:end;gap:8px;margin-right:auto;}
.agenda-view label,.agenda-form label {display:flex;flex-direction:column;gap:6px;min-width:0;color:#64748b;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;}
.agenda-view .input,.agenda-view .select,.agenda-form .input,.agenda-form .select {margin:0;min-width:0;font-family:inherit;letter-spacing:normal;text-transform:none;font-weight:400;}
.agenda-filters .input,.agenda-filters .select,.agenda-filters .btn {height:42px;}
.agenda-filters>.agenda-month-nav~label {min-width:145px;}
.agenda-month-nav [data-prev],.agenda-month-nav [data-next] {width:36px;padding:0;font-size:24px;font-weight:400;}
.agenda-message {color:#64748b;line-height:1.5;}
.agenda-message:empty {display:none;}
.agenda-calendar {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;border:1px solid #dbe3ef;border-radius:14px;overflow:hidden;background:#e2e8f0;}
.agenda-weekday {padding:12px 4px;background:#f8fafc;color:#64748b;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;text-align:center;}
.agenda-day,.agenda-gap {background:#fff;min-width:0;min-height:124px;padding:8px;}
.agenda-gap {background:#f8fafc;}
.agenda-day h3 {display:flex;align-items:center;justify-content:space-between;margin:0 0 6px;gap:4px;font-size:12px;}
.agenda-day-number {display:inline-flex;align-items:center;gap:8px;min-width:28px;min-height:28px;padding:4px 6px;border:0;border-radius:8px;background:transparent;color:#475569;font:inherit;font-weight:700;cursor:pointer;}
.agenda-day-number:hover {background:#eef2ff;color:#4338ca;}
.agenda-day.is-today {background:#fafaff;}
.is-today .agenda-day-number {background:#4f46e5;color:#fff;}
.agenda-today-label {font-size:10px;color:#4f46e5;font-weight:600;}
.agenda-day-label {display:none;}
.agenda-item {margin:6px 0;min-width:0;}
.agenda-entry {display:flex;flex-direction:column;align-items:flex-start;gap:5px;width:100%;padding:9px 10px;border:1px solid #e2e8f0;border-left:3px solid #a5b4fc;border-radius:8px;background:#f8fafc;text-align:left;color:#334155;font:inherit;cursor:pointer;overflow-wrap:anywhere;transition:background-color 150ms,border-color 150ms;}
.agenda-entry:hover {background:#eef2ff;border-color:#c7d2fe;}
.agenda-entry strong {font-size:12px;line-height:1.45;font-weight:700;}
.agenda-entry-type {font-size:10px;font-weight:600;color:#64748b;}
.agenda-item[data-type=POR_PAGAR] .agenda-entry {border-left-color:#d4a65a;}
.agenda-item[data-type=POR_COBRAR] .agenda-entry {border-left-color:#6aa894;}
.agenda-amount {font-size:12px;font-variant-numeric:tabular-nums;}
.agenda-status {font-size:10px;color:#64748b;}
.agenda-status.is-done {color:#167744;}
.agenda-overdue {margin-top:24px;}
.agenda-overdue h2 {margin:0;font-size:17px;}
.agenda-help {margin:6px 0 16px;color:#64748b;font-size:13px;}
.agenda-overdue [data-overdue] {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:16px;color:#64748b;font-size:13px;}
.agenda-overdue [data-overdue]>div>p {margin:0 0 6px;font-size:12px;}
.agenda-actions {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:20px;padding-top:16px;border-top:1px solid #e2e8f0;}
.agenda-form {display:grid;gap:16px;}
.agenda-form p {margin:0;color:#64748b;font-size:13px;line-height:1.5;}
.agenda-form .form-error {color:#b91c1c;}
.agenda-form .form-error:empty {display:none;}
.agenda-form>.agenda-toolbar {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;}
.agenda-form fieldset {display:grid;gap:14px;border:1px solid #e2e8f0;border-radius:10px;padding:16px;margin:0;min-width:0;}
.agenda-form legend {padding:0 6px;font-size:13px;font-weight:700;color:#475569;}
.agenda-form>button[type=submit] {justify-self:end;}
.agenda-weekdays {display:flex;gap:12px;flex-wrap:wrap;}
.agenda-weekdays[hidden] {display:none;}
.agenda-weekdays label {flex-direction:row;align-items:center;min-height:36px;text-transform:none;font-size:12px;}
.agenda-modal .modal-card {width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;}
.agenda-modal .modal-header h2 {margin:0;font-size:18px;font-weight:800;}
.agenda-modal .modal-header {gap:16px;}
.agenda-detail h3 {margin:10px 0;font-size:20px;overflow-wrap:anywhere;}
.agenda-detail p {color:#64748b;font-size:14px;line-height:1.6;}
.agenda-detail .agenda-detail-value {color:#334155;font-size:18px;font-weight:700;}
.agenda-note {white-space:pre-wrap;overflow-wrap:anywhere;padding:12px;background:#f8fafc;border-radius:8px;}
.agenda-view :focus-visible,.agenda-modal :focus-visible {outline:3px solid #818cf8;outline-offset:2px;}
.agenda-view [data-more],.agenda-view [data-overdue-more] {margin-top:16px;}
@container agenda (max-width:850px) {
 .agenda-calendar {grid-template-columns:1fr;background:#fff;gap:0;}
 .agenda-weekday,.agenda-gap {display:none;}
 .agenda-day {min-height:0;padding:12px 16px;border-bottom:1px solid #edf1f7;}
 .agenda-day:last-child {border-bottom:0;}
 .agenda-day h3 {margin:0;justify-content:flex-start;gap:12px;}
 .agenda-day-label {display:inline;font-weight:400;}
 .agenda-day-number {min-height:36px;}
 .agenda-day .agenda-item {margin:8px 0 0;}
 .agenda-entry strong {font-size:14px;}
 .agenda-entry-type,.agenda-status {font-size:12px;}
 .agenda-month-nav {width:100%;flex-wrap:wrap;margin:0;}
 .agenda-filters>label {flex:1;}
}
@media(max-width:600px) {
 .agenda-toolbar {gap:16px;}
 .agenda-filters,.agenda-overdue {padding:16px;}
 .agenda-month-nav {gap:6px;}
 .agenda-month-nav label {flex:1;}
 .agenda-month-nav [data-today] {width:100%;}
 .agenda-view .btn,.agenda-modal .btn {min-height:44px;}
 .agenda-filters>.agenda-month-nav~label {min-width:100px;}
 .agenda-modal .modal-body {padding:18px;}
 .agenda-actions .btn {flex:1 1 40%;}
 .agenda-form>.agenda-toolbar {grid-template-columns:1fr;}
}
@media(prefers-reduced-motion:reduce){.agenda-view *,.agenda-modal *{animation:none!important;transition:none!important;}}

/* Period selector and views share the same calendar cards and controls. */
.agenda-view-switch {display:inline-flex;gap:4px;padding:4px;margin:0 0 16px;border:1px solid #dbe3ef;border-radius:12px;background:#fff;}
.agenda-view-switch .btn {min-width:88px;background:transparent;color:#64748b;}
.agenda-view-switch .btn:hover {background:#f1f5f9;color:#334155;}
.agenda-view-switch .btn[aria-pressed=true] {background:#4f46e5;color:#fff;}
.agenda-period-heading {display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:22px 0 14px;flex-wrap:wrap;}
.agenda-period-heading h2 {margin:0;font-size:17px;font-weight:700;line-height:1.5;color:#334155;}
.agenda-period-heading h2::first-letter {text-transform:uppercase;}
.agenda-period-heading>span {font-size:12px;color:#64748b;}
.agenda-calendar[aria-busy=true] {min-height:180px;}
.agenda-calendar[data-view=week] .agenda-day {min-height:220px;}
.agenda-calendar[data-view=week] .agenda-day-number {font-variant-numeric:tabular-nums;}
.agenda-day-empty {margin:14px 0;font-size:12px;color:#64748b;}
.agenda-calendar[data-view=day] {display:block;}
.agenda-calendar[data-view=day] .agenda-day {padding:20px;min-height:180px;}
.agenda-calendar[data-view=day] .agenda-day h3 {justify-content:flex-start;gap:12px;margin-bottom:12px;}
.agenda-calendar[data-view=day] .agenda-day-label {display:inline;}
.agenda-calendar[data-view=day] .agenda-day-entries {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px;align-items:start;}
.agenda-calendar[data-view=day] .agenda-item {display:flex;flex-direction:column;gap:12px;margin:0;padding:14px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;}
.agenda-calendar[data-view=day] .agenda-entry {padding:12px;min-height:116px;}
.agenda-calendar[data-view=day] .agenda-entry strong {font-size:15px;}
.agenda-calendar[data-view=day] .agenda-entry-type,.agenda-calendar[data-view=day] .agenda-status {font-size:12px;}
.agenda-quick-action {align-self:flex-end;}
@container agenda (max-width:850px) {
 .agenda-calendar[data-view=week] .agenda-day {min-height:0;}
 .agenda-calendar[data-view=day] .agenda-day {padding:16px;}
}
@media(max-width:600px) {
 .agenda-view-switch {display:flex;}
 .agenda-view-switch .btn {flex:1;min-width:0;}
 .agenda-period-heading {margin-top:18px;gap:4px;}
 .agenda-period-heading h2 {font-size:16px;}
 .agenda-quick-action {width:100%;}
}
@media(prefers-reduced-motion:no-preference) {
 .agenda-calendar[data-view=week],.agenda-calendar[data-view=day] {animation:agenda-view-appear 180ms ease-out;}
 @keyframes agenda-view-appear {from{opacity:.5;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
}

/* Keep field bottoms level: shared labels have a bottom margin. */
.agenda-filters label {margin:0;}
.agenda-filters {display:grid;grid-template-columns:minmax(360px,1fr) minmax(160px,.4fr) minmax(160px,.4fr);align-items:end;}
.agenda-month-nav {display:grid;grid-template-columns:36px minmax(180px,1fr) 36px auto;align-items:end;margin:0;width:100%;}
.agenda-filters>.agenda-month-nav~label {min-width:0;}
.agenda-filters .input,.agenda-filters .select,.agenda-filters .btn {height:44px;min-height:44px;margin:0;}
.agenda-filters .select {padding:9px 32px 9px 12px;width:100%;}
.agenda-month-nav .input {padding:9px 10px;width:100%;}
.agenda-month-nav [data-today] {width:auto;}
.agenda-form .agenda-scope-help {padding:12px 14px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;color:#475569;line-height:1.5;}
.agenda-day-more {display:block;padding:8px 6px;margin-top:6px;border:0;border-radius:6px;background:transparent;color:#4338ca;font:inherit;font-size:12px;font-weight:700;text-align:left;cursor:pointer;min-height:32px;}
.agenda-day-more:hover {background:#eef2ff;}
@container agenda (max-width:1000px){
 .agenda-filters {grid-template-columns:repeat(2,minmax(0,1fr));}
 .agenda-month-nav {grid-column:1/-1;grid-template-columns:36px minmax(180px,1fr) 36px auto;}
}
@container agenda (max-width:420px){
 .agenda-filters {grid-template-columns:minmax(0,1fr);}
 .agenda-month-nav {grid-template-columns:36px minmax(0,1fr) 36px;}
 .agenda-month-nav [data-today] {grid-column:1/-1;width:100%;}
 .agenda-month-nav .input {padding-left:6px;padding-right:6px;}
 .agenda-day-more {min-height:44px;}
}
.agenda-settings {min-width:0;}
.agenda-settings .agenda-settings-types {display:flex;flex-wrap:wrap;gap:8px 20px;margin:12px 0 0;padding:0;border:0;min-width:0;}
.agenda-settings .agenda-settings-types legend {border:0;margin:0;padding:0;font-size:12px;color:#64748b;font-weight:600;}
.agenda-settings-types .checkbox-label {min-height:40px;margin:0;gap:8px;font-size:13px;letter-spacing:normal;text-transform:none;}
.agenda-settings-types:disabled .checkbox-label {color:#64748b;cursor:default;}
.agenda-settings-suspension {margin-top:12px;}
.agenda-settings-mail {margin-top:12px;}
.agenda-settings-mail p {margin:0;}
.agenda-settings-mail p + p {margin-top:6px;}
.agenda-settings-schedule {display:flex;align-items:center;gap:24px;margin:8px 0 16px;}
.agenda-settings-schedule > div {flex:0 1 180px;min-width:0;}
.agenda-settings-schedule .input {margin:0;min-height:44px;font:inherit;font-size:14px;}
.agenda-settings-schedule > p {margin:20px 0 0;font-size:13px;line-height:1.5;color:#475569;}
.agenda-settings-schedule > p span {font-size:12px;color:#64748b;}
.agenda-settings-footer {margin:0 0 24px;}
.agenda-settings-details {margin-top:10px;font-size:12px;line-height:1.5;}
.agenda-settings-details summary {cursor:pointer;color:#4338ca;padding:6px 0;min-height:32px;}
.agenda-settings-details summary:focus-visible {outline:2px solid #6366f1;outline-offset:2px;border-radius:4px;}
.agenda-settings pre {white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;padding:12px;background:#f8fafc;}
.agenda-settings .settings-history-item {overflow-wrap:anywhere;}
@media(max-width:600px){
 .agenda-settings .agenda-settings-types {display:grid;grid-template-columns:1fr;gap:0;}
 .agenda-settings-types .checkbox-label {min-height:44px;}
 .agenda-settings-footer .btn {width:100%;}
 .agenda-settings-schedule {align-items:stretch;flex-direction:column;gap:8px;}
 .agenda-settings-schedule > div {flex:auto;}
 .agenda-settings-schedule > p {margin:0;}
 .agenda-settings-details summary {min-height:44px;}
}
/* Private daily summary: a single text column, with the read icon outside it. */
.notificacion-agenda .notificacion-item-status {display:none;}
.notificacion-agenda .notificacion-item-main {display:flex;flex-direction:column;gap:8px;min-width:0;cursor:default;}
.notificacion-agenda .notificacion-item-header {margin:0;gap:12px;flex-wrap:wrap;}
.notificacion-agenda .notificacion-tag--agenda {padding:0;color:#4f46e5;}
.notificacion-agenda .notificacion-message {font-weight:700;margin:0;}
.notificacion-agenda .notificacion-item-actions {flex:0 0 28px;align-self:flex-start;}
.notificacion-agenda .notificacion-btn-read svg {display:block;width:14px;height:14px;flex:none;}
.agenda-notice-groups {display:grid;gap:12px;}
.agenda-notice-group h4 {margin:0 0 4px;color:#475569;font-size:12px;font-weight:700;}
.agenda-notice-group ul {list-style:none;margin:0;padding:0;}
.agenda-notice-group li {margin:0;padding:3px 0;font-size:13px;line-height:1.5;color:#1e293b;overflow-wrap:anywhere;}
.agenda-notice-amount {color:#475569;}
.agenda-notice-status {margin:0;font-size:12px;line-height:1.5;color:#64748b;}
.agenda-notice-more {display:block;margin:8px 0 0;padding:6px 0;border:0;background:none;color:#4338ca;font:inherit;font-size:12px;font-weight:700;text-align:left;cursor:pointer;min-height:36px;}
.agenda-notice-more:focus-visible {outline:2px solid #6366f1;outline-offset:2px;border-radius:4px;}
.agenda-notice-day {align-self:flex-start;margin:4px 0 0;}
@media(max-width:600px){.agenda-notice-more,.agenda-notice-day{min-height:44px;}}
