/* Aqua theme. Loaded last; layout and the shared data typography stay intact. */
:root {
  --ink: #103f47;
  --muted: #52777d;
  --teal: #007f88;
  --teal-dark: #006972;
  --line: #cfe8e5;
  --bg: #effaf8;
  --accent: #d9f5f0;
  --shadow: 0 10px 32px rgba(0, 104, 112, .055);
  --aqua-soft: #f4fcfa;
  --aqua-hover: #e3f8f4;
  --aqua-selected: #d5f3ee;
  --aqua-focus: #14a99f;
}

body {
  background: radial-gradient(ellipse at 90% 0, #def7f2 0, transparent 38rem), var(--bg);
  color: var(--ink);
}
::selection { background: #a8e7de; color: #084c54; }

/* Main navigation and the compact navigation share the same selected state. */
.sidebar {
  background: linear-gradient(165deg, #d4f4ee 0, #e9faf6 100%);
  color: #235e65;
  border-right: 1px solid #bde4de;
}
.brand strong { color: #07515a; }
.brand span, .nav-label, .sidebar-foot { color: #416f74; }
.brand-mark { background: #9ee9df; color: #006871; }
.sidebar-foot { border-top-color: #bcded8; }
.nav-item { color: #326b72; }
.nav-item:hover { background: #bcebe3; color: #064b54; }
.nav-item.active {
  background: var(--teal);
  color: #fff;
  box-shadow: inset 3px 0 #62e7d7, 0 5px 14px rgba(0, 115, 124, .12);
}
.nav-item.active:hover { background: var(--teal-dark); }
.topbar, .mobile-nav { background: #fbfffe; border-bottom-color: var(--line); }
.topbar, .topbar-right { color: #47757b; }
.mobile-nav-item { color: #47757b; }
.mobile-nav-item:hover { background: var(--aqua-hover); color: var(--teal-dark); }
.mobile-nav-item.active { background: var(--teal); color: #fff; }
.mobile-brand b { color: var(--ink); }
.status-dot, .live-dot {
  background: #08aa99;
  box-shadow: 0 0 0 4px rgba(8, 170, 153, .12);
}
.logout-button { color: var(--teal-dark); background: #fff; border-color: #b8ddd7; }
.logout-button:hover { background: var(--aqua-hover); }

/* Surfaces, balances and document tables. */
.card, .stat-card, .auth-card, .users-admin, .recipe-admin { background: #fff; border-color: var(--line); }
.card, .stat-card, .auth-card { box-shadow: var(--shadow); }
.stat-card > span, .stat-card small, .card-head p { color: var(--muted); }
.stat-card.teal {
  background: #007f88;
  border-color: #007f88;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 127, 136, .17);
}
.stat-card.teal > span, .stat-card.teal small { color: #dcfffa; }
.stat-glyph { color: #cceee7; }
.stat-card.teal .stat-glyph { color: #77e6d9; opacity: .35; }
th {
  background: #e7f8f4;
  color: #3b7076;
  border-top-color: #d6ece7;
  border-bottom-color: #d6ece7;
}
td { color: #365e65; border-bottom-color: #e3f1ee; }
td b, .receipt-record-id, .receipt-record-supplier, .partner-name { color: var(--ink); }
td small, .muted, .empty, .catalog-row small { color: var(--muted); }
tbody tr:hover td { background-color: #f2fcf9; }
.stock-pill { background: #d8f4ed; color: #00686f; }
.debt { color: #00636e; }
.payment-credit { color: #087e70; }
.empty-icon { color: #89cdc2; }
.catalog-row, .material-day-row { border-top-color: #e3f1ee; }
.receipt-record summary:hover, .partner-record summary:hover { background: #eaf9f5; }
.receipt-record[open] > summary, .partner-record[open] > summary { background: #f0fbf8; }
.receipt-record small, .partner-record small, .receipt-note,
.receipt-chevron, .partner-chevron { color: var(--muted); }
.receipt-record .table-wrap, .partner-ledger-body { background: #f8fefc; }

/* Buttons and keyboard focus. */
.btn-primary, .btn-save {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 127, 136, .16);
}
.btn-primary:hover, .btn-save:hover { background: var(--teal-dark); }
.btn-soft { background: var(--accent); color: var(--teal-dark); }
.btn-soft:hover { background: #c4eee5; }
.btn-outline { background: #fff; border-color: #b7ddd6; color: #21676f; }
.btn-outline:hover { background: var(--aqua-hover); border-color: #8bcec2; }
.text-link { color: var(--teal); }
button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--aqua-focus);
  outline-offset: 3px;
}
.remove-row, .recipe-remove { background: #fff1ee; color: #b74f40; }
.remove-row:hover, .recipe-remove:hover { background: #ffe4de; }

/* Form fields, autocomplete and document dialogs. */
label, .receipt-top label, .receipt-search-wrap label, .shipment-top label { color: #426e75; }
input, select, textarea {
  background: #fdfffe;
  color: var(--ink);
  border-color: #baded7;
  accent-color: var(--teal);
}
input::placeholder, textarea::placeholder { color: #59777c; opacity: 1; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: #86cabe; }
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: var(--aqua-focus);
  box-shadow: 0 0 0 3px rgba(20, 169, 159, .15);
}
input:disabled, select:disabled { background: #eff7f4; color: #6b898c; border-color: #d7eae5; }
.sheet-input { background: #f5fcfa; }
.day-picker input { background: #fff; }
.mobile-field-label, .recipe-mobile-label,
.receipt-columns, .shipment-columns, .recipe-table-head { color: #4d7b81; }
.receipt-overlay { background: rgba(5, 63, 70, .4); }
.receipt-dialog { background: #fff; box-shadow: 0 25px 80px rgba(0, 77, 85, .23); }
.receipt-titlebar, .receipt-footer { background: #f8fefc; border-color: var(--line); }
.receipt-close { color: #427c81; }
.receipt-close:hover { color: var(--teal-dark); }
.receipt-suggestions { border-color: #b7ddd6; box-shadow: 0 12px 26px rgba(0, 97, 105, .12); }
.receipt-suggestions button { color: var(--ink); border-bottom-color: #e0f1ec; }
.receipt-suggestions button:hover { background: var(--aqua-hover); }
.receipt-suggestions button.active { background: #ccefe6; color: #075e65; box-shadow: inset 3px 0 var(--teal); }
.receipt-suggestions small, .receipt-search-hint { color: var(--muted); }
.receipt-total, .receipt-line-total, .shipment-line-total, .production-totals { color: #145760; }

/* Directory navigation and editors. */
.catalog-nav, .users-access-list, .recipe-product-list { background: #edf9f5; border-color: var(--line); }
.catalog-tab { color: #3e747a; }
.catalog-tab:hover { background: #ddf4ec; color: #105a62; }
.catalog-tab.active { background: #fff; color: #007580; box-shadow: inset 3px 0 #00a99c; }
.catalog-tab small, .users-access-list-title > span, .recipe-list-title span { background: #dbefea; color: #426e74; }
.catalog-tab.active small { background: #caf0e6; color: #006771; }
.catalog-editor summary { background: var(--accent); color: var(--teal-dark); }
.catalog-editor summary:hover { background: #c5eee4; }
.catalog-entry-form { background: #f1fbf7; border-color: var(--line); }
.users-access-list-title, .recipe-list-title { color: #48767c; }
.users-access-user, .recipe-product { border-bottom-color: #dcedE7; color: var(--ink); }
.users-access-user:hover, .recipe-product:hover { background: #ddf4ec; }
.users-access-user.is-selected, .recipe-product.is-selected { background: #fff; border-left-color: #00a99c; }
.users-access-user-text small, .recipe-product small,
.users-access-profile p, .recipe-product-heading p,
.users-access-help, .recipe-help { color: var(--muted); }
.users-access-avatar { background: #c8eee4; color: #006772; }
.users-access-admin-mark { color: #00818a; }
.users-access-badge, .users-access-badge.is-admin, .recipe-badge { background: #dbf3eb; color: #176a72; }
.recipe-badge.is-configured { background: #c9eee2; color: #086b60; }
.users-access-section:nth-child(odd) { background: #f3fbf8; }
.users-access-section-title, .users-access-tools > span { color: #285f68; }
.users-access-check { color: #3e7077; }
.users-access-check:has(input:disabled) { color: #6a888d; }
.users-access-check input:focus-visible { outline-color: var(--aqua-focus); }
.users-access-changed, .recipe-changed, .recipe-materials-hint { color: #397b7d; }
.users-access-status, .recipe-status { color: #087b6f; }
.recipe-unit { color: #537b80; }
.recipe-no-items { color: var(--muted); border-color: #bfdfd6; }

/* Production defects use a distinct pale aqua row without the old amber tint. */
.production-sheet .production-defect-row td { background: #e9f9f4; border-bottom-color: #cbe9df; }
.production-sheet .production-row + .production-defect-row td { border-top-color: #abdacf; }
.production-defect-heading b { color: #146b73; }
.production-defect-heading > span { color: #4f7478; }
.production-defect-picker select,
.production-sheet .production-defect-qty { background: #f9fffc; border-color: #aedbd0; color: #185f69; }
.production-defect-picker select:focus,
.production-sheet .production-defect-qty:focus { border-color: var(--aqua-focus); box-shadow: 0 0 0 3px rgba(20, 169, 159, .15); }
.production-defect-remove { background: #ceeae1; color: #347b7c; }
.production-defect-remove:hover { background: #b8e3d6; }
.production-defect-order { color: #4e7676; }
#add-defect-row { background: #e0f5ed; color: #126d74; }
#add-defect-row:hover { background: #c9eddf; }

/* Sign-in and feedback keep the same palette while errors remain red. */
.auth-screen { background: radial-gradient(ellipse at top, #c9f3e9 0, #edf9f5 65%); }
.auth-brand { color: #075b65; }
#toast { background: #086b72; box-shadow: 0 12px 30px rgba(0, 86, 94, .21); }
#toast.error { background: #aa4039; }
.auth-error, .users-access-status.is-error, .recipe-status.is-error { color: #ad3e35; }
