/* ================= Calendário de editais ================= */
.pill--new { background: var(--blue-soft); color: var(--blue); }

/* ---------- Antes do cadastro: mapa decorativo atrás do texto ---------- */
.ed-hero { min-height: 520px; }
.ed-hero__map { position: absolute; z-index: -1; right: 30%; top: 50%; width: min(560px, 55%); transform: translate(20%, -50%); opacity: .5; pointer-events: none; filter: drop-shadow(0 20px 40px rgba(0,0,0,.25)); }
.ed-hero__map .ed-state { stroke: rgba(255,255,255,.22); }

/* ---------- SVG do mapa ---------- */
.ed-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ed-state { fill: rgba(255,255,255,.07); stroke: rgba(255,255,255,.28); stroke-width: .8; vector-effect: non-scaling-stroke; transition: fill .25s, opacity .25s, stroke .2s; cursor: default; outline: none; }
.ed-state.l1 { fill: #2547de; }
.ed-state.l2 { fill: #3a6cf2; }
.ed-state.l3 { fill: #2f9ff2; }
.ed-state.l4 { fill: var(--cyan); }
.ed-map .ed-state { cursor: pointer; }
.ed-map .ed-state:hover, .ed-map .ed-state:focus-visible { stroke: #fff; stroke-width: 2; filter: brightness(1.18); }
.ed-svg.has-active .ed-state:not(.is-active) { opacity: .35; }
.ed-state.is-active { fill: #fff; stroke: var(--cyan); stroke-width: 2.5; }
.ed-dots { pointer-events: none; }
.ed-dot { fill: #3cf0a5; stroke: var(--navy); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.ed-pulse { fill: #3cf0a5; opacity: .6; transform-box: fill-box; transform-origin: center; animation: ed-pulse 1.8s ease-out infinite; }
@keyframes ed-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(3.2); opacity: 0; } }

/* ---------- Cabeçalho do calendário ---------- */
.ed-app { display: flex; flex-direction: column; gap: 20px; }
.ed-app[hidden] { display: none; }
.ed-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ed-head__title { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.01em; margin-top: 8px; }
.ed-head__sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.ed-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ed-stat { display: flex; flex-direction: column; min-width: 104px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ed-stat b { font-size: 24px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--blue); }
.ed-stat span { font-size: 12px; color: var(--muted); line-height: 1.3; }
.ed-stat--open b { color: #079455; }
.ed-careers { margin-bottom: 0; }
.cat-chip.is-mine:not(.is-active) { border-color: var(--blue); color: var(--blue); }

/* ---------- Atlas: mapa + painel ---------- */
.ed-atlas { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, 1fr); gap: 20px; align-items: start; }
.ed-map-card { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--radius-xl); color: #fff; background: radial-gradient(120% 120% at 0% 0%, #1f47f0 0%, var(--blue-800) 45%, var(--navy) 100%); box-shadow: var(--shadow-lg); position: sticky; top: 24px; }
.ed-map-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%); }
.ed-map-card::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; z-index: -1; background: radial-gradient(circle, rgba(0,205,245,.35), transparent 65%); }
.ed-map-card__top, .ed-map-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ed-legend { display: flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255,255,255,.7); }
.ed-legend i { width: 18px; height: 10px; border-radius: 3px; }
.ed-legend span:first-child { margin-right: 3px; }
.ed-legend span:last-child { margin-left: 3px; }
.ed-legend .l1 { background: #2547de; } .ed-legend .l2 { background: #3a6cf2; } .ed-legend .l3 { background: #2f9ff2; } .ed-legend .l4 { background: var(--cyan); }
.ed-legend__open { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.8); }
.ed-legend__open i { width: 9px; height: 9px; border-radius: 50%; background: #3cf0a5; box-shadow: 0 0 0 4px rgba(60,240,165,.2); }
.ed-map { aspect-ratio: 613 / 600; width: 100%; max-height: 640px; margin: 0 auto; }
.ed-tip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: #fff; color: var(--text); font-size: 13px; white-space: nowrap; box-shadow: 0 12px 30px -8px rgba(0,0,0,.45); }
.ed-tip b { font-size: 14px; }
.ed-tip span { color: var(--muted); }
.ed-tip em { font-style: normal; color: #079455; font-weight: 700; }
.ed-uf-select { position: relative; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; }
.ed-uf-select::after { content: ""; width: 7px; height: 7px; margin: -4px 0 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; }
.ed-uf-select svg { width: 18px; height: 18px; color: var(--cyan); }
.ed-uf-select select { appearance: none; -webkit-appearance: none; border: 0; outline: 0; background: none; color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding-right: 4px; }
.ed-uf-select select option { color: var(--text); }
.ed-uf-select:focus-within { border-color: var(--cyan); }
.ed-credit { font-size: 10px; color: rgba(255,255,255,.4); }

/* ---------- Painel com a lista ---------- */
.ed-panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: 80px; }
.ed-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ed-panel__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ed-panel__uf { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; background: var(--navy); color: var(--cyan); font-weight: 800; font-size: 17px; letter-spacing: .04em; }
.ed-panel__title h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.15; }
.ed-panel__title p { color: var(--muted); font-size: 13px; }
.ed-panel__reset { width: 40px; height: 40px; border: 1px solid var(--line); }
.ed-panel__reset[hidden] { display: none; }
.ed-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ed-filter { height: 44px; font-size: 14px; }
.ed-filter select:disabled { cursor: not-allowed; opacity: .6; }
.ed-list { display: flex; flex-direction: column; gap: 12px; }
.ed-list__group { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ed-list__group svg { width: 16px; height: 16px; }
.ed-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; border: 1px dashed var(--line); border-radius: 16px; }
.ed-empty b { color: var(--text); }
.ed-empty svg { width: 26px; height: 26px; color: #9aa2bd; }
.ed-empty--sm { flex-direction: row; justify-content: center; padding: 14px; font-size: 13px; text-align: left; }
.ed-empty--sm svg { width: 18px; height: 18px; }

/* ---------- Card do concurso ---------- */
.ed-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 16px 20px; border-radius: 18px; border: 1px solid var(--line); background: #fff; transition: border-color .15s, box-shadow .2s; scroll-margin-top: 90px; }
.ed-card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: #c5cdea; }
.ed-card--open::before { background: #17b26a; }
.ed-card--pub::before { background: var(--cyan); }
.ed-card--soon::before { background: var(--blue); }
.ed-card--closed::before { background: #f79009; }
.ed-card:hover { border-color: #c5cdea; box-shadow: var(--shadow); }
.ed-card.is-flash { animation: ed-flash 1.6s ease-out; }
@keyframes ed-flash { 0%, 30% { box-shadow: 0 0 0 4px rgba(0,205,245,.55); border-color: var(--cyan); } 100% { box-shadow: none; } }
.ed-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ed-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--bg); color: var(--muted); }
.ed-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ed-status--open { background: #dcfae6; color: #067647; }
.ed-status--open i { background: #17b26a; box-shadow: 0 0 0 3px rgba(23,178,106,.2); animation: ed-blink 1.6s ease-in-out infinite; }
@keyframes ed-blink { 50% { box-shadow: 0 0 0 6px rgba(23,178,106,0); } }
.ed-status--pub { background: var(--cyan-soft); color: #0084a3; }
.ed-status--soon { background: var(--blue-soft); color: var(--blue); }
.ed-status--closed { background: #fef0c7; color: #b54708; }
.ed-card__where { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.ed-card__where svg { width: 14px; height: 14px; }
.ed-card h4 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.2; }
.ed-card h4 span { color: var(--blue); }
.ed-card__org { margin-top: -6px; font-size: 13px; color: var(--muted); }
.ed-card__facts { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 600; }
.ed-card__facts span { display: inline-flex; align-items: center; gap: 5px; }
.ed-card__facts svg { width: 15px; height: 15px; color: var(--blue); }

/* Linha do tempo: Edital → Inscrições → Prova */
.ed-steps { list-style: none; margin: 2px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-steps li { position: relative; display: flex; flex-direction: column; gap: 1px; padding-top: 18px; padding-right: 6px; }
.ed-steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--line); }
.ed-steps li:last-child::before { right: auto; width: 0; }
.ed-steps li.is-done::before { background: var(--blue); }
.ed-steps li.is-now::before { background: linear-gradient(90deg, var(--blue) 50%, var(--line) 50%); }
.ed-steps i { position: absolute; left: 0; top: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #c5cdea; z-index: 1; }
.ed-steps .is-done i { background: var(--blue); border-color: var(--blue); }
.ed-steps .is-now i { background: #17b26a; border-color: #17b26a; box-shadow: 0 0 0 4px rgba(23,178,106,.2); }
.ed-steps span { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #9aa2bd; }
.ed-steps b { font-size: 13px; font-weight: 700; line-height: 1.25; }
.ed-steps .is-now span { color: #067647; }

.ed-card__count { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 5px 10px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 700; }
.ed-card__count svg { width: 15px; height: 15px; }
.ed-card__count.is-urgent { background: #fff0ec; color: var(--hot); }
.ed-card__sum { font-size: 13.5px; color: var(--muted); }
.ed-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn--sm { height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.btn--sm svg { width: 16px; height: 16px; }

/* ---------- Próximos 90 dias ---------- */
.ed-timeline { display: grid; grid-auto-flow: column; grid-auto-columns: 250px; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.ed-event { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 4px 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); text-align: left; scroll-snap-align: start; transition: border-color .15s, transform .15s, background .15s; }
.ed-event:hover { border-color: var(--blue); background: #fff; transform: translateY(-2px); }
.ed-event__date { grid-row: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 58px; border-radius: 12px; background: var(--navy); color: rgba(255,255,255,.75); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.ed-event__date b { font-size: 22px; line-height: 1; color: #fff; }
.ed-event--end .ed-event__date { background: var(--hot); }
.ed-event--start .ed-event__date { background: #079455; }
.ed-event__body { display: flex; flex-direction: column; min-width: 0; }
.ed-event__body em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ed-event__body strong { font-size: 15px; line-height: 1.25; }
.ed-event__body small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-event__in { font-size: 12px; font-weight: 700; color: var(--blue); }

.ed-disclaimer { font-size: 12px; color: var(--muted); text-align: center; max-width: 70ch; margin: 0 auto; }

/* ---------- Responsivo ---------- */
@media (max-width: 1280px) {
  .ed-atlas { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); }
  .ed-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .ed-hero__map { right: 50%; transform: translate(50%, -50%); width: min(520px, 90%); top: 30%; opacity: .25; }
  .ed-atlas { grid-template-columns: minmax(0, 1fr); }
  .ed-map-card { position: relative; top: 0; }
  .ed-map { max-height: 520px; max-width: 560px; }
  .ed-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
}
@media (max-width: 760px) {
  .ed-hero { min-height: 0; }
  .ed-hero__map { top: 22%; width: 120%; opacity: .2; }
  .ed-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-stat { min-width: 0; }
  .ed-map-card { padding: 14px; border-radius: 22px; }
  .ed-legend span { display: none; }
  .ed-uf-select { width: 100%; }
  .ed-uf-select select { flex: 1; min-width: 0; }
  .ed-panel { padding: 14px; border-radius: 22px; }
  .ed-filters { grid-template-columns: 1fr; }
  .ed-card { padding: 14px 14px 14px 18px; }
  .ed-steps b { font-size: 12px; }
  .ed-timeline { grid-auto-columns: 82%; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-pulse, .ed-status--open i { animation: none; }
}

/* ---------- Lembrete no Google Agenda ---------- */
.ed-remind { position: relative; margin-left: auto; }
.ed-remind summary { list-style: none; cursor: pointer; }
.ed-remind summary::-webkit-details-marker { display: none; }
.ed-remind[open] summary { background: var(--blue); color: #fff; }
.ed-remind__menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 10; width: 250px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: 0 20px 40px -12px rgba(11,20,55,.35); animation: ed-pop .16s ease-out; }
.ed-remind__menu p { padding: 4px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ed-remind__menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; transition: background .12s; }
.ed-remind__menu a:hover, .ed-remind__menu a:focus-visible { background: var(--blue-soft); color: var(--blue); }
.ed-remind__menu a svg { width: 18px; height: 18px; color: var(--blue); }
.ed-remind__menu span { display: flex; flex-direction: column; line-height: 1.2; }
.ed-remind__menu small { font-size: 12px; font-weight: 500; color: var(--muted); }
@keyframes ed-pop { from { opacity: 0; transform: translateY(4px); } }
@media (max-width: 760px) {
  .ed-remind { margin-left: 0; }
  .ed-remind__menu { left: 0; right: auto; }
}

/* ---------- Aviso sobre IA ---------- */
.ed-ai-note { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.ed-ai-note svg { width: 18px; height: 18px; margin-top: 1px; color: var(--blue); }
.ed-ai-note p { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.ed-ai-note b { color: var(--text); }
.ed-ai-banner { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: 18px; background: #fffaeb; border: 1px solid #fedf89; }
.ed-ai-banner__icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: #fef0c7; color: #b54708; }
.ed-ai-banner__icon svg { width: 18px; height: 18px; }
.ed-ai-banner b { display: block; font-size: 14px; color: #7a2e0e; }
.ed-ai-banner p { font-size: 13.5px; line-height: 1.5; color: #93370d; margin-top: 2px; }
.ed-ai-banner strong { color: #7a2e0e; }
.ed-disclaimer a { color: var(--blue); font-weight: 600; text-decoration: underline; }
@media (max-width: 760px) {
  .ed-ai-banner { padding: 12px 14px; gap: 10px; }
  .ed-ai-banner__icon { width: 30px; height: 30px; }
}

/* ---------- Concursos com curso da Sensu (prioridade) ---------- */
.ed-card--sensu { border-color: #b9c6fb; background: linear-gradient(180deg, #f5f7ff 0%, #fff 90px); box-shadow: 0 10px 28px -18px rgba(21,57,217,.5); }
.ed-card--sensu::before { background: linear-gradient(180deg, var(--blue), var(--cyan)); }
.ed-sensu { display: inline-flex; align-items: center; gap: 6px; width: fit-content; margin: -2px 0 2px; padding: 4px 10px 4px 8px; border-radius: 99px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; transition: background .15s; }
.ed-sensu svg { width: 14px; height: 14px; color: var(--cyan); }
.ed-sensu:hover { background: var(--blue); }
.cat-chip--sensu svg { width: 15px; height: 15px; color: var(--blue); }
.cat-chip--sensu.is-active svg { color: var(--cyan); }
.cat-chip--sensu:not(.is-active) { border-color: #b9c6fb; background: #f5f7ff; color: var(--blue); font-weight: 700; }
.ed-event.is-sensu { border-color: #b9c6fb; background: #f5f7ff; }
.ed-event__in i { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-style: normal; color: var(--navy); }
.ed-event__in i svg { width: 12px; height: 12px; color: var(--blue); }

/* ---------- Prévia bloqueada (antes do cadastro) ---------- */
.ed-preview[hidden] { display: none; }
.ed-preview__chips { pointer-events: none; margin-bottom: 18px; }
.ed-preview__stage { position: relative; }
.ed-preview .ed-map-card { position: relative; top: 0; }
.ed-preview .ed-state { cursor: default; }
.ed-preview__panel { position: relative; overflow: hidden; max-height: 640px; }
.ed-preview__panel .ed-list { filter: blur(5px); opacity: .85; user-select: none; }
.ed-preview__panel::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, rgba(255,255,255,0), #fff 85%); pointer-events: none; }
.ed-lock { position: absolute; z-index: 3; top: 50%; right: 0; width: min(420px, calc(47% - 10px)); transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 24px; margin-right: clamp(0px, 2%, 24px); text-align: center; border-radius: 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border: 1px solid var(--line); box-shadow: 0 30px 60px -28px rgba(11,20,55,.45); }
.ed-lock__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--navy); color: var(--cyan); margin-bottom: 4px; }
.ed-lock__icon svg { width: 24px; height: 24px; }
.ed-lock b { font-family: var(--serif); font-weight: 600; font-size: 22px; }
.ed-lock p { font-size: 14px; color: var(--muted); max-width: 34ch; }
.ed-lock .btn { margin-top: 8px; }
@media (max-width: 1080px) {
  .ed-preview__panel { max-height: 520px; }
  .ed-lock { top: auto; bottom: 40px; right: 50%; transform: translateX(50%); width: min(420px, calc(100% - 32px)); margin: 0; }
}
@media (max-width: 760px) {
  .ed-preview__panel { max-height: 460px; }
  .ed-lock { bottom: 24px; padding: 20px 18px; }
  .ed-lock b { font-size: 19px; }
}
