/* =========================================================
   MINHA AGENDA (layout novo, 2026-10)
   Tudo escopado em .ag (aba) e .ag-overlay (modais).
   O all.css força cor e fundo de input, select e textarea no tema escuro com
   !important; por isso os campos dos modais também usam !important.
   ========================================================= */

html[data-theme] .ag, html[data-theme] .ag-overlay {
    --ag-bg-card: #FFFFFF;
    --ag-bg-card-2: #F8FAFC;
    --ag-borda: rgba(15, 23, 42, 0.09);
    --ag-borda-forte: rgba(15, 23, 42, 0.16);
    --ag-texto: #0F172A;
    --ag-texto-2: #334155;
    --ag-texto-3: #64748B;
    --ag-controle: #F1F5F9;
    --ag-ativo: #1C6FD0;
    --ag-ativo-bg: rgba(28, 111, 208, 0.10);
    --ag-hoje-bg: rgba(28, 111, 208, 0.08);
    --ag-sombra: 0 8px 24px rgba(15, 23, 42, 0.07);
    --ag-campo: #FFFFFF;
    /* cores das etiquetas: fundo, borda, texto, bolinha */
    --ag-ev-normal-bg: #E6F7F1;   --ag-ev-normal-bd: #A7E3CC;   --ag-ev-normal-tx: #065F46;   --ag-ev-normal-pt: #10B981;
    --ag-ev-conv-bg: #F1EAFE;     --ag-ev-conv-bd: #D3C0FA;     --ag-ev-conv-tx: #5B21B6;     --ag-ev-conv-pt: #8B5CF6;
    --ag-ev-venc-bg: #FFF1E6;     --ag-ev-venc-bd: #FDC9A0;     --ag-ev-venc-tx: #9A3412;     --ag-ev-venc-pt: #F97316;
    --ag-ev-conc-bg: #F1F5F9;     --ag-ev-conc-bd: #CBD5E1;     --ag-ev-conc-tx: #64748B;     --ag-ev-conc-pt: #94A3B8;
}
html[data-theme="dark"] .ag, html[data-theme="dark"] .ag-overlay {
    --ag-bg-card: #0F1834;
    --ag-bg-card-2: #0C142C;
    --ag-borda: rgba(255, 255, 255, 0.08);
    --ag-borda-forte: rgba(255, 255, 255, 0.16);
    --ag-texto: #F1F5FB;
    --ag-texto-2: rgba(241, 245, 251, 0.82);
    --ag-texto-3: rgba(241, 245, 251, 0.6);
    --ag-controle: rgba(255, 255, 255, 0.06);
    --ag-ativo: #FFFFFF;
    --ag-ativo-bg: #1C6FE0;
    --ag-hoje-bg: rgba(28, 111, 224, 0.22);
    --ag-sombra: 0 14px 34px rgba(0, 0, 0, 0.35);
    --ag-campo: #0A1226;
    --ag-ev-normal-bg: rgba(16, 185, 129, 0.16); --ag-ev-normal-bd: rgba(16, 185, 129, 0.45); --ag-ev-normal-tx: #E6FFF5; --ag-ev-normal-pt: #34D399;
    --ag-ev-conv-bg: rgba(139, 92, 246, 0.18);   --ag-ev-conv-bd: rgba(139, 92, 246, 0.5);    --ag-ev-conv-tx: #F3EDFF;   --ag-ev-conv-pt: #A78BFA;
    --ag-ev-venc-bg: rgba(249, 115, 22, 0.18);   --ag-ev-venc-bd: rgba(249, 115, 22, 0.5);    --ag-ev-venc-tx: #FFF1E6;   --ag-ev-venc-pt: #FB923C;
    --ag-ev-conc-bg: rgba(148, 163, 184, 0.12);  --ag-ev-conc-bd: rgba(148, 163, 184, 0.3);   --ag-ev-conc-tx: #CBD5E1;   --ag-ev-conc-pt: #94A3B8;
}

.ag { color: var(--ag-texto); display: grid; gap: 18px; animation: agEntra 0.25s ease-out; }
@keyframes agEntra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ag svg { display: block; }

/* ---------- Botões ---------- */
.ag-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
    font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}
.ag-btn svg { width: 20px; height: 20px; flex: none; }
.ag-btn:active { transform: translateY(1px); }
.ag-btn-prim { background: linear-gradient(135deg, #1C9BE0, #22D3EE); color: #04121F; box-shadow: 0 8px 22px rgba(34, 211, 238, 0.28); }
.ag-btn-prim:hover { box-shadow: 0 10px 28px rgba(34, 211, 238, 0.42); }
.ag-btn-contorno { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.ag-btn-contorno:hover { background: rgba(255, 255, 255, 0.14); }
.ag-btn-contorno.ag-push-ativo { border-color: #4ADE80; color: #DCFCE7; }
.ag-btn-sec { background: var(--ag-controle); color: var(--ag-texto); border-color: var(--ag-borda-forte); height: 42px; }
.ag-btn-sec:hover { border-color: var(--ag-texto-3); }
.ag-btn-perigo { background: transparent; color: #EF4444; border-color: rgba(239, 68, 68, 0.45); height: 42px; }
.ag-btn-perigo:hover { background: #EF4444; color: #fff; }

/* ---------- Topo ---------- */
.ag-hero {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 22px 24px; border-radius: 18px; color: #fff;
    background:
        radial-gradient(120% 140% at 72% 120%, rgba(34, 211, 238, 0.45) 0%, transparent 45%),
        radial-gradient(90% 120% at 64% -20%, rgba(59, 130, 246, 0.55) 0%, transparent 50%),
        linear-gradient(120deg, #0B1B4D 0%, #10257A 48%, #0B2C6B 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: var(--ag-sombra);
}
.ag-hero::after {
    content: ''; position: absolute; top: -40%; bottom: -40%; left: 52%; width: 160px;
    border-left: 3px solid rgba(96, 165, 250, 0.85); border-radius: 50%;
    transform: rotate(14deg); pointer-events: none; filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8));
}
.ag-hero-icone {
    position: relative; z-index: 1; flex: none; width: 68px; height: 68px; border-radius: 16px;
    display: grid; place-items: center; background: linear-gradient(150deg, #2D8CFF, #1557E0);
    box-shadow: 0 10px 24px rgba(21, 87, 224, 0.45);
}
.ag-hero-icone svg { width: 36px; height: 36px; }
.ag-hero-texto { position: relative; z-index: 1; flex: 1; min-width: 220px; }
.ag-hero-titulo { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.ag-hero-sub { margin-top: 6px; font-size: 15px; color: rgba(255, 255, 255, 0.82); }
.ag-hero-acoes { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }

.ag-aviso {
    border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 600;
    background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4); color: #B45309;
}
html[data-theme="dark"] .ag-aviso { color: #FCD34D; }

/* ---------- Resumo ---------- */
.ag-resumo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ag-res {
    display: flex; align-items: center; gap: 16px; text-align: left;
    padding: 18px 20px; border-radius: 16px; cursor: pointer; font: inherit; color: inherit;
    background: var(--ag-bg-card); border: 1px solid var(--ag-borda); box-shadow: var(--ag-sombra);
    transition: transform 0.15s, border-color 0.15s;
}
.ag-res:hover { transform: translateY(-2px); border-color: var(--ag-borda-forte); }
.ag-res:focus-visible, .ag-ctl:focus-visible, .ag-btn:focus-visible, .ag-prox:focus-visible { outline: 3px solid #60A5FA; outline-offset: 2px; }
.ag-res-icone { flex: none; width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; }
.ag-res-icone svg { width: 30px; height: 30px; }
.ag-res-icone.ciano { background: rgba(34, 211, 238, 0.14); color: #06B6D4; }
.ag-res-icone.azul  { background: rgba(59, 130, 246, 0.14); color: #3B82F6; }
.ag-res-icone.verde { background: rgba(16, 185, 129, 0.14); color: #10B981; }
html[data-theme="dark"] .ag-res-icone.ciano { color: #67E8F9; }
html[data-theme="dark"] .ag-res-icone.azul  { color: #93C5FD; }
html[data-theme="dark"] .ag-res-icone.verde { color: #6EE7B7; }
.ag-res-texto { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ag-res-rotulo { font-size: 15px; font-weight: 700; }
.ag-res-valor { font-size: 19px; font-weight: 600; }
.ag-res-valor b { font-size: 24px; font-weight: 800; }
.ag-res-sub { font-size: 13px; color: var(--ag-texto-3); }
.ag-res-seta { flex: none; color: var(--ag-texto-3); }
.ag-res-seta svg { width: 22px; height: 22px; }

/* ---------- Corpo: calendário + próximos ---------- */
.ag-corpo { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ag-cal-card, .ag-proximos {
    background: var(--ag-bg-card); border: 1px solid var(--ag-borda); border-radius: 18px;
    box-shadow: var(--ag-sombra); padding: 16px;
}

.ag-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ag-nav, .ag-direita { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ag-ctl {
    height: 42px; min-width: 42px; padding: 0 16px; border-radius: 10px; cursor: pointer;
    background: var(--ag-controle); border: 1px solid var(--ag-borda-forte); color: var(--ag-texto);
    font: inherit; font-size: 14px; font-weight: 600; display: inline-grid; place-items: center;
}
.ag-ctl:hover { border-color: var(--ag-texto-3); }
.ag-ctl-ic { padding: 0; width: 46px; }
.ag-ctl-ic svg { width: 18px; height: 18px; }
.ag-titulo-cal { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.ag-titulo-cal svg { width: 28px; height: 28px; color: #3B82F6; }

.ag-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--ag-texto-2) !important; font-weight: 500; }
html[data-theme] .ag-check input {
    appearance: none; -webkit-appearance: none; width: 20px !important; height: 20px !important; min-width: 0; padding: 0 !important; margin: 0; flex: none; cursor: pointer;
    border-radius: 5px; border: 2px solid var(--ag-texto-3) !important; background: transparent !important; display: grid; place-items: center;
}
html[data-theme] .ag-check input:checked { background: #1C6FE0 !important; border-color: #1C6FE0 !important; }
html[data-theme] .ag-check input:checked::after { content: ''; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }

.ag-segmento { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--ag-controle); border: 1px solid var(--ag-borda-forte); }
.ag-segmento button {
    height: 36px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; cursor: pointer;
    color: var(--ag-texto-2); font: inherit; font-size: 14px; font-weight: 600;
}
.ag-segmento button.ativo { background: var(--ag-ativo-bg); color: var(--ag-ativo); }
html[data-theme="dark"] .ag-segmento button.ativo { box-shadow: 0 4px 12px rgba(28, 111, 224, 0.4); }

/* ---------- FullCalendar ---------- */
#agendaCalendario { min-height: 200px; }
.ag .fc {
    --fc-border-color: var(--ag-borda);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: var(--ag-bg-card-2);
    --fc-neutral-text-color: var(--ag-texto-3);
    --fc-today-bg-color: var(--ag-hoje-bg);
    --fc-now-indicator-color: #EF4444;
    --fc-list-event-hover-bg-color: var(--ag-controle);
    --fc-highlight-color: rgba(59, 130, 246, 0.12);
    color: var(--ag-texto);
    font-size: 14px;
}
.ag .fc .fc-scrollgrid { border-radius: 12px; overflow: hidden; }
.ag .fc-col-header-cell { background: var(--ag-bg-card-2); }
.ag .fc-col-header-cell-cushion {
    padding: 10px 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    color: var(--ag-texto-2) !important; text-decoration: none !important;
}
.ag .fc-daygrid-day-frame { min-height: 84px; }
.ag .fc-daygrid-day-number { padding: 8px 10px; font-size: 15px; font-weight: 600; color: var(--ag-texto) !important; text-decoration: none !important; }
.ag .fc-day-other .fc-daygrid-day-number { color: var(--ag-texto-3) !important; opacity: 0.7; }
.ag .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today { background: transparent; }
.ag .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
    background: var(--ag-hoje-bg); box-shadow: inset 0 0 0 2px #2F7BF5; border-radius: 10px; margin: 2px;
}
.ag .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today .fc-daygrid-day-top { flex-direction: row; }
.ag .fc-dayGridMonth-view .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
    margin: 6px; padding: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: #1C6FE0; color: #fff !important; box-shadow: 0 0 0 4px rgba(28, 111, 224, 0.25);
}
.ag .fc-timegrid-slot-label-cushion, .ag .fc-timegrid-axis-cushion { color: var(--ag-texto-3) !important; font-size: 12px; }
.ag .fc-list-day-cushion { background: var(--ag-bg-card-2) !important; }
.ag .fc-list-day-text, .ag .fc-list-day-side-text { color: var(--ag-texto) !important; text-decoration: none !important; font-weight: 700; }
.ag .fc-list-event td { color: var(--ag-texto-2) !important; }
.ag .fc-daygrid-more-link { color: var(--ag-texto-2) !important; font-weight: 600; font-size: 12px; }
.ag .fc-popover { background: var(--ag-bg-card); border-color: var(--ag-borda-forte); border-radius: 12px; overflow: hidden; }
.ag .fc-popover-header { background: var(--ag-bg-card-2); color: var(--ag-texto); }

/* Etiquetas dos lembretes */
.ag .fc-event.ag-fc-ev {
    background: var(--ag-ev-bg); border: 1px solid var(--ag-ev-bd); color: var(--ag-ev-tx);
    border-radius: 8px; padding: 0; margin: 2px 6px; box-shadow: none; cursor: pointer;
}
.ag .fc-timegrid-event.ag-fc-ev { margin: 0 2px; }
.ag .fc-event.ag-fc-ev:hover { filter: brightness(1.06); }
.ag .fc-event.ag-fc-ev .fc-event-main { color: inherit; padding: 0; }
.ag-tipo-normal    { --ag-ev-bg: var(--ag-ev-normal-bg); --ag-ev-bd: var(--ag-ev-normal-bd); --ag-ev-tx: var(--ag-ev-normal-tx); --ag-ev-pt: var(--ag-ev-normal-pt); }
.ag-tipo-conversa  { --ag-ev-bg: var(--ag-ev-conv-bg);   --ag-ev-bd: var(--ag-ev-conv-bd);   --ag-ev-tx: var(--ag-ev-conv-tx);   --ag-ev-pt: var(--ag-ev-conv-pt); }
.ag-tipo-vencido   { --ag-ev-bg: var(--ag-ev-venc-bg);   --ag-ev-bd: var(--ag-ev-venc-bd);   --ag-ev-tx: var(--ag-ev-venc-tx);   --ag-ev-pt: var(--ag-ev-venc-pt); }
.ag-tipo-concluido { --ag-ev-bg: var(--ag-ev-conc-bg);   --ag-ev-bd: var(--ag-ev-conc-bd);   --ag-ev-tx: var(--ag-ev-conc-tx);   --ag-ev-pt: var(--ag-ev-conc-pt); }
.ag-ev { display: flex; align-items: center; gap: 7px; padding: 4px 8px; min-width: 0; font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.ag-ev-ponto { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ag-ev-pt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ag-ev-pt) 25%, transparent); }
.ag-ev-titulo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-ev-hora { flex: none; font-weight: 500; opacity: 0.85; font-size: 12px; }
.ag-tipo-concluido .ag-ev-titulo, .ag-prox.ag-tipo-concluido .ag-prox-titulo { text-decoration: line-through; }
.ag .fc-list-event .ag-ev { padding: 0; }

/* ---------- Próximos lembretes ---------- */
.ag-proximos { display: flex; flex-direction: column; gap: 14px; min-height: 420px; }
.ag-proximos-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ag-proximos-titulo { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.ag-proximos-titulo svg { width: 22px; height: 22px; color: #3B82F6; }
.ag-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer; color: #3B82F6; font: inherit; font-size: 13px; font-weight: 700; padding: 4px; }
html[data-theme="dark"] .ag-link { color: #60A5FA; }
.ag-link svg { width: 14px; height: 14px; }
.ag-proximos-lista { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.ag-prox {
    display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left; cursor: pointer;
    padding: 12px 14px; border-radius: 12px; font: inherit; color: var(--ag-texto);
    background: var(--ag-bg-card-2); border: 1px solid var(--ag-borda);
}
.ag-prox:hover { border-color: var(--ag-ev-bd); }
.ag-prox .ag-ev-ponto { margin-top: 5px; }
.ag-prox-texto { display: grid; gap: 2px; min-width: 0; }
.ag-prox-titulo { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-prox-quando { font-size: 13px; color: var(--ag-texto-3); }
.ag-prox-conversa { font-size: 12px; color: var(--ag-ev-conv-pt); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-atrasados {
    width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
    padding: 10px 12px; border-radius: 10px; color: var(--ag-ev-venc-tx);
    background: var(--ag-ev-venc-bg); border: 1px solid var(--ag-ev-venc-bd);
}

.ag-vazio {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 28px 16px; border-radius: 14px; background: var(--ag-bg-card-2); border: 1px solid var(--ag-borda);
}
.ag-vazio-ilustra { width: 130px; height: 120px; margin-bottom: 14px; color: #3B82F6; }
.ag-vazio-cal { fill: #5B8DEF; }
.ag-vazio-cal-topo { fill: #3B6FE0; }
.ag-vazio-argola { fill: #2A55C7; }
.ag-vazio-quad rect { fill: rgba(255, 255, 255, 0.35); }
.ag-vazio-ok { fill: #10B981; }
.ag-vazio-titulo { font-size: 22px; font-weight: 800; }
.ag-vazio-sub { margin-top: 6px; font-size: 15px; color: var(--ag-texto-3); max-width: 220px; }
.ag-erro { padding: 24px; text-align: center; color: var(--ag-texto-3); }

.agenda-spinner {
    width: 40px; height: 40px; margin: 40px auto; border-radius: 50%;
    border: 4px solid var(--ag-borda-forte); border-top-color: #1C6FE0; animation: agGira 0.8s linear infinite;
}
@keyframes agGira { to { transform: rotate(360deg); } }

/* O all.css transforma table/tr/td em "cartões" em telas estreitas, sem escopo;
   isso quebraria a grade do FullCalendar (feita com table). Mantém o layout nativo. */
#agendaCalendario table { display: table; }
#agendaCalendario thead { display: table-header-group; }
#agendaCalendario tbody { display: table-row-group; }
#agendaCalendario tr { display: table-row; margin: 0; border: 0; border-radius: 0; padding: 0; background: transparent; }
#agendaCalendario th, #agendaCalendario td { display: table-cell; padding: 0; text-align: inherit; position: static; }
#agendaCalendario td::before { content: none; }

/* ---------- Modais ---------- */
.ag-overlay {
    position: fixed; inset: 0; z-index: 10000; padding: 20px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(2, 6, 23, 0.6); backdrop-filter: blur(3px);
}
html[data-theme] .ag-modal {
    width: 100%; max-width: 480px; max-height: calc(90vh / var(--escala, 1)); overflow-y: auto;
    background: var(--ag-bg-card); color: var(--ag-texto); border: 1px solid var(--ag-borda-forte);
    border-radius: 18px; padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}
html[data-theme] .ag-modal.agenda-detalhe-modal { max-width: 600px; }
.ag-modal .agenda-detalhe-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.ag-modal-titulo { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.ag-modal .agenda-close-btn { border: 0; background: var(--ag-controle); color: var(--ag-texto-2); width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.ag-modal .agenda-close-btn svg { width: 16px; height: 16px; }
.ag-modal .agenda-close-btn:hover { color: var(--ag-texto); }
.ag-modal .agenda-detalhe-quando { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #3B82F6; }
html[data-theme="dark"] .ag-modal .agenda-detalhe-quando { color: #93C5FD; }
.ag-modal .agenda-detalhe-quando::before {
    content: ''; width: 16px; height: 16px; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ag-modal .agenda-detalhe-descricao { margin-top: 12px; font-size: 14px; color: var(--ag-texto-2); white-space: pre-wrap; }
.ag-modal .agenda-detalhe-vinculo, .ag-modal .agenda-vinculo-conversa {
    margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
    background: var(--ag-ev-conv-bg); color: var(--ag-ev-conv-tx); border: 1px solid var(--ag-ev-conv-bd);
}
.ag-modal .agenda-vinculo-conversa { margin: 0 0 16px; }
.ag-modal .agenda-form-group { margin-bottom: 14px; }
.ag-rotulo { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--ag-texto-2); }
html[data-theme] .ag-modal .agenda-form-group input,
html[data-theme] .ag-modal .agenda-form-group textarea,
html[data-theme] .ag-modal .agenda-form-group select {
    width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; font: inherit; font-size: 14px;
    background: var(--ag-campo) !important; color: var(--ag-texto) !important; border: 1px solid var(--ag-borda-forte) !important;
}
html[data-theme] .ag-modal .agenda-form-group input:focus,
html[data-theme] .ag-modal .agenda-form-group textarea:focus,
html[data-theme] .ag-modal .agenda-form-group select:focus { outline: none; border-color: #3B82F6 !important; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
html[data-theme="dark"] .ag-modal input[type="date"], html[data-theme="dark"] .ag-modal input[type="time"] { color-scheme: dark; }
.ag-modal .agenda-form-row { display: flex; gap: 12px; }
.ag-modal .agenda-form-row .agenda-form-group { flex: 1; }
.ag-modal .agenda-modal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.ag-espaco { flex: 1; }

/* ---------- Responsivo ---------- */
@media (max-width: 1200px) {
    .ag-corpo { grid-template-columns: 1fr; }
    .ag-proximos { min-height: 0; }
}
@media (max-width: 900px) {
    .ag-resumo { grid-template-columns: 1fr; }
    .ag-hero::after { display: none; }
}
@media (max-width: 600px) {
    .ag-hero { padding: 18px; }
    .ag-hero-icone { width: 52px; height: 52px; }
    .ag-hero-titulo { font-size: 24px; }
    .ag-hero-acoes, .ag-hero-acoes .ag-btn { width: 100%; }
    .ag-barra { flex-direction: column; align-items: stretch; }
    .ag-titulo-cal { justify-content: center; font-size: 19px; order: -1; }
    .ag-nav, .ag-direita { justify-content: space-between; }
    .ag-modal .agenda-form-row { flex-direction: column; gap: 0; }
    .ag-modal .agenda-modal-actions .ag-btn { flex: 1; }
    /* mês no celular: célula estreita, a etiqueta vira só a bolinha colorida */
    .ag .fc-daygrid-event.ag-fc-ev { margin: 2px auto; width: 22px; border-radius: 999px; }
    .ag .fc-daygrid-event .ag-ev { justify-content: center; padding: 4px 0; }
    .ag .fc-daygrid-event .ag-ev-titulo, .ag .fc-daygrid-event .ag-ev-hora { display: none; }
    .ag .fc-daygrid-day-number { padding: 6px; font-size: 13px; }
    .ag .fc-col-header-cell-cushion { font-size: 11px; padding: 8px 2px; }
}

/* cabeçalho dos dias da semana: o all.css pinta todo <th> do escuro de #1f2937 */
html[data-theme="dark"] .ag .fc th, html[data-theme="dark"] .ag .fc .fc-col-header-cell { background: #0C142C !important; }

/* O que o JS esconde (atributo hidden ou style.display = "none", ex.: por permissão) fica
   escondido mesmo quando uma regra acima força display com !important.
   Os :not(#_a):not(#_b) só aumentam a especificidade. */
html[data-theme] .ag :is([hidden], [style*="display: none"], [style*="display:none"]):not(#_a):not(#_b) { display: none !important; }
