/*
 * Virgem da Lapa Online — responsive foundation
 * Shared by the public portal and every independent dashboard.
 */
:root {
  --responsive-gutter: clamp(1rem, 3vw, 2rem);
  --responsive-section-gap: clamp(1.25rem, 3vw, 2.5rem);
  --responsive-control-height: 38px;
  --responsive-radius: clamp(12px, 2vw, 18px);
  --responsive-content: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
html { width: 100%; max-width: 100%; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { width: 100%; min-width: 0; max-width: 100%; margin: 0; overflow-x: clip; }
h1, h2, h3, h4, h5, h6, [id] { scroll-margin-top: 5rem; }
.skip-link {
  position: fixed;
  z-index: 20000;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: #0f3558;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }
main, header, footer, nav, section, article, aside, form, fieldset, dialog,
div, ul, ol, li { min-width: 0; }

img, picture, video, canvas, svg, iframe {
  display: block;
  max-width: 100%;
}
img, video { height: auto; }
iframe { width: 100%; border: 0; }

h1, h2, h3, h4, h5, h6, p, a, button, label, legend, th, td {
  overflow-wrap: anywhere;
  word-break: normal;
}
h1 { font-size: clamp(1.7rem, 5vw, 3rem); line-height: 1.12; }
h2 { font-size: clamp(1.35rem, 3.5vw, 2.1rem); line-height: 1.18; }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.4rem); line-height: 1.25; }
p, li, input, select, textarea, button { font-size: max(0.875rem, 14px); }

input, select, textarea, button { max-width: 100%; font: inherit; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
select, textarea { width: 100%; min-width: 0; }
textarea { resize: vertical; }
button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"],
.btn, .button, .action-btn, .admin-btn, .menu-toggle {
  min-height: var(--responsive-control-height);
  touch-action: manipulation;
}
a, button, [role="button"], input, select, textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #1674b8;
  outline-offset: 2px;
}

/* Reusable compact collections: three columns on wide screens. */
.companies-grid, .jobs-grid, .news-grid, .classificados-grid,
.compact-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.companies-grid > *, .jobs-grid > *, .news-grid > *, .classificados-grid > *,
.compact-card-grid > * { min-width: 0; }

.container, .portal-container, .page-container, .admin-container, .dashboard-container,
.content-container, .main-container, .site-container {
  width: min(100%, var(--responsive-content));
  max-width: 100%;
  margin-inline: auto;
}

.responsive-scroll, .table-responsive, .table-wrap, .admin-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.responsive-grid,
[class*="grid"] { min-width: 0; }

.admin-section-title--redundant { display: none !important; }
.admin-saas-topbar { padding: 0.75rem 1rem !important; }
.admin-saas-topbar h1 {
  margin: 0 !important;
  font-size: clamp(1.35rem, 3vw, 1.75rem) !important;
  line-height: 1.15;
}
.admin-saas-topbar + .admin-panel,
.admin-saas-topbar + section { margin-top: 0 !important; }

/* Admin > Notícias: reference implementation for the remaining dashboards. */
.news-admin-panel { gap: 0.75rem; }
.news-admin-panel > .panel-header-actions { margin-bottom: 0; }
.news-admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.625rem;
  margin: 0 0 0.25rem;
  max-width: 100%;
}
.news-admin-stats .stat-card { padding: 0.75rem !important; }
.news-admin-stats .stat-card strong { line-height: 1; }
.news-admin-table .admin-thumb {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border-radius: 8px;
}
.news-admin-table .admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.625rem;
}
.news-admin-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 0.65rem;
  min-width: 0;
  padding: 0.6rem;
  border: 1px solid #dde6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045);
}
.news-admin-card.is-hidden { opacity: 0.62; background: #f8fafc; }
.news-admin-media {
  position: relative;
  width: 76px;
  height: 64px;
  overflow: hidden;
  border-radius: 9px;
  background: #edf2f7;
}
.news-admin-media img, .news-admin-media video { width: 100%; height: 100%; object-fit: cover; }
.news-media-placeholder { display: grid; width: 100%; height: 100%; place-items: center; font-size: 1.35rem; }
.news-media-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.76);
  color: #fff;
  font-size: 0.62rem;
  transform: translate(-50%, -50%);
}
.news-admin-card-content { display: flex; min-width: 0; flex-direction: column; }
.news-admin-card-title {
  display: -webkit-box;
  overflow: hidden;
  color: #17263a;
  font-size: 0.78rem;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.news-admin-card-date { margin-top: 0.2rem; color: #94a3b8; font-size: 0.62rem; }
.news-admin-card-actions { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: auto; padding-top: 0.35rem; }
.news-admin-card-actions button {
  min-height: 30px;
  padding: 0.25rem 0.45rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #52657b;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}
.news-admin-card-actions button:hover { background: #edf4fb; color: #163e68; }
.news-admin-card-actions button.is-danger { color: #a94a4a; }
.news-admin-card-actions button:disabled { opacity: 0.45; cursor: wait; }
.news-editor-page { max-width: 980px; margin-inline: auto; }
.news-editor-form { display: grid; gap: 0.875rem; padding: 1rem; }
.news-editor-row { display: grid; gap: 0.75rem; }
.news-editor-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.news-editor-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-editor-row--status { grid-template-columns: minmax(160px, 240px); }
.news-editor-checks, .news-editor-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.news-editor-checks label { min-height: 44px; }
.news-editor-page .panel-header-actions { padding: 0.75rem; }
.news-editor-page .panel-header-actions h2 { margin: 0; font-size: 1.05rem; }
.news-editor-page .panel-header-actions .muted { margin: 0.15rem 0 0; font-size: 0.75rem; }
.news-editor-form .label { font-size: 0.68rem !important; }
.news-editor-form .field {
  min-height: 38px;
  padding: 0.5rem 0.6rem !important;
  border-radius: 8px !important;
  font-size: 0.8rem;
}
.news-editor-form textarea.field { min-height: 76px; line-height: 1.4; }
.news-editor-form textarea[name="conteudo"] { min-height: 180px; max-height: 320px; }
.news-ai-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}
.news-ai-actions button,
.news-media-field .ghost-btn,
.news-r2-btn {
  min-width: 0;
  min-height: 34px !important;
  padding: 0.35rem 0.5rem !important;
  font-size: 0.7rem !important;
  line-height: 1.15;
}
.news-media-field {
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid #dbe7f5;
  border-radius: 10px;
  background: #f8fbff;
}
.news-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  min-width: 0;
}
.news-video-field { background: #f0f7ff; }
.news-media-field-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.news-media-field-head strong { font-size: 0.75rem !important; }
.news-upload-icon-btn {
  display: inline-flex;
  width: auto;
  height: 34px;
  min-width: 0;
  min-height: 34px !important;
  padding: 0.35rem 0.55rem !important;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid #bdd2e8;
  border-radius: 9px;
  background: #fff;
  color: #194d7e;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.news-upload-icon-btn:hover { background: #eaf3fc; }
.news-upload-icon-btn:focus-visible { outline: 2px solid #1574df; outline-offset: 2px; }
.news-upload-icon-btn:disabled { opacity: 0.5; cursor: wait; }
.news-upload-icon-btn--danger { border-color: #efd4d4; color: #a93333; }
.news-upload-icon-btn--danger:hover { background: #fff2f2; }
.news-upload-source-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.upload-action-icon { display: block; width: 17px; height: 17px; flex: 0 0 auto; }
.upload-action-label { line-height: 1; white-space: nowrap; }
.news-unified-upload { width: 100%; }
.news-drive-import[hidden] { display: none !important; }
.news-drive-modal-open { overflow: hidden; }
.news-drive-import {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.75rem;
  width: min(780px, calc(100vw - 2rem));
  height: min(620px, calc(100dvh - 2rem));
  margin: auto;
  padding: 0.85rem;
  border: 1px solid #cbdced;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 0 0 100vmax rgba(14, 32, 50, 0.58), 0 24px 70px rgba(13, 43, 70, 0.28);
}
.news-drive-import-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; color: #52657b; }
.news-drive-import-head > div { display: grid; gap: 0.1rem; }
.news-drive-import-head strong { color: #173f65; font-size: 0.9rem; }
.news-drive-import-head span { font-size: 0.65rem; }
.news-drive-close { display: grid; width: 32px; height: 32px; min-width: 32px; min-height: 32px !important; padding: 0; place-items: center; border: 1px solid #d3e0ec; border-radius: 50%; background: #f4f8fc; color: #244d72; font-size: 1.25rem; cursor: pointer; }
.news-drive-close:hover { background: #e7f0f8; }
.news-drive-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.45rem; padding: 0.4rem; border: 1px solid #dbe7f3; border-radius: 10px; background: #f5f9fd; }
.news-drive-toolbar button { min-height: 30px !important; padding: 0.3rem 0.55rem; border: 1px solid #cbdbea; border-radius: 8px; background: #fff; color: #24537e; font-size: 0.65rem; font-weight: 800; cursor: pointer; }
.news-drive-toolbar button:disabled { opacity: 0.55; cursor: default; }
.news-drive-toolbar span { overflow: hidden; color: #233f59; font-size: 0.72rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.news-drive-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); align-content: start; gap: 0.55rem; min-height: 0; overflow-y: auto; padding: 0.15rem; }
.news-upload-icon-btn .material-symbols-outlined { font-size: 18px; line-height: 1; }
.upload-brand-icon { display: block; width: 18px; height: 18px; }
.upload-brand-icon--r2 { width: 23px; }

/* Indicadores de empresas: pequenos, consistentes e sem áreas vazias. */
.company-admin-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.6rem !important;
  margin-bottom: 0.75rem !important;
}
.company-overview-card {
  min-width: 0;
  min-height: 76px !important;
  padding: 0.7rem 0.8rem !important;
  border-radius: 14px !important;
  gap: 0.12rem !important;
}
.company-overview-card strong { font-size: clamp(1.2rem, 2.4vw, 1.55rem) !important; }
.company-overview-card span { font-size: clamp(0.65rem, 1.2vw, 0.76rem) !important; }
.company-overview-card small { font-size: 0.62rem !important; }

/* Select múltiplo compacto: checkbox e rótulo permanecem na mesma linha. */
.admin-form-modern .multi-check-select { min-width: 0; }
.admin-form-modern .multi-check-menu {
  width: 100%;
  max-height: 240px;
  padding: 0.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 10px;
}
.admin-form-modern .multi-check-menu .multi-check-option {
  display: grid !important;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center !important;
  justify-content: stretch !important;
  gap: 0.42rem !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0.32rem 0.4rem !important;
  text-align: left !important;
  font-size: 0.7rem !important;
  line-height: 1.2 !important;
}
.admin-form-modern .multi-check-menu .multi-check-option input {
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
}
.admin-form-modern .multi-check-menu .multi-check-option span {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left !important;
}
.news-drive-file { display: grid; min-width: 0; min-height: 0 !important; padding: 0.25rem; border: 1px solid #dbe7f4; border-radius: 8px; background: #f8fbff; color: #243b53; cursor: pointer; }
.news-drive-file.is-folder { border-color: #c9daeb; background: #f2f7fc; }
.news-drive-file:hover { border-color: #80a9cf; background: #edf6ff; }
.news-drive-thumb { display: grid; height: 76px; place-items: center; overflow: hidden; border-radius: 6px; background: #e9f1f8; }
.news-drive-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-drive-folder-icon { color: #e2a936; font-size: 2.2rem; line-height: 1; transform: scaleX(1.15); }
.news-drive-name { overflow: hidden; margin-top: 0.2rem; font-size: 0.58rem; text-overflow: ellipsis; white-space: nowrap; }
.news-drive-file.is-selected { border-color: #1574df; background: #eaf4ff; box-shadow: inset 0 0 0 1px #1574df; }
.news-drive-file.is-selected::after { content: '✓'; position: absolute; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #1574df; color: #fff; font-size: .72rem; font-weight: 900; }
.news-drive-file { position: relative; }
.news-drive-selection-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; padding-top: .15rem; border-top: 1px solid #e1ebf5; }
.news-drive-selection-actions span { margin-right: auto; color: #5a7189; font-size: .68rem; font-weight: 750; }
.news-drive-selection-actions button { min-height: 32px !important; padding: .35rem .7rem !important; font-size: .7rem !important; }

@media (max-width: 540px) {
  .news-drive-import { width: calc(100vw - 1rem); height: calc(100dvh - 1rem); padding: 0.65rem; border-radius: 13px; }
  .news-drive-files { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.35rem; }
  .news-drive-thumb { height: 64px; }
  .news-drive-toolbar { grid-template-columns: auto minmax(0, 1fr); }
  .news-drive-toolbar [data-noticia-drive-default] { grid-column: 1 / -1; }
  .news-drive-selection-actions { gap: .3rem; }
  .admin-form-modern .multi-check-menu { max-height: 205px; }
}
.news-media-help { margin: 0.35rem 0; color: #5f7895; font-size: 0.68rem; line-height: 1.3; }
.news-media-drop {
  padding: 0.65rem;
  border: 1px dashed #a9c6ea;
  border-radius: 8px;
  background: #fff;
  color: #5f7895;
  font-size: 0.72rem;
  text-align: center;
}
.news-gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.news-gallery-item { border: 1px solid #d6e4f7; border-radius: 10px; padding: 0.35rem; background: #fff; }
.news-gallery-item.is-cover { border-color: #2777b9; box-shadow: inset 0 0 0 1px #2777b9; }
.news-gallery-item-actions { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.3rem; margin-top: 0.3rem; }
.news-cover-choice { display: flex; align-items: center; gap: 0.2rem; color: #24537e; font-size: 0.65rem; font-weight: 850; cursor: pointer; }
.news-cover-choice input { width: 14px; height: 14px; margin: 0; accent-color: #1769a7; }
.news-layout-select { display: grid; gap: 0.25rem; color: #52657b; font-size: 0.68rem; font-weight: 850; text-transform: uppercase; }
.news-layout-select select { width: 100%; min-height: 36px; border: 1px solid #d5e1ed; border-radius: 9px; padding: 0.4rem 0.55rem; background: #fff; color: #243b53; font-size: 0.72rem; text-transform: none; }
.news-cover-positioner[hidden] { display: none !important; }
.news-cover-positioner { display: grid; gap: 0.35rem; margin-top: 0.5rem; padding: 0.45rem; border: 1px solid #d3e2f0; border-radius: 10px; background: #fff; }
.news-cover-positioner-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; color: #234b70; }
.news-cover-positioner-head strong { font-size: 0.7rem; }
.news-cover-positioner-head span { color: #6a7e91; font-size: 0.58rem; }
.news-cover-positioner-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 260px; overflow: hidden; border-radius: 8px; background: #172431; cursor: crosshair; touch-action: none; user-select: none; }
.news-cover-positioner-stage img { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; }
.news-cover-focus { position: absolute; width: 22px; height: 22px; border: 2px solid #fff; border-radius: 50%; background: rgba(23,105,167,.55); box-shadow: 0 0 0 2px rgba(23,105,167,.85), 0 2px 8px rgba(0,0,0,.4); transform: translate(-50%,-50%); pointer-events: none; }
.news-cover-center { justify-self: end; min-height: 28px !important; padding: 0.25rem 0.5rem; border: 1px solid #ceddeb; border-radius: 7px; background: #f5f9fc; color: #29577f; font-size: 0.62rem; font-weight: 800; cursor: pointer; }
.news-r2-btn { margin-top: 0.4rem; }
.news-video-status { margin-bottom: 0.35rem; color: #5f7895; font-size: 0.7rem; }
.news-video-field video {
  width: 100%;
  height: 110px;
  max-height: 110px !important;
  border-radius: 8px !important;
  object-fit: contain;
}
.news-editor-checks { gap: 0.4rem; }
.news-editor-checks label { min-height: 34px; font-size: 0.72rem; }
.news-editor-checks input { width: 16px; height: 16px; }
.news-editor-actions button { min-height: 36px; padding: 0.4rem 0.65rem; font-size: 0.75rem; }

dialog, .modal, [class*="modal-content"], [class*="dialog"] {
  max-width: min(calc(100vw - 2rem), 760px);
  max-height: min(calc(100dvh - 2rem), 900px);
  overscroll-behavior: contain;
}

@media (max-width: 1024px) {
  :root { --responsive-gutter: clamp(1rem, 2.5vw, 1.5rem); }
  .portal-main, .admin-main, .dashboard-main, .page-main, main[role="main"] {
    max-width: 100%;
  }
  .form-row, .form-grid, .filters-grid, .filter-grid,
  .details-grid, .content-grid, .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 700px) {
  :root {
    --responsive-gutter: 1rem;
    --responsive-section-gap: 1.25rem;
    --responsive-control-height: 38px;
  }

  body { font-size: 14px; }
  input, select, textarea { font-size: 16px; }
  .portal-main, .admin-main, .dashboard-main, .page-main, main[role="main"] {
    width: 100%;
    padding-inline: var(--responsive-gutter);
  }

  .form-row, .form-grid, .filters-grid, .filter-grid, .details-grid,
  .content-grid, .dashboard-grid, .modal-fields .form-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .companies-grid, .jobs-grid, .news-grid, .classificados-grid,
  .compact-card-grid, .admin-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }
  .companies-grid img, .jobs-grid img, .news-grid img, .classificados-grid img,
  .companies-grid video, .jobs-grid video, .news-grid video, .classificados-grid video,
  .compact-card-grid img, .compact-card-grid video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
  .companies-grid h3, .jobs-grid h3, .news-grid h3, .classificados-grid h3,
  .compact-card-grid h3 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.72rem !important;
    line-height: 1.18 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  .companies-grid p, .jobs-grid p, .news-grid p, .classificados-grid p,
  .compact-card-grid p { font-size: 0.65rem !important; }

  /* Compact collections: fit as many concise cards as remain readable. */
  .stats-grid, .metrics-grid, .admin-grid-metrics,
  .cards-grid, .card-grid, [data-dashboard-metrics] {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr)) !important;
    gap: 0.625rem !important;
  }
  .stats-grid > *, .metrics-grid > *, .admin-grid-metrics > *,
  .cards-grid > *, .card-grid > *, [data-dashboard-metrics] > * {
    min-width: 0;
    padding: 0.75rem !important;
    border-radius: 12px !important;
  }
  .stat-card strong, .metric-card strong { font-size: clamp(1.35rem, 7vw, 1.8rem) !important; }
  .metric-card { align-items: flex-start !important; gap: 0.625rem !important; }
  .metric-icon { width: 40px !important; height: 40px !important; border-radius: 10px !important; }

  .toolbar, .actions, .form-actions, .modal-footer, .page-actions,
  .admin-actions, .filter-actions, .header-actions, .card-actions,
  [class*="toolbar-actions"], [class*="action-bar"] {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 0.625rem;
  }
  .form-actions > *, .modal-footer > *, .page-actions > *,
  .admin-actions > *, .filter-actions > * { flex: 1 1 140px; }
  .admin-saas-topbar { min-height: 0; padding: 0.65rem 0.8rem !important; }
  .admin-saas-topbar h1 { font-size: 1.35rem !important; }
  .panel-header-actions { gap: 0.5rem !important; }
  .news-admin-panel { padding: 0.65rem !important; }
  .news-admin-panel > .panel-header-actions .muted { font-size: 0.75rem; line-height: 1.25; }
  .news-admin-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.35rem !important;
  }
  .news-admin-stats .stat-card { padding: 0.5rem !important; }
  .news-admin-stats .stat-card span {
    display: block;
    font-size: clamp(0.58rem, 2.5vw, 0.7rem) !important;
    line-height: 1.15;
    overflow-wrap: normal;
  }
  .news-admin-stats .stat-card strong {
    margin-top: 0.2rem;
    font-size: clamp(1.15rem, 6vw, 1.5rem) !important;
  }
  .news-editor-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-editor-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-editor-row--3 > :last-child { grid-column: 1 / -1; }
  .news-editor-form { padding: 0.6rem; gap: 0.55rem; }
  .news-editor-actions > * { flex: 1 1 130px; }
  .news-ai-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .news-media-field-head { align-items: flex-start; }
  .news-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
  .news-media-field { padding: 0.45rem; }
  .news-media-field-head { display: flex; gap: 0.3rem; }
  .news-media-help { font-size: 0.6rem; }
  .news-video-field video { height: 88px; max-height: 88px !important; }
  .news-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
    gap: 0.4rem;
  }
  .news-admin-card {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.42rem;
    border-radius: 10px;
  }
  .news-admin-media { width: 100%; height: 68px; border-radius: 7px; }
  .news-admin-card-title { font-size: 0.7rem; line-height: 1.2; }
  .news-admin-card-date { font-size: 0.55rem; }
  .news-admin-card-actions { gap: 0.1rem; padding-top: 0.2rem; }
  .news-admin-card-actions button {
    min-width: 0;
    min-height: 32px;
    flex: 1 1 0;
    padding: 0.2rem 0.15rem;
    font-size: 0.6rem;
  }

  /* Tables become labelled records. JS supplies data-label from each header. */
  table.responsive-card-table {
    display: block;
    width: 100%;
    min-width: 0 !important;
    border: 0;
    background: transparent;
  }
  table.responsive-card-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  table.responsive-card-table tbody,
  table.responsive-card-table tr,
  table.responsive-card-table td { display: block; width: 100%; }
  table.responsive-card-table tbody { display: grid; gap: 0.875rem; }
  table.responsive-card-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.75rem;
    padding: 0.875rem;
    border: 1px solid rgba(127, 127, 127, 0.22);
    border-radius: var(--responsive-radius);
    background: var(--responsive-card-bg, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  }
  table.responsive-card-table tr[hidden] { display: none; }
  table.responsive-card-table td {
    height: auto !important;
    min-height: 38px;
    padding: 0.55rem 0 !important;
    border: 0 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  table.responsive-card-table td:first-child,
  table.responsive-card-table td:last-child,
  table.responsive-card-table td[colspan] { grid-column: 1 / -1; }
  table.responsive-card-table td + td { border-top: 1px solid rgba(127, 127, 127, 0.15) !important; }
  table.responsive-card-table td:not([data-label=""]):not([colspan])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
  }
  table.responsive-card-table td:last-child {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem !important;
  }
  table.responsive-card-table td:last-child::before { flex-basis: 100%; }
  table.responsive-card-table td:last-child > button,
  table.responsive-card-table td:last-child > a { flex: 1 1 112px; }
  table.responsive-card-table .table-title {
    display: flex !important;
    align-items: flex-start;
    gap: 0.625rem;
  }
  .news-admin-table .table-title strong { font-size: 0.8rem; line-height: 1.25; }
  .news-admin-table .table-title small { font-size: 0.68rem; }
  .news-admin-table td[data-label="Categoria"],
  .news-admin-table td[data-label="Status"] { display: none !important; }
  .news-admin-table td[data-label="Atualizado"] {
    grid-column: 1 / -1;
    min-height: 0;
    padding: 0.2rem 0 !important;
    border-top: 0 !important;
    color: #94a3b8;
    font-size: 0.66rem;
    line-height: 1.2;
  }
  .news-admin-table td[data-label="Atualizado"]::before { display: none !important; }
  table.responsive-card-table .admin-thumb,
  table.responsive-card-table .company-thumb {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }
  table.responsive-card-table .empty-state,
  table.responsive-card-table td[colspan] { text-align: center !important; }

  .table-responsive:has(.responsive-card-table),
  .table-wrap:has(.responsive-card-table),
  .admin-table-wrap:has(.responsive-card-table) { overflow: visible; }

  dialog, .modal, [class*="modal-content"], [class*="dialog"] {
    width: calc(100vw - 1rem) !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100dvh - 1rem) !important;
    margin: auto;
  }
  .modal-body, [class*="modal-body"] { overflow-y: auto; padding: 1rem !important; }
  .modal-header, .modal-footer { padding: 0.875rem 1rem !important; }

  [style*="min-width"] { min-width: 0 !important; }
  [style*="width:100%"], [style*="width: 100%"] { max-width: 100% !important; }
}

@media (max-width: 420px) {
  :root { --responsive-gutter: 0.75rem; }
  h1 { font-size: clamp(1.5rem, 8vw, 2rem); }
  h2 { font-size: clamp(1.2rem, 6vw, 1.55rem); }
  .portal-main, .admin-main, .dashboard-main, .page-main, main[role="main"] {
    padding-inline: var(--responsive-gutter);
  }
  .card, [class*="-card"], [class$="card"] { max-width: 100%; }
  .stats-grid, .metrics-grid, .admin-grid-metrics,
  .cards-grid, .card-grid, [data-dashboard-metrics] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .news-admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  table.responsive-card-table tr { padding: 0.65rem; row-gap: 0; }
  table.responsive-card-table td { min-height: 34px; padding-block: 0.4rem !important; }
  table.responsive-card-table td:not([data-label=""]):not([colspan])::before {
    font-size: 0.65rem;
    margin-bottom: 0.12rem;
  }
  .form-actions > *, .modal-footer > *, .page-actions > *, .admin-actions > * {
    flex-basis: 100%;
    width: 100%;
  }
}

@media (max-width: 320px) {
  .news-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .news-admin-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); }
  .news-admin-media { width: 64px; height: 58px; }
}

/* Base única de cards compactos: evita exceções que voltavam a uma coluna no mobile. */
@media (max-width: 700px) {
  .company-admin-overview,
  .admin-grid-cards,
  .guide-card-grid,
  .vagas-grid,
  .news-grid,
  .event-grid,
  .home-jobs-grid,
  .classified-grid,
  .company-card-grid,
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .company-overview-card,
  .admin-grid-cards > *,
  .guide-card-grid > *,
  .vagas-grid > *,
  .news-grid > *,
  .event-grid > *,
  .home-jobs-grid > *,
  .classified-grid > * {
    min-width: 0;
    min-height: 0;
    padding: 0.6rem !important;
    border-radius: 12px !important;
  }

  .company-overview-card strong { font-size: clamp(1.1rem, 6vw, 1.45rem); }
  .company-overview-card span { font-size: 0.7rem; }
  .company-overview-card small { display: none; }

  /* Métricas seguem o conteúdo: sem alturas reservadas ou linhas esticadas. */
  .admin-saas .company-admin-overview {
    grid-auto-rows: minmax(0, auto) !important;
    align-items: start !important;
  }

  .admin-saas .company-overview-card {
    height: auto !important;
    min-height: 0 !important;
    align-self: start !important;
    justify-content: flex-start !important;
    padding: 0.55rem 0.6rem !important;
  }

  .vagas-grid .vaga-card,
  .home-jobs-grid .home-job-card {
    min-height: 0 !important;
  }

  .news-grid img,
  .event-grid img,
  .classified-grid img,
  .company-card-grid img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }
}

@media (max-width: 380px) {
  .company-admin-overview,
  .admin-grid-cards,
  .guide-card-grid,
  .vagas-grid,
  .news-grid,
  .event-grid,
  .home-jobs-grid,
  .classified-grid,
  .company-card-grid,
  .listing-grid { gap: 0.4rem !important; }
}

/* Regra final do componente para não ser sobrescrita pelos estilos genéricos de label. */
.company-editor-shell .admin-form-modern .multi-check-menu label.multi-check-option,
.company-admin-row .multi-check-menu label.multi-check-option {
  display: grid !important;
  grid-template-columns: 16px 24px minmax(0, 1fr) !important;
  grid-auto-flow: column !important;
  align-items: center !important;
  justify-items: start !important;
  flex-direction: row !important;
  gap: 0.38rem !important;
  min-height: 34px !important;
  padding: 0.3rem 0.42rem !important;
  text-align: left !important;
}
.company-editor-shell .multi-check-option input,
.company-admin-row .multi-check-option input {
  grid-column: 1 !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
}
.multi-check-option-icon {
  grid-column: 2 !important;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 7px;
  background: #edf5fd;
  font-size: 0.78rem;
  line-height: 1;
}
.multi-check-option-label {
  grid-column: 3 !important;
  min-width: 0;
  color: #263b55;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: left !important;
}
.multi-check-option:has(input:checked) {
  background: #e9f3ff !important;
  color: #174f86;
}
.multi-check-option:focus-within {
  outline: 2px solid #3485d1;
  outline-offset: -2px;
}

.company-contact-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  min-width: 0;
}
.admin-form-modern .company-contact-mini-grid .company-compact-field {
  min-width: 0;
  gap: 0.22rem;
  font-size: 0.7rem;
}
.company-compact-field-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: #294d72;
  font-weight: 750;
}
.company-compact-field-label svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.admin-form-modern .company-contact-mini-grid input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0.38rem 0.55rem;
  border-radius: 8px;
  font-size: 0.74rem;
}
.company-description-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.company-description-improve-btn {
  display: inline-flex;
  min-height: 30px !important;
  padding: 0.28rem 0.52rem !important;
  align-items: center;
  gap: 0.28rem;
  border: 1px solid #c8dcef;
  border-radius: 8px;
  background: #f4f9ff;
  color: #245b91;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
}
.company-description-improve-btn svg { width: 15px; height: 15px; }
.company-description-improve-btn:hover { background: #e8f3ff; }
.company-description-improve-btn:focus-visible { outline: 2px solid #247ad0; outline-offset: 2px; }
.company-description-improve-btn:disabled { opacity: 0.65; cursor: wait; }

@media (max-width: 380px) {
  .company-contact-mini-grid { gap: 0.35rem; }
  .admin-form-modern .company-contact-mini-grid input {
    padding-inline: 0.42rem;
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Administração de empresas: faixa compacta e filtros densos no mobile. */
@media (max-width: 700px) {
  .admin-saas-main { gap: 0.55rem; }

  .admin-saas-topbar {
    align-items: center;
    flex-direction: row;
    gap: 0.45rem;
    padding: 0.6rem 0.7rem !important;
    border-radius: 12px;
  }

  .admin-saas-topbar h1 {
    flex: 0 0 auto;
    font-size: 1.25rem !important;
    line-height: 1.1;
    white-space: nowrap;
  }

  .admin-saas-topbar-actions {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.35rem;
  }

  .admin-global-search { flex: 1 1 auto; min-width: 0; }
  .admin-global-search input {
    width: 100%;
    min-height: 34px;
    padding: 0.4rem 0.55rem;
    font-size: 0.72rem;
  }

  .admin-primary-btn {
    min-height: 34px;
    padding: 0.4rem 0.55rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .admin-panel-card {
    padding: 0.65rem;
    border-radius: 12px;
  }

  .admin-panel-card > .panel-header-actions {
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
  }

  .admin-panel-card > .panel-header-actions h2 {
    flex: 0 0 auto;
    font-size: 1rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  .panel-header-tools {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.3rem;
  }

  .panel-header-tools .ghost-btn {
    min-height: 32px;
    padding: 0.32rem 0.45rem;
    border-radius: 8px;
    font-size: 0.66rem;
    white-space: nowrap;
  }

  .filter-grid {
    grid-template-columns: 1fr !important;
    gap: 0.38rem;
  }

  .filter-grid select,
  .filter-grid input {
    min-height: 34px;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    font-size: 0.74rem;
  }
}

@media (min-width: 430px) and (max-width: 700px) {
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Texto operacional curto nunca quebra: reduz, oculta e sinaliza excesso com reticências. */
.admin-saas .company-overview-card,
.admin-saas .metric-card,
.admin-saas .stat-card { min-width: 0; }

.admin-saas .company-overview-card strong,
.admin-saas .company-overview-card span,
.admin-saas .company-overview-card small,
.admin-saas .metric-card p,
.admin-saas .metric-card strong,
.admin-saas .metric-card span,
.admin-saas .stat-card strong,
.admin-saas .stat-card span,
.admin-saas .panel-header-actions h2,
.admin-saas .table-meta {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

/* Largura fluida: cada card ocupa apenas o espaço disponível, sem sobras artificiais. */
.admin-saas .company-overview-card,
.admin-saas .metric-card,
.admin-saas .stat-card,
.admin-saas .admin-panel-card,
.admin-saas .filter-grid > * {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.admin-saas :where(button, input, select, th, h1, h2, h3, h4, h5, h6) {
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .admin-saas .company-admin-overview {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .admin-saas .company-overview-card {
    flex: 0 1 auto;
    width: fit-content !important;
    max-width: 100%;
  }

  .admin-saas .company-overview-card:last-child:nth-child(odd) {
    grid-column: auto;
  }
}
/* Cases de Sucesso — painel compacto e responsivo */
.cases-admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:start}
.case-admin-card{min-width:0;border:1px solid #d7e2ee;border-radius:10px;background:#fff;overflow:hidden;cursor:pointer;outline:0}
.case-admin-card:focus-visible{box-shadow:0 0 0 3px rgba(36,122,208,.24);border-color:#247ad0}
.case-admin-card>img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:#edf2f5}
.case-admin-card-body{padding:9px;display:grid;gap:3px}
.case-admin-card h4,.case-admin-card p{margin:0;min-width:0;overflow:hidden;text-overflow:ellipsis}
.case-admin-card h4{white-space:nowrap;font-size:14px;color:#163b5c}
.case-admin-card span,.case-admin-card p,.case-admin-status{font-size:11px;color:#5c7282}
.case-admin-card p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.35}
.case-admin-status{color:#247a50;white-space:nowrap}
.case-admin-card-actions{display:flex;gap:5px;margin-top:3px;align-items:center}
.case-admin-card-action{min-height:26px;padding:3px 7px;border:1px solid #c9dceb;border-radius:6px;background:#f8fbff;color:#1f5f95;font:700 10px/1 system-ui,sans-serif;white-space:nowrap;cursor:pointer}
.case-admin-card-action:hover,.case-admin-card-action:focus-visible{border-color:#247ad0;background:#edf6ff}
.case-admin-card-action.is-danger{border-color:#f1c9c9;color:#b42318;background:#fffafa}
.case-admin-card-action.is-danger:hover,.case-admin-card-action.is-danger:focus-visible{border-color:#d14343;background:#fff0f0}
.case-admin-modal{width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:0;border-radius:12px}
.case-admin-modal::backdrop{background:rgba(16,36,54,.55)}
.case-admin-modal-inner{max-height:calc(100dvh - 24px);overflow:auto;padding:16px}
.cases-admin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.cases-admin-form-grid label{display:grid;gap:4px;min-width:0;font-size:11px;font-weight:800;color:#24485f}
.cases-admin-form-grid input,.cases-admin-form-grid select,.cases-admin-form-grid textarea{width:100%;box-sizing:border-box;min-width:0;border:1px solid #d3e0e8;border-radius:7px;padding:8px;font:inherit}
.cases-admin-full{grid-column:1/-1}
.admin-inline-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}
@media(max-width:768px){.cases-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.cases-admin-form-grid{grid-template-columns:1fr}.cases-admin-full{grid-column:auto}.case-admin-card h4{font-size:12px}.case-admin-card-body{padding:7px}}
