/*
 * TankMix - Estilos (PHP puro)
 */
* { box-sizing: border-box; }
body.tankmix-body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 16px; color: #333; background: #f5f5f5; }
.login-container { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
.login-border { width: 100%; height: 8px; background: #1a2332; }
.login-border-top { position: fixed; top: 0; left: 0; right: 0; }
.login-border-bottom { position: fixed; bottom: 0; left: 0; right: 0; }
.login-box { width: 100%; max-width: 420px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 40px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.cadastro-box { width: 100%; max-width: 520px; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; padding: 40px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.form-section { margin-bottom: 24px; }
.form-section-title { font-size: 1rem; font-weight: 600; color: #333; margin: 0 0 12px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.form-row { display: flex; flex-wrap: wrap; gap: 12px; }
.form-half { flex: 1 1 calc(50% - 6px); min-width: 140px; }
.form-quarter { flex: 1 1 calc(25% - 9px); min-width: 80px; }
.password-wrapper { display: flex; gap: 8px; align-items: center; }
.password-wrapper .login-input { flex: 1; }
.password-toggle { flex-shrink: 0; padding: 8px 12px; font-size: 0.85rem; background: #e9ecef; border: 1px solid #dee2e6; border-radius: 6px; cursor: pointer; color: #495057; }
.password-toggle:hover { background: #dee2e6; }
.checkbox-field { margin-bottom: 8px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; font-weight: normal; cursor: pointer; font-size: 0.85rem; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; }
.form-section-checkboxes { background: #f8f9fa; padding: 16px; border-radius: 6px; }
.checkbox-label a { color: #5b7cff; text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }
/* Páginas legais (Termos de Uso, Política de Privacidade) — mobile first, sem estourar no celular */
.legal-container { min-height: 100vh; padding: 10px 12px 20px; background: #f5f5f5; overflow-x: hidden; box-sizing: border-box; }
.legal-box { width: 100%; max-width: 720px; margin: 0 auto; padding: 14px 12px; background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,0.08); border: 1px solid #e0e0e0; box-sizing: border-box; font-size: 13px; line-height: 1.45; word-wrap: break-word; overflow-wrap: break-word; }
.legal-title { font-size: 15px; color: #333; margin: 0 0 10px; line-height: 1.3; font-weight: 600; }
.legal-intro { color: #555; margin-bottom: 14px; font-size: 13px; }
.legal-box h2 { font-size: 14px; color: #333; margin: 16px 0 6px; padding-bottom: 4px; border-bottom: 1px solid #eee; font-weight: 600; line-height: 1.3; }
.legal-box h3 { font-size: 13px; color: #444; margin: 10px 0 4px; font-weight: 600; }
.legal-box p, .legal-box li { color: #555; margin: 0 0 6px; font-size: 13px; }
.legal-box ul { margin: 0 0 8px; padding-left: 18px; }
.legal-box a { color: #5b7cff; text-decoration: none; }
.legal-box a:hover { text-decoration: underline; }
.legal-update { font-size: 12px; color: #888; margin-top: 16px; }
.legal-back { margin-top: 20px; padding-top: 12px; border-top: 1px solid #eee; font-size: 13px; }
.legal-back a { font-weight: 500; }
@media (min-width: 480px) {
  .legal-container { padding: 16px 20px; }
  .legal-box { padding: 20px 22px; font-size: 14px; }
  .legal-title { font-size: 16px; margin-bottom: 12px; }
  .legal-intro { font-size: 14px; }
  .legal-box h2 { font-size: 15px; }
  .legal-box h3 { font-size: 14px; }
  .legal-box p, .legal-box li { font-size: 14px; }
}
@media (min-width: 768px) {
  .legal-container { padding: 24px 20px; }
  .legal-box { padding: 28px 32px; font-size: 15px; }
  .legal-title { font-size: 17px; }
  .legal-box h2 { font-size: 16px; }
  .legal-box h3 { font-size: 15px; }
  .legal-box p, .legal-box li { font-size: 15px; }
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand-name { display: none !important; }
.login-logo { display: block; width: 100%; max-width: 408px; height: auto; margin: 0 auto 16px; object-fit: contain; object-position: center; }
.login-title { font-size: 1.75rem; font-weight: 700; color: #333; text-align: center; margin: 0 0 40px; }
.login-subtitle { font-size: 0.95rem; color: #666; text-align: center; margin: 0 0 24px; }
.login-alert { background: #fff3cd; border: 1px solid #ffc107; color: #856404; padding: 12px; border-radius: 6px; margin-bottom: 20px; font-size: 0.9rem; }
.login-alert-success { background: #e8f5e9; border-color: #2d8a6e; color: #1b5e20; }
.login-alert-list { margin: 0; padding-left: 20px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-field { display: flex; flex-direction: column; gap: 6px; }
.login-field label { font-weight: 500; color: #333; font-size: 0.85rem; }
/* Mais espaço no topo dos blocos Endereço, Cidade/UF e Função (cadastro) */
.form-section > .login-field { margin-top: 10px; }
.form-section > .login-field + .form-row { margin-top: 20px; }
.form-section > .form-row + .login-field { margin-top: 10px; }
.login-select { appearance: auto; cursor: pointer; font-size: 0.875rem; }
.login-input { width: 100%; padding: 12px 14px; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; background: #fff; }
.login-input:focus { outline: none; border-color: #5b7cff; box-shadow: 0 0 0 2px rgba(91, 124, 255, 0.2); }
.login-btn { width: 100%; padding: 14px; font-size: 1rem; font-weight: 600; color: #fff; background: #2d8a6e; border: none; border-radius: 6px; cursor: pointer; margin-top: 8px; }
.login-btn:hover { background: #247a5e; }
.login-register { text-align: center; margin-top: 24px; font-size: 0.95rem; color: #666; }
.login-register a { color: #5b7cff; text-decoration: none; }
.login-register a:hover { text-decoration: underline; }
/* Top bar e página principal pós-login */
.tankmix-dashboard-body { background: #fff; }
.app-page { max-width: 100%; min-height: 100vh; margin: 0 auto; background: #fff; }
.app-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: #fff; }
.app-topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 12px 24px; min-height: 56px; background: #fff; max-width: 960px; margin: 0 auto; box-sizing: border-box; }
.app-topbar-logo { display: flex; align-items: center; margin-left: 0; }
.app-topbar-logo-img { display: block; height: 50px; width: auto; max-width: 220px; object-fit: contain; }
.app-topbar-right { display: flex; align-items: center; gap: 8px; }
.app-topbar-bell { position: relative; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: #333; text-decoration: none; flex-shrink: 0; }
.app-topbar-bell:hover { color: #111; }
.app-topbar-bell-icon { width: 23px; height: 23px; }
.app-topbar-bell-icon svg, .app-topbar-close-icon svg, [data-lucide] svg { width: 100%; height: 100%; }
.app-topbar-bell-badge { position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; padding: 0 3px; font-size: 10px; font-weight: 700; line-height: 14px; color: #fff; background: #d32f2f; border-radius: 7px; text-align: center; }
.app-topbar-close { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; color: #333; text-decoration: none; flex-shrink: 0; }
.app-topbar-close:hover { color: #111; }
.app-topbar-close-icon { width: 23px; height: 23px; }
.app-topbar-menu-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; width: 48px; height: 48px; padding: 8px; background: none; border: none; cursor: pointer; flex-shrink: 0; text-decoration: none; color: inherit; }
.app-topbar-menu-btn span { display: block; width: 24px; height: 2.5px; background: #333; border-radius: 2px; }
.app-topbar-separator { width: 100%; height: 3px; background: #2d8a6e; }
.app-topbar-menu { display: none; padding: 16px 20px; background: #fff; border-bottom: 1px solid #e0e0e0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.app-topbar-menu.is-open { display: block; }
.app-topbar-menu-nav { display: flex; flex-direction: column; gap: 4px; }
.app-topbar-menu-link { display: block; padding: 10px 12px; font-size: 0.95rem; color: #5b7cff; text-decoration: none; border-radius: 6px; }
.app-topbar-menu-link:hover { background: #f0f4ff; color: #4a6aeb; }
.app-topbar-menu-placeholder { margin: 0; color: #666; font-size: 0.9rem; }
.app-main { padding: 24px 24px; max-width: 960px; margin: 0 auto; }
.app-main-with-topbar { padding-top: 72px; }
.app-placeholder { width: 100%; height: 100px; background: #e8e8e8; border-radius: 8px; margin-bottom: 16px; }
.app-placeholder:last-child { margin-bottom: 0; }
.app-placeholder-msg { color: #666; margin: 0; }
/* Tela de notificações (mesma top bar do projeto, ícone fechar no estilo do sino) */
.tankmix-notificacoes-body { background: #fff; }
.app-main.notif-main { max-width: 640px; }
.notif-form { margin-top: 14px; background: #fff; border-radius: 8px; border: 1px solid #e0e0e0; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.notif-toolbar { padding: 12px 16px; border-bottom: 1px solid #eee; text-align: left; display: flex; gap: 8px; flex-wrap: wrap; }
.notif-read-btn { padding: 8px 16px; font-size: 0.9rem; color: #fff; background: #2d8a6e; border: none; border-radius: 6px; cursor: pointer; }
.notif-read-btn:hover { background: #247a5e; }
.notif-delete-btn { padding: 8px 16px; font-size: 0.9rem; color: #fff; background: #c62828; border: none; border-radius: 6px; cursor: pointer; }
.notif-delete-btn:hover { background: #b71c1c; }
.notif-empty { margin: 0; padding: 24px 16px; color: #666; text-align: center; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-item { border-bottom: 1px solid #eee; }
.notif-item:last-child { border-bottom: none; }
.notif-item-inner { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; cursor: pointer; }
.notif-item-inner:hover { background: #f9f9f9; }
.notif-item-checkbox { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.notif-item-content { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.notif-item-title { display: block; font-size: 0.95rem; color: #333; }
.notif-item-message { font-size: 0.875rem; color: #666; line-height: 1.4; }
.notif-item-date { font-size: 0.75rem; color: #999; }
.notif-item.is-read .notif-item-title { font-weight: normal; color: #666; }
/* Admin: enviar notificação a todos */
.admin-notif-title { margin: 0 0 8px; font-size: 1.25rem; font-weight: 600; color: #333; }
.admin-notif-desc { margin: 0 0 20px; font-size: 0.9rem; color: #666; }
.admin-notif-sucesso { margin-bottom: 16px; padding: 12px 16px; background: #e8f5e9; border: 1px solid #9ccc65; color: #2e7d32; border-radius: 6px; }
.admin-notif-erro { margin-bottom: 16px; padding: 12px 16px; background: #ffebee; border: 1px solid #ef5350; color: #c62828; border-radius: 6px; }
.admin-notif-form { max-width: 480px; }
.admin-notif-field { margin-bottom: 16px; }
.admin-notif-field label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 500; color: #333; }
.admin-notif-textarea { width: 100%; padding: 12px 14px; border: 1px solid #ccc; border-radius: 6px; font-size: 1rem; font-family: inherit; resize: vertical; min-height: 120px; }
.admin-notif-textarea:focus { outline: none; border-color: #5b7cff; box-shadow: 0 0 0 2px rgba(91, 124, 255, 0.2); }
.admin-notif-btn { padding: 12px 24px; font-size: 1rem; font-weight: 600; color: #fff; background: #2e7d32; border: none; border-radius: 6px; cursor: pointer; }
.admin-notif-btn:hover { background: #1b5e20; }
/* Página: Colocar na tela do celular */
.instalar-box { max-width: 520px; margin: 0 auto; }
.instalar-title { margin: 0 0 10px; font-size: 1rem; font-weight: 600; color: #333; }
.instalar-intro { margin: 0 0 16px; font-size: 0.8rem; color: #666; line-height: 1.45; }
.instalar-block { margin-bottom: 14px; padding: 12px; background: #f8f9fa; border-radius: 8px; border: 1px solid #eee; }
.instalar-subtitle { margin: 0 0 8px; font-size: 0.85rem; font-weight: 600; color: #333; }
.instalar-list { margin: 0; padding-left: 18px; color: #555; font-size: 0.78rem; line-height: 1.5; }
.instalar-list li { margin-bottom: 4px; }
.instalar-badge { margin: 12px 0 0; padding: 10px; background: #e8f5e9; border-radius: 6px; font-size: 0.78rem; color: #2e7d32; }
.instalar-pwa-btn { display: inline-block; margin: 12px 0; padding: 14px 24px; font-size: 1rem; font-weight: 600; color: #fff; background: #2d8a6e; border: none; border-radius: 8px; cursor: pointer; }
.instalar-pwa-btn:hover { background: #247a5e; color: #fff; }
.instalar-ios-block { background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 8px; }
.instalar-list-ios { font-size: 0.9rem; }
.instalar-ios-note { margin: 12px 0 0; font-size: 0.9rem; color: #2e7d32; font-weight: 500; }
.instalar-back { margin-top: 20px; font-size: 0.85rem; }
.instalar-back a { color: #5b7cff; text-decoration: none; }
.instalar-back a:hover { text-decoration: underline; }
/* Páginas internas (Meu Cadastro, Propriedades, Análise de Água) */
.app-page-title { margin: 0 0 16px; font-size: 1.2rem; font-weight: 600; color: #333; }
.app-page-title-spaced { margin-top: 14px; }
.app-btn-primary { background: #2d8a6e !important; color: #fff !important; }
.app-btn-primary:hover { background: #247a5e !important; color: #fff !important; }
.app-form-ok { margin: 0 0 12px; padding: 10px; background: #e8f5e9; color: #2e7d32; border-radius: 6px; font-size: 0.9rem; }
.app-form-max { max-width: 480px; }
.app-page-link-wrap { margin-top: 20px; }
.app-page-desc { margin: 0 0 16px; font-size: 0.9rem; color: #666; }
.app-help-legal-list { list-style: none; margin: 0 0 16px; padding: 0; }
.app-help-legal-list li { margin-bottom: 8px; }
.app-help-legal-list a { color: #5b7cff; text-decoration: none; }
.app-help-legal-list a:hover { text-decoration: underline; }
.app-prop-form { margin-bottom: 24px; }
.app-prop-main { padding-bottom: 120px; }
.app-prop-list { margin-top: 24px; padding-top: 16px; border-top: 1px solid #eee; }
.app-prop-list-top { margin-top: 0; padding-top: 0; border-top: none; }
.app-prop-ul { list-style: none; margin: 0; padding: 0; }
.app-prop-item { padding: 12px 0; border-bottom: 1px solid #eee; font-size: 0.63rem; }
.app-prop-item:last-child { border-bottom: none; }
.app-prop-item-view { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.app-prop-item-info { flex: 1 1 200px; }
.app-prop-nome-fazenda { display: block; font-size: calc(0.7rem + 5px); }
.app-prop-cidade { display: block; margin-top: 4px; font-weight: normal; color: #666; font-size: calc(0.63rem + 5px); }
.app-prop-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.app-prop-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: none; border-radius: 8px; cursor: pointer; background: #f0f0f0; color: #555; }
.app-prop-icon-btn:hover { background: #e0e0e0; }
.app-prop-icon-btn.app-prop-btn-edit { background: #e3f2fd; color: #1565c0; }
.app-prop-icon-btn.app-prop-btn-edit:hover { background: #bbdefb; }
.app-prop-icon-btn.app-prop-btn-del { background: #ffebee; color: #c62828; }
.app-prop-icon-btn.app-prop-btn-del:hover { background: #ffcdd2; }
.app-prop-icon { width: 20px; height: 20px; }
.app-prop-icon-sm { width: 14px; height: 14px; margin-left: 2px; }
.app-prop-delete-form { display: inline; }
.app-prop-item-edit { margin-top: 12px; padding: 12px; background: #f8f9fa; border-radius: 8px; }
.app-prop-edit-form .login-field { margin-bottom: 10px; }
.app-prop-geo-row { flex-wrap: wrap; }
.app-prop-geo-row .login-field { flex: 1 1 auto; }
.app-prop-locate-wrap { flex: 1 1 100%; margin-top: 8px; }
.app-prop-locate-btn { padding: 8px 16px; font-size: 0.9rem; border-radius: 6px; border: 1px solid #2d8a6e; background: #fff; color: #2d8a6e; cursor: pointer; }
.app-prop-locate-btn:hover { background: #e8f5e9; }
.app-prop-edit-btns { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; align-items: stretch; }
.app-prop-edit-btns .login-btn { flex: 1; min-width: 120px; margin-top: 0; }
.app-prop-edit-btns .app-prop-btn-cancel { flex: 1; min-width: 120px; padding: 14px; font-size: 1rem; font-weight: 600; border-radius: 6px; border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer; box-sizing: border-box; }
.app-prop-btn-cancel:hover { background: #f0f0f0; }
.app-prop-ul.app-prop-ul--editing .app-prop-item:not(.app-prop-item--editing) { display: none; }
.app-prop-end { display: block; margin-top: 4px; font-weight: normal; color: #666; font-size: 0.85rem; }
/* Configurações: links no estilo da lista de propriedades */
.app-config-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; color: inherit; width: 100%; box-sizing: border-box; }
.app-config-link:hover { color: inherit; }
.app-config-arrow { display: inline-flex; align-items: center; justify-content: center; color: #999; flex-shrink: 0; }
.app-config-link:hover .app-config-arrow { color: #2d8a6e; }
.app-prop-new-area { position: fixed; bottom: 0; left: 0; right: 0; padding: 16px 20px 24px; padding-bottom: max(24px, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #eee; box-shadow: 0 -2px 10px rgba(0,0,0,0.06); display: flex; flex-direction: column-reverse; align-items: center; max-height: 85vh; overflow-y: auto; }
.app-prop-new-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 320px; padding: 14px 20px; background: #2d8a6e; color: #fff; border: none; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; flex-shrink: 0; text-decoration: none; box-sizing: border-box; }
.app-prop-new-btn:hover { background: #247a5e; color: #fff; }
a.app-prop-new-btn { border: none; }
.app-prop-new-icon { width: 24px; height: 24px; flex-shrink: 0; }
.app-prop-new-form-wrap { width: 100%; max-width: 480px; margin: 0 auto 16px; padding-top: 16px; border-top: 1px solid #eee; flex: 1 1 auto; min-height: 0; }
.analise-conteudo { margin-left: 10px; }
.analise-block { margin-bottom: 20px; }
.analise-intro { margin: 0 0 10px; font-size: 0.95rem; font-weight: 500; color: #333; }
.analise-toggle { display: flex; gap: 16px; flex-wrap: wrap; }
.analise-radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.9rem; }
.analise-radio input { width: 18px; height: 18px; }
.analise-contato { margin-bottom: 24px; padding: 16px; background: #f0f9ff; border-radius: 8px; border: 1px solid #bae6fd; }
.analise-msg { margin: 0 0 12px; font-size: 0.9rem; color: #0c4a6e; }
.analise-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; background: #25d366; color: #fff; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.analise-whatsapp:hover { background: #20bd5a; color: #fff; }
.analise-whatsapp-icon-only { padding: 12px; }
.analise-whatsapp-icon-only .analise-whatsapp-icon { width: 40px; height: 40px; }
.analise-whatsapp-icon { width: 24px; height: 24px; }
.analise-perguntas { margin-top: 20px; }
.analise-cumprimento { margin: 0 0 16px; font-size: 0.9rem; color: #333; }
.analise-subtitle { margin: 0 0 12px; font-size: 0.95rem; font-weight: 500; color: #333; }
.analise-form .login-field { margin-bottom: 12px; }
.analise-form .login-field:last-of-type { margin-bottom: 0; }
.analise-input-num { max-width: 160px; font-size: 0.9rem; }
.analise-referencia { margin-top: 24px; padding: 14px; background: #f5f5f5; border-radius: 8px; border: 1px solid #e0e0e0; }
.analise-referencia-titulo { margin: 0 0 10px; font-size: 0.85rem; font-weight: 600; color: #333; }
.analise-referencia-lista { margin: 0; padding-left: 20px; font-size: 0.8rem; color: #555; line-height: 1.5; }
.analise-referencia-lista li { margin-bottom: 8px; }
.analise-referencia-lista li:last-child { margin-bottom: 0; }
.analise-erro { margin-bottom: 16px; padding: 12px; background: #ffebee; border: 1px solid #ef5350; color: #c62828; border-radius: 6px; font-size: 0.9rem; }
.analise-resultado-salvo { margin-bottom: 20px; padding: 14px; background: #e8f5e9; border: 1px solid #81c784; border-radius: 8px; }
.analise-resultado-titulo { margin: 0 0 8px; font-size: 0.9rem; font-weight: 600; color: #2e7d32; }
.analise-resultado-lista { margin: 0; padding-left: 20px; font-size: 0.85rem; color: #333; }
.analise-empty { margin: 16px 0; font-size: 0.9rem; color: #666; }
.analise-lista { margin-top: 28px; padding-top: 20px; border-top: 1px solid #eee; }
.analise-lista-titulo { margin: 0 0 12px; font-size: 1rem; font-weight: 600; color: #333; }
.analise-lista-ul { list-style: none; margin: 0; padding: 0; }
.analise-lista-item { padding: 12px 0; border-bottom: 1px solid #eee; font-size: 0.85rem; }
.analise-lista-item:last-child { border-bottom: none; }
.analise-lista-data { display: inline-block; margin-left: 8px; font-size: 0.8rem; color: #666; }
.analise-lista-valores { margin-top: 4px; font-size: 0.8rem; color: #666; }
.analise-lista-classificacao { margin-top: 4px; font-size: 0.8rem; color: #2d8a6e; font-weight: 500; }
.analise-q { margin-bottom: 14px; font-size: 0.9rem; }
.analise-q > span { display: block; margin-bottom: 6px; }
.analise-q .analise-radio { margin-right: 12px; }
.analise-q-ph { margin-bottom: 16px; }
.analise-ph-select { display: block; width: 100%; max-width: 120px; margin-top: 6px; padding: 4px 8px; font-size: 0.8rem; line-height: 1.3; border: 1px solid #ddd; border-radius: 6px; background: #fff; }
.analise-ph-select option { padding: 2px 0; font-size: 0.8rem; }
.app-menu-logout { margin-top: 8px; padding-top: 12px; border-top: 1px solid #eee; color: #c62828; }
/* Tela Menu - 4 botões baixo relevo 2x2 (tamanho compacto) */
.menu-main { padding: 20px 16px; padding-top: 3cm; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 280px; margin: 0 auto; }
.menu-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 14px 10px; text-decoration: none; color: #333; font-weight: 600; font-size: 0.875rem; border-radius: 10px; min-height: 88px; transition: transform 0.15s, box-shadow 0.15s; }
.menu-btn-basrelief { background: linear-gradient(145deg, #f5f5f5, #ebebeb); box-shadow: inset 2px 2px 4px rgba(0,0,0,0.06), inset -1px -1px 2px rgba(255,255,255,0.9), 1px 1px 2px rgba(0,0,0,0.04); border: 1px solid rgba(255,255,255,0.8); }
.menu-btn-basrelief:hover { transform: translateY(-1px); box-shadow: inset 2px 2px 4px rgba(0,0,0,0.08), inset -1px -1px 2px rgba(255,255,255,0.8), 2px 2px 6px rgba(0,0,0,0.08); }
.menu-btn-basrelief:active { transform: translateY(0); box-shadow: inset 3px 3px 6px rgba(0,0,0,0.15), inset -2px -2px 4px rgba(255,255,255,0.5); }
.menu-btn-icon { width: 34px; height: 34px; margin-bottom: 8px; color: #2d8a6e; flex-shrink: 0; }
.menu-btn-icon i { display: block; width: 100%; height: 100%; }
.menu-btn-icon svg { width: 100%; height: 100%; }
.app-prop-new-icon { display: block; }
.app-prop-icon { display: inline-block; }
.menu-btn-label { text-align: center; line-height: 1.2; }
/* Página Sistema (admin) e Configurações (mesmo padrão visual) */
.sistema-lista { list-style: none; margin: 0; padding: 0; }
.sistema-lista li { margin-bottom: 12px; }
.sistema-lista-espaco { margin: 1rem 0; min-height: 0; padding: 0; border: none; background: transparent; pointer-events: none; }
.sistema-link,
.app-main .sistema-lista a.sistema-link { display: block; padding: 14px 16px; background: #f5f5f5; border-radius: 8px; color: #2d8a6e !important; font-weight: 500; text-decoration: none !important; border: 1px solid #e0e0e0; }
.sistema-link:hover,
.app-main .sistema-lista a.sistema-link:hover { background: #ebebeb; color: #247a5e !important; text-decoration: none !important; }
/* Dashboard operador - navbot (navegação inferior) */
.app-page-with-navbot { padding-bottom: 72px; }
.app-main-with-navbot { padding-bottom: 24px; }
.app-navbot { position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; display: flex; justify-content: center; align-items: stretch; gap: 0; background: #fff; border-top: 1px solid #e0e0e0; box-shadow: 0 -2px 8px rgba(0,0,0,0.06); padding: 8px 16px; min-height: 56px; }
.app-navbot-item { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; max-width: 160px; padding: 8px 12px; text-decoration: none; color: #666; font-weight: 500; font-size: 0.8rem; border-radius: 8px; transition: background 0.15s, color 0.15s; }
.app-navbot-item:hover { background: #f5f5f5; color: #2d8a6e; }
.app-navbot-item--active { color: #2d8a6e; background: #e8f5e9; }
.app-navbot-icon { width: 24px; height: 24px; margin-bottom: 4px; color: inherit; flex-shrink: 0; }
.app-navbot-icon i, .app-navbot-icon svg { display: block; width: 100%; height: 100%; }
.app-navbot-label { text-align: center; line-height: 1.2; }
.app-operador-empty { color: #666; margin-top: 8px; }
.app-operador-lista { margin-bottom: 24px; }
.app-operador-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: #f5f5f5; border-radius: 8px; border: 1px solid #e0e0e0; margin-bottom: 10px; }
.app-operador-nome { font-weight: 600; color: #333; }
.app-operador-email { font-size: 0.85rem; color: #666; }
.app-operador-form-wrap { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e0e0e0; }
.app-operador-form-title { font-size: 1rem; font-weight: 600; color: #333; margin: 0 0 16px; }
/* Gráfico concentração (aplicacao-tankmix, pulverizacao-detalhe, dashboard) */
.grafico-concentracao-box { padding:1rem; background:#f8f9fa; border:1px solid #e9ecef; border-radius:8px; display:flex; flex-direction:column; align-items:center; text-align:center; margin-bottom:1.25rem; }
.grafico-concentracao-titulo { margin:0 0 0.75rem 0; font-weight:700; font-size:0.95rem; color:#333; text-align:center; width:100%; }
.grafico-donut-wrapper { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.grafico-donut { width:180px; height:180px; flex-shrink:0; }
.grafico-donut-legenda { font-size:0.75rem; line-height:1.5; max-width:200px; text-align:left; align-self:flex-start; }
.grafico-donut-legenda span { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:0.35rem; vertical-align:middle; }
.grafico-donut-legenda div { margin-bottom:0.25rem; }
.grafico-donut-legenda div:last-child { margin-bottom:0; }
/* Dashboard: gráfico com formatação correta (também quando carregado via HTMX) */
.dashboard-grafico-box { grid-column: 1 / -1; margin-top:1.5rem; }
.dashboard-grafico-box .grafico-concentracao-titulo { text-align:center; font-weight:700; }
.dashboard-grafico-box .grafico-donut-wrapper { display:flex; flex-direction:column; align-items:center; gap:1rem; }
.dashboard-grafico-box .grafico-donut-legenda { font-size:0.68rem; line-height:1.4; align-self:flex-start; }
.dashboard-grafico-periodo { margin-top:0.75rem; display:flex; gap:0.5rem; justify-content:center; }
.dashboard-grafico-periodo a { padding:0.35rem 0.75rem; border:1px solid #2d8a6e; border-radius:6px; background:#fff; color:#2d8a6e; text-decoration:none; font-size:0.85rem; }
.dashboard-grafico-periodo a:hover { background:#e8f5e9; }
.dashboard-grafico-periodo a.ativo { background:#2d8a6e; color:#fff; }

/* Gráfico de pH – mesmo layout do gráfico de concentração */
.grafico-curva-ph-box {
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.25rem;
}
.grafico-curva-ph-box[style*="display:none"] { margin-bottom: 0; }
.grafico-curva-ph-titulo {
  margin: 0 0 0.75rem 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: #333;
  text-align: center;
  width: 100%;
}
.grafico-curva-ph-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.grafico-curva-ph-box .grafico-curva-ph-svg,
.grafico-curva-ph-box svg.grafico-ph-svg {
  width: 100%;
  max-width: 360px;
  height: auto;
  min-height: 200px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
}

/* Desktop: evitar botões e elementos muito grandes (layout mobile preservado) */
@media (min-width: 769px) {
  .wizard-actions .login-btn,
  .wizard-actions .app-prop-btn-cancel,
  .app-prop-edit-btns .login-btn,
  .app-prop-edit-btns .app-prop-btn-cancel {
    max-width: 200px;
  }
  .agua-btn-group button {
    max-width: 180px;
  }
  .menu-grid {
    max-width: 320px;
  }
  .menu-btn {
    max-height: 100px;
  }
  .app-form-max,
  .login-form.app-form-max {
    max-width: 480px;
  }
}

/* Proprietário do aplicativo — rodapé discreto (mesma família tipográfica do body) */
.app-owner-watermark {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding-top: 0.4rem;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  /* Mesmo recuo dos dois lados (evita “puxado” para um lado no celular com notch) */
  padding-inline: max(0.65rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  clear: both;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: rgba(102, 102, 102, 0.42);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  text-align: center;
}
/* stretch: <p> ocupa a largura total; texto centralizado (align-items:center encolhia o bloco no mobile) */
.app-owner-watermark-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: min(22rem, 100%);
  margin-inline: auto;
  box-sizing: border-box;
  min-width: 0;
  text-align: center;
}
.app-owner-watermark-razao,
.app-owner-watermark-cnpj {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  line-height: 1.2;
}
.app-owner-watermark-cnpj {
  margin-top: 0.15em;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
@media (max-width: 480px) {
  .app-owner-watermark {
    font-size: max(0.58rem, 2.75vw);
    line-height: 1.2;
    padding-top: 0.35rem;
    padding-inline: max(0.55rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    padding-bottom: max(0.45rem, env(safe-area-inset-bottom, 0px));
  }
  .app-owner-watermark-inner {
    max-width: 100%;
  }
  .app-owner-watermark-cnpj {
    letter-spacing: 0.015em;
  }
}

/* Seções com título (pulverizações, meus produtos, etc.) */
.pulverizacoes-secao {
  margin-bottom: 2rem;
}
.pulverizacoes-secao-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
}

/* Meus produtos — consultar cadastrados */
.app-meus-produtos-secao-cadastrados {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e9ecef;
  margin-bottom: 0;
}
.app-meus-produtos-consulta-btn-wrap {
  margin-bottom: 0.75rem;
}
.app-meus-produtos-consulta-btn-wrap .login-btn {
  margin-top: 0;
}
.app-meus-produtos-lista-ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.app-meus-produtos-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 14px 16px;
  margin-bottom: 0.5rem;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 0.95rem;
}
.app-meus-produtos-item-info {
  flex: 1;
  min-width: 0;
}
.app-meus-produtos-meta {
  font-size: 0.8rem;
  color: #6c757d;
}
.app-meus-produtos-item-acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.app-meus-produtos-ordem-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.app-meus-produtos-select-ordem {
  width: auto;
  min-width: 4.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}
.app-meus-produtos-btn-salvar-ordem {
  width: auto;
  margin-top: 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
}
.app-meus-produtos-btn-excluir {
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
}
.app-meus-produtos-lista-vazia {
  margin: 0;
}
.preview-papel-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  padding: 6px 12px;
  box-sizing: border-box;
  background: #2d8a6e;
  color: #fff;
  font-size: 0.85rem;
}
.preview-papel-banner-acoes {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.preview-papel-banner a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}
body.preview-papel-ativa .app-topbar { top: 36px; }
body.preview-papel-ativa .app-main-with-topbar { padding-top: 108px; }