/* =========================================================
   Athos UI — layout, cards, filtros, paginação, modal, chat
   ========================================================= */

:root{
  --athos-teal:#2F8F83;
  --deep-forest:#0D4A3C;
  --mist:#F3F4F6;
  --night:#1A1A2E;
  --text:#111827;
  --muted:#4B5563;
  --border:#E5E7EB;
  --surface:#FFFFFF;
  --surface-soft:#F8FAFC;
  --surface-strong:#F1F5F9;
  --overlay:rgba(17,24,39,0.55);
  --hero-text:#FFFFFF;
  --status-warning:#92400E;
  --status-info:#1E3A8A;
  --danger:#B91C1C;
  --success:#0F766E;
  --shadow:0 6px 16px rgba(17,24,39,0.08);
  --radius:14px;
  --app-sidebar-width:clamp(220px, 18vw, 280px);
  --app-sidebar-collapsed:clamp(78px, 6vw, 92px);
  --page-max-width:1680px;
  --content-gutter:clamp(8px, 2vw, 18px);
  --section-gap:clamp(12px, 2vw, 22px);
  --surface-pad:clamp(14px, 2vw, 18px);

  /* Chat */
  --chat-bg-user:#2B7D72;
  --chat-bg-bot:#F3F8F7;
}

:root[data-theme='dark']{
  --mist:#0B1220;
  --night:#E5EDF7;
  --text:#E5EDF7;
  --muted:#9DB0C8;
  --border:rgba(148,163,184,0.28);
  --surface:#111C2F;
  --surface-soft:#162238;
  --surface-strong:#1D2A40;
  --overlay:rgba(2,6,23,0.72);
  --hero-text:#F8FAFC;
  --status-warning:#FBBF24;
  --status-info:#93C5FD;
  --danger:#F87171;
  --success:#2DD4BF;
  --chat-bg-user:#2A7B70;
  --chat-bg-bot:#1A2A3F;
  --shadow:0 12px 28px rgba(2,6,23,0.45);
}

*{box-sizing:border-box;}

html,body{height:100%;}

body{
  margin:0;
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--mist);
  color:var(--text);
}

body.app-loading{
  overflow:hidden;
}

body.app-loading .app{
  visibility:hidden;
}

body.app-loading::before{
  content:'';
  position:fixed;
  inset:0;
  background:var(--mist);
  z-index:20000;
}

body.app-loading::after{
  content:'';
  position:fixed;
  left:50%;
  top:50%;
  width:42px;
  height:42px;
  margin-left:-21px;
  margin-top:-21px;
  border:4px solid rgba(17,24,39,0.14);
  border-top-color:rgba(47,143,131,0.95);
  border-radius:50%;
  animation:spin 0.9s linear infinite;
  z-index:20001;
}

a{color:inherit;}

img, video, canvas, iframe{
  max-width:100%;
  height:auto;
}

svg{
  max-width:100%;
}

input, select, textarea, button{
  font:inherit;
}

html{
  scrollbar-gutter:stable both-edges;
  -webkit-text-size-adjust:100%;
}

body{
  overflow-x:hidden;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

img{
  -webkit-user-drag:none;
}

a, button, summary, [role="button"], .nav-item, .profile-nav-item, .sidebar-user, .sidebar-logo, .profile-avatar, .profile-name, .profile-email{
  -webkit-tap-highlight-color:transparent;
}

.sidebar-logo,
.avatar,
.profile-avatar,
.nav-item,
.profile-nav-item,
.icon-btn,
.btn,
.help-support-btn,
.sort-chip,
.sort-direction-btn,
.page-btn,
.attachments-summary,
.card-icon-btn,
.user-menu a,
.user-dropdown a,
.user-dropdown button{
  user-select:none;
  -webkit-user-select:none;
}

a, button, summary, [role="button"]{
  touch-action:manipulation;
}

:focus-visible{
  outline:3px solid rgba(47,143,131,0.28);
  outline-offset:2px;
}

:focus:not(:focus-visible){
  outline:none;
}

/* ===========================
   APP SHELL
   ========================== */

.app{
  display:flex;
  min-height:100vh;
  width:100%;
  overflow-x:hidden;
}

.app-sidebar{
  flex:0 0 var(--app-sidebar-width);
  width:var(--app-sidebar-width);
  background:var(--surface);
  border-right:1px solid var(--border);
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:14px;
  position:sticky;
  top:0;
  height:100dvh;
  min-width:0;
}


.sidebar-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.sidebar-logo{
  width:120px;
  max-width:100%;
  height:auto;
}

.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.nav-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  font-weight:700;
  color:var(--muted);
}

.nav-item i{width:18px; text-align:center;}

.nav-item:hover{
  background:rgba(47,143,131,0.10);
  color:var(--athos-teal);
}

.nav-item.active{
  background:rgba(47,143,131,0.14);
  color:var(--athos-teal);
}

.sidebar-user{
  margin-top:auto;
  padding-top:12px;
  border-top:1px solid var(--border);
  display:flex;
  gap:10px;
  align-items:center;
}

.avatar{
  width:38px;
  height:38px;
  border-radius:999px;
  background:var(--athos-teal);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  letter-spacing:0.5px;
}

.user-meta{min-width:0;}
.user-name{font-weight:800; font-size:12px; color:var(--night); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.user-email{font-size:11px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.app-sidebar.collapsed{width:var(--app-sidebar-collapsed); flex-basis:var(--app-sidebar-collapsed);}
.app-sidebar.collapsed .sidebar-logo{display:none;}
.app-sidebar.collapsed .nav-text{display:none;}
.app-sidebar.collapsed .sidebar-user .user-meta{display:none;}

/* ===========================
   TOPBAR
   ========================== */

.app-main{flex:1; min-width:0; display:flex; flex-direction:column;}

.topbar{
  background:var(--surface);
  border-bottom:1px solid var(--border);
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  position:sticky;
  top:0;
  z-index:50;
}

.topbar-mobile-brand{
  display:none;
  align-items:center;
  gap:10px;
  min-width:0;
}

.topbar-mobile-logo{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
  object-fit:cover;
  flex-shrink:0;
}

.topbar-mobile-title{
  font-size:14px;
  font-weight:900;
  color:var(--night);
  letter-spacing:0.01em;
}

.search-wrapper{
  flex:1;
  max-width:560px;
  position:relative;
}

.search-wrapper i{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:#9CA3AF;
}

.search-wrapper input{
  width:100%;
  padding:10px 12px 10px 36px;
  border:1px solid var(--border);
  border-radius:12px;
  outline:none;
  background:#fff;
}

.search-wrapper input:focus{
  border-color:rgba(47,143,131,0.7);
  box-shadow:0 0 0 3px rgba(47,143,131,0.18);
}

.topbar-actions{display:flex; align-items:center; gap:10px;}

/* Desktop: centraliza melhor a barra de pesquisa na topbar */
@media (min-width: 981px){
  .topbar{
    display:grid;
    grid-template-columns: 1fr minmax(380px, 620px) 1fr;
    align-items:center;
  }

  .search-wrapper{
    grid-column:2;
    width:100%;
    max-width:none;
  }

  .topbar-actions{
    grid-column:3;
    justify-self:end;
  }
}

@media (min-width: 1440px){
  .page-grid{grid-template-columns:minmax(300px, 380px) minmax(0, 1fr);}
  .cards-grid{grid-template-columns:repeat(auto-fit, minmax(min(360px, 100%), 1fr));}
  .help-grid{grid-template-columns:minmax(0, 1fr) minmax(320px, 360px);}
}

.icon-btn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  position:relative;
}

.icon-btn:hover{border-color:rgba(47,143,131,0.55); color:var(--athos-teal);}

.icon-btn.is-active{
  border-color:rgba(47,143,131,0.55);
  background:rgba(47,143,131,0.10);
  color:var(--athos-teal);
}

#savedToggleBtn{
  color:var(--text);
}

.badge{
  position:absolute;
  top:6px;
  right:6px;
  background:#EF4444;
  color:#fff;
  font-size:10px;
  padding:2px 6px;
  border-radius:999px;
  line-height:1;
}

.user-menu{position:relative;}

.user-dropdown{
  position:absolute;
  top:44px;
  right:0;
  width:190px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow:var(--shadow);
  padding:8px;
  display:none;
  z-index:60;
}

.user-dropdown a,
.user-dropdown button{
  display:flex;
  width:100%;
  padding:10px 10px;
  border-radius:10px;
  text-decoration:none;
  border:none;
  background:transparent;
  color:var(--night);
  font-weight:700;
  cursor:pointer;
  text-align:left;
}

.user-dropdown a:hover,
.user-dropdown button:hover{background:rgba(47,143,131,0.10); color:var(--athos-teal);}

.user-menu.open .user-dropdown{display:block;}

/* ===========================
   CONTENT GRID
   ========================== */

.content{padding:var(--content-gutter); width:100%; max-width:var(--page-max-width); margin-inline:auto;}

.page-grid{
  display:grid;
  grid-template-columns:minmax(260px, 340px) minmax(0, 1fr);
  gap:var(--section-gap);
  align-items:start;
}

/* ===========================
   FILTERS PANEL
   ========================== */

.filters-panel{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:14px;
  box-shadow:var(--shadow);
  position:sticky;
  top:78px;
  max-height:calc(100vh - 110px);
  overflow:auto;
}

.filters-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.filters-header h2{margin:0; font-size:16px; font-weight:900; color:var(--night);}

.filters-close{display:none;}

.filter-group{border-top:1px solid var(--border); padding-top:12px; margin-top:12px;}
.filter-group:first-of-type{border-top:none; padding-top:0; margin-top:0;}

.filter-group-title{
  display:flex;
  gap:8px;
  align-items:center;
  font-size:13px;
  font-weight:900;
  color:var(--night);
  margin-bottom:8px;
}

.filter-search{
  width:100%;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:12px;
  outline:none;
  font-size:13px;
  margin-bottom:10px;
}

.filter-options{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:230px;
  overflow:auto;
  padding-right:6px;
}

.filter-options::-webkit-scrollbar{width:8px;}
.filter-options::-webkit-scrollbar-thumb{background:rgba(17,24,39,0.10); border-radius:999px;}

.filter-options label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  border:1px solid transparent;
}

.filter-options label:hover{background:#F9FAFB; border-color:var(--border);}

.filter-options .label-left{display:flex; align-items:center; gap:8px; min-width:0;}

.filter-options input{accent-color:var(--athos-teal);}

.filter-options .filter-count{font-size:12px; color:#9CA3AF; font-weight:800;}

.filter-actions{
  display:flex;
  gap:10px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--border);
  position:sticky;
  bottom:0;
  background:#fff;
}

.btn{
  padding:10px 12px;
  border-radius:12px;
  font-weight:900;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
}

.btn-primary{background:var(--athos-teal); color:#fff; border-color:var(--athos-teal);}
.btn-primary:hover{filter:brightness(0.95);}

.btn-secondary{border-color:rgba(47,143,131,0.55); color:var(--athos-teal);}
.btn-secondary:hover{background:rgba(47,143,131,0.08);}

/* ===========================
   HERO + TOOLBAR
   ========================== */

.hero-banner{
  background:var(--athos-teal);
  color:#fff;
  border-radius:var(--radius);
  padding:16px 18px;
  box-shadow:var(--shadow);
}

.hero-banner h1{margin:0 0 6px 0; font-size:14px; font-weight:900;}
.hero-banner p{margin:0; font-size:12px; opacity:0.92;}

.hero-stats{display:flex; flex-wrap:wrap; gap:18px; margin-top:12px;}
.hero-stat{display:flex; flex-direction:column; gap:2px;}
.hero-stat .value{font-size:18px; font-weight:900;}
.hero-stat .label{font-size:11px; opacity:0.88;}

.results-toolbar{
  margin-top:14px;
  margin-bottom:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.results-meta{font-size:12px; color:var(--muted);}

.results-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
}

.sort-wrapper{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  padding:8px;
  border:1px solid var(--border);
  border-radius:16px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:0 10px 24px rgba(15,23,42,0.06);
}

.sort-label{
  font-size:11px;
  font-weight:900;
  color:#6B7280;
  text-transform:uppercase;
  letter-spacing:0.06em;
  padding:0 2px 0 4px;
}

.sort-chips{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}

.sort-chip{
  border:1px solid #D1D5DB;
  border-radius:999px;
  background:#fff;
  color:#374151;
  font-size:12px;
  font-weight:900;
  padding:8px 12px;
  cursor:pointer;
  transition:all .16s ease;
}

.sort-chip:hover{
  border-color:rgba(47,143,131,0.55);
  color:var(--athos-teal);
  transform:translateY(-1px);
}

.sort-chip.is-active{
  background:linear-gradient(135deg, rgba(47,143,131,0.14), rgba(13,74,60,0.08));
  border-color:rgba(47,143,131,0.7);
  color:var(--deep-forest);
  box-shadow:0 4px 12px rgba(13,74,60,0.14);
}

.sort-direction-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid rgba(47,143,131,0.38);
  border-radius:999px;
  background:#fff;
  color:var(--athos-teal);
  font-size:12px;
  font-weight:900;
  padding:8px 12px;
  cursor:pointer;
  transition:all .16s ease;
}

.sort-direction-btn:hover{
  background:rgba(47,143,131,0.08);
  border-color:rgba(47,143,131,0.7);
}

.sort-direction-btn.is-desc{
  background:rgba(17,24,39,0.06);
  border-color:rgba(17,24,39,0.28);
  color:#111827;
}

/* ===========================
   CARDS
   ========================== */

.cards-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap:14px;
}

.edital-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  min-height:300px;
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.edital-card:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(17,24,39,0.10);
  border-color:rgba(47,143,131,0.35);
}

.card-top{display:flex; align-items:flex-start; justify-content:space-between; gap:12px;}

.card-brand{display:flex; gap:10px; align-items:flex-start; min-width:0; flex:1;}

.card-logo{
  width:36px;
  height:36px;
  border-radius:12px;
  background:#F9FAFB;
  border:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  flex-shrink:0;
}

.card-logo img{max-width:100%; max-height:100%; object-fit:contain;}

.card-org{font-size:11px; font-weight:900; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:160px;}

.card-top-right{
  display:flex;
  align-items:flex-start;
  gap:8px;
  margin-left:auto;
  flex-shrink:0;
}

.card-status-list{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
  max-width:210px;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:4px 9px;
  font-size:10px;
  font-weight:1000;
  line-height:1.2;
  letter-spacing:0.01em;
  white-space:nowrap;
  border:1px solid transparent;
}

.status-chip--open{
  background:rgba(22,163,74,0.14);
  color:#166534;
  border-color:rgba(22,163,74,0.35);
}

.status-chip--highlight{
  background:rgba(245,158,11,0.18);
  color:#92400E;
  border-color:rgba(245,158,11,0.42);
}

.status-chip--recommendation{
  background:rgba(47,143,131,0.14);
  color:#0F766E;
  border-color:rgba(47,143,131,0.38);
}

.status-chip--recommendation-muted{
  background:rgba(99,102,241,0.10);
  color:#4338CA;
  border-color:rgba(99,102,241,0.24);
}

.status-chip--closed{
  background:rgba(220,38,38,0.14);
  color:#991B1B;
  border-color:rgba(220,38,38,0.35);
}

.status-chip--deadline{
  background:var(--status-chip-bg, rgba(22,163,74,0.14));
  color:var(--status-chip-text, #166534);
  border-color:var(--status-chip-border, rgba(22,163,74,0.35));
}

.card-actions{display:flex; align-items:center; gap:10px;}

.card-icon-btn{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  color:#9CA3AF;
}

.card-icon-btn:hover{color:var(--athos-teal); border-color:rgba(47,143,131,0.55);}

.card-icon-btn.is-saved{
  color:#F59E0B;
  border-color:rgba(245,158,11,0.45);
  background:rgba(245,158,11,0.06);
}
.card-icon-btn.is-saved:hover{
  border-color:rgba(245,158,11,0.70);
}

.card-title{
  margin:12px 0 10px;
  font-size:15px;
  font-weight:1000;
  color:var(--night);
  line-height:1.3;
}

.card-desc{
  margin:0;
  font-size:12.5px;
  color:var(--muted);
  line-height:1.55;
  flex:1;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.card-context{
  margin-top:10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#F9FAFB;
  padding:9px 10px;
  display:flex;
  flex-direction:column;
  gap:7px;
}

.card-context-item{
  display:flex;
  align-items:flex-start;
  gap:8px;
  font-size:12px;
  line-height:1.35;
  color:var(--muted);
}

.card-context-item i{
  margin-top:2px;
  color:var(--athos-teal);
  width:14px;
  text-align:center;
  flex-shrink:0;
}

.card-context-item strong{
  color:var(--night);
}

.card-tags{display:flex; flex-wrap:wrap; gap:6px; margin-top:12px;}

.pill{
  font-size:11px;
  font-weight:800;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(47,143,131,0.12);
  color:var(--athos-teal);
}

.pill.gray{background:#F3F4F6; color:var(--muted);}

.card-deadline{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
  display:flex;
  gap:8px;
  align-items:center;
}

.card-deadline strong{color:var(--night);}

.open-edital-btn{
  width:100%;
  margin-top:12px;
  padding:12px 14px;
  border-radius:16px;
  background:transparent;
  border:2px solid rgba(47,143,131,0.55);
  color:var(--athos-teal);
  font-weight:1000;
  cursor:pointer;
  text-transform:lowercase;
}

.open-edital-btn:hover{background:rgba(47,143,131,0.08);}

/* ===========================
   PAGINATION
   ========================== */

.pagination{
  margin-top:14px;
  display:flex;
  justify-content:center;
  gap:6px;
  flex-wrap:wrap;
}

.page-btn{
  min-width:34px;
  height:34px;
  padding:0 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  font-weight:900;
  color:var(--muted);
}

.page-btn:hover{border-color:rgba(47,143,131,0.55); color:var(--athos-teal);}

.page-btn.active{background:var(--athos-teal); border-color:var(--athos-teal); color:#fff;}

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

.page-ellipsis{padding:6px 8px; color:#9CA3AF; font-weight:900;}

/* ===========================
   FOOTER
   ========================== */

.app-footer{
  margin-top:18px;
  color:#9CA3AF;
  font-size:12px;
  text-align:center;
  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}

.app-footer a{
  color:#2f7d78;
  text-decoration:none;
  font-weight:600;
}

.app-footer a:hover{
  text-decoration:underline;
}

.app-footer-sep{
  color:#94A3B8;
}

:root[data-theme='dark'] .app-footer{
  color:#94A3B8;
}

:root[data-theme='dark'] .app-footer a{
  color:#9FD8D1;
}

/* ===========================
   MODAL (DETALHES DO EDITAL)
   ========================== */

.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,0.65);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:1000;
}

.modal-overlay.open{display:flex;}

.edital-modal{
  width:min(860px, 100%);
  max-height:85vh;
  background:#fff;
  border-radius:var(--radius);
  border:1px solid var(--border);
  box-shadow:0 24px 60px rgba(0,0,0,0.30);
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.modal-close-btn{
  position:absolute;
  top:12px;
  right:14px;
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  color:var(--muted);
  font-size:22px;
  line-height:0;
  z-index:2;
}

.modal-close-btn:hover{color:var(--athos-teal); border-color:rgba(47,143,131,0.55);}

#modal-content-container{
  padding:18px;
  overflow:auto;
}

.modal-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding-right:96px; /* espaço pro X não encostar */
}

.modal-top-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.modal-logo{max-height:70px; margin-bottom:10px; display:block;}

.modal-title{
  margin:0;
  font-size:20px;
  font-weight:1000;
  color:var(--night);
  padding-right:48px;
}

.modal-desc{color:var(--muted); line-height:1.6;}

.modal-details{
  margin-top:10px;
  display:grid;
  gap:4px;
}

.modal-detail-row{
  color:var(--night);
  line-height:1.45;
  font-size:15px;
}

.modal-detail-row strong{font-weight:1000;}
.modal-detail-row span{font-weight:700;}

.modal-tags{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(47,143,131,0.35);
  background:rgba(47,143,131,0.06);
}

.modal-meta{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px,1fr));
  gap:12px;
  padding:12px;
  background:#F9FAFB;
  border:1px solid var(--border);
  border-radius:12px;
}

.meta-item strong{display:block; font-size:12px; color:var(--muted);}
.meta-item span{display:block; font-weight:900; color:var(--night); margin-top:2px; font-size:13px;}

.attachments-section{margin-top:16px;}

.attachments-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border:2px solid rgba(47,143,131,0.45);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  font-weight:1000;
  transition:background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.attachments-summary:hover{
  background:rgba(47,143,131,0.08);
  border-color:rgba(47,143,131,0.75);
}

.attachments-summary:focus-visible{
  outline:3px solid rgba(47,143,131,0.24);
  outline-offset:3px;
}

.attachments-summary.open{
  background:rgba(47,143,131,0.10);
  border-color:var(--athos-teal);
  box-shadow:0 0 0 1px rgba(47,143,131,0.25) inset;
}

.attachments-label{display:flex; flex-direction:column; gap:2px; min-width:0;}
.attachments-summary h3{margin:0; font-size:14px; letter-spacing:-0.01em;}
.attachments-summary > i{color:var(--athos-teal);}
.attachments-hint{font-size:12px; color:#374151; font-weight:900;}

.attachments-wrapper{max-height:0; overflow:hidden; transition:max-height .35s ease;}
.attachments-wrapper.open{max-height:1800px;}

.attachment-groups{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:12px 0 0;
}

.attachment-group{
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:10px;
}

.attachment-group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:2px 2px 0;
}

.attachment-group-title{
  margin:0;
  color:var(--night);
  font-size:13px;
  font-weight:1000;
  line-height:1.25;
}

.attachment-group-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:3px 8px;
  border:1px solid rgba(47,143,131,0.18);
  border-radius:999px;
  background:rgba(47,143,131,0.08);
  color:#0F766E;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}

.attachment-list{list-style:none; padding:0; margin:12px 0 0; display:flex; flex-direction:column; gap:10px;}

.attachment-group .attachment-list{margin-top:10px;}

.attachment-list a{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#F9FAFB;
  text-decoration:none;
  font-weight:900;
  color:var(--night);
}

.attachment-list a:hover{border-color:rgba(47,143,131,0.55); background:rgba(47,143,131,0.08);}

.attachment-list a:focus-visible{
  outline:3px solid rgba(47,143,131,0.22);
  outline-offset:2px;
  border-color:rgba(47,143,131,0.72);
}

.attachment-list a > i{
  width:18px;
  text-align:center;
  color:var(--athos-teal);
  flex:0 0 auto;
}

@media (max-width: 520px){
  .attachment-group-header{
    align-items:flex-start;
    flex-direction:column;
  }
}

.modal-share-btn{
  border:1px solid rgba(47,143,131,0.55);
  color:var(--athos-teal);
  background:#fff;
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  font-weight:1000;
}

.modal-share-btn:hover{background:rgba(47,143,131,0.10);}
.modal-save-btn{
  border:1px solid var(--border);
  color:var(--night);
  background:#fff;
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  font-weight:1000;
}

.modal-save-btn:hover{border-color:rgba(47,143,131,0.35); background:#F9FAFB;}
.edital-ai-cta{
  margin-top:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-radius:12px;
  border:1px dashed rgba(47,143,131,0.45);
  background:rgba(47,143,131,0.06);
}

.edital-ai-cta .cta-text{min-width:0;}
.edital-ai-cta .cta-text strong{display:block; font-weight:1000; color:var(--night);}
.edital-ai-cta .cta-text span{display:block; margin-top:2px; font-size:13px; color:var(--muted);}

/* Em telas pequenas, empilha */
@media (max-width: 520px){
  .edital-ai-cta{flex-direction:column; align-items:stretch;}
  .edital-ai-cta .btn{width:100%;}
}


/* ===========================
   HELP CENTER (central-ajuda.html)
   ========================== */

.help-hero{
  background:var(--athos-teal);
  border-radius:var(--radius);
  color:#fff;
  padding:18px;
  box-shadow:var(--shadow);
}

.help-hero-inner{text-align:center; max-width:760px; margin:0 auto;}
.help-hero-icon{font-size:26px; margin-bottom:8px; opacity:0.9;}
.help-hero h1{margin:0; font-size:22px; font-weight:1000;}
.help-hero p{margin:8px 0 0; opacity:0.92;}

.help-hero-search{
  margin:14px auto 0;
  max-width:720px;
  position:relative;
}

.help-hero-search i{position:absolute; left:12px; top:50%; transform:translateY(-50%); opacity:0.9;}

.help-hero-search input{
  width:100%;
  padding:12px 14px 12px 40px;
  border:none;
  border-radius:12px;
  outline:none;
}

.help-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(280px, 320px);
  gap:var(--section-gap);
}

.help-side{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.help-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
}

.help-card h2{margin:0 0 10px; font-size:16px; font-weight:1000; color:var(--night);}
.help-card h3{margin:0 0 10px; font-size:15px; font-weight:1000; color:var(--night);}

.help-quick{display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; margin-bottom:12px;}

.help-quick-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:12px;
  display:flex;
  align-items:center;
  gap:10px;
}

.help-quick-card i{color:var(--athos-teal); font-size:18px; width:22px; text-align:center;}

.help-quick-card strong{display:block; font-weight:1000; color:var(--night); font-size:13px;}
.help-quick-card span{display:block; color:var(--muted); font-size:12px; margin-top:2px;}

.faq-item{border:1px solid var(--border); border-radius:12px; padding:10px 12px; background:#fff;}
.faq-item + .faq-item{margin-top:10px;}

.faq-item summary{cursor:pointer; font-weight:1000; color:var(--night);}
.faq-body{margin-top:8px; color:var(--muted); line-height:1.5;}

.help-support p{margin:0 0 12px; color:var(--muted);}

.help-support-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(47,143,131,0.55);
  background:#fff;
  color:var(--athos-teal);
  font-weight:1000;
  cursor:pointer;
  text-decoration:none;
  margin-top:10px;
}

.help-support-btn:hover{background:rgba(47,143,131,0.08);}

.video-row{display:flex; align-items:flex-start; gap:12px; padding:10px; border:1px solid var(--border); border-radius:12px; background:var(--surface-soft);}
.video-row:first-of-type{padding-top:10px;}
.video-row + .video-row{margin-top:8px;}

.video-row > div:last-child{
  min-width:0;
  flex:1;
}

.video-row strong{
  display:block;
  line-height:1.24;
}

.video-thumb{
  width:44px;
  height:34px;
  border-radius:10px;
  background:rgba(47,143,131,0.14);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--athos-teal);
}

.video-meta{color:var(--muted); font-size:12px; margin-top:4px; line-height:1.3;}

/* ===========================
   CHAT (mantido)
   ========================== */

.e-contact-buttons__chat-button-container{position:fixed; bottom:20px; right:20px; z-index:10000;}

.e-contact-buttons__chat-button{
  width:60px; height:60px; border-radius:50%; border:none; cursor:pointer;
  background:linear-gradient(145deg, #0f7668 8%, #0a5a4f 56%, #083d36 100%);
  box-shadow:0 12px 28px rgba(8, 45, 39, 0.34);
  overflow:hidden; padding:0;
  display:flex; align-items:center; justify-content:center;
  transition:transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.e-contact-buttons__chat-button:hover{
  transform:scale(1.06);
  box-shadow:0 14px 30px rgba(8, 45, 39, 0.4);
}

.chat-mascote-icon{width:100%; height:100%; object-fit:cover; border-radius:50%;}

.chat-launch-icon{
  font-size:28px;
  line-height:1;
  color:#e9fffa;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.e-contact-buttons__content-wrapper{
  position:fixed; bottom:90px; right:20px;
  width:min(360px, calc(100vw - 24px));
  max-height:420px;
  max-height:min(420px, calc(100dvh - 120px));
  display:flex; flex-direction:column;
  background:#fff; border-radius:16px;
  box-shadow:0 15px 40px rgba(0,0,0,0.18);
  overflow:hidden; z-index:9999;
  opacity:0; pointer-events:none; transform:translateY(20px);
  transition:all 0.3s ease;
}

.e-contact-buttons__content-wrapper.open{opacity:1; pointer-events:auto; transform:translateY(0);}

.chat-header{background:var(--night); color:#fff; padding:12px; font-weight:900; flex-shrink:0;}


.chat-messages{
  flex:1 1 auto;
  padding:15px;
  overflow-y:auto;
  min-height:0;
  font-size:0.9rem;
  display:flex;
  flex-direction:column;
  gap:10px;
  background:#f9fafb;
}

/* A estrutura real do DOM é:
   <div class="chat-message bot|user"><div class="bubble">...</div></div>
   Então estilizamos .chat-message + .bubble.
   Mantemos .message como alias (caso algum trecho antigo use). */

.chat-message{
  display:flex;
  flex-direction:column;
  gap:6px;
  max-width:100%;
}

.chat-message.bot{align-items:flex-start;}
.chat-message.user{align-items:flex-end;}

.chat-message .bubble,
.message{
  padding:8px 12px;
  border-radius:15px;
  line-height:1.4;
  font-size:0.9rem;
  width:fit-content;
  max-width:80%;
  word-wrap:break-word;
  white-space:pre-wrap; /* preserva quebras de linha */
}

.chat-message.bot .bubble,
.message.bot{
  background:var(--chat-bg-bot);
  color:#fff;
  border-bottom-left-radius:2px;
  text-align:left;
}

.chat-message.user .bubble,
.message.user{
  background:var(--chat-bg-user);
  color:#0b1320;
  border-bottom-right-radius:2px;
  text-align:right;
}

.chat-message.is-typing .bubble{
  opacity:0.85;
  font-style:italic;
}

.chat-sources-details{
  width:fit-content;
  max-width:80%;
  margin-top:2px;
  font-size:12px;
}

.chat-sources-details summary{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  color:#374151;
  cursor:pointer;
  font-weight:900;
  transition:background .2s ease, border-color .2s ease;
  list-style:none;
}

.chat-sources-details[open] summary{
  border-color:rgba(47,143,131,0.45);
  background:rgba(47,143,131,0.10);
}

.chat-sources-details summary::-webkit-details-marker{display:none;}

.chat-sources-details summary i{color:var(--athos-teal);}

.chat-sources-list{
  list-style:none;
  margin:8px 0 0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.chat-source-item a,
.chat-source-item span{
  display:block;
  padding:7px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  color:var(--night);
  text-decoration:none;
  font-weight:700;
  line-height:1.35;
  overflow-wrap:anywhere;
}

.chat-source-item a{
  color:var(--athos-teal);
  font-weight:900;
}

.chat-source-item a:hover{
  text-decoration:underline;
  border-color:rgba(47,143,131,0.45);
}

.chat-input-area{display:flex; gap:8px; padding:10px; border-top:1px solid var(--border); background:#fff; flex-shrink:0;}

.chat-input-area input,#chat-input{
  flex:1; padding:10px; border-radius:20px; border:1px solid var(--border);
  background:#f3f4f6; color:var(--night); outline:none;
}

.chat-input-area button,#send-button{
  border:none; background:var(--night); color:#fff; border-radius:50%;
  width:38px; height:38px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:filter 0.2s;
}

.chat-input-area button:hover{filter:brightness(1.12);}

.chat-options{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-width:80%;
}

.chat-message.bot .chat-options{align-self:flex-start;}
.chat-message.user .chat-options{align-self:flex-end;}

.chat-option-btn{
  background:#fff;
  border:1px solid var(--border);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:900;
  font-size:0.85rem;
  text-align:left;
  width:100%;
  box-shadow:0 6px 14px rgba(17,24,39,0.06);
}

.chat-option-btn:hover{
  border-color:rgba(47,143,131,0.55);
  transform:translateY(-1px);
}

.chat-opt-title{
  color:var(--night);
  line-height:1.2;
}

.chat-opt-meta{
  margin-top:4px;
  color:#6B7280;
  font-size:12px;
  font-weight:800;
}

/* ===========================
   COOKIE CONSENT (LGPD)
   ========================== */

body.cookie-consent-required{
  overflow:hidden;
}

#cookieConsentRoot [hidden]{
  display:none !important;
}

.cookie-consent-backdrop{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,0.45);
  backdrop-filter:blur(2px);
  -webkit-backdrop-filter:blur(2px);
  z-index:12000;
}

.cookie-consent{
  position:fixed;
  left:16px;
  right:16px;
  bottom:16px;
  z-index:12001;
}

.cookie-consent__bar{
  border:1px solid rgba(47,143,131,0.38);
  border-radius:16px;
  background:#fff;
  box-shadow:0 16px 36px rgba(0,0,0,0.24);
  padding:14px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
}

.cookie-consent__copy{
  min-width:0;
}

.cookie-consent__copy h2{
  margin:0 0 6px 0;
  color:var(--night);
  font-size:16px;
  font-weight:1000;
}

.cookie-consent__copy p{
  margin:0;
  color:#4B5563;
  font-size:13px;
  line-height:1.45;
}

.cookie-consent__actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.cookie-btn{
  border:1px solid var(--border);
  border-radius:11px;
  padding:8px 12px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.cookie-btn--primary{
  background:var(--athos-teal);
  border-color:var(--athos-teal);
  color:#fff;
}

.cookie-btn--primary:hover{filter:brightness(0.96);}

.cookie-btn--secondary{
  background:#fff;
  color:var(--athos-teal);
  border-color:rgba(47,143,131,0.45);
}

.cookie-btn--secondary:hover{
  background:rgba(47,143,131,0.10);
  border-color:var(--athos-teal);
}

.cookie-btn--ghost{
  background:#F9FAFB;
  color:var(--night);
}

.cookie-btn--ghost:hover{
  background:#F3F4F6;
}

.cookie-consent-manager{
  position:fixed;
  left:16px;
  bottom:16px;
  z-index:11999;
  border:1px solid rgba(47,143,131,0.45);
  border-radius:999px;
  background:#fff;
  color:var(--athos-teal);
  padding:8px 12px;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 10px 26px rgba(0,0,0,0.18);
}

.cookie-consent-manager:hover{
  background:rgba(47,143,131,0.08);
}

.cookie-consent-manager.cookie-consent-manager--inline{
  position:static;
  left:auto;
  bottom:auto;
  z-index:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  box-shadow:none;
  margin-top:8px;
}

.cookie-consent-panel{
  position:fixed;
  inset:0;
  z-index:12002;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(17,24,39,0.45);
}

.cookie-consent-panel.open{
  display:flex;
}

.cookie-consent-panel__card{
  width:min(640px, 100%);
  max-height:90vh;
  overflow:auto;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:0 22px 56px rgba(0,0,0,0.25);
  padding:16px;
}

.cookie-consent-panel__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.cookie-consent-panel__head h3{
  margin:0;
  color:var(--night);
  font-size:18px;
  font-weight:1000;
}

.cookie-consent-panel__close{
  width:32px;
  height:32px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  color:#6B7280;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}

.cookie-consent-panel__close:hover{
  color:var(--night);
  border-color:rgba(47,143,131,0.55);
}

.cookie-consent-panel__intro{
  margin:10px 0 14px 0;
  color:#4B5563;
  font-size:13px;
  line-height:1.45;
}

.cookie-consent-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid var(--border);
  border-radius:12px;
  padding:11px 12px;
  background:#fff;
}

.cookie-consent-row + .cookie-consent-row{
  margin-top:8px;
}

.cookie-consent-row strong{
  display:block;
  color:var(--night);
  font-size:13px;
}

.cookie-consent-row span{
  display:block;
  margin-top:2px;
  color:#6B7280;
  font-size:12px;
  line-height:1.35;
}

.cookie-consent-row--locked{
  background:#F9FAFB;
}

.cookie-switch{
  position:relative;
  width:44px;
  height:26px;
  flex-shrink:0;
}

.cookie-switch input{
  opacity:0;
  width:0;
  height:0;
}

.cookie-switch span{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:#D1D5DB;
  transition:background .2s ease;
}

.cookie-switch span::after{
  content:'';
  position:absolute;
  width:20px;
  height:20px;
  top:3px;
  left:3px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 2px 6px rgba(0,0,0,0.20);
  transition:transform .2s ease;
}

.cookie-switch input:checked + span{
  background:var(--athos-teal);
}

.cookie-switch input:checked + span::after{
  transform:translateX(18px);
}

.cookie-switch input:disabled + span{
  background:#9CA3AF;
}

.cookie-consent-legal{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:10px 12px;
}

.cookie-consent-legal summary{
  cursor:pointer;
  color:var(--night);
  font-size:13px;
  font-weight:1000;
}

.cookie-consent-legal p{
  margin:8px 0 0;
  color:#4B5563;
  font-size:12px;
  line-height:1.4;
}

.cookie-consent-legal a{
  color:var(--athos-teal);
  text-decoration:none;
  font-weight:900;
}

.cookie-consent-legal a:hover{
  text-decoration:underline;
}

.cookie-consent-panel__actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

/* ===========================
   LOADING / EMPTY
   ========================== */

.loading-container{
  grid-column:1 / -1;
  width:100%;
  padding:2rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  color:var(--muted);
}

.spinner{
  width:34px; height:34px; border-radius:50%;
  border:3px solid rgba(17,24,39,0.14);
  border-top-color:rgba(47,143,131,0.95);
  animation:spin 0.9s linear infinite;
  margin:0 auto 10px;
}

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

.no-results{
  grid-column:1 / -1;
  color:var(--muted);
  text-align:center;
  padding:2rem 0;
}

/* ===========================
   RESPONSIVE
   ========================== */

.mobile-only{display:none;}

.filters-backdrop{
  position:fixed; inset:0; background:rgba(17,24,39,0.55);
  z-index:190; display:none;
}

.mobile-sidebar-backdrop{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,0.52);
  z-index:230;
  display:none;
}

@media (max-width: 1200px){
  .page-grid{grid-template-columns:300px 1fr;}
}

@media (max-width: 980px){
  .app-sidebar{
    display:flex;
    position:fixed;
    left:0;
    top:0;
    height:100vh;
    width:min(320px, 88vw);
    z-index:240;
    transform:translateX(-108%);
    transition:transform .25s ease, opacity .2s ease;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    box-shadow:0 26px 42px rgba(17,24,39,0.24);
    will-change:transform;
  }
  .app-sidebar.mobile-open{
    transform:translateX(0);
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }
  .app-sidebar.collapsed{width:min(320px, 88vw);}
  .app-sidebar.collapsed .sidebar-logo{display:block;}
  .app-sidebar.collapsed .nav-text{display:inline;}
  .app-sidebar.collapsed .sidebar-user .user-meta{display:block;}

  .mobile-sidebar-backdrop.active{display:block;}

  html, body{overflow-x:hidden;}
  .app,
  .app-main,
  .content,
  .page-grid,
  .results-toolbar,
  .results-actions,
  .sort-wrapper,
  .sort-chips,
  .cards-grid,
  .edital-card,
  .help-grid,
  .help-main,
  .help-side,
  .profile-grid,
  .profile-left,
  .profile-right,
  .panel{
    min-width:0;
  }

  .topbar{
    padding:10px 12px;
    gap:10px;
    flex-wrap:wrap;
  }
  .topbar-mobile-brand{
    display:flex;
    flex:0 0 auto;
    gap:0;
  }
  .topbar-mobile-logo,
  .topbar-mobile-title{
    display:none;
  }
  .search-wrapper{
    order:3;
    flex:1 1 100%;
    max-width:none;
  }
  .topbar-actions{
    margin-left:auto;
    gap:8px;
    min-width:0;
    flex-wrap:wrap;
    justify-content:flex-end;
  }
  .topbar-actions .icon-btn{
    width:36px;
    height:36px;
    border-radius:11px;
    flex:0 0 auto;
  }
  .topbar-actions > .icon-btn[aria-label="Notificações"]{
    display:none;
  }

  .content{padding:clamp(10px, 3vw, 14px);}
  .hero-banner{
    padding:14px;
    border-radius:16px;
  }
  .hero-banner h1{font-size:15px;}
  .hero-banner p{
    font-size:12px;
    line-height:1.4;
  }
  .hero-stats{
    gap:8px;
    margin-top:10px;
  }
  .hero-stat{
    background:rgba(255,255,255,0.14);
    border:1px solid rgba(255,255,255,0.20);
    border-radius:10px;
    padding:7px 9px;
    min-width:84px;
  }

  .page-grid{grid-template-columns:1fr;}
  .cards-grid{grid-template-columns:1fr;}
  .results-toolbar{flex-direction:column; align-items:stretch; gap:10px;}
  .results-actions{justify-content:flex-start; gap:8px;}
  .sort-wrapper{
    width:100%;
    padding:9px;
    border-radius:14px;
    box-shadow:none;
  }
  .sort-label{width:100%;}
  .sort-chips{
    width:100%;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:thin;
  }
  .sort-chips::-webkit-scrollbar{height:4px;}
  .sort-chips::-webkit-scrollbar-thumb{
    background:rgba(17,24,39,0.18);
    border-radius:999px;
  }
  .sort-chip{
    flex:0 0 auto;
    white-space:nowrap;
    padding:7px 11px;
  }
  .sort-direction-btn{margin-left:auto;}

  .edital-card{
    border-radius:16px;
    padding:14px;
    min-height:0;
  }
  .card-status-list{max-width:160px;}
  .card-title,
  .card-org,
  .card-desc{
    overflow-wrap:anywhere;
  }
  .card-desc{-webkit-line-clamp:5;}
  .card-context{padding:8px 9px;}
  .card-context-item span{
    min-width:0;
    overflow-wrap:anywhere;
  }
  .card-tags .pill{
    display:inline-block;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .open-edital-btn{
    min-height:44px;
    border-radius:14px;
    text-transform:none;
  }

  .filters-panel{
    position:fixed;
    left:0;
    top:0;
    height:100vh;
    width:min(340px, 92vw);
    max-height:none;
    transform:translateX(-110%);
    transition:transform .25s ease;
    z-index:200;
    border-radius:0 14px 14px 0;
  }

  .filters-panel.open{transform:translateX(0);}
  .filters-close{display:flex;}

  .filters-backdrop.active{display:block;}

  .mobile-only{display:inline-flex; align-items:center; gap:8px;}

  .help-grid{grid-template-columns:1fr;}
  .help-quick{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .profile-card{position:static;}
}

@media (max-width: 820px){
  .profile-nav{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .security-box{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
  }
}

@media (max-width: 640px){
  .content{padding:10px;}
  .topbar{padding:8px 10px;}
  .topbar-actions{gap:6px;}
  .topbar-actions .icon-btn{
    width:34px;
    height:34px;
  }
  .topbar-mobile-logo{
    width:30px;
    height:30px;
  }
  .topbar-mobile-title{font-size:13px;}
  .hero-banner{padding:12px;}
  .hero-stats{gap:6px;}
  .hero-stat{
    min-width:0;
    flex:1 1 calc(33.333% - 6px);
  }
  .profile-card,
  .panel,
  .help-card{padding:14px;}

  .profile-nav{grid-template-columns:1fr;}
  .help-quick{grid-template-columns:1fr;}

  .sort-direction-btn{
    width:100%;
    margin-left:0;
    justify-content:center;
  }

  .filters-panel{
    width:100vw;
    border-radius:0;
  }

  .e-contact-buttons__chat-button-container{
    right:12px;
    bottom:12px;
  }

  .e-contact-buttons__content-wrapper{
    left:10px;
    right:10px;
    width:auto;
    bottom:80px;
    max-height:520px;
    max-height:min(72dvh, 520px);
  }
}

@media (max-width: 560px){
  .modal-overlay{padding:8px;}
  .edital-modal{max-height:calc(100dvh - 16px);}
  .modal-topbar{padding-right:0;}
  .modal-title{padding-right:0; font-size:18px;}
  .profile-avatar{width:56px; height:56px;}
}

@media (max-width: 420px){
  .content{padding:8px;}
  .app-sidebar{width:min(300px, 92vw);}
  .topbar{padding:8px;}
  .hero-banner h1{font-size:14px;}
  .hero-banner p{font-size:11.5px;}
  .sort-wrapper{padding:8px;}
  .sort-chip{
    padding:6px 10px;
    font-size:11px;
  }
  .edital-card{padding:12px;}
  .card-title{font-size:14px;}
  .card-desc{font-size:12px;}
  .card-context-item{font-size:11.5px;}
  .open-edital-btn{
    padding:11px 12px;
    font-size:15px;
  }
}

@media (max-height: 520px){
  .app-sidebar{height:100dvh;}
  .filters-panel{height:100dvh;}
  .e-contact-buttons__content-wrapper{
    bottom:12px;
    max-height:calc(100dvh - 24px);
  }
}

/* ===========================
   PERFIL
   ========================== */

.topbar--compact{
  padding-top:10px;
  padding-bottom:10px;
}

.profile-grid{
  display:grid;
  grid-template-columns:minmax(280px, 360px) minmax(0, 1fr);
  gap:var(--section-gap);
  align-items:start;
}

@media (max-width: 980px){
  .profile-grid{ grid-template-columns:1fr; }
}

.profile-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:var(--surface-pad);
  box-shadow:var(--shadow);
  overflow:hidden;
  isolation:isolate;
}

@media (min-width: 981px){
  .profile-card{
    position:sticky;
    top:calc(72px + var(--content-gutter));
  }
}

.profile-avatar{
  width:64px;
  height:64px;
  border-radius:50%;
  background:rgba(47,143,131,0.12);
  color:var(--deep-forest);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  margin:4px auto 10px;
}

.profile-name{
  text-align:center;
  font-weight:700;
  margin-bottom:4px;
}

.profile-email{
  text-align:center;
  color:var(--muted);
  font-size:13px;
  margin-bottom:14px;
}

.profile-name,
.profile-email,
.user-name,
.user-email,
.card-title,
.card-desc,
.panel-title,
.help-card strong,
.help-card span,
.help-card p{
  overflow-wrap:anywhere;
}

.profile-left,
.profile-right,
.help-main,
.help-side{
  min-width:0;
}

.profile-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.profile-nav-item{
  width:100%;
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;
  border-radius:12px;
  font-weight:600;
  cursor:pointer;
  text-align:left;
}

.profile-nav-item.is-active{
  border-color:rgba(47,143,131,0.35);
  background:rgba(47,143,131,0.08);
  color:var(--deep-forest);
}

.panel{
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:var(--surface-pad);
  box-shadow:var(--shadow);
  margin-bottom:18px;
}

.panel-title{
  font-weight:800;
  margin-bottom:14px;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px 14px;
  margin-bottom:14px;
}

@media (max-width: 740px){
  .form-grid{ grid-template-columns:1fr; }
}

.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}

.field input,
.field select{
  width:100%;
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  font:inherit;
  background:#fff;
  transition:border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.field input:focus,
.field select:focus{
  outline:none;
  border-color:rgba(47,143,131,0.65);
  box-shadow:0 0 0 3px rgba(47,143,131,0.16);
  background:#fff;
}

.field--with-custom-select{
  position:relative;
}

.field--with-custom-select select.select-native-hidden{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}

.custom-select{
  position:relative;
}

.custom-select__trigger{
  width:100%;
  border:1px solid #D1D5DB;
  border-radius:14px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color:#111827;
  padding:11px 14px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  transition:all .16s ease;
}

.custom-select__trigger:hover{
  border-color:rgba(47,143,131,0.58);
  box-shadow:0 8px 18px rgba(15,23,42,0.10);
}

.custom-select.open .custom-select__trigger{
  border-color:rgba(47,143,131,0.7);
  box-shadow:0 0 0 3px rgba(47,143,131,0.16);
}

.custom-select__value.is-placeholder{
  color:#9CA3AF;
  font-weight:600;
}

.custom-select__icon{
  color:#6B7280;
  font-size:12px;
  transition:transform .16s ease, color .16s ease;
}

.custom-select.open .custom-select__icon{
  transform:rotate(180deg);
  color:var(--athos-teal);
}

.custom-select__menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  background:#fff;
  border:1px solid #D1D5DB;
  border-radius:14px;
  box-shadow:0 18px 32px rgba(15,23,42,0.16);
  max-height:230px;
  overflow:auto;
  padding:8px;
  z-index:40;
  display:none;
}

.custom-select.open .custom-select__menu{
  display:block;
  animation:customSelectIn .14s ease;
}

.custom-select__menu::-webkit-scrollbar{
  width:8px;
}

.custom-select__menu::-webkit-scrollbar-thumb{
  background:rgba(17,24,39,0.16);
  border-radius:999px;
}

.custom-select__option{
  width:100%;
  border:1px solid transparent;
  border-radius:10px;
  background:#fff;
  color:#111827;
  text-align:left;
  font:inherit;
  font-size:14px;
  padding:9px 10px;
  cursor:pointer;
}

.custom-select__option:hover{
  background:rgba(47,143,131,0.10);
  border-color:rgba(47,143,131,0.38);
}

.custom-select__option.is-selected{
  background:rgba(47,143,131,0.14);
  border-color:rgba(47,143,131,0.58);
  color:var(--deep-forest);
  font-weight:800;
}

.custom-select__option.is-placeholder{
  color:#9CA3AF;
}

.custom-select__option[disabled]{
  cursor:not-allowed;
  opacity:0.75;
}

@keyframes customSelectIn{
  from{
    opacity:0;
    transform:translateY(-4px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  border:1px solid rgba(47,143,131,0.25);
  background:rgba(47,143,131,0.08);
  color:var(--deep-forest);
  padding:8px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.chip-x{
  border:none;
  background:transparent;
  font-size:16px;
  line-height:1;
  cursor:pointer;
  color:rgba(13,74,60,0.8);
}

.chip-add{
  background:#fff;
  border:1px dashed rgba(47,143,131,0.55);
  color:var(--athos-teal);
}

.checks{ display:flex; flex-direction:column; gap:12px; }

#saveEmpresaBtn,
#savePrefsBtn{
  margin-top:14px;
}

.check{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  background:#fff;
}

.check input{ margin-top:3px; }

.check small{
  display:block;
  color:var(--muted);
  margin-top:4px;
}

.cookie-prefs-card{
  margin-top:14px;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  background:#F9FAFB;
}

.cookie-prefs-card strong{
  display:block;
  color:var(--night);
}

.cookie-prefs-card small{
  display:block;
  margin-top:4px;
  color:var(--muted);
}

.security-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
}

.muted{ color:var(--muted); }

/* Toast */
.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%) translateY(10px);
  background:#111827;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  box-shadow:var(--shadow);
  opacity:0;
  transition: all 180ms ease;
  z-index:9999;
  font-weight:700;
}
.toast.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

@media (max-width: 720px){
  .cookie-consent__bar{
    flex-direction:column;
    align-items:stretch;
  }

  .cookie-consent__actions{
    justify-content:flex-start;
  }

  .cookie-btn{
    width:100%;
  }

  .cookie-consent-panel__actions .cookie-btn{
    width:auto;
  }
}


/* =========================================================
   UX Refresh 2026
   ========================================================= */

:root {
  --radius-xl: 20px;
}

.search-wrapper {
  transition: transform .14s ease, box-shadow .14s ease;
}

.search-wrapper.is-active {
  transform: translateY(-1px);
}

.search-wrapper.is-active input {
  border-color: rgba(47,143,131,.62);
  box-shadow: 0 0 0 3px rgba(47,143,131,.14), 0 8px 16px rgba(15,23,42,.08);
}

.hero-banner {
  background: linear-gradient(135deg, #2f8f83 0%, #17695e 58%, #0f4a41 100%);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: '';
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,255,255,.24), rgba(255,255,255,0));
  pointer-events: none;
}

.hero-banner h1 {
  font-size: clamp(18px, 1.6vw, 24px);
  letter-spacing: -.01em;
}

.hero-banner p {
  font-size: 13px;
  max-width: 56ch;
}

.hero-stats {
  gap: 10px;
  margin-top: 16px;
}

.hero-stat {
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(255,255,255,.10);
  border-radius: 14px;
  min-width: 138px;
  padding: 10px 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  cursor: pointer;
  color: #fff;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}

.hero-stat:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.16);
}

.hero-stat.is-active {
  background: #fff;
  color: #0f3f38;
  box-shadow: 0 12px 26px rgba(6, 17, 27, .22);
}

.hero-stat .label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .92;
}

.hero-stat .value {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.hero-stat .hint {
  font-size: 11px;
  opacity: .82;
}

.filters-header {
  align-items: flex-start;
}

.filters-heading {
  min-width: 0;
  flex: 1;
}

.filters-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filters-subtitle {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.filters-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(47,143,131,.12);
  color: var(--deep-forest);
  border: 1px solid rgba(47,143,131,.38);
  font-size: 11px;
  font-weight: 900;
}

.filter-group {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
}

.filter-group-title {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 10px 8px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--night);
  font-weight: 900;
  transition: background .16s ease, color .16s ease;
}

.filter-group-title:hover {
  background: rgba(47,143,131,.08);
  color: var(--deep-forest);
}

.filter-group-title:focus-visible {
  outline: 3px solid rgba(47,143,131,.24);
  outline-offset: 2px;
  background: rgba(47,143,131,.12);
}

.filter-group-title > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.filter-group-title > i {
  color: #6b7280;
  transition: transform .22s ease, color .16s ease;
}

.filter-group-title:hover > i,
.filter-group-title:focus-visible > i {
  color: var(--athos-teal);
}

.filter-group.is-collapsed .filter-group-title > i {
  transform: rotate(-90deg);
}

.filter-group-body {
  display: block;
  transition: height .22s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  will-change: height;
}

.filter-group.is-collapsed .filter-group-body:not([hidden]) {
  display: block;
}

.filter-group-body[aria-hidden='true'] {
  pointer-events: none;
}

.filter-search {
  border-radius: 10px;
  border-color: #d7dde6;
  background: var(--surface-soft);
}

.filter-search:focus {
  border-color: rgba(47,143,131,.62);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47,143,131,.14);
}

.filter-options {
  border: 1px solid #edf1f5;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.filter-options label {
  border-color: #edf1f5;
  background: #fff;
}

.filter-options label:hover {
  border-color: rgba(47,143,131,.34);
  background: rgba(47,143,131,.07);
}

.filter-options .filter-count {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
  padding: 1px 6px;
  min-width: 28px;
  text-align: center;
}

.filter-empty {
  margin-top: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #d1d5db;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.filter-actions {
  margin: 16px -14px -14px;
  padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  gap: 8px;
  border-top: 1px solid #e5e7eb;
  background: linear-gradient(180deg, rgba(255,255,255,.86) 0%, #fff 36%);
  position: sticky;
  bottom: -14px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
}

.filter-actions .btn {
  flex: 1 1 calc(50% - 4px);
}

.filter-actions-meta {
  margin: 0;
  width: 100%;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.btn {
  min-height: 42px;
}

.btn-tertiary {
  border: 0;
  background: transparent;
  color: #475569;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 10px;
}

.btn-tertiary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-primary.has-active-filters {
  box-shadow: 0 0 0 3px rgba(47,143,131,.16);
}

.results-toolbar {
  margin-bottom: 12px;
}

.sort-wrapper {
  border-radius: 14px;
  padding: 8px 10px;
}

#sortSelect {
  display: none;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  min-height: 38px;
  background: #fff;
  padding: 0 10px;
  color: #111827;
  font-weight: 700;
}

.active-filters {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
  padding: 10px 12px;
}

.active-filters__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.active-filters__header strong {
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #334155;
}

.active-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.active-filter-chip {
  border: 1px solid rgba(47,143,131,.34);
  background: rgba(47,143,131,.08);
  color: var(--deep-forest);
  border-radius: 999px;
  min-height: 32px;
  padding: 6px 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.active-filter-chip:hover {
  border-color: rgba(47,143,131,.54);
  background: rgba(47,143,131,.14);
}

.active-filter-chip i {
  font-size: 11px;
}

.active-filter-chip.chip-favorites {
  border-color: rgba(245,158,11,.4);
  background: rgba(245,158,11,.12);
  color: #92400e;
}

.active-filter-chip.chip-assistant {
  border-color: rgba(30, 64, 175, 0.34);
  background: rgba(30, 64, 175, 0.1);
  color: #1e3a8a;
}

.results-state-hint {
  margin-bottom: 12px;
  border: 1px solid rgba(47,143,131,.24);
  background: rgba(47,143,131,.06);
  color: #0f172a;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.cards-grid {
  gap: 16px;
}

.edital-card {
  border-radius: 20px;
  border-color: #dbe2ea;
  min-height: 0;
  padding: 18px;
  box-shadow: 0 14px 28px rgba(15,23,42,.08);
  position: relative;
}

.edital-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 34px rgba(15,23,42,.12);
}

.card-brand {
  align-items: center;
  gap: 12px;
}

.card-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.card-logo-fallback {
  font-weight: 900;
  color: #94a3b8;
  font-size: 12px;
}

.card-brand-copy {
  min-width: 0;
  flex: 1;
}

.card-org {
  max-width: 100%;
  margin: 0 0 6px;
  color: #475569;
}

.card-actions {
  gap: 8px;
}

.card-icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
}

.card-icon-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  background: #111827;
  color: #fff;
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .12s ease, transform .12s ease;
  z-index: 30;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.card-title {
  margin-top: 14px;
  margin-bottom: 8px;
  font-size: 17px;
}

.card-desc {
  -webkit-line-clamp: 3;
  min-height: calc(1.55em * 3);
}

.card-kpis {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}

.card-kpi {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 9px 10px;
  min-width: 0;
}

.card-kpi span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 3px;
}

.card-kpi strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.card-kpi--full {
  grid-column: 1 / -1;
}

.card-tags {
  margin-top: 10px;
}

.pill {
  font-size: 11px;
  padding: 5px 9px;
}

.open-edital-btn {
  margin-top: 14px;
  min-height: 44px;
  border-radius: 14px;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.open-edital-btn i {
  font-size: 12px;
}

.results-empty-state {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15,23,42,.08);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.results-empty-state h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
}

.results-empty-state p {
  margin: 0;
  max-width: 60ch;
  color: #475569;
  line-height: 1.5;
}

.results-empty-state .empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f766e;
  background: rgba(15,118,110,.12);
  border: 1px solid rgba(15,118,110,.28);
}

.results-empty-state.is-error .empty-icon {
  color: var(--danger);
  background: rgba(185,28,28,.12);
  border-color: rgba(185,28,28,.28);
}

.cards-skeleton {
  display: grid;
  width: 100%;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 14px;
}

.card-skeleton {
  min-height: 160px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(90deg, #f1f5f9 8%, #e5e7eb 18%, #f1f5f9 33%);
  background-size: 800px 104px;
  animation: skeleton-shimmer 1.2s linear infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.modal-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-topbar--premium {
  align-items: center;
  gap: 14px;
}

.modal-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.modal-logo {
  margin: 0;
  width: 54px;
  height: 54px;
  border-radius: 13px;
  object-fit: contain;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 4px;
}

.modal-logo-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #64748b;
}

.modal-top-copy {
  min-width: 0;
}

.modal-kicker {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 5px;
}

.modal-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-title {
  margin: 14px 0 8px;
  line-height: 1.22;
  font-size: clamp(21px, 2.2vw, 29px);
}

.modal-desc {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.modal-highlights {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.modal-highlight {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 11px;
}

.modal-highlight span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.modal-highlight strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.modal-details {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.modal-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.modal-detail-row:last-child {
  border-bottom: 0;
}

.modal-detail-row span {
  text-align: right;
  overflow-wrap: anywhere;
}

.recommendation-section{
  margin-top:14px;
  border:1px solid #DDE7E4;
  border-radius:12px;
  background:#FBFDFC;
  padding:12px;
}

.recommendation-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.recommendation-header h3{
  margin:0 0 3px;
  font-size:15px;
  color:#102F2B;
}

.recommendation-header p{
  margin:0;
  font-size:12px;
  font-weight:800;
  color:#47736B;
}

.recommendation-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
  gap:10px;
}

.recommendation-grid article{
  border:1px solid #E6ECEA;
  border-radius:10px;
  background:#fff;
  padding:10px;
}

.recommendation-grid h4{
  margin:0 0 7px;
  font-size:12px;
  color:#334155;
}

.recommendation-grid ul{
  margin:0;
  padding-left:16px;
  color:#475569;
  font-size:12px;
  line-height:1.45;
}

.recommendation-empty{
  margin:0;
  color:#64748B;
  font-size:12px;
  line-height:1.45;
}

.attachment-list a {
  align-items: center;
}

.attachment-item-copy {
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.attachment-item-copy strong,
.attachment-item-copy small {
  overflow-wrap: anywhere;
}

.attachment-item-copy small {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-weight: 800;
}

.attachments-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed #d1d5db;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  color: #64748b;
  font-weight: 700;
}

.edital-ai-cta {
  border-style: solid;
  border-color: rgba(47,143,131,.34);
  background: linear-gradient(180deg, rgba(47,143,131,.09), rgba(47,143,131,.03));
}

.e-contact-buttons__chat-button-container {
  bottom: 18px;
  right: 18px;
}

.e-contact-buttons__chat-button {
  border: 1px solid rgba(255,255,255,.26);
}

.e-contact-buttons__content-wrapper {
  border: 1px solid #dbe2ea;
  border-radius: 18px;
  max-height: min(560px, calc(100dvh - 130px));
}

.chat-header {
  background: linear-gradient(135deg, #111827, #1f2937);
}

.chat-messages {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.chat-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.chat-prompt-btn {
  border: 1px solid rgba(47,143,131,.28);
  background: rgba(47,143,131,.07);
  color: #0f4a41;
  border-radius: 999px;
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.chat-prompt-btn:hover {
  background: rgba(47,143,131,.13);
  border-color: rgba(47,143,131,.44);
}

.chat-input-area input:disabled,
.chat-input-area button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

body.modal-open .e-contact-buttons__chat-button-container,
body.modal-open .e-contact-buttons__content-wrapper {
  display: none;
}

.toast {
  min-width: 220px;
  text-align: center;
}

.toast--success {
  background: var(--success);
}

.toast--error {
  background: var(--danger);
}

.cookie-consent-backdrop {
  display: none;
}

body.cookie-consent-required {
  overflow: auto;
}

.cookie-consent {
  left: auto;
  right: 16px;
  max-width: min(560px, calc(100vw - 32px));
}

.cookie-consent__bar {
  align-items: flex-start;
  gap: 10px;
}

.cookie-consent__actions {
  margin-left: auto;
}

@media (max-width: 980px) {
  #sortSelect {
    display: inline-flex;
  }

  .sort-chips {
    display: none;
  }

  .hero-stat {
    min-width: 0;
    flex: 1 1 calc(33.333% - 8px);
  }

  .active-filters__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-kpis {
    grid-template-columns: 1fr;
  }

  .modal-detail-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-detail-row span {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .cookie-consent {
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .cookie-consent__actions {
    margin-left: 0;
  }

  .e-contact-buttons__chat-button-container {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .e-contact-buttons__content-wrapper {
    left: 10px;
    right: 10px;
    bottom: calc(80px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .hero-banner {
    border-radius: 16px;
  }

  .hero-stats {
    gap: 7px;
  }

  .hero-stat {
    padding: 8px 10px;
  }

  .hero-stat .value {
    font-size: 19px;
  }

  .active-filter-chip {
    width: 100%;
    justify-content: space-between;
  }

  [data-tooltip]::after {
    display: none;
  }
}
/* =========================================================
   Profile Refresh
   ========================================================= */

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-subtitle {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.profile-save-banner {
  border: 1px solid rgba(245,158,11,.42);
  background: rgba(245,158,11,.10);
  color: #78350f;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-save-banner strong {
  display: block;
  font-size: 14px;
}

.profile-save-banner p {
  margin: 3px 0 0;
  font-size: 12px;
}

.field-help {
  display: block;
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
}

.field-block {
  margin-top: 8px;
}

.field.is-dirty input,
.field.is-dirty select,
.check.is-dirty,
#areasInteresse.is-dirty {
  border-color: rgba(245,158,11,.56) !important;
  background: rgba(254,243,199,.30);
}

.field.is-invalid input,
.field.is-invalid select,
.check.is-invalid {
  border-color: rgba(220,38,38,.6) !important;
  box-shadow: 0 0 0 2px rgba(220,38,38,.15);
}

.checks--toggles .check {
  border-radius: 16px;
}

.checks--toggles .check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--athos-teal);
}

.section-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.section-entry-grid--overview {
  margin-top: 8px;
}

.section-entry-btn {
  width: 100%;
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}

.section-entry-btn strong {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
}

.section-entry-btn small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.section-entry-btn:hover {
  border-color: rgba(47,143,131,.46);
  background: linear-gradient(180deg, #f9fffe, #eefcf9);
  box-shadow: 0 10px 22px rgba(15,23,42,.07);
  transform: translateY(-1px);
}

.section-entry-btn:focus-visible {
  outline: none;
  border-color: rgba(47,143,131,.65);
  box-shadow: 0 0 0 3px rgba(47,143,131,.18);
}

.section-entry-btn.is-active {
  border-color: rgba(47,143,131,.52);
  background: linear-gradient(180deg, #effcf9, #e6f8f4);
  box-shadow: 0 0 0 2px rgba(47,143,131,.12);
}

.profile-sensitive-section[hidden] {
  display: none !important;
}

.security-access-note {
  margin-bottom: 0;
}

.security-step-list {
  margin: 10px 0 12px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.security-step-list li {
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.security-password-status {
  margin: 10px 0 0;
  min-height: 18px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.security-password-status.is-success {
  color: #0f766e;
}

.security-password-status.is-error {
  color: #b91c1c;
}

.security-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.security-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.security-card--danger {
  border-color: rgba(220, 38, 38, 0.34);
  background: #fff6f6;
}

.security-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.security-card__head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 15px;
}

.security-badge {
  border-radius: 999px;
  border: 1px solid rgba(47,143,131,.3);
  background: rgba(47,143,131,.09);
  color: #0f4a41;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
}

.security-badge--muted {
  border-color: #d1d5db;
  background: #f8fafc;
  color: #475569;
}

.security-badge--danger {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.btn-danger {
  border-color: rgba(220, 38, 38, 0.55);
  background: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.94);
}

.security-toggle {
  width: 100%;
}

.security-session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.security-session-list li {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.security-session-list strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
}

.security-session-list small {
  display: block;
  margin-top: 2px;
  color: #64748b;
}

.session-chip {
  border-radius: 999px;
  background: rgba(47,143,131,.12);
  border: 1px solid rgba(47,143,131,.34);
  color: #0f4a41;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
}

.security-card--tips ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.company-context-board {
  margin-top: 12px;
}

.company-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.company-summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.company-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.company-summary-card strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 15px;
}

.company-ticket-form {
  margin-top: 10px;
}

.company-ticket-form .field-block {
  grid-column: 1 / -1;
}

.account-delete-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(15, 23, 42, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.account-delete-overlay[hidden] {
  display: none !important;
}

.account-delete-dialog {
  width: min(430px, 100%);
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #fff;
  padding: 18px;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.22);
}

.account-delete-dialog h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
}

.account-delete-dialog p {
  margin: 10px 0 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.account-delete-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 820px) {
  .profile-save-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .security-card__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .security-session-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .company-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-delete-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
/* =========================================================
   Help Center Refresh
   ========================================================= */

.help-hero {
  border-radius: 20px;
  background: linear-gradient(140deg, #2f8f83 0%, #1b756b 55%, #14524a 100%);
}

.help-hero h1 {
  font-size: clamp(22px, 2.5vw, 31px);
}

.help-hero p {
  font-size: 14px;
}

.help-hero-tags {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.help-hero-tags .pill {
  background: rgba(255,255,255,.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,.32);
}

.help-quick-card {
  border-radius: 16px;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.help-quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47,143,131,.4);
  box-shadow: 0 14px 24px rgba(15,23,42,.10);
}

.faq-item {
  transition: border-color .12s ease, box-shadow .12s ease;
}

.faq-item[open] {
  border-color: rgba(47,143,131,.44);
  box-shadow: 0 8px 18px rgba(15,23,42,.07);
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #64748b;
  font-size: 12px;
}

.faq-item[open] summary::after {
  transform: rotate(180deg);
  color: var(--athos-teal);
}

.help-support {
  border: 1px solid rgba(47,143,131,.24);
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.video-row {
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

.video-row:hover {
  border-color: rgba(47,143,131,.28);
  background: rgba(47,143,131,.05);
  transform: translateY(-1px);
}

.video-thumb {
  width: 52px;
  height: 38px;
}
@media (max-width: 980px) {
  .topbar-actions > .icon-btn[aria-label="Notificações"] {
    display: none;
  }
}
.custom-select.is-dirty .custom-select__trigger {
  border-color: rgba(245,158,11,.56);
  background: rgba(254,243,199,.30);
}

.custom-select.is-invalid .custom-select__trigger {
  border-color: rgba(220,38,38,.64);
  box-shadow: 0 0 0 2px rgba(220,38,38,.15);
}

/* =========================================================
   UX Fixes 2026-03
   ========================================================= */

.app-sidebar {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.sidebar-user {
  margin-top: 0;
  flex-shrink: 0;
}

@media (min-width: 981px) {
  .app {
    align-items: stretch;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
  }
}

.card-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.card-status-list {
  justify-content: flex-start;
  max-width: 100%;
}

.card-org {
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
}

body.cookie-consent-required {
  overflow: hidden;
}

.cookie-consent-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 12000;
}

.cookie-consent {
  left: 0;
  right: 0;
  bottom: 0;
  max-width: none;
  padding: 0;
  z-index: 12001;
}

.cookie-consent__bar {
  align-items: center;
  gap: 14px;
  padding: 14px clamp(14px, 3.6vw, 28px);
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(15,23,42,.12);
  box-shadow: 0 -10px 32px rgba(15,23,42,.22);
}

.cookie-consent__copy {
  max-width: 880px;
}

.cookie-consent__actions {
  margin-left: auto;
  justify-content: flex-end;
}

.cookie-btn--ghost {
  opacity: .82;
}

.cookie-btn--ghost:hover {
  opacity: 1;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.faq-item.is-open {
  border-color: rgba(47,143,131,.44);
  box-shadow: 0 8px 18px rgba(15,23,42,.07);
}

.faq-question {
  margin: 0;
}

.faq-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  font-weight: 900;
  color: var(--night);
  cursor: pointer;
}

.faq-trigger i {
  color: #64748b;
  transition: transform .18s ease, color .18s ease;
}

.faq-item.is-open .faq-trigger i {
  transform: rotate(180deg);
  color: var(--athos-teal);
}

.faq-panel {
  height: auto;
  overflow: hidden;
  transition: height .22s cubic-bezier(.2,.8,.2,1);
}

.faq-panel[aria-hidden='true'] {
  pointer-events: none;
}

.faq-panel-inner {
  padding: 0 14px 14px;
}

.faq-body {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}

.help-support-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-support-note {
  display: block;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .topbar-actions > .icon-btn[aria-label="Notificações"] {
    display: none;
  }
}

@media (max-width: 860px) {
  .cookie-consent__bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__actions {
    margin-left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cookie-btn,
  .cookie-consent-panel__actions .cookie-btn {
    width: 100%;
  }
}

/* =========================================================
   Second Round Fixes 2026-03-13
   ========================================================= */

.cookie-consent-manager {
  display: none !important;
}

.cookie-prefs-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookie-prefs-card__head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cookie-prefs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-prefs-actions .btn {
  flex: 1 1 220px;
}

.cookie-prefs-status {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.cookie-prefs-status.is-success {
  color: #0f766e;
}

.cookie-prefs-status.is-error {
  color: #b91c1c;
}

.filter-group-title {
  width: 100%;
  min-height: 44px;
  padding: 12px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
}

.filter-group-title:hover {
  border-color: rgba(47,143,131,.25);
  background: rgba(47,143,131,.10);
}

.filter-group-title:focus-visible {
  outline: none;
  border-color: rgba(47,143,131,.52);
  background: rgba(47,143,131,.14);
  box-shadow: 0 0 0 3px rgba(47,143,131,.18);
}

.filter-group-title[aria-expanded='true'] {
  color: var(--deep-forest);
  background: rgba(47,143,131,.07);
}

.filter-group-title > i {
  transition: transform .2s ease, color .2s ease;
  transform: rotate(0deg);
}

.filter-group.is-collapsed .filter-group-title > i {
  transform: rotate(-90deg);
}

.filter-group-body {
  overflow: hidden;
  transition: height .22s cubic-bezier(.2,.8,.2,1);
}

.filter-group-body[hidden] {
  display: block;
  height: 0;
}

.filter-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.faq-trigger {
  min-height: 52px;
  padding: 14px 16px;
}

.faq-trigger:focus-visible {
  outline: none;
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px rgba(47,143,131,.35);
}

.search-wrapper.is-active {
  transform: none;
}

.search-wrapper.is-active input {
  border-color: rgba(47,143,131,.62);
  box-shadow: 0 0 0 2px rgba(47,143,131,.16);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.edital-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.open-edital-btn {
  margin-top: auto;
}

@media (min-width: 1600px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 981px) {
  .app {
    display: block;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 180;
    width: var(--app-sidebar-width);
    height: 100dvh;
    flex-basis: var(--app-sidebar-width);
    overflow: hidden;
  }

  .app-sidebar.collapsed {
    width: var(--app-sidebar-collapsed);
    flex-basis: var(--app-sidebar-collapsed);
  }

  .app-main {
    margin-left: var(--app-sidebar-width);
    width: calc(100% - var(--app-sidebar-width));
    min-height: 100dvh;
  }

  .app-sidebar.collapsed + .app-main {
    margin-left: var(--app-sidebar-collapsed);
    width: calc(100% - var(--app-sidebar-collapsed));
  }

  .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
  }
}

@media (max-width: 980px) {
  .app-main {
    margin-left: 0;
    width: 100%;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .cookie-prefs-actions .btn {
    flex: 1 1 100%;
  }
}

/* =========================================================
   Third Round Fixes 2026-03-13
   ========================================================= */

.filter-group-title {
  min-height: 48px;
  padding: 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  cursor: pointer;
}

.filter-group-title:hover {
  border-color: rgba(47, 143, 131, 0.45);
  background: rgba(47, 143, 131, 0.08);
}

.filter-group-title:focus-visible {
  outline: none;
  border-color: rgba(47, 143, 131, 0.66);
  box-shadow: 0 0 0 3px rgba(47, 143, 131, 0.22);
}

.filter-group-title > i {
  transition: transform 0.22s ease, color 0.22s ease;
  transform: rotate(0deg);
}

.filter-group-title[aria-expanded='true'] > i {
  transform: rotate(180deg);
  color: var(--athos-teal);
}

.filter-group.is-collapsed .filter-group-title > i {
  transform: rotate(0deg);
}

.filter-group-body {
  overflow: hidden;
  transition: height 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.filter-group-body[hidden] {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

.filters-panel .filter-actions {
  padding: 10px 0 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), #ffffff 42%);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.filters-panel .filter-actions .btn-primary {
  min-width: 146px;
}

.filters-panel .filter-actions .btn-secondary {
  min-width: 100px;
}

.faq-panel[hidden] {
  display: none !important;
}

.cards-grid {
  grid-auto-flow: row;
  align-items: stretch;
}

.card-org {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.28em * 2);
}

.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}

.card-kpi strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.35em * 2);
}

@media (min-width: 981px) {
  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-main {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }

  .sidebar-nav {
    overflow-y: auto;
  }
}

body.cookie-consent-required {
  overflow-y: auto;
}

body.cookie-consent-required .app-main {
  overflow: visible;
}

body.modal-open .app-main {
  overflow: hidden;
}

@media (min-width: 1400px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =========================================================
   Dashboard Assistant Fixes 2026-03-13
   ========================================================= */

:root {
  --assistant-desktop-width: clamp(320px, 25vw, 392px);
  --assistant-edge-gap: clamp(12px, 1.4vw, 20px);
  --chat-panel-bg: var(--surface);
  --chat-panel-border: var(--border);
  --chat-panel-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  --chat-header-bg: linear-gradient(135deg, var(--deep-forest), var(--athos-teal));
  --chat-header-text: var(--hero-text);
  --chat-header-border: rgba(255, 255, 255, 0.24);
  --chat-header-border-hover: rgba(255, 255, 255, 0.4);
  --chat-body-bg: linear-gradient(180deg, var(--surface-soft), var(--surface));
  --chat-bubble-bot-bg: var(--surface);
  --chat-bubble-bot-border: rgba(47, 143, 131, 0.2);
  --chat-bubble-bot-text: var(--text);
  --chat-bubble-user-bg: linear-gradient(135deg, #2A7B70, var(--athos-teal));
  --chat-bubble-user-text: #F8FFFC;
  --chat-chip-bg: rgba(47, 143, 131, 0.08);
  --chat-chip-bg-hover: rgba(47, 143, 131, 0.14);
  --chat-chip-border: rgba(47, 143, 131, 0.3);
  --chat-chip-border-hover: rgba(47, 143, 131, 0.46);
  --chat-input-bg: var(--surface);
  --chat-input-border: rgba(148, 163, 184, 0.42);
  --chat-input-placeholder: #64748B;
  --chat-send-bg: var(--athos-teal);
  --chat-send-bg-hover: #287A6F;
  --chat-send-text: #FFFFFF;
}

.assistant-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  z-index: 860;
}

.e-contact-buttons__chat-button-container {
  right: var(--assistant-edge-gap);
  bottom: var(--assistant-edge-gap);
  z-index: 890;
  transition: opacity .2s ease, transform .2s ease;
}

body.chat-open .e-contact-buttons__chat-button-container {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.e-contact-buttons__content-wrapper {
  position: fixed;
  top: calc(72px + var(--assistant-edge-gap));
  right: var(--assistant-edge-gap);
  bottom: var(--assistant-edge-gap);
  width: var(--assistant-desktop-width);
  max-height: none;
  min-height: 360px;
  border: 1px solid var(--chat-panel-border);
  border-radius: 18px;
  background: var(--chat-panel-bg);
  box-shadow: var(--chat-panel-shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(16px);
  transition: transform .24s ease, opacity .24s ease;
  z-index: 920;
}

.e-contact-buttons__content-wrapper.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  min-height: 54px;
  flex-shrink: 0;
  background: var(--chat-header-bg);
  color: var(--chat-header-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 900;
}

.chat-close-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--chat-header-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--chat-header-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--chat-header-border-hover);
}

.chat-close-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.56);
  outline-offset: 2px;
}

.chat-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--chat-body-bg);
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.34);
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-message .bubble,
.chat-options,
.chat-refine-panel,
.chat-sources-details {
  max-width: 94%;
}

.chat-message .bubble {
  overflow-wrap: anywhere;
  border-radius: 14px;
  padding: 10px 13px;
  line-height: 1.45;
  font-size: 13.5px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.chat-message.bot .bubble,
.message.bot {
  background: var(--chat-bubble-bot-bg);
  border: 1px solid var(--chat-bubble-bot-border);
  color: var(--chat-bubble-bot-text);
  border-bottom-left-radius: 8px;
}

.chat-message.user .bubble,
.message.user {
  background: var(--chat-bubble-user-bg);
  border: 1px solid transparent;
  color: var(--chat-bubble-user-text);
  border-bottom-right-radius: 8px;
  text-align: left;
}

.chat-message.is-typing .bubble {
  opacity: 0.84;
  font-style: italic;
}

.chat-sources-details {
  margin-top: 2px;
}

.chat-sources-details summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chat-sources-details[open] summary {
  background: var(--chat-chip-bg);
  border-color: var(--chat-chip-border);
  color: var(--text);
}

.chat-sources-details summary::-webkit-details-marker {
  display: none;
}

.chat-sources-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-source-item a,
.chat-source-item span {
  display: block;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  line-height: 1.35;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.chat-source-item a {
  color: var(--athos-teal);
  font-weight: 800;
}

.chat-source-item a:hover {
  border-color: var(--chat-chip-border-hover);
  background: var(--chat-chip-bg);
}

.chat-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 9px 10px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex: 0 0 auto;
  max-height: var(--chat-quick-prompts-expanded-height, 128px);
  overflow: auto;
  align-items: flex-start;
  transform-origin: top center;
  opacity: 1;
  transform: scaleY(1);
  transition:
    max-height 260ms cubic-bezier(.2,.8,.2,1),
    opacity 220ms ease,
    transform 260ms cubic-bezier(.2,.8,.2,1),
    padding 220ms ease,
    border-color 220ms ease;
}

.chat-quick-prompts::-webkit-scrollbar {
  height: 6px;
}

.chat-quick-prompts::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.28);
}

.chat-quick-prompts.is-collapsing {
  pointer-events: none;
  overflow: hidden;
}

.chat-quick-prompts.is-collapsed {
  max-height: 0 !important;
  opacity: 0;
  transform: scaleY(.92);
  padding-top: 0;
  padding-bottom: 0;
  border-top-color: transparent;
  overflow: hidden;
  pointer-events: none;
}

.chat-prompt-btn,
.chat-option-btn {
  border: 1px solid var(--chat-chip-border);
  background: var(--chat-chip-bg);
  color: var(--deep-forest);
  border-radius: 12px;
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.chat-prompt-btn:hover,
.chat-option-btn:hover {
  background: var(--chat-chip-bg-hover);
  border-color: var(--chat-chip-border-hover);
}

.chat-message.chat-refine-message .bubble {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chat-refine-panel {
  width: min(100%, 330px);
  padding: 10px;
  border: 1px solid var(--chat-bubble-bot-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(47, 143, 131, 0.08), rgba(47, 143, 131, 0.03)),
    var(--chat-bubble-bot-bg);
  color: var(--chat-bubble-bot-text);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.chat-refine-title {
  margin: 0 0 2px;
  color: var(--deep-forest);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.chat-refine-subtitle {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chat-refine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chat-refine-chip {
  min-height: 28px;
  border: 1px solid var(--chat-chip-border);
  border-radius: 999px;
  background: var(--chat-chip-bg);
  color: var(--deep-forest);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.chat-refine-chip:hover {
  background: var(--chat-chip-bg-hover);
  border-color: var(--chat-chip-border-hover);
  transform: translateY(-1px);
}

.chat-refine-chip:disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.chat-refine-chip.is-active,
.chat-refine-chip.is-active:disabled {
  opacity: 0.78;
  cursor: default;
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.38);
  background: rgba(15, 118, 110, 0.11);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
}

.chat-refine-chip.is-active:hover,
.chat-refine-chip.is-active:disabled:hover {
  transform: none;
  background: rgba(15, 118, 110, 0.11);
  border-color: rgba(15, 118, 110, 0.38);
}

.chat-refine-chip.is-clear {
  border-style: dashed;
  color: #9f1239;
  border-color: rgba(159, 18, 57, 0.35);
  background: rgba(244, 63, 94, 0.07);
}

.chat-refine-chip.is-clear:hover {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(159, 18, 57, 0.5);
}

.chat-input-area {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.chat-input-area input,
#chat-input {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--chat-input-border);
  border-radius: 12px;
  background: var(--chat-input-bg);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}

.chat-input-area input::placeholder,
#chat-input::placeholder {
  color: var(--chat-input-placeholder);
}

.chat-input-area input:focus,
#chat-input:focus {
  border-color: rgba(47, 143, 131, 0.66);
  box-shadow: 0 0 0 3px rgba(47, 143, 131, 0.16);
}

.chat-input-area button,
#send-button {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--chat-send-bg);
  color: var(--chat-send-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-area button:hover,
#send-button:hover {
  background: var(--chat-send-bg-hover);
  transform: translateY(-1px);
}

.chat-input-area button:active,
#send-button:active {
  transform: translateY(0);
}

.chat-input-area button:focus-visible,
#send-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 143, 131, 0.2);
}

.chat-input-area input:disabled,
.chat-input-area button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.chat-opt-title {
  color: var(--text);
  line-height: 1.25;
}

.chat-opt-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

/* =========================================================
   Card Micro-Alignment Fixes 2026-03-13
   ========================================================= */
.card-brand {
  align-items: center;
}

.card-brand-copy {
  min-height: 42px;
  justify-content: center;
  gap: 4px;
}

.card-org {
  margin: 0;
}

.card-status-list {
  align-items: center;
}

.card-tags {
  margin-top: 8px;
  margin-bottom: 4px;
}

.open-edital-btn {
  margin-top: 16px;
}

@media (min-width: 1280px) {
  body.chat-open:not(.assistant-overlay) .app-sidebar + .app-main {
    width: calc(100% - var(--app-sidebar-width) - var(--assistant-desktop-width) - (var(--assistant-edge-gap) * 2));
  }

  body.chat-open:not(.assistant-overlay) .app-sidebar.collapsed + .app-main {
    width: calc(100% - var(--app-sidebar-collapsed) - var(--assistant-desktop-width) - (var(--assistant-edge-gap) * 2));
  }

  body.chat-open:not(.assistant-overlay) .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  }
}

@media (min-width: 981px) {
  body:not(.chat-open) .pagination {
    padding-right: 84px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-quick-prompts {
    transition: none !important;
  }
}

@media (min-width: 981px) and (max-width: 1279px) {
  body.chat-open.assistant-overlay .assistant-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .e-contact-buttons__content-wrapper {
    width: min(392px, calc(100vw - 24px));
  }
}

@media (max-width: 980px) {
  body.chat-open.assistant-overlay .assistant-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .e-contact-buttons__chat-button-container {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .e-contact-buttons__content-wrapper {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    min-height: 0;
    height: min(82dvh, 640px);
    border-radius: 18px;
    transform: translateY(110%);
  }

  .e-contact-buttons__content-wrapper.open {
    transform: translateY(0);
  }

  .chat-quick-prompts {
    max-height: 96px;
  }
}

/* =========================================================
   Filters Panel Layout Refinement 2026-03-17
   ========================================================= */
.filters-panel {
  padding: 18px 16px 14px;
}

.filters-panel .filters-header {
  margin-bottom: 6px;
  gap: 10px;
}

.filters-panel .filters-title-row {
  gap: 10px;
  margin-bottom: 2px;
}

.filters-panel .filters-subtitle {
  margin-top: 2px;
  line-height: 1.42;
}

.filters-panel .filters-count-badge {
  min-height: 24px;
  padding: 4px 10px;
}

.filters-panel .filter-group {
  margin-top: 12px;
  padding-top: 12px;
}

.filters-panel .filter-group-title {
  min-height: 52px;
  padding: 13px 14px;
  font-size: 14px;
}

.filters-panel .filter-group-title > span {
  gap: 10px;
}

.filters-panel .filter-group-title > i {
  font-size: 13px;
}

.filters-panel .filter-group-body {
  padding-top: 10px;
}

.filters-panel .filter-search {
  min-height: 42px;
  margin-bottom: 10px;
  padding: 0 12px;
}

.filters-panel .filter-options {
  max-height: 252px;
  padding: 10px;
  gap: 9px;
}

.filters-panel .filter-options label {
  min-height: 42px;
  padding: 10px 12px;
}

.filters-panel .filter-actions {
  margin-top: 18px;
  gap: 10px;
  padding-top: 14px;
}

.filters-panel .filter-actions-meta {
  margin-bottom: 2px;
  line-height: 1.35;
  padding-left: 8px;
}

.filters-panel .filter-actions .btn {
  min-height: 48px;
  padding: 0 18px;
  font-size: 16px;
  line-height: 1;
}

.filters-panel .filter-actions .btn-secondary {
  border-width: 1.5px;
}

.filters-panel .filter-actions .btn-primary {
  box-shadow: 0 8px 18px rgba(47, 143, 131, 0.22);
}

.filters-panel .filter-actions .btn:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 980px) {
  .filters-panel {
    padding: 16px 14px 12px;
  }

  .filters-panel .filter-actions {
    margin: 16px -14px -12px;
    padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .filters-panel .filter-actions-meta {
    padding-left: 10px;
  }
}

/* =========================================================
   Theme: Dark Mode
   ========================================================= */
:root[data-theme='dark']{
  color-scheme: dark;
}

:root[data-theme='dark'] body{
  background:
    radial-gradient(circle at 10% -10%, rgba(82,188,176,0.14), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(93,157,255,0.10), transparent 42%),
    var(--mist);
  color: var(--text);
}

:root[data-theme='dark'] body.app-loading::before{
  background: var(--mist);
}

:root[data-theme='dark'] .app-sidebar,
:root[data-theme='dark'] .topbar,
:root[data-theme='dark'] .search-wrapper,
:root[data-theme='dark'] .filters-panel,
:root[data-theme='dark'] .results-toolbar,
:root[data-theme='dark'] .active-filters,
:root[data-theme='dark'] .edital-card,
:root[data-theme='dark'] .panel,
:root[data-theme='dark'] .profile-card,
:root[data-theme='dark'] .security-card,
:root[data-theme='dark'] .help-card,
:root[data-theme='dark'] .help-quick-card,
:root[data-theme='dark'] .faq-item,
:root[data-theme='dark'] .cookie-prefs-card,
:root[data-theme='dark'] .results-empty-state,
:root[data-theme='dark'] .assistant-result-action,
:root[data-theme='dark'] .assistant-result-card,
:root[data-theme='dark'] .custom-select,
:root[data-theme='dark'] .edital-modal,
:root[data-theme='dark'] .account-delete-dialog{
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow);
}

:root[data-theme='dark'] .help-hero{
  background: linear-gradient(135deg, #153548 0%, #123243 58%, #11283a 100%);
}

:root[data-theme='dark'] .hero-banner{
  background: linear-gradient(135deg, #1f5c61 0%, #173f54 60%, #11293d 100%);
}

:root[data-theme='dark'] .hero-stat{
  background: rgba(15,23,42,.38);
  border-color: rgba(148,163,184,.34);
  color: var(--hero-text);
}

:root[data-theme='dark'] .hero-stat.is-active{
  background: var(--surface);
  color: var(--text);
}

:root[data-theme='dark'] .topbar,
:root[data-theme='dark'] .app-sidebar{
  border-color: var(--border);
}

:root[data-theme='dark'] .nav-item,
:root[data-theme='dark'] .user-email,
:root[data-theme='dark'] .panel-subtitle,
:root[data-theme='dark'] .filters-subtitle,
:root[data-theme='dark'] .results-meta,
:root[data-theme='dark'] .field-help,
:root[data-theme='dark'] .muted,
:root[data-theme='dark'] .video-meta,
:root[data-theme='dark'] .filters-panel .filter-actions-meta{
  color: var(--muted);
}

:root[data-theme='dark'] .user-name,
:root[data-theme='dark'] .panel-title,
:root[data-theme='dark'] .section-title,
:root[data-theme='dark'] .filter-group-title,
:root[data-theme='dark'] .faq-trigger,
:root[data-theme='dark'] .help-card h2,
:root[data-theme='dark'] .help-card h3,
:root[data-theme='dark'] .security-card h3{
  color: var(--text);
}

:root[data-theme='dark'] .search-wrapper input,
:root[data-theme='dark'] input,
:root[data-theme='dark'] select,
:root[data-theme='dark'] textarea,
:root[data-theme='dark'] .filter-search,
:root[data-theme='dark'] .chat-input-area input{
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme='dark'] input::placeholder,
:root[data-theme='dark'] textarea::placeholder{
  color: var(--muted);
}

:root[data-theme='dark'] .icon-btn,
:root[data-theme='dark'] .sort-wrapper,
:root[data-theme='dark'] .sort-chip,
:root[data-theme='dark'] .sort-direction-btn,
:root[data-theme='dark'] .page-btn,
:root[data-theme='dark'] .filter-group-title,
:root[data-theme='dark'] .filter-options label{
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme='dark'] .results-toolbar{
  background:transparent;
  box-shadow:none;
}

:root[data-theme='dark'] .filter-options{
  background:rgba(17,28,47,0.38);
  border-color:rgba(148,163,184,0.22);
}

:root[data-theme='dark'] .filter-options::-webkit-scrollbar-thumb{
  background:rgba(148,163,184,0.34);
}

:root[data-theme='dark'] .sort-wrapper{
  background:linear-gradient(180deg, rgba(22,34,56,0.94) 0%, rgba(16,27,44,0.94) 100%);
  border-color:rgba(148,163,184,0.34);
  box-shadow:0 10px 22px rgba(2,6,23,0.38);
}

:root[data-theme='dark'] .sort-label{
  color:#A9BBD3;
}

:root[data-theme='dark'] .icon-btn:hover,
:root[data-theme='dark'] .sort-chip:hover,
:root[data-theme='dark'] .sort-direction-btn:hover,
:root[data-theme='dark'] .page-btn:hover,
:root[data-theme='dark'] .filter-group-title:hover,
:root[data-theme='dark'] .filter-options label:hover{
  border-color: rgba(82,188,176,.54);
  background: rgba(82,188,176,.16);
}

:root[data-theme='dark'] .filter-options .filter-count{
  background:rgba(148,163,184,0.18);
  border-color:rgba(148,163,184,0.34);
  color:#d5e4f7;
}

:root[data-theme='dark'] .sort-chip.is-active,
:root[data-theme='dark'] .filter-group-title.is-active,
:root[data-theme='dark'] .btn-primary,
:root[data-theme='dark'] .page-btn.active{
  background: var(--athos-teal);
  border-color: var(--athos-teal);
  color: #fff;
}

:root[data-theme='dark'] .icon-btn.is-active{
  border-color:rgba(82,188,176,0.62);
  background:rgba(82,188,176,0.24);
  color:#E8FFFB;
}

:root[data-theme='dark'] .sort-direction-btn.is-desc{
  background:rgba(148,163,184,0.18);
  border-color:rgba(148,163,184,0.42);
  color:#E2EBF8;
}

:root[data-theme='dark'] .btn-secondary,
:root[data-theme='dark'] .btn-tertiary{
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme='dark'] .results-state-hint{
  background: rgba(82,188,176,.12);
  border-color: rgba(82,188,176,.32);
  color: var(--text);
}

:root[data-theme='dark'] .user-dropdown{
  background: var(--surface);
  border-color: var(--border);
}

:root[data-theme='dark'] .modal-overlay,
:root[data-theme='dark'] .assistant-backdrop,
:root[data-theme='dark'] .mobile-sidebar-backdrop,
:root[data-theme='dark'] .filters-backdrop,
:root[data-theme='dark'] .account-delete-overlay{
  background: var(--overlay);
}

:root[data-theme='dark'] .modal-topbar--premium{
  background:rgba(17,28,47,0.86);
  border:1px solid rgba(148,163,184,0.26);
  border-radius:14px;
  padding:10px 12px;
}

:root[data-theme='dark'] .modal-status-row .pill.gray{
  background:rgba(255,255,255,0.16);
  border:1px solid rgba(255,255,255,0.32);
  color:#F1F7FF;
}

:root[data-theme='dark'] .attachments-summary{
  background:rgba(17,28,47,0.86);
  border-color:rgba(82,188,176,0.48);
}

:root[data-theme='dark'] .attachments-summary h3{
  color:var(--text);
}

:root[data-theme='dark'] .attachments-hint{
  color:#A8BED8;
}

:root[data-theme='dark'] .attachments-summary:hover{
  background:rgba(82,188,176,0.14);
  border-color:rgba(82,188,176,0.74);
}

:root[data-theme='dark'] .attachments-summary.open{
  background:rgba(82,188,176,0.18);
  border-color:rgba(82,188,176,0.86);
  box-shadow:0 0 0 1px rgba(82,188,176,0.24) inset;
}

:root[data-theme='dark'] .attachments-empty{
  background:rgba(17,28,47,0.86);
  border-color:rgba(148,163,184,0.34);
  color:#C3D6EF;
}

:root[data-theme='dark'] .attachments-empty i{
  color:#9FB4CC;
}

:root[data-theme='dark'] .attachment-group{
  background:rgba(17,28,47,0.64);
  border-color:rgba(148,163,184,0.28);
}

:root[data-theme='dark'] .attachment-group-title{
  color:var(--text);
}

:root[data-theme='dark'] .attachment-group-count{
  background:rgba(82,188,176,0.14);
  border-color:rgba(82,188,176,0.28);
  color:#BDEDE7;
}

:root[data-theme='dark'] .attachment-item-copy small{
  color:#A8BED8;
}

:root[data-theme='dark'] .modal-desc,
:root[data-theme='dark'] .modal-detail-row span,
:root[data-theme='dark'] .card-desc,
:root[data-theme='dark'] .text-block,
:root[data-theme='dark'] .faq-body{
  color: var(--muted);
}

:root[data-theme='dark'] .card-kpi,
:root[data-theme='dark'] .modal-highlight,
:root[data-theme='dark'] .metric,
:root[data-theme='dark'] .security-session-list li,
:root[data-theme='dark'] .video-row,
:root[data-theme='dark'] .attachment-list a{
  background: var(--surface-soft);
  border-color: var(--border);
}

:root[data-theme='dark'] .card-org{
  color:#90A8C7;
}

:root[data-theme='dark'] .card-logo{
  background:var(--surface-soft);
  border-color:var(--border);
}

:root[data-theme='dark'] .card-logo img{
  max-width:calc(100% - 6px);
  max-height:calc(100% - 6px);
  padding:2px;
  border-radius:8px;
  background:var(--surface-soft);
}

:root[data-theme='dark'] .card-kpi span{
  color:#9FB4CD;
}

:root[data-theme='dark'] .card-kpi strong{
  color:#DEE9F8;
}

:root[data-theme='dark'] .status-chip--highlight{
  background:rgba(245,158,11,0.22);
  border-color:rgba(245,158,11,0.52);
  color:#FDE68A;
}

:root[data-theme='dark'] .status-chip--recommendation{
  background:rgba(82,188,176,0.18);
  border-color:rgba(82,188,176,0.48);
  color:#B8FFF6;
}

:root[data-theme='dark'] .status-chip--recommendation-muted{
  background:rgba(129,140,248,0.18);
  border-color:rgba(129,140,248,0.42);
  color:#C7D2FE;
}

:root[data-theme='dark'] .recommendation-section,
:root[data-theme='dark'] .recommendation-grid article{
  background:rgba(17,28,47,0.86);
  border-color:rgba(82,188,176,0.28);
}

:root[data-theme='dark'] .recommendation-header h3,
:root[data-theme='dark'] .recommendation-grid h4{
  color:var(--text);
}

:root[data-theme='dark'] .recommendation-header p,
:root[data-theme='dark'] .recommendation-grid ul,
:root[data-theme='dark'] .recommendation-empty{
  color:#A8BED8;
}

:root[data-theme='dark'] .card-tags .pill.gray{
  background:rgba(255,255,255,0.16);
  border:1px solid rgba(255,255,255,0.32);
  color:#F1F7FF;
}

:root[data-theme='dark'] .e-contact-buttons__content-wrapper{
  background: var(--surface);
  border-color: var(--border);
}

:root[data-theme='dark'] .chat-header{
  background: #0f1a2d;
}

:root[data-theme='dark'] .chat-messages,
:root[data-theme='dark'] .chat-input-area{
  background: var(--surface);
}

:root[data-theme='dark'] .chat-input-area{
  border-top-color: var(--border);
}

:root[data-theme='dark'] .chat-bot-message{
  background: var(--chat-bg-bot);
  color: #f8fafc;
}

:root[data-theme='dark'] .chat-user-message{
  background: var(--chat-bg-user);
}

:root[data-theme='dark'] .chat-quick-prompts button{
  background: var(--surface-soft);
  border-color: rgba(82,188,176,.34);
  color: var(--text);
}

:root[data-theme='dark'] .chat-quick-prompts button:hover{
  background: rgba(82,188,176,.18);
}

:root[data-theme='dark'] .toast{
  background: #0f1a2d;
}

:root[data-theme='dark'] .faq-panel-inner,
:root[data-theme='dark'] .security-card--tips,
:root[data-theme='dark'] .cookie-consent-panel,
:root[data-theme='dark'] .cookie-consent__bar,
:root[data-theme='dark'] .cookie-consent-modal{
  background: var(--surface);
  border-color: var(--border);
}

/* =========================================================
   Dark Mode Refinements 2026-03-17
   ========================================================= */
:root[data-theme='dark'] body{
  background:#0a1324;
}

:root[data-theme='dark'] .app,
:root[data-theme='dark'] .app-main{
  background:transparent;
}

:root[data-theme='dark'] .topbar-mobile-logo,
:root[data-theme='dark'] .profile-nav-item,
:root[data-theme='dark'] .profile-nav-item:not(.is-active),
:root[data-theme='dark'] .custom-select__trigger,
:root[data-theme='dark'] .custom-select__menu,
:root[data-theme='dark'] .custom-select__option,
:root[data-theme='dark'] .modal-details,
:root[data-theme='dark'] .modal-close-btn,
:root[data-theme='dark'] .modal-share-btn,
:root[data-theme='dark'] .modal-save-btn,
:root[data-theme='dark'] .card-icon-btn,
:root[data-theme='dark'] .help-support-btn,
:root[data-theme='dark'] .chat-sources-details summary,
:root[data-theme='dark'] .chat-source-item a,
:root[data-theme='dark'] .chat-source-item span,
:root[data-theme='dark'] .cookie-btn--secondary,
:root[data-theme='dark'] .cookie-btn--ghost{
  background:var(--surface-soft);
  border-color:var(--border);
  color:var(--text);
}

:root[data-theme='dark'] .profile-nav-item{
  box-shadow:none;
}

:root[data-theme='dark'] .profile-nav-item:hover{
  border-color:rgba(82,188,176,.56);
  background:rgba(82,188,176,.18);
  color:var(--text);
}

:root[data-theme='dark'] .profile-nav-item.is-active{
  border-color:rgba(82,188,176,.64);
  background:rgba(82,188,176,.24);
  color:#d7f8f1;
}

:root[data-theme='dark'] .custom-select__trigger{
  background:var(--surface-soft);
  border-color:var(--border);
  color:var(--text);
  box-shadow:none;
}

:root[data-theme='dark'] .custom-select__trigger:hover{
  border-color:rgba(82,188,176,.58);
  background:rgba(82,188,176,.14);
}

:root[data-theme='dark'] .custom-select.open .custom-select__trigger{
  border-color:rgba(82,188,176,.66);
  box-shadow:0 0 0 3px rgba(82,188,176,.22);
}

:root[data-theme='dark'] .custom-select__value.is-placeholder{
  color:var(--muted);
}

:root[data-theme='dark'] .custom-select__icon{
  color:#8fa6c5;
}

:root[data-theme='dark'] .custom-select__menu{
  background:var(--surface);
  box-shadow:0 20px 34px rgba(2,6,23,.58);
}

:root[data-theme='dark'] .custom-select__menu::-webkit-scrollbar-thumb{
  background:rgba(148,163,184,.36);
}

:root[data-theme='dark'] .custom-select__option{
  background:var(--surface);
  color:var(--text);
}

:root[data-theme='dark'] .custom-select__option:hover{
  background:rgba(82,188,176,.16);
  border-color:rgba(82,188,176,.38);
}

:root[data-theme='dark'] .custom-select__option.is-selected{
  background:rgba(82,188,176,.22);
  border-color:rgba(82,188,176,.52);
  color:#d7f8f1;
}

:root[data-theme='dark'] .custom-select__option.is-placeholder{
  color:var(--muted);
}

:root[data-theme='dark'] .check,
:root[data-theme='dark'] .cookie-consent-row{
  background:var(--surface-soft);
  border-color:var(--border);
}

:root[data-theme='dark'] .check strong,
:root[data-theme='dark'] .cookie-consent-row strong{
  color:var(--text);
}

:root[data-theme='dark'] .check small,
:root[data-theme='dark'] .cookie-consent-row span{
  color:var(--muted);
}

:root[data-theme='dark'] .check input[type='checkbox']{
  accent-color:#52BCB0;
}

:root[data-theme='dark'] .cookie-consent-row--locked{
  background:rgba(148,163,184,0.14);
  border-color:rgba(148,163,184,0.34);
}

:root[data-theme='dark'] .filters-panel .filter-actions{
  background:var(--surface);
  border-top-color:var(--border);
}

:root[data-theme='dark'] .filter-group-title{
  box-shadow:none;
}

:root[data-theme='dark'] .help-support{
  background:linear-gradient(180deg, #122036, #111c2f);
  border-color:rgba(82,188,176,.34);
}

:root[data-theme='dark'] .help-support p,
:root[data-theme='dark'] .help-support-note{
  color:var(--muted);
}

:root[data-theme='dark'] .help-support-btn{
  border-color:rgba(82,188,176,.44);
}

:root[data-theme='dark'] .help-support-btn:hover{
  border-color:rgba(82,188,176,.62);
  background:rgba(82,188,176,.22);
  color:#e7fffb;
}

:root[data-theme='dark'] .modal-logo{
  background:var(--surface-soft);
  border-color:var(--border);
}

:root[data-theme='dark'] .modal-logo-placeholder{
  background:var(--surface-soft);
  border-color:var(--border);
  color:var(--muted);
}

:root[data-theme='dark'] .modal-kicker,
:root[data-theme='dark'] .modal-highlight span{
  color:#9fb3cc;
}

:root[data-theme='dark'] .modal-highlight strong{
  color:var(--text);
}

:root[data-theme='dark'] .modal-details{
  background:var(--surface-soft);
  border-color:var(--border);
}

:root[data-theme='dark'] .modal-detail-row{
  border-bottom-color:rgba(148,163,184,.28);
}

:root[data-theme='dark'] .modal-detail-row strong{
  color:#c7d6ea;
}

:root[data-theme='dark'] .modal-detail-row span{
  color:var(--text);
}

:root[data-theme='dark'] .modal-close-btn{
  background:var(--surface-soft);
  color:#C4D4E8;
}

:root[data-theme='dark'] .modal-share-btn,
:root[data-theme='dark'] .modal-save-btn,
:root[data-theme='dark'] .card-icon-btn{
  background:rgba(17,28,47,0.92);
  border-color:rgba(148,163,184,0.34);
  color:#CFE0F6;
}

:root[data-theme='dark'] .modal-close-btn:hover,
:root[data-theme='dark'] .modal-share-btn:hover,
:root[data-theme='dark'] .modal-save-btn:hover,
:root[data-theme='dark'] .card-icon-btn:hover{
  border-color:rgba(82,188,176,.56);
  background:rgba(82,188,176,.2);
  color:#e7fffb;
}

:root[data-theme='dark'] .card-icon-btn.is-saved,
:root[data-theme='dark'] .modal-save-btn.is-saved{
  color:#FBBF24;
  border-color:rgba(251,191,36,0.54);
  background:rgba(251,191,36,0.14);
}

:root[data-theme='dark'] .card-icon-btn.is-saved:hover,
:root[data-theme='dark'] .modal-save-btn.is-saved:hover{
  border-color:rgba(251,191,36,0.72);
  background:rgba(251,191,36,0.22);
  color:#FDE68A;
}

:root[data-theme='dark'] .profile-save-banner{
  border-color:rgba(245,158,11,.48);
  background:rgba(146,64,14,.34);
  color:#fde68a;
}

:root[data-theme='dark'] .section-entry-btn{
  border-color:rgba(148,163,184,.34);
  background:linear-gradient(180deg, #13243f, #0f1f35);
}

:root[data-theme='dark'] .section-entry-btn:hover{
  border-color:rgba(82,188,176,.62);
  background:linear-gradient(180deg, #132842, #11334a);
  box-shadow:0 12px 26px rgba(2,6,23,.36);
}

:root[data-theme='dark'] .section-entry-btn.is-active{
  border-color:rgba(82,188,176,.62);
  background:linear-gradient(180deg, rgba(17,56,74,.92), rgba(14,45,60,.96));
  box-shadow:0 0 0 2px rgba(82,188,176,.22);
}

:root[data-theme='dark'] .section-entry-btn strong{
  color:var(--text);
}

:root[data-theme='dark'] .section-entry-btn small{
  color:#aac0de;
}

:root[data-theme='dark'] .security-step-list li{
  color:#bfd0e6;
}

:root[data-theme='dark'] .security-password-status{
  color:#9eb5d4;
}

:root[data-theme='dark'] .security-password-status.is-success{
  color:#34d399;
}

:root[data-theme='dark'] .security-password-status.is-error{
  color:#fca5a5;
}

:root[data-theme='dark'] .security-card{
  background:var(--surface-soft);
  border-color:var(--border);
}

:root[data-theme='dark'] .security-card--danger{
  background:rgba(127,29,29,.26);
  border-color:rgba(248,113,113,.4);
}

:root[data-theme='dark'] .security-card__head h3{
  color:var(--text);
}

:root[data-theme='dark'] .company-summary-card{
  background:var(--surface);
  border-color:var(--border);
}

:root[data-theme='dark'] .company-summary-card span{
  color:var(--text-muted);
}

:root[data-theme='dark'] .company-summary-card strong{
  color:var(--text);
}

:root[data-theme='dark'] .security-badge--muted{
  background:var(--surface);
  border-color:var(--border);
  color:var(--muted);
}

:root[data-theme='dark'] .security-session-list li{
  background:var(--surface-soft);
}

:root[data-theme='dark'] .security-session-list strong{
  color:#d9e6f7;
}

:root[data-theme='dark'] .security-session-list small{
  color:#b7c9e1;
}

:root[data-theme='dark'] .security-card--danger .muted,
:root[data-theme='dark'] .security-card--danger p{
  color:#c6d7ee;
}

:root[data-theme='dark'] .security-card--tips ul{
  color:#bccde4;
}

:root[data-theme='dark'] .security-card--tips li::marker{
  color:#7f95b2;
}

:root[data-theme='dark'] {
  --chat-panel-bg: var(--surface);
  --chat-panel-border: var(--border);
  --chat-panel-shadow: 0 20px 42px rgba(2, 6, 23, 0.62);
  --chat-header-bg: linear-gradient(135deg, #143149, #184D62);
  --chat-header-text: #F2FCFF;
  --chat-header-border: rgba(148, 163, 184, 0.44);
  --chat-header-border-hover: rgba(148, 163, 184, 0.62);
  --chat-body-bg: linear-gradient(180deg, #101B30, #0F1B30);
  --chat-bubble-bot-bg: var(--surface-soft);
  --chat-bubble-bot-border: rgba(148, 163, 184, 0.34);
  --chat-bubble-bot-text: var(--text);
  --chat-bubble-user-bg: linear-gradient(135deg, #1F6E64, #2F8F83);
  --chat-bubble-user-text: #E9FFFB;
  --chat-chip-bg: rgba(82, 188, 176, 0.12);
  --chat-chip-bg-hover: rgba(82, 188, 176, 0.22);
  --chat-chip-border: rgba(82, 188, 176, 0.34);
  --chat-chip-border-hover: rgba(82, 188, 176, 0.52);
  --chat-input-bg: var(--surface-soft);
  --chat-input-border: var(--border);
  --chat-input-placeholder: var(--muted);
  --chat-send-bg: rgba(82, 188, 176, 0.24);
  --chat-send-bg-hover: rgba(82, 188, 176, 0.38);
  --chat-send-text: #E9FFFC;
}

:root[data-theme='dark'] .e-contact-buttons__content-wrapper {
  background: var(--chat-panel-bg);
  border-color: var(--chat-panel-border);
  box-shadow: var(--chat-panel-shadow);
}

:root[data-theme='dark'] .chat-header {
  background: var(--chat-header-bg);
  color: var(--chat-header-text);
}

:root[data-theme='dark'] .chat-close-btn {
  border-color: var(--chat-header-border);
  color: var(--chat-header-text);
}

:root[data-theme='dark'] .chat-close-btn:hover {
  border-color: var(--chat-header-border-hover);
}

:root[data-theme='dark'] .chat-messages {
  background: var(--chat-body-bg);
}

:root[data-theme='dark'] .chat-quick-prompts {
  background: var(--surface);
  border-top-color: var(--border);
}

:root[data-theme='dark'] .chat-prompt-btn,
:root[data-theme='dark'] .chat-option-btn,
:root[data-theme='dark'] .chat-refine-chip {
  background: var(--chat-chip-bg);
  border-color: var(--chat-chip-border);
  color: var(--text);
}

:root[data-theme='dark'] .chat-prompt-btn:hover,
:root[data-theme='dark'] .chat-option-btn:hover,
:root[data-theme='dark'] .chat-refine-chip:hover {
  background: var(--chat-chip-bg-hover);
  border-color: var(--chat-chip-border-hover);
}

:root[data-theme='dark'] .chat-refine-chip.is-active,
:root[data-theme='dark'] .chat-refine-chip.is-active:disabled {
  color: #7dd3c7;
  border-color: rgba(125, 211, 199, 0.38);
  background: rgba(45, 212, 191, 0.14);
  box-shadow: inset 0 0 0 1px rgba(125, 211, 199, 0.08);
}

:root[data-theme='dark'] .chat-refine-chip.is-active:hover,
:root[data-theme='dark'] .chat-refine-chip.is-active:disabled:hover {
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(125, 211, 199, 0.38);
}

:root[data-theme='dark'] .chat-refine-chip.is-clear {
  color: #fda4af;
  border-color: rgba(253, 164, 175, 0.36);
  background: rgba(244, 63, 94, 0.12);
}

:root[data-theme='dark'] .chat-refine-chip.is-clear:hover {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(253, 164, 175, 0.5);
}

:root[data-theme='dark'] .chat-refine-panel {
  background:
    linear-gradient(180deg, rgba(47, 143, 131, 0.16), rgba(47, 143, 131, 0.06)),
    var(--chat-bubble-bot-bg);
  border-color: var(--chat-bubble-bot-border);
  color: var(--chat-bubble-bot-text);
}

:root[data-theme='dark'] .chat-refine-title {
  color: var(--text);
}

:root[data-theme='dark'] .chat-message.bot .bubble,
:root[data-theme='dark'] .message.bot {
  background: var(--chat-bubble-bot-bg);
  border-color: var(--chat-bubble-bot-border);
  color: var(--chat-bubble-bot-text);
}

:root[data-theme='dark'] .chat-message.user .bubble,
:root[data-theme='dark'] .message.user {
  background: var(--chat-bubble-user-bg);
  color: var(--chat-bubble-user-text);
}

:root[data-theme='dark'] .chat-input-area {
  background: var(--surface);
  border-top-color: var(--border);
}

:root[data-theme='dark'] .chat-input-area input,
:root[data-theme='dark'] #chat-input {
  background: var(--chat-input-bg);
  border-color: var(--chat-input-border);
  color: var(--text);
}

:root[data-theme='dark'] .chat-input-area input::placeholder,
:root[data-theme='dark'] #chat-input::placeholder {
  color: var(--chat-input-placeholder);
}

:root[data-theme='dark'] .chat-input-area button,
:root[data-theme='dark'] #send-button {
  background: var(--chat-send-bg);
  color: var(--chat-send-text);
}

:root[data-theme='dark'] .chat-input-area button:hover,
:root[data-theme='dark'] #send-button:hover {
  background: var(--chat-send-bg-hover);
}

:root[data-theme='dark'] .chat-source-item a,
:root[data-theme='dark'] .chat-source-item span,
:root[data-theme='dark'] .chat-sources-details summary {
  background: var(--surface-soft);
  border-color: var(--border);
}

:root[data-theme='dark'] .chat-source-item a:hover,
:root[data-theme='dark'] .chat-sources-details[open] summary {
  background: var(--chat-chip-bg-hover);
  border-color: var(--chat-chip-border-hover);
}


/* INTERESSE + SININHO REAL */
.notification-menu{
  position:relative;
  display:inline-flex;
  align-items:center;
}
.notification-dropdown{
  position:absolute;
  top:calc(100% + 12px);
  right:0;
  width:min(360px, calc(100vw - 24px));
  background:var(--card, #fff);
  border:1px solid rgba(15,23,42,.12);
  border-radius:18px;
  box-shadow:0 18px 42px rgba(15,23,42,.18);
  z-index:80;
  overflow:hidden;
}
.notification-dropdown__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.notification-dropdown__head strong{font-size:13px;color:var(--night);font-weight:1000;}
.notification-dropdown__head button{
  border:0;
  background:transparent;
  color:var(--athos-teal);
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}
.notification-dropdown__list{max-height:340px;overflow:auto;padding:8px;}
.notification-empty{margin:8px;padding:12px;color:var(--muted);font-size:13px;text-align:center;}
.notification-item{
  display:block;
  width:100%;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius:14px;
  padding:10px 11px;
  margin:0 0 8px;
  text-align:left;
  cursor:pointer;
}
.notification-item:hover{border-color:rgba(47,143,131,.35);background:#f8fafc;}
.notification-item.is-unread{border-color:rgba(47,143,131,.45);background:rgba(47,143,131,.08);}
.notification-item strong{display:block;color:var(--night);font-size:12.5px;font-weight:1000;margin-bottom:4px;}
.notification-item span{display:block;color:var(--muted);font-size:12px;line-height:1.4;}
.notification-item small{display:block;margin-top:6px;color:var(--muted);font-size:11px;}
.card-footer-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:14px;
}
.interest-btn,
.modal-interest-btn{
  border:1px solid rgba(47,143,131,.25);
  background:rgba(47,143,131,.08);
  color:var(--athos-teal);
  border-radius:14px;
  min-height:40px;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:1000;
  cursor:pointer;
  transition:.18s ease;
}
.interest-btn:hover,
.modal-interest-btn:hover{transform:translateY(-1px);border-color:rgba(47,143,131,.55);background:rgba(47,143,131,.13);}
.interest-btn.is-interested,
.modal-interest-btn.is-interested{background:var(--athos-teal);border-color:var(--athos-teal);color:#fff;}
.interest-btn[disabled],
.modal-interest-btn[disabled]{opacity:.7;cursor:wait;transform:none;}
.modal-interest-btn{min-height:42px;background:#fff;}
@media (min-width:720px){.card-footer-actions{grid-template-columns:1fr 1fr;align-items:center;}}
/* Ajuste: botão "Tenho interesse" alinhado com "Ver detalhes" no card */
.card-footer-actions .interest-btn,
.card-footer-actions .open-edital-btn{
  margin-top:0 !important;
  min-height:44px;
  height:44px;
  padding:0 14px;
  align-self:stretch;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1.15;
}
.card-footer-actions .interest-btn span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:100%;
  text-align:center;
}
.card-footer-actions .interest-btn i,
.card-footer-actions .open-edital-btn i{
  flex:0 0 auto;
}

:root[data-theme='dark'] .notification-dropdown,
:root[data-theme='dark'] .notification-item{background:#111827;border-color:rgba(148,163,184,.24);}
:root[data-theme='dark'] .notification-item:hover{background:#172033;}
:root[data-theme='dark'] .notification-item.is-unread{background:rgba(45,212,191,.12);border-color:rgba(45,212,191,.35);}
:root[data-theme='dark'] .notification-dropdown__head{border-color:rgba(148,163,184,.18);}
:root[data-theme='dark'] .modal-interest-btn{background:#111827;}


/* Meus interesses + confirmação de remoção */
#interestToggleBtn.is-active,
#savedToggleBtn.is-active{
  background:rgba(47,143,131,.12);
  color:var(--athos-teal);
}
.interest-confirm-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(4px);
}
.interest-confirm-dialog{
  width:min(420px,100%);
  border:1px solid rgba(15,23,42,.10);
  border-radius:22px;
  background:#fff;
  box-shadow:0 24px 70px rgba(15,23,42,.22);
  padding:22px;
  text-align:left;
}
.interest-confirm-dialog__icon{
  width:46px;
  height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:rgba(47,143,131,.10);
  color:var(--athos-teal);
  margin-bottom:14px;
  font-size:20px;
}
.interest-confirm-dialog h3{
  margin:0 0 8px;
  color:var(--night);
  font-size:18px;
  font-weight:1000;
}
.interest-confirm-dialog p{
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
.interest-confirm-dialog__actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px;
}
.interest-confirm-dialog__actions .btn{
  min-height:40px;
  padding:0 18px;
}
:root[data-theme="dark"] .interest-confirm-dialog{
  background:#0f172a;
  border-color:rgba(148,163,184,.22);
}
:root[data-theme="dark"] .interest-confirm-dialog h3{color:#e5e7eb;}
:root[data-theme="dark"] .interest-confirm-dialog p{color:#94a3b8;}
