body.page-slug-associaplus,
body.page-slug-associaplus html {
  background:#eef3fb;
}
body.page-slug-associaplus .entry-content,
body.page-slug-associaplus .wp-block-post-content,
body.page-slug-associaplus .post-content,
body.page-slug-associaplus .site-main,
body.page-slug-associaplus main,
body.page-slug-associaplus article,
body.page-slug-associaplus .content-area,
body.page-slug-associaplus .site-content,
body.page-slug-associaplus .ast-container,
body.page-slug-associaplus .container,
body.page-slug-associaplus .wrap,
body.page-slug-associaplus .site,
body.page-slug-associaplus .content-wrap {
  max-width:none !important;
  width:100% !important;
}
body.page-slug-associaplus .entry-content,
body.page-slug-associaplus .wp-block-post-content,
body.page-slug-associaplus .post-content {
  margin:0 !important;
  padding:0 !important;
}
#afp-root.afp-app{
  --afp-page-gap: clamp(20px, 4vw, 72px);
  --afp-max-width: 1500px;
  width:min(var(--afp-max-width), calc(100vw - (var(--afp-page-gap) * 2)));
  max-width:var(--afp-max-width);
  min-height:calc(100vh - (var(--afp-page-gap) * 2));
  margin:var(--afp-page-gap) auto;
  font-family:Arial,sans-serif;
  background:#eef3fb;
  padding:0;
}
.afp-app *{box-sizing:border-box}
.afp-login-screen{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
}
.afp-login-wrap{
  width:100%;
  max-width:460px;
  background:#fff;
  padding:32px;
  border-radius:24px;
  box-shadow:0 20px 50px rgba(15,23,42,.12);
}
.afp-login-wrap h2{margin:0 0 8px;font-size:30px}
.afp-field{display:block;margin-bottom:16px}
.afp-field label{display:block;font-weight:700;margin-bottom:8px;color:#0f172a}
.afp-field input{width:100%;padding:14px 16px;border:1px solid #d5dceb;border-radius:14px;background:#fff}
.afp-btn{background:#1d4ed8;color:#fff;border:none;border-radius:14px;padding:12px 18px;cursor:pointer;font-weight:700}
.afp-btn.secondary{background:#fff;color:#0f172a;border:1px solid #d5dceb}
.afp-error{margin-top:14px;color:#b91c1c}
.afp-shell{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  width:100%;
  min-height:calc(100vh - 48px);
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(15,23,42,.10);
}
.afp-sidebar{
  background:linear-gradient(180deg,#0f172a 0%,#111827 100%);
  color:#fff;
  padding:24px 18px;
  display:flex;
  flex-direction:column;
  position:sticky;
  top:0;
  height:100vh;
}
.afp-brand{font-size:24px;font-weight:800;margin-bottom:22px;letter-spacing:-.02em}
.afp-brand-sub{font-size:13px;color:#94a3b8;margin-top:4px}
.afp-userbox{font-size:14px;background:rgba(255,255,255,.08);padding:14px;border-radius:16px;margin-bottom:18px;line-height:1.5}
.afp-menu{display:flex;flex-direction:column;gap:8px;flex:1}
.afp-menu a{color:#dbe4ff;text-decoration:none;padding:12px 14px;border-radius:14px;display:flex;align-items:center;font-weight:600}
.afp-menu a.active,.afp-menu a:hover{background:rgba(255,255,255,.12);color:#fff}
.afp-sidebar-footer{padding-top:12px;border-top:1px solid rgba(255,255,255,.08);font-size:13px;color:#cbd5e1}
.afp-main{
  min-width:0;
  padding:24px;
  overflow:auto;
  background:#f8fbff;
}
.afp-topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:22px;
  background:#fff;
  border-radius:20px;
  padding:18px 20px;
  box-shadow:0 10px 30px rgba(15,23,42,.05);
}
.afp-topbar-left h1{margin:0;font-size:28px;line-height:1.2;color:#0f172a}
.afp-topbar-sub{margin-top:6px;color:#64748b;font-size:14px}
.afp-topbar-right{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.afp-badge{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#dbeafe;color:#1e3a8a;font-size:12px;font-weight:800}
.afp-grid{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:20px;margin-bottom:24px}
.afp-card{background:#fff;border-radius:20px;padding:24px;box-shadow:0 10px 30px rgba(15,23,42,.05)}
.afp-card h3{margin:0 0 12px 0;font-size:14px;color:#64748b;font-weight:700}
.afp-stat{font-size:34px;font-weight:800;color:#0f172a;letter-spacing:-.03em}
.afp-view{background:#fff;border-radius:20px;padding:28px;box-shadow:0 10px 30px rgba(15,23,42,.05)}
.afp-view h2{margin-top:0;font-size:26px;color:#0f172a}
.afp-alert{padding:14px 16px;border-radius:16px;margin-bottom:16px;font-weight:600}
.afp-alert.warn{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.afp-alert.error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.afp-muted{color:#64748b}
.afp-loading{min-height:100vh;display:flex;align-items:center;justify-content:center;font-size:18px;color:#475569}
.afp-kv{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:18px;margin-top:20px}
.afp-kv-item{padding:16px;border-radius:16px;background:#f8fafc;border:1px solid #e2e8f0}
.afp-kv-item strong{display:block;font-size:13px;color:#64748b;margin-bottom:6px}
@media (max-width: 1200px){.afp-grid{grid-template-columns:repeat(2,minmax(220px,1fr))}}
@media (max-width: 960px){
  #afp-root.afp-app{padding:0}
  .afp-shell{grid-template-columns:1fr}
  .afp-sidebar{position:relative;height:auto}
  .afp-main{padding:18px}
  .afp-grid,.afp-kv{grid-template-columns:1fr}
  .afp-topbar{flex-direction:column;align-items:flex-start}
  .afp-topbar-right{width:100%;justify-content:space-between}
}


@media (max-width: 900px){
  #afp-root.afp-app{
    --afp-page-gap: 10px;
    --afp-max-width: 100%;
    width:calc(100vw - (var(--afp-page-gap) * 2));
    margin:var(--afp-page-gap) auto;
    min-height:calc(100vh - (var(--afp-page-gap) * 2));
  }
  .afp-shell{
    grid-template-columns:1fr;
    min-height:auto;
  }
  .afp-sidebar{
    position:relative;
    height:auto;
    min-width:0;
    width:100%;
  }
}

.afp-section-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.afp-inline-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.afp-toolbar{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.afp-toolbar input,.afp-toolbar select,.afp-inline-form input,.afp-field select,.afp-field textarea{border:1px solid #d5dceb;border-radius:14px;padding:12px 14px;background:#fff}
.afp-toolbar input{min-width:280px;flex:1}
.afp-table-wrap{background:#fff;border-radius:20px;box-shadow:0 10px 30px rgba(15,23,42,.05);overflow:auto}
.afp-table{width:100%;border-collapse:collapse}
.afp-table th,.afp-table td{padding:14px 16px;border-bottom:1px solid #e5ecf5;text-align:left;vertical-align:top}
.afp-table th{font-size:13px;text-transform:uppercase;color:#64748b;letter-spacing:.03em}
.afp-empty-cell{text-align:center;color:#64748b}
.afp-link-btn{background:none;border:none;color:#1d4ed8;cursor:pointer;padding:0;margin-right:10px;font-weight:700}
.afp-link-btn.danger{color:#b91c1c}
.afp-status{display:inline-flex;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}
.afp-status.paid{background:#dcfce7;color:#166534}
.afp-status.unpaid{background:#fee2e2;color:#991b1b}
.afp-settings-panel{margin-top:18px}
.afp-settings-panel.hidden,.afp-modal.hidden{display:none}
.afp-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.afp-inline-form{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.afp-inline-form input{flex:1}
.afp-tag-list{display:flex;flex-wrap:wrap;gap:10px}
.afp-tag{display:inline-flex;align-items:center;gap:8px;background:#eff6ff;border-radius:999px;padding:8px 12px}
.afp-tag button{background:none;border:none;cursor:pointer;font-size:12px}
.afp-modal{position:fixed;inset:0;background:rgba(15,23,42,.45);display:flex;align-items:center;justify-content:center;padding:20px;z-index:9999;overflow:auto}
.afp-modal-box{width:min(760px, 100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:24px;padding:24px;box-shadow:0 20px 60px rgba(15,23,42,.15);margin:auto;position:relative}
.afp-modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;position:sticky;top:0;background:#fff;padding-bottom:8px;z-index:2}
.afp-icon-btn{border:none;background:#eef3fb;border-radius:999px;width:36px;height:36px;cursor:pointer;font-size:22px;line-height:1}
.afp-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.afp-span-2{grid-column:1 / -1}
.afp-field textarea{width:100%}
.afp-muted.afp-sm{font-size:12px;margin-top:4px}
@media (max-width: 900px){
  .afp-shell{grid-template-columns:1fr}
  .afp-sidebar{position:relative;height:auto}
  .afp-grid,.afp-settings-grid,.afp-form-grid{grid-template-columns:1fr}
}


.afp-modal-wide{width:min(1100px,100%)}
.afp-permissions-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:16px;margin-top:10px}
.afp-permission-group{border:1px solid #e2e8f0;background:#f8fbff;border-radius:16px;padding:14px}
.afp-permission-group h4{margin:0 0 10px;font-size:14px;text-transform:capitalize;color:#334155}
.afp-check{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px;font-size:14px;color:#0f172a}
.afp-check input{margin-top:3px}
.afp-perm-mini{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.afp-pill{display:inline-flex;padding:4px 8px;border-radius:999px;background:#eff6ff;color:#1d4ed8;font-size:11px;font-weight:700}
@media (max-width: 1200px){.afp-permissions-grid{grid-template-columns:repeat(2,minmax(220px,1fr))}}
@media (max-width: 900px){.afp-permissions-grid{grid-template-columns:1fr}}


.afp-modal-box form{padding-bottom:8px}
@media (max-height: 820px){
  .afp-modal{align-items:flex-start;padding:12px}
  .afp-modal-box{max-height:calc(100vh - 24px);border-radius:20px}
}
@media (max-width: 720px){
  .afp-form-grid,.afp-settings-grid{grid-template-columns:1fr}
  .afp-modal{padding:8px}
  .afp-modal-box{width:100%;max-height:calc(100vh - 16px);padding:18px}
}


/* v0.4.2 modal usability fix */
.afp-modal{
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.afp-modal-box{
  width:min(900px, calc(100vw - 32px));
  max-width:calc(100vw - 32px);
  max-height:calc(100vh - 32px);
  overflow:auto;
  margin:auto;
}
.afp-modal-wide{
  width:min(900px, calc(100vw - 32px)) !important;
  max-width:calc(100vw - 32px) !important;
}
.afp-modal-header{
  position:sticky;
  top:0;
  background:#fff;
  z-index:5;
  padding-bottom:10px;
}
.afp-permissions-grid{
  grid-template-columns:repeat(2,minmax(220px,1fr)) !important;
}
@media (max-width: 900px){
  .afp-permissions-grid{grid-template-columns:1fr !important;}
}


/* v0.4.3 user modal hard fix */
#afp-user-modal.afp-modal{
  align-items:flex-start !important;
  padding:12px !important;
  overflow-y:auto !important;
}
#afp-user-modal .afp-modal-box,
#afp-user-modal .afp-modal-wide{
  width:min(760px, calc(100vw - 24px)) !important;
  max-width:calc(100vw - 24px) !important;
  max-height:calc(100vh - 24px) !important;
  overflow:auto !important;
  margin:0 auto !important;
  border-radius:20px !important;
}
#afp-user-modal .afp-modal-header{
  position:sticky !important;
  top:0 !important;
  background:#fff !important;
  z-index:10 !important;
  padding-bottom:10px !important;
}
#afp-user-modal .afp-inline-actions{
  position:sticky;
  bottom:0;
  background:#fff;
  padding-top:12px;
  margin-top:16px;
  z-index:10;
}
#afp-user-modal .afp-permissions-scroll{
  max-height:32vh;
  overflow:auto;
  padding-right:6px;
}
#afp-user-modal .afp-permissions-grid{
  grid-template-columns:1fr !important;
  gap:12px !important;
}
#afp-user-modal .afp-check{
  margin-bottom:8px !important;
}
@media (max-height: 800px){
  #afp-user-modal .afp-permissions-scroll{
    max-height:26vh;
  }
}

.afp-grid-3{grid-template-columns:repeat(3,minmax(220px,1fr));}
.afp-report-grid{grid-template-columns:1fr 1fr;align-items:start}
.afp-report-filters .afp-field{margin-bottom:0;min-width:180px;flex:1}
.afp-report-filters label{display:block;font-weight:700;margin-bottom:8px;color:#0f172a}
.afp-report-actions{align-self:end}
@media (max-width: 1100px){.afp-grid-3,.afp-report-grid{grid-template-columns:1fr}}


/* v0.6.0 dashboard pro */
.afp-dashboard-panel{margin-bottom:20px;border:1px solid #dbeafe}
.afp-dashboard-filters{display:flex;gap:14px;align-items:flex-end;flex-wrap:wrap}
.afp-dashboard-filters .afp-field{margin-bottom:0;min-width:180px}
.afp-dashboard-charts{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(320px,.9fr);gap:20px}
.afp-chart-card{padding:20px 20px 12px}
.afp-card-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}
.afp-card-head h3{margin:0;font-size:15px;color:#0f172a}
.afp-chart-wrap{position:relative;height:360px}
.afp-chart-wrap-donut{height:360px}
.afp-grid .afp-card{transition:transform .18s ease, box-shadow .18s ease}
.afp-grid .afp-card:hover,.afp-chart-card:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(15,23,42,.08)}
@media (max-width: 1200px){
  .afp-dashboard-charts{grid-template-columns:1fr}
}
@media (max-width: 900px){
  .afp-dashboard-filters{flex-direction:column;align-items:stretch}
  .afp-dashboard-filters .afp-field{width:100%}
  .afp-chart-wrap,.afp-chart-wrap-donut{height:300px}
}


/* v0.7.2 plan limits */
.afp-alert-link{font-weight:800;color:#7c2d12;text-decoration:underline}
.afp-stat-sm{font-size:26px}
.afp-grid-3{grid-template-columns:repeat(3,minmax(220px,1fr))}
@media (max-width: 1200px){.afp-grid-3{grid-template-columns:1fr}}


/* v0.7.3 laptop-friendly adaptive shell */
@media (min-width: 1280px) and (max-width: 1600px){
  #afp-root.afp-app{
    --afp-page-gap: clamp(24px, 3.5vw, 48px);
    --afp-max-width: 1380px;
  }
}
@media (min-width: 901px) and (max-width: 1279px){
  #afp-root.afp-app{
    --afp-page-gap: clamp(16px, 2.4vw, 28px);
    --afp-max-width: 100%;
  }
  .afp-main{padding:20px}
  .afp-sidebar{padding:20px 16px}
}


/* v0.8.1 account billing */
.afp-account-hero{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr);gap:20px;margin-bottom:22px}
.afp-account-plan-card,.afp-account-usage-card,.afp-plan-option{background:#fff;border-radius:22px;padding:24px;box-shadow:0 10px 30px rgba(15,23,42,.05)}
.afp-plan-badge{display:inline-flex;padding:8px 12px;border-radius:999px;background:#dbeafe;color:#1e3a8a;font-size:12px;font-weight:800;margin-bottom:14px}
.afp-account-plan-card h2{margin:0 0 8px;font-size:34px;color:#0f172a}
.afp-account-meta{display:grid;grid-template-columns:repeat(2,minmax(180px,1fr));gap:14px;margin:18px 0}
.afp-upgrade-actions{margin-top:18px}
.afp-usage-block{margin-top:18px}
.afp-usage-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px;color:#0f172a}
.afp-progress{height:12px;border-radius:999px;background:#e2e8f0;overflow:hidden}
.afp-progress span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#2563eb 0%,#7c3aed 100%)}
.afp-plan-grid{display:grid;grid-template-columns:repeat(3,minmax(240px,1fr));gap:20px}
.afp-plan-option.current{outline:2px solid #c7d2fe}
.afp-plan-option-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:8px}
.afp-plan-option-head h3{margin:0;font-size:24px;color:#0f172a}
.afp-plan-price{font-weight:800;color:#1d4ed8}
.afp-plan-features{margin:16px 0 22px;padding-left:18px;color:#334155}
.afp-plan-features li{margin-bottom:8px}
@media (max-width: 1100px){
  .afp-account-hero,.afp-plan-grid{grid-template-columns:1fr}
  .afp-account-meta{grid-template-columns:1fr}
}


/* v0.8.2 reports fixes */
.afp-report-grid-annual{margin-top:20px}
.afp-report-grid-annual .afp-table th:nth-child(2),
.afp-report-grid-annual .afp-table th:nth-child(3),
.afp-report-grid-annual .afp-table td:nth-child(2),
.afp-report-grid-annual .afp-table td:nth-child(3){white-space:nowrap}

/* v0.8.7 reports stable */
.afp-report-grid-annual{margin-bottom:20px}


/* v0.8.9 report UI polish from 0.8.8 base */
.afp-view h2{letter-spacing:-0.02em}
.afp-report-filters{
  display:grid;
  grid-template-columns:repeat(5,minmax(150px,1fr)) auto;
  gap:14px;
  align-items:end;
  margin-bottom:20px;
  background:#f8fbff;
  border:1px solid #e6edf8;
  border-radius:18px;
  padding:16px;
}
.afp-report-filters .afp-field{
  margin-bottom:0;
  min-width:0;
}
.afp-report-filters input,
.afp-report-filters select{
  width:100%;
  padding:12px 14px;
  border:1px solid #d9e3f2;
  border-radius:12px;
  background:#fff;
}
.afp-report-actions{
  justify-content:flex-end;
  align-self:end;
}
.afp-report-grid,
.afp-report-grid-annual{
  gap:18px;
}
.afp-table-wrap{
  background:#fff;
  border:1px solid #e7edf7;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
.afp-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.afp-table thead th{
  background:#f4f8fe;
  color:#0f172a;
  font-size:13px;
  font-weight:800;
  text-align:left;
  padding:14px 16px;
  border-bottom:1px solid #e5edf8;
}
.afp-table tbody td{
  padding:13px 16px;
  border-bottom:1px solid #eef3fb;
  vertical-align:middle;
}
.afp-table tbody tr:last-child td{
  border-bottom:none;
}
.afp-table tbody td:last-child,
.afp-table thead th:last-child{
  text-align:right;
}
.afp-table tbody td:nth-child(3),
.afp-table thead th:nth-child(3){
  text-align:right;
}
.afp-empty-cell{
  color:#64748b;
  text-align:center !important;
  padding:22px 16px !important;
}
.afp-report-grid-annual .afp-table-wrap{
  border-color:#dce8fb;
}
.afp-report-grid-annual .afp-table thead th{
  background:linear-gradient(180deg,#eef5ff 0%,#f8fbff 100%);
}
.afp-report-grid .afp-table thead th{
  background:#f8fafc;
}
.afp-view .afp-grid.afp-grid-3 .afp-card{
  border:1px solid #e8eef8;
}
.afp-view .afp-grid.afp-grid-3 .afp-card h3{
  color:#475569;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.afp-view .afp-grid.afp-grid-3 .afp-stat{
  font-size:30px;
}
.afp-section-header{
  margin-bottom:18px;
}
.afp-section-header .afp-inline-actions{
  flex-wrap:wrap;
}
@media (max-width: 1280px){
  .afp-report-filters{
    grid-template-columns:repeat(3,minmax(170px,1fr));
  }
}
@media (max-width: 900px){
  .afp-report-filters{
    grid-template-columns:1fr;
  }
  .afp-report-actions{
    justify-content:stretch;
  }
  .afp-report-actions .afp-btn{
    width:100%;
  }
  .afp-table thead th,
  .afp-table tbody td{
    padding:12px 12px;
    font-size:13px;
  }
}

/* v0.8.9.1 cache bust */
.afp-report-filters{outline:0}


/* v1.0.0 reports + onboarding polish */
.afp-balancete-screen{margin-top:20px}
.afp-balancete-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:18px 18px 0;
}
.afp-balancete-head h3{
  margin:0;
  color:#0f172a;
  font-size:16px;
}
.afp-table-scroll{
  overflow:auto;
  padding:0 0 6px;
}
.afp-table-matrix{
  min-width:1320px;
}
.afp-table-matrix thead th:first-child,
.afp-table-matrix tbody td:first-child{
  position:sticky;
  left:0;
  background:#fff;
  z-index:1;
}
.afp-table-matrix thead th:first-child{
  background:#f4f8fe;
  z-index:2;
}
.afp-table-matrix th,
.afp-table-matrix td{
  white-space:nowrap;
}
.afp-table-matrix tbody td:not(:first-child),
.afp-table-matrix thead th:not(:first-child){
  text-align:right;
}
.afp-dashboard-charts .afp-card,
.afp-table-wrap,
.afp-grid .afp-card{
  transition:transform .16s ease, box-shadow .16s ease;
}
.afp-dashboard-charts .afp-card:hover,
.afp-table-wrap:hover,
.afp-grid .afp-card:hover{
  transform:translateY(-1px);
}


/* v1.1.0 fiscal validation */
.afp-fiscal-ok{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  font-weight:800;
  border:1px solid #86efac;
}


/* v1.2.1 backups */
.afp-backup-grid{
  grid-template-columns:repeat(2,minmax(280px,1fr));
  gap:20px;
}
@media (max-width: 900px){
  .afp-backup-grid{
    grid-template-columns:1fr;
  }
}


/* v1.2.2 backup preview */
.afp-backup-preview-card{
  margin-top:20px;
}


/* v1.2.8 backup ux */
.afp-alert.success{
  background:#ecfdf5;
  color:#166534;
  border:1px solid #86efac;
}


/* v1.2.9 responsive polish */
#afp-root.afp-app{
  --afp-page-gap: clamp(12px, 2.8vw, 40px);
  --afp-max-width: min(1600px, calc(100vw - (var(--afp-page-gap) * 2)));
}

.afp-shell{
  min-height:calc(100vh - (var(--afp-page-gap) * 2));
}

.afp-main{
  padding:20px;
}

.afp-topbar{
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:saturate(180%) blur(8px);
}

.afp-grid{
  grid-template-columns:repeat(4,minmax(200px,1fr));
}

.afp-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(280px,1fr));
  gap:20px;
}

.afp-inline-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.afp-table-wrap{
  overflow:hidden;
}

.afp-table{
  width:100%;
}

.afp-table th,
.afp-table td{
  word-break:break-word;
}

.afp-mobile-stack{
  display:none;
}

@media (max-width: 1180px){
  #afp-root.afp-app{
    --afp-page-gap: 12px;
    --afp-max-width: calc(100vw - 24px);
  }

  .afp-shell{
    grid-template-columns:220px minmax(0,1fr);
    border-radius:22px;
  }

  .afp-sidebar{
    padding:18px 14px;
  }

  .afp-brand{
    font-size:20px;
    margin-bottom:16px;
  }

  .afp-topbar{
    padding:16px;
    border-radius:16px;
  }

  .afp-topbar-left h1{
    font-size:24px;
  }

  .afp-grid{
    grid-template-columns:repeat(2,minmax(220px,1fr));
  }

  .afp-settings-grid,
  .afp-backup-grid,
  .afp-account-hero,
  .afp-plan-grid,
  .afp-report-filters{
    grid-template-columns:1fr;
  }

  .afp-account-meta{
    grid-template-columns:1fr;
  }

  .afp-main{
    padding:16px;
  }
}

@media (max-width: 820px){
  #afp-root.afp-app{
    width:100vw;
    max-width:100vw;
    margin:0;
    min-height:100vh;
    border-radius:0;
    --afp-page-gap: 0px;
  }

  .afp-shell{
    grid-template-columns:1fr;
    min-height:100vh;
    border-radius:0;
  }

  .afp-sidebar{
    position:relative;
    top:auto;
    height:auto;
    padding:14px;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
  }

  .afp-brand{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
  }

  .afp-brand-sub{
    display:none;
  }

  .afp-userbox{
    margin-bottom:12px;
    padding:12px;
    font-size:13px;
  }

  .afp-menu{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .afp-menu a{
    justify-content:center;
    text-align:center;
    min-height:46px;
    padding:10px 12px;
    font-size:13px;
  }

  .afp-sidebar-footer{
    display:none;
  }

  .afp-main{
    padding:12px;
  }

  .afp-topbar{
    position:relative;
    top:auto;
    flex-direction:column;
    align-items:flex-start;
    padding:14px;
    margin-bottom:14px;
  }

  .afp-topbar-left h1{
    font-size:22px;
  }

  .afp-topbar-right{
    width:100%;
    justify-content:flex-start;
  }

  .afp-grid{
    grid-template-columns:1fr;
    gap:12px;
  }

  .afp-card,
  .afp-table-wrap,
  .afp-login-wrap,
  .afp-account-plan-card,
  .afp-account-usage-card,
  .afp-plan-option{
    border-radius:16px;
  }

  .afp-view .afp-grid.afp-grid-3 .afp-stat,
  .afp-stat{
    font-size:24px;
  }

  .afp-btn,
  .afp-btn.secondary{
    width:100%;
    text-align:center;
    justify-content:center;
  }

  .afp-inline-actions{
    width:100%;
  }

  .afp-inline-actions .afp-btn,
  .afp-inline-actions .afp-btn.secondary{
    flex:1 1 100%;
  }

  .afp-field input,
  .afp-field select,
  .afp-field textarea{
    font-size:16px;
  }

  .afp-toolbar{
    padding:14px;
    border-radius:16px;
  }

  .afp-report-filters{
    padding:14px;
  }

  .afp-table-scroll{
    overflow:auto;
    -webkit-overflow-scrolling:touch;
  }

  .afp-table-matrix{
    min-width:980px;
  }

  .afp-report-grid-annual .afp-table,
  .afp-report-grid .afp-table{
    min-width:100%;
  }

  .afp-login-screen{
    padding:16px;
  }

  .afp-login-wrap{
    padding:24px 18px;
  }

  .afp-login-wrap h2{
    font-size:26px;
  }

  .afp-modal-backdrop{
    padding:10px;
    align-items:flex-start;
    overflow:auto;
  }

  .afp-modal{
    width:100%;
    max-width:100%;
    margin:0 auto;
    max-height:none;
    border-radius:18px;
  }

  .afp-modal-content{
    padding:16px;
  }

  .afp-modal-header{
    padding:14px 16px;
    position:sticky;
    top:0;
    background:#fff;
    z-index:2;
  }

  .afp-kv-item{
    grid-template-columns:1fr;
    gap:6px;
  }
}

@media (max-width: 560px){
  .afp-menu{
    grid-template-columns:1fr 1fr;
  }

  .afp-topbar-left h1{
    font-size:20px;
  }

  .afp-section-header{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .afp-table th,
  .afp-table td{
    padding:10px 10px;
    font-size:12px;
  }

  .afp-badge{
    font-size:11px;
    padding:7px 10px;
  }

  .afp-account-plan-card h2{
    font-size:28px;
  }

  .afp-plan-option-head{
    flex-direction:column;
    align-items:flex-start;
  }
}

/* v1.3.0 treasury */
.afp-kv-item strong + * { margin-top: 4px; }


/* v1.3.6 restore expense/revenue modal appearance */
.afp-modal-backdrop{
  background:rgba(15,23,42,.45);
}

.afp-modal{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:18px;
  box-shadow:0 24px 60px rgba(15,23,42,.22);
  opacity:1;
  overflow:hidden;
}

.afp-modal-header{
  background:#fff;
  border-bottom:1px solid #e5e7eb;
}

.afp-modal-content{
  background:#fff;
}

#afp-expense-modal-backdrop .afp-modal,
#afp-revenue-modal-backdrop .afp-modal{
  background:#fff;
  opacity:1;
}

#afp-expense-modal-backdrop .afp-modal-content,
#afp-revenue-modal-backdrop .afp-modal-content{
  background:#fff;
}

#afp-expense-modal-backdrop .afp-form-grid,
#afp-revenue-modal-backdrop .afp-form-grid{
  background:transparent;
}

#afp-expense-modal-backdrop .afp-field,
#afp-revenue-modal-backdrop .afp-field{
  background:transparent;
}

#afp-expense-modal-backdrop input,
#afp-expense-modal-backdrop select,
#afp-expense-modal-backdrop textarea,
#afp-revenue-modal-backdrop input,
#afp-revenue-modal-backdrop select,
#afp-revenue-modal-backdrop textarea{
  background:#fff;
  border:1px solid #d7dfeb;
  opacity:1;
  color:#0f172a;
}

#afp-expense-modal-backdrop textarea,
#afp-revenue-modal-backdrop textarea{
  min-height:110px;
}


/* v1.3.7 revenue modal parity */
.afp-modal-backdrop:not(.hidden){
  display:flex;
}

.afp-modal{
  background:#ffffff !important;
  opacity:1 !important;
}

.afp-modal .afp-modal-header,
.afp-modal .afp-modal-content{
  background:#ffffff !important;
}

#afp-revenue-form,
#afp-expense-form{
  background:#ffffff !important;
}

#afp-revenue-form .afp-form-grid,
#afp-expense-form .afp-form-grid{
  background:transparent !important;
}

#afp-revenue-form .afp-field,
#afp-expense-form .afp-field{
  background:transparent !important;
}

#afp-revenue-form input,
#afp-revenue-form select,
#afp-revenue-form textarea,
#afp-expense-form input,
#afp-expense-form select,
#afp-expense-form textarea{
  background:#ffffff !important;
  color:#0f172a !important;
  opacity:1 !important;
  border:1px solid #d7dfeb !important;
  box-shadow:none !important;
}

#afp-revenue-form textarea,
#afp-expense-form textarea{
  min-height:110px;
}

#afp-revenue-form .afp-inline-actions,
#afp-expense-form .afp-inline-actions{
  background:#ffffff !important;
}


/* v1.3.8.1 recovery */
#afp-revenue-form,
#afp-expense-form{
  background:#fff;
}


/* v1.3.8.3 revenue modal parity */
#afp-revenue-modal.afp-modal{
  background:transparent;
}
#afp-revenue-modal .afp-modal-box{
  background:#fff;
}


/* v1.3.8.6 font size refinement for tables and reports */
.afp-table th{
  font-size:12px;
}

.afp-table td{
  font-size:13px;
}

.afp-view h2{
  font-size:22px;
}

.afp-section-header h2{
  font-size:22px;
}

.afp-toolbar input,
.afp-toolbar select{
  font-size:13px;
}

.afp-card h3{
  font-size:15px;
}

.afp-muted{
  font-size:12px;
}


/* v1.3.9.2 operational tables alignment */
.afp-table.afp-operational thead th,
.afp-table.afp-operational tbody td{
  text-align:left;
}

.afp-table.afp-operational thead th:nth-child(3),
.afp-table.afp-operational tbody td:nth-child(3){
  text-align:left !important;
}

.afp-table.afp-operational thead th:last-child,
.afp-table.afp-operational tbody td:last-child{
  text-align:right;
}

.afp-table.afp-operational thead th:nth-child(5),
.afp-table.afp-operational tbody td:nth-child(5){
  text-align:right;
}

.afp-table.afp-operational thead th:nth-child(8),
.afp-table.afp-operational tbody td:nth-child(8){
  text-align:center;
}

.afp-table.afp-operational td:nth-child(3) strong{
  display:block;
}

.afp-table.afp-operational td:nth-child(3) .afp-muted{
  display:block;
  margin-top:4px;
}


/* v1.3.9.3 prevent wrapping in specific operational columns */
.afp-table.afp-operational th:nth-child(1),
.afp-table.afp-operational td:nth-child(1),
.afp-table.afp-operational th:nth-child(2),
.afp-table.afp-operational td:nth-child(2),
.afp-table.afp-operational th:nth-child(4),
.afp-table.afp-operational td:nth-child(4),
.afp-table.afp-operational th:nth-child(6),
.afp-table.afp-operational td:nth-child(6),
.afp-table.afp-operational th:nth-child(7),
.afp-table.afp-operational td:nth-child(7),
.afp-table.afp-operational th:nth-child(9),
.afp-table.afp-operational td:nth-child(9){
  white-space: nowrap;
}

.afp-table.afp-operational td:nth-child(9){
  min-width: 150px;
}

.afp-table.afp-operational td:nth-child(7) a{
  white-space: nowrap;
  display: inline-block;
}


/* v1.3.9.4 fix value column width (no wrap) */
.afp-table.afp-operational th:nth-child(5),
.afp-table.afp-operational td:nth-child(5){
  white-space: nowrap;
  min-width: 120px;
  text-align: right;
}


/* v1.3.9.5 unify expenses and revenues headers/text alignment */
.afp-table.afp-operational thead th{
  text-align:left;
  vertical-align:middle;
}

.afp-table.afp-operational tbody td{
  vertical-align:top;
}

.afp-table.afp-operational thead th:nth-child(1),
.afp-table.afp-operational tbody td:nth-child(1),
.afp-table.afp-operational thead th:nth-child(2),
.afp-table.afp-operational tbody td:nth-child(2),
.afp-table.afp-operational thead th:nth-child(3),
.afp-table.afp-operational tbody td:nth-child(3),
.afp-table.afp-operational thead th:nth-child(4),
.afp-table.afp-operational tbody td:nth-child(4){
  text-align:left;
}

.afp-table.afp-operational thead th:nth-child(5),
.afp-table.afp-operational tbody td:nth-child(5){
  text-align:right;
}

.afp-table.afp-operational thead th:nth-child(6),
.afp-table.afp-operational tbody td:nth-child(6),
.afp-table.afp-operational thead th:nth-child(7),
.afp-table.afp-operational tbody td:nth-child(7){
  text-align:left;
}

.afp-table.afp-operational thead th:nth-child(8),
.afp-table.afp-operational tbody td:nth-child(8){
  text-align:center;
}

.afp-table.afp-operational thead th:nth-child(9),
.afp-table.afp-operational tbody td:nth-child(9){
  text-align:right;
}


/* v1.3.9.6 force same alignment on expenses and revenues */
.afp-table.afp-expenses thead th,
.afp-table.afp-revenues thead th{
  text-align:left !important;
  vertical-align:middle !important;
}

.afp-table.afp-expenses tbody td,
.afp-table.afp-revenues tbody td{
  vertical-align:top !important;
}

.afp-table.afp-expenses thead th:nth-child(1),
.afp-table.afp-expenses tbody td:nth-child(1),
.afp-table.afp-expenses thead th:nth-child(2),
.afp-table.afp-expenses tbody td:nth-child(2),
.afp-table.afp-expenses thead th:nth-child(3),
.afp-table.afp-expenses tbody td:nth-child(3),
.afp-table.afp-expenses thead th:nth-child(4),
.afp-table.afp-expenses tbody td:nth-child(4),
.afp-table.afp-revenues thead th:nth-child(1),
.afp-table.afp-revenues tbody td:nth-child(1),
.afp-table.afp-revenues thead th:nth-child(2),
.afp-table.afp-revenues tbody td:nth-child(2),
.afp-table.afp-revenues thead th:nth-child(3),
.afp-table.afp-revenues tbody td:nth-child(3),
.afp-table.afp-revenues thead th:nth-child(4),
.afp-table.afp-revenues tbody td:nth-child(4){
  text-align:left !important;
}

.afp-table.afp-expenses thead th:nth-child(5),
.afp-table.afp-expenses tbody td:nth-child(5),
.afp-table.afp-revenues thead th:nth-child(5),
.afp-table.afp-revenues tbody td:nth-child(5){
  text-align:right !important;
}

.afp-table.afp-expenses thead th:nth-child(6),
.afp-table.afp-expenses tbody td:nth-child(6),
.afp-table.afp-expenses thead th:nth-child(7),
.afp-table.afp-expenses tbody td:nth-child(7),
.afp-table.afp-revenues thead th:nth-child(6),
.afp-table.afp-revenues tbody td:nth-child(6),
.afp-table.afp-revenues thead th:nth-child(7),
.afp-table.afp-revenues tbody td:nth-child(7){
  text-align:left !important;
}

.afp-table.afp-expenses thead th:nth-child(8),
.afp-table.afp-expenses tbody td:nth-child(8),
.afp-table.afp-revenues thead th:nth-child(8),
.afp-table.afp-revenues tbody td:nth-child(8){
  text-align:center !important;
}

.afp-table.afp-expenses thead th:nth-child(9),
.afp-table.afp-expenses tbody td:nth-child(9),
.afp-table.afp-revenues thead th:nth-child(9),
.afp-table.afp-revenues tbody td:nth-child(9){
  text-align:right !important;
}


/* v1.4.2 events phase 1 */
.afp-table.afp-events th:nth-child(6),
.afp-table.afp-events td:nth-child(6){
  text-align:right;
  white-space:nowrap;
}


/* v1.4.5 event totals */
.afp-table.afp-events th:nth-child(6),
.afp-table.afp-events td:nth-child(6),
.afp-table.afp-events th:nth-child(7),
.afp-table.afp-events td:nth-child(7),
.afp-table.afp-events th:nth-child(8),
.afp-table.afp-events td:nth-child(8),
.afp-table.afp-events th:nth-child(9),
.afp-table.afp-events td:nth-child(9){
  white-space: nowrap;
}
.afp-table.afp-events th:nth-child(6),
.afp-table.afp-events td:nth-child(6),
.afp-table.afp-events th:nth-child(7),
.afp-table.afp-events td:nth-child(7),
.afp-table.afp-events th:nth-child(8),
.afp-table.afp-events td:nth-child(8){
  text-align:right;
}
.afp-table.afp-events th:nth-child(9),
.afp-table.afp-events td:nth-child(9){
  text-align:right;
}


/* v1.4.7 event detail page */
.afp-table.afp-events th:nth-child(6),
.afp-table.afp-events td:nth-child(6){
  text-align:right;
  white-space:nowrap;
}


/* v1.4.17 event analytics */
.afp-grid-4{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.afp-chart-card{
  height:280px;
  margin:8px 0 16px;
}
@media (max-width: 1100px){
  .afp-grid-4{
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width: 700px){
  .afp-grid-4{
    grid-template-columns:1fr;
  }
}


/* v1.4.18 event internal accounting */
.afp-event-doc-category,
.afp-field select#afp-event-movement-category{
  width:100%;
  min-width:180px;
}
.afp-event-doc-category{
  border:1px solid #d5dceb;
  border-radius:10px;
  padding:8px 10px;
  background:#fff;
  font-size:12px;
}


/* v1.4.19 event budget */
.afp-budget-table th:nth-child(n+2),
.afp-budget-table td:nth-child(n+2){
  text-align:right;
  white-space:nowrap;
}
#afp-event-budget-form{
  margin-top:12px;
}


/* v1.4.20 budget comparison responsive fix */
.afp-budget-table{
  min-width: 680px;
  table-layout: auto;
}

.afp-budget-table th,
.afp-budget-table td{
  white-space: nowrap;
}

.afp-budget-table th:first-child,
.afp-budget-table td:first-child{
  min-width: 220px;
  white-space: normal;
}

.afp-budget-table th:nth-child(2),
.afp-budget-table td:nth-child(2),
.afp-budget-table th:nth-child(3),
.afp-budget-table td:nth-child(3),
.afp-budget-table th:nth-child(4),
.afp-budget-table td:nth-child(4),
.afp-budget-table th:nth-child(5),
.afp-budget-table td:nth-child(5){
  min-width: 110px;
  text-align: right;
}

.afp-card .afp-table-wrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.afp-card .afp-table-wrap .afp-budget-table{
  width: 100%;
}

@media (max-width: 900px){
  .afp-budget-table{
    min-width: 760px;
  }
}


/* v1.4.21 event close */
.afp-alert.warning{
  border:1px solid #f2c94c;
  background:#fff8db;
  color:#7a5b00;
  border-radius:14px;
  padding:12px 14px;
  margin:12px 0 18px;
}
.afp-btn.danger{
  background:#b91c1c;
  color:#fff;
}
.afp-event-doc-category:disabled{
  background:#f3f4f6;
  cursor:not-allowed;
  opacity:.75;
}


/* v1.4.22 close budget fixes */
.afp-budget-list-wrap{
  margin-top:14px;
}
.afp-btn.danger{
  background:#b91c1c;
  color:#fff;
}


/* v1.4.28 visible budget actions */
.afp-budget-actions{
  white-space: nowrap;
  min-width: 130px;
}
.afp-budget-actions .afp-link-btn{
  margin-right: 8px;
}
.afp-link-btn.danger{
  color:#b91c1c;
}


/* v1.4.29 event PDF export */
#afp-export-event-pdf-btn{
  background:#3657d8;
  color:#fff;
}


/* v1.4.38 institutional profile */
.afp-institutional-card{
  margin: 22px 0;
}
.afp-profile-layout{
  display:grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap:22px;
  align-items:start;
}
.afp-logo-panel{
  border:1px solid #e1e7f2;
  border-radius:16px;
  padding:16px;
  background:#f8fafc;
}
.afp-logo-preview{
  display:block;
  width:100%;
  max-height:130px;
  object-fit:contain;
  background:#fff;
  border:1px solid #e5eaf4;
  border-radius:12px;
  padding:10px;
  margin-bottom:12px;
}
.afp-logo-placeholder{
  height:130px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px dashed #b8c2d6;
  border-radius:12px;
  color:#6b7280;
  background:#fff;
  margin-bottom:12px;
  font-weight:700;
}
@media (max-width: 900px){
  .afp-profile-layout{
    grid-template-columns:1fr;
  }
}


/* v1.4.43 event Excel export */
#afp-export-event-excel-btn{
  border-color:#16a34a;
  color:#166534;
  background:#ecfdf5;
}


/* v1.4.44 responsive top navigation and table optimization */

/* Layout: move the navigation from a left sidebar to a top horizontal bar */
.afp-shell{
  display:grid;
  grid-template-columns:1fr !important;
  grid-template-rows:auto minmax(0,1fr);
  width:100%;
  max-width: none;
  min-height:calc(100vh - 24px);
  border-radius:22px;
  overflow:visible;
}

.afp-sidebar{
  position:sticky;
  top:0;
  z-index:30;
  height:auto !important;
  min-height:0;
  padding:14px 18px;
  display:grid;
  grid-template-columns:minmax(220px,auto) minmax(0,1fr) auto;
  align-items:center;
  gap:16px;
  background:linear-gradient(90deg,#0f172a 0%,#111827 65%,#172554 100%);
  border-radius:22px 22px 0 0;
}

.afp-sidebar > div:first-child{
  display:contents;
}

.afp-brand{
  margin:0;
  font-size:18px;
  line-height:1.15;
  white-space:nowrap;
}

.afp-brand-sub{
  font-size:11px;
  margin-top:2px;
}

.afp-userbox{
  margin:0;
  padding:9px 12px;
  border-radius:14px;
  font-size:12px;
  line-height:1.35;
  max-width:260px;
  justify-self:end;
}

.afp-menu{
  display:flex;
  flex-direction:row;
  gap:6px;
  align-items:center;
  justify-content:flex-start;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  min-width:0;
  flex:initial;
  padding:2px 0;
}

.afp-menu a{
  flex:0 0 auto;
  padding:9px 12px;
  border-radius:999px;
  font-size:13px;
  line-height:1;
  white-space:nowrap;
}

.afp-sidebar-footer{
  padding:0;
  border-top:0;
  font-size:12px;
  line-height:1.25;
  justify-self:end;
  white-space:nowrap;
  color:#cbd5e1;
}

.afp-main{
  padding:18px;
  overflow:visible;
  background:#f8fbff;
}

.afp-topbar{
  padding:14px 16px;
  border-radius:18px;
  margin-bottom:16px;
}

.afp-topbar-left h1{
  font-size:24px;
}

.afp-view{
  padding:20px;
  border-radius:18px;
}

/* Cards use available width better on 14" screens */
.afp-grid{
  grid-template-columns:repeat(4,minmax(180px,1fr));
  gap:14px;
  margin-bottom:18px;
}

.afp-card{
  padding:18px;
  border-radius:18px;
}

.afp-stat{
  font-size:28px;
}

/* Tables: compact but readable */
.afp-table-wrap{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:visible;
  -webkit-overflow-scrolling:touch;
  border-radius:16px;
}

.afp-table{
  width:100%;
  min-width:1040px;
  table-layout:auto;
}

.afp-table th,
.afp-table td{
  padding:9px 10px;
  font-size:13px;
  line-height:1.25;
  vertical-align:middle;
}

.afp-table th{
  font-size:11px;
  letter-spacing:.025em;
  white-space:nowrap;
}

.afp-table td{
  word-break:normal;
  overflow-wrap:normal;
}

.afp-table td .afp-muted,
.afp-table td .afp-sm{
  font-size:11px;
  line-height:1.25;
}

/* Keep compact/action/status columns readable */
.afp-table th:first-child,
.afp-table td:first-child{
  white-space:nowrap;
}

.afp-table th:last-child,
.afp-table td:last-child,
.afp-budget-actions{
  white-space:nowrap;
}

.afp-status{
  padding:5px 8px;
  font-size:11px;
  white-space:nowrap;
}

.afp-link-btn{
  margin-right:7px;
  white-space:nowrap;
}

.afp-section-header{
  gap:12px;
  margin-bottom:14px;
}

.afp-inline-actions{
  gap:8px;
}

/* Operational tables: optimized widths for large datasets */
.afp-operational{
  min-width:1120px;
}

.afp-operational th,
.afp-operational td{
  font-size:12.5px;
}

.afp-operational th{
  font-size:10.5px;
}

/* Budget comparison tables */
.afp-budget-table{
  min-width:760px;
}

.afp-budget-table th:nth-child(n+2),
.afp-budget-table td:nth-child(n+2){
  text-align:right;
  white-space:nowrap;
}

.afp-budget-table th:first-child,
.afp-budget-table td:first-child{
  min-width:210px;
  white-space:normal;
}

/* Forms and filters should not force tables off screen */
.afp-toolbar{
  gap:10px;
}

.afp-toolbar input{
  min-width:220px;
}

.afp-field input,
.afp-field select,
.afp-field textarea,
.afp-toolbar input,
.afp-toolbar select{
  padding:10px 12px;
  border-radius:12px;
  font-size:13px;
}

.afp-btn{
  padding:10px 14px;
  border-radius:12px;
  font-size:13px;
}

/* On larger screens, use the extra space naturally */
@media (min-width:1500px){
  .afp-main{
    padding:24px;
  }
  .afp-table th,
  .afp-table td{
    padding:11px 13px;
    font-size:13.5px;
  }
  .afp-table th{
    font-size:11.5px;
  }
  .afp-view{
    padding:26px;
  }
}

/* On 14" and laptop screens */
@media (max-width:1368px){
  .afp-sidebar{
    grid-template-columns:minmax(170px,auto) minmax(0,1fr);
    grid-template-areas:
      "brand footer"
      "menu menu";
    gap:10px 14px;
  }
  .afp-brand{
    grid-area:brand;
  }
  .afp-menu{
    grid-area:menu;
  }
  .afp-sidebar-footer{
    grid-area:footer;
  }
  .afp-userbox{
    display:none;
  }
  .afp-main{
    padding:14px;
  }
  .afp-grid{
    grid-template-columns:repeat(2,minmax(180px,1fr));
  }
  .afp-table{
    min-width:980px;
  }
  .afp-operational{
    min-width:1060px;
  }
}

/* Smaller screens: keep horizontal top menu and table scroll */
@media (max-width:900px){
  .afp-shell{
    min-height:100vh;
    border-radius:0;
  }
  .afp-sidebar{
    border-radius:0;
    padding:12px;
    grid-template-columns:1fr;
    grid-template-areas:
      "brand"
      "menu"
      "footer";
  }
  .afp-sidebar-footer{
    justify-self:start;
  }
  .afp-topbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .afp-topbar-right{
    justify-content:flex-start;
  }
  .afp-section-header{
    flex-direction:column;
    align-items:stretch;
  }
  .afp-inline-actions{
    justify-content:flex-start;
  }
  .afp-grid,
  .afp-grid-4,
  .afp-settings-grid{
    grid-template-columns:1fr !important;
  }
  .afp-view{
    padding:14px;
  }
  .afp-table,
  .afp-operational{
    min-width:900px;
  }
}

/* Very small screens */
@media (max-width:640px){
  .afp-main{
    padding:10px;
  }
  .afp-menu a{
    font-size:12px;
    padding:8px 10px;
  }
  .afp-table,
  .afp-operational{
    min-width:820px;
  }
}


/* v1.4.45 centered application and polished top header */

/* Page frame: keep the full application centered with equal side margins */
#afp-root.afp-app{
  --afp-outer-gap: clamp(12px, 2.2vw, 34px);
  --afp-content-max: 1680px;
  width: min(var(--afp-content-max), calc(100vw - (var(--afp-outer-gap) * 2))) !important;
  max-width: var(--afp-content-max) !important;
  margin: var(--afp-outer-gap) auto !important;
  min-height: calc(100vh - (var(--afp-outer-gap) * 2));
}

/* Main shell becomes a centered card with consistent internal rhythm */
.afp-shell{
  width:100% !important;
  max-width:100%;
  margin:0 auto;
  border-radius:24px;
  overflow:hidden;
  background:#f8fbff;
  box-shadow:0 18px 55px rgba(15,23,42,.12);
}

/* Top navigation: two clean rows.
   Row 1 = brand + user/account info.
   Row 2 = horizontal navigation. */
.afp-sidebar{
  position:sticky;
  top:var(--afp-outer-gap);
  z-index:40;
  display:grid !important;
  grid-template-columns:minmax(260px,auto) minmax(0,1fr) auto;
  grid-template-areas:
    "brand user footer"
    "menu menu menu";
  align-items:center;
  gap:12px 18px;
  padding:16px 20px 14px;
  min-height:0;
  height:auto !important;
  border-radius:24px 24px 0 0;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.35), transparent 32%),
    linear-gradient(135deg,#0f172a 0%,#111827 56%,#172554 100%);
  box-shadow:inset 0 -1px 0 rgba(255,255,255,.08);
}

/* Allow children inside the first wrapper to participate in the top grid */
.afp-sidebar > div:first-child{
  display:contents;
}

.afp-brand{
  grid-area:brand;
  margin:0;
  font-size:19px;
  line-height:1.12;
  letter-spacing:-.02em;
  white-space:nowrap;
  color:#fff;
}

.afp-brand-sub{
  display:block;
  margin-top:3px;
  color:#b6c7e7;
  font-size:11px;
  font-weight:600;
  letter-spacing:0;
}

.afp-userbox{
  grid-area:user;
  justify-self:end;
  max-width:360px;
  margin:0;
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(255,255,255,.075);
  color:#e5ecff;
  font-size:12px;
  line-height:1.35;
  text-align:left;
}

.afp-userbox strong{
  color:#fff;
}

.afp-sidebar-footer{
  grid-area:footer;
  justify-self:end;
  margin:0;
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(255,255,255,.06);
  color:#dbeafe;
  font-size:12px;
  line-height:1.35;
  white-space:nowrap;
}

/* Horizontal menu with better spacing, readable but compact */
.afp-menu{
  grid-area:menu;
  display:flex !important;
  flex-direction:row !important;
  gap:8px;
  align-items:center;
  justify-content:center;
  min-width:0;
  width:100%;
  padding:4px 0 0;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.28) transparent;
}

.afp-menu::-webkit-scrollbar{
  height:6px;
}

.afp-menu::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.25);
  border-radius:999px;
}

.afp-menu a{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:10px 14px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  color:#dbeafe;
  background:rgba(255,255,255,.045);
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  transition:background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.afp-menu a:hover{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.18);
  color:#fff;
}

.afp-menu a.active{
  background:#fff;
  border-color:#fff;
  color:#172554;
  box-shadow:0 8px 22px rgba(15,23,42,.22);
}

/* Main application area: centered inside the shell and with consistent margins */
.afp-main{
  width:100%;
  max-width:100%;
  margin:0 auto;
  padding:20px;
  overflow:visible;
  background:linear-gradient(180deg,#f8fbff 0%,#eef3fb 100%);
}

/* The page header inside the application should align visually with the app card */
.afp-topbar{
  margin:0 0 18px;
  padding:16px 18px;
  border:1px solid #e4ebf6;
  border-radius:20px;
  background:rgba(255,255,255,.96);
  box-shadow:0 10px 28px rgba(15,23,42,.055);
}

.afp-topbar-left h1{
  font-size:24px;
  letter-spacing:-.025em;
}

.afp-topbar-sub{
  font-size:13px;
}

/* Content blocks breathe but do not become too wide internally */
.afp-view,
.afp-card,
.afp-table-wrap{
  border:1px solid #e4ebf6;
}

.afp-view{
  border-radius:20px;
  padding:22px;
}

.afp-card{
  border-radius:20px;
}

/* Tables should use the new horizontal space without touching the viewport */
.afp-table-wrap{
  max-width:100%;
  margin-left:auto;
  margin-right:auto;
}

.afp-operational{
  min-width:1120px;
}

/* On large screens keep content comfortable, not stretched edge-to-edge */
@media (min-width:1700px){
  #afp-root.afp-app{
    --afp-content-max: 1740px;
  }

  .afp-main{
    padding:24px;
  }
}

/* 14-inch laptop target: keep menu tidy and tables readable */
@media (max-width:1450px){
  #afp-root.afp-app{
    --afp-outer-gap: clamp(10px, 1.5vw, 22px);
  }

  .afp-sidebar{
    grid-template-columns:minmax(220px,auto) minmax(0,1fr) auto;
    gap:10px 14px;
    padding:14px 16px 12px;
  }

  .afp-brand{
    font-size:17px;
  }

  .afp-userbox{
    max-width:280px;
  }

  .afp-sidebar-footer{
    font-size:11.5px;
  }

  .afp-menu{
    justify-content:flex-start;
  }

  .afp-menu a{
    padding:9px 12px;
    font-size:12.5px;
  }

  .afp-main{
    padding:16px;
  }
}

/* Medium screens: put brand/account in one row and menu below */
@media (max-width:1180px){
  .afp-sidebar{
    grid-template-columns:minmax(180px,auto) minmax(0,1fr);
    grid-template-areas:
      "brand footer"
      "menu menu";
  }

  .afp-userbox{
    display:none;
  }

  .afp-sidebar-footer{
    justify-self:end;
  }

  .afp-menu{
    justify-content:flex-start;
  }
}

/* Small screens: preserve centered margins but avoid cramped header */
@media (max-width:760px){
  #afp-root.afp-app{
    width:100% !important;
    margin:0 !important;
    min-height:100vh;
  }

  .afp-shell,
  .afp-sidebar{
    border-radius:0;
  }

  .afp-sidebar{
    top:0;
    grid-template-columns:1fr;
    grid-template-areas:
      "brand"
      "footer"
      "menu";
    padding:12px;
  }

  .afp-sidebar-footer{
    justify-self:start;
  }

  .afp-main{
    padding:12px;
  }

  .afp-topbar{
    padding:14px;
  }

  .afp-view{
    padding:14px;
  }
}


/* v1.4.46 centered viewport overflow fix */

/* The page itself must never become wider than the viewport.
   Wide tables should scroll only inside their own wrappers. */
body.page-slug-associaplus{
  overflow-x:hidden;
}

body.page-slug-associaplus #page,
body.page-slug-associaplus .site,
body.page-slug-associaplus .site-content,
body.page-slug-associaplus .content-area,
body.page-slug-associaplus .entry-content,
body.page-slug-associaplus .wp-block-post-content{
  overflow-x:hidden;
}

/* Use 100% rather than 100vw so browser scrollbars do not create phantom overflow. */
#afp-root.afp-app{
  width: min(var(--afp-content-max, 1680px), calc(100% - (var(--afp-outer-gap, 18px) * 2))) !important;
  max-width: var(--afp-content-max, 1680px) !important;
  margin-left:auto !important;
  margin-right:auto !important;
  overflow-x:visible;
}

/* Every structural container must be allowed to shrink. */
.afp-shell,
.afp-main,
.afp-view,
.afp-card,
.afp-topbar,
.afp-section-header,
.afp-settings-grid,
.afp-grid,
.afp-grid-4,
.afp-table-wrap{
  min-width:0;
  max-width:100%;
}

.afp-shell{
  overflow:hidden;
}

.afp-main{
  overflow-x:hidden;
}

.afp-view,
.afp-card{
  overflow:visible;
}

/* Wide content scrolls only here. */
.afp-table-wrap{
  overflow-x:auto !important;
  overflow-y:visible;
}

/* Header/menu must not force the app wider than the screen on 15" laptops. */
.afp-sidebar{
  max-width:100%;
  min-width:0;
}

.afp-menu{
  min-width:0;
  max-width:100%;
}

.afp-sidebar-footer,
.afp-brand,
.afp-userbox{
  min-width:0;
}

/* Laptop and 15" screens: simplify the top bar so it fits the viewport cleanly. */
@media (max-width:1500px){
  #afp-root.afp-app{
    --afp-outer-gap: clamp(10px, 1.2vw, 18px);
    width: calc(100% - (var(--afp-outer-gap) * 2)) !important;
  }

  .afp-sidebar{
    grid-template-columns:minmax(170px,auto) minmax(0,1fr);
    grid-template-areas:
      "brand footer"
      "menu menu";
    gap:10px 14px;
  }

  .afp-userbox{
    display:none !important;
  }

  .afp-sidebar-footer{
    justify-self:end;
    max-width:240px;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .afp-menu{
    justify-content:flex-start;
  }

  .afp-main{
    padding:14px;
  }

  .afp-view{
    padding:18px;
  }
}

/* Narrow laptops: give the menu the whole width and keep account info compact. */
@media (max-width:1368px){
  #afp-root.afp-app{
    --afp-outer-gap: 10px;
    width: calc(100% - 20px) !important;
  }

  .afp-sidebar{
    padding:12px 14px;
  }

  .afp-brand{
    font-size:16px;
  }

  .afp-brand-sub{
    font-size:10.5px;
  }

  .afp-sidebar-footer{
    font-size:11px;
    padding:8px 10px;
    max-width:210px;
  }

  .afp-menu a{
    font-size:12px;
    padding:8px 10px;
  }

  .afp-topbar{
    padding:14px;
  }

  .afp-topbar-left h1{
    font-size:22px;
  }
}

/* When space becomes tight, stack the brand and account info instead of creating page overflow. */
@media (max-width:1080px){
  .afp-sidebar{
    grid-template-columns:1fr;
    grid-template-areas:
      "brand"
      "footer"
      "menu";
  }

  .afp-sidebar-footer{
    justify-self:start;
    max-width:100%;
  }
}


/* v1.4.47 pagination for expenses and revenues */
.afp-pagination{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin:12px 0 20px;
  padding:12px 14px;
  border:1px solid #e4ebf6;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}

.afp-pagination-info{
  color:#64748b;
  font-size:13px;
  font-weight:700;
}

.afp-pagination-controls{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.afp-page-current{
  color:#0f172a;
  font-size:13px;
  font-weight:800;
  white-space:nowrap;
}

.afp-page-btn[disabled]{
  opacity:.45;
  cursor:not-allowed;
}

@media (max-width:700px){
  .afp-pagination{
    align-items:flex-start;
    flex-direction:column;
  }

  .afp-pagination-controls{
    justify-content:flex-start;
  }
}


/* v1.4.48 global account actions in top header */
.afp-global-actions{
  display:flex !important;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  min-width:0;
}

.afp-account-summary{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.afp-badge-header{
  background:#dcfce7;
  color:#166534;
  border:1px solid rgba(22,101,52,.16);
  box-shadow:none;
  white-space:nowrap;
}

.afp-plan-name{
  color:#dbeafe;
  font-size:12px;
  font-weight:700;
  max-width:150px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.afp-header-logout{
  background:rgba(255,255,255,.96) !important;
  color:#0f172a !important;
  border-color:rgba(255,255,255,.35) !important;
  padding:8px 12px;
  min-height:34px;
}

.afp-header-logout:hover{
  background:#fff !important;
}

.afp-module-topbar{
  justify-content:flex-start;
}

.afp-module-topbar .afp-topbar-left{
  min-width:0;
}

@media (max-width:1500px){
  .afp-global-actions{
    justify-self:end;
  }

  .afp-plan-name{
    max-width:120px;
  }

  .afp-header-logout{
    padding:8px 11px;
  }
}

@media (max-width:1180px){
  .afp-global-actions{
    justify-self:start;
    width:100%;
    justify-content:space-between;
  }

  .afp-account-summary{
    max-width:calc(100% - 70px);
  }

  .afp-plan-name{
    max-width:180px;
  }
}

@media (max-width:640px){
  .afp-global-actions{
    align-items:flex-start;
    flex-direction:column;
    gap:8px;
  }

  .afp-account-summary{
    max-width:100%;
  }

  .afp-header-logout{
    width:auto;
  }
}


/* v1.4.49 dashboard chart containment and dynamic brand */

/* The association name can be longer than "Finance Platform"; keep it elegant in the header. */
.afp-brand{
  min-width:0;
  max-width:420px;
  overflow:hidden;
  text-overflow:ellipsis;
}

.afp-brand-sub{
  white-space:normal;
}

/* Dashboard charts must stay inside their cards, especially on 14/15" screens. */
.afp-chart-card,
.afp-card:has(canvas){
  min-width:0;
  overflow:hidden;
}

.afp-card canvas{
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:280px !important;
  max-height:280px !important;
}

.afp-card .chartjs-render-monitor{
  max-width:100% !important;
}

/* If the dashboard uses grid cards, do not let a chart define the grid width. */
.afp-grid .afp-card{
  min-width:0;
}

/* Chart cards should occupy available width but never overflow the content area. */
.afp-dashboard-chart,
.afp-dashboard-chart-wrap,
.afp-chart-wrap{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
}

@media (max-width:1368px){
  .afp-brand{
    max-width:300px;
  }

  .afp-card canvas{
    height:240px !important;
    max-height:240px !important;
  }
}

@media (max-width:900px){
  .afp-brand{
    max-width:100%;
  }

  .afp-card canvas{
    height:220px !important;
    max-height:220px !important;
  }
}


/* v1.4.50 dashboard chart visible bottom fix */

/* Previous containment fixed horizontal overflow, but the fixed canvas height could clip
   the lower labels/legend. Give dashboard chart cards a proper internal chart area. */
.afp-card:has(#afp-dashboard-line-chart),
.afp-card:has(#afp-dashboard-donut-chart){
  overflow:visible;
}

#afp-dashboard-line-chart,
#afp-dashboard-donut-chart{
  display:block;
  width:100% !important;
  max-width:100% !important;
  height:320px !important;
  max-height:none !important;
  box-sizing:border-box;
}

/* Keep enough breathing room below charts so axis labels/legend are visible. */
.afp-card:has(#afp-dashboard-line-chart),
.afp-card:has(#afp-dashboard-donut-chart){
  padding-bottom:26px;
}

/* Limit only horizontal overflow at the parent level, not vertical content. */
.afp-dashboard-chart,
.afp-dashboard-chart-wrap,
.afp-chart-wrap{
  overflow-x:hidden;
  overflow-y:visible;
}

@media (max-width:1368px){
  #afp-dashboard-line-chart,
  #afp-dashboard-donut-chart{
    height:300px !important;
  }
}

@media (max-width:900px){
  #afp-dashboard-line-chart,
  #afp-dashboard-donut-chart{
    height:280px !important;
  }
}


/* v1.4.50 override generic chart max-height rule for dashboard charts */
.afp-card canvas#afp-dashboard-line-chart,
.afp-card canvas#afp-dashboard-donut-chart{
  max-height:none !important;
}


/* v1.4.51 dashboard chart card height fix */

/* Increase the chart card height so the dashboard graph stays fully inside the card. */
.afp-card:has(#afp-dashboard-line-chart),
.afp-card:has(#afp-dashboard-donut-chart){
  min-height: 430px;
  padding-bottom: 30px;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

#afp-dashboard-line-chart,
#afp-dashboard-donut-chart{
  flex: 0 0 auto;
}

@media (max-width:1368px){
  .afp-card:has(#afp-dashboard-line-chart),
  .afp-card:has(#afp-dashboard-donut-chart){
    min-height: 400px;
  }
}

@media (max-width:900px){
  .afp-card:has(#afp-dashboard-line-chart),
  .afp-card:has(#afp-dashboard-donut-chart){
    min-height: 370px;
  }
}


/* v1.4.57 event comparison dashboard */
.afp-event-comparison{
  margin: 18px 0 26px;
}

.afp-event-comparison-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

.afp-event-comparison-head h3{
  margin:0 0 6px;
  color:#0f172a;
  font-size:18px;
}

.afp-event-comparison-summary{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-event-comparison-summary span{
  display:inline-flex;
  gap:6px;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.afp-event-rank-grid{
  margin-bottom:16px;
}

.afp-event-rank-card{
  padding:18px;
}

.afp-event-rank-card h3{
  margin-bottom:12px;
}

.afp-rank-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.afp-rank-row{
  display:grid;
  grid-template-columns:26px minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border-radius:12px;
  background:#f8fafc;
}

.afp-rank-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  border-radius:999px;
  background:#dbeafe;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
}

.afp-rank-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  font-weight:700;
  color:#0f172a;
}

.afp-rank-row strong{
  font-size:13px;
  white-space:nowrap;
}

.afp-event-comparison-table{
  min-width:1180px;
}

.afp-event-comparison-table th:nth-child(n+2),
.afp-event-comparison-table td:nth-child(n+2){
  text-align:right;
  white-space:nowrap;
}

.afp-positive{
  color:#166534;
  font-weight:800;
}

.afp-negative{
  color:#b91c1c;
  font-weight:800;
}

.afp-events-list-title{
  margin-top:26px;
}

@media (max-width:1368px){
  .afp-event-comparison-head{
    flex-direction:column;
  }

  .afp-event-comparison-summary{
    justify-content:flex-start;
  }
}


/* v1.4.58 event associated documents open action */
.afp-event-doc-category{
  max-width:190px;
}
.afp-events .afp-link-btn,
.afp-operational .afp-link-btn{
  white-space:nowrap;
}


/* v1.4.59 association logo in header */
.afp-brand-wrap{
  grid-area:brand;
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.afp-header-logo,
.afp-header-logo-placeholder{
  flex:0 0 auto;
  width:44px;
  height:44px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(255,255,255,.35);
  box-shadow:0 8px 24px rgba(15,23,42,.18);
}

.afp-header-logo{
  object-fit:contain;
  padding:5px;
}

.afp-header-logo-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  color:#1e3a8a;
  font-size:18px;
  font-weight:900;
}

.afp-brand-wrap .afp-brand{
  grid-area:auto;
  min-width:0;
  max-width:420px;
}

@media (max-width:1450px){
  .afp-header-logo,
  .afp-header-logo-placeholder{
    width:40px;
    height:40px;
    border-radius:12px;
  }

  .afp-brand-wrap{
    gap:10px;
  }

  .afp-brand-wrap .afp-brand{
    max-width:320px;
  }
}

@media (max-width:760px){
  .afp-brand-wrap{
    align-items:flex-start;
  }

  .afp-header-logo,
  .afp-header-logo-placeholder{
    width:38px;
    height:38px;
  }

  .afp-brand-wrap .afp-brand{
    max-width:100%;
  }
}


/* v1.4.60 larger association logo in header */
.afp-header-logo,
.afp-header-logo-placeholder{
  width:58px;
  height:58px;
  border-radius:16px;
}

.afp-header-logo{
  padding:6px;
}

.afp-header-logo-placeholder{
  font-size:22px;
}

.afp-brand-wrap{
  gap:14px;
}

@media (max-width:1450px){
  .afp-header-logo,
  .afp-header-logo-placeholder{
    width:52px;
    height:52px;
    border-radius:15px;
  }

  .afp-brand-wrap{
    gap:12px;
  }
}

@media (max-width:760px){
  .afp-header-logo,
  .afp-header-logo-placeholder{
    width:46px;
    height:46px;
    border-radius:14px;
  }
}


/* v1.4.61 event detail visual polish */
.afp-event-detail-view{
  background:linear-gradient(180deg,#ffffff 0%, #fcfdff 100%);
}

.afp-event-detail-view > .afp-card,
.afp-event-detail-view > .afp-grid,
.afp-event-detail-view > .afp-section-header,
.afp-event-detail-view > .afp-alert{
  margin-bottom:24px;
}

.afp-event-detail-view > .afp-card:last-child,
.afp-event-detail-view > .afp-grid:last-child{
  margin-bottom:0;
}

.afp-event-detail-view > .afp-card{
  position:relative;
  border:1px solid #e6edf7;
  border-radius:22px;
  padding:26px;
  box-shadow:0 14px 36px rgba(15,23,42,.06);
}

.afp-event-detail-view > .afp-card::before{
  content:"";
  position:absolute;
  left:0;
  top:18px;
  bottom:18px;
  width:4px;
  border-radius:999px;
  background:linear-gradient(180deg,#2563eb 0%, #60a5fa 100%);
}

.afp-event-detail-view > .afp-card > h3{
  margin:0 0 8px 0;
  padding-bottom:12px;
  border-bottom:1px solid #e8eef7;
  font-size:18px;
  line-height:1.25;
  color:#0f172a;
}

.afp-event-detail-view > .afp-card > .afp-muted{
  display:block;
  margin:0 0 18px 0;
}

.afp-event-detail-view .afp-grid{
  gap:18px;
}

.afp-event-detail-view .afp-grid .afp-card{
  border:1px solid #ecf1f7;
  border-radius:20px;
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}

.afp-event-detail-view .afp-table-wrap{
  margin-top:16px;
  border:1px solid #edf2f8;
  border-radius:18px;
  overflow:auto;
  background:#fff;
}

.afp-event-detail-view .afp-chart-card{
  margin-top:8px;
  margin-bottom:12px;
  padding:12px;
  border:1px solid #edf2f8;
  border-radius:18px;
  background:#fafcff;
}

.afp-event-detail-view .afp-kv{
  margin-top:18px;
  padding-top:2px;
}

.afp-event-detail-view .afp-kv-item{
  border:1px solid #edf2f8;
  border-radius:16px;
  padding:14px 16px;
  background:#fbfdff;
}

.afp-event-detail-view form{
  margin-top:8px;
}

.afp-event-detail-view .afp-form-grid{
  gap:16px;
}

.afp-event-detail-view .afp-inline-actions{
  margin-top:16px;
}

.afp-event-detail-view .afp-section-header{
  padding-bottom:10px;
  border-bottom:1px solid #ebf0f6;
}

.afp-event-detail-view .afp-section-header h2{
  margin-bottom:6px;
}

.afp-event-detail-view .afp-stat{
  font-size:30px;
}

@media (max-width: 1100px){
  .afp-event-detail-view > .afp-card{
    padding:22px;
  }

  .afp-event-detail-view > .afp-card::before{
    top:14px;
    bottom:14px;
  }
}

@media (max-width: 760px){
  .afp-event-detail-view > .afp-card{
    padding:18px;
    border-radius:18px;
  }

  .afp-event-detail-view > .afp-card::before{
    width:3px;
  }

  .afp-event-detail-view > .afp-card > h3{
    font-size:17px;
    padding-bottom:10px;
  }

  .afp-event-detail-view > .afp-card,
  .afp-event-detail-view > .afp-grid,
  .afp-event-detail-view > .afp-section-header,
  .afp-event-detail-view > .afp-alert{
    margin-bottom:18px;
  }
}


/* v1.4.62 uniform event detail spacing */
.afp-event-detail-view{
  --afp-event-gap: 24px;
}

.afp-event-detail-view > .afp-section-header,
.afp-event-detail-view > .afp-alert,
.afp-event-detail-view > .afp-grid,
.afp-event-detail-view > .afp-settings-grid,
.afp-event-detail-view > .afp-card{
  margin-top:0;
  margin-bottom:var(--afp-event-gap) !important;
}

.afp-event-detail-view > .afp-section-header:last-child,
.afp-event-detail-view > .afp-alert:last-child,
.afp-event-detail-view > .afp-grid:last-child,
.afp-event-detail-view > .afp-settings-grid:last-child,
.afp-event-detail-view > .afp-card:last-child{
  margin-bottom:0 !important;
}

.afp-event-detail-view .afp-grid,
.afp-event-detail-view .afp-settings-grid{
  gap:var(--afp-event-gap) !important;
}

.afp-event-detail-view .afp-card > .afp-table-wrap,
.afp-event-detail-view .afp-card > .afp-chart-card{
  margin-top:18px;
}

.afp-event-detail-view .afp-card > form + .afp-table-wrap,
.afp-event-detail-view .afp-card > form + .afp-budget-list-wrap{
  margin-top:22px;
}

.afp-event-detail-view .afp-table-wrap + .afp-table-wrap,
.afp-event-detail-view .afp-chart-card + .afp-table-wrap{
  margin-top:18px;
}

@media (max-width: 760px){
  .afp-event-detail-view{
    --afp-event-gap: 18px;
  }
}


/* v1.4.63 ticketing module */
.afp-ticketing-view .afp-card{
  border:1px solid #e6edf7;
}
.afp-ticketing-view .afp-settings-grid{
  align-items:start;
  margin-bottom:24px;
}
.afp-ticketing-view .afp-card > h3{
  color:#0f172a;
  font-size:17px;
}
.afp-ticket-types-table,
.afp-ticket-sales-table{
  min-width:1080px;
}
.afp-ticket-types-table th:nth-child(n+3),
.afp-ticket-types-table td:nth-child(n+3),
.afp-ticket-sales-table th:nth-child(4),
.afp-ticket-sales-table td:nth-child(4),
.afp-ticket-sales-table th:nth-child(5),
.afp-ticket-sales-table td:nth-child(5),
.afp-ticket-sales-table th:nth-child(8),
.afp-ticket-sales-table td:nth-child(8){
  white-space:nowrap;
  text-align:right;
}
.afp-ticket-status-select{
  min-width:120px;
  border:1px solid #d5dceb;
  border-radius:10px;
  padding:7px 9px;
  background:#fff;
}


/* v1.4.64 ticketing v2 */
.afp-ticketing-view > .afp-card,
.afp-ticketing-view > .afp-grid,
.afp-ticketing-view > .afp-settings-grid{
  margin-bottom:22px;
}

.afp-ticketing-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-ticketing-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-ticketing-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-ticketing-toolbar{
  align-items:center;
}

.afp-ticketing-toolbar select{
  min-width:180px;
}

.afp-ticketing-toolbar input{
  min-width:260px;
}

.afp-ticket-status-select{
  min-width:118px;
  padding:8px 10px;
  border:1px solid #d5dceb;
  border-radius:12px;
  background:#fff;
  font-size:12px;
  font-weight:700;
}

.afp-status.cancelled{
  background:#f1f5f9;
  color:#475569;
}

.afp-ticket-types-table th:nth-child(n+3),
.afp-ticket-types-table td:nth-child(n+3),
.afp-ticket-sales-table th:nth-child(4),
.afp-ticket-sales-table td:nth-child(4),
.afp-ticket-sales-table th:nth-child(5),
.afp-ticket-sales-table td:nth-child(5),
.afp-ticket-sales-table th:nth-child(8),
.afp-ticket-sales-table td:nth-child(8){
  text-align:right;
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-ticketing-filter-card .afp-card-head{
    flex-direction:column;
  }

  .afp-ticketing-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.66 ticketing sessions and public links */
.afp-ticketing-view > .afp-card,
.afp-ticketing-view > .afp-grid,
.afp-ticketing-view > .afp-settings-grid{
  margin-bottom:22px;
}

.afp-ticketing-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-ticketing-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-ticketing-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-ticketing-toolbar{
  align-items:center;
}

.afp-ticketing-toolbar select{
  min-width:180px;
}

.afp-ticketing-toolbar input{
  min-width:260px;
}

.afp-ticket-status-select{
  min-width:118px;
  padding:8px 10px;
  border:1px solid #d5dceb;
  border-radius:12px;
  background:#fff;
  font-size:12px;
  font-weight:700;
}

.afp-status.cancelled{
  background:#f1f5f9;
  color:#475569;
}

.afp-ticket-sessions-table,
.afp-ticket-types-table,
.afp-ticket-sales-table{
  min-width:1180px;
}

.afp-ticket-sessions-table th:nth-child(n+4),
.afp-ticket-sessions-table td:nth-child(n+4),
.afp-ticket-types-table th:nth-child(n+4),
.afp-ticket-types-table td:nth-child(n+4),
.afp-ticket-sales-table th:nth-child(5),
.afp-ticket-sales-table td:nth-child(5),
.afp-ticket-sales-table th:nth-child(6),
.afp-ticket-sales-table td:nth-child(6),
.afp-ticket-sales-table th:nth-child(9),
.afp-ticket-sales-table td:nth-child(9){
  text-align:right;
  white-space:nowrap;
}

.afp-ticket-sessions-table th:last-child,
.afp-ticket-sessions-table td:last-child,
.afp-ticket-types-table th:last-child,
.afp-ticket-types-table td:last-child,
.afp-ticket-sales-table th:last-child,
.afp-ticket-sales-table td:last-child{
  text-align:left;
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-ticketing-filter-card .afp-card-head{
    flex-direction:column;
  }

  .afp-ticketing-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.67 ticketing public event links */
.afp-ticket-event-links-table{
  min-width:760px;
}

.afp-ticket-event-links-table th:nth-child(2),
.afp-ticket-event-links-table td:nth-child(2),
.afp-ticket-event-links-table th:nth-child(3),
.afp-ticket-event-links-table td:nth-child(3){
  text-align:right;
  white-space:nowrap;
}

.afp-ticket-event-links-table th:last-child,
.afp-ticket-event-links-table td:last-child{
  white-space:nowrap;
}


/* v1.4.69 ticketing per-person limit */
.afp-ticket-sessions-table{
  min-width:1260px;
}
.afp-ticket-sessions-table th:nth-child(5),
.afp-ticket-sessions-table td:nth-child(5),
.afp-ticket-sessions-table th:nth-child(6),
.afp-ticket-sessions-table td:nth-child(6),
.afp-ticket-sessions-table th:nth-child(7),
.afp-ticket-sessions-table td:nth-child(7){
  text-align:right;
  white-space:nowrap;
}


/* v1.4.71 members and dues module */
.afp-members-view > .afp-card,
.afp-members-view > .afp-grid,
.afp-members-view > .afp-settings-grid{
  margin-bottom:22px;
}

.afp-members-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-members-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-members-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-members-toolbar{
  align-items:center;
}

.afp-members-toolbar select{
  min-width:180px;
}

.afp-members-toolbar input{
  min-width:260px;
}

.afp-members-table{
  min-width:1080px;
}

.afp-member-dues-table,
.afp-member-fees-table{
  min-width:760px;
}

.afp-members-table th:nth-child(6),
.afp-members-table td:nth-child(6),
.afp-members-table th:nth-child(7),
.afp-members-table td:nth-child(7),
.afp-member-dues-table th:nth-child(5),
.afp-member-dues-table td:nth-child(5),
.afp-member-fees-table th:nth-child(2),
.afp-member-fees-table td:nth-child(2){
  text-align:right;
  white-space:nowrap;
}

.afp-members-table th:last-child,
.afp-members-table td:last-child,
.afp-member-dues-table th:last-child,
.afp-member-dues-table td:last-child,
.afp-member-fees-table th:last-child,
.afp-member-fees-table td:last-child{
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-members-filter-card .afp-card-head{
    flex-direction:column;
  }

  .afp-members-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.72 members module submenus */
.afp-members-view-v2 .afp-members-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:0 0 22px;
  padding:8px;
  border:1px solid #e6edf7;
  border-radius:18px;
  background:#f8fbff;
}

.afp-members-tab{
  border:0;
  background:transparent;
  color:#475569;
  padding:10px 14px;
  border-radius:14px;
  font-size:13px;
  font-weight:800;
  cursor:pointer;
}

.afp-members-tab:hover{
  background:#eef4ff;
  color:#1e3a8a;
}

.afp-members-tab.active{
  background:#2563eb;
  color:#fff;
  box-shadow:0 8px 22px rgba(37,99,235,.20);
}

.afp-members-view-v2 > .afp-card,
.afp-members-view-v2 > .afp-grid,
.afp-members-view-v2 > .afp-settings-grid{
  margin-bottom:22px;
}

.afp-member-mini-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

.afp-member-mini-stats > div{
  padding:14px;
  border:1px solid #edf2f8;
  border-radius:16px;
  background:#fbfdff;
}

.afp-member-mini-stats span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:700;
  margin-bottom:6px;
}

.afp-member-mini-stats strong{
  display:block;
  color:#0f172a;
  font-size:22px;
  font-weight:900;
}

.afp-member-dues-all-table{
  min-width:980px;
}

.afp-member-dues-all-table th:nth-child(5),
.afp-member-dues-all-table td:nth-child(5){
  text-align:right;
  white-space:nowrap;
}

@media (max-width:760px){
  .afp-members-view-v2 .afp-members-tabs{
    gap:6px;
    padding:6px;
  }

  .afp-members-tab{
    flex:1 1 auto;
    padding:9px 10px;
  }

  .afp-member-mini-stats{
    grid-template-columns:1fr;
  }
}


/* v1.4.73 member detail and quota history */
.afp-member-detail-hero{
  border:1px solid #e3ebf6;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.afp-member-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.afp-member-detail-head h3{
  margin:8px 0 4px;
  font-size:24px;
  letter-spacing:-.02em;
}

.afp-member-number-badge{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#dbeafe;
  color:#1e3a8a;
  font-size:12px;
  font-weight:900;
}

.afp-member-detail-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.afp-member-detail-grid > div,
.afp-member-detail-address{
  padding:14px;
  border:1px solid #edf2f8;
  border-radius:16px;
  background:#fff;
}

.afp-member-detail-grid span,
.afp-member-detail-address span{
  display:block;
  margin-bottom:5px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}

.afp-member-detail-grid strong,
.afp-member-detail-address strong{
  display:block;
  color:#0f172a;
  font-size:14px;
  font-weight:800;
  overflow-wrap:anywhere;
}

.afp-member-detail-address{
  margin-top:12px;
}

.afp-member-detail-notes{
  margin-top:12px;
  padding:14px;
  border-radius:16px;
  background:#f8fafc;
  color:#475569;
  line-height:1.45;
}

@media (max-width:960px){
  .afp-member-detail-head{
    flex-direction:column;
  }

  .afp-member-detail-grid{
    grid-template-columns:1fr;
  }
}


/* v1.4.75 members import/export, email receipts and pagination */
.afp-member-import-table{
  min-width:900px;
}

.afp-members-view .afp-pagination{
  margin-top:16px;
}

.afp-members-view .afp-alert.warning{
  margin-top:14px;
  padding:12px 14px;
  border-radius:14px;
  background:#fff7ed;
  color:#9a3412;
  border:1px solid #fed7aa;
  font-size:13px;
  font-weight:700;
}

.afp-members-view input[type="file"]{
  padding:10px;
  background:#fff;
}

.afp-member-dues-all-table td:last-child .afp-link-btn,
.afp-member-dues-table td:last-child .afp-link-btn{
  margin-right:6px;
  margin-bottom:4px;
}


/* v1.4.77 association email sender settings */
.afp-institutional-card input[name="email_sender_email"],
.afp-institutional-card input[name="email_reply_to"]{
  font-family:Arial, Helvetica, sans-serif;
}


/* v1.4.79 member portal, cards and automatic emails */
.afp-member-detail-head .afp-inline-actions{
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-members-table td:last-child .afp-link-btn{
  margin-right:5px;
  margin-bottom:4px;
}


/* v1.4.80 rentals module */
.afp-rentals-view > .afp-card,
.afp-rentals-view > .afp-grid,
.afp-rentals-view > .afp-settings-grid{
  margin-bottom:22px;
}

.afp-rentals-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-rentals-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-rentals-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-rentals-toolbar select{
  min-width:180px;
}

.afp-rentals-toolbar input{
  min-width:260px;
}

.afp-rentals-table{
  min-width:1180px;
}

.afp-rental-spaces-table{
  min-width:900px;
}

.afp-rentals-table th:nth-child(5),
.afp-rentals-table td:nth-child(5),
.afp-rental-spaces-table th:nth-child(2),
.afp-rental-spaces-table td:nth-child(2),
.afp-rental-spaces-table th:nth-child(4),
.afp-rental-spaces-table td:nth-child(4){
  text-align:right;
  white-space:nowrap;
}

.afp-rentals-table th:last-child,
.afp-rentals-table td:last-child,
.afp-rental-spaces-table th:last-child,
.afp-rental-spaces-table td:last-child{
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-rentals-filter-card .afp-card-head{
    flex-direction:column;
  }
  .afp-rentals-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.81 rentals v2: public links, equipment, deposits, contracts */
.afp-rental-equipment-select-table{
  min-width:620px;
}

.afp-rental-equipment-select-table input{
  min-width:110px;
}

.afp-rental-equipment-table,
.afp-rental-calendar-table{
  min-width:760px;
}

.afp-rental-equipment-table th:nth-child(2),
.afp-rental-equipment-table td:nth-child(2),
.afp-rental-equipment-table th:nth-child(3),
.afp-rental-equipment-table td:nth-child(3){
  text-align:right;
  white-space:nowrap;
}

.afp-rentals-table th:nth-child(8),
.afp-rentals-table td:nth-child(8){
  white-space:nowrap;
}

.afp-rentals-table td:last-child .afp-link-btn,
.afp-rental-spaces-table td:last-child .afp-link-btn,
.afp-rental-equipment-table td:last-child .afp-link-btn{
  margin-right:5px;
  margin-bottom:4px;
}


/* v1.4.84 inventory / patrimony module */
.afp-inventory-view > .afp-card,
.afp-inventory-view > .afp-grid{
  margin-bottom:22px;
}

.afp-inventory-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-inventory-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-inventory-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-inventory-toolbar select{
  min-width:180px;
}

.afp-inventory-toolbar input{
  min-width:260px;
}

.afp-inventory-table{
  min-width:1160px;
}

.afp-inventory-table th:nth-child(4),
.afp-inventory-table td:nth-child(4),
.afp-inventory-table th:nth-child(5),
.afp-inventory-table td:nth-child(5){
  text-align:right;
  white-space:nowrap;
}

.afp-inventory-table th:last-child,
.afp-inventory-table td:last-child{
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-inventory-filter-card .afp-card-head{
    flex-direction:column;
  }
  .afp-inventory-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.85 tasks / teams module */
.afp-tasks-view > .afp-card,
.afp-tasks-view > .afp-grid{
  margin-bottom:22px;
}

.afp-tasks-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-tasks-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-tasks-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-tasks-toolbar select{
  min-width:170px;
}

.afp-tasks-toolbar input{
  min-width:240px;
}

.afp-tasks-table{
  min-width:1120px;
}

.afp-tasks-table th:nth-child(8),
.afp-tasks-table td:nth-child(8){
  text-align:right;
  white-space:nowrap;
}

.afp-tasks-table th:last-child,
.afp-tasks-table td:last-child{
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-tasks-filter-card .afp-card-head{
    flex-direction:column;
  }
  .afp-tasks-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.86 communications / newsletters module */
.afp-communications-view > .afp-card,
.afp-communications-view > .afp-grid,
.afp-communications-view > .afp-settings-grid{
  margin-bottom:22px;
}

.afp-communications-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-communications-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-communications-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-communications-toolbar select{
  min-width:170px;
}

.afp-communications-toolbar input{
  min-width:260px;
}

.afp-communication-contacts-table,
.afp-communication-campaigns-table{
  min-width:980px;
}

.afp-communication-contacts-table th:last-child,
.afp-communication-contacts-table td:last-child,
.afp-communication-campaigns-table th:last-child,
.afp-communication-campaigns-table td:last-child{
  white-space:nowrap;
}

.afp-communication-campaigns-table th:nth-child(5),
.afp-communication-campaigns-table td:nth-child(5){
  text-align:right;
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-communications-filter-card .afp-card-head{
    flex-direction:column;
  }
  .afp-communications-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.87 grants / subsidies module */
.afp-grants-view > .afp-card,
.afp-grants-view > .afp-grid{
  margin-bottom:22px;
}

.afp-grants-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-grants-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-grants-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-grants-toolbar select{
  min-width:180px;
}

.afp-grants-toolbar input{
  min-width:260px;
}

.afp-grants-table{
  min-width:1220px;
}

.afp-grants-table th:nth-child(4),
.afp-grants-table td:nth-child(4){
  text-align:right;
  white-space:nowrap;
}

.afp-grants-table th:last-child,
.afp-grants-table td:last-child{
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-grants-filter-card .afp-card-head{
    flex-direction:column;
  }
  .afp-grants-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.88 archive / documents module */
.afp-archive-view > .afp-card,
.afp-archive-view > .afp-grid{
  margin-bottom:22px;
}

.afp-archive-filter-card .afp-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:14px;
}

.afp-archive-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-archive-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.afp-archive-toolbar select{
  min-width:180px;
}

.afp-archive-toolbar input{
  min-width:260px;
}

.afp-archive-table{
  min-width:1060px;
}

.afp-archive-table th:last-child,
.afp-archive-table td:last-child{
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-archive-filter-card .afp-card-head{
    flex-direction:column;
  }
  .afp-archive-filter-summary{
    justify-content:flex-start;
  }
}


/* v1.4.89 public portal module */
.afp-portal-view > .afp-card,
.afp-portal-view > .afp-grid,
.afp-portal-view > .afp-settings-grid{
  margin-bottom:22px;
}

.afp-portal-table{
  min-width:980px;
}

.afp-portal-table th:nth-child(5),
.afp-portal-table td:nth-child(5){
  text-align:right;
  white-space:nowrap;
}

.afp-portal-table th:last-child,
.afp-portal-table td:last-child{
  white-space:nowrap;
}

.afp-portal-table td:first-child .afp-muted{
  max-width:420px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}


/* v1.4.90 PWA / mobile app install */
.afp-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.afp-topbar-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.afp-install-app-btn{
  white-space:nowrap;
}

@media (max-width:760px){
  .afp-topbar{
    align-items:flex-start;
    flex-direction:column;
  }
  .afp-topbar-actions{
    width:100%;
    justify-content:flex-start;
  }
  .afp-install-app-btn{
    width:auto;
  }
}


/* v1.4.94 event detail tabs, exhibitors and sponsors */
.afp-event-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:14px 0 18px;
  padding:10px;
  border:1px solid #dbe3ef;
  border-radius:18px;
  background:#f8fbff;
}

.afp-event-tab{
  border:0;
  border-radius:999px;
  padding:9px 13px;
  font-weight:800;
  font-size:13px;
  background:#eef3ff;
  color:#1e3a8a;
  cursor:pointer;
}

.afp-event-tab.active{
  background:#1d4ed8;
  color:#fff;
  box-shadow:0 8px 20px rgba(29,78,216,.22);
}

.afp-event-tab-hidden{
  display:none!important;
}

.afp-event-exhibitors-panel,
.afp-event-sponsors-panel{
  border-top:4px solid #1d4ed8;
}

.afp-event-exhibitors-panel form,
.afp-event-sponsors-panel form{
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px solid #e2e8f0;
}

@media(max-width:760px){
  .afp-event-tabs{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding:8px;
  }
  .afp-event-tab{
    white-space:nowrap;
  }
}


/* v1.4.95 communication / social networks */
.afp-communication-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:14px 0 20px;
  padding:10px;
  border:1px solid #dbe3ef;
  border-radius:18px;
  background:#f8fbff;
}

.afp-communication-tab{
  border:0;
  border-radius:999px;
  padding:9px 13px;
  font-weight:800;
  font-size:13px;
  background:#eef3ff;
  color:#1e3a8a;
  cursor:pointer;
}

.afp-communication-tab.active{
  background:#1d4ed8;
  color:#fff;
  box-shadow:0 8px 20px rgba(29,78,216,.22);
}

.afp-communication-tab-hidden{
  display:none!important;
}

.afp-social-panel,
.afp-social-templates-panel{
  border-top:4px solid #1d4ed8;
}

.afp-social-generate-box{
  margin:16px 0;
  padding:14px;
  border:1px dashed #bfd2ff;
  background:#f8fbff;
  border-radius:16px;
}

.afp-social-generate-box h4{
  margin:0 0 10px;
}

.afp-social-content-preview{
  max-width:420px;
  max-height:90px;
  overflow:auto;
  white-space:pre-wrap;
  color:#334155;
  font-size:13px;
}

.afp-social-posts-table{
  min-width:1080px;
}

@media(max-width:760px){
  .afp-communication-tabs{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding:8px;
  }
  .afp-communication-tab{
    white-space:nowrap;
  }
}


/* v1.4.96 social editorial calendar */
.afp-social-calendar-panel .afp-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.afp-social-calendar-title{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  text-transform:capitalize;
}

.afp-social-calendar-weekdays{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
  margin-bottom:8px;
}

.afp-social-calendar-weekdays div{
  text-align:center;
  font-weight:900;
  color:#64748b;
  font-size:12px;
  text-transform:uppercase;
}

.afp-social-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
}

.afp-social-calendar-day{
  min-height:150px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  padding:10px;
  overflow:hidden;
}

.afp-social-calendar-day.empty{
  background:#f8fafc;
  border-style:dashed;
}

.afp-social-calendar-day.today{
  border-color:#1d4ed8;
  box-shadow:0 0 0 2px rgba(29,78,216,.08);
}

.afp-social-calendar-day-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}

.afp-social-calendar-items{
  display:flex;
  flex-direction:column;
  gap:7px;
}

.afp-social-calendar-item{
  border-radius:12px;
  padding:8px;
  background:#f8fbff;
  border-left:4px solid #93c5fd;
}

.afp-social-calendar-item.published{
  border-left-color:#16a34a;
  background:#f0fdf4;
}

.afp-social-calendar-item.cancelled{
  border-left-color:#ef4444;
  background:#fff1f2;
}

.afp-social-calendar-item.scheduled{
  border-left-color:#f59e0b;
  background:#fffbeb;
}

.afp-social-calendar-item-title{
  font-size:12px;
  font-weight:900;
  color:#0f172a;
  line-height:1.2;
}

.afp-social-calendar-item-meta{
  font-size:11px;
  color:#64748b;
  margin-top:3px;
}

.afp-social-calendar-actions{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-top:5px;
}

.afp-social-calendar-actions .afp-link-btn{
  font-size:11px;
}

.afp-social-calendar-empty{
  color:#94a3b8;
  font-size:12px;
  padding:8px 0;
}

@media(max-width:1000px){
  .afp-social-calendar-grid,
  .afp-social-calendar-weekdays{
    min-width:900px;
  }
  .afp-social-calendar-panel{
    overflow:auto;
  }
}

@media(max-width:760px){
  .afp-social-calendar-panel .afp-card-head{
    flex-direction:column;
  }
}


/* v1.4.98 communication directly inside event detail */
.afp-event-communication-panel{
  border-top:4px solid #1d4ed8;
}

.afp-event-communication-panel .afp-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.afp-event-social-posts-table{
  min-width:980px;
}

.afp-event-communication-panel form{
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px solid #e2e8f0;
}

@media(max-width:760px){
  .afp-event-communication-panel .afp-card-head{
    flex-direction:column;
  }
}

/* v1.5.00 fluid navigation/performance */
.afp-main{
  position:relative;
}

.afp-main > .afp-view,
.afp-main > .afp-grid,
.afp-main > .afp-dashboard-charts,
.afp-main > .afp-settings-grid,
.afp-main > .afp-card{
  animation:afp-view-enter .18s ease-out both;
}

.afp-menu a{
  transition:background-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
  will-change:transform;
}

.afp-menu a:hover,
.afp-menu a:focus-visible{
  transform:translateX(2px);
}

.afp-route-loading-bar{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:36px;
  margin:-24px -24px 18px;
  padding:8px 24px;
  background:rgba(239,246,255,.96);
  border-bottom:1px solid #bfdbfe;
  color:#1e3a8a;
  font-size:13px;
  box-shadow:0 10px 24px rgba(15,23,42,.06);
  backdrop-filter:blur(10px);
}

.afp-route-loading-bar span{
  width:16px;
  height:16px;
  border:2px solid rgba(37,99,235,.25);
  border-top-color:#2563eb;
  border-radius:999px;
  animation:afp-spin .72s linear infinite;
  flex:0 0 auto;
}

.afp-route-loading-bar strong{
  font-weight:800;
}

.afp-is-loading .afp-view{
  opacity:.96;
}

@keyframes afp-view-enter{
  from{opacity:0; transform:translateY(6px);}
  to{opacity:1; transform:translateY(0);}
}

@keyframes afp-spin{
  to{transform:rotate(360deg);}
}

@media(max-width:760px){
  .afp-route-loading-bar{
    margin:-16px -16px 14px;
    padding:8px 16px;
  }
}

/* v1.5.01 social networks completion */
.afp-social-overview-panel .afp-card-head,
.afp-social-composer-panel .afp-card-head,
.afp-social-filter-card .afp-card-head{
  align-items:flex-start;
}
.afp-social-mini-stats{
  margin-top:12px;
}
.afp-mini-stat{
  border:1px solid rgba(148,163,184,.24);
  border-radius:16px;
  padding:14px;
  background:rgba(248,250,252,.72);
}
.afp-mini-stat strong{
  display:block;
  font-size:24px;
  line-height:1.1;
  color:#0f172a;
}
.afp-mini-stat span{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-size:13px;
}
.afp-social-next-list{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.afp-social-next-list span{
  border:1px solid rgba(37,99,235,.12);
  background:rgba(37,99,235,.06);
  color:#1e3a8a;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
}
.afp-social-composer-grid{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(260px,.85fr);
  gap:18px;
  align-items:start;
}
.afp-social-channel-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.afp-social-channel-choice{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(148,163,184,.38);
  background:#fff;
  border-radius:999px;
  padding:7px 11px;
  font-size:13px;
  cursor:pointer;
  user-select:none;
}
.afp-social-channel-choice input{
  margin:0;
}
.afp-social-channel-choice.selected,
.afp-social-channel-choice:has(input:checked){
  border-color:rgba(37,99,235,.42);
  background:rgba(37,99,235,.08);
  color:#1d4ed8;
}
.afp-social-preview-card{
  position:sticky;
  top:18px;
  border:1px solid rgba(148,163,184,.24);
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  box-shadow:0 18px 35px rgba(15,23,42,.08);
  padding:18px;
  overflow:hidden;
}
.afp-social-preview-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  color:#64748b;
  font-size:12px;
  margin-bottom:14px;
}
.afp-social-preview-head span{
  font-weight:700;
  color:#0f172a;
}
.afp-social-preview-title{
  font-weight:800;
  font-size:18px;
  color:#0f172a;
  margin-bottom:8px;
}
.afp-social-preview-channels{
  display:inline-flex;
  border-radius:999px;
  padding:5px 9px;
  background:rgba(37,99,235,.08);
  color:#1d4ed8;
  font-size:12px;
  margin-bottom:14px;
}
.afp-social-preview-body{
  white-space:normal;
  color:#1e293b;
  line-height:1.55;
  font-size:14px;
  border-top:1px solid rgba(148,163,184,.22);
  padding-top:14px;
  max-height:420px;
  overflow:auto;
}
.afp-social-preview-foot{
  margin-top:14px;
  color:#64748b;
  font-size:12px;
}
.afp-social-char-counter{
  border-radius:999px;
  padding:7px 11px;
  background:rgba(15,23,42,.06);
  color:#334155;
  font-size:12px;
  font-weight:700;
}
.afp-social-char-counter.warning{
  background:rgba(245,158,11,.14);
  color:#92400e;
}
.afp-social-generator-toolbar select{
  min-width:220px;
}
.afp-social-actions-cell{
  min-width:230px;
}
.afp-social-actions-cell .afp-link-btn{
  margin-right:6px;
  margin-bottom:4px;
}
.afp-social-toolbar select,
.afp-social-toolbar input{
  min-width:150px;
}
@media (max-width: 980px){
  .afp-social-composer-grid{
    grid-template-columns:1fr;
  }
  .afp-social-preview-card{
    position:relative;
    top:auto;
  }
}

/* v1.5.04 candidaturas públicas de expositores */
.afp-exhibitor-application-card,
.afp-info-card{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  border:1px solid rgba(37,99,235,.14);
  background:linear-gradient(135deg,rgba(239,246,255,.9),rgba(255,255,255,.92));
  border-radius:18px;
  padding:16px;
  margin:14px 0 18px;
}
.afp-exhibitor-application-card input{
  width:100%;
  min-width:min(520px,100%);
  margin-top:8px;
  font-size:13px;
}
.afp-review-form{
  border:1px solid var(--afp-border, #e5e7eb);
  border-radius:18px;
  padding:16px;
  margin:14px 0 18px;
  background:#fff;
}
.afp-review-form h4{margin:0 0 6px;font-size:16px}
@media(max-width:780px){
  .afp-exhibitor-application-card,
  .afp-info-card{display:block}
  .afp-exhibitor-application-card .afp-inline-actions{margin-top:12px}
  .afp-exhibitor-application-card input{min-width:0}
}

/* v1.5.05 - Patrocínios do evento */
.afp-kpi-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:12px;
  margin:14px 0 18px;
}
.afp-kpi-card{
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius:16px;
  padding:14px 16px;
  box-shadow:0 10px 28px rgba(15,23,42,.05);
}
.afp-kpi-card span{
  display:block;
  font-size:.8rem;
  color:#64748b;
  margin-bottom:4px;
}
.afp-kpi-card strong{
  display:block;
  font-size:1.35rem;
  color:#0f172a;
}
.afp-kpi-card small{
  display:block;
  margin-top:4px;
  color:#64748b;
}
.afp-event-sponsors-panel .afp-review-form{
  margin-bottom:18px;
}

/* v1.5.06 event submenu design refresh */
.afp-event-detail-view{
  background:linear-gradient(180deg,#f7faff 0%,#ffffff 34%,#f8fbff 100%);
  border-radius:28px;
}

.afp-event-hero{
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:24px !important;
  border:1px solid #dbe8fb !important;
  border-radius:28px;
  background:
    radial-gradient(circle at 8% 0%,rgba(37,99,235,.14),transparent 34%),
    linear-gradient(135deg,#ffffff 0%,#f8fbff 58%,#eef6ff 100%);
  box-shadow:0 20px 55px rgba(15,23,42,.08);
  overflow:hidden;
}

.afp-event-hero::after{
  content:"";
  position:absolute;
  right:-70px;
  top:-70px;
  width:210px;
  height:210px;
  border-radius:50%;
  background:rgba(37,99,235,.08);
  pointer-events:none;
}

.afp-event-hero-main,
.afp-event-hero-actions{
  position:relative;
  z-index:1;
}

.afp-event-hero-main{
  min-width:0;
}

.afp-event-hero h2{
  margin:8px 0 6px !important;
  font-size:clamp(26px,3vw,40px);
  line-height:1.05;
  letter-spacing:-.04em;
  color:#0f172a;
}

.afp-event-kicker{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  color:#475569;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.afp-event-status-pill{
  border-radius:999px;
  padding:7px 11px;
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}

.afp-event-state-draft{background:#eef2ff;color:#3730a3;}
.afp-event-state-pending{background:#fff7ed;color:#9a3412;}
.afp-event-state-approved{background:#ecfdf5;color:#047857;}
.afp-event-state-closed{background:#f1f5f9;color:#334155;}

.afp-event-quick-facts{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:16px;
}

.afp-event-quick-facts span{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:9px 12px;
  border:1px solid #dbeafe;
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:#475569;
  font-size:13px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.afp-event-quick-facts strong{
  color:#0f172a;
}

.afp-event-hero-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
  max-width:420px;
}

.afp-event-tabs{
  position:sticky;
  top:12px;
  z-index:8;
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(152px,1fr));
  gap:10px !important;
  margin:18px 0 14px !important;
  padding:12px !important;
  border:1px solid #dbe8fb !important;
  border-radius:24px !important;
  background:rgba(248,251,255,.92) !important;
  backdrop-filter:blur(12px);
  box-shadow:0 14px 40px rgba(15,23,42,.08);
}

.afp-event-tab{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:62px;
  padding:10px 12px !important;
  border:1px solid #e1e9f5 !important;
  border-radius:18px !important;
  background:#ffffff !important;
  color:#334155 !important;
  text-align:left;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.afp-event-tab:hover{
  transform:translateY(-1px);
  border-color:#bfdbfe !important;
  box-shadow:0 12px 28px rgba(15,23,42,.08);
}

.afp-event-tab.active{
  background:linear-gradient(135deg,#1d4ed8 0%,#2563eb 62%,#38bdf8 100%) !important;
  color:#ffffff !important;
  border-color:#2563eb !important;
  box-shadow:0 18px 34px rgba(37,99,235,.26) !important;
}

.afp-event-tab-icon{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:14px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:18px;
  font-weight:900;
}

.afp-event-tab.active .afp-event-tab-icon{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.afp-event-tab-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:1px;
}

.afp-event-tab-copy strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  line-height:1.15;
}

.afp-event-tab-copy small{
  font-size:11px;
  font-weight:800;
  color:#64748b;
}

.afp-event-tab.active .afp-event-tab-copy small{
  color:rgba(255,255,255,.82);
}

.afp-event-tab-count{
  min-width:26px;
  height:26px;
  display:inline-grid;
  place-items:center;
  padding:0 8px;
  border-radius:999px;
  background:#e0f2fe;
  color:#075985;
  font-size:12px;
  font-weight:900;
}

.afp-event-tab.active .afp-event-tab-count{
  background:rgba(255,255,255,.2);
  color:#fff;
}

.afp-event-workbar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin:-2px 0 18px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
  color:#475569;
  font-size:13px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.afp-event-workbar span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 9px;
  border-radius:999px;
  background:#f8fafc;
}

.afp-event-summary-grid .afp-event-metric-card{
  min-height:142px;
  border:1px solid #e0eaf7 !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}

.afp-event-summary-grid .afp-event-metric-card::before{
  display:none;
}

.afp-event-metric-label{
  display:inline-flex;
  margin-bottom:10px;
  color:#475569;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.afp-event-summary-grid .afp-stat{
  margin-bottom:6px;
  font-size:clamp(25px,2.4vw,34px) !important;
  letter-spacing:-.04em;
}

.afp-event-detail-view > .afp-card,
.afp-event-detail-view > .afp-settings-grid > .afp-card,
.afp-event-detail-view .afp-card{
  border-radius:24px;
}

.afp-event-detail-view > .afp-card::before{
  top:22px;
  bottom:22px;
  background:linear-gradient(180deg,#0ea5e9 0%,#2563eb 100%);
}

.afp-event-detail-view .afp-table-wrap{
  border-radius:20px;
}

.afp-event-tab-hidden{
  display:none !important;
}

@media (max-width: 1100px){
  .afp-event-hero{
    flex-direction:column;
  }
  .afp-event-hero-actions{
    justify-content:flex-start;
    max-width:none;
  }
  .afp-event-tabs{
    position:relative;
    top:auto;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 760px){
  .afp-event-hero{
    padding:18px !important;
    border-radius:22px;
  }
  .afp-event-tabs{
    display:flex !important;
    overflow-x:auto;
    flex-wrap:nowrap !important;
    padding:10px !important;
    border-radius:20px !important;
  }
  .afp-event-tab{
    min-width:178px;
  }
  .afp-event-hero-actions .afp-btn{
    flex:1 1 auto;
  }
}

/* v1.5.07 — Documentos/modelos dentro do evento */
.afp-event-documents-panel .afp-document-generate-box,
.afp-event-documents-panel #afp-event-document-form{
  margin:14px 0;
  padding:16px;
  border:1px solid #dbeafe;
  border-radius:20px;
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
}

.afp-event-documents-panel .afp-document-generate-box h4{
  margin:0 0 10px;
  color:#0f172a;
}

.afp-event-documents-panel .afp-inline-form{
  align-items:end;
}

.afp-event-documents-panel .afp-inline-form select{
  min-width:220px;
}

.afp-document-content-preview{
  max-width:320px;
  max-height:76px;
  overflow:hidden;
  white-space:pre-wrap;
  color:#475569;
  font-size:12px;
  line-height:1.45;
}

.afp-event-documents-table td:last-child{
  min-width:190px;
}

@media (max-width:760px){
  .afp-event-documents-panel .afp-inline-form{
    display:grid;
    grid-template-columns:1fr;
  }
  .afp-event-documents-panel .afp-inline-form select,
  .afp-event-documents-panel .afp-inline-form .afp-btn{
    width:100%;
  }
}


/* v1.5.08 — uniformização visual global dos módulos */
.afp-module-hero:not(.afp-event-hero),
.afp-view > .afp-section-header:first-child:not(.afp-event-hero){
  position:relative;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:24px !important;
  margin-bottom:18px;
  border:1px solid #dbe8fb !important;
  border-radius:28px;
  background:
    radial-gradient(circle at 8% 0%,rgba(37,99,235,.14),transparent 34%),
    linear-gradient(135deg,#ffffff 0%,#f8fbff 58%,#eef6ff 100%);
  box-shadow:0 20px 55px rgba(15,23,42,.08);
  overflow:hidden;
}

.afp-module-hero:not(.afp-event-hero)::after,
.afp-view > .afp-section-header:first-child:not(.afp-event-hero)::after{
  content:"";
  position:absolute;
  right:-70px;
  top:-70px;
  width:210px;
  height:210px;
  border-radius:50%;
  background:rgba(37,99,235,.08);
  pointer-events:none;
}

.afp-module-hero:not(.afp-event-hero) > *,
.afp-view > .afp-section-header:first-child:not(.afp-event-hero) > *{
  position:relative;
  z-index:1;
}

.afp-module-hero:not(.afp-event-hero) h2,
.afp-view > .afp-section-header:first-child:not(.afp-event-hero) h2{
  margin:8px 0 6px !important;
  font-size:clamp(24px,2.8vw,38px);
  line-height:1.05;
  letter-spacing:-.04em;
  color:#0f172a;
}

.afp-module-kicker{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  color:#475569;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.afp-module-tabs{
  position:sticky;
  top:12px;
  z-index:8;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(168px,1fr));
  gap:10px;
  margin:18px 0 14px;
  padding:12px;
  border:1px solid #dbe8fb;
  border-radius:24px;
  background:rgba(248,251,255,.92);
  backdrop-filter:blur(12px);
  box-shadow:0 14px 40px rgba(15,23,42,.08);
}

.afp-module-tab{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:62px;
  padding:10px 12px;
  border:1px solid #e1e9f5;
  border-radius:18px;
  background:#ffffff;
  color:#334155;
  text-align:left;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
  cursor:pointer;
}

.afp-module-tab:hover{
  transform:translateY(-1px);
  border-color:#bfdbfe;
  box-shadow:0 12px 28px rgba(15,23,42,.08);
}

.afp-module-tab.active{
  background:linear-gradient(135deg,#1d4ed8 0%,#2563eb 62%,#38bdf8 100%);
  color:#ffffff;
  border-color:#2563eb;
  box-shadow:0 18px 34px rgba(37,99,235,.26);
}

.afp-module-tab-icon{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:14px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:18px;
  font-weight:900;
}

.afp-module-tab.active .afp-module-tab-icon{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.afp-module-tab-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:1px;
}

.afp-module-tab-copy strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:13px;
  line-height:1.15;
}

.afp-module-tab-copy small{
  font-size:11px;
  font-weight:800;
  color:#64748b;
}

.afp-module-tab.active .afp-module-tab-copy small{
  color:rgba(255,255,255,.82);
}

.afp-module-tab-count{
  min-width:26px;
  height:26px;
  display:inline-grid;
  place-items:center;
  padding:0 8px;
  border-radius:999px;
  background:#e0f2fe;
  color:#075985;
  font-size:12px;
  font-weight:900;
}

.afp-module-tab.active .afp-module-tab-count{
  background:rgba(255,255,255,.2);
  color:#fff;
}

.afp-module-workbar{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
  margin:-2px 0 18px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
  color:#475569;
  font-size:13px;
  box-shadow:0 8px 20px rgba(15,23,42,.04);
}

.afp-module-workbar span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 9px;
  border-radius:999px;
  background:#f8fafc;
}

.afp-members-tabs,.afp-communication-tabs{
  margin-top:0;
}

@media (max-width:1100px){
  .afp-module-hero:not(.afp-event-hero),
  .afp-view > .afp-section-header:first-child:not(.afp-event-hero){
    flex-direction:column;
  }
  .afp-module-tabs{
    position:relative;
    top:auto;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:760px){
  .afp-module-hero:not(.afp-event-hero),
  .afp-view > .afp-section-header:first-child:not(.afp-event-hero){
    padding:18px !important;
    border-radius:22px;
  }
  .afp-module-tabs{
    display:flex;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding:10px;
    border-radius:20px;
  }
  .afp-module-tab{
    min-width:188px;
  }
}


/* v1.5.10 — organização interna e consistência operacional dos módulos */
.afp-view:not(.afp-event-detail-view){
  background:linear-gradient(180deg,#ffffff 0%,#fcfdff 42%,#f8fbff 100%);
  border-radius:28px;
}

.afp-view:not(.afp-event-detail-view) > .afp-card,
.afp-view:not(.afp-event-detail-view) > .afp-grid,
.afp-view:not(.afp-event-detail-view) > .afp-settings-grid,
.afp-view:not(.afp-event-detail-view) > .afp-toolbar,
.afp-view:not(.afp-event-detail-view) > .afp-table-wrap,
.afp-view:not(.afp-event-detail-view) > .afp-pagination{
  margin-bottom:22px;
}

.afp-view:not(.afp-event-detail-view) > .afp-card:last-child,
.afp-view:not(.afp-event-detail-view) > .afp-grid:last-child,
.afp-view:not(.afp-event-detail-view) > .afp-settings-grid:last-child,
.afp-view:not(.afp-event-detail-view) > .afp-table-wrap:last-child{
  margin-bottom:0;
}

.afp-view:not(.afp-event-detail-view) > .afp-card,
.afp-view:not(.afp-event-detail-view) .afp-settings-grid > .afp-card,
.afp-view:not(.afp-event-detail-view) .afp-grid > .afp-card{
  position:relative;
  border:1px solid #e1e9f5;
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  box-shadow:0 12px 30px rgba(15,23,42,.05);
}

.afp-view:not(.afp-event-detail-view) > .afp-card::before,
.afp-view:not(.afp-event-detail-view) .afp-settings-grid > .afp-card::before{
  content:"";
  position:absolute;
  left:0;
  top:22px;
  bottom:22px;
  width:4px;
  border-radius:999px;
  background:linear-gradient(180deg,#0ea5e9 0%,#2563eb 100%);
  opacity:.9;
}

.afp-view:not(.afp-event-detail-view) .afp-grid > .afp-card::before{
  display:none;
}

.afp-view:not(.afp-event-detail-view) > .afp-card > h3,
.afp-view:not(.afp-event-detail-view) .afp-settings-grid > .afp-card > h3{
  margin:0 0 8px 0;
  padding-bottom:12px;
  border-bottom:1px solid #e8eef7;
  font-size:18px;
  line-height:1.25;
  color:#0f172a;
}

.afp-view:not(.afp-event-detail-view) > .afp-card > .afp-muted,
.afp-view:not(.afp-event-detail-view) .afp-settings-grid > .afp-card > .afp-muted{
  display:block;
  margin:0 0 18px 0;
}

.afp-view:not(.afp-event-detail-view) .afp-grid{
  gap:18px;
}

.afp-view:not(.afp-event-detail-view) .afp-grid .afp-card{
  min-height:132px;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.afp-view:not(.afp-event-detail-view) .afp-grid .afp-card:hover{
  transform:translateY(-2px);
  border-color:#bfdbfe;
  box-shadow:0 18px 38px rgba(15,23,42,.08);
}

.afp-view:not(.afp-event-detail-view) .afp-grid .afp-card h3{
  margin:0 0 10px;
  font-size:12px;
  line-height:1.2;
  color:#475569;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.afp-view:not(.afp-event-detail-view) .afp-grid .afp-card .afp-stat{
  margin-bottom:6px;
  font-size:clamp(28px,2.5vw,36px);
  letter-spacing:-.04em;
}

.afp-view:not(.afp-event-detail-view) .afp-toolbar,
.afp-view:not(.afp-event-detail-view) .afp-inline-form,
.afp-view:not(.afp-event-detail-view) form .afp-inline-actions{
  align-items:center;
}

.afp-view:not(.afp-event-detail-view) .afp-toolbar{
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:22px;
  background:#ffffff;
  box-shadow:0 10px 26px rgba(15,23,42,.045);
}

.afp-view:not(.afp-event-detail-view) .afp-toolbar input,
.afp-view:not(.afp-event-detail-view) .afp-toolbar select,
.afp-view:not(.afp-event-detail-view) .afp-inline-form input,
.afp-view:not(.afp-event-detail-view) .afp-inline-form select,
.afp-view:not(.afp-event-detail-view) .afp-field input,
.afp-view:not(.afp-event-detail-view) .afp-field select,
.afp-view:not(.afp-event-detail-view) .afp-field textarea{
  border-color:#dbe5f3;
  background:#fbfdff;
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.afp-view:not(.afp-event-detail-view) .afp-toolbar input:focus,
.afp-view:not(.afp-event-detail-view) .afp-toolbar select:focus,
.afp-view:not(.afp-event-detail-view) .afp-inline-form input:focus,
.afp-view:not(.afp-event-detail-view) .afp-inline-form select:focus,
.afp-view:not(.afp-event-detail-view) .afp-field input:focus,
.afp-view:not(.afp-event-detail-view) .afp-field select:focus,
.afp-view:not(.afp-event-detail-view) .afp-field textarea:focus{
  outline:none;
  border-color:#93c5fd;
  background:#ffffff;
  box-shadow:0 0 0 4px rgba(59,130,246,.12);
}

.afp-view:not(.afp-event-detail-view) .afp-table-wrap{
  border:1px solid #e4edf8;
  border-radius:22px;
  box-shadow:0 12px 30px rgba(15,23,42,.05);
}

.afp-view:not(.afp-event-detail-view) .afp-table th{
  background:#f8fbff;
  color:#475569;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.afp-view:not(.afp-event-detail-view) .afp-table td{
  border-bottom-color:#edf2f8;
}

.afp-view:not(.afp-event-detail-view) .afp-table tbody tr{
  transition:background .14s ease;
}

.afp-view:not(.afp-event-detail-view) .afp-table tbody tr:hover{
  background:#f8fbff;
}

.afp-view:not(.afp-event-detail-view) .afp-card-head{
  padding-bottom:12px;
  border-bottom:1px solid #e8eef7;
}

.afp-view:not(.afp-event-detail-view) .afp-card-head h3{
  font-size:18px;
  color:#0f172a;
}

.afp-view:not(.afp-event-detail-view) .afp-tag,
.afp-view:not(.afp-event-detail-view) .afp-pill,
.afp-view:not(.afp-event-detail-view) .afp-status{
  box-shadow:0 6px 16px rgba(15,23,42,.04);
}

.afp-view:not(.afp-event-detail-view) .afp-pagination{
  padding:12px 14px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}

.afp-view:not(.afp-event-detail-view) .afp-settings-panel:not(.hidden){
  padding:14px;
  border:1px solid #dbeafe;
  border-radius:24px;
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
  box-shadow:0 12px 30px rgba(15,23,42,.05);
}

.afp-view:not(.afp-event-detail-view) .afp-settings-panel .afp-card{
  box-shadow:none;
}

.afp-view:not(.afp-event-detail-view) .afp-form-grid{
  gap:18px;
}

.afp-view:not(.afp-event-detail-view) .afp-field label{
  display:block;
  margin-bottom:7px;
  color:#334155;
  font-size:13px;
  font-weight:900;
}

.afp-module-hero .afp-inline-actions,
.afp-view > .afp-section-header:first-child .afp-inline-actions{
  align-self:flex-start;
  padding:8px;
  border:1px solid rgba(219,234,254,.85);
  border-radius:18px;
  background:rgba(255,255,255,.76);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}

.afp-expenses .afp-status,
.afp-revenues .afp-status,
.afp-ticket-status-select{
  min-width:96px;
  justify-content:center;
}

.afp-link-btn{
  border-radius:999px;
  padding:5px 8px;
}

.afp-link-btn:hover{
  background:#eff6ff;
}

.afp-link-btn.danger:hover{
  background:#fef2f2;
}

@media (max-width:900px){
  .afp-view:not(.afp-event-detail-view) .afp-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .afp-view:not(.afp-event-detail-view) .afp-toolbar input,
  .afp-view:not(.afp-event-detail-view) .afp-toolbar select,
  .afp-view:not(.afp-event-detail-view) .afp-toolbar .afp-btn{
    width:100%;
    min-width:0;
  }
  .afp-module-hero .afp-inline-actions,
  .afp-view > .afp-section-header:first-child .afp-inline-actions{
    width:100%;
    justify-content:flex-start;
  }
}


/* v1.5.10 — listagens primeiro, formulários por botão */
.afp-form-opener{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:14px 0 18px;
  padding:16px 18px;
  border:1px solid #dbe8fb;
  border-radius:22px;
  background:
    radial-gradient(circle at 0% 0%,rgba(37,99,235,.08),transparent 32%),
    linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}

.afp-form-opener strong{
  display:block;
  margin-bottom:4px;
  color:#0f172a;
  font-size:15px;
}

.afp-form-opener span{
  display:block;
  color:#64748b;
  font-size:13px;
}

.afp-form-opener-hidden,
.afp-form-card-hidden{
  display:none !important;
}

.afp-form-card{
  border:1px solid #dbe8fb !important;
  border-radius:24px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
  box-shadow:0 16px 38px rgba(15,23,42,.07) !important;
}

.afp-form-card-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:-4px 0 16px;
  padding:12px 14px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#f8fbff;
}

.afp-form-card-toolbar strong{
  display:block;
  color:#0f172a;
  font-size:15px;
}

.afp-form-card-toolbar span{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:12px;
}

.afp-form-card form{
  margin-top:0;
}

@media (max-width:760px){
  .afp-form-opener,
  .afp-form-card-toolbar{
    align-items:stretch;
    flex-direction:column;
  }
  .afp-form-opener .afp-btn,
  .afp-form-card-toolbar .afp-btn{
    width:100%;
  }
}


/* v1.5.11 — botões de criação concentrados no topo */
.afp-page-create-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:0 0 18px;
  padding:14px 16px;
  border:1px solid #dbe8fb;
  border-radius:22px;
  background:
    radial-gradient(circle at 0% 0%,rgba(37,99,235,.08),transparent 32%),
    linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}

.afp-page-create-actions-empty{
  display:none !important;
}

.afp-page-create-actions-copy{
  min-width:220px;
}

.afp-page-create-actions-copy strong{
  display:block;
  margin-bottom:3px;
  color:#0f172a;
  font-size:15px;
}

.afp-page-create-actions-copy span{
  display:block;
  color:#64748b;
  font-size:13px;
}

.afp-page-create-actions-buttons{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
}

.afp-page-create-btn{
  white-space:nowrap;
}

.afp-page-create-btn-hidden{
  display:none !important;
}

.afp-form-opener{
  display:none !important;
}

@media (max-width:760px){
  .afp-page-create-actions{
    align-items:stretch;
    flex-direction:column;
  }
  .afp-page-create-actions-buttons{
    justify-content:flex-start;
  }
  .afp-page-create-btn{
    width:100%;
  }
}


/* v1.5.13 — Sócios + Quotas: listagens primeiro e ficha do sócio mais operacional */
.afp-members-actions-card{
  margin-bottom:16px;
  border:1px solid #dbeafe;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.afp-members-actions-card .afp-card-head{
  align-items:center;
}

.afp-members-top-actions{
  justify-content:flex-end;
}

.afp-row-actions{
  min-width:180px;
}

.afp-form-drawer{
  margin-top:16px;
  border:1px solid #bfdbfe !important;
  background:linear-gradient(180deg,#f8fbff 0%,#ffffff 100%);
  box-shadow:0 18px 42px rgba(37,99,235,.10);
}

.afp-form-drawer::before{
  background:linear-gradient(180deg,#38bdf8 0%,#2563eb 100%) !important;
}

.afp-member-detail-hero{
  border:1px solid #dbeafe;
  background:radial-gradient(circle at 8% 0%,rgba(37,99,235,.10),transparent 30%),linear-gradient(135deg,#ffffff 0%,#f8fbff 70%,#eef6ff 100%);
}

.afp-member-detail-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
}

.afp-member-number-badge{
  display:inline-flex;
  align-items:center;
  padding:7px 11px;
  border-radius:999px;
  background:#dbeafe;
  color:#1e40af;
  font-size:12px;
  font-weight:900;
}

.afp-member-detail-hero h3{
  margin:10px 0 4px;
  font-size:clamp(24px,2.2vw,34px);
  letter-spacing:-.035em;
}

.afp-member-detail-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(160px,1fr));
  gap:10px;
}

.afp-member-detail-grid div,
.afp-member-detail-address,
.afp-member-detail-notes{
  padding:12px;
  border:1px solid #e0e7ff;
  border-radius:16px;
  background:rgba(255,255,255,.78);
}

.afp-member-detail-grid span,
.afp-member-detail-address span{
  display:block;
  margin-bottom:5px;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}

.afp-member-detail-address,
.afp-member-detail-notes{
  margin-top:10px;
}

.afp-members-filter-summary{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.afp-members-filter-summary span{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

@media (max-width:900px){
  .afp-members-actions-card .afp-card-head,
  .afp-member-detail-head{
    flex-direction:column;
  }
  .afp-members-top-actions{
    width:100%;
    justify-content:flex-start;
  }
  .afp-member-detail-grid{
    grid-template-columns:1fr;
  }
}

/* v1.5.15 — Portal do Sócio: mensagens e inscrições */
.afp-portal-messages-table,
.afp-portal-registrations-table{
  min-width:1120px;
}
.afp-portal-messages-card,
.afp-portal-registrations-card{
  margin-top:22px;
}
.afp-portal-messages-table td:nth-child(3),
.afp-portal-registrations-table td:nth-child(5){
  max-width:320px;
  white-space:normal;
}


/* v1.5.21 — ecrã de login AssociaPlus */
.afp-login-screen{
  background:
    radial-gradient(circle at 18% 12%, rgba(37,99,235,.18), transparent 32%),
    radial-gradient(circle at 82% 8%, rgba(14,165,233,.14), transparent 30%),
    linear-gradient(135deg,#eef5ff 0%,#f8fbff 46%,#eef3fb 100%);
}

.afp-login-wrap-branded{
  max-width:540px;
  padding:34px;
  border:1px solid #dbeafe;
  box-shadow:0 24px 70px rgba(15,23,42,.14);
}

.afp-login-brand{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:26px;
}

.afp-login-logo,
.afp-login-logo-fallback{
  width:76px;
  height:76px;
  flex:0 0 76px;
  border-radius:24px;
  box-shadow:0 16px 32px rgba(37,99,235,.18);
}

.afp-login-logo{
  object-fit:cover;
  background:#eff6ff;
}

.afp-login-logo-fallback{
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#1d4ed8,#38bdf8);
  color:#fff;
  font-weight:900;
  font-size:26px;
}

.afp-login-brand h2{
  margin:0 0 8px !important;
  font-size:clamp(25px,3vw,34px) !important;
  line-height:1.05;
  letter-spacing:-.04em;
  color:#0f172a;
}

.afp-login-brand .afp-muted{
  margin:0;
  font-size:15px;
  line-height:1.45;
  color:#475569;
}

.afp-login-submit{
  width:100%;
  margin-top:4px;
  padding:14px 18px;
}

@media (max-width:620px){
  .afp-login-wrap-branded{padding:24px;}
  .afp-login-brand{align-items:flex-start;flex-direction:column;gap:14px;}
  .afp-login-logo,.afp-login-logo-fallback{width:68px;height:68px;flex-basis:68px;border-radius:22px;}
}


/* v1.5.23 — logotipo oficial AssociaPlus em todos os logins */
.afp-login-wrap-branded{
  max-width:620px;
}
.afp-login-brand{
  flex-direction:column;
  text-align:center;
  gap:14px;
}
.afp-login-logo{
  width:min(360px,86%);
  height:auto;
  max-height:260px;
  flex:0 0 auto;
  border-radius:0;
  object-fit:contain;
  background:transparent;
  box-shadow:none;
}
.afp-login-logo-fallback{
  width:92px;
  height:92px;
  flex-basis:92px;
}
.afp-login-brand h2{
  font-size:clamp(27px,3.4vw,38px) !important;
}
.afp-login-brand .afp-muted{
  max-width:430px;
  margin:0 auto;
}
@media (max-width:620px){
  .afp-login-logo{width:min(300px,92%);max-height:220px;}
}


/* v1.5.24 — recuperação de password no login principal */
.afp-login-link-btn{
  display:block;
  width:100%;
  margin:12px 0 0;
  padding:10px 12px;
  border:0;
  background:transparent;
  color:#1d4ed8;
  font-weight:900;
  text-align:center;
  cursor:pointer;
}
.afp-login-link-btn:hover{
  color:#0f172a;
  text-decoration:underline;
}
.afp-login-message{
  margin-top:14px;
}
.afp-alert.success{
  background:#ecfdf5;
  color:#166534;
  border:1px solid #bbf7d0;
}


/* v1.5.26 — slug da página da aplicação atualizado para associaplus */
body.page-slug-associaplus{
  background:#f4f7fb;
}
body.page-slug-associaplus #page,
body.page-slug-associaplus .site,
body.page-slug-associaplus .site-content,
body.page-slug-associaplus .content-area,
body.page-slug-associaplus .entry-content,
body.page-slug-associaplus .wp-block-post-content{
  max-width:none !important;
  width:100% !important;
  padding-left:0 !important;
  padding-right:0 !important;
}


/* v1.5.29 — Relatórios: larguras de colunas e títulos de tabelas */
.afp-reports-advanced-view .afp-table-wrap{
  overflow:hidden;
}

.afp-report-table-card,
.afp-reports-advanced-view .afp-balancete-screen{
  border:1px solid #dbe8fb;
  border-radius:24px;
  background:#fff;
  box-shadow:0 14px 36px rgba(15,23,42,.06);
}

.afp-report-table-title,
.afp-balancete-head.afp-report-table-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  border-bottom:1px solid #e2eaf6;
  background:
    radial-gradient(circle at 0% 0%,rgba(37,99,235,.10),transparent 36%),
    linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
}

.afp-report-table-title h3,
.afp-balancete-head.afp-report-table-title h3{
  margin:4px 0 0;
  color:#0f172a;
  font-size:18px;
  line-height:1.15;
  letter-spacing:-.03em;
}

.afp-report-table-kicker{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:5px 9px;
  border-radius:999px;
  background:#dbeafe;
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.afp-report-table-title > strong{
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  margin-top:2px;
  padding:7px 10px;
  border-radius:999px;
  background:#eef6ff;
  color:#1e3a8a;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}

.afp-report-table{
  table-layout:fixed;
  width:100%;
}

.afp-report-table th,
.afp-report-table td{
  overflow:hidden;
  text-overflow:ellipsis;
}

.afp-report-table-2col th:nth-child(1),
.afp-report-table-2col td:nth-child(1){width:68%;}
.afp-report-table-2col th:nth-child(2),
.afp-report-table-2col td:nth-child(2){width:32%;text-align:right;white-space:nowrap;}

.afp-report-table-3col th:nth-child(1),
.afp-report-table-3col td:nth-child(1){width:56%;}
.afp-report-table-3col th:nth-child(2),
.afp-report-table-3col td:nth-child(2){width:28%;text-align:right;white-space:nowrap;}
.afp-report-table-3col th:nth-child(3),
.afp-report-table-3col td:nth-child(3){width:16%;text-align:right;white-space:nowrap;}

.afp-report-table-monthly th:nth-child(1),
.afp-report-table-monthly td:nth-child(1){width:30%;}
.afp-report-table-monthly th:nth-child(2),
.afp-report-table-monthly td:nth-child(2),
.afp-report-table-monthly th:nth-child(3),
.afp-report-table-monthly td:nth-child(3),
.afp-report-table-monthly th:nth-child(4),
.afp-report-table-monthly td:nth-child(4){width:23.33%;text-align:right;white-space:nowrap;}

.afp-report-table-matrix{
  min-width:1460px;
  table-layout:fixed;
}

.afp-report-table-matrix th:first-child,
.afp-report-table-matrix td:first-child{
  position:sticky;
  left:0;
  z-index:2;
  width:240px;
  min-width:240px;
  max-width:240px;
  background:#fff;
  box-shadow:8px 0 16px rgba(15,23,42,.04);
}

.afp-report-table-matrix thead th:first-child{
  z-index:3;
  background:#f4f8fe;
}

.afp-report-table-matrix th:not(:first-child),
.afp-report-table-matrix td:not(:first-child){
  width:86px;
  min-width:86px;
  max-width:86px;
  text-align:right;
  white-space:nowrap;
}

.afp-report-table-matrix th:nth-last-child(2),
.afp-report-table-matrix td:nth-last-child(2){
  width:116px;
  min-width:116px;
  max-width:116px;
}

.afp-report-table-matrix th:last-child,
.afp-report-table-matrix td:last-child{
  width:70px;
  min-width:70px;
  max-width:70px;
}

.afp-reports-advanced-view .afp-table thead th{
  padding-top:13px;
  padding-bottom:13px;
  color:#334155;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.045em;
}

.afp-reports-advanced-view .afp-table tbody td{
  color:#334155;
}

.afp-reports-advanced-view .afp-table tbody td:first-child{
  color:#0f172a;
  font-weight:800;
}

.afp-reports-advanced-view .afp-table-scroll{
  overflow:auto;
  padding:0;
}

@media (max-width:900px){
  .afp-report-table-title,
  .afp-balancete-head.afp-report-table-title{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }
  .afp-report-table-title > strong{
    white-space:normal;
  }
  .afp-report-table-card{
    overflow:auto;
  }
  .afp-report-table-2col,
  .afp-report-table-3col,
  .afp-report-table-monthly{
    min-width:620px;
  }
}


/* v1.5.30 — Relatórios: colunas compactas e ajustadas ao conteúdo */
.afp-reports-advanced-view .afp-report-table-card,
.afp-reports-advanced-view .afp-balancete-screen{
  overflow:hidden;
}

.afp-reports-advanced-view .afp-table-wrap{
  overflow:auto;
}

.afp-reports-advanced-view .afp-report-table{
  table-layout:auto !important;
  width:auto !important;
  max-width:100% !important;
  border-collapse:separate;
  border-spacing:0;
}

.afp-reports-advanced-view .afp-report-table th,
.afp-reports-advanced-view .afp-report-table td{
  width:auto !important;
  max-width:none !important;
  padding-left:12px !important;
  padding-right:12px !important;
  overflow:visible !important;
  text-overflow:clip !important;
  vertical-align:middle;
}

.afp-reports-advanced-view .afp-report-table th:first-child,
.afp-reports-advanced-view .afp-report-table td:first-child{
  min-width:150px;
  max-width:260px !important;
  white-space:nowrap;
}

.afp-reports-advanced-view .afp-report-table-2col th:nth-child(2),
.afp-reports-advanced-view .afp-report-table-2col td:nth-child(2),
.afp-reports-advanced-view .afp-report-table-3col th:nth-child(2),
.afp-reports-advanced-view .afp-report-table-3col td:nth-child(2),
.afp-reports-advanced-view .afp-report-table-3col th:nth-child(3),
.afp-reports-advanced-view .afp-report-table-3col td:nth-child(3),
.afp-reports-advanced-view .afp-report-table-monthly th:not(:first-child),
.afp-reports-advanced-view .afp-report-table-monthly td:not(:first-child){
  min-width:92px;
  text-align:right;
  white-space:nowrap;
}

.afp-reports-advanced-view .afp-report-table-monthly th:first-child,
.afp-reports-advanced-view .afp-report-table-monthly td:first-child{
  min-width:96px;
  max-width:120px !important;
}

.afp-reports-advanced-view .afp-report-table-card .afp-report-table{
  margin:0;
}

.afp-reports-advanced-view .afp-report-table-card-2col .afp-report-table{
  min-width:320px;
}

.afp-reports-advanced-view .afp-report-table-card-3col .afp-report-table{
  min-width:430px;
}

.afp-reports-advanced-view .afp-report-monthly-screen .afp-report-table{
  min-width:460px;
}

.afp-report-table-matrix{
  min-width:1040px !important;
  width:max-content !important;
  table-layout:fixed !important;
}

.afp-report-table-matrix th,
.afp-report-table-matrix td{
  padding-left:9px !important;
  padding-right:9px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.afp-report-table-matrix th:first-child,
.afp-report-table-matrix td:first-child{
  width:190px !important;
  min-width:190px !important;
  max-width:190px !important;
}

.afp-report-table-matrix th:not(:first-child),
.afp-report-table-matrix td:not(:first-child){
  width:64px !important;
  min-width:64px !important;
  max-width:64px !important;
}

.afp-report-table-matrix th:nth-last-child(2),
.afp-report-table-matrix td:nth-last-child(2){
  width:92px !important;
  min-width:92px !important;
  max-width:92px !important;
}

.afp-report-table-matrix th:last-child,
.afp-report-table-matrix td:last-child{
  width:56px !important;
  min-width:56px !important;
  max-width:56px !important;
}

@media (min-width:901px){
  .afp-reports-advanced-view .afp-report-grid .afp-report-table-card{
    align-self:start;
  }
}

@media (max-width:900px){
  .afp-reports-advanced-view .afp-report-table{
    min-width:max-content !important;
  }
  .afp-reports-advanced-view .afp-report-table th:first-child,
  .afp-reports-advanced-view .afp-report-table td:first-child{
    max-width:220px !important;
  }
}


/* v1.5.31 — Relatórios: tabelas ajustadas à largura da secção */
.afp-reports-advanced-view .afp-report-table-card,
.afp-reports-advanced-view .afp-balancete-screen{
  width:100% !important;
  max-width:100% !important;
  overflow:hidden !important;
}

.afp-reports-advanced-view .afp-report-table-card > table.afp-report-table,
.afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table{
  width:100% !important;
  min-width:0 !important;
  max-width:100% !important;
  table-layout:fixed !important;
}

.afp-reports-advanced-view .afp-report-table-card > table.afp-report-table th,
.afp-reports-advanced-view .afp-report-table-card > table.afp-report-table td,
.afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table th,
.afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table td{
  box-sizing:border-box !important;
  min-width:0 !important;
  max-width:none !important;
  padding:11px 12px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  vertical-align:middle !important;
}

.afp-reports-advanced-view .afp-report-table-card > table.afp-report-table th:first-child,
.afp-reports-advanced-view .afp-report-table-card > table.afp-report-table td:first-child,
.afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table th:first-child,
.afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table td:first-child{
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}

.afp-reports-advanced-view .afp-report-table-card > table.afp-report-table th:not(:first-child),
.afp-reports-advanced-view .afp-report-table-card > table.afp-report-table td:not(:first-child),
.afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table th:not(:first-child),
.afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table td:not(:first-child){
  text-align:right !important;
  white-space:nowrap !important;
}

/* Tabelas simples: ocupam o cartão inteiro com proporções fixas */
.afp-reports-advanced-view .afp-report-table-2col th:nth-child(1),
.afp-reports-advanced-view .afp-report-table-2col td:nth-child(1){width:72% !important;}
.afp-reports-advanced-view .afp-report-table-2col th:nth-child(2),
.afp-reports-advanced-view .afp-report-table-2col td:nth-child(2){width:28% !important;}

.afp-reports-advanced-view .afp-report-table-3col th:nth-child(1),
.afp-reports-advanced-view .afp-report-table-3col td:nth-child(1){width:58% !important;}
.afp-reports-advanced-view .afp-report-table-3col th:nth-child(2),
.afp-reports-advanced-view .afp-report-table-3col td:nth-child(2){width:27% !important;}
.afp-reports-advanced-view .afp-report-table-3col th:nth-child(3),
.afp-reports-advanced-view .afp-report-table-3col td:nth-child(3){width:15% !important;}

.afp-reports-advanced-view .afp-report-table-monthly th:nth-child(1),
.afp-reports-advanced-view .afp-report-table-monthly td:nth-child(1){width:24% !important;}
.afp-reports-advanced-view .afp-report-table-monthly th:nth-child(2),
.afp-reports-advanced-view .afp-report-table-monthly td:nth-child(2),
.afp-reports-advanced-view .afp-report-table-monthly th:nth-child(3),
.afp-reports-advanced-view .afp-report-table-monthly td:nth-child(3),
.afp-reports-advanced-view .afp-report-table-monthly th:nth-child(4),
.afp-reports-advanced-view .afp-report-table-monthly td:nth-child(4){width:25.333% !important;}

/* Balancetes anuais: dentro da secção, com scroll interno apenas quando necessário */
.afp-reports-advanced-view .afp-report-matrix-card .afp-table-scroll{
  width:100% !important;
  max-width:100% !important;
  overflow-x:auto !important;
  overflow-y:hidden !important;
}

.afp-reports-advanced-view .afp-report-table-matrix{
  width:100% !important;
  min-width:1080px !important;
  table-layout:fixed !important;
}

.afp-reports-advanced-view .afp-report-table-matrix th,
.afp-reports-advanced-view .afp-report-table-matrix td{
  box-sizing:border-box !important;
  padding:10px 8px !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.afp-reports-advanced-view .afp-report-table-matrix th:first-child,
.afp-reports-advanced-view .afp-report-table-matrix td:first-child{
  width:18% !important;
  min-width:180px !important;
  max-width:220px !important;
  white-space:normal !important;
  overflow-wrap:anywhere !important;
}

.afp-reports-advanced-view .afp-report-table-matrix th:not(:first-child),
.afp-reports-advanced-view .afp-report-table-matrix td:not(:first-child){
  width:auto !important;
  min-width:58px !important;
  max-width:none !important;
  text-align:right !important;
  white-space:nowrap !important;
}

.afp-reports-advanced-view .afp-report-table-matrix th:nth-last-child(2),
.afp-reports-advanced-view .afp-report-table-matrix td:nth-last-child(2){
  min-width:86px !important;
}

.afp-reports-advanced-view .afp-report-table-matrix th:last-child,
.afp-reports-advanced-view .afp-report-table-matrix td:last-child{
  min-width:56px !important;
}

@media (max-width:900px){
  .afp-reports-advanced-view .afp-report-table-card,
  .afp-reports-advanced-view .afp-report-monthly-screen{
    overflow:auto !important;
  }
  .afp-reports-advanced-view .afp-report-table-card > table.afp-report-table,
  .afp-reports-advanced-view .afp-report-monthly-screen > table.afp-report-table{
    min-width:560px !important;
  }
}


/* v1.5.32 — SMTP por associação */
.afp-smtp-section-title{
  margin-top:10px;
  padding:14px 16px;
  border:1px solid #dbeafe;
  border-radius:18px;
  background:linear-gradient(135deg,#f8fbff 0%,#eef6ff 100%);
}
.afp-smtp-section-title strong{display:block;color:#0f172a;font-size:15px;margin-bottom:4px;}
