/* =========================================================================
   AgriFlex — painel do cliente (app)
   Padrão visual = wireframes da apresentação (apresentacao/assets/css/agriflex.css),
   agora em tamanho real e responsivo. Bootstrap 5.3 para formulários,
   dropdowns, offcanvas e modais; o resto é deste arquivo (prefixo ax-).
   ========================================================================= */

:root {
  --ax: #1f9d4c;          /* verde de ação (botões, item ativo) */
  --ax-deep: #0f6b33;
  --ax-side: #0c2415;     /* barra de módulos e gaveta */
  --ax-side-line: #1d3b28;
  --ax-soft: #e3f6ea;
  --ax-tint: #f1faf4;
  --ax-light: #5fe08c;
  --ax-ink: #16211b;
  --ax-ink-2: #33443a;
  --ax-muted: #66776d;
  --ax-faint: #8a9a90;
  --ax-line: #e3e9e5;
  --ax-line-2: #eef2ef;
  --ax-bg: #f3f6f4;
  --ax-warn: #e8a33a;
  --ax-bad: #dc2626;
  --bs-body-font-family: "Inter", system-ui, sans-serif;
  --bs-primary: #1f9d4c;
  --bs-primary-rgb: 31, 157, 76;
  --bs-link-color: #0f6b33;
  --bs-link-hover-color: #1f9d4c;
}

body.ax { background: var(--ax-bg); color: var(--ax-ink); font-size: 14px; }
.ax h1, .ax h2, .ax h3, .ax h4, .ax h5, .ax-h { font-family: "Montserrat", "Inter", sans-serif; letter-spacing: -.02em; color: var(--ax-ink); }
.ax-ic { display: inline-block; vertical-align: -3px; flex: none; }

/* ---------- Casca: barra utilitária + barra de módulos + sidebar do módulo */
.ax { --ax-util-h: 60px; --ax-mods-h: 44px; --ax-modnav-w: 236px; }
.ax-util { height: var(--ax-util-h); background: #fff; border-bottom: 1px solid var(--ax-line); display: flex; align-items: center; gap: 10px; padding: 0 18px; position: sticky; top: 0; z-index: 1030; }
.ax-util__logo { display: flex; align-items: center; flex: none; margin-right: 8px; }
.ax-util__logo img { height: 28px; width: auto; }
.ax-util .ax-util__menu { display: none; }
.ax-util__ctx { min-width: 0; }

.ax-mods { height: var(--ax-mods-h); background: var(--ax-side); position: sticky; top: var(--ax-util-h); z-index: 1025; padding: 0 12px; }
.ax-mods__lista { display: flex; align-items: stretch; height: 100%; gap: 2px; flex-wrap: nowrap; min-width: 0; }
.ax-mod { position: relative; flex: none; }
.ax-mod__btn { height: var(--ax-mods-h); display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; color: #b9d0c1; font-weight: 600; font-size: 13.5px; text-decoration: none; background: transparent; border: 0; border-bottom: 3px solid transparent; white-space: nowrap; cursor: pointer; }
.ax-mod__btn svg { color: #7fb192; }
.ax-mod__btn:hover, .ax-mod:focus-within > .ax-mod__btn { color: #fff; background: #14331f; }
.ax-mod.on > .ax-mod__btn { color: #fff; border-bottom-color: var(--ax-light); background: #133a22; }
.ax-mod.on > .ax-mod__btn svg { color: var(--ax-light); }
.ax-mod__seta { width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; margin-left: 2px; }
.ax-mod__panel { position: absolute; top: 100%; left: 0; min-width: 300px; background: #fff; border: 1px solid var(--ax-line); border-radius: 0 0 14px 14px; box-shadow: 0 22px 48px -18px rgba(8,36,21,.35); padding: 10px; display: none; z-index: 1200; }
.ax-mod:hover > .ax-mod__panel, .ax-mod:focus-within > .ax-mod__panel { display: block; }
.ax-mod:hover > .ax-mod__panel--2, .ax-mod:focus-within > .ax-mod__panel--2 { display: grid; }
.ax-mod__panel--2 { grid-template-columns: repeat(2, minmax(250px, 1fr)); gap: 2px 6px; }
.ax-mod__panel--2 .ax-mod__tit { grid-column: 1 / -1; }
.ax-mod--mais { display: none; }
.ax-mod--mais .ax-mod__panel { left: auto; right: 0; }
.ax-mod__tit { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ax-faint); padding: 4px 10px 8px; }

/* item de navegação (megamenu, sidebar e gaveta usam o mesmo) */
.ax-nav__i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ax-ink-2); text-decoration: none; font-size: 13.5px; min-width: 0; }
.ax-nav__i:hover { background: var(--ax-tint); color: var(--ax-deep); }
.ax-nav__ico { width: 30px; height: 30px; border-radius: 8px; background: var(--ax-soft); color: var(--ax-deep); display: grid; place-items: center; flex: none; }
.ax-nav__txt { display: flex; flex-direction: column; min-width: 0; }
.ax-nav__txt b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-nav__txt small { font-size: 11.5px; color: var(--ax-muted); line-height: 1.3; }
.ax-nav__tag { margin-left: auto; color: var(--ax-faint); display: inline-flex; flex: none; }
.ax-nav__i.breve { color: var(--ax-muted); }
.ax-nav__i.breve .ax-nav__ico { background: #eef2ef; color: #8a9a90; }
.ax-nav__i.on { background: var(--ax-soft); color: var(--ax-deep); }
.ax-nav__i.on .ax-nav__ico { background: var(--ax); color: #fff; }

.ax-body { display: flex; align-items: flex-start; min-height: calc(100vh - var(--ax-util-h) - var(--ax-mods-h)); }
.ax-modnav { width: var(--ax-modnav-w); flex: none; align-self: stretch; background: #fff; border-right: 1px solid var(--ax-line); position: sticky; top: calc(var(--ax-util-h) + var(--ax-mods-h)); height: calc(100vh - var(--ax-util-h) - var(--ax-mods-h)); overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 1px; }
.ax-modnav .ax-nav__ico { width: 26px; height: 26px; background: transparent; }
.ax-modnav .ax-nav__i { padding: 6px 8px; font-size: 13.5px; }
.ax-modnav .ax-nav__i.on .ax-nav__ico { background: var(--ax); }
.ax-modnav__h { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ax-deep); padding: 10px 8px 8px; display: flex; gap: 7px; align-items: center; }
.ax-modnav__foot { margin-top: auto; padding: 12px 8px 4px; font-size: 11.5px; color: var(--ax-faint); display: flex; align-items: center; gap: 8px; }
.ax-modnav__foot i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; display: inline-block; flex: none; }
.ax-body > .ax-page { flex: 1; min-width: 0; }

/* gaveta do celular */
.ax-gaveta { background: var(--ax-side); color: #cfe0d5; width: 290px !important; }
.ax-gaveta .offcanvas-body { padding: 6px 12px 12px; }
.ax-gaveta .ax-nav__i { color: #b9d0c1; }
.ax-gaveta .ax-nav__i:hover, .ax-gaveta .ax-nav__i.on { background: #14331f; color: #fff; }
.ax-gaveta .ax-nav__ico { background: transparent; color: #7fb192; width: 24px; }
.ax-gaveta .ax-nav__i.on .ax-nav__ico { background: var(--ax); color: #fff; }
.ax-gaveta .ax-nav__i.breve { color: #7f9a88; }
.ax-gaveta .ax-nav__i.breve .ax-nav__ico { background: transparent; color: #4f7a60; }
.ax-gaveta .ax-nav__tag { color: #4f7a60; }
.ax-gaveta__mod summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6f9a80; cursor: pointer; }
.ax-gaveta__mod summary::-webkit-details-marker { display: none; }
.ax-gaveta__mod[open] summary { color: #fff; }
.ax-gaveta__mod .ax-nav__i { padding-left: 20px; }
.ax-gaveta .ax-modnav__foot { padding: 12px 20px; border-top: 1px solid var(--ax-side-line); color: #7fa38c; }

/* atalhos (+) */
.ax-fab { position: fixed; right: 22px; bottom: 22px; z-index: 1040; }
.ax-fab__btn { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--ax); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(15,107,51,.6); }
.ax-fab__btn:hover { background: var(--ax-deep); }
.ax-fab__menu { padding: 8px; border-radius: 14px; border: 1px solid var(--ax-line); box-shadow: 0 24px 50px -20px rgba(8,36,21,.35); min-width: 240px; }
.ax-fab__menu .dropdown-item { display: flex; align-items: center; gap: 10px; border-radius: 9px; padding: 7px 10px; font-weight: 600; font-size: 13.5px; }
.ax-fab__menu .dropdown-item:hover { background: var(--ax-tint); color: var(--ax-deep); }
.ax-ctx__links a { font-size: 12.5px; font-weight: 700; text-decoration: none; }

/* paginação */
.ax-pag { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--ax-line-2); font-size: 12.5px; color: var(--ax-muted); flex-wrap: wrap; }
.ax-pag div { display: flex; gap: 6px; }

.ax-sel { display: flex; flex-direction: column; border: 1px solid #dfe7e2; border-radius: 9px; padding: 5px 30px 5px 11px; position: relative; background: #fbfcfb; text-align: left; min-width: 0; }
.ax-sel small { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ax-faint); }
.ax-sel b { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; color: var(--ax-ink); }
.ax-sel::after { content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; border-right: 2px solid var(--ax-faint); border-bottom: 2px solid var(--ax-faint); transform: translateY(-70%) rotate(45deg); }
.ax-sel:hover { border-color: #c4d6ca; }
.ax-busca { margin-left: auto; width: 260px; height: 38px; border-radius: 9px; background: #f2f5f3; border: 1px solid var(--ax-line); display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #93a39a; font-size: 13px; }
.ax-busca input { border: 0; background: transparent; outline: 0; width: 100%; font-size: 13px; }
.ax-ibtn { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--ax-line); display: grid; place-items: center; position: relative; color: #4c5d53; background: #fff; flex: none; }
.ax-ibtn--ia { background: var(--ax); border-color: var(--ax); color: #fff; }
.ax-av { width: 38px; height: 38px; border-radius: 50%; background: var(--ax-side); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 0; flex: none; }

.ax-page { padding: 22px 24px 90px; flex: 1; }
.ax-ph { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.ax-ph__crumb { font-size: 12px; color: var(--ax-faint); font-weight: 600; margin-bottom: 3px; }
.ax-ph__crumb a { color: var(--ax-muted); text-decoration: none; }
.ax-ph__crumb a:hover { color: var(--ax-deep); text-decoration: underline; }
a.ax-chip { text-decoration: none; }
a.ax-chip:hover { filter: brightness(.95); }
.ax-ph h1 { margin: 0; font-size: 23px; font-weight: 800; }
.ax-ph p { margin: 4px 0 0; font-size: 13px; color: var(--ax-muted); }
.ax-ph__act { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Botões ------------------------------------------------------ */
.ax-btn { height: 38px; padding: 0 15px; border-radius: 9px; background: var(--ax); border: 1px solid var(--ax); color: #fff; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; text-decoration: none; cursor: pointer; }
.ax-btn:hover { background: var(--ax-deep); border-color: var(--ax-deep); color: #fff; }
.ax-btn--g { background: #fff; color: var(--ax-ink-2); border-color: #dfe7e2; }
.ax-btn--g:hover { background: var(--ax-tint); color: var(--ax-deep); border-color: #cfe6d7; }
.ax-btn--d { background: var(--ax-side); border-color: var(--ax-side); }
.ax-btn--sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.ax-btn--lg { height: 46px; font-size: 14.5px; border-radius: 11px; padding: 0 20px; }
.ax-btn--bl { width: 100%; }

/* ---------- Blocos ------------------------------------------------------ */
.ax-grid { display: grid; gap: 14px; }
.ax-c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ax-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ax-c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ax-c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ax-duas { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.ax-form-duas { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.ax-card { background: #fff; border: 1px solid var(--ax-line); border-radius: 13px; padding: 16px 18px; min-width: 0; }
.ax-card__h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.ax-card__h h3 { margin: 0; font-size: 14.5px; font-weight: 800; }
.ax-card__h span { font-size: 12px; color: var(--ax-faint); font-weight: 600; }
.ax-card__h .r { margin-left: auto; }
.ax-card--ia { background: var(--ax-tint); border-color: #bfe6cd; }
.ax-card--pad0 { padding: 0; overflow: hidden; }

.ax-kpi { background: #fff; border: 1px solid var(--ax-line); border-radius: 13px; padding: 14px 16px; min-width: 0; }
.ax-kpi__l { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ax-faint); display: flex; align-items: center; gap: 6px; }
.ax-kpi__l svg { color: var(--ax); }
.ax-kpi__v { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: "Montserrat", sans-serif; }
.ax-kpi__v small { font-size: 13px; font-weight: 700; color: var(--ax-muted); margin-left: 3px; }
.ax-kpi__s { font-size: 12px; font-weight: 600; color: var(--ax-muted); margin-top: 3px; }
.ax-kpi--vazio .ax-kpi__v { color: #b3c0b8; }

/* ---------- Tabela ------------------------------------------------------ */
.ax-tbl-wrap { overflow-x: auto; }
.ax-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.ax-tbl th { text-align: left; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ax-faint); padding: 10px 12px; background: #f7f9f8; border-bottom: 1px solid var(--ax-line); white-space: nowrap; }
.ax-tbl td { padding: 11px 12px; border-bottom: 1px solid var(--ax-line-2); vertical-align: middle; }
.ax-tbl tr:last-child td { border-bottom: 0; }
.ax-tbl tr:hover td { background: #fafcfb; }
.ax-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.ax-tbl__sub { font-size: 12px; color: var(--ax-faint); }

.ax-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.ax-chip--g { background: #e3f6ea; color: #0f6b33; }
.ax-chip--a { background: #fdf1dc; color: #9a5b06; }
.ax-chip--r { background: #fde7e7; color: #b91c1c; }
.ax-chip--b { background: #e5eefc; color: #1d4ed8; }
.ax-chip--n { background: #eef2ef; color: #55655b; }
.ax-chip--d { background: var(--ax-side); color: #fff; }

.ax-li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ax-line-2); font-size: 13px; }
.ax-li:last-child { border-bottom: 0; }
.ax-li__ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #e3f6ea; color: #0f6b33; flex: none; }
.ax-li__t { font-weight: 700; }
.ax-li__s { font-size: 12px; color: var(--ax-muted); }
.ax-li .r { margin-left: auto; text-align: right; }
.ax-li--link { color: inherit; text-decoration: none; border-radius: 9px; margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
.ax-li--link:hover { background: var(--ax-tint); color: inherit; }
.ax-li--ok .ax-li__ico { background: var(--ax); color: #fff; }

/* estado vazio */
.ax-vazio { text-align: center; padding: 36px 20px; color: var(--ax-muted); }
.ax-vazio__ico { width: 56px; height: 56px; border-radius: 16px; background: #e3f6ea; color: #0f6b33; display: grid; place-items: center; margin: 0 auto 12px; }
.ax-vazio h3 { font-size: 16px; font-weight: 800; margin: 0 0 6px; }
.ax-vazio p { margin: 0 auto; max-width: 440px; font-size: 13px; }

/* avisos */
.ax-alert { border-radius: 11px; padding: 11px 14px; font-size: 13px; font-weight: 600; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.ax-alert--ok { background: #e3f6ea; color: #0f5a2c; border: 1px solid #bfe6cd; }
.ax-alert--erro { background: #fde7e7; color: #9b1c1c; border: 1px solid #f5c2c2; }

/* ---------- Formulários ---------------------------------------------------- */
.ax .form-label { font-weight: 700; font-size: 12.5px; color: var(--ax-ink-2); margin-bottom: 5px; }
.ax .form-control, .ax .form-select { border-radius: 9px; border-color: #d9e2dc; font-size: 14px; padding: .55rem .8rem; }
.ax .form-control:focus, .ax .form-select:focus, .ax .form-check-input:focus { border-color: var(--ax); box-shadow: 0 0 0 .2rem rgba(31,157,76,.15); }
.ax .form-check-input:checked { background-color: var(--ax); border-color: var(--ax); }
.ax .form-text { font-size: 12px; }
.ax .invalid-feedback { display: block; font-size: 12px; }
.ax-form-sec { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ax-deep); margin: 8px 0 12px; }

/* seletor de contexto (dropdown do topo) */
.ax-ctx { width: 360px; padding: 16px; border-radius: 14px; border: 1px solid var(--ax-line); box-shadow: 0 24px 50px -20px rgba(8,36,21,.35); }

/* ---------- Tela de login ----------------------------------------------- */
.ax-auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.ax-auth__art { position: relative; color: rgba(255,255,255,.8); padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(180deg, rgba(4,19,11,.2) 0%, rgba(4,19,11,.85) 100%), url("../img/fotos/pecuaria.webp") center / cover; }
.ax-auth__art img { height: 34px; }
.ax-auth__art h2 { color: #fff; font-size: 30px; font-weight: 800; max-width: 440px; line-height: 1.15; }
.ax-auth__form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.ax-auth__box { width: 100%; max-width: 380px; }
.ax-auth__box h1 { font-size: 26px; font-weight: 800; margin: 0 0 6px; }
.ax-auth__box p { color: var(--ax-muted); }
.ax-auth__conta { display: inline-flex; gap: 8px; align-items: center; background: var(--ax-tint); color: var(--ax-deep); border: 1px solid #cfe6d7; border-radius: 99px; padding: 5px 12px; font-weight: 700; font-size: 12.5px; margin-bottom: 18px; }

/* ---------- Fase 1: estrutura da fazenda -------------------------------- */
.min-w-0 { min-width: 0; }
.flex-none { flex: none; }
.ax-dica { display: flex; gap: 10px; align-items: flex-start; background: #fffaf0; border: 1px solid #f6e3bd; color: #6b4a0e; border-radius: 11px; padding: 11px 14px; font-size: 13px; }
.ax-dica svg { color: #c98a14; margin-top: 1px; }
.ax-dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 16px; margin: 0 0 12px; font-size: 13px; }
.ax-dl dt { color: var(--ax-faint); font-weight: 600; }
.ax-dl dd { margin: 0; font-weight: 600; min-width: 0; }
.ax-form-1 { max-width: 760px; }
.ax-kpi__v--txt { font-size: 16px; white-space: normal; line-height: 1.25; }
.ax-tbl__off td { opacity: .6; }
.ax-ph__sel .form-select { min-width: 220px; height: 38px; padding-top: .35rem; padding-bottom: .35rem; }

/* cards de fazenda */
.ax-faz { display: flex; flex-direction: column; gap: 12px; }
.ax-faz--off { background: #fafbfa; }
.ax-faz__top { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ax-faz__nome { font-weight: 800; font-size: 15px; color: var(--ax-ink); text-decoration: none; font-family: "Montserrat", sans-serif; letter-spacing: -.01em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ax-faz__nome:hover { color: var(--ax-deep); }
.ax-faz__nums { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; background: #f7f9f8; border-radius: 10px; padding: 10px 12px; }
.ax-faz__nums b { font-size: 18px; font-weight: 800; font-family: "Montserrat", sans-serif; }
.ax-faz__nums small { font-size: 11px; color: var(--ax-muted); margin-left: 2px; font-weight: 700; }
.ax-faz__nums span { display: block; font-size: 11px; color: var(--ax-faint); font-weight: 600; }
.ax-faz__rodape { display: flex; gap: 6px; flex-wrap: wrap; }
.ax-faz__acoes { display: flex; gap: 6px; margin-top: auto; }
.ax-faz__acoes .ax-btn { flex: 1; }

/* cor por tipo de área (mapa, legenda, tabelas) */
.ax-tipo { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; flex: none; background: #94a3b8; }
.ax-tipo--pasto { background: #34d399; } .ax-tipo--talhao { background: #fbbf24; } .ax-tipo--retiro { background: #a78bfa; }
.ax-tipo--reserva { background: #047857; } .ax-tipo--app { background: #38bdf8; } .ax-tipo--sede { background: #d1d5db; }
.ax-tipo--outra { background: #f472b6; } .ax-tipo--limite { background: transparent; border: 2px dashed var(--ax-ink-2); }
.ax-tipo--ponto { border-radius: 50%; background: #2563eb; }

/* filtros em chips */
.ax-filtros { display: flex; gap: 6px; flex-wrap: wrap; }
.ax-filtros > button, .ax-filtros > a { border: 1px solid #dfe7e2; background: #fff; color: var(--ax-ink-2); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.ax-filtros > button:hover, .ax-filtros > a:hover { border-color: #bfe6cd; color: var(--ax-deep); }
.ax-filtros .on { background: var(--ax-side); border-color: var(--ax-side); color: #fff !important; }
.ax-filtros small { opacity: .65; font-weight: 700; margin-left: 2px; }
.ax-lista-top { padding: 14px 16px; border-bottom: 1px solid var(--ax-line-2); display: flex; flex-direction: column; gap: 12px; }
.ax-lista-busca { display: flex; gap: 8px; max-width: 520px; }

/* seletor segmentado (tipo de área, papéis) */
.ax-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ax-seg label { cursor: pointer; margin: 0; }
.ax-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ax-seg label > span { display: inline-flex; align-items: center; border: 1px solid #dfe7e2; border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 700; color: var(--ax-ink-2); background: #fff; }
.ax-seg input:checked + span { border-color: var(--ax); background: var(--ax-soft); color: var(--ax-deep); box-shadow: inset 0 0 0 1px var(--ax); }
.ax-seg input:focus-visible + span { outline: 2px solid var(--ax); outline-offset: 2px; }

/* mapa */
.ax-mapa { width: 100%; height: 100%; min-height: 320px; background: #1b2a20; }
.ax-mapa--mini { height: 330px; min-height: 0; }
.ax-minimapa { position: relative; min-height: 330px; }
.ax-minimapa__abrir { position: absolute; left: 12px; bottom: 12px; z-index: 500; }
.ax-mapa-pg { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; height: calc(100vh - var(--ax-util-h) - var(--ax-mods-h) - 150px); min-height: 520px; }
.ax-mapa-card { position: relative; height: 100%; }
.ax-mapa-painel { display: flex; flex-direction: column; gap: 14px; overflow-y: auto; min-height: 0; padding-right: 2px; }
.ax-mapa__barra { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 800; background: rgba(12,36,21,.94); color: #fff; border-radius: 11px; padding: 10px 12px; display: flex; gap: 10px; align-items: center; font-size: 13px; font-weight: 600; flex-wrap: wrap; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.ax-mapa__msg { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 800; background: #0f5a2c; color: #fff; border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 700; max-width: calc(100% - 32px); box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.ax-mapa__msg--erro { background: #9b1c1c; }
.ax-mapa__ha { background: var(--ax-tint); color: var(--ax-deep); border-radius: 9px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; }
.ax-mapa--desenhando { cursor: crosshair; }
.ax-rot { background: rgba(12,36,21,.82); border: 0; color: #fff; border-radius: 6px; padding: 2px 7px; box-shadow: none; font-size: 11px; line-height: 1.2; text-align: center; display: none; }
.ax-rot::before { display: none; }
.ax-rot b { display: block; font-weight: 800; }
.ax-rot small { font-size: 10px; opacity: .8; }
.ax-mapa--rotulos .ax-rot { display: block; }
.leaflet-container { font-family: "Inter", sans-serif; }
.ax-ferr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ax-ferr__b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 74px; border: 1px solid #dfe7e2; background: #fff; border-radius: 11px; font-size: 12.5px; font-weight: 700; color: var(--ax-ink-2); cursor: pointer; padding: 8px; text-align: center; margin: 0; }
.ax-ferr__b svg { color: var(--ax); }
.ax-ferr__b .ax-tipo { width: 18px; height: 18px; margin: 0; }
.ax-ferr__b:hover { border-color: var(--ax); background: var(--ax-tint); color: var(--ax-deep); }
.ax-ferr__dica { font-size: 12px; color: var(--ax-muted); margin: 12px 0 0; }
.ax-leg { display: flex; align-items: center; gap: 4px; width: 100%; border: 0; background: none; padding: 6px 0; font-size: 13px; text-align: left; }
.ax-leg span:last-child, .ax-leg-g summary > span:last-child { margin-left: auto; color: var(--ax-faint); font-weight: 600; font-size: 12px; }
.ax-leg-g summary { display: flex; align-items: center; gap: 4px; padding: 6px 0; cursor: pointer; font-size: 13px; list-style: none; }
.ax-leg-g summary::-webkit-details-marker { display: none; }
.ax-leg-cods { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 0 10px 18px; }
.ax-leg-cod { border: 1px solid #dfe7e2; background: #fff; border-radius: 7px; padding: 2px 8px; font-size: 12px; font-weight: 700; color: var(--ax-ink-2); }
.ax-leg-cod:hover { border-color: var(--ax); color: var(--ax-deep); }
.ax-modal { border-radius: 16px; border: 0; }
.ax-modal .modal-header { border-bottom: 1px solid var(--ax-line-2); }
.ax-modal .modal-title { font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 17px; }
.ax-modal .modal-footer { border-top: 1px solid var(--ax-line-2); }

/* ---------- Responsivo -------------------------------------------------- */
@media (max-width: 1199px) {
  .ax-c5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ax-busca { width: 200px; }
}
@media (max-width: 991px) {
  .ax-mods:not(.ax-mods--sempre), .ax-modnav { display: none; }
  .ax-mods--sempre { top: var(--ax-util-h); overflow-x: auto; }
  .ax-util { padding: 0 14px; }
  .ax-util .ax-util__menu { display: grid; }
  .ax-util .ax-sel--prod, .ax-busca { display: none; }
  .ax-body { min-height: calc(100vh - var(--ax-util-h)); }
  .ax-c4, .ax-c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-duas, .ax-form-duas { grid-template-columns: 1fr; }
  .ax-mapa-pg { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .ax-mapa-card { height: 62vh; min-height: 380px; }
  .ax-mapa-painel { overflow: visible; }
  .ax-auth { grid-template-columns: 1fr; }
  .ax-auth__art { min-height: 220px; padding: 28px; }
  .ax-auth__art h2 { font-size: 22px; }
}
@media (max-width: 575px) {
  .ax-page { padding: 16px 14px 32px; }
  .ax-util { gap: 8px; }
  .ax-util:has(.ax-util__menu) .ax-util__logo { display: none; }
  .ax-util .ax-sel { padding-right: 24px; }
  .ax-util .ax-sel--safra, .ax-ibtn--ia { display: none; }
  .ax-fab { right: 16px; bottom: 16px; }
  .ax-sel b { max-width: 130px; }
  .ax-c5, .ax-c2 { grid-template-columns: 1fr 1fr; }
  .ax-c4, .ax-c3 { grid-template-columns: 1fr; }
  .ax-ph h1 { font-size: 20px; }
  .ax-ph__act { margin-left: 0; width: 100%; }
  .ax-ph__act .ax-btn { flex: 1; }
  .ax-ph__act > .dropdown, .ax-ph__act > form { flex: 1; }
  .ax-ph__act > .dropdown > .ax-btn { width: 100%; }
  .ax-ctx { width: calc(100vw - 28px); }
  .ax-tbl--cards thead { display: none; }
  .ax-tbl--cards tr { display: block; border-bottom: 1px solid var(--ax-line); padding: 8px 4px; }
  .ax-tbl--cards td { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 4px 8px; border: 0; padding: 4px 10px; text-align: right; }
  .ax-tbl--cards td::before { margin-right: auto; }
  .ax-tbl--cards td::before { content: attr(data-l); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ax-faint); }
  .ax-tbl--cards td.ax-tbl__acao::before { content: ""; }
  .ax-tbl--cards td.ax-tbl__acao { justify-content: flex-end; gap: 6px; }
  .ax-faz__acoes .ax-btn { padding: 0 8px; }
  .ax-ph__sel, .ax-ph__sel .form-select { width: 100%; min-width: 0; }
  .ax-mapa-card { height: 58vh; }
  /* no celular a instrução sai de cima do mapa (não cobre onde o dedo marca) */
  .ax-mapa-card { display: flex; flex-direction: column; }
  .ax-mapa-card .ax-mapa { flex: 1; height: auto; min-height: 0; }
  .ax-mapa__barra { position: static; border-radius: 0; font-size: 12.5px; box-shadow: none; }
  .ax-mapa__barra .ax-btn { flex: 1; }
  .ax-lista-busca { max-width: none; }
  .ax-filtros { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
}
