/* ===== css/style.css ===== */
/*
  AquaGest Pro
  Arquivo: css/style.css
  Etapa: layout base / módulos integrados
  Versão: style-layout-v4-estavel
  Status: layout limpo, mobile consistente, datas manuais e gráficos preparados
*/

/* =========================================================
   Variáveis globais
========================================================= */

:root {
  color-scheme: light;

  --color-primary: #0b4f6c;
  --color-primary-dark: #083b50;
  --color-primary-soft: #ccfbf1;
  --color-primary-light: #dff6f3;

  --color-nav: #071b24;
  --color-nav-soft: #0b2a35;

  --color-bg: #f3f7f6;
  --color-surface: #ffffff;
  --color-surface-soft: #f1f5f9;
  --color-border: #dbe8e7;

  --color-text: #102a32;
  --color-muted: #607982;

  --color-danger: #be3f45;
  --color-warning: #b56b09;
  --color-success: #15805f;
  --color-info: #3178a8;

  --shadow-sm: 0 8px 20px rgba(13, 54, 62, 0.06);
  --shadow-soft: 0 12px 32px rgba(13, 54, 62, 0.08);
  --shadow-card: 0 18px 48px rgba(13, 54, 62, 0.12);
  --shadow-strong: 0 28px 80px rgba(7, 27, 36, 0.22);

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --sidebar-width: 280px;
  --topbar-height: 76px;

  --transition-fast: 160ms ease;
  --transition-normal: 240ms ease;

  --primary-color: var(--color-primary);
  --card-bg: var(--color-surface);
  --text-color: var(--color-text);
}

[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: #020617;
  --color-surface: #0f172a;
  --color-surface-soft: #111827;
  --color-border: #1e293b;

  --color-text: #e2e8f0;
  --color-muted: #94a3b8;

  --color-primary-soft: #134e4a;
  --color-primary-light: #123f3c;

  --color-nav: #020617;
  --color-nav-soft: #0f172a;

  --shadow-sm: 0 8px 20px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.34);
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.42);
  --shadow-strong: 0 28px 80px rgba(0, 0, 0, 0.52);
}

/* =========================================================
   Base
========================================================= */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.10), transparent 32%),
    var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

::selection {
  background: var(--color-primary);
  color: #ffffff;
}

/* =========================================================
   Mensagens
========================================================= */

.system-message {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 750;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
}

.system-message.success {
  background: rgba(21, 128, 95, 0.12);
  border-color: rgba(21, 128, 95, 0.28);
  color: var(--color-success);
}

.system-message.warning {
  background: rgba(181, 107, 9, 0.13);
  border-color: rgba(181, 107, 9, 0.30);
  color: var(--color-warning);
}

.system-message.error {
  background: rgba(190, 63, 69, 0.12);
  border-color: rgba(190, 63, 69, 0.28);
  color: var(--color-danger);
}

/* =========================================================
   Área pública — Login / Criar conta / Recuperar senha
========================================================= */

.public-area {
  min-height: 100vh;
  width: 100%;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 8%, rgba(15, 118, 110, 0.28), transparent 34%),
    radial-gradient(circle at 90% 20%, rgba(49, 120, 168, 0.16), transparent 34%),
    linear-gradient(135deg, var(--color-nav), var(--color-nav-soft));
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-layout {
  width: 100%;
  min-height: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18px;
  padding-bottom: 28px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: var(--shadow-strong);
  padding: 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.brand-icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 15px;
  background: var(--color-primary);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.26);
}

.auth-brand .brand-icon {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 20px;
  font-size: 1.65rem;
}

.auth-brand h1 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.55rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.auth-brand p {
  margin: 5px 0 0;
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.auth-panel {
  display: block;
}

.auth-panel.hidden {
  display: none !important;
}

.auth-panel.active {
  display: block;
}

.auth-panel h2 {
  margin: 0 0 8px;
  color: var(--color-text);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.auth-panel p {
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 16px;
}

/* =========================================================
   Formulários
========================================================= */

.form,
form {
  max-width: 100%;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.form label,
label {
  display: block;
  margin: 8px 0 0;
  color: var(--color-text);
  font-weight: 800;
  font-size: 0.94rem;
  line-height: 1.25;
}

.form input,
.form select,
.form textarea,
input,
select,
textarea {
  max-width: 100%;
}

.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  height: 49px;
  min-height: 49px;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.2;
  opacity: 1;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--color-muted);
  opacity: 0.75;
}

.form select {
  appearance: auto;
}

[data-theme="dark"] .form input,
[data-theme="dark"] .form select,
[data-theme="dark"] .form textarea {
  border-color: var(--color-border);
  background: #020617;
  color: var(--color-text);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.16);
}

.form textarea,
textarea {
  height: auto;
  min-height: 96px;
  resize: vertical;
  line-height: 1.35;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px 14px;
  align-items: start;
}

.form-grid .form-full {
  grid-column: 1 / -1;
}

.form-grid > div,
form > div:not(.form-grid):not(.form-actions):not(.toolbar):not(.auth-actions) {
  min-width: 0;
}

.readonly-box {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  padding: 12px;
  line-height: 1.45;
}

[data-theme="dark"] .readonly-box {
  border-color: var(--color-border);
  background: #020617;
}

/* =========================================================
   Botões
========================================================= */

.primary-btn,
.secondary-btn,
.link-btn,
.icon-btn {
  font-family: inherit;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.primary-btn {
  display: flex;
  width: 100%;
  height: 52px;
  min-height: 52px;
  margin-top: 14px;
  border: none;
  border-radius: 16px;
  background: var(--color-primary);
  color: #ffffff;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  font-size: 1rem;
  opacity: 1;
  box-shadow: 0 12px 26px rgba(15, 118, 110, 0.22);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  transform: translateY(-1px);
}

.primary-btn:active {
  transform: translateY(0);
}

.secondary-btn {
  min-height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 750;
  padding: 10px 12px;
}

.secondary-btn:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.link-btn {
  display: flex;
  width: 100%;
  min-height: 42px;
  border: none;
  background: transparent;
  color: var(--color-primary);
  align-items: center;
  justify-content: center;
  font-weight: 850;
  font-size: 0.98rem;
  padding: 8px 4px;
  text-align: center;
  opacity: 1;
  border-radius: 14px;
}

.link-btn:hover {
  background: rgba(15, 118, 110, 0.08);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.form-actions .primary-btn,
.form-actions .secondary-btn {
  margin-top: 0;
}

/* =========================================================
   Área interna — App
========================================================= */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: linear-gradient(180deg, var(--color-nav), var(--color-nav-soft));
  color: #e2f3f2;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 30;
  box-shadow: 12px 0 36px rgba(7, 27, 36, 0.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.brand h1 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand span {
  display: block;
  color: rgba(226, 243, 242, 0.70);
  font-size: 0.82rem;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 4px;
}

.main-nav::-webkit-scrollbar {
  width: 6px;
}

.main-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.nav-link {
  border: 0;
  background: transparent;
  color: rgba(226, 243, 242, 0.82);
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-weight: 700;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-link.active {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.25);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-footer small {
  color: rgba(226, 243, 242, 0.66);
  line-height: 1.35;
}

#offlineStatus {
  display: none !important;
}

.icon-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.icon-btn:hover {
  border-color: var(--color-primary);
}

.main-content {
  width: 100%;
  margin-left: var(--sidebar-width);
  padding: 22px;
  max-width: 1180px;
  margin-right: auto;
}

.topbar {
  min-height: auto;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  backdrop-filter: blur(14px);
}

[data-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.86);
}

.topbar h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--color-muted);
  font-size: 0.94rem;
  line-height: 1.35;
}

.screen {
  display: none;
  padding-bottom: 32px;
}

.screen.active {
  display: block;
}

.page-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
  overflow: hidden;
}

.page-card h2,
.page-card h3,
.page-card h4 {
  color: var(--color-text);
}

.page-card h3 {
  margin: 0 0 8px;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-card p {
  margin: 0 0 14px;
  color: var(--color-muted);
  line-height: 1.58;
}

.page-card p:last-child {
  margin-bottom: 0;
}

/* =========================================================
   Status e componentes gerais
========================================================= */

.main-content > .status-grid {
  display: none !important;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.status-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  background: linear-gradient(180deg, var(--color-surface), var(--color-bg));
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 96px;
}

.status-card strong {
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.3;
}

.status-card span {
  color: var(--color-muted);
  font-size: 0.91rem;
  line-height: 1.4;
  word-break: break-word;
}

.status-card:hover {
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 14px 30px rgba(13, 54, 62, 0.08);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toolbar-title h3,
.toolbar-title h4 {
  margin: 0;
}

.toolbar-title span {
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

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

.action-row .primary-btn,
.action-row .secondary-btn {
  width: auto;
  margin-top: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 47, 52, 0.08);
  color: rgba(15, 47, 52, 0.86);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.badge.success {
  background: rgba(33, 150, 83, 0.12);
  color: #1f7a45;
}

.badge.warning {
  background: rgba(245, 158, 11, 0.16);
  color: #9a5b00;
}

.badge.danger {
  background: rgba(220, 38, 38, 0.12);
  color: #b42318;
}

.badge.info {
  background: rgba(49, 120, 168, 0.12);
  color: var(--color-info);
}

.empty-state {
  border: 1px dashed var(--color-border);
  border-radius: 18px;
  background: var(--color-bg);
  padding: 22px;
  text-align: center;
  color: var(--color-muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.data-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

.data-table th {
  background: var(--color-bg);
  color: var(--color-text);
  font-weight: 850;
}

.data-table td {
  color: var(--color-muted);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

/* =========================================================
   Menu mobile
========================================================= */

body.sidebar-open::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(7, 27, 36, 0.56);
  z-index: 20;
  backdrop-filter: blur(2px);
}

/* =========================================================
   Cards produtivos
========================================================= */

#pondsTableWrapper {
  border: 0;
  background: transparent;
  overflow: visible;
}

.pond-card-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pond-card {
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

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

.pond-card-header h4 {
  margin: 0;
  color: var(--color-text);
  font-size: 1.08rem;
  line-height: 1.25;
}

.pond-card-header span {
  display: block;
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.pond-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pond-metric {
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-bg);
  padding: 12px;
}

.pond-metric strong,
.pond-card-info strong {
  display: block;
  color: var(--color-text);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.pond-metric span,
.pond-card-info span {
  display: block;
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pond-card-info {
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
  margin-top: 12px;
}

.pond-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.pond-card-actions .secondary-btn {
  flex: 1;
}

/* =========================================================
   Água / Arraçoamento / Estoque — layout comum
========================================================= */

#screen-agua .page-header,
#screen-arracoamento .page-header,
#screen-estoque .page-header,
#screen-financeiro .page-header {
  margin-bottom: 18px;
}

#screen-agua .page-header h2,
#screen-arracoamento .page-header h2,
#screen-estoque .page-header h2,
#screen-financeiro .page-header h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

#screen-agua .page-header p,
#screen-arracoamento .page-header p,
#screen-estoque .page-header p,
#screen-financeiro .page-header p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.45;
}

#screen-agua form,
#screen-arracoamento form,
#screen-estoque form,
#screen-financeiro form {
  width: 100%;
}

#screen-agua .form-grid,
#screen-arracoamento .form-grid,
#screen-estoque .form-grid,
#screen-financeiro .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  width: 100%;
}

#screen-agua .form-grid > div,
#screen-arracoamento .form-grid > div,
#screen-estoque .form-grid > div,
#screen-financeiro .form-grid > div,
#screen-agua form > div:not(.form-grid):not(.form-actions):not(.toolbar),
#screen-arracoamento form > div:not(.form-grid):not(.form-actions):not(.toolbar),
#screen-estoque form > div:not(.form-grid):not(.form-actions):not(.toolbar),
#screen-financeiro form > div:not(.form-grid):not(.form-actions):not(.toolbar) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#screen-agua label,
#screen-arracoamento label,
#screen-estoque label,
#screen-financeiro label {
  display: block;
  margin: 0;
  color: var(--color-text);
  font-weight: 800;
  font-size: 0.94rem;
  line-height: 1.25;
}

#screen-agua input,
#screen-agua select,
#screen-agua textarea,
#screen-arracoamento input,
#screen-arracoamento select,
#screen-arracoamento textarea,
#screen-estoque input,
#screen-estoque select,
#screen-estoque textarea,
#screen-financeiro input,
#screen-financeiro select,
#screen-financeiro textarea {
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 11px 13px;
  font-size: 1rem;
  line-height: 1.3;
  outline: none;
}

#screen-agua textarea,
#screen-arracoamento textarea,
#screen-estoque textarea,
#screen-financeiro textarea {
  min-height: 100px;
  resize: vertical;
}

#screen-agua input:focus,
#screen-agua select:focus,
#screen-agua textarea:focus,
#screen-arracoamento input:focus,
#screen-arracoamento select:focus,
#screen-arracoamento textarea:focus,
#screen-estoque input:focus,
#screen-estoque select:focus,
#screen-estoque textarea:focus,
#screen-financeiro input:focus,
#screen-financeiro select:focus,
#screen-financeiro textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

#screen-agua input[readonly],
#screen-arracoamento input[readonly],
#screen-estoque input[readonly],
#screen-financeiro input[readonly] {
  background: rgba(15, 47, 52, 0.04);
  color: rgba(15, 47, 52, 0.78);
  font-weight: 700;
}

#screen-agua .form-actions,
#screen-arracoamento .form-actions,
#screen-estoque .form-actions,
#screen-financeiro .form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  width: 100%;
}

#screen-agua .form-actions button,
#screen-arracoamento .form-actions button,
#screen-estoque .form-actions button,
#screen-financeiro .form-actions button {
  min-height: 52px;
}

#screen-agua .form-actions .primary-btn,
#screen-arracoamento .form-actions .primary-btn,
#screen-estoque .form-actions .primary-btn,
#screen-financeiro .form-actions .primary-btn,
#screen-agua .form-actions .secondary-btn,
#screen-arracoamento .form-actions .secondary-btn,
#screen-estoque .form-actions .secondary-btn,
#screen-financeiro .form-actions .secondary-btn {
  flex: 1;
  margin-top: 0;
}

/* =========================================================
   Estoque
========================================================= */

#screen-estoque .stock-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

#screen-estoque .stock-summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

#screen-estoque .stock-summary-card strong {
  display: block;
  font-size: 1.35rem;
  color: var(--color-primary);
  margin-bottom: 4px;
}

#screen-estoque .stock-summary-card span {
  display: block;
  color: var(--color-muted);
  line-height: 1.35;
}

#screen-estoque .inventory-feed-profile-injected {
  display: contents;
}

#screen-estoque .inventory-feed-profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#screen-estoque .inventory-feed-profile-field.hidden {
  display: none !important;
}

#screen-estoque .inventory-card .pond-card-info,
#screen-estoque .inventory-movement-card .pond-card-info {
  margin-top: 12px;
}

#screen-estoque .stock-origin-note {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(18, 184, 166, 0.1);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
}

/* =========================================================
   Arraçoamento
========================================================= */

#screen-arracoamento .feeding-inventory-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#screen-arracoamento .feeding-profile-fields {
  display: contents;
}

#screen-arracoamento .feeding-profile-fields > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

#screen-arracoamento .feeding-card .pond-card-info {
  margin-top: 12px;
}

/* =========================================================
   Recomendações
========================================================= */

#screen-agua .recommendation-list,
#screen-arracoamento .recommendation-list,
#screen-estoque .recommendation-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#screen-agua .recommendation-item,
#screen-arracoamento .recommendation-item,
#screen-estoque .recommendation-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 47, 52, 0.1);
  background: rgba(15, 47, 52, 0.03);
}

#screen-agua .recommendation-item > div,
#screen-arracoamento .recommendation-item > div,
#screen-estoque .recommendation-item > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

#screen-agua .recommendation-item strong,
#screen-arracoamento .recommendation-item strong,
#screen-estoque .recommendation-item strong {
  line-height: 1.3;
}

#screen-agua .recommendation-item span,
#screen-arracoamento .recommendation-item span,
#screen-estoque .recommendation-item span {
  line-height: 1.4;
}

/* =========================================================
   Financeiro
========================================================= */

#screen-financeiro {
  width: 100%;
}

#screen-financeiro .page-card {
  margin-bottom: 16px;
}

#screen-financeiro .page-header h2,
#screen-financeiro h2 {
  margin: 0 0 10px;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

#screen-financeiro .page-header p,
#screen-financeiro > p {
  margin: 0 0 18px;
  color: var(--color-muted);
  line-height: 1.45;
}

#screen-financeiro .financeiro-summary-panel {
  margin-bottom: 16px;
}

#screen-financeiro .financial-summary-grid,
#screen-financeiro .finance-summary-grid,
#screen-financeiro .financeiro-summary-grid,
#screen-financeiro .financeiro-kpi-grid,
#screen-financeiro .summary-grid,
#screen-financeiro .dashboard-grid,
#screen-financeiro .kpi-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

#screen-financeiro .financial-summary-grid > *,
#screen-financeiro .finance-summary-grid > *,
#screen-financeiro .financeiro-summary-grid > *,
#screen-financeiro .financeiro-kpi-grid > *,
#screen-financeiro .summary-grid > *,
#screen-financeiro .dashboard-grid > *,
#screen-financeiro .kpi-grid > *,
#screen-financeiro .finance-summary-card {
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: 15px;
  min-width: 0;
}

#screen-financeiro .financial-summary-grid strong,
#screen-financeiro .finance-summary-grid strong,
#screen-financeiro .financeiro-summary-grid strong,
#screen-financeiro .financeiro-kpi-grid strong,
#screen-financeiro .summary-grid strong,
#screen-financeiro .dashboard-grid strong,
#screen-financeiro .kpi-grid strong,
#screen-financeiro .finance-summary-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text);
  font-size: 1.15rem;
  line-height: 1.15;
  font-weight: 900;
}

#screen-financeiro .financial-summary-grid span,
#screen-financeiro .finance-summary-grid span,
#screen-financeiro .financeiro-summary-grid span,
#screen-financeiro .financeiro-kpi-grid span,
#screen-financeiro .summary-grid span,
#screen-financeiro .dashboard-grid span,
#screen-financeiro .kpi-grid span,
#screen-financeiro .finance-summary-card span {
  display: block;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

#screen-financeiro form,
#screen-financeiro .form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#screen-financeiro .secondary-btn {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

/* =========================================================
   Campos de data — seletor manual
========================================================= */

.date-field-helper {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
}

.date-helper-btn {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 8px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  min-height: 36px;
}

.date-helper-main-btn {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  border-color: rgba(15, 118, 110, 0.22);
}

.date-helper-btn:active {
  transform: scale(0.98);
}

.date-helper-manual-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr auto;
  gap: 6px;
  margin-top: 4px;
}

.date-helper-select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  padding: 8px;
  font-weight: 800;
}

.date-helper-info {
  width: 100%;
  color: var(--color-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.date-field-invalid {
  border-color: #dc2626 !important;
  outline-color: #dc2626 !important;
}

/* =========================================================
   Gráficos de desempenho
========================================================= */

.desempenho-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.desempenho-header-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desempenho-toolbar {
  align-items: flex-start;
  gap: 12px;
}

.desempenho-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.desempenho-summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desempenho-summary-card span {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.desempenho-summary-card strong {
  font-size: 1.35rem;
  line-height: 1.2;
}

.desempenho-summary-card small {
  color: var(--color-muted);
  font-weight: 700;
}

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

.desempenho-chart-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.desempenho-chart-card h3 {
  margin: 0;
}

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

.desempenho-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.desempenho-bar-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.desempenho-bar-info strong {
  font-size: 0.9rem;
}

.desempenho-bar-info span {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-muted);
}

.desempenho-bar-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}

.desempenho-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--color-primary);
}

.desempenho-bar-row small {
  color: var(--color-muted);
  font-weight: 700;
}

.desempenho-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desempenho-alert-item {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-weight: 800;
}

.muted-text {
  color: var(--color-muted);
  font-weight: 700;
}

/* =========================================================
   Responsividade
========================================================= */

@media (max-width: 1180px) {
  .status-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 980px) {
  .icon-btn {
    display: inline-flex;
  }

  .sidebar {
    transform: translateX(-105%);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 16px;
    max-width: 100%;
  }

  .topbar {
    border-radius: var(--radius-lg);
  }

  .status-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 900px) {
  .desempenho-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .main-content {
    padding: 10px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 35;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 18px;
  }

  .topbar h2 {
    font-size: 1.22rem;
  }

  .topbar p {
    font-size: 0.86rem;
  }

  .page-card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 18px;
  }

  .page-header h2,
  #screen-financeiro h2 {
    font-size: 1.45rem;
  }

  .page-header p {
    font-size: 0.94rem;
  }

  .toolbar {
    gap: 8px;
  }

  .toolbar-title h3 {
    font-size: 1.16rem;
  }

  .toolbar-title span {
    font-size: 0.9rem;
  }

  .form-grid,
  #screen-agua .form-grid,
  #screen-arracoamento .form-grid,
  #screen-estoque .form-grid,
  #screen-financeiro .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .form-actions,
  #screen-agua .form-actions,
  #screen-arracoamento .form-actions,
  #screen-estoque .form-actions,
  #screen-financeiro .form-actions {
    flex-direction: column;
  }

  .form-actions .primary-btn,
  .form-actions .secondary-btn,
  #screen-agua .form-actions button,
  #screen-arracoamento .form-actions button,
  #screen-estoque .form-actions button,
  #screen-financeiro .form-actions button {
    width: 100% !important;
  }

  .pond-card {
    padding: 15px;
    border-radius: 18px;
  }

  .pond-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

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

  .pond-card-actions {
    flex-direction: column;
  }

  .pond-card-actions .secondary-btn {
    width: 100%;
  }

  #screen-estoque .stock-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  #screen-estoque .stock-summary-card {
    padding: 14px;
  }

  #screen-estoque .stock-summary-card strong {
    font-size: 1.12rem;
  }

  #screen-financeiro .financial-summary-grid,
  #screen-financeiro .finance-summary-grid,
  #screen-financeiro .financeiro-summary-grid,
  #screen-financeiro .financeiro-kpi-grid,
  #screen-financeiro .summary-grid,
  #screen-financeiro .dashboard-grid,
  #screen-financeiro .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  #screen-financeiro .financial-summary-grid > *,
  #screen-financeiro .finance-summary-grid > *,
  #screen-financeiro .financeiro-summary-grid > *,
  #screen-financeiro .financeiro-kpi-grid > *,
  #screen-financeiro .summary-grid > *,
  #screen-financeiro .dashboard-grid > *,
  #screen-financeiro .kpi-grid > *,
  #screen-financeiro .finance-summary-card {
    padding: 12px;
  }

  #screen-financeiro .financial-summary-grid strong,
  #screen-financeiro .finance-summary-grid strong,
  #screen-financeiro .financeiro-summary-grid strong,
  #screen-financeiro .financeiro-kpi-grid strong,
  #screen-financeiro .summary-grid strong,
  #screen-financeiro .dashboard-grid strong,
  #screen-financeiro .kpi-grid strong,
  #screen-financeiro .finance-summary-card strong {
    font-size: 1rem;
  }

  #screen-financeiro .financial-summary-grid span,
  #screen-financeiro .finance-summary-grid span,
  #screen-financeiro .financeiro-summary-grid span,
  #screen-financeiro .financeiro-kpi-grid span,
  #screen-financeiro .summary-grid span,
  #screen-financeiro .dashboard-grid span,
  #screen-financeiro .kpi-grid span,
  #screen-financeiro .finance-summary-card span {
    font-size: 0.82rem;
  }

  #screen-estoque .stock-origin-note {
    justify-content: center;
    width: 100%;
    border-radius: 12px;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .public-area {
    padding: 12px;
  }

  .auth-layout {
    padding-top: 8px;
    padding-bottom: 16px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 22px;
  }

  .auth-brand {
    gap: 12px;
    margin-bottom: 20px;
  }

  .auth-brand .brand-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 17px;
  }

  .auth-brand h1 {
    font-size: 1.35rem;
  }

  .auth-brand p {
    font-size: 0.9rem;
  }

  .auth-panel h2 {
    font-size: 1.3rem;
  }

  .main-content {
    padding: 12px;
  }

  .status-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .status-card {
    min-height: auto;
    padding: 14px;
  }

  .action-row,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .action-row .primary-btn,
  .action-row .secondary-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .desempenho-summary-grid {
    grid-template-columns: 1fr;
  }

  .desempenho-toolbar {
    flex-direction: column;
  }

  .desempenho-toolbar .secondary-btn {
    width: 100%;
  }

  .desempenho-bar-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .date-helper-manual-row {
    grid-template-columns: 1fr 1fr;
  }

  .date-helper-apply-btn {
    grid-column: span 2;
  }
}

@media (max-width: 430px) {
  .pond-metrics-grid {
    grid-template-columns: 1fr;
  }

  #screen-estoque .stock-summary-grid,
  #screen-financeiro .financial-summary-grid,
  #screen-financeiro .finance-summary-grid,
  #screen-financeiro .financeiro-summary-grid,
  #screen-financeiro .financeiro-kpi-grid,
  #screen-financeiro .summary-grid,
  #screen-financeiro .dashboard-grid,
  #screen-financeiro .kpi-grid {
    grid-template-columns: 1fr;
  }

  #screen-estoque .stock-summary-card strong {
    font-size: 1.25rem;
  }
}

@media (max-width: 380px) {
  .auth-card {
    padding: 16px;
  }

  .brand-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .form input,
  .form select,
  .form textarea,
  .primary-btn {
    min-height: 47px;
  }
}
/* ===== css/mobile-layout.css ===== */
/*
  AquaGest Pro
  Arquivo: css/mobile-layout.css
  Etapa: infraestrutura responsiva global
  Versão: mobile-layout-v3-estrutura-forte
  Status:
  - layout responsivo global
  - Produção, Biometria, Água, Arraçoamento, Estoque e Financeiro preparados
  - formulários protegidos contra overflow
  - cards produtivos responsivos
  - campos de data responsivos
  - tabelas com rolagem segura
  - menu lateral com overlay mobile
*/

/* =========================================================
   Proteções globais de responsividade
========================================================= */

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

.screen,
.page-card,
.form,
.form-grid,
.toolbar,
.toolbar-title,
.status-grid,
.status-card,
.table-wrapper,
.pond-card,
.production-card,
.pond-card-list,
.pond-metrics-grid,
.pond-card-info,
.form-actions,
.action-row {
  min-width: 0;
  max-width: 100%;
}

.page-card,
.status-card,
.pond-card,
.production-card {
  overflow-wrap: anywhere;
}

input,
textarea {
  min-width: 0;
}

select {
  min-width: 0;
  width: 100%;
  text-overflow: ellipsis;
}

textarea {
  width: 100%;
  resize: vertical;
}

/* =========================================================
   Tablets e telas médias
========================================================= */

@media (max-width: 1180px) {
  .status-grid {
    grid-template-columns: repeat(
      3,
      minmax(0, 1fr)
    );
  }

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

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

  .page-card {
    padding: 20px;
  }
}

/* =========================================================
   Tablet / menu lateral recolhível
========================================================= */

@media (max-width: 980px) {
  :root {
    --sidebar-width: 286px;
  }

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(7, 27, 36, 0.34);
    backdrop-filter: blur(1px);
  }

  .icon-btn {
    display: inline-flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);
    max-width: 88vw;
    height: 100vh;
    height: 100dvh;

    transform: translateX(-105%);
    transition:
      transform 0.25s ease,
      visibility 0.25s ease;

    z-index: 60;

    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    box-shadow:
      18px 0 44px rgba(7, 27, 36, 0.28);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    padding: 16px;
  }

  .topbar {
    width: 100%;
    border-radius: 18px;
  }

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

  .auth-card {
    max-width: 500px;
  }
}

/* =========================================================
   Celular — estrutura geral
========================================================= */

@media (max-width: 760px) {
  :root {
    --sidebar-width: 284px;
    --topbar-height: 68px;
  }

  html,
  body {
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    background: var(--color-bg);
  }

  body.sidebar-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* =======================================================
     Área pública / autenticação
  ======================================================= */

  .public-area {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    padding:
      12px
      max(12px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));

    align-items: flex-start;
    justify-content: center;
  }

  .auth-layout {
    width: 100%;
    min-width: 0;
    min-height: auto;

    padding-top: 8px;
    padding-bottom: 22px;

    align-items: flex-start;
    justify-content: center;
  }

  .auth-card {
    width: 100%;
    max-width: none;

    border-radius: 20px;
    padding: 18px;
  }

  .auth-brand {
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
  }

  .auth-brand > div:last-child {
    min-width: 0;
  }

  .auth-brand .brand-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;

    border-radius: 17px;
    font-size: 1.45rem;
  }

  .auth-brand h1 {
    margin: 0;

    font-size: 1.34rem;
    line-height: 1.15;

    overflow-wrap: anywhere;
  }

  .auth-brand p {
    margin-top: 4px;

    font-size: 0.88rem;
    line-height: 1.35;

    overflow-wrap: anywhere;
  }

  .auth-panel {
    min-width: 0;
  }

  .auth-panel h2 {
    font-size: 1.28rem;
    line-height: 1.25;
  }

  .auth-panel p {
    font-size: 0.92rem;
    line-height: 1.45;
    margin-bottom: 14px;
  }

  /* =======================================================
     Formulários mobile
  ======================================================= */

  .form {
    width: 100%;
    min-width: 0;

    gap: 8px;
  }

  .form > div,
  .form-grid > div {
    min-width: 0;
    width: 100%;
  }

  .form label {
    display: block;

    max-width: 100%;

    font-size: 0.92rem;
    line-height: 1.35;

    margin-top: 8px;
    margin-bottom: 5px;

    overflow-wrap: anywhere;
  }

  .form input,
  .form select {
    display: block;

    width: 100%;
    max-width: 100%;

    height: 50px;
    min-height: 50px;

    padding-left: 13px;
    padding-right: 13px;

    font-size: 16px;
    line-height: 1.25;

    border-radius: 12px;
  }

  .form textarea {
    display: block;

    width: 100%;
    max-width: 100%;

    height: auto;
    min-height: 104px;

    padding: 12px 13px;

    font-size: 16px;
    line-height: 1.45;

    border-radius: 12px;
  }

  .form input[type="number"] {
    appearance: textfield;
  }

  .form input[readonly] {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .primary-btn {
    min-height: 50px;
    height: auto;

    padding: 12px 16px;

    font-size: 1rem;
    line-height: 1.25;
  }

  .secondary-btn,
  .link-btn {
    min-height: 44px;
    height: auto;

    padding-top: 10px;
    padding-bottom: 10px;

    font-size: 0.96rem;
    line-height: 1.25;
  }

  .form-actions,
  .action-row {
    display: flex;

    flex-direction: column;
    align-items: stretch;

    width: 100%;
    max-width: 100%;

    gap: 9px;
  }

  .form-actions > button,
  .action-row > button,
  .form-actions .primary-btn,
  .form-actions .secondary-btn,
  .action-row .primary-btn,
  .action-row .secondary-btn {
    width: 100%;
    max-width: 100%;
  }

  .auth-actions {
    flex-direction: column;
    align-items: stretch;

    width: 100%;

    gap: 6px;
    margin-top: 14px;
  }

  .auth-actions .link-btn {
    width: 100%;
    justify-content: center;
  }

  .readonly-box {
    width: 100%;
    max-width: 100%;

    font-size: 0.94rem;
    line-height: 1.45;

    padding: 12px;

    overflow-wrap: anywhere;
  }

  /* =======================================================
     Campos auxiliares de data
  ======================================================= */

  .date-field-helper {
    width: 100%;
    max-width: 100%;

    margin-top: 8px;

    display: flex;
    flex-wrap: wrap;

    gap: 7px;
  }

  .date-helper-btn {
    min-height: 42px;

    padding: 8px 12px;

    flex:
      1
      1
      auto;

    white-space: normal;
    text-align: center;

    font-size: 0.9rem;
    line-height: 1.2;
  }

  .date-helper-main-btn {
    flex-basis: 100%;
  }

  .date-helper-manual-row {
    display: grid;

    grid-template-columns:
      minmax(0, 0.8fr)
      minmax(0, 0.8fr)
      minmax(0, 1.15fr);

    width: 100%;
    max-width: 100%;

    gap: 7px;
  }

  .date-helper-manual-row .date-helper-select {
    width: 100%;
    min-width: 0;

    height: 44px;
    min-height: 44px;

    padding: 0 8px;

    font-size: 15px;
  }

  .date-helper-manual-row .date-helper-apply-btn {
    grid-column: 1 / -1;

    width: 100%;
    min-height: 44px;
  }

  .date-helper-info {
    display: block;

    flex-basis: 100%;

    width: 100%;

    font-size: 0.78rem;
    line-height: 1.4;

    overflow-wrap: anywhere;
  }

  /* =======================================================
     Menu lateral mobile
  ======================================================= */

  .sidebar {
    width: var(--sidebar-width);
    max-width: 86vw;

    padding:
      max(16px, env(safe-area-inset-top))
      16px
      max(16px, env(safe-area-inset-bottom))
      16px;

    transform: translateX(-105%);

    transition: transform 0.25s ease;

    z-index: 60;

    overflow-y: auto;
    overscroll-behavior: contain;

    -webkit-overflow-scrolling: touch;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    min-width: 0;

    padding-bottom: 14px;
  }

  .brand > div:last-child {
    min-width: 0;
  }

  .brand h1 {
    font-size: 1.02rem;

    overflow-wrap: anywhere;
  }

  .brand span {
    display: block;

    max-width: 100%;

    font-size: 0.78rem;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-nav {
    width: 100%;

    gap: 7px;
    padding-bottom: 12px;
  }

  .nav-link {
    width: 100%;

    min-height: 46px;

    padding: 12px 13px;

    font-size: 0.96rem;
    line-height: 1.25;

    text-align: left;
  }

  .sidebar-footer {
    width: 100%;

    gap: 8px;

    padding-bottom:
      max(8px, env(safe-area-inset-bottom));
  }

  .sidebar-footer .secondary-btn {
    width: 100%;
  }

  .sidebar-footer small {
    display: block;

    width: 100%;

    font-size: 0.8rem;

    overflow-wrap: anywhere;
  }

  /* =======================================================
     Área interna mobile
  ======================================================= */

  .app-shell {
    width: 100%;
    max-width: 100%;
  }

  .main-content {
    margin-left: 0;

    width: 100%;
    max-width: 100%;

    padding:
      max(12px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .topbar {
    position: sticky;
    top: 0;

    z-index: 35;

    width: 100%;
    max-width: 100%;

    min-height: var(--topbar-height);

    border-radius: 16px;

    padding: 13px;

    gap: 12px;

    margin-bottom: 14px;
  }

  .topbar > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  .topbar h2 {
    margin: 0;

    font-size: 1.12rem;
    line-height: 1.25;

    overflow-wrap: anywhere;
  }

  .topbar p {
    margin-top: 3px;

    font-size: 0.86rem;
    line-height: 1.35;

    overflow-wrap: anywhere;
  }

  .icon-btn {
    display: inline-flex;

    flex: 0 0 auto;
  }

  #screens {
    width: 100%;
    max-width: 100%;
  }

  .screen {
    width: 100%;
    max-width: 100%;

    padding-bottom:
      max(24px, env(safe-area-inset-bottom));
  }

  .page-card {
    width: 100%;
    max-width: 100%;

    border-radius: 16px;

    padding: 16px;
    margin-bottom: 14px;
  }

  .page-card h3 {
    max-width: 100%;

    font-size: 1.12rem;
    line-height: 1.3;

    overflow-wrap: anywhere;
  }

  .page-card h4 {
    max-width: 100%;

    line-height: 1.3;

    overflow-wrap: anywhere;
  }

  .page-card p {
    max-width: 100%;

    font-size: 0.94rem;
    line-height: 1.5;

    overflow-wrap: anywhere;
  }

  .system-message {
    width: 100%;
    max-width: 100%;

    border-radius: 14px;

    padding: 12px 14px;

    font-size: 0.92rem;
    line-height: 1.4;

    overflow-wrap: anywhere;
  }

  /* =======================================================
     Resumos / indicadores
  ======================================================= */

  .status-grid {
    grid-template-columns: minmax(0, 1fr);

    width: 100%;

    gap: 10px;
    margin-top: 14px;
  }

  .status-card {
    width: 100%;
    min-width: 0;
    min-height: auto;

    padding: 14px;

    border-radius: 14px;
  }

  .status-card strong {
    display: block;

    font-size: 0.9rem;
    line-height: 1.3;
  }

  .status-card span {
    display: block;

    max-width: 100%;

    font-size: 0.92rem;
    line-height: 1.4;

    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #propertySummaryId {
    font-size: 0.82rem;
    line-height: 1.35;

    user-select: text;
  }

  /* =======================================================
     Toolbar
  ======================================================= */

  .toolbar {
    display: flex;

    flex-direction: column;
    align-items: stretch;

    width: 100%;

    gap: 10px;
  }

  .toolbar-title {
    width: 100%;
    min-width: 0;
  }

  .toolbar-title h3,
  .toolbar-title span,
  .toolbar-title p {
    max-width: 100%;

    overflow-wrap: anywhere;
  }

  /* =======================================================
     Form-grid
  ======================================================= */

  .form-grid {
    display: grid;

    grid-template-columns: minmax(0, 1fr);

    width: 100%;
    max-width: 100%;

    gap: 10px;
  }

  .form-grid > * {
    min-width: 0;
  }

  .form-grid .form-full {
    grid-column: 1;
  }

  /* =======================================================
     Empty states
  ======================================================= */

  .empty-state {
    width: 100%;
    max-width: 100%;

    padding: 18px;

    border-radius: 14px;

    line-height: 1.45;

    overflow-wrap: anywhere;
  }

  /* =======================================================
     Tabelas
  ======================================================= */

  .table-wrapper {
    display: block;

    width: 100%;
    max-width: 100%;

    border-radius: 14px;

    overflow-x: auto;
    overflow-y: hidden;

    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    width: max-content;
    min-width: 620px;
    max-width: none;

    border-collapse: collapse;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;

    font-size: 0.88rem;
    line-height: 1.35;

    white-space: nowrap;
  }

  .data-table td:last-child,
  .data-table th:last-child {
    padding-right: 16px;
  }

  /* =======================================================
     Cards de Viveiros e Produção
  ======================================================= */

  .pond-card-list {
    display: grid;

    grid-template-columns: minmax(0, 1fr);

    width: 100%;

    gap: 12px;
  }

  .pond-card,
  .production-card {
    width: 100%;
    max-width: 100%;

    padding: 14px;

    border-radius: 15px;
  }

  .pond-card-header {
    display: flex;

    flex-direction: column;
    align-items: stretch;

    width: 100%;

    gap: 9px;
  }

  .pond-card-header > div {
    min-width: 0;
  }

  .pond-card-header h4 {
    margin: 0;

    font-size: 1rem;
    line-height: 1.3;

    overflow-wrap: anywhere;
  }

  .pond-card-header > div > span {
    display: block;

    margin-top: 3px;

    font-size: 0.86rem;
    line-height: 1.35;

    overflow-wrap: anywhere;
  }

  .pond-card-header .badge {
    align-self: flex-start;

    max-width: 100%;

    white-space: normal;
    text-align: center;
  }

  .pond-metrics-grid {
    display: grid;

    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );

    width: 100%;

    gap: 9px;

    margin-top: 12px;
  }

  .pond-metric {
    min-width: 0;

    padding: 10px;

    border-radius: 12px;
  }

  .pond-metric strong {
    display: block;

    font-size: 0.78rem;
    line-height: 1.3;

    overflow-wrap: anywhere;
  }

  .pond-metric span {
    display: block;

    margin-top: 4px;

    font-size: 0.88rem;
    line-height: 1.35;

    overflow-wrap: anywhere;
  }

  .pond-card-info {
    display: grid;

    grid-template-columns: minmax(0, 1fr);

    width: 100%;
    max-width: 100%;

    gap: 3px;

    margin-top: 10px;
  }

  .pond-card-info strong,
  .pond-card-info span {
    max-width: 100%;

    overflow-wrap: anywhere;
  }

  .pond-card-info strong {
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .pond-card-info span {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .pond-card-actions {
    display: flex;

    flex-direction: column;
    align-items: stretch;

    width: 100%;

    gap: 8px;

    margin-top: 14px;
  }

  .pond-card-actions button {
    width: 100%;
    max-width: 100%;
  }

  /* =======================================================
     Badges
  ======================================================= */

  .badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    max-width: 100%;

    min-height: 28px;

    padding: 5px 9px;

    font-size: 0.78rem;
    line-height: 1.25;

    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* =======================================================
     Listas e blocos gerados dinamicamente
  ======================================================= */

  #productionListWrapper,
  #biometriaListWrapper,
  #pondsTableWrapper,
  #screen-agua,
  #screen-arracoamento,
  #screen-estoque,
  #screen-financeiro {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #screen-agua > *,
  #screen-arracoamento > *,
  #screen-estoque > *,
  #screen-financeiro > * {
    max-width: 100%;
  }

  /* =======================================================
     Gráficos / canvas futuros
  ======================================================= */

  .chart-container,
  .chart-wrapper,
  .graph-container,
  .graph-wrapper {
    width: 100%;
    max-width: 100%;

    overflow-x: auto;
  }

  .chart-container canvas,
  .chart-wrapper canvas,
  .graph-container canvas,
  .graph-wrapper canvas {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* =========================================================
   Celulares médios
========================================================= */

@media (max-width: 520px) {
  .public-area {
    padding:
      10px
      max(10px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .auth-layout {
    padding-top: 6px;
    padding-bottom: 16px;
  }

  .auth-card {
    padding: 17px;
    border-radius: 18px;
  }

  .auth-brand {
    gap: 11px;
    margin-bottom: 18px;
  }

  .auth-brand .brand-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;

    border-radius: 16px;
  }

  .auth-panel h2 {
    font-size: 1.22rem;
  }

  .auth-panel p {
    font-size: 0.9rem;
  }

  .main-content {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .topbar {
    align-items: flex-start;

    padding: 12px;
  }

  .topbar > div {
    min-width: 0;
  }

  .page-card {
    padding: 15px;
  }

  .form input,
  .form select {
    padding-left: 12px;
    padding-right: 12px;
  }

  .form textarea {
    padding-left: 12px;
    padding-right: 12px;
  }

  .date-helper-btn {
    font-size: 0.86rem;
  }

  .data-table {
    min-width: 580px;
  }

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

/* =========================================================
   Celulares estreitos
========================================================= */

@media (max-width: 420px) {
  :root {
    --sidebar-width: 270px;
  }

  .auth-card {
    border-radius: 16px;
    padding: 16px;
  }

  .auth-brand .brand-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;

    border-radius: 15px;

    font-size: 1.34rem;
  }

  .auth-brand h1 {
    font-size: 1.2rem;
  }

  .auth-brand p {
    font-size: 0.82rem;
  }

  .auth-panel h2 {
    font-size: 1.16rem;
  }

  .auth-panel p {
    font-size: 0.88rem;
  }

  .form label {
    font-size: 0.88rem;
  }

  .sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nav-link {
    padding: 11px 12px;
  }

  .topbar {
    border-radius: 14px;
  }

  .topbar h2 {
    font-size: 1.05rem;
  }

  .topbar p {
    font-size: 0.8rem;
  }

  .page-card {
    border-radius: 14px;
    padding: 14px;
  }

  .page-card h3 {
    font-size: 1.06rem;
  }

  .page-card p {
    font-size: 0.9rem;
  }

  .status-card {
    padding: 13px;
  }

  .status-card span {
    font-size: 0.9rem;
  }

  .pond-metrics-grid {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .pond-metric {
    padding: 10px 11px;
  }

  .date-helper-manual-row {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }

  .date-helper-manual-row
    .date-helper-select:last-of-type {
    grid-column: 1 / -1;
  }

  .data-table {
    min-width: 540px;
  }
}

/* =========================================================
   Celulares muito pequenos
========================================================= */

@media (max-width: 360px) {
  :root {
    --sidebar-width: 255px;
  }

  .auth-card {
    padding: 14px;
  }

  .auth-brand {
    gap: 10px;
    margin-bottom: 16px;
  }

  .auth-brand .brand-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;

    border-radius: 14px;

    font-size: 1.2rem;
  }

  .auth-brand h1 {
    font-size: 1.1rem;
  }

  .auth-brand p {
    font-size: 0.76rem;
  }

  .auth-panel h2 {
    font-size: 1.08rem;
  }

  .auth-panel p {
    font-size: 0.83rem;
  }

  .form input,
  .form select {
    min-height: 47px;
    height: 47px;
  }

  .form textarea {
    min-height: 92px;
    height: auto;
  }

  .primary-btn,
  .secondary-btn,
  .link-btn {
    font-size: 0.9rem;
  }

  .topbar {
    gap: 10px;
  }

  .topbar h2 {
    font-size: 0.98rem;
  }

  .topbar p {
    font-size: 0.78rem;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .page-card h3 {
    font-size: 1rem;
  }

  .page-card p {
    font-size: 0.86rem;
  }

  .status-card strong {
    font-size: 0.86rem;
  }

  .status-card span {
    font-size: 0.86rem;
  }

  .date-field-helper {
    gap: 6px;
  }

  .date-helper-btn {
    min-height: 40px;

    padding-left: 8px;
    padding-right: 8px;

    font-size: 0.82rem;
  }

  .date-helper-manual-row {
    grid-template-columns:
      minmax(0, 1fr);
  }

  .date-helper-manual-row
    .date-helper-select,
  .date-helper-manual-row
    .date-helper-select:last-of-type,
  .date-helper-manual-row
    .date-helper-apply-btn {
    grid-column: 1;
  }

  .data-table {
    min-width: 500px;
  }
}

/* =========================================================
   Celular em modo paisagem
========================================================= */

@media (orientation: landscape) and (max-height: 540px) {
  .public-area {
    align-items: flex-start;
  }

  .auth-layout {
    align-items: flex-start;

    padding-top: 8px;
    padding-bottom: 14px;
  }

  .auth-card {
    margin: 0 auto;
  }

  .sidebar {
    overflow-y: auto;
  }

  .brand {
    padding-bottom: 10px;
  }

  .main-nav {
    max-height: 54vh;

    overflow-y: auto;
  }

  .sidebar-footer {
    padding-bottom: 8px;
  }

  /*
    Sticky em telas muito baixas ocupa
    área excessiva; no paisagem fica normal.
  */
  .topbar {
    position: relative;
    top: auto;
  }

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

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

/* =========================================================
   Dispositivos touch
========================================================= */

@media (hover: none) and (pointer: coarse) {
  button,
  .nav-link,
  .primary-btn,
  .secondary-btn,
  .link-btn,
  .icon-btn {
    cursor: default;
  }

  input,
  select,
  textarea,
  button {
    -webkit-tap-highlight-color: transparent;
  }

  .primary-btn:hover,
  .secondary-btn:hover,
  .link-btn:hover,
  .nav-link:hover,
  .icon-btn:hover {
    transform: none;
  }

  .status-card:hover,
  .page-card:hover,
  .pond-card:hover {
    transform: none;
  }
}

/* =========================================================
   Preferência por menos movimento
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .primary-btn,
  .secondary-btn,
  .link-btn,
  .nav-link,
  .icon-btn {
    transition-duration: 0.01ms !important;
  }
}
/* ===== css/dashboard.css ===== */
/*
  AquaGest Pro
  Arquivo: css/dashboard.css
  Etapa: 3 — Dashboard / Layout leve
  Versão reconstruída: dashboard-light-v1
  Status: em desenvolvimento
*/

/* =========================================================
   Dashboard — estrutura leve
========================================================= */

#screen-dashboard {
  width: 100%;
}

#screen-dashboard .page-card {
  position: relative;
  overflow: hidden;
}

#screen-dashboard .page-card:first-child {
  border-left: 4px solid var(--color-primary);
}

/* =========================================================
   Títulos e textos do dashboard
========================================================= */

#screen-dashboard h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

#screen-dashboard h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color-primary);
  flex: 0 0 auto;
}

#screen-dashboard .page-card p {
  max-width: 920px;
}

/* =========================================================
   Cards de status do painel
========================================================= */

#screen-dashboard .status-grid {
  align-items: stretch;
}

#screen-dashboard .status-card {
  position: relative;
  min-height: 104px;
  justify-content: space-between;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

#screen-dashboard .status-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-primary);
  opacity: 0.75;
}

#screen-dashboard .status-card:hover {
  transform: translateY(-1px);
}

#screen-dashboard .status-card strong {
  padding-right: 18px;
}

#screen-dashboard .status-card span {
  display: block;
  word-break: break-word;
}

/* =========================================================
   Indicadores técnicos preparados para próximos módulos
========================================================= */

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.dashboard-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.dashboard-card strong {
  display: block;
  color: var(--color-text);
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.dashboard-card span {
  display: block;
  color: var(--color-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* =========================================================
   KPIs leves para uso futuro
========================================================= */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.kpi-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.kpi-label {
  display: block;
  color: var(--color-muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.kpi-value {
  display: block;
  color: var(--color-text);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1.1;
}

.kpi-help {
  display: block;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

/* =========================================================
   Lista leve de alertas / atividades futuras
========================================================= */

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

.dashboard-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 12px;
}

.dashboard-list-item strong {
  color: var(--color-text);
  font-size: 0.92rem;
}

.dashboard-list-item span {
  color: var(--color-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

/* =========================================================
   Estados visuais simples
========================================================= */

.dashboard-ok {
  color: var(--color-success) !important;
}

.dashboard-warning {
  color: var(--color-warning) !important;
}

.dashboard-danger {
  color: var(--color-danger) !important;
}

.dashboard-muted {
  color: var(--color-muted) !important;
}

/* =========================================================
   Tema escuro
========================================================= */

[data-theme="dark"] #screen-dashboard .status-card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .kpi-card {
  background: linear-gradient(180deg, var(--color-surface), var(--color-surface-soft));
}

[data-theme="dark"] .dashboard-list-item {
  background: var(--color-surface-soft);
}

/* =========================================================
   Responsividade
========================================================= */

@media (max-width: 1180px) {
  .dashboard-grid,
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  #screen-dashboard .page-card:first-child {
    border-left-width: 3px;
  }

  #screen-dashboard .status-card {
    min-height: auto;
  }

  .dashboard-grid,
  .kpi-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dashboard-card,
  .kpi-card {
    padding: 14px;
    border-radius: 14px;
  }

  .dashboard-list-item {
    flex-direction: column;
    gap: 6px;
  }

  .kpi-value {
    font-size: 1.22rem;
  }
}

@media (max-width: 420px) {
  #screen-dashboard h3::before {
    width: 8px;
    height: 8px;
  }

  .dashboard-card,
  .kpi-card,
  .dashboard-list-item {
    padding: 13px;
  }

  .kpi-value {
    font-size: 1.15rem;
  }
}

/* =========================================================
   Dispositivos touch
========================================================= */

@media (hover: none) and (pointer: coarse) {
  #screen-dashboard .status-card:hover {
    transform: none;
  }
}
/* ===== css/aquagest-polish.css ===== */
/* Camada visual consolidada — AquaGest Pro v8 */
:root { --color-primary: #0b4f6c; --color-primary-dark: #083b50; --color-bg: #eef7f5; --color-border: #d4e7e3; --radius-lg: 20px; --shadow-soft: 0 14px 34px rgba(9, 70, 66, .09); }
body { background: radial-gradient(circle at 8% 0%, rgba(24, 170, 151, .16), transparent 30%), linear-gradient(145deg, var(--color-bg), #f8fbfb 55%, #edf5fa); }
.page-card, .dashboard-card, .status-card, .auth-card { border: 1px solid rgba(143, 190, 184, .36); box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.page-card:hover, .dashboard-card:hover, .status-card:hover { border-color: rgba(11, 79, 108, .55); box-shadow: 0 18px 42px rgba(9, 70, 66, .13); }
.page-card { border-radius: var(--radius-lg); }
.toolbar { gap: 18px; }
.toolbar-title h2, .toolbar-title h3 { letter-spacing: -.02em; }
label { color: var(--color-text); font-size: .82rem; letter-spacing: .01em; }
input, select, textarea { border-radius: 12px !important; border-color: var(--color-border) !important; background: color-mix(in srgb, var(--color-surface) 92%, var(--color-primary-soft)) !important; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary) !important; box-shadow: 0 0 0 4px rgba(11, 79, 108, .13) !important; outline: none; transform: translateY(-1px); }
button.primary-btn, .primary-btn { border-radius: 12px; background: var(--color-primary); box-shadow: 0 8px 18px rgba(11, 79, 108, .2); }
button.primary-btn:hover, .primary-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(11, 79, 108, .28); }
.secondary-btn { border-radius: 12px; }
.nav-item, .sidebar-link { border-radius: 12px; margin: 3px 8px; transition: background .16s ease, transform .16s ease; }
.nav-item:hover, .sidebar-link:hover { background: rgba(103, 232, 214, .12); transform: translateX(2px); }
.nav-item.active, .sidebar-link.active { background: linear-gradient(90deg, rgba(125, 211, 252, .24), rgba(125, 211, 252, .06)); box-shadow: inset 3px 0 0 #7dd3fc; }
.status-grid, .dashboard-grid { gap: 16px; }
@media (max-width: 760px) { .page-card { border-radius: 16px; } .toolbar { align-items: flex-start; flex-direction: column; } .form-actions { position: sticky; bottom: 10px; z-index: 5; padding: 10px; border-radius: 14px; background: color-mix(in srgb, var(--color-surface) 88%, transparent); backdrop-filter: blur(12px); } }

/* Redesign visual v2 — hierarquia, contraste e leitura rápida */
body { letter-spacing: .005em; }
.public-area { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(135deg, #062a32 0%, #0a5f63 48%, #dff7f1 48.2%, #f4fbfa 100%); }
.public-area::before, .public-area::after { content: ""; position: absolute; border-radius: 999px; pointer-events: none; filter: blur(2px); }
.public-area::before { width: 420px; height: 420px; right: -100px; top: -130px; background: rgba(94, 234, 212, .18); }
.public-area::after { width: 280px; height: 280px; left: 8%; bottom: -150px; background: rgba(255, 255, 255, .12); }
.auth-layout { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(460px, 100%); border: 0; border-radius: 28px; padding: 34px; background: rgba(255,255,255,.96); box-shadow: 0 30px 90px rgba(0, 31, 39, .28); }
.auth-brand { padding-bottom: 24px; margin-bottom: 26px; border-bottom: 1px solid #e1efec; }
.brand-icon { display: grid; place-items: center; overflow: hidden; color: transparent !important; background: #fff; border: 0; box-shadow: 0 10px 24px rgba(11, 79, 108, .22); }
.brand-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.auth-brand h1, .brand h1 { letter-spacing: -.045em; }
.auth-brand h1 { font-size: clamp(1.65rem, 4vw, 2.1rem); }
.auth-panel h2 { font-size: 1.45rem; letter-spacing: -.03em; }
.auth-panel p { color: #678087; line-height: 1.6; }
.auth-card .primary-btn { width: 100%; min-height: 48px; margin-top: 8px; }
.app-shell { background: linear-gradient(140deg, #f5f7fa 0%, var(--color-bg) 45%, #eef5fa 100%); }
.sidebar { background: linear-gradient(180deg, #06242d 0%, #073c45 62%, #06242d 100%); border-right: 1px solid rgba(147, 238, 223, .12); box-shadow: 12px 0 34px rgba(3, 32, 40, .11); }
.brand { min-height: 92px; padding: 20px 22px; border-bottom: 1px solid rgba(167, 243, 228, .11); }
.brand span { color: #a6c8c9; }
.main-nav { padding: 18px 10px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 10px 13px; color: #c7dfde; font-weight: 650; }
.nav-item::before { width: 22px; display: inline-grid; place-items: center; opacity: .9; font-size: 1rem; }
.nav-item[data-screen="dashboard"]::before { content: "⌂"; }
.nav-item[data-screen="piscicultura"]::before { content: "◉"; }
.nav-item[data-screen="viveiros"]::before { content: "◌"; }
.nav-item[data-screen="producao"]::before { content: "↗"; }
.nav-item[data-screen="biometria"]::before { content: "⌁"; }
.nav-item[data-screen="previsoes"]::before { content: "∿"; }
.nav-item[data-screen="dimensionamento"]::before { content: "▥"; }
.nav-item[data-screen="agua"]::before { content: "◒"; }
.nav-item[data-screen="arracoamento"]::before { content: "✦"; }
.nav-item[data-screen="estoque"]::before { content: "▣"; }
.nav-item[data-screen="financeiro"]::before { content: "$"; }
.nav-item[data-screen="relatorios"]::before { content: "▤"; }
.nav-item[data-screen="configuracoes"]::before { content: "⚙"; }
.nav-item.active { color: #effffb; border: 1px solid rgba(103, 232, 214, .18); }
.sidebar-footer { padding: 16px 18px 22px; border-top: 1px solid rgba(167, 243, 228, .11); }
.sidebar-footer .secondary-btn { width: 100%; margin-top: 8px; border-color: rgba(178, 231, 222, .18); color: #d9f5ef; background: rgba(255,255,255,.06); }
.main-content { background: transparent; }
.topbar { position: sticky; top: 0; z-index: 10; margin: 16px 22px 0; border: 1px solid rgba(155, 203, 198, .42); border-radius: 20px; background: rgba(255,255,255,.78); box-shadow: 0 12px 30px rgba(9, 70, 66, .07); backdrop-filter: blur(16px); }
[data-theme="dark"] .topbar { background: rgba(15, 23, 42, .82); border-color: rgba(148,163,184,.22); }
.topbar h2 { font-size: clamp(1.15rem, 2vw, 1.55rem); letter-spacing: -.035em; }
.topbar p { opacity: .78; }
.screen-content, .main-content > section:not(.topbar) { padding-top: 22px; }
.page-card { background: rgba(255,255,255,.88); }
[data-theme="dark"] .page-card, [data-theme="dark"] .dashboard-card, [data-theme="dark"] .status-card { background: rgba(15, 23, 42, .88); }
.page-card h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.status-card strong { font-size: 1.45rem; letter-spacing: -.04em; }
.form-grid { row-gap: 18px; }
.form-actions { gap: 10px; }
.table-wrapper, .data-table-wrapper { border-radius: 16px; border: 1px solid var(--color-border); overflow: auto; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.reports-export-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; padding: 16px 18px; border: 1px solid rgba(11, 79, 108, .18); border-radius: 16px; background: linear-gradient(135deg, rgba(11, 79, 108, .09), rgba(255,255,255,.58)); }
.reports-export-toolbar strong, .reports-export-toolbar span { display: block; }
.reports-export-toolbar span { margin-top: 4px; color: var(--color-muted); font-size: .86rem; }
.reports-export-toolbar .reports-actions { margin: 0; }
.finance-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; padding: 6px; border: 1px solid rgba(11, 79, 108, .18); border-radius: 15px; background: rgba(255,255,255,.72); box-shadow: 0 8px 22px rgba(9,70,66,.06); }
.finance-tab { appearance: none; border: 0; border-radius: 10px; padding: 10px 15px; color: var(--color-muted); background: transparent; font-weight: 750; transition: background .16s ease, color .16s ease, transform .16s ease; }
.finance-tab:hover { color: var(--color-primary-dark); background: rgba(11,143,131,.08); transform: translateY(-1px); }
.finance-tab.is-active { color: #fff; background: var(--color-primary); box-shadow: 0 6px 14px rgba(11,143,131,.2); }
.finance-view { display: none; animation: financeViewIn .18s ease; }
.finance-view.is-active { display: block; }
.finance-view > .page-card, .finance-view > .finance-summary-grid { margin-bottom: 18px; }
.inventory-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; padding: 6px; border: 1px solid rgba(11, 79, 108, .18); border-radius: 15px; background: rgba(255,255,255,.72); box-shadow: 0 8px 22px rgba(9,70,66,.06); }
.inventory-tab { appearance: none; border: 0; border-radius: 10px; padding: 10px 16px; color: var(--color-muted); background: transparent; font-weight: 750; transition: background .16s ease, color .16s ease, transform .16s ease; }
.inventory-tab:hover { color: var(--color-primary-dark); background: rgba(11,143,131,.08); transform: translateY(-1px); }
.inventory-tab.is-active { color: #fff; background: var(--color-primary); box-shadow: 0 6px 14px rgba(11,143,131,.2); }
.inventory-view { display: none; animation: financeViewIn .18s ease; }
.inventory-view.is-active { display: block; }
.inventory-view > .page-card, .inventory-view > .stock-summary-grid { margin-bottom: 18px; }
[data-theme="dark"] .inventory-subnav { background: rgba(15,23,42,.78); border-color: rgba(148,163,184,.2); }
@keyframes financeViewIn { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
[data-theme="dark"] .finance-subnav { background: rgba(15,23,42,.78); border-color: rgba(148,163,184,.2); }
@media (max-width: 760px) { .reports-export-toolbar { align-items: stretch; flex-direction: column; } }
@media (max-width: 760px) { .finance-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .finance-tab { width: 100%; padding-inline: 8px; } }
@media (max-width: 760px) { .inventory-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .inventory-tab { width: 100%; padding-inline: 8px; } }
.settings-hero-card { background: linear-gradient(135deg, rgba(11,143,131,.1), rgba(255,255,255,.88)); }
.section-kicker { color: var(--color-primary-dark); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.backup-status { min-height: 1.3em; margin: 14px 0 0; font-size: .88rem; }
.backup-status.success { color: #083b50; }
.backup-status.warning { color: #9a6700; }
.backup-status.error { color: #a32626; }
.backup-status.pending { color: var(--color-muted); }
[data-theme="dark"] .settings-hero-card { background: linear-gradient(135deg, rgba(11,143,131,.18), rgba(15,23,42,.88)); }
table thead th { background: rgba(11, 79, 108, .08); color: var(--color-primary-dark); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
@media (min-width: 1100px) { .auth-layout::after { content: "Gestão clara para decisões melhores"; position: absolute; left: 7vw; top: 50%; transform: translateY(-50%); width: 250px; color: rgba(255,255,255,.88); font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.02; font-weight: 800; letter-spacing: -.06em; } .auth-card { margin-left: min(46vw, 610px); } }
@media (max-width: 760px) { .public-area { background: linear-gradient(160deg, #062a32 0%, #0a5f63 34%, #eef9f6 34.2%, #eef9f6 100%); } .auth-layout { padding: 18px; align-items: end; } .auth-card { padding: 24px 20px; border-radius: 22px; } .topbar { margin: 10px 10px 0; border-radius: 16px; } }

/* Versão para computador: mais área útil, leitura em colunas e navegação fixa. */
@media (min-width: 981px) {
  :root { --sidebar-width: 272px; }
  .app-shell { min-height: 100vh; }
  .sidebar { width: var(--sidebar-width); padding: 22px 16px; }
  .main-content { width: calc(100% - var(--sidebar-width)); max-width: none; margin-left: var(--sidebar-width); padding: 24px 34px 48px; }
  .topbar, .screen { width: 100%; max-width: 1480px; margin-left: auto; margin-right: auto; }
  .topbar { margin-top: 0; margin-bottom: 24px; padding: 18px 22px; }
  .screen { padding-bottom: 42px; }
  .page-card { padding: 26px; margin-bottom: 20px; }
  .page-header { margin-bottom: 24px; }
  .page-header h2 { font-size: 1.65rem; }
  .page-header p { max-width: 780px; }
  .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  #screen-agua .form-grid, #screen-arracoamento .form-grid, #screen-estoque .form-grid, #screen-financeiro .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .form-grid .form-full, .form-grid > .form-full { grid-column: 1 / -1; }
  .form-actions { justify-content: flex-end; }
  .dashboard-grid, .status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .finance-summary-grid, .stock-summary-grid, .desempenho-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .reports-export-toolbar { max-width: 1480px; margin-left: auto; margin-right: auto; }
  .table-wrapper, .data-table-wrapper { max-height: 62vh; }
  .brand-icon { width: 52px; height: 52px; min-width: 52px; border-radius: 16px; }
  .nav-item, .nav-link { min-height: 46px; }
}

html.desktop-mode .main-content { width: calc(100% - var(--sidebar-width)); max-width: none; }
html.desktop-mode .screen { max-width: 1480px; margin-left: auto; margin-right: auto; }

.health-record-list {
  display: grid;
  gap: 12px;
}

.health-record-card {
  padding: 16px 18px;
  border: 1px solid var(--border-color, #d8e8dc);
  border-radius: 16px;
  background: var(--surface-muted, #f8fcf9);
}

.health-record-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.health-record-card > div span,
.health-record-card small,
.technical-note {
  color: var(--text-muted, #5d7166);
}

.health-record-card p {
  margin: 10px 0 0;
}

.privacy-link {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.82rem;
}

.privacy-link a {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.settings-ml-card {
  border-left: 4px solid var(--color-primary);
}

.dimensionamento-intro-card {
  background: linear-gradient(135deg, rgba(11, 79, 108, .08), rgba(255, 255, 255, .9));
}

.dimensionamento-assumption {
  display: grid;
  gap: 4px;
  margin: 16px 0 20px;
  padding: 14px 16px;
  border-left: 4px solid var(--color-primary);
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.dimensionamento-assumption span {
  color: var(--color-muted);
  line-height: 1.5;
}

.dimensionamento-results {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-top: 0;
}

.dimensionamento-results .status-card strong {
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dimensionamento-results .status-card span {
  color: var(--color-primary-dark);
  font-size: 1.08rem;
  font-weight: 750;
}

.dimensionamento-alert {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 13px;
  background: var(--color-surface-soft);
  color: var(--color-text);
  line-height: 1.5;
}

.dimensionamento-alert.is-safe {
  border-color: rgba(21, 122, 110, .35);
  background: rgba(21, 122, 110, .08);
}

.dimensionamento-alert.is-warning {
  border-color: rgba(161, 92, 7, .4);
  background: rgba(233, 196, 106, .2);
}

.dimensionamento-auto-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface-soft);
}

.dimensionamento-auto-card h4 {
  margin: 6px 0 6px;
  color: var(--color-text);
  font-size: 1rem;
}

.dimensionamento-auto-card p {
  margin: 0;
  max-width: 760px;
}

.dimensionamento-auto-card > span:last-child {
  flex: 0 0 auto;
  color: var(--color-muted);
  font-size: .82rem;
  line-height: 1.4;
  text-align: right;
}

.dimensionamento-auto-card.is-critical {
  border-color: rgba(180, 35, 24, .45);
  background: rgba(180, 35, 24, .08);
}

.dimensionamento-auto-card.is-attention {
  border-color: rgba(161, 92, 7, .4);
  background: rgba(233, 196, 106, .2);
}

.dimensionamento-auto-card.is-safe {
  border-color: rgba(21, 122, 110, .35);
  background: rgba(21, 122, 110, .08);
}

.dimensionamento-auto-card.is-neutral {
  border-color: rgba(46, 111, 149, .28);
  background: rgba(46, 111, 149, .07);
}

@media (max-width: 760px) {
  .dimensionamento-auto-card {
    flex-direction: column;
  }

  .dimensionamento-auto-card > span:last-child {
    text-align: left;
  }
}

.dimensionamento-table-wrapper {
  margin-top: 16px;
}

.dimensionamento-table th,
.dimensionamento-table td {
  min-width: 150px;
  vertical-align: top;
  line-height: 1.45;
}

.dimensionamento-table th:first-child,
.dimensionamento-table td:first-child {
  min-width: 120px;
  white-space: nowrap;
}

.dimensionamento-reference-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--color-muted);
  line-height: 1.5;
}

[data-theme="dark"] .dimensionamento-intro-card,
[data-theme="dark"] .dimensionamento-assumption {
  background: rgba(15, 23, 42, .82);
}

@media (max-width: 760px) {
  .dimensionamento-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Paleta acadêmica e técnica — AquaGest Pro */
:root {
  --color-primary: #0b4f6c;
  --color-primary-dark: #083b50;
  --color-primary-soft: #dcecef;
  --color-primary-light: #edf5f7;
  --color-nav: #102a43;
  --color-nav-soft: #243b53;
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-surface-soft: #e9eef3;
  --color-border: #ccd6e0;
  --color-text: #1f2933;
  --color-muted: #52606d;
  --color-danger: #b42318;
  --color-warning: #a15c07;
  --color-success: #157a6e;
  --color-info: #2e6f95;
  --shadow-sm: 0 6px 16px rgba(16, 42, 67, 0.06);
  --shadow-soft: 0 12px 28px rgba(16, 42, 67, 0.08);
  --shadow-card: 0 18px 42px rgba(16, 42, 67, 0.11);
}

body {
  background: radial-gradient(circle at 8% 0%, rgba(11, 79, 108, 0.08), transparent 30%), linear-gradient(145deg, #f5f7fa, #ffffff 58%, #edf3f6);
}

.public-area {
  background: linear-gradient(135deg, #102a43 0%, #1f5c72 52%, #e9f0f3 52.2%, #f7f9fb 100%);
}

.sidebar {
  background: linear-gradient(180deg, #102a43 0%, #1f4660 62%, #102a43 100%);
  border-right-color: rgba(204, 214, 224, 0.18);
}

.nav-item {
  color: #d9e2ec;
}

.nav-item:hover,
.sidebar-link:hover {
  background: rgba(174, 214, 224, 0.12);
}

.nav-item.active,
.sidebar-link.active {
  background: linear-gradient(90deg, rgba(135, 196, 211, 0.28), rgba(135, 196, 211, 0.08));
  box-shadow: inset 3px 0 0 #8bc4d3;
}

.nav-item.active {
  border-color: rgba(174, 214, 224, 0.24);
}

.topbar {
  border-color: rgba(82, 96, 109, 0.24);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.06);
}

.page-card,
.dashboard-card,
.status-card,
.auth-card {
  border-color: rgba(82, 96, 109, 0.2);
}

.page-card:hover,
.dashboard-card:hover,
.status-card:hover {
  border-color: rgba(11, 79, 108, 0.42);
  box-shadow: 0 18px 38px rgba(16, 42, 67, 0.1);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 4px rgba(11, 79, 108, 0.13) !important;
}

button.primary-btn,
.primary-btn,
.finance-tab.is-active,
.inventory-tab.is-active {
  background: var(--color-primary);
  box-shadow: 0 7px 16px rgba(11, 79, 108, 0.18);
}

button.primary-btn:hover,
.primary-btn:hover {
  box-shadow: 0 11px 22px rgba(11, 79, 108, 0.24);
}

table thead th {
  background: rgba(11, 79, 108, 0.08);
  color: var(--color-primary-dark);
}

.reports-export-toolbar,
.finance-subnav,
.inventory-subnav {
  border-color: rgba(11, 79, 108, 0.16);
  background: rgba(255, 255, 255, 0.82);
}

[data-theme="dark"] {
  --color-bg: #101820;
  --color-surface: #182532;
  --color-surface-soft: #203241;
  --color-border: #34495a;
  --color-text: #e6edf3;
  --color-muted: #a7b6c2;
  --color-primary-soft: #173e50;
  --color-primary-light: #1d3440;
  --color-nav: #0b1d2a;
  --color-nav-soft: #173247;
}

[data-theme="dark"] body {
  background: radial-gradient(circle at 8% 0%, rgba(55, 125, 151, 0.16), transparent 32%), var(--color-bg);
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .reports-export-toolbar,
[data-theme="dark"] .finance-subnav,
[data-theme="dark"] .inventory-subnav {
  background: rgba(24, 37, 50, 0.92);
  border-color: rgba(167, 182, 194, 0.2);
}

/* ===== Abas (Produção e Programa alimentar) ===== */
.aq-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; margin: 0 0 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.aq-tab { appearance: none; border: 0; background: transparent; color: var(--color-muted); font: inherit; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-md); cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast); }
.aq-tab:hover { color: var(--color-text); background: var(--color-surface-soft); }
.aq-tab[aria-selected="true"] { background: var(--color-primary); color: #fff; }
.aq-tab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.aq-subtabs { margin: 18px 0 12px; }
#screen-producao [data-prod-tab] { display: none; }
#screen-producao[data-active-tab="lotes"] [data-prod-tab="lotes"],
#screen-producao[data-active-tab="mov"] [data-prod-tab="mov"],
#screen-producao[data-active-tab="programa"] [data-prod-tab="programa"] { display: block; }
#screen-producao[data-active-tab="projecao"] [data-prod-tab="projecao"] { display: block; }
.pa-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pa-fill-wrap { display: flex; flex-direction: column; justify-content: flex-end; }
.pa-summary { margin: 18px 0 4px; }
.pa-summary .status-card span { display: block; font-size: .78rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.pa-summary .status-card strong { display: block; margin-top: 4px; font-size: 1.05rem; letter-spacing: -.01em; }
.pa-table td, .pa-table th { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pa-panel h4 { margin: 16px 0 6px; }
.pa-notes { margin: 12px 0 0; padding-left: 18px; color: var(--color-warning); }
/* ===== Exportação ===== */
.aq-export-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin: 0 0 12px; }
.aq-export-bar span { color: var(--color-muted); font-size: .85rem; margin-right: auto; }
.aq-export-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.aq-export-cards article { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.aq-export-cards article p { margin: 0; color: var(--color-muted); font-size: .9rem; }
/* Guia técnico de arraçoamento: sem quebra de palavra no meio e tabela inteira visível */
#feedingNutritionGuide .table-wrapper { max-height: none; }
#feedingNutritionGuide th, #feedingNutritionGuide td { word-break: normal; overflow-wrap: normal; hyphens: none; vertical-align: top; }
#feedingNutritionGuide td:nth-child(1), #feedingNutritionGuide td:nth-child(2), #feedingNutritionGuide td:nth-child(4), #feedingNutritionGuide td:nth-child(7), #feedingNutritionGuide th { white-space: nowrap; }
#mov_list .data-table td, #mov_list .data-table th { white-space: nowrap; }

/* =========================================================
   v25 — botões secundários na área de conteúdo, ícones do menu
   O estilo base de .secondary-btn foi feito para a barra lateral escura
   (fundo quase transparente) e sumia sobre os cartões brancos.
========================================================= */
.main-content .secondary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 9px 16px; border-radius: 12px;
  background: #ffffff; color: #0b4f4a; border: 1px solid #b9d9d3;
  font-weight: 750; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 118, 110, .06);
}
.main-content .secondary-btn:hover { background: #edf5f7; border-color: #0b4f6c; }
.main-content .secondary-btn:disabled { opacity: .5; cursor: not-allowed; }
.main-content .secondary-btn.aq-btn-strong { background: #0b4f6c; color: #ffffff; border-color: #0b4f6c; }
.main-content .secondary-btn.aq-btn-strong:hover { background: #083b50; }
[data-theme="dark"] .main-content .secondary-btn { background: rgba(255,255,255,.06); color: #e2e8f0; border-color: rgba(255,255,255,.2); }
[data-theme="dark"] .main-content .secondary-btn.aq-btn-strong { background: #0b4f6c; color: #ffffff; }
#screen-configuracoes .page-card p > .secondary-btn + .secondary-btn,
#screen-configuracoes .page-card .secondary-btn { margin: 4px 8px 4px 0; }
#screen-configuracoes input[type="password"], #screen-configuracoes input[type="file"] { max-width: 260px; margin: 4px 8px 4px 0; }
.nav-item[data-screen="desempenho"]::before { content: "⤴"; }
.nav-item[data-screen="sanidade"]::before { content: "✚"; }

/* v26.5 — abas de Relatórios: "Relatórios" e "Fichas da cooperativa" (sem repetir módulos). */
#screen-relatorios[data-active-tab="fichas"] > :not(#relatoriosTabs):not(#fichasCooperativaCard) { display: none !important; }
#screen-relatorios:not([data-active-tab="fichas"]) > #fichasCooperativaCard { display: none !important; }

/* v26.6 — Custo por kg produzido: um cartão por lote, valores inteiros na mesma linha. */
.aq-cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 8px 0; }
.aq-cost-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px 14px; }
.aq-cost-card h4 { margin: 0 0 8px; font-size: .98rem; }
.aq-cost-line { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-top: 1px solid var(--color-border); font-size: .92rem; }
.aq-cost-line:first-of-type { border-top: 0; }
.aq-cost-line span { color: var(--color-muted); }
.aq-cost-line b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.aq-cost-line b.aq-cost-strong { color: var(--color-primary); }

/* v26.7 — aba Fichas (opção B): seletor Modelo A/Modelo B, botões por viveiro, prévia e botões de baixar. */
.ficha-seg { display: flex; background: #e4eeeb; border-radius: 12px; padding: 4px; margin: 12px 0; }
.ficha-seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--color-muted); cursor: pointer; }
.ficha-seg button.on { background: #fff; color: #0b4f4a; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.ficha-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ficha-chip { flex: 1 1 90px; border: 1px solid var(--color-border); background: #fff; border-radius: 14px; padding: 8px 6px; font: inherit; cursor: pointer; text-align: center; }
.ficha-chip b { display: block; font-size: 1rem; }
.ficha-chip small { display: block; font-size: .74rem; color: var(--color-muted); }
.ficha-chip.on { background: #0b4f6c; border-color: #0b4f6c; color: #fff; }
.ficha-chip.on small { color: rgba(255,255,255,.85); }
.ficha-preview { margin-top: 14px; border: 1px solid #c5ddcc; border-radius: 14px; overflow: hidden; background: #fff; }
.ficha-preview:empty { display: none; }
.ficha-ph { background: #e9f4ec; padding: 8px 10px; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: #1d4d2c; text-align: center; border-bottom: 1px solid #9cc5a8; }
.ficha-preview table { width: 100%; border-collapse: collapse; font-size: .74rem; }
.ficha-preview th, .ficha-preview td { border: 1px solid #c5ddcc; padding: 4px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ficha-preview th { background: #f2f8f3; text-align: center; }
.ficha-preview td:first-child { text-align: center; }
.ficha-pfoot { display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; color: var(--color-muted); padding: 8px 10px; background: #fafcfb; }
.ficha-dl { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-top: 14px; }
.ficha-dl button { width: 100%; min-height: 46px; }

/* v26.7 — Custo por kg (opção B) */
.aq-cost-hero { background: var(--color-primary); color: #fff; border-radius: 18px; padding: 16px; margin: 4px 0 16px; }
.aq-cost-hero small { opacity: .85; font-size: .8rem; }
.aq-cost-hero .big { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0; }
.aq-cost-hero .row { display: flex; flex-wrap: wrap; gap: 18px; font-size: .8rem; }
.aq-cost-hero .row b { display: block; font-size: 1rem; white-space: nowrap; }
.aq-cost-row { border-top: 1px solid var(--color-border); }
.aq-cost-row summary { list-style: none; display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; cursor: pointer; }
.aq-cost-row summary::-webkit-details-marker { display: none; }
.aq-cost-badge { background: var(--color-surface-soft, #eef7f5); border-radius: 12px; text-align: center; padding: 6px 0; font-weight: 800; color: #0b4f4a; }
.aq-cost-badge small { display: block; font-weight: 500; font-size: .68rem; color: var(--color-muted); }
.aq-cost-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: #e7efed; }
.aq-cost-bar i, .aq-cost-legend i { display: block; height: 100%; background: #0b4f6c; }
.aq-cost-bar i.o, .aq-cost-legend i.o { background: #9cc9c3; }
.aq-cost-meta { display: block; font-size: .74rem; color: var(--color-muted); margin-top: 5px; }
.aq-cost-val { text-align: right; }
.aq-cost-val b { font-size: 1.12rem; color: #0b4f6c; white-space: nowrap; }
.aq-cost-val small { display: block; font-size: .7rem; color: var(--color-muted); }
.aq-cost-detail { padding: 0 0 12px 72px; }
.aq-cost-legend { display: flex; gap: 14px; font-size: .74rem; color: var(--color-muted); margin: 10px 0 4px; }
.aq-cost-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* v26.8 — Viveiros: cartão inteiro (sem corte por altura) e seletor de viveiro sempre visível no topo da lista. */
#pondsTableWrapper { max-height: none !important; overflow: visible !important; }
.pond-selector { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; margin: 0 0 12px; background: var(--color-surface, #fff); border: 1px solid var(--color-border); border-radius: 14px; box-shadow: 0 4px 12px rgba(9,70,66,.08); }
.pond-selector-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pond-chip { border: 1px solid var(--color-border); background: #fff; border-radius: 999px; padding: 7px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.pond-chip.on { background: #0b4f6c; border-color: #0b4f6c; color: #fff; }
.pond-card[hidden] { display: none !important; }

/* v26.9 — Biometria: lista curta das biometrias anteriores (só para corrigir). */
.biometry-older { margin-top: 14px; border: 1px solid var(--color-border); border-radius: 14px; padding: 10px 14px; }
.biometry-older h4 { margin: 0 0 4px; }
.biometry-older-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--color-border); flex-wrap: wrap; }

/* v26.9 — campo de senha do backup com largura inteira */
#screen-configuracoes .settings-hero-card .form-grid { display: block; width: 100%; max-width: 560px; margin: 8px 0 12px; align-self: stretch; flex: 0 0 auto; }
#screen-configuracoes .settings-hero-card .form-grid > div { width: 100%; }
#screen-configuracoes .settings-hero-card .form-grid label { display: block; margin-bottom: 6px; }
#screen-configuracoes #backupPassword { display: block; width: 100% !important; max-width: 560px !important; margin: 0; box-sizing: border-box; min-height: 46px; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 12px; font: inherit; background: #fff; }

/* v26.10 — Excluir minha conta e dados */
.danger-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 2px solid var(--color-danger); background: #fff; color: var(--color-danger); font: inherit; font-weight: 700; cursor: pointer; }
.danger-btn:hover:not(:disabled) { background: var(--color-danger); color: #fff; }
.danger-btn:disabled { opacity: .6; cursor: progress; }
.account-delete-card { border-color: rgba(190, 63, 69, .35); }
.account-delete-panel { margin-top: 12px; padding: 14px; border: 1px solid rgba(190, 63, 69, .35); border-radius: 14px; background: #fff7f7; }
.account-delete-panel h4 { margin: 0 0 8px; color: var(--color-danger); }
.account-delete-list { margin: 4px 0 10px 18px; padding: 0; columns: 2; column-gap: 24px; }
.account-delete-warning { color: var(--color-danger); }
.account-delete-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 10px 0; }
.account-delete-form input { width: 100%; box-sizing: border-box; min-height: 46px; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 12px; font: inherit; background: #fff; }
.account-deleted-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); }
.account-deleted-box { max-width: 420px; width: 100%; padding: 22px; border-radius: 18px; background: #fff; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.account-deleted-box h3 { margin-top: 0; }
@media (max-width: 560px) { .account-delete-list { columns: 1; } }
.danger-btn[hidden], .account-delete-panel[hidden] { display: none !important; }
/* v26.10 — aviso antes de pedir permissão (localização, microfone) */
.aq-permission-note { margin: 8px 0; padding: 12px 14px; border: 1px solid var(--color-border); border-left: 4px solid #0b4f6c; border-radius: 12px; background: #f3faf8; }
.aq-permission-note p { margin: 0 0 8px; }
/* v26.10: lembrete de backup dentro de Configurações (não fica mais por cima da tela). */
.aq-diag-tip { padding: 10px 12px; border-radius: 10px; background: #fff4d6; color: #5a4300; border: 1px solid #f1d58a; }
[data-theme="dark"] .aq-diag-tip { background: #3a3014; color: #f6e3a6; border-color: #6b5a22; }

/* ===== css/navegacao.css ===== */
/* =========================================================
   AquaGest Pro — v26.11, etapa 1 do novo layout
   Barra de baixo · ➕ Lançar · Mais · Início reorganizado
   (cores e fonte do app; protótipo aprovado em 08/11/2026)
========================================================= */

:root {
  --aq-bar-h: 66px;
  --aq-safe-b: env(safe-area-inset-bottom, 0px);
  --aq-ink: var(--color-text, #102a32);
  --aq-muted: #52606d;          /* 6,3:1 sobre branco */
  --aq-line: var(--color-border, #dbe8e7);
  --aq-card: var(--color-surface, #ffffff);
  --aq-brand: var(--color-primary, #0b4f6c);
  --aq-brand-ink: #083b50;
  --aq-nav: var(--color-nav, #102a43);
  --aq-nav-ink: #cbd5e1;        /* 11:1 sobre a barra */
  --aq-nav-on: #7dd3fc;
  --aq-warn-bg: #fff4d6;
  --aq-warn-line: #f1d58a;
  --aq-warn-ink: #5a4300;
  --aq-warn-ico: #a15c00;
  --aq-danger: #b42318;
  --aq-danger-bg: #fdecea;
  --aq-ok: #157a6e;
  --aq-tile-teal: #e1eef5;
  --aq-tile-teal-ink: #083b50;
  --aq-tile-blue: #e7f1fb;
  --aq-tile-blue-ink: #0f3557;
  --aq-tile-plain: #f1f5f9;
}
[data-theme="dark"] {
  --aq-muted: #a7b6c2;
  --aq-warn-bg: #3a3014;
  --aq-warn-line: #6b5a22;
  --aq-warn-ink: #f6e3a6;
  --aq-warn-ico: #f2c46b;
  --aq-danger: #ff8a80;
  --aq-danger-bg: #3b1d1d;
  --aq-ok: #6ee7b7;
  --aq-brand-ink: #7dd3fc;
  --aq-tile-teal: #173e50;
  --aq-tile-teal-ink: #e0f2fe;
  --aq-tile-blue: #173a55;
  --aq-tile-blue-ink: #dbeafe;
  --aq-tile-plain: #203241;
}

.aq-ico { width: 24px; height: 24px; flex-shrink: 0; }
.aq-ico-sm { width: 14px; height: 14px; }
.aq-ico-lg { width: 28px; height: 28px; }
.aq-ico-chev { width: 18px; height: 18px; color: #94a3b8; }

/* ---------- barra de baixo (só celular/tablet) ---------- */
.aq-bottom-nav,
.aq-more,
.aq-sheet,
.aq-backdrop { display: none; }

@media (max-width: 980px) {
  #menuToggleBtn { display: none !important; }
  .main-content { padding-bottom: calc(var(--aq-bar-h) + var(--aq-safe-b) + 28px) !important; }
  .form-actions { bottom: calc(var(--aq-bar-h) + var(--aq-safe-b) + 10px) !important; }

  .aq-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 65;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    height: calc(var(--aq-bar-h) + var(--aq-safe-b));
    padding: 0 4px var(--aq-safe-b);
    background: var(--aq-nav);
    box-shadow: 0 -6px 20px rgba(7, 27, 36, 0.18);
  }
  .aq-bn-item {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--aq-nav-ink);
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    min-height: 56px;
    padding: 6px 2px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .aq-bn-item.is-active { color: var(--aq-nav-on); font-weight: 700; }
  .aq-bn-item:focus-visible { outline: 2px solid var(--aq-nav-on); outline-offset: -4px; border-radius: 12px; }
  .aq-bn-launch { color: #ffffff; font-weight: 700; justify-content: flex-end; }
  .aq-bn-fab {
    width: 58px;
    height: 58px;
    margin-top: -30px;
    border-radius: 999px;
    background: var(--aq-brand);
    border: 4px solid var(--color-bg, #f3f7f6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.35);
    transition: transform 0.15s ease;
  }
  .aq-ico-fab { width: 28px; height: 28px; stroke-width: 2.6; color: #ffffff; }
  .aq-bn-launch[aria-expanded="true"] .aq-bn-fab { transform: rotate(45deg); }

  /* ---------- fundo escurecido + folha "Lançar" ---------- */
  .aq-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(11, 29, 42, 0.55);
  }
  .aq-sheet:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 71;
    max-height: 88vh;
    overflow-y: auto;
    padding: 10px 16px calc(20px + var(--aq-safe-b));
    background: var(--aq-card);
    color: var(--aq-ink);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
    animation: aqSheetUp 0.22s ease-out;
  }
  body.aq-sheet-open, body.aq-more-open { overflow: hidden; }

  /* ---------- tela "Mais" ---------- */
  .aq-more:not([hidden]) {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(var(--aq-bar-h) + var(--aq-safe-b));
    z-index: 64;
    overflow-y: auto;
    padding: 20px 16px 24px;
    background: var(--color-bg, #f3f7f6);
    color: var(--aq-ink);
  }
}

@keyframes aqSheetUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .aq-sheet:not([hidden]) { animation: none; }
  .aq-bn-fab { transition: none; }
}

.aq-sheet-grip { width: 44px; height: 5px; border-radius: 999px; background: #cbd5e1; align-self: center; }
.aq-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.aq-sheet-head h2 { margin: 0; font-size: 20px; font-weight: 800; color: var(--aq-ink); }
.aq-icon-btn {
  appearance: none; border: 0; background: transparent; color: var(--aq-muted);
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.aq-icon-btn:focus-visible { outline: 2px solid var(--aq-brand); }
.aq-sheet-lot { margin: 0; font-size: 13px; line-height: 1.45; color: var(--aq-muted); }
.aq-sheet-lot b { color: var(--aq-ink); }
.aq-launch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.aq-launch-card {
  appearance: none; border: 0; cursor: pointer; text-align: left; font: inherit;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 104px; padding: 14px; border-radius: 16px;
}
.aq-launch-card b { font-size: 15px; font-weight: 800; }
.aq-launch-card span { font-size: 12px; line-height: 1.35; opacity: 0.9; }
.aq-launch-card:focus-visible, .aq-launch-row:focus-visible { outline: 2px solid var(--aq-brand); outline-offset: 2px; }
.aq-tone-teal { background: var(--aq-tile-teal); color: var(--aq-tile-teal-ink); }
.aq-tone-teal .aq-ico { color: var(--aq-brand); }
.aq-tone-blue { background: var(--aq-tile-blue); color: var(--aq-tile-blue-ink); }
.aq-tone-blue .aq-ico { color: #2e6f95; }
[data-theme="dark"] .aq-tone-blue .aq-ico { color: #93c5fd; }
.aq-tone-plain { background: var(--aq-tile-plain); color: var(--aq-ink); }
.aq-tone-plain .aq-ico { color: #0b4f6c; }
[data-theme="dark"] .aq-tone-plain .aq-ico, [data-theme="dark"] .aq-tone-teal .aq-ico { color: #7dd3fc; }
.aq-launch-row {
  appearance: none; cursor: pointer; font: inherit; text-align: left;
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--aq-line); background: transparent; color: var(--aq-ink);
}
.aq-launch-row b { font-size: 15px; }
.aq-launch-row small { font-size: 13px; color: var(--aq-muted); }
.aq-ico-danger { color: var(--aq-danger); }

.aq-more-head h2 { margin: 0 4px 12px; font-size: 22px; font-weight: 800; color: var(--aq-ink); }
.aq-more-group { margin-bottom: 16px; }
.aq-more-group h3 {
  margin: 0 4px 6px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--aq-muted);
}
.aq-more-list {
  background: var(--aq-card); border: 1px solid var(--aq-line); border-radius: 16px; overflow: hidden;
}
.aq-more-row {
  appearance: none; border: 0; background: transparent; font: inherit; color: var(--aq-ink);
  width: 100%; min-height: 52px; padding: 0 14px; text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--aq-line);
}
.aq-more-row:last-child { border-bottom: 0; }
.aq-more-row b { font-size: 15px; font-weight: 600; }
.aq-more-row small { font-size: 13px; color: var(--aq-muted); }
.aq-more-row:focus-visible { outline: 2px solid var(--aq-brand); outline-offset: -2px; }
.aq-more-switch input { width: 22px; height: 22px; accent-color: var(--aq-brand); cursor: pointer; }
.aq-more-exit b { color: var(--aq-danger); font-weight: 700; }

/* ---------- Início ---------- */
#screen-dashboard.screen.active { display: flex; flex-direction: column; }
#screen-dashboard > * { order: 4; }
#screen-dashboard > .dashboard-intro { display: none; }
#screen-dashboard > #aq-alertas { order: 1; }
#screen-dashboard > #dashboardPerformanceSection { order: 2; }
#screen-dashboard > #aqHomePonds { order: 3; }

/* selo "Funciona sem internet" no topo do Início */
.topbar { flex-wrap: wrap; }
.aq-chip {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: var(--color-primary-light, #dff6f3); color: var(--aq-brand-ink);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.aq-chip[hidden] { display: none; }
.aq-chip-off { background: var(--aq-warn-bg); color: var(--aq-warn-ink); }

/* alertas */
#aq-alertas { display: flex; flex-direction: column; gap: 10px; }
#aq-alertas.aq-alerts-on { background: var(--aq-warn-bg); border-color: var(--aq-warn-line); }
.aq-alerts-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.aq-alerts-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.aq-alerts-on .aq-alerts-head h3 { color: var(--aq-warn-ink); }
.aq-alerts-head > span { font-size: 12px; color: var(--aq-warn-ink); }
.aq-alerts-head .aq-ok { color: var(--aq-ok); font-weight: 700; font-size: 13px; }
.aq-alert-list { display: flex; flex-direction: column; gap: 8px; }
.aq-alert-row {
  appearance: none; border: 0; cursor: pointer; font: inherit; text-align: left;
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 12px; border-radius: 12px;
  background: var(--aq-card); color: var(--aq-ink);
}
.aq-alert-row:focus-visible { outline: 2px solid var(--aq-brand); outline-offset: 2px; }
.aq-alert-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--aq-warn-ico); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.aq-alert-row.aq-danger .aq-alert-ico svg { stroke: var(--aq-danger); }
.aq-alert-row.aq-danger { box-shadow: inset 0 0 0 2px var(--aq-danger); }
.aq-alert-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.35; }
.aq-alert-go { font-size: 13px; font-weight: 700; color: var(--aq-brand-ink); }
.aq-wx { margin: 0; font-size: 14px; color: var(--aq-muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aq-alerts-on .aq-wx { color: var(--aq-warn-ink); }

/* os 4 totais: sem cabeçalho repetido, grade 2 × 2 no celular */
#dashboardPerformanceSection { background: transparent; border: 0; box-shadow: none; padding: 0; }
#dashboardPerformanceSection .dashboard-performance-header { display: none; }
#screen-dashboard #dashboardPerformanceSummary.dashboard-performance-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
#screen-dashboard .dashboard-performance-grid .performance-summary-card {
  background: var(--aq-card); border: 1px solid var(--aq-line); border-radius: 14px;
  padding: 12px 14px; min-height: 0; display: flex; flex-direction: column; gap: 4px; box-shadow: none;
}
#screen-dashboard .dashboard-performance-grid .performance-summary-card strong { font-size: 12px; font-weight: 600; color: var(--aq-muted); }
#screen-dashboard .dashboard-performance-grid .performance-summary-card span { font-size: 24px; font-weight: 800; color: var(--aq-ink); line-height: 1.15; }
#screen-dashboard .dashboard-performance-grid .performance-summary-card small { font-size: 12px; color: var(--aq-muted); }
#screen-dashboard .dashboard-performance-grid .performance-summary-card.aq-kpi-alert small { color: var(--aq-danger); font-weight: 600; }
@media (max-width: 980px) {
  #screen-dashboard #dashboardPerformanceSummary.dashboard-performance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* cartões dos viveiros */
.aq-home-ponds { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.aq-home-ponds-head { display: flex; align-items: baseline; justify-content: space-between; }
.aq-home-ponds-head h3 { margin: 0; font-size: 16px; font-weight: 700; }
.aq-link-btn {
  appearance: none; border: 0; background: transparent; font: inherit; cursor: pointer;
  color: var(--aq-brand-ink); font-size: 13px; font-weight: 600; min-height: 44px; padding: 0 4px;
}
.aq-pond-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.aq-pond-card {
  appearance: none; font: inherit; text-align: left; cursor: pointer; color: var(--aq-ink);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--aq-line); background: var(--aq-card);
}
.aq-pond-card:focus-visible { outline: 2px solid var(--aq-brand); outline-offset: 2px; }
.aq-pond-badge {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--aq-brand); color: #ffffff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis;
}
.aq-pond-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aq-pond-txt b { font-size: 14px; font-weight: 700; }
.aq-pond-txt span { font-size: 13px; color: var(--aq-muted); }
.aq-pond-status { font-size: 12px; font-weight: 700; white-space: nowrap; }
.aq-pond-status.aq-ok { color: var(--aq-ok); }
.aq-pond-status.aq-warn { color: var(--aq-warn-ico); }
.aq-pond-status.aq-danger { color: var(--aq-danger); }
.aq-empty { padding: 16px; border: 1px dashed var(--aq-line); border-radius: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.aq-empty p { margin: 0; color: var(--aq-muted); }

/* rolagem e foco do teclado param acima da barra (o botão Salvar não fica escondido) */
@media (max-width: 980px) {
  html { scroll-padding-bottom: calc(var(--aq-bar-h) + var(--aq-safe-b) + 16px); }
}

/* formulários abertos pelo Lançar param um pouco abaixo do topo */
#feedingForm, #waterQualityForm, #biometriaForm, #mov_form, #sanidadeForm { scroll-margin-top: 12px; }

/* no celular o selo fica embaixo da data (sem empurrar o título) */
@media (max-width: 980px) {
  .aq-chip { margin-left: 0; order: 3; }
  .topbar > div { flex: 1 1 auto; min-width: 0; }
}

/* histórico do arraçoamento em páginas de 20 */
.feeding-history-more { width: 100%; margin-top: 12px; min-height: 48px; }
.feeding-history-more[hidden] { display: none; }

/* ===== css/plus.css ===== */
/* =========================================================
   AquaGest Plus — padrão visual único (padrão, fluido e leve)
   Carregado por último. Só aparência: nenhum dado ou cálculo muda.
   - Uma cor de marca: azul-petróleo (#0b4f6c); marinho nas barras (#102a43).
   - Sem degradês e sem desfoque (blur): superfícies lisas, sombras leves.
   - Sem animações de "pulo" ao passar o dedo; transições curtas.
========================================================= */

:root {
  --color-primary: #0b4f6c;
  --color-primary-dark: #083b50;
  --color-primary-soft: #dcecef;
  --color-primary-light: #edf5f7;
  --color-nav: #102a43;
  --color-nav-soft: #1d3a55;
  --color-bg: #f5f7fa;
  --color-surface: #ffffff;
  --color-border: #d7e0e8;
  --color-text: #1f2933;
  --shadow-soft: 0 1px 2px rgba(16, 42, 67, 0.06), 0 2px 8px rgba(16, 42, 67, 0.05);
  --radius-lg: 16px;
}
[data-theme="dark"] {
  --color-nav: #0b1d2a;
  --color-nav-soft: #132b3d;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* fundos lisos */
body,
.app-shell,
[data-theme="dark"] body { background: var(--color-bg); }
.sidebar { background: var(--color-nav); box-shadow: none; }

/* superfícies sem desfoque (o desfoque pesa no celular) */
.topbar,
.form-actions,
.reports-export-toolbar,
.finance-subnav,
.inventory-subnav,
body.sidebar-open::before { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.topbar { background: var(--color-surface); box-shadow: var(--shadow-soft); border-radius: 16px; }
[data-theme="dark"] .topbar { background: var(--color-surface); }
.form-actions { background: var(--color-surface); }
.settings-hero-card,
.reports-export-toolbar { background: var(--color-surface); }

/* cartões: sombra leve e sem mudar ao passar o dedo */
.page-card,
.dashboard-card,
.status-card { box-shadow: var(--shadow-soft); border-radius: 16px; }
.page-card:hover,
.dashboard-card:hover,
.status-card:hover { border-color: var(--color-border); transform: none; box-shadow: var(--shadow-soft); }

/* botões: cor sólida, sem pulo */
button.primary-btn,
.primary-btn,
.finance-tab.is-active,
.inventory-tab.is-active { background: var(--color-primary); box-shadow: none; }
button.primary-btn:hover,
.primary-btn:hover { background: var(--color-primary-dark); transform: none; box-shadow: none; }
.nav-item:hover,
.sidebar-link:hover { transform: none; }

/* item ativo do menu lateral: mesmo azul-claro da barra de baixo */
.nav-item.active,
.sidebar-link.active { background: rgba(125, 211, 252, 0.14); box-shadow: inset 3px 0 0 #7dd3fc; }

/* tabelas */
table thead th { background: var(--color-primary-light); color: var(--color-primary-dark); }
[data-theme="dark"] table thead th { background: rgba(125, 211, 252, 0.08); color: #e0f2fe; }

/* transições curtas e só de cor (sem mexer no layout) */
.page-card, .primary-btn, .secondary-btn, .nav-item { transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease; }

/* ---------- avisos do sistema: flutuam e somem sozinhos ---------- */
.system-message.aq-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--aq-bar-h, 0px) + var(--aq-safe-b, 0px) + 12px);
  z-index: 90;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: 0 6px 20px rgba(16, 42, 67, 0.18);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.system-message.aq-toast.aq-toast-out { opacity: 0; transform: translateY(8px); pointer-events: none; }
@media (min-width: 981px) {
  .system-message.aq-toast { left: auto; right: 24px; bottom: 24px; width: 420px; }
}
@media (prefers-reduced-motion: reduce) {
  .system-message.aq-toast { transition: none; }
}

/* ---------- Piscicultura ---------- */
#propertySummaryBox[data-has-property="false"] { display: none !important; }
#propertySummaryBox .status-grid { display: none; }
.aq-prop-summary { margin: 0; padding: 0; list-style: none; border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; }
.aq-prop-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.aq-prop-summary li:last-child { border-bottom: 0; }
.aq-prop-summary span { color: var(--aq-muted, #52606d); }
.aq-prop-summary b { text-align: right; overflow-wrap: anywhere; }
.aq-prop-intro { margin: 0 0 12px; font-size: 15px; color: var(--aq-muted, #52606d); }

/* =========================================================
   Modelo de administração (Arraçoamento, Biometria, Água, Sanidade)
========================================================= */
.aq-adm-off { display: none !important; }
body.aq-adm-on .topbar { display: none; }
.aq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.aq-adm-head {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 14px 16px 0;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-soft);
}
.aq-adm-crumb { font-size: 12px; color: var(--aq-muted, #52606d); }
.aq-adm-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.aq-adm-titlerow h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--color-text); letter-spacing: -0.01em; }
.aq-adm-titlerow h2::before { content: none !important; display: none !important; }
.aq-adm-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.aq-adm-actions .aq-adm-export { display: flex; gap: 8px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.aq-adm-actions .aq-adm-export .secondary-btn { min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.aq-adm-new { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 700; }
.aq-adm-new svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.aq-adm-tabs { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; }
.aq-adm-tabs::-webkit-scrollbar { display: none; }
.aq-adm-tab {
  appearance: none; background: none; border: 0; font: inherit; cursor: pointer; white-space: nowrap;
  min-height: 44px; padding: 0 2px; font-size: 14px; font-weight: 700; color: var(--aq-muted, #52606d);
  border-bottom: 3px solid transparent;
}
.aq-adm-tab.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
[data-theme="dark"] .aq-adm-tab.is-active { color: #7dd3fc; border-bottom-color: #7dd3fc; }
.aq-adm-tab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.aq-adm-reg { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.aq-adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.aq-adm-kpi { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.aq-adm-kpi span { font-size: 12px; font-weight: 600; color: var(--aq-muted, #52606d); }
.aq-adm-kpi b { font-size: 18px; font-weight: 800; color: var(--color-text); overflow-wrap: anywhere; }
@media (max-width: 520px) { .aq-adm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.aq-adm-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.aq-adm-filters label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; font-size: 12px; font-weight: 600; color: var(--aq-muted, #52606d); }
.aq-adm-filters select { min-height: 44px; border-radius: 10px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); padding: 0 10px; font: inherit; font-size: 14px; }

.aq-adm-tablebox { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; }
.aq-adm-scroll { overflow-x: auto; }
.aq-adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aq-adm-table th { text-align: left; padding: 10px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.aq-adm-table td { padding: 10px 10px; border-top: 1px solid var(--color-border); vertical-align: middle; color: var(--color-text); }
.aq-adm-table th:first-child, .aq-adm-table td:first-child { padding-left: 14px; }
.aq-adm-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aq-adm-table .strong { font-weight: 700; }
.aq-adm-table .tone-warn { color: var(--aq-warn-ico, #a15c00); font-weight: 700; }
.aq-adm-table .tone-danger { color: var(--aq-danger, #b42318); font-weight: 700; }
.aq-adm-table .act { text-align: right; white-space: nowrap; padding-right: 8px; width: 1%; }
.aq-adm-table tbody tr:hover td { background: var(--color-primary-light); }
[data-theme="dark"] .aq-adm-table tbody tr:hover td { background: rgba(125, 211, 252, 0.06); }
.aq-adm-ico {
  appearance: none; border: 0; background: transparent; cursor: pointer; color: var(--color-primary);
  width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .aq-adm-ico { color: #7dd3fc; }
.aq-adm-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.aq-adm-ico:hover { background: var(--color-primary-light); }
.aq-adm-ico:focus-visible { outline: 2px solid var(--color-primary); }
.aq-adm-ico-danger { color: var(--aq-danger, #b42318); }
[data-theme="dark"] .aq-adm-ico-danger { color: #ff8a80; }
.aq-adm-table .wide, .aq-wideonly { display: none; }
@media (min-width: 700px) {
  .aq-adm-table .wide { display: table-cell; }
  .aq-wideonly { display: inline; }
  .aq-narrow { display: none; }
}
.aq-adm-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--color-border); font-size: 13px; color: var(--aq-muted, #52606d); }
.aq-adm-pagebtns { display: flex; gap: 8px; }
.aq-adm-pagebtns .secondary-btn { min-height: 40px; padding: 0 12px; border-radius: 10px; font-size: 13px; color: var(--color-text); border: 1px solid var(--color-border); background: var(--color-surface); }
.aq-adm-pagebtns .secondary-btn[disabled] { opacity: 0.45; cursor: default; }
.aq-adm-empty { padding: 20px 16px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.aq-adm-empty p, .aq-adm-loading { margin: 0; color: var(--aq-muted, #52606d); padding: 4px 0; }
.aq-adm-loading { padding: 16px; }

/* toque rápido: sem o atraso e sem o zoom acidental de toque duplo em botões e abas */
html { touch-action: manipulation; }

/* tabela no celular: cabe na tela sem empurrar a página para o lado */
.aq-adm-table .act { position: relative; }
.aq-sr { left: 0; top: 0; }
.aq-adm-actions .aq-adm-export > :not(button) { display: none; }
@media (max-width: 520px) {
  .aq-adm-table th, .aq-adm-table td { padding: 10px 6px; }
  .aq-adm-table th:first-child, .aq-adm-table td:first-child { padding-left: 12px; }
  .aq-adm-ico { width: 36px; height: 40px; }
  .aq-adm-titlerow { align-items: flex-start; }
  .aq-adm-new { width: 100%; justify-content: center; }
  .aq-adm-actions { width: 100%; }
}

/* cabeçalho: [Novo] [Excel] [CSV] numa linha só */
.aq-adm-actions { flex-wrap: nowrap; }
.aq-adm-new { width: auto !important; order: -1; flex: 0 0 auto; margin: 0; }
.aq-adm-actions .aq-adm-export { flex-direction: row; flex-wrap: nowrap; }
.aq-adm-filters label { flex: 0 1 240px; }
@media (max-width: 520px) {
  .aq-adm-new { width: auto !important; flex: 1 1 auto; justify-content: center; }
  .aq-adm-actions { width: 100%; }
  .aq-adm-filters label { flex: 1 1 140px; }
}

/* Plus 27.2 — Enviar por WhatsApp */
.aq-wa-btn{border-color:#128c4a;color:#0f7a40}
.aq-wa-btn:not(:disabled):hover{background:#e8f5ee}
.aq-share{position:fixed;left:12px;right:12px;bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:1200;max-width:460px;margin:0 auto;background:#fff;color:#102a43;border:1px solid #d9e2ec;border-radius:12px;box-shadow:0 6px 24px rgba(16,42,67,.18);padding:14px 44px 14px 14px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.aq-share p{margin:0;flex:1 1 200px;display:flex;flex-direction:column;gap:2px;font-size:14px}
.aq-share p span{color:#486581;font-size:13px;word-break:break-word}
.aq-share .aq-share-go{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:40px}
.aq-share-x{position:absolute;top:6px;right:6px;width:32px;height:32px;border:0;background:none;font-size:22px;color:#486581;cursor:pointer}
@media (min-width:981px){.aq-share{bottom:24px}}
[data-theme="dark"] .aq-share{background:#1b2b3a;color:#e6eef5;border-color:#2c4256}
.ficha-dl .aq-wa-btn{grid-column:1 / -1}
.ficha-dl button{align-self:stretch}
