/* Dashboard administrativo */
    body.admin-mode { background:#f5f7fb; }
    body.admin-mode .header { min-height:58px; margin:4px 0 8px; padding:7px 14px; border-radius:7px; }
    body.admin-mode .logo { width:88px; }
    body.admin-mode .header-badge { padding:3px 9px; font-size:10px; }
    body.admin-mode .header-title p { font-size:12px; }
    .main.admin-wrapper.relatorio-full { width:100%; max-width:1800px; padding:6px clamp(8px, 1vw, 16px) 18px; }
    .official-info { padding:14px 16px; border-left:4px solid var(--azul); border-radius:10px; background:var(--azul-claro); color:#173a61; font-size:13px; line-height:1.55; }
    .official-subsection { margin:18px 0 12px; padding:9px 12px; border-radius:8px; background:#f7c7ad; color:#172033; font-size:13px; font-weight:800; text-align:center; text-transform:uppercase; }
    .official-footer { margin-top:20px; padding-top:18px; border-top:1px solid #d7e0ea; text-align:center; color:#475569; font-size:12px; line-height:1.7; }
    .cadastro-promo-banner { margin-bottom:22px; border:1px solid #dbe5f0; border-radius:22px; overflow:hidden; background:#fff; box-shadow:0 12px 28px rgba(15,23,42,.09); }
    .cadastro-promo-banner > img { display:block; width:100%; height:auto; aspect-ratio:1746/456; object-fit:cover; }
    .cadastro-banner-mobile { display:none; }
    .cadastro-banner-mobile-part { width:100%; aspect-ratio:873/456; background-image:url('/frontend/banner-adesao-plano-iii.png'); background-repeat:no-repeat; background-size:200% auto; }
    .cadastro-banner-mobile-copy { background-position:left top; }
    .cadastro-banner-mobile-family { background-position:right top; border-top:1px solid #e3ebf4; }

    @media (min-width:601px) {
      .public-wrapper .cadastro-promo-banner > img { display:none; }
      .public-wrapper .cadastro-banner-mobile { display:block; }
      .public-wrapper .form-card .row > [class*="col-md-"] { width:100%; }
      .public-wrapper .actions { flex-direction:column; }
      .public-wrapper .actions .btn { width:100%; }
    }

    @media (min-width:1400px) {
      .main.admin-wrapper { max-width:1280px; padding:24px; }
      .admin-wrapper #cadastroView { max-width:1280px; margin:0 auto; }
      .cadastro-promo-banner { border-radius:24px; }
      .form-card { padding:34px 42px; }
    }

    @media (min-width:901px) and (max-width:1399px) {
      .main.admin-wrapper { width:100%; max-width:1280px; padding-left:20px; padding-right:20px; }
      .cadastro-promo-banner { border-radius:20px; }
    }

    @media (min-width:901px) {
      .cadastro-promo-banner {
        margin-bottom:14px;
        border-radius:14px;
      }

      .cadastro-promo-banner > img {
        max-height:180px;
        object-fit:cover;
      }

      #bannerPlanoSelecionado {
        margin-bottom:12px !important;
        padding:10px 16px !important;
        font-size:15px !important;
        border-radius:8px !important;
      }

      .status-card {
        margin-bottom:14px;
        padding:16px 18px;
      }
    }

    @media (min-width:601px) and (max-width:900px) {
      .cadastro-promo-banner { border-radius:18px; margin-bottom:18px; }
      .main.admin-wrapper { padding-left:14px; padding-right:14px; }
    }

    @media (max-width:600px) {
      .cadastro-promo-banner { margin:0 12px 16px; border-radius:16px; box-shadow:0 7px 18px rgba(15,23,42,.10); }
      .cadastro-promo-banner > img { display:none; }
      .cadastro-banner-mobile { display:block; }
      .admin-wrapper .status-card, .admin-wrapper .form-card { margin-left:12px; margin-right:12px; }
      .admin-wrapper .top-actions { padding:0 12px; }
      .admin-wrapper #dbStatus, .admin-wrapper #appMsg, .admin-wrapper #offlineStatus { margin-left:12px; margin-right:12px; }
      .status-card .d-flex.justify-content-between { align-items:flex-start !important; }
      .status-card .d-flex.align-items-center { flex-wrap:wrap; justify-content:flex-end; }
      .percentual { min-width:52px; }
    }

    @media (max-width:380px) {
      .cadastro-promo-banner, .admin-wrapper .status-card, .admin-wrapper .form-card { margin-left:8px; margin-right:8px; }
      .cadastro-banner-mobile-part { aspect-ratio:873/456; }
      .header-title p { display:none; }
    }
    .actions .btn { min-width:150px; }
    .admin-mode #relatorioView.report-card { padding:0; overflow:visible; border:0; background:transparent; box-shadow:none; }
    .admin-dashboard-shell { position:relative; display:grid; grid-template-columns:minmax(190px, 210px) minmax(0, 1fr); gap:12px; align-items:stretch; }
    .admin-sidebar { position:sticky; top:8px; min-height:calc(100dvh - 76px); max-height:calc(100dvh - 16px); display:flex; flex-direction:column; padding:16px 11px 10px; overflow-y:auto; border-radius:8px; background:linear-gradient(180deg, #0b2b54 0%, #0c3768 100%); color:#fff; box-shadow:0 7px 18px rgba(12,35,70,.16); }
    .admin-sidebar-brand { position:relative; padding:0 8px 12px; border-bottom:1px solid rgba(255,255,255,.14); }
    .admin-sidebar-kicker { display:block; color:#a9c8eb; font-size:8px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
    .admin-sidebar-title { display:block; margin-top:4px; font-size:14px; font-weight:800; }
    .admin-sidebar-nav { display:flex; flex-direction:column; gap:2px; padding:10px 0; }
    .admin-sidebar-link { display:flex; align-items:center; gap:8px; min-height:34px; padding:7px 9px; border-radius:5px; color:#e2efff; font-size:10px; font-weight:600; line-height:1.25; text-decoration:none; transition:background .18s ease, color .18s ease, transform .18s ease; }
    .admin-sidebar-link:hover, .admin-sidebar-link:focus { color:#fff; background:rgba(255,255,255,.10); transform:translateX(2px); }
    .admin-sidebar-link.active { color:#fff; background:#1769d2; box-shadow:0 7px 16px rgba(0,0,0,.18); }
    .admin-only[data-admin-only="true"]::after { content:"ADM"; margin-left:auto; padding:2px 5px; border:1px solid rgba(255,255,255,.24); border-radius:5px; color:#bfdbfe; font-size:8px; font-weight:800; letter-spacing:.06em; }
    .admin-sidebar-icon { width:16px; text-align:center; font-size:11px; }
    .admin-sidebar-divider { height:1px; margin:8px 10px; background:rgba(255,255,255,.12); }
    .admin-sidebar-footer { margin-top:auto; }
    .admin-sidebar-footer .admin-sidebar-link { background:rgba(255,255,255,.07); }
    .admin-menu-toggle { display:none; align-items:center; justify-content:center; flex:0 0 auto; width:44px; height:44px; padding:0; border:1px solid #d8e2ee; border-radius:10px; background:#fff; color:#123d68; font-size:22px; line-height:1; box-shadow:0 4px 12px rgba(15,23,42,.06); }
    .admin-sidebar-close { display:none; position:absolute; top:-8px; right:0; align-items:center; justify-content:center; width:44px; height:44px; padding:0; border:0; border-radius:9px; background:rgba(255,255,255,.08); color:#fff; font-size:26px; line-height:1; }
    .admin-sidebar-overlay { display:none; }
    .admin-dashboard-content { min-width:0; }
    .admin-report-header { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:46px; margin-bottom:8px; padding:2px 4px; }
    .admin-report-title h1 { margin:0; color:#102f5d; font-size:20px; font-weight:800; letter-spacing:-.025em; }
    .admin-report-title p { margin:2px 0 0; color:#64748b; font-size:10px; }
    .admin-profile-badge { display:inline-flex; align-items:center; gap:7px; padding:6px 10px; border:1px solid #dbe5f0; border-radius:7px; background:#fff; color:#163b68; box-shadow:0 3px 9px rgba(15,23,42,.04); font-size:9px; font-weight:800; letter-spacing:.04em; }
    .admin-profile-dot { width:7px; height:7px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 3px #dcfce7; }
    .dashboard-cards { display:grid; grid-template-columns:repeat(5, minmax(120px, 1fr)); gap:9px; margin-bottom:9px; }
    .dashboard-card { position:relative; min-height:82px; padding:12px 46px 10px 12px; overflow:hidden; border:1px solid #e1e8f0; border-radius:7px; background:#fff; box-shadow:0 3px 10px rgba(15,23,42,.045); }
    .dashboard-card::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:#1769d2; }
    .dashboard-card::after { position:absolute; top:22px; right:13px; color:#2f80ed; font-size:27px; font-weight:400; line-height:1; }
    .dashboard-card:nth-child(1)::after { content:"♧"; }
    .dashboard-card:nth-child(2)::before { background:#f59e0b; }
    .dashboard-card:nth-child(2)::after { content:"◷"; color:#f59e0b; }
    .dashboard-card:nth-child(3)::before { background:#22a559; }
    .dashboard-card:nth-child(3)::after { content:"✓"; color:#22a559; }
    .dashboard-card:nth-child(4)::before { background:#7c3aed; }
    .dashboard-card:nth-child(4)::after { content:"⇧"; color:#7c3aed; }
    .dashboard-card:nth-child(5)::before { background:#0f8ca8; }
    .dashboard-card:nth-child(5)::after { content:"▦"; color:#0f8ca8; }
    .dashboard-card-label { color:#52657a; font-size:8px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
    .dashboard-card-value { margin-top:6px; color:#102f5d; font-size:21px; font-weight:800; line-height:1; }
    .dashboard-card-detail { margin-top:6px; color:#718096; font-size:8px; line-height:1.3; overflow-wrap:anywhere; }
    .dashboard-overview { display:grid; grid-template-columns:minmax(0, 1.65fr) minmax(260px, .85fr); gap:9px; min-width:0; }
    .dashboard-overview-card { min-width:0; padding:12px; border:1px solid #e1e8f0; border-radius:7px; background:#fff; box-shadow:0 3px 10px rgba(15,23,42,.04); }
    .dashboard-overview-header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:10px; }
    .dashboard-overview-heading { display:flex; gap:9px; min-width:0; }
    .dashboard-overview-icon { display:grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border-radius:7px; background:#eaf3ff; color:#1769d2; font-size:14px; }
    .dashboard-overview-title { margin:0; color:#102f5d; font-size:12px; font-weight:800; }
    .dashboard-overview-desc { margin:2px 0 0; color:#718096; font-size:8px; }
    .dashboard-overview-link { flex:0 0 auto; min-height:28px; padding:5px 9px; border:1px solid #dbeafe; border-radius:6px; background:#f4f8ff; color:#1769d2; font-size:8px; font-weight:800; }
    .recent-activity-list { overflow:hidden; border:1px solid #e7edf4; border-radius:6px; }
    .recent-activity-head, .recent-activity-row { display:grid; grid-template-columns:82px minmax(130px,1.35fr) 82px minmax(90px,1fr) minmax(95px,1fr) 18px; gap:8px; align-items:center; }
    .recent-activity-head { padding:7px 9px; background:#f6f8fb; color:#52657a; font-size:7px; font-weight:800; letter-spacing:.035em; text-transform:uppercase; }
    .recent-activity-row { width:100%; min-height:49px; padding:8px 9px; border:0; border-top:1px solid #edf1f5; background:#fff; color:#334155; font-size:8px; text-align:left; transition:background .15s ease; }
    .recent-activity-row:hover, .recent-activity-row:focus { background:#f5f9ff; outline:none; }
    .recent-activity-time { color:#52657a; font-weight:700; }
    .recent-activity-person { min-width:0; color:#173a61; font-weight:800; overflow-wrap:anywhere; }
    .recent-activity-person small { display:block; margin-top:2px; color:#718096; font-size:7px; font-weight:600; }
    .recent-activity-plan { display:inline-flex; width:max-content; max-width:100%; padding:3px 6px; border-radius:999px; background:#eaf3ff; color:#1769d2; font-size:7px; font-weight:800; }
    .recent-activity-unit { overflow-wrap:anywhere; }
    .recent-activity-status { display:inline-flex; width:max-content; max-width:100%; padding:4px 7px; border-radius:999px; background:#eef2f6; color:#475569; font-size:7px; font-weight:800; overflow-wrap:anywhere; }
    .recent-activity-status.is-final { background:#e6f8ee; color:#16834d; }
    .recent-activity-status.is-pending { background:#fff4df; color:#b56700; }
    .recent-activity-arrow { color:#7a9abc; font-size:14px; text-align:right; }
    .recent-activity-empty { padding:24px 12px; color:#718096; font-size:9px; text-align:center; }
    .recent-activity-footer { margin-top:9px; padding:9px 11px; border:1px solid #e3ebf5; border-radius:6px; background:#f7faff; color:#64748b; font-size:8px; line-height:1.45; }
    .operation-group-title { margin:11px 0 7px; color:#334155; font-size:8px; font-weight:800; }
    .operation-list { overflow:hidden; border:1px solid #e7edf4; border-radius:6px; }
    .operation-item { display:grid; grid-template-columns:28px minmax(0,1fr) auto; gap:9px; align-items:center; min-height:48px; padding:8px 9px; border-top:1px solid #edf1f5; }
    .operation-item:first-child { border-top:0; }
    .operation-icon { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#eaf3ff; color:#1769d2; font-size:13px; font-weight:800; }
    .operation-icon.is-clicksign { background:#f0eaff; color:#7c3aed; }
    .operation-icon.is-warning { background:#fff4df; color:#d97706; }
    .operation-icon.is-error { background:#fff0f0; color:#dc2626; }
    .operation-label { color:#173a61; font-size:8px; font-weight:800; }
    .operation-detail { margin-top:2px; color:#718096; font-size:7px; line-height:1.35; overflow-wrap:anywhere; }
    .operation-value { color:#173a61; font-size:9px; font-weight:800; text-align:right; overflow-wrap:anywhere; }
    .operation-value.is-online { color:#159447; }
    .operation-value.is-error { color:#dc2626; }
    .operation-updated { margin-top:9px; color:#718096; font-size:7px; text-align:center; }
    .admin-content-panel { display:contents; }
    .report-filters { display:grid; grid-template-columns:repeat(6, minmax(110px, 1fr)); gap:9px; padding:11px 12px; margin-bottom:9px; border:1px solid #e1e8f0; border-radius:7px; background:#fff; box-shadow:0 3px 10px rgba(15,23,42,.04); }
    .report-filter-search { grid-column:span 2; }
    .report-filter-actions { grid-column:5 / 7; display:flex; align-items:end; justify-content:flex-end; gap:8px; }
    .report-filter-actions .btn { min-width:104px; min-height:31px; padding:5px 12px; font-size:9px; }
    .report-filters label { display:block; margin-bottom:4px; font-size:8px; font-weight:800; color:#475569; text-transform:uppercase; }
    .report-filters .form-control, .report-filters .form-select { min-height:31px; padding:5px 8px; font-size:10px; background:#fff; }
    .admin-records-panel { padding:11px 12px 12px; border:1px solid #e1e8f0; border-radius:7px; background:#fff; box-shadow:0 3px 10px rgba(15,23,42,.04); }
    .report-results-count { margin:0 0 7px; color:#64748b; font-size:9px; }
    .admin-table-heading { padding-bottom:8px; border-bottom:1px solid #edf1f5; }
    .admin-table-heading .section-title { font-size:13px; }
    .admin-table-heading .section-desc { font-size:9px; }
    .admin-dashboard-content .table-wrap { border:1px solid #e5eaf0; border-radius:6px; background:#fff; box-shadow:none; }
    .admin-dashboard-content .table { min-width:1100px; margin-bottom:0; font-size:9px; }
    .admin-dashboard-content .table thead th { padding:8px 7px; border-bottom:1px solid #dfe7ef; background:#f5f7fa; color:#40556d; font-size:8px; font-weight:800; letter-spacing:.025em; text-transform:uppercase; white-space:nowrap; }
    .admin-dashboard-content .table tbody td { padding:8px 7px; border-color:#edf1f5; color:#334155; vertical-align:middle; }
    .admin-dashboard-content .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg:#fbfcfe; }
    .admin-dashboard-content .table tbody tr:hover > * { --bs-table-accent-bg:#eef6ff; }
    .admin-table-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
    .admin-table-actions .btn { min-height:31px; padding:5px 9px; font-size:9px; white-space:normal; }
    .report-rules { margin-top:9px; padding:11px 14px; border:1px solid #dbeafe; border-radius:7px; background:#fff; box-shadow:0 3px 10px rgba(15,23,42,.04); }
    .report-rules h2 { margin:0 0 10px; color:var(--azul-escuro); font-size:15px; font-weight:800; }
    .report-rules ul { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:7px 28px; margin:0; padding-left:18px; color:#475569; font-size:12px; }

    @media (max-width: 1199px) {
      .main.admin-wrapper.relatorio-full { padding-left:14px; padding-right:14px; }
      .admin-dashboard-shell { grid-template-columns:minmax(180px, 200px) minmax(0, 1fr); gap:12px; }
      .admin-sidebar { padding:18px 10px 12px; }
      .dashboard-cards { grid-template-columns:repeat(3, minmax(0, 1fr)); }
      .report-filters { grid-template-columns:repeat(2, minmax(0, 1fr)); }
      .report-filter-search { grid-column:span 2; }
      .report-filter-actions { grid-column:span 2; }
      .admin-content-panel { padding:14px; }
      .dashboard-overview { grid-template-columns:1fr; }
    }

    @media (max-width: 1100px) {
      html, body { max-width:100%; overflow-x:hidden; }
      .admin-dashboard-shell { display:block; }
      .admin-sidebar { position:fixed; z-index:120; top:0; bottom:0; left:0; width:min(84vw, 320px); min-height:100dvh; max-height:100dvh; padding:22px 14px 14px; overflow-y:auto; overscroll-behavior:contain; border-radius:0 16px 16px 0; transform:translateX(-105%); transition:transform .24s ease; }
      .admin-dashboard-shell.menu-open .admin-sidebar { transform:translateX(0); }
      .admin-sidebar-overlay { position:fixed; z-index:110; inset:0; display:block; visibility:hidden; background:rgba(15,23,42,.48); opacity:0; transition:opacity .24s ease, visibility .24s ease; }
      .admin-dashboard-shell.menu-open .admin-sidebar-overlay { visibility:visible; opacity:1; }
      .admin-menu-toggle { display:inline-flex; }
      .admin-sidebar-close { display:inline-flex; }
      .admin-report-header { justify-content:flex-start; }
      .admin-report-title { flex:1 1 auto; min-width:0; }
      .dashboard-cards { grid-template-columns:repeat(2, minmax(0, 1fr)); }
      .admin-sidebar-brand { padding:0 10px 18px; }
      .admin-sidebar-kicker { font-size:10px; }
      .admin-sidebar-title { font-size:17px; }
      .admin-sidebar-nav { flex-direction:column; overflow:visible; }
      .admin-sidebar-link { min-height:44px; padding:10px 11px; font-size:12px; white-space:normal; }
      .admin-sidebar-icon { width:20px; font-size:14px; }
      .admin-sidebar-footer { display:block; }
      body.admin-menu-open { overflow:hidden; }
      .admin-dashboard-content, .admin-content-panel, .dashboard-overview, .dashboard-overview-card { max-width:100%; }
    }

    @media (max-width: 600px) {
      .main.admin-wrapper.relatorio-full { padding:0 12px 28px; }
      .admin-report-header { align-items:center; flex-direction:row; flex-wrap:wrap; gap:10px; }
      .admin-report-title h1 { font-size:21px; }
      .admin-report-title p { font-size:12px; line-height:1.4; }
      .admin-profile-badge { flex:1 0 100%; justify-content:center; min-height:40px; }
      .dashboard-cards { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
      .dashboard-card { min-height:105px; padding:15px; }
      .dashboard-card:last-child { grid-column:1 / -1; }
      .admin-content-panel { padding:12px; border-radius:13px; }
      .dashboard-overview-card { padding:10px; }
      .dashboard-overview-header { align-items:center; }
      .recent-activity-head { display:none; }
      .recent-activity-row { grid-template-columns:minmax(0,1fr) auto 16px; gap:7px; padding:10px; }
      .recent-activity-time { grid-column:1; }
      .recent-activity-person { grid-column:1; }
      .recent-activity-plan { grid-column:2; grid-row:1; justify-self:end; }
      .recent-activity-unit { grid-column:1; color:#64748b; }
      .recent-activity-status { grid-column:2; grid-row:2 / span 2; justify-self:end; }
      .recent-activity-arrow { grid-column:3; grid-row:1 / span 3; }
      .report-filters { grid-template-columns:1fr; padding:12px; }
      .report-filter-search { grid-column:auto; }
      .report-filter-actions { grid-column:auto; display:grid; grid-template-columns:1fr 1fr; }
      .report-filter-actions .btn { width:100%; min-width:0; min-height:44px; font-size:12px; }
      .report-filters .form-control, .report-filters .form-select { min-height:44px; font-size:16px; }
      .admin-table-heading { align-items:stretch !important; }
      .admin-table-heading > div { width:100%; }
      .admin-table-actions { display:grid !important; grid-template-columns:repeat(2, minmax(0, 1fr)); width:100%; }
      .admin-table-actions .btn { width:100%; min-width:0; min-height:44px; padding:9px 10px; font-size:12px; }
      .admin-dashboard-content .table-wrap { max-height:62dvh; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
      .admin-dashboard-content .table { font-size:12px; }
      .report-rules ul { grid-template-columns:1fr; }
      .success-modal { padding:10px; }
      .success-dialog { width:100% !important; max-width:calc(100vw - 20px) !important; max-height:calc(100dvh - 20px) !important; padding:18px; overflow:auto; }
      #conteudoDetalhes, #conteudoModalTeste { max-height:calc(100dvh - 150px) !important; padding-right:0 !important; overflow-wrap:anywhere; }
    }

    @media (max-width: 420px) {
      .main.admin-wrapper.relatorio-full { padding-left:8px; padding-right:8px; }
      .admin-report-title h1 { font-size:19px; }
      .dashboard-cards { grid-template-columns:1fr; }
      .dashboard-card, .dashboard-card:last-child { grid-column:auto; min-height:96px; }
      .dashboard-card-label { font-size:11px; }
      .dashboard-card-detail { font-size:12px; }
      .admin-table-actions { grid-template-columns:1fr; }
      .admin-content-panel { padding:10px; }
      .dashboard-overview-header { align-items:flex-start; }
      .dashboard-overview-link { white-space:normal; }
      .operation-item { grid-template-columns:28px minmax(0,1fr); }
      .operation-value { grid-column:2; text-align:left; }
    }

    @media (max-width: 420px) {
      .main.admin-wrapper.relatorio-full { padding-left:8px; padding-right:8px; }
      .admin-report-title h1 { font-size:19px; }
      .dashboard-cards { grid-template-columns:1fr; }
      .dashboard-card, .dashboard-card:last-child { grid-column:auto; min-height:96px; }
      .dashboard-card-label { font-size:11px; }
      .dashboard-card-detail { font-size:12px; }
      .admin-table-actions { grid-template-columns:1fr; }
      .admin-content-panel { padding:10px; }
    }

/* Modal de detalhes: desktop, notebook e botoes de assinatura. */
#modalDetalhes .detalhes-adesao-dialog {
  width: min(94vw, 760px);
  max-width: 760px;
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}
#modalDetalhes #conteudoDetalhes {
  flex: 1 1 auto;
  max-height: none !important;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}
#modalDetalhes #footerDetalhes { flex: 0 0 auto; }
#modalDetalhes #footerDetalhes > .d-flex { width: 100%; }
#modalDetalhes #footerDetalhes .btn {
  flex: 1 1 145px;
  min-width: 0;
  white-space: normal;
}
@media (max-width: 700px) {
  #modalDetalhes .detalhes-adesao-dialog {
    width: calc(100vw - 20px);
    max-width: none;
    max-height: calc(100dvh - 20px);
    padding: 18px;
  }
  #modalDetalhes #footerDetalhes .btn { flex-basis: calc(50% - 8px); }
}
@media (max-width: 420px) {
  #modalDetalhes #footerDetalhes .btn { flex-basis: 100%; }
}


/* DASHBOARD_ATALHOS_COMPACTOS */
.dashboard-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 12px;
  padding: 12px 15px;
  border: 1px solid #d9e3ef;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(15, 48, 87, 0.05);
}

.dashboard-quick-actions-title {
  display: flex;
  flex-direction: column;
  min-width: 170px;
}

.dashboard-quick-actions-title strong {
  color: #073263;
  font-size: 13px;
}

.dashboard-quick-actions-title span {
  margin-top: 2px;
  color: #6a7c91;
  font-size: 9px;
}

.dashboard-quick-actions-buttons {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-quick-actions-buttons button {
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid #b9cde4;
  border-radius: 7px;
  color: #0756a7;
  background: #f7fbff;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}

.dashboard-quick-actions-buttons button:hover {
  border-color: #0868d7;
  color: #ffffff;
  background: #0868d7;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .dashboard-quick-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-quick-actions-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .dashboard-quick-actions-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-quick-actions-buttons button {
    width: 100%;
  }
}

/* MODAL_DETALHES_COMPACTO_20260814 */
#modalDetalhes .detalhes-adesao-dialog {
  width: min(92vw, 680px) !important;
  max-width: 680px !important;
  max-height: 84vh !important;
  padding: 18px 22px !important;
}

#modalDetalhes #conteudoDetalhes {
  max-height: calc(84vh - 185px) !important;
  overflow-y: auto !important;
}

#modalDetalhes #footerDetalhes {
  padding-top: 12px !important;
}

#modalDetalhes #footerDetalhes > .d-flex {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
}

#modalDetalhes #footerDetalhes .btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 7px 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

@media (max-width: 700px) {
  #modalDetalhes .detalhes-adesao-dialog {
    width: calc(100vw - 20px) !important;
    max-width: none !important;
    max-height: calc(100dvh - 20px) !important;
  }

  #modalDetalhes #conteudoDetalhes {
    max-height: calc(100dvh - 190px) !important;
  }

  #modalDetalhes #footerDetalhes > .d-flex {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* MODAL_DETALHES_SEM_CABECALHO_20260814 */
#modalDetalhes {
  align-items: flex-start !important;
  padding-top: 96px !important;
  padding-bottom: 24px !important;
  overflow-y: auto !important;
}

#modalDetalhes .detalhes-adesao-dialog {
  margin: 0 auto !important;
  max-height: calc(100dvh - 120px) !important;
}

#modalDetalhes #conteudoDetalhes {
  max-height: calc(100dvh - 300px) !important;
}

@media (max-width: 700px) {
  #modalDetalhes {
    padding-top: 72px !important;
    padding-right: 10px !important;
    padding-bottom: 14px !important;
    padding-left: 10px !important;
  }

  #modalDetalhes .detalhes-adesao-dialog {
    max-height: calc(100dvh - 90px) !important;
  }

  #modalDetalhes #conteudoDetalhes {
    max-height: calc(100dvh - 260px) !important;
  }
}

/* MODAL_ACIMA_DO_HEADER_20260814 */
#modalDetalhes {
  z-index: 5000 !important;
}

#modalDetalhes .detalhes-adesao-dialog {
  position: relative !important;
  z-index: 5001 !important;
}


/* REMOVE SOMENTE MINI FOTOS DOS PLANOS NA ATIVIDADE RECENTE */
#dashboardRecentActivity img {
  display: none !important;
}
/* FIM */

/* MODAL TESTE/LOGS DEFINITIVO - INICIO */

/* Overlay ocupa somente a viewport */
#modalTeste {
    position: fixed !important;
    inset: 0 !important;
    z-index: 20000 !important;
    overflow: hidden !important;
    padding: 18px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
}

#modalTeste.show {
    display: flex !important;
}

/* Caixa nunca ultrapassa a tela */
#modalTeste > .success-dialog {
    width: min(780px, calc(100vw - 36px)) !important;
    max-width: 780px !important;
    height: auto !important;
    max-height: calc(100dvh - 36px) !important;
    margin: auto !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* Cabecalho do modal e X nunca somem */
#modalTeste > .success-dialog > .d-flex {
    flex: 0 0 auto !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    margin-bottom: 12px !important;
    padding-bottom: 10px !important;
    background: #fff !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* Somente a lista de logs possui rolagem */
#conteudoModalTeste {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding-right: 6px !important;
}

/* Pagina atras permanece parada */
body:has(#modalTeste.show) {
    overflow: hidden !important;
}

/*
 Mensagens administrativas deixam de ocupar espaco no layout.
 Assim nao empurram sidebar, QAS ou botao Sair.
*/
body.admin-mode #appMsg:not(:empty),
body.admin-mode #dbStatus:not(:empty),
body.admin-mode #offlineStatus:not(:empty) {
    position: fixed !important;
    top: 88px !important;
    right: 18px !important;
    left: auto !important;
    width: min(520px, calc(100vw - 36px)) !important;
    max-height: 140px !important;
    overflow-y: auto !important;
    margin: 0 !important;
    z-index: 15000 !important;
    box-sizing: border-box !important;
    box-shadow: 0 8px 24px rgba(15,23,42,.16) !important;
}

/* Mobile/tablet */
@media (max-width: 900px) {

    #modalTeste {
        padding: 10px !important;
    }

    #modalTeste > .success-dialog {
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        max-height: calc(100dvh - 20px) !important;
        padding: 14px !important;
    }

    body.admin-mode #appMsg:not(:empty),
    body.admin-mode #dbStatus:not(:empty),
    body.admin-mode #offlineStatus:not(:empty) {
        top: 70px !important;
        right: 10px !important;
        width: calc(100vw - 20px) !important;
    }
}

/* MODAL TESTE/LOGS DEFINITIVO - FIM */
