/* src/web/styles.css */
:root {
  --bg: #f7f3ea;
  --panel: #fffcf6eb;
  --line: #51382424;
  --text: #2f241b;
  --muted: #7a6654;
  --accent: #ba5a31;
  --accent-2: #2d7c6f;
  --shadow: 0 24px 60px #462a1724;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  min-height: 100%;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, #ffd9a3b3, transparent 28%), radial-gradient(circle at top right, #6baea13d, transparent 24%), linear-gradient(180deg, #fbf7ef 0%, var(--bg) 100%);
  min-height: 100dvh;
  margin: 0;
  font-family: Avenir Next, Segoe UI, sans-serif;
}

.site-header {
  position: sticky;
  z-index: 10;
  padding: 0;
  top: 0;
}

.site-header__inner {
  position: relative;
  display: flex;
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #fffcf6e0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 1rem 1.25rem;
}

.brand {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
  align-items:  center;
  gap: .85rem;
}

.brand__badge {
  display: inline-flex;
  background: linear-gradient(135deg, var(--accent), #d77b49);
  color: #fff;
  border-radius: 999px;
  justify-content: center;
  align-items:  center;
  padding: .4rem .7rem;
  font-size: .82rem;
  font-weight: 700;
}

.brand__text {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 600;
}

.navigation-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.navigation-hub__trigger {
  display: inline-flex;
  color: var(--text);
  white-space: nowrap;
  background: none;
  border: 0;
  align-items:  center;
  gap: .55rem;
  max-width: min(24rem, 48vw);
  padding: .45rem .75rem;
  font-size: 1.05rem;
  font-weight: 800;
}

.navigation-hub__trigger:hover {
  background: #2d7c6f14;
  transform: none;
}

.navigation-hub__trigger:after {
  content: "";
  border-bottom: 2px solid;
  border-right: 2px solid;
  flex: none;
  width: .42rem;
  height: .42rem;
  transform: translateY(-.12rem)rotate(45deg);
}

.navigation-hub__logo {
  object-fit: contain;
  border-radius: 999px;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  box-shadow: 0 4px 12px #2d7c6f38;
}

.navigation-hub__label {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navigation-menu {
  position: absolute;
  z-index: 60;
  display: grid;
  overflow: auto;
  backdrop-filter: none;
  background: #fffcf6;
  border-radius: 14px;
  align-content:  start;
  gap: .75rem;
  width: min(30rem, 100vw - 2rem);
  max-height: calc(100vh - 7rem);
  padding: .8rem;
  top: calc(100% + .65rem);
  left: 50%;
  transform: translateX(-50%);
}

.navigation-menu[hidden] {
  display: none;
}

.navigation-menu__search {
  position: sticky;
  z-index: 1;
  background: #fff;
  border-color: #2f7de1;
  border-radius: 5px;
  padding: .72rem .85rem;
  top: 0;
  box-shadow: 0 0 0 1px #2f7de114;
}

.navigation-menu__section-title {
  color: var(--text);
  font-size: .95rem;
  font-weight: 800;
}

.navigation-menu__results {
  display: grid;
  gap: .15rem;
}

.navigation-menu__result {
  display: flex;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  align-items:  center;
  gap: .55rem;
  min-height: 2.25rem;
  padding: .35rem .4rem;
}

.navigation-menu__result[hidden] {
  display: none;
}

.navigation-menu__result:visited {
  color: var(--text);
}

.navigation-menu__result:hover, .navigation-menu__result--active {
  background: #5138241a;
  transform: none;
}

.navigation-menu__result:focus-visible {
  outline: 2px solid #2f7de1;
  outline-offset: 2px;
  background: #5138241f;
}

.navigation-menu__result-mark {
  display: inline-grid;
  color: #fff;
  background: #53aee7;
  border-radius: 999px;
  flex: none;
  place-items:  center;
  width: 1.55rem;
  height: 1.55rem;
  font-size: .85rem;
  font-weight: 800;
}

.navigation-menu__result strong {
  display: inline;
  font-size: .95rem;
}

.navigation-menu__result small {
  color: var(--muted);
  font-size: .88rem;
}

.navigation-menu__result small:before {
  content: " - ";
}

.navigation-menu--empty .navigation-menu__results:after {
  color: var(--muted);
  content: "No matching pages.";
  padding: .6rem .4rem;
}

.navbar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  min-width: 0;
}

.navbar-toggle {
  position: relative;
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: #fffcf6c2;
  border-radius: 999px;
  flex: none;
  justify-content: center;
  align-items:  center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.navbar-toggle__bar {
  position: absolute;
  background: currentColor;
  border-radius: 999px;
  width: 1.05rem;
  height: 2px;
  transition: opacity .14s, transform .14s;
}

.navbar-toggle__bar:first-child {
  transform: translateY(-.34rem);
}

.navbar-toggle__bar:nth-child(3) {
  transform: translateY(.34rem);
}

.site-header--nav-open .navbar-toggle__bar:first-child {
  transform: rotate(45deg);
}

.site-header--nav-open .navbar-toggle__bar:nth-child(2) {
  opacity: 0;
}

.site-header--nav-open .navbar-toggle__bar:nth-child(3) {
  transform: rotate(-45deg);
}

.navbar__link {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
  flex: none;
  justify-content: center;
  align-items:  center;
  padding: .7rem .95rem;
  transition: background-color .14s, color .14s, transform .14s;
  font-weight: 700;
}

.navbar__dropdown {
  position: relative;
  display: inline-flex;
}

.navbar__dropdown:before {
  position: absolute;
  content: "";
  height: .45rem;
  top: 100%;
  left: 0;
  right: 0;
}

.navbar__dropdown-trigger {
  gap: .35rem;
}

.navbar__dropdown-trigger:after {
  content: "";
  border-bottom: 2px solid;
  border-right: 2px solid;
  width: .45rem;
  height: .45rem;
  transform: translateY(-.12rem)rotate(45deg);
}

.navbar__label--mobile {
  display: none;
}

.navbar__link:visited {
  color: var(--muted);
}

.navbar__link:hover {
  color: var(--accent-2);
  background: #2d7c6f14;
  transform: translateY(-1px);
}

.navbar__link--active {
  color: var(--accent);
  background: #ba5a311f;
}

.navbar__link--active:visited {
  color: var(--accent);
}

.navbar__dropdown-menu {
  position: absolute;
  z-index: 20;
  display: grid;
  border: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  background: #fffcf6fa;
  border-radius: 14px;
  gap: .2rem;
  min-width: 10rem;
  padding: .45rem;
  transition: opacity .14s, transform .14s;
  top: calc(100% + .16rem);
  left: 0;
  transform: translateY(-.25rem);
  box-shadow: 0 16px 34px #402d1c24;
}

.navbar__dropdown:hover .navbar__dropdown-menu, .navbar__dropdown:focus-within .navbar__dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.navbar__dropdown-link {
  display: flex;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 10px;
  align-items:  center;
  min-height: 2.25rem;
  padding: .45rem .7rem;
  font-size: .9rem;
  font-weight: 700;
}

.navbar__dropdown-link:visited {
  color: var(--muted);
}

.navbar__dropdown-link:hover, .navbar__dropdown-link--active, .navbar__dropdown-link--active:visited {
  color: var(--accent-2);
  background: #2d7c6f1a;
}

.account-login {
  display: inline-flex;
  color: var(--accent-2);
  text-decoration: none;
  white-space: nowrap;
  background: #2d7c6f1f;
  border-radius: 999px;
  flex: none;
  justify-content: center;
  align-items:  center;
  padding: .7rem .95rem;
  font-weight: 700;
}

.account-login:visited {
  color: var(--accent-2);
}

.account-menu {
  position: relative;
  flex: none;
}

.account-menu__trigger {
  display: inline-flex;
  overflow: hidden;
  color: var(--accent-2);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #2d7c6f1f;
  align-items:  center;
  gap: .4rem;
  max-width: 11rem;
  padding: .7rem .95rem;
}

.account-menu__trigger:after {
  content: "";
  border-bottom: 2px solid;
  border-right: 2px solid;
  flex: none;
  width: .42rem;
  height: .42rem;
  transform: translateY(-.12rem)rotate(45deg);
}

.account-menu__dropdown {
  position: absolute;
  z-index: 25;
  display: grid;
  border: 1px solid var(--line);
  opacity: 0;
  pointer-events: none;
  background: #fffcf6fa;
  border-radius: 14px;
  gap: .35rem;
  min-width: 12rem;
  padding: .55rem;
  transition: opacity .14s, transform .14s;
  top: calc(100% + .35rem);
  right: 0;
  transform: translateY(-.25rem);
  box-shadow: 0 16px 34px #402d1c24;
}

.account-menu:hover .account-menu__dropdown, .account-menu:focus-within .account-menu__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.account-menu__username {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: .45rem .55rem;
  font-size: .92rem;
  font-weight: 800;
}

.account-menu__link, .account-menu__logout {
  text-align: left;
  border-radius: 10px;
  width: 100%;
  padding: .65rem .75rem;
}

.account-menu__link {
  color: var(--accent-2);
  text-decoration: none;
  background: #2d7c6f1a;
  font-weight: 700;
}

.account-menu__link:visited {
  color: var(--accent-2);
}

.account-menu__link:hover {
  background: #2d7c6f29;
  transform: none;
}

.account-menu__logout {
  color: var(--accent);
  background: #ba5a311f;
}

.page-shell {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.page-shell--wide {
  width: calc(100% - 2rem);
}

.page-shell--auth {
  display: grid;
  place-items:  start center;
  width: min(34rem, 100% - 2rem);
}

.login-page, .login-panel {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items:  start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.navigation-menu.card {
  backdrop-filter: none;
  background: #fffcf6;
}

.hero-copy {
  padding: 2rem;
}

.eyebrow {
  display: inline-block;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #ba5a311f;
  border-radius: 999px;
  padding: .35rem .7rem;
  font-size: .8rem;
  font-weight: 700;
}

h1 {
  letter-spacing: -.05em;
  margin: 1rem 0 .75rem;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: .94;
}

.hero-copy p {
  color: var(--muted);
  max-width: 42rem;
  margin: 0;
  font-size: 1.03rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

.hero-meta {
  padding: 1.5rem;
}

.hero-meta h2, .workspace h2 {
  letter-spacing: .02em;
  margin: 0 0 1rem;
  font-size: 1rem;
}

.meta-list {
  display: grid;
  gap: .9rem;
}

.meta-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: .9rem;
}

.meta-list div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-list strong {
  display: block;
  margin-bottom: .25rem;
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1.5rem;
}

.workspace--single {
  grid-template-columns: 1fr;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items:  start;
  gap: 1.5rem;
}

.panel {
  padding: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-header--end {
  justify-content: end;
}

.section-header h2 {
  margin: 0;
}

.section-header .status {
  text-align: right;
  margin-top: 0;
}

.page-panel {
  padding: 2rem;
}

.receipts-page {
  display: grid;
  gap: 1rem;
}

.receipts-page__controls {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
}

.receipts-page__filters, .receipts-page__actions {
  flex-wrap: nowrap;
  margin-bottom: 0;
}

.receipts-page__actions {
  flex: none;
}

.inventory-page {
  display: grid;
  gap: 1rem;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items:  end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-heading--compact {
  margin-bottom: 1.25rem;
}

.page-title {
  letter-spacing: -.04em;
  margin: .65rem 0 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: .96;
}

.page-copy {
  color: var(--muted);
  max-width: 38rem;
  margin: 0;
  line-height: 1.6;
}

.page-copy code, .section-copy code {
  color: var(--accent-2);
  background: #2d7c6f1f;
  border-radius: 999px;
  padding: .12rem .35rem;
  font-size: .92em;
}

.section-copy {
  color: var(--muted);
  margin: .35rem 0 0;
  line-height: 1.5;
}

form {
  display: grid;
  gap: .85rem;
}

label {
  display: grid;
  color: var(--muted);
  gap: .35rem;
  font-size: .92rem;
}

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

input, select, textarea {
  color: var(--text);
  background: #ffffffc7;
  border: 1px solid #51382429;
  border-radius: 14px;
  width: 100%;
  padding: .85rem .95rem;
  font-size: 16px;
}

.search-select {
  position: relative;
}

.search-select__control {
  display: block;
}

.search-select--multiple .search-select__control {
  display: flex;
  background: #ffffffc7;
  border: 1px solid #51382429;
  border-radius: 14px;
  flex-wrap: wrap;
  align-items:  center;
  gap: .4rem;
  width: 100%;
  min-height: 3.15rem;
  padding: .45rem .55rem;
}

.search-select--multiple .search-select__input {
  background: none;
  border: 0;
  border-radius: 8px;
  flex: 10rem;
  width: auto;
  min-width: 8rem;
  padding: .35rem .25rem;
}

.search-select--multiple .search-select__input:focus {
  outline: none;
}

.search-select__tokens {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.search-select__token {
  display: inline-flex;
  color: var(--accent-2);
  background: #2d7c6f1f;
  border-radius: 999px;
  align-items:  center;
  gap: .35rem;
  max-width: 100%;
  padding: .3rem .45rem .3rem .6rem;
  font-size: .86rem;
  font-weight: 700;
}

.search-select__token-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-select__token-remove {
  display: inline-grid;
  color: var(--accent-2);
  background: #2d7c6f1f;
  border-radius: 999px;
  place-items:  center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  line-height: 1;
}

.search-select__token-remove:hover {
  background: #2d7c6f33;
  transform: none;
}

.search-select__menu {
  position: absolute;
  z-index: 45;
  display: grid;
  overflow: auto;
  box-shadow: var(--shadow);
  background: #fffcf7fa;
  border: 1px solid #51382429;
  border-radius: 14px;
  gap: .2rem;
  max-height: 15rem;
  padding: .35rem;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
}

.search-select__menu[hidden] {
  display: none;
}

.search-select__option {
  display: flex;
  color: var(--text);
  text-align: left;
  background: none;
  border-radius: 10px;
  justify-content: flex-start;
  align-items:  center;
  gap: .4rem;
  width: 100%;
  padding: .7rem .75rem;
}

.search-select__option:hover, .search-select__option--active {
  color: var(--accent-2);
  background: #2d7c6f1a;
  transform: none;
}

.search-select__option span {
  color: var(--muted);
  font-weight: 600;
}

.search-select__empty {
  color: var(--muted);
  padding: .7rem .75rem;
}

textarea {
  resize: vertical;
  min-height: 7.5rem;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .85rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: .85rem 1.1rem;
  transition: transform .14s, opacity .14s;
  font-weight: 700;
}

button:hover, .action-link:hover {
  transform: translateY(-1px);
}

.primary {
  background: linear-gradient(135deg, var(--accent), #d77b49);
  color: #fff;
}

.secondary {
  color: var(--accent-2);
  background: #2d7c6f1f;
}

.action-link {
  display: inline-flex;
  text-decoration: none;
  border-radius: 999px;
  justify-content: center;
  align-items:  center;
  padding: .85rem 1.1rem;
  font-weight: 700;
}

.actions {
  display: flex;
  gap: .75rem;
}

.time-adjustments {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .45rem;
}

.time-adjustments__button {
  padding: .55rem .75rem;
  font-size: .82rem;
}

.status {
  color: var(--muted);
  min-height: 1.4rem;
  margin-top: .25rem;
  font-size: .92rem;
}

.status.error {
  color: #9d2f1f;
}

.app-modal[hidden] {
  display: none;
}

.app-modal {
  position: fixed;
  z-index: 40;
  display: grid;
  place-items:  center;
  padding: 1.5rem;
  inset: 0;
}

.app-modal__backdrop {
  position: absolute;
  backdrop-filter: blur(4px);
  background: #140e0a9e;
  inset: 0;
}

.app-modal__dialog {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: min(100%, 620px);
  max-height: calc(100vh - 3rem);
}

.integrations-workspace {
  grid-template-columns: minmax(20rem, 28rem) minmax(0, 1fr);
  align-items:  start;
}

.integrations-stack, .integration-list {
  display: grid;
  gap: 1rem;
}

.integration-list {
  margin-top: 1rem;
}

.integration-row {
  display: flex;
  border-top: 1px solid var(--line);
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  padding: 1rem 0;
}

.integration-row:first-child {
  border-top: none;
}

.integration-row__meta {
  display: flex;
  color: var(--muted);
  text-align: right;
  flex-wrap: wrap;
  justify-content: end;
  align-items:  center;
  gap: .65rem;
  font-size: .9rem;
}

.integration-schedule-form {
  margin-bottom: 1rem;
}

.integration-table {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.integration-table__row {
  display: grid;
  grid-template-columns: 1.1fr .8fr 1.2fr .7fr 1fr .7fr;
  border-top: 1px solid var(--line);
  min-width: 56rem;
}

.integration-table__row:first-child {
  border-top: none;
}

.integration-table__row > div {
  padding: .85rem 1rem;
}

.integration-table__row--head {
  color: var(--muted);
  text-transform: uppercase;
  background: #2d7c6f14;
  font-size: .82rem;
  font-weight: 700;
}

.checkbox-line {
  display: flex;
  grid-template-columns: none;
  color: var(--text);
  align-items:  center;
  gap: .65rem;
}

.checkbox-line input {
  width: auto;
}

.toolbar {
  display: flex;
  gap: .75rem;
  margin-bottom: 1rem;
}

.toolbar--wrap {
  flex-wrap: wrap;
  align-items:  center;
}

.toolbar input {
  flex: 1;
  min-width: 0;
}

.toolbar__select {
  flex: 0 0 140px;
  width: 140px;
}

.receipt-view-toggle {
  margin-right: auto;
}

.shoppinglist-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:  center;
  gap: .75rem;
}

.todos-panel-actions {
  display: flex;
  overflow-x: auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items:  center;
  gap: .85rem;
}

.checkbox-toggle {
  display: inline-flex;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
  align-items:  center;
  gap: .6rem;
  font-size: .95rem;
}

.checkbox-toggle input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
}

.results {
  display: grid;
  gap: .9rem;
}

.recipe-results {
  display: grid;
  gap: 1rem;
}

.upload-dropzone {
  position: relative;
  display: grid;
  gap: .45rem;
}

.upload-dropzone__label {
  color: var(--muted);
  font-size: .92rem;
}

.upload-dropzone__surface {
  display: grid;
  text-align: center;
  cursor: pointer;
  background: linear-gradient(#ffffffbd, #f8f1e8bd), radial-gradient(circle at top, #ba5a3114, #0000 58%);
  border: 1px dashed #51382433;
  border-radius: 18px;
  place-items:  center;
  gap: .25rem;
  padding: 1.1rem 1rem;
  transition: border-color .14s, background-color .14s, box-shadow .14s, transform .14s;
}

.upload-dropzone:hover .upload-dropzone__surface {
  border-color: #ba5a3147;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px #5138240f;
}

.upload-dropzone--has-file .upload-dropzone__surface {
  background: linear-gradient(#ffffffd1, #fdeee4e0), radial-gradient(circle at top, #ba5a311f, #0000 60%);
  border-color: #ba5a315c;
  box-shadow: 0 16px 32px #ba5a3114;
}

.upload-dropzone--active .upload-dropzone__surface {
  background: linear-gradient(#fcfffef0, #e8f7f4f2), radial-gradient(circle at top, #2d7c6f24, #0000 62%);
  border-width: 2px;
  border-color: #2d7c6fc7;
  box-shadow: 0 0 0 4px #2d7c6f1f, 0 18px 34px #2d7c6f1f;
}

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

.upload-dropzone__meta {
  color: var(--muted);
  line-height: 1.5;
}

.upload-dropzone__input {
  position: absolute;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
}

.recipe-card {
  display: grid;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: #ffffff94;
  border-radius: 20px;
  gap: .8rem;
  padding: 1.25rem 1.35rem;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}

.recipe-card:hover {
  border-color: #ba5a3140;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px #51382414;
}

.recipe-card__header {
  display: flex;
  justify-content: space-between;
  align-items:  start;
  gap: 1rem;
}

.recipe-card__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.recipe-card__description, .recipe-card__meta {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.recipe-form__toggle {
  align-content:  center;
  padding-top: 1.8rem;
}

.recipe-create-ingredients {
  display: grid;
  gap: .85rem;
  padding-top: .15rem;
}

.recipe-create-ingredient-form {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(7rem, .55fr) minmax(9rem, .8fr) auto;
  align-items:  end;
  gap: .85rem;
}

.recipe-create-ingredient-preview {
  display: grid;
  gap: .55rem;
}

.recipe-create-ingredient-preview__item {
  display: flex;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff80;
  border-radius: 14px;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  padding: .75rem .85rem;
}

.recipe-create-ingredient-preview__item span {
  overflow-wrap: anywhere;
  min-width: 0;
}

.recipe-create-ingredient-preview__meta {
  display: flex;
  align-items:  center;
  gap: .65rem;
}

.recipe-create-ingredient-preview__item strong {
  color: var(--text);
  white-space: nowrap;
}

.recipe-detail-grid {
  grid-template-columns: 280px minmax(0, 1fr);
}

.recipe-detail-stack {
  display: grid;
  gap: 1.5rem;
}

.recipe-detail-section {
  display: grid;
  gap: 1rem;
}

.recipe-detail-section__header {
  margin-bottom: 0;
}

.recipe-ingredient-summary {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: .75rem;
}

.recipe-ingredient-summary h2 {
  margin: 0;
}

.recipe-ingredient-list {
  display: grid;
  gap: .85rem;
}

.recipe-ingredient-item {
  display: flex;
  border: 1px solid var(--line);
  background: #ffffff8c;
  border-radius: 18px;
  justify-content: space-between;
  align-items:  start;
  gap: 1rem;
  padding: 1rem 1.05rem;
}

.recipe-ingredient-item__select {
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  flex: 1;
  min-width: 0;
  padding: 0;
}

.recipe-ingredient-item__select:hover {
  transform: none;
}

.recipe-ingredient-item__select:focus-visible {
  outline: 2px solid #2d7c6fb8;
  outline-offset: 6px;
  border-radius: 14px;
}

.recipe-ingredient-item__main {
  display: grid;
  gap: .45rem;
  min-width: 0;
}

.recipe-ingredient-item__header {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: .6rem;
}

.recipe-ingredient-item__meta {
  display: flex;
  color: var(--muted);
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .95rem;
}

.recipe-ingredient-form {
  display: grid;
  gap: 1rem;
}

.recipe-ingredient-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items:  end;
  gap: .85rem;
}

.recipe-ingredient-form__toggle {
  padding-bottom: .85rem;
}

.recipe-ingredient-modal[hidden] {
  display: none;
}

.recipe-ingredient-modal {
  position: fixed;
  z-index: 40;
  display: grid;
  place-items:  center;
  padding: 1.5rem;
  inset: 0;
}

.recipe-ingredient-modal__backdrop {
  position: absolute;
  backdrop-filter: blur(4px);
  background: #140e0a9e;
  inset: 0;
}

.recipe-ingredient-modal__dialog {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: min(100%, 620px);
  max-height: calc(100vh - 3rem);
}

.recipe-picture__form {
  margin-bottom: 1rem;
}

.recipe-image-gallery {
  display: grid;
  gap: .85rem;
  margin-bottom: 1rem;
}

.recipe-image-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff8c;
  border-radius: 18px;
}

.recipe-image-card__image {
  display: block;
  object-fit: cover;
  background: #5138240a;
  width: 100%;
  height: 220px;
}

.recipe-image-card__meta {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  padding: .85rem .95rem;
}

.infinite-scroll__sentinel {
  width: 100%;
  height: 1px;
}

.receipt-card {
  display: grid;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: #ffffff8c;
  border-radius: 18px;
  gap: .85rem;
  padding: 1rem 1.1rem;
  transition: transform .14s, border-color .14s;
}

.receipt-card[draggable="true"] {
  cursor: grab;
}

.receipt-card:hover {
  border-color: #ba5a3147;
  transform: translateY(-1px);
}

.receipt-card--dragging {
  opacity: .55;
}

.receipt-kanban-scrollbar {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  height: 1rem;
}

.receipt-kanban-scrollbar__inner {
  height: 1px;
}

.receipt-kanban {
  display: grid;
  grid-auto-columns: minmax(min(17rem, 82vw), 22rem);
  grid-auto-flow: column;
  grid-template-columns: none;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  align-items:  start;
  gap: 1rem;
  max-width: 100%;
  padding-bottom: .35rem;
}

.receipt-kanban__column {
  display: grid;
  border: 1px solid var(--line);
  scroll-snap-align: start;
  background: #ffffff6b;
  border-radius: 18px;
  gap: .85rem;
  min-height: 12rem;
  padding: .9rem;
  transition: border-color .14s, box-shadow .14s;
}

.receipt-kanban__header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: .75rem;
}

.receipt-kanban__header h3 {
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
  font-size: 1rem;
}

.receipt-kanban__list {
  display: grid;
  align-content:  start;
  gap: .75rem;
  min-height: 7rem;
}

.receipt-kanban__empty {
  display: grid;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
  border-radius: 16px;
  place-items:  center;
  min-height: 7rem;
  padding: .9rem;
  font-size: .9rem;
}

.receipt-kanban .receipt-card {
  background: #ffffffb8;
  border-radius: 16px;
}

.receipt-kanban .receipt-card__header {
  flex-direction: column;
  align-items:  flex-start;
}

.receipt-kanban .receipt-card__tags {
  justify-content: flex-start;
}

.receipt-kanban__title-link {
  color: inherit;
  text-decoration: none;
}

.receipt-kanban__title-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.receipt-drop-target--active {
  border-color: #ba5a3166;
  box-shadow: 0 0 0 3px #ba5a311f;
}

.receipt-card--timeline {
  width: min(100%, 46rem);
}

.receipt-timeline__cutoff {
  display: flex;
  color: var(--muted);
  align-items:  center;
  gap: .75rem;
  width: min(100%, 46rem);
  font-size: .85rem;
}

.receipt-timeline__cutoff-line {
  background: var(--line);
  flex: 1;
  height: 1px;
}

.metadata-link {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 700;
}

.metadata-link:hover {
  text-decoration: underline;
}

.receipt-card__header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
}

.receipt-card__header h3 {
  margin: 0;
  font-size: 1.05rem;
}

.receipt-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .45rem;
}

.receipt-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin: 0;
}

.receipt-card__meta dt, .receipt-metadata dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .76rem;
}

.receipt-card__meta dd, .receipt-metadata dd {
  margin: .18rem 0 0;
  font-size: .95rem;
}

.receipt-detail-grid {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
}

.receipt-picture {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff8c;
  border-radius: 18px;
  min-height: 340px;
}

.receipt-picture__trigger {
  display: block;
  cursor: zoom-in;
  background: none;
  border: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
  padding: 0;
}

.receipt-picture__image {
  display: block;
  object-fit: contain;
  background: #5138240a;
  width: 100%;
  height: 100%;
}

body.modal-open {
  overflow: hidden;
}

.receipt-modal[hidden] {
  display: none;
}

.receipt-modal {
  position: fixed;
  z-index: 50;
  display: grid;
  place-items:  center;
  padding: 1.5rem;
  inset: 0;
}

.receipt-modal__backdrop {
  position: absolute;
  backdrop-filter: blur(4px);
  background: #140e0ad1;
  inset: 0;
}

.receipt-modal__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  background: #fffbf5fa;
  border-radius: 24px;
  gap: 1rem;
  width: min(100%, 860px);
  max-height: calc(100vh - 3rem);
  padding: 1rem;
  box-shadow: 0 24px 80px #140e0a47;
}

.receipt-modal__viewport {
  overflow: hidden;
  background: #5138240a;
  border-radius: 18px;
}

.receipt-modal__close {
  color: var(--text);
  background: #51382414;
  justify-self: end;
  padding: .7rem 1rem;
}

.receipt-modal__image {
  display: block;
  object-fit: contain;
  transform-origin: top left;
  user-select: none;
  background: #5138240a;
  border-radius: 18px;
  width: 100%;
  max-height: calc(100vh - 8rem);
}

.product-create-modal[hidden], .todo-create-modal[hidden], .time-entry-create-modal[hidden], .time-entry-edit-modal[hidden], .time-project-modal[hidden], .receipt-create-modal[hidden] {
  display: none;
}

.product-create-modal, .todo-create-modal, .time-entry-create-modal, .time-entry-edit-modal, .time-project-modal, .receipt-create-modal {
  position: fixed;
  z-index: 40;
  display: grid;
  place-items:  center;
  padding: 1.5rem;
  inset: 0;
}

.product-create-modal__backdrop, .todo-create-modal__backdrop, .time-entry-create-modal__backdrop, .time-entry-edit-modal__backdrop, .time-project-modal__backdrop, .receipt-create-modal__backdrop {
  position: absolute;
  backdrop-filter: blur(4px);
  background: #140e0a9e;
  inset: 0;
}

.time-entry-create-modal--range-preview .time-entry-create-modal__backdrop {
  backdrop-filter: blur(1px);
  background: #140e0a47;
}

.product-create-modal__dialog, .todo-create-modal__dialog, .time-entry-create-modal__dialog, .time-entry-edit-modal__dialog, .time-project-modal__dialog, .receipt-create-modal__dialog {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: min(100%, 620px);
  max-height: calc(100vh - 3rem);
}

.receipt-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin: 0 0 1.25rem;
}

.receipt-group-form {
  margin: 0 0 .25rem;
}

.shoppinglist-table {
  table-layout: fixed;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff8c;
  border-radius: 18px;
  width: 100%;
}

.shoppinglist-table th, .shoppinglist-table td {
  text-align: left;
  padding: .95rem 1rem;
}

.shoppinglist-table thead th {
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #5138240a;
  font-size: .78rem;
}

.shoppinglist-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.shoppinglist-table__row--done td:nth-child(2) {
  color: var(--muted);
  text-decoration: line-through;
}

.shoppinglist-table--shopping th:first-child, .shoppinglist-table--shopping td:first-child {
  width: 5rem;
}

.shoppinglist-table--shopping th:last-child, .shoppinglist-table--shopping td:last-child {
  width: 10rem;
}

.shoppinglist-table--todos th:first-child, .shoppinglist-table--todos td:first-child {
  width: 5rem;
}

.shoppinglist-table--todos th:nth-child(3), .shoppinglist-table--todos td:nth-child(3) {
  width: 12rem;
}

.shoppinglist-table--todos th:last-child, .shoppinglist-table--todos td:last-child {
  width: 8rem;
}

.product-stats-table th:nth-child(3), .product-stats-table td:nth-child(3), .product-stats-table th:nth-child(4), .product-stats-table td:nth-child(4), .product-stats-table th:nth-child(5), .product-stats-table td:nth-child(5) {
  width: 9rem;
}

.product-stats-sort {
  display: inline-flex;
  color: inherit;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  letter-spacing: inherit;
  box-shadow: none;
  background: none;
  border: 0;
  justify-content: flex-start;
  align-items:  center;
  width: 100%;
  padding: 0;
}

.product-stats-sort:hover {
  box-shadow: none;
  transform: none;
}

.product-stats-sort__marker {
  display: inline-flex;
  color: var(--accent);
  justify-content: center;
  width: 1rem;
  margin-left: .3rem;
}

.shoppinglist-product {
  display: flex;
  align-items:  center;
  gap: .8rem;
  min-width: 0;
}

.shoppinglist-product__image {
  border: 1px solid var(--line);
  object-fit: cover;
  background: #5138240f;
  border-radius: 12px;
  flex: none;
  width: 52px;
  height: 52px;
}

.shoppinglist-product__name {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.shoppinglist-product__linked {
  display: inline-block;
  color: var(--muted);
  overflow-wrap: anywhere;
  text-decoration: none;
  margin-top: .2rem;
  font-size: .84rem;
}

.shoppinglist-product__linked:hover {
  color: var(--accent);
  text-decoration: underline;
}

.shoppinglist-table__date {
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.shoppinglist-table__date-label {
  display: block;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 .12rem;
  font-size: .76rem;
  font-weight: 700;
}

.shoppinglist-table__date-value {
  display: block;
  white-space: nowrap;
}

.shoppinglist-table__check {
  text-align: center;
  width: 64px;
}

.shoppinglist-table__check input {
  width: 1.15rem;
  height: 1.15rem;
}

.inventory-tree-panel, .inventory-expiration-panel {
  padding-top: 1.1rem;
}

.inventory-expiration-list {
  display: grid;
  gap: .75rem;
}

.inventory-expiration-item {
  display: flex;
  border: 1px solid var(--line);
  color: inherit;
  background: #ffffffc7;
  border-radius: 18px;
  justify-content: space-between;
  align-items:  flex-start;
  gap: .9rem;
  padding: .95rem 1rem;
  transition: border-color .14s, transform .14s;
}

.inventory-expiration-item:hover {
  border-color: #ba5a3147;
  transform: translateY(-1px);
}

.inventory-expiration-item__main {
  display: grid;
  color: inherit;
  text-decoration: none;
  gap: .28rem;
  min-width: 0;
}

.inventory-expiration-item__main strong {
  font-size: .98rem;
}

.inventory-expiration-item__actions {
  display: flex;
  flex: none;
  align-items:  center;
  gap: .5rem;
}

.dashboard-spending-summary {
  display: grid;
  gap: .9rem;
}

.dashboard-spending-summary__metric, .dashboard-spending-total {
  display: flex;
  border: 1px solid var(--line);
  background: #ffffffc7;
  border-radius: 18px;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  padding: .95rem 1rem;
}

.dashboard-spending-summary__metric span, .dashboard-spending-total span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .8rem;
  font-weight: 700;
}

.dashboard-spending-summary__metric strong, .dashboard-spending-total strong {
  font-size: 1.3rem;
}

.dashboard-spending-total__values {
  display: flex;
  text-align: right;
  flex-direction: column;
  align-items:  end;
  gap: .25rem;
}

.dashboard-spending-summary__totals {
  display: grid;
  gap: .75rem;
}

.dashboard-timer-empty {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

.dashboard-timer-running {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-shopping-list {
  display: grid;
  gap: .75rem;
}

.dashboard-shopping-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: #ffffffc7;
  border-radius: 18px;
  align-items:  center;
  gap: .85rem;
  padding: .75rem;
  transition: border-color .14s, transform .14s;
}

.dashboard-shopping-item:hover {
  border-color: #2d7c6f42;
  transform: translateY(-1px);
}

.dashboard-shopping-item__image {
  object-fit: cover;
  background: #2d7c6f1f;
  border-radius: 14px;
  width: 3rem;
  height: 3rem;
}

.dashboard-shopping-item__image--placeholder {
  display: block;
}

.dashboard-shopping-item__main {
  display: grid;
  gap: .2rem;
  min-width: 0;
}

.dashboard-shopping-item__main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-shopping-item__main span {
  color: var(--muted);
  font-size: .9rem;
}

.spending-breakdown-panel {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
  padding: .25rem 0;
}

.spending-breakdown-header {
  display: grid;
  grid-template-columns: auto minmax(18rem, 1fr) auto;
  align-items:  end;
}

.spending-breakdown-header h2 {
  white-space: nowrap;
}

.spending-breakdown-controls {
  display: flex;
  justify-content: end;
  align-items:  end;
  gap: .75rem;
}

.spending-breakdown-controls label {
  min-width: 10rem;
}

.spending-breakdown-controls select, .spending-breakdown-controls input[type="date"] {
  padding-block-start: .72rem;
  padding-block-end: .72rem;
}

.spending-breakdown-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: .75rem;
  margin: 0;
}

.spending-breakdown-summary .dashboard-spending-summary__metric, .spending-breakdown-summary .dashboard-spending-total {
  min-height: 2.75rem;
  padding: .68rem 1rem;
}

.spending-monthly-group {
  display: grid;
  border-top: 1px solid var(--line);
  gap: .45rem;
  min-width: 0;
  padding: .15rem 0 .9rem;
}

.spending-monthly-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.spending-monthly-chart {
  position: relative;
  min-height: 28rem;
}

.spending-monthly-chart:before, .spending-monthly-chart:after {
  position: absolute;
  z-index: 2;
  content: "";
  pointer-events: none;
}

.spending-monthly-chart:before {
  border-left: 2px solid #64748bb8;
  top: 0;
  bottom: 3rem;
  left: 0;
}

.spending-monthly-chart:after {
  border-bottom: 2px solid #64748bb8;
  bottom: 3rem;
  left: 0;
  right: 0;
}

.spending-monthly-plot {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: .75rem;
  min-width: 0;
}

.spending-monthly-axis {
  display: flex;
  color: #667085;
  text-align: right;
  flex-direction: column;
  justify-content: space-between;
  height: 25rem;
  font-size: .86rem;
}

.spending-monthly-gridlines {
  position: absolute;
  inset: 0 0 3rem;
}

.spending-monthly-gridlines {
  display: flex;
  pointer-events: none;
  flex-direction: column;
  justify-content: space-between;
}

.spending-monthly-gridlines span {
  border-top: 1px dashed #94a3b859;
}

.spending-monthly-average {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  inset: 0 0 3rem;
}

.spending-monthly-average__line {
  position: absolute;
  border-top: 2px dashed #0f766e;
  left: 0;
  right: 0;
}

.spending-monthly-average__label {
  position: absolute;
  color: #0f766e;
  background: #ffffffeb;
  border: 1px solid #0f766e33;
  border-radius: 5px;
  padding: .12rem .38rem;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.2;
  right: .55rem;
  transform: translateY(50%);
}

.spending-monthly-columns {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(12, minmax(3rem, 1fr));
  z-index: 1;
  inset: 0;
}

.spending-monthly-column {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 3rem;
  border-left: 1px dashed #94a3b847;
  min-width: 0;
}

.spending-monthly-column:last-child {
  border-right: 1px dashed #94a3b847;
}

.spending-monthly-column__bars {
  display: flex;
  justify-content: center;
  align-items:  end;
  gap: .32rem;
  min-height: 0;
  padding: 0 .35rem;
}

.spending-monthly-bar {
  border-radius: 7px 7px 0 0;
  width: min(1.55rem, 34%);
}

.spending-monthly-bar--previous {
  background: #6366f161;
}

.spending-monthly-bar--current {
  background: #4f46e5;
}

.spending-monthly-column > span {
  color: #667085;
  transform-origin: top center;
  place-self:  start center;
  margin-top: .7rem;
  font-size: .88rem;
  font-weight: 700;
  transform: rotate(-45deg);
}

.spending-monthly-bar span {
  color: var(--muted);
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 700;
}

.spending-monthly-legend {
  display: flex;
  color: var(--muted);
  justify-content: end;
  align-items:  center;
  gap: .85rem;
  min-height: 1.5rem;
  font-size: .82rem;
  font-weight: 700;
}

.spending-monthly-legend span {
  display: inline-flex;
  align-items:  center;
  gap: .35rem;
}

.spending-monthly-legend__swatch {
  border-radius: 3px;
  width: .75rem;
  height: .75rem;
}

.spending-monthly-legend__swatch--previous {
  background: #3b82f661;
}

.spending-monthly-legend__swatch--current {
  background: #2563eb;
}

.spending-monthly-legend__swatch--average {
  border-top: 2px dashed #0f766e;
  border-radius: 0;
  width: 1rem;
  height: 0;
}

.spending-items-list {
  display: grid;
  gap: .7rem;
}

.spending-breakdown-group {
  display: grid;
  border-top: 1px solid var(--line);
  gap: .75rem;
  padding: .9rem 0;
}

.spending-breakdown-group h3 {
  margin: 0;
  font-size: .95rem;
}

.spending-breakdown-list {
  display: grid;
  gap: .7rem;
}

.spending-breakdown-details {
  display: grid;
  gap: .55rem;
}

.spending-breakdown-details > summary {
  list-style: none;
  cursor: pointer;
}

.spending-breakdown-details > summary::-webkit-details-marker {
  display: none;
}

.spending-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(120px, 2fr) auto auto;
  border: 1px solid var(--line);
  background: #ffffffc7;
  border-radius: 18px;
  align-items:  center;
  gap: .9rem;
  padding: .8rem .9rem;
}

.spending-breakdown-row:after {
  content: "▾";
  color: var(--muted);
  transition: transform .14s;
  font-size: .9rem;
}

.spending-breakdown-details[open] .spending-breakdown-row:after {
  transform: rotate(180deg);
}

.spending-breakdown-row__label {
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.spending-breakdown-row__label strong {
  overflow-wrap: anywhere;
}

.spending-breakdown-row__label span {
  color: var(--muted);
  font-size: .82rem;
}

.spending-breakdown-row__meter {
  overflow: hidden;
  background: #31575a1f;
  border-radius: 999px;
  height: .65rem;
}

.spending-breakdown-row__meter div {
  border-radius: inherit;
  background: linear-gradient(90deg, #3b6f72, #ba5a31);
  height: 100%;
}

.spending-breakdown-row__total {
  white-space: nowrap;
  justify-self: end;
}

.spending-breakdown-items {
  display: grid;
  gap: .45rem;
  padding: 0 .4rem .2rem 1rem;
}

.spending-breakdown-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  color: inherit;
  text-decoration: none;
  background: #ffffff85;
  border: 1px solid #31575a1f;
  border-radius: 14px;
  align-items:  center;
  gap: .75rem;
  padding: .7rem .85rem;
}

.spending-breakdown-item:hover {
  border-color: #ba5a3147;
}

.spending-breakdown-item__main, .spending-breakdown-item__meta {
  display: grid;
  gap: .22rem;
}

.spending-breakdown-item__main {
  min-width: 0;
}

.spending-breakdown-item__main strong {
  overflow-wrap: anywhere;
}

.spending-breakdown-item__main span, .spending-breakdown-item__meta span {
  color: var(--muted);
  font-size: .8rem;
}

.spending-breakdown-item__meta {
  white-space: nowrap;
  justify-items: end;
}

.inventory-root {
  display: grid;
  gap: 1rem;
}

.inventory-tree__toolbar {
  display: flex;
  justify-content: end;
  align-items:  end;
  gap: .75rem;
}

.inventory-tree__toolbar .status {
  margin-top: 0;
}

.inventory-tree__filter {
  max-width: 16rem;
  margin: 0;
}

.inventory-tree__root-content {
  display: grid;
  gap: .75rem;
}

.inventory-tree__containers, .inventory-tree__items {
  list-style: none;
  display: grid;
  gap: .75rem;
  margin: 0;
  padding: 0;
}

.inventory-tree__items {
  gap: 0;
}

.inventory-tree__containers {
  border-left: 1px solid #5138241f;
  margin-left: 1rem;
  padding-left: 1rem;
}

.inventory-tree__containers--root {
  border-left: none;
  margin-left: 0;
  padding-left: 0;
}

.inventory-tree__branch, .inventory-tree__leaf {
  display: grid;
  gap: .75rem;
}

.inventory-tree__items > .inventory-tree__leaf {
  gap: 0;
}

.inventory-tree__items > .inventory-tree__leaf + .inventory-tree__leaf .inventory-node--item {
  border-top: 0;
}

.inventory-tree__children {
  display: grid;
  gap: .75rem;
}

.inventory-tree__children > .inventory-tree__items {
  margin-left: 1rem;
}

.inventory-tree__empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  border-radius: 18px;
  padding: .95rem 1rem;
  font-size: .9rem;
}

.inventory-node {
  display: flex;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: #ffffffc7;
  border-radius: 18px;
  justify-content: space-between;
  align-items:  flex-start;
  gap: .75rem;
  padding: .95rem 1rem;
  transition: border-color .14s, box-shadow .14s, transform .14s, opacity .14s;
}

.inventory-node--item {
  cursor: pointer;
  border-radius: 0;
  padding: .55rem .75rem;
}

.inventory-node--item[data-drag-kind="item"] {
  cursor: grab;
}

.inventory-node--consumed {
  opacity: .72;
}

.inventory-node--container {
  cursor: grab;
}

.inventory-node--item:hover {
  border-color: #ba5a3147;
  transform: translateY(-1px);
}

.inventory-node__link {
  color: inherit;
  text-decoration: none;
}

.inventory-node--dragging {
  opacity: .55;
}

.inventory-node__main {
  display: grid;
  gap: .12rem;
  min-width: 0;
}

.inventory-node__title-row {
  display: flex;
  align-items:  center;
  gap: .45rem;
  min-width: 0;
}

.inventory-node__main strong {
  font-size: .98rem;
}

.inventory-node__toggle, .inventory-node__toggle-placeholder {
  flex: 0 0 1.4rem;
  width: 1.4rem;
  height: 1.4rem;
}

.inventory-node__toggle {
  display: inline-flex;
  color: var(--text);
  background: #51382414;
  border-radius: 999px;
  justify-content: center;
  align-items:  center;
  padding: 0;
  font-size: .9rem;
  line-height: 1;
}

.inventory-node__toggle:hover {
  background: #5138241f;
  transform: none;
}

.inventory-node__toggle-placeholder {
  display: inline-block;
}

.inventory-node__meta {
  display: flex;
  color: var(--muted);
  flex-wrap: wrap;
  gap: .45rem .75rem;
  font-size: .8rem;
  line-height: 1.4;
}

.inventory-node__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: .5rem;
}

.inventory-node__button {
  flex: none;
  padding: .45rem .75rem;
}

.inventory-drop-target--active {
  border-color: #ba5a3166;
  box-shadow: 0 0 0 3px #ba5a311f;
}

.inventory-detail-block {
  display: grid;
  gap: .75rem;
}

.inventory-detail-block h3 {
  margin: 0;
  font-size: 1rem;
}

.inventory-detail-list {
  display: grid;
  gap: .75rem;
}

.inventory-link-form {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.inventory-consume-target {
  border: 1px solid var(--line);
  background: #ffffff8c;
  border-radius: 18px;
  padding: .85rem 1rem;
  font-weight: 700;
}

.inventory-container-modal[hidden] {
  display: none;
}

.inventory-container-modal {
  position: fixed;
  z-index: 40;
  display: grid;
  place-items:  center;
  padding: 1.5rem;
  inset: 0;
}

.inventory-container-modal__backdrop {
  position: absolute;
  backdrop-filter: blur(4px);
  background: #140e0a9e;
  inset: 0;
}

.inventory-container-modal__dialog {
  position: relative;
  z-index: 1;
  overflow: auto;
  width: min(100%, 620px);
  max-height: calc(100vh - 3rem);
}

.product {
  display: grid;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  background: #ffffff8c;
  border-radius: 18px;
  gap: .5rem;
  padding: 1rem 1.1rem;
  transition: transform .14s, border-color .14s;
}

.product:hover {
  border-color: #ba5a3147;
  transform: translateY(-1px);
}

.product__media {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #5138240f;
  border-radius: 14px;
}

.product__image {
  display: block;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.product header {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
}

.product h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tag {
  display: inline-flex;
  color: var(--accent-2);
  background: #2d7c6f1f;
  border-radius: 999px;
  align-items:  center;
  padding: .28rem .7rem;
  font-size: .78rem;
  font-weight: 700;
}

.tag--neutral {
  color: var(--muted);
  background: #51382414;
}

.tag--warning {
  color: var(--accent);
  background: #ba5a311f;
}

.tag--danger {
  color: #9b2f2f;
  background: #ae30301f;
}

.product dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  margin: 0;
}

.product dt {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .76rem;
}

.product dd {
  margin: .15rem 0 0;
  font-size: .95rem;
}

.product-detail-grid, .inventory-item-detail-grid {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
}

.inventory-item-images-panel {
  grid-column: 1 / -1;
}

.inventory-item-image-gallery {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.product-picture__form {
  margin-top: 1rem;
}

.empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
  border-radius: 18px;
  padding: 1.25rem;
}

.time-workspace {
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  align-items:  start;
}

.time-sidebar, .time-main, .time-start-form, .time-entry-list, .time-report-list, .time-quick-actions {
  display: grid;
  gap: 0;
}

.time-sidebar, .time-main, .time-start-form {
  gap: 1rem;
}

.time-block {
  min-width: 0;
  padding: .25rem 0;
}

.time-block + .time-block {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.time-running {
  display: grid;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
  padding-bottom: 1rem;
}

.time-block--timer-running .time-running {
  border-bottom: 0;
  padding-bottom: 0;
}

.time-running__project, .time-entry-row__title, .time-report-row > div {
  display: flex;
  align-items:  center;
  gap: .6rem;
  min-width: 0;
}

.time-running__duration {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.time-running__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.time-running__discard {
  color: #9b2f2f;
  background: #ae30301f;
}

.time-color {
  display: inline-block;
  background: var(--time-color, var(--accent-2));
  border-radius: 999px;
  flex: none;
  width: .85rem;
  height: .85rem;
  box-shadow: 0 0 0 3px #ffffffb3;
}

.clients-workspace, .users-workspace {
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  align-items:  start;
}

.client-list, .project-list {
  display: grid;
  gap: 0;
  margin-top: 1rem;
}

.client-row {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
  border-bottom: 1px solid var(--line);
  align-items:  center;
  gap: 1rem;
  padding: 1rem 0;
}

.client-row:first-child {
  padding-top: 0;
}

.client-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.client-row--archived {
  opacity: .68;
}

.client-row__summary, .client-row__form {
  min-width: 0;
}

.client-row__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5rem auto;
  align-items:  end;
  gap: .75rem;
}

.client-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.user-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.user-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 54rem;
}

.user-table th, .user-table td {
  text-align: left;
  vertical-align: middle;
  padding: .7rem;
}

.user-table th {
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
}

.user-table tbody tr {
  border-top: 1px solid var(--line);
}

.user-table input:not([type="checkbox"]) {
  min-width: 8rem;
  padding: .65rem .75rem;
}

.user-table__admin {
  text-align: center !important;
}

.user-table__actions {
  white-space: nowrap;
}

.client-row__link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
}

.client-row__link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.client-row__link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
}

.client-project-list {
  display: grid;
  gap: .5rem;
}

.client-project-row {
  display: flex;
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  border-radius: 8px;
  align-items:  center;
  gap: .6rem;
  padding: .8rem;
}

.client-project-row:hover {
  border-color: var(--accent);
  background: #2d7c6f0f;
}

.client-project-row:focus-visible {
  border-color: var(--accent);
  background: #2d7c6f0f;
}

.client-project-row--archived {
  opacity: .7;
}

.client-project-row .tag {
  margin-left: auto;
}

.project-header-actions {
  display: flex;
  align-items:  center;
  gap: .5rem;
}

.project-header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.project-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.project-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 46rem;
}

.project-table th, .project-table td {
  text-align: left;
  vertical-align: middle;
  padding: .7rem;
}

.project-table th {
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
}

.project-table tbody tr {
  border-top: 1px solid var(--line);
}

.project-table__row--archived {
  opacity: .68;
}

.project-table th:first-child, .project-table td:first-child {
  width: 28%;
}

.project-table th:nth-child(2), .project-table td:nth-child(2) {
  width: 5.5rem;
}

.project-table th:nth-child(3), .project-table td:nth-child(3) {
  width: 25%;
}

.project-table th:nth-child(4), .project-table td:nth-child(4) {
  width: 6.5rem;
}

.project-table input, .project-table .search-select__input {
  padding: .65rem .75rem;
}

.project-table input[type="color"] {
  width: 3.25rem;
  min-width: 3.25rem;
  padding: .25rem;
}

.project-table__actions-trigger {
  padding: .6rem .8rem;
  font-size: .86rem;
}

.project-actions-menu {
  position: fixed;
  z-index: 50;
  display: grid;
  box-shadow: var(--shadow);
  background: #fffcf7fa;
  border: 1px solid #51382429;
  border-radius: 14px;
  gap: .25rem;
  min-width: 9rem;
  padding: .35rem;
}

.project-actions-menu button {
  text-align: left;
  width: 100%;
  padding: .6rem .8rem;
  font-size: .86rem;
}

.time-action-row, .time-entry-row__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:  center;
  gap: 1rem;
}

.time-entry-row {
  display: grid;
  border-bottom: 1px solid var(--line);
  gap: 1rem;
  padding: 1rem 0;
}

.time-action-row:first-child, .time-entry-row:first-child {
  padding-top: 0;
}

.time-action-row:last-child, .time-entry-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.time-action-row__main, .time-entry-row__main {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.time-entry-row__header {
  display: flex;
  justify-content: space-between;
  align-items:  flex-start;
  gap: .75rem;
  min-width: 0;
}

.time-entry-row__actions {
  display: flex;
  align-items:  center;
  gap: .5rem;
}

.time-entry-row__edit {
  flex: none;
  padding-inline-start: 1rem;
  padding-inline-end: 1rem;
}

.time-entry-row__title {
  flex: auto;
}

.time-entry-row__title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-entry-row__description {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.time-entry-row--running {
  border-color: #2d7c6f59;
}

.time-entry-edit-form {
  display: grid;
  border: 1px solid var(--line);
  background: #ffffff7a;
  border-radius: 18px;
  gap: .85rem;
  padding: 1rem;
}

.time-entry-edit-form[hidden] {
  display: none;
}

.time-entry-card {
  display: grid;
  border: 1px solid var(--line);
  background: #ffffff8c;
  border-radius: 18px;
  gap: .8rem;
  padding: 1rem;
}

.time-report-row, .time-report-summary {
  display: flex;
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
}

.time-entry-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:  start;
  gap: 1rem;
}

.time-entry-card__project {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: .65rem;
  min-width: 0;
}

.time-entry-card__project strong, .time-entry-card__description {
  overflow-wrap: anywhere;
}

.time-entry-card__edit {
  min-width: 6rem;
  padding-inline-start: 1.15rem;
  padding-inline-end: 1.15rem;
}

.time-entry-card__restart {
  width: 100%;
}

.time-entry-card__form {
  display: grid;
  gap: .8rem;
}

.time-report-summary {
  border: 1px solid var(--line);
  background: #ffffff7a;
  border-radius: 18px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.time-report-summary span {
  display: block;
  color: var(--muted);
  font-size: .85rem;
}

.time-report-summary strong {
  display: block;
  margin-top: .25rem;
  font-size: 1.4rem;
}

.time-report-row {
  border-bottom: 1px solid var(--line);
  padding: .85rem 0;
}

.time-report-row:last-child {
  border-bottom: 0;
}

.time-overview-controls {
  margin-bottom: 1rem;
}

.time-overview-controls label {
  max-width: 16rem;
}

.time-overview-controls label[hidden] {
  display: none;
}

.time-overview-results {
  display: grid;
  gap: 1.25rem;
}

.time-overview-chart {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  align-items:  center;
  gap: 1.5rem;
}

.time-overview-pie {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--line);
  overflow: hidden;
  border-radius: 50%;
  width: min(100%, 16rem);
}

.time-overview-pie:after {
  position: absolute;
  content: "";
  pointer-events: none;
  background: #ffffffa3;
  border: 1px solid #ffffffb3;
  border-radius: 50%;
  inset: 1.2rem;
}

.time-overview-pie svg {
  display: block;
  width: 100%;
  height: 100%;
}

.time-overview-pie--empty {
  background: repeating-conic-gradient(#5138241a 0deg 16deg, #ffffffb3 16deg 32deg);
}

.time-overview-summary {
  margin-bottom: 0;
}

.time-monthly-summary > .status:empty {
  display: none;
}

.time-overview-row__main, .time-overview-row__total {
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.time-overview-row__total {
  text-align: right;
  justify-items: end;
}

.time-overview-row__total span {
  color: var(--muted);
  font-size: .85rem;
}

.time-overview-client-group, .time-overview-project-group {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.time-overview-client-group summary, .time-overview-project-group summary {
  display: block;
  list-style: none;
  cursor: pointer;
}

.time-overview-client-group summary::-webkit-details-marker {
  display: none;
}

.time-overview-project-group summary::-webkit-details-marker {
  display: none;
}

.time-overview-client-group summary .time-overview-row, .time-overview-project-group summary .time-overview-row {
  position: relative;
  border-bottom: 0;
  padding-left: 1.6rem;
}

.time-overview-client-group summary .time-overview-row:before, .time-overview-project-group summary .time-overview-row:before {
  position: absolute;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  content: "";
  width: .5rem;
  height: .5rem;
  transition: transform .14s;
  top: 1.25rem;
  left: .15rem;
  transform: rotate(-45deg);
}

.time-overview-client-group[open] summary .time-overview-row:before, .time-overview-project-group[open] summary .time-overview-row:before {
  transform: translateY(-.12rem)rotate(45deg);
}

.time-overview-row__link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .16em;
}

.time-overview-client-projects {
  border-left: 1px solid var(--line);
  margin-left: 1.6rem;
  padding-left: .85rem;
}

.time-overview-client-projects .time-overview-project-row {
  padding-left: 0;
}

.time-overview-project-entries {
  border-left: 1px solid var(--line);
  margin-left: 1.6rem;
  padding-left: .85rem;
}

.time-overview-project-detail > .time-overview-project-entries {
  border-left: 0;
  margin-left: 0;
  padding-left: 0;
}

.time-overview-entry-row {
  display: flex;
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  align-items:  center;
  gap: 1rem;
  padding: .7rem 0;
}

.time-overview-entry-row__main {
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.time-weekly-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items:  center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.time-weekly-toolbar .status {
  flex: auto;
  min-width: 0;
  margin-right: auto;
}

.time-weekly-toolbar .status:empty {
  display: none;
}

.time-weekly-controls {
  flex: none;
  align-items:  end;
  margin-bottom: 0;
}

.time-weekly-controls label {
  display: flex;
  white-space: nowrap;
  align-items:  center;
  gap: .5rem;
  min-width: 0;
  max-width: none;
}

.time-weekly-controls label input, .time-weekly-controls label select, .time-weekly-controls > input, .time-weekly-controls > select {
  width: auto;
  min-width: 10rem;
}

.time-weekly-controls > button {
  min-height: 2.75rem;
}

.time-weekly-chart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  align-items:  start;
  gap: 1.5rem;
}

.time-weekly-bars {
  display: grid;
  grid-template-columns: repeat(var(--time-period-days, 7), minmax(2.25rem, 1fr));
  overflow-x: auto;
  align-items:  end;
  gap: .75rem;
  min-height: 17rem;
  padding-bottom: .25rem;
}

.time-weekly-day {
  display: grid;
  grid-template-rows: 13rem auto;
  color: inherit;
  font: inherit;
  cursor: pointer;
  appearance: none;
  background: none;
  border: 0;
  gap: .6rem;
  min-width: 0;
  padding: 0;
}

.time-weekly-day--selected .time-weekly-bar {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #68543a29;
}

.time-weekly-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.time-weekly-bar {
  display: flex;
  border: 1px solid var(--line);
  background: #ffffff73;
  border-radius: 8px;
  align-items:  end;
  height: 13rem;
  padding: .25rem;
}

.time-weekly-bar__stack {
  display: flex;
  height: var(--time-weekly-fill, 0%);
  overflow: hidden;
  background: #51382414;
  border-radius: 5px;
  flex-direction: column-reverse;
  width: 100%;
  min-height: 0;
}

.time-weekly-bar--empty .time-weekly-bar__stack {
  height: 0;
}

.time-weekly-bar__segment {
  flex: 0 0 var(--time-weekly-segment, 0%);
  background: var(--time-color, var(--accent-2));
  min-height: 2px;
}

.time-weekly-day__label {
  display: grid;
  text-align: center;
  gap: .2rem;
  min-width: 0;
}

.time-weekly-day__label strong, .time-weekly-day__label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-weekly-day__label span {
  color: var(--muted);
  font-size: .82rem;
}

.time-weekly-legend {
  display: grid;
  gap: 0;
  min-width: 0;
}

.time-weekly-legend__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--line);
  align-items:  center;
  gap: .75rem;
  padding: .75rem 0;
}

.time-weekly-legend__row:first-child {
  padding-top: 0;
}

.time-weekly-legend__row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.time-weekly-legend__total {
  display: grid;
  text-align: right;
  justify-items: end;
  gap: .2rem;
}

.time-weekly-legend__total strong {
  color: var(--text);
  white-space: nowrap;
  font-size: .95rem;
  font-weight: 700;
}

.time-weekly-legend__total span {
  color: var(--muted);
  white-space: nowrap;
  font-size: .82rem;
}

.time-weekly-detail {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  --time-weekly-hour-height: 4rem;
  background: #ffffff73;
  border-radius: 8px;
  gap: 0;
}

.time-weekly-detail__header, .time-weekly-detail__body {
  display: grid;
  grid-template-columns: 4.5rem repeat(7, minmax(9.5rem, 1fr));
  min-width: 72rem;
}

.time-weekly-detail__header {
  position: sticky;
  z-index: 2;
  overflow-y: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-gutter: stable;
  background: #e8eef2;
  top: 0;
}

.time-weekly-detail__corner, .time-weekly-detail__day-heading {
  min-height: 3.75rem;
  padding: .65rem .75rem;
}

.time-weekly-detail__day-heading {
  display: grid;
  text-align: center;
  border-left: 1px solid #afc6d88c;
  align-content:  center;
  gap: .2rem;
}

.time-weekly-detail__day-heading strong {
  font-size: .85rem;
  font-weight: 700;
}

.time-weekly-detail__day-heading span {
  color: var(--muted);
  font-size: .8rem;
}

.time-weekly-detail__body {
  overflow-y: auto;
  scrollbar-gutter: stable;
  max-height: 42rem;
}

.time-weekly-detail__hours, .time-weekly-detail__day {
  min-height: calc(var(--time-weekly-hour-height) * 24);
}

.time-weekly-detail__hours {
  display: grid;
  grid-template-rows: repeat(24, var(--time-weekly-hour-height));
  color: var(--muted);
  text-align: right;
  background: #ffffff8c;
  font-size: .78rem;
}

.time-weekly-detail__hours span {
  border-top: 1px dashed #afc6d8b3;
  padding: .35rem .55rem 0 0;
}

.time-weekly-detail__day {
  position: relative;
  background: repeating-linear-gradient(to bottom, #afc6d873 0, #afc6d873 1px, transparent 1px, transparent var(--time-weekly-hour-height));
  border-left: 1px solid #afc6d88c;
}

.time-weekly-detail-entry {
  position: absolute;
  top: var(--entry-top);
  display: grid;
  height: max(var(--entry-height), 2rem);
  overflow: hidden;
  border: 0;
  border-left: 3px solid var(--time-color, var(--accent-2));
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  background: #eff4f7f5;
  border-radius: 6px;
  align-content:  start;
  gap: .25rem;
  min-height: 2rem;
  padding: .45rem .5rem;
  left: .35rem;
  right: .35rem;
  box-shadow: 0 2px 8px #140e0a0f;
}

.time-weekly-detail-entry:hover {
  background: #fff;
  box-shadow: 0 4px 14px #140e0a1f;
}

.time-weekly-detail-entry:focus-visible {
  background: #fff;
  box-shadow: 0 4px 14px #140e0a1f;
}

.time-weekly-detail-entry:focus-visible {
  outline: 2px solid #2f7de1d1;
  outline-offset: 2px;
}

.time-weekly-detail-entry strong, .time-weekly-detail-entry span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-weekly-detail-entry strong {
  font-size: .82rem;
  font-weight: 700;
}

.time-weekly-detail-entry__project, .time-weekly-detail-entry__meta {
  display: flex;
  align-items:  center;
  gap: .35rem;
  min-width: 0;
  font-size: .76rem;
}

.time-weekly-detail-entry__project {
  color: var(--ink);
}

.time-weekly-detail-entry__project .time-color {
  box-shadow: none;
  width: .55rem;
  height: .55rem;
}

.time-weekly-detail-entry__meta {
  color: var(--muted);
  justify-content: space-between;
}

.time-weekly-detail-selection {
  position: absolute;
  top: var(--selection-top);
  z-index: 3;
  display: grid;
  height: max(var(--selection-height), 2rem);
  background: #2f7de124;
  border: 1px solid #2f7de1d1;
  border-radius: 6px;
  align-content:  start;
  gap: .35rem;
  min-height: 2rem;
  padding: .45rem;
  left: .25rem;
  right: .25rem;
  box-shadow: inset 0 0 0 1px #ffffff80;
}

.time-weekly-detail-selection__label {
  color: #1f4f8f;
  white-space: nowrap;
  font-size: .76rem;
  font-weight: 700;
}

.time-weekly-detail-selection__add {
  justify-self: start;
  width: auto;
  padding: .35rem .7rem;
  font-size: .78rem;
}

.time-weekly-detail__empty {
  margin: 1rem;
}

.time-monthly-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  align-items:  start;
  gap: 1.5rem;
}

.time-monthly-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(6.5rem, 1fr));
  overflow-x: auto;
  gap: .5rem;
  min-width: 0;
  padding-bottom: .25rem;
}

.time-monthly-weekday {
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 700;
}

.time-monthly-day {
  display: grid;
  grid-template-rows: auto auto .65rem;
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: #ffffff85;
  border-radius: 8px;
  gap: .45rem;
  min-width: 0;
  min-height: 6.75rem;
  padding: .65rem;
}

.time-monthly-day--blank {
  visibility: hidden;
}

.time-monthly-day--empty {
  background: #ffffff47;
}

.time-monthly-day--selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px #68543a29;
}

.time-monthly-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.time-monthly-day__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  min-width: 0;
}

.time-monthly-day__header strong {
  font-size: 1rem;
}

.time-monthly-day__header span, .time-monthly-day__total {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
}

.time-monthly-day__bar {
  display: flex;
  overflow: hidden;
  background: #51382414;
  border-radius: 999px;
  width: 100%;
  min-width: 0;
}

.time-monthly-day__segment {
  flex: 0 0 var(--time-monthly-segment, 0%);
  background: var(--time-color, var(--accent-2));
  min-width: 2px;
}

.time-monthly-side {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.time-monthly-detail {
  display: grid;
  border-bottom: 1px solid var(--line);
  gap: .75rem;
  padding-bottom: .75rem;
}

.time-monthly-detail__title {
  display: grid;
  gap: .15rem;
}

.time-monthly-detail__title span {
  color: var(--muted);
  font-size: .9rem;
}

.time-monthly-detail__rows {
  display: grid;
  gap: 0;
}

.time-monthly-detail__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  border-top: 1px solid var(--line);
  align-items:  center;
  gap: .75rem;
  padding: .55rem 0;
}

.time-monthly-detail__row > span {
  color: var(--muted);
  white-space: nowrap;
  font-size: .88rem;
}

@media (width <= 860px) {
  html.nav-open, body.nav-open, body.navigation-menu-open {
    overflow: hidden;
    overscroll-behavior: none;
  }

  .site-header__inner, .dashboard-grid, .hero, .workspace, .page-heading, .section-header, .row, .product dl, .receipt-card__meta, .receipt-metadata, .client-row, .client-row__form, .time-action-row, .time-entry-row__summary, .time-action-row {
    grid-template-columns: 1fr;
  }

  .time-action-row > button {
    width: 100%;
  }

  .time-entry-row__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .time-entry-row__actions > button {
    width: 100%;
  }

  .time-entry-card__header, .time-report-row, .time-report-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .time-overview-chart {
    grid-template-columns: 1fr;
  }

  .time-overview-pie {
    justify-self: center;
  }

  .time-overview-entry-row, .time-weekly-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .time-weekly-controls > button {
    width: 100%;
  }

  .time-weekly-controls label {
    flex-direction: column;
    align-items: stretch;
  }

  .time-weekly-controls label input, .time-weekly-controls label select, .time-weekly-controls > input, .time-weekly-controls > select {
    width: 100%;
    min-width: 0;
  }

  .time-weekly-chart {
    grid-template-columns: 1fr;
  }

  .time-weekly-bars {
    overflow-x: auto;
    gap: .4rem;
    padding-bottom: .25rem;
  }

  .time-weekly-day {
    min-width: 3rem;
  }

  .time-monthly-calendar-layout {
    grid-template-columns: 1fr;
  }

  .time-monthly-calendar {
    grid-template-columns: repeat(7, minmax(5.75rem, 1fr));
  }

  .shoppinglist-input, .recipe-ingredient-form__row, .recipe-create-ingredient-form, .spending-breakdown-row {
    grid-template-columns: 1fr;
  }

  .spending-breakdown-controls {
    align-items: stretch;
    justify-content: initial;
    flex-direction: column;
  }

  .spending-breakdown-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .spending-monthly-plot {
    grid-template-columns: 3.75rem minmax(38rem, 1fr);
    overflow-x: auto;
    width: 100%;
    max-width: 100%;
    padding-bottom: .45rem;
  }

  .spending-monthly-chart {
    min-width: 38rem;
  }

  .spending-monthly-axis {
    width: 3.75rem;
  }

  .spending-breakdown-row__total {
    justify-self: start;
  }

  .spending-breakdown-item {
    grid-template-columns: 1fr;
  }

  .spending-breakdown-item__meta {
    justify-items: start;
  }

  .recipe-create-ingredient-preview__item, .recipe-create-ingredient-preview__meta {
    flex-direction: column;
    align-items: stretch;
  }

  .receipt-modal, .product-create-modal, .todo-create-modal, .time-entry-create-modal, .time-entry-edit-modal, .time-project-modal, .receipt-create-modal, .app-modal, .recipe-ingredient-modal, .inventory-container-modal {
    padding: .9rem;
  }

  .receipt-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 1.8rem);
    padding: .85rem;
  }

  .product-create-modal__dialog, .todo-create-modal__dialog, .time-entry-create-modal__dialog, .time-entry-edit-modal__dialog, .time-project-modal__dialog, .receipt-create-modal__dialog, .app-modal__dialog, .recipe-ingredient-modal__dialog, .inventory-container-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 1.8rem);
  }

  .receipt-modal__image {
    max-height: calc(100vh - 7rem);
  }

  .site-header__inner, .page-heading, .section-header {
    display: grid;
    justify-content: initial;
  }

  .inventory-node, .inventory-expiration-item {
    flex-direction: column;
    align-items: stretch;
  }

  .inventory-expiration-item__actions {
    justify-content: space-between;
  }

  .recipe-ingredient-item {
    flex-direction: column;
    align-items: stretch;
  }

  .section-header .status {
    text-align: left;
  }

  .inventory-node__actions {
    flex-direction: column;
  }

  .brand {
    flex-direction: row;
    flex: none;
    align-items:  center;
    gap: .5rem;
  }

  .site-header {
    z-index: 30;
    padding: 0;
  }

  .site-header--nav-open {
    z-index: 100;
  }

  .site-header__inner {
    position: relative;
    display: flex;
    overflow: visible;
    box-shadow: none;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items:  center;
    gap: .65rem;
    width: 100%;
    padding: .6rem .75rem .55rem;
  }

  .page-shell {
    width: 100%;
    padding: .75rem 0 2rem;
  }

  .receipts-page, .inventory-page {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .receipts-page__controls {
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
    align-items: stretch;
    gap: .65rem;
    min-width: 0;
  }

  .receipts-page__filters, .receipts-page__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    min-width: 0;
  }

  .receipts-page__filters .toolbar__select {
    flex: 10rem;
    width: auto;
  }

  .receipt-view-toggle {
    flex: 100%;
  }

  .receipt-card, .receipt-card--timeline, .receipt-timeline__cutoff {
    width: 100%;
    min-width: 0;
  }

  .receipt-card__header {
    flex-direction: column;
    align-items:  flex-start;
    gap: .55rem;
  }

  .receipt-card__tags {
    justify-content: flex-start;
  }

  .workspace {
    gap: .75rem;
  }

  .card.panel {
    box-shadow: none;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .panel {
    padding: 1rem 0;
  }

  .panel > h2, .panel > h3, .panel > p, .panel > form, .panel > dl, .panel > .toolbar, .panel > .section-header, .panel > .status, .panel > .page-heading, .panel > .page-copy, .panel > .receipt-metadata, .panel > .time-report-summary, .panel > .spending-breakdown-controls, .panel > .inventory-detail-block, .panel > .recipe-detail-section, .page-heading, .receipt-modal__dialog, .product-create-modal__dialog, .todo-create-modal__dialog, .time-entry-create-modal__dialog, .time-entry-edit-modal__dialog, .time-project-modal__dialog, .receipt-create-modal__dialog, .recipe-ingredient-modal__dialog, .inventory-container-modal__dialog {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand {
    order: 1;
    padding: 0;
  }

  .navigation-hub {
    position: static;
    flex: auto;
    order: 2;
    min-width: 0;
    transform: none;
  }

  .navigation-hub__trigger {
    justify-content: center;
    width: 100%;
    max-width: 100%;
    font-size: .95rem;
  }

  .navigation-menu {
    position: fixed;
    padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    align-content:  start;
    width: auto;
    height: 100dvh;
    max-height: none;
    inset: 0;
    transform: none;
  }

  .account-login, .account-menu {
    order: 3;
    margin-left: auto;
  }

  .navbar-toggle {
    display: inline-flex;
    order: 3;
  }

  .navbar {
    display: none;
    position: absolute;
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .75rem .75rem calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    background: #fffcf6;
    flex-flow: column;
    order: 4;
    gap: .25rem;
    width: 100%;
    min-width: 0;
    max-height: calc(100dvh - 3.75rem);
    margin: 0;
    top: 100%;
    left: 0;
    right: 0;
    box-shadow: 0 18px 40px #402d1c1f;
  }

  .site-header--nav-open .navbar {
    display: flex;
  }

  .navbar__link {
    position: relative;
    background: none;
    border-radius: 10px;
    justify-content: flex-start;
    width: 100%;
    min-height: 2.2rem;
    padding: .6rem .7rem;
    font-size: .9rem;
    font-weight: 800;
  }

  .navbar__link:hover {
    background: none;
    transform: none;
  }

  .navbar__dropdown {
    display: grid;
    align-items: stretch;
    gap: .15rem;
  }

  .navbar__dropdown:before, .navbar__dropdown-trigger:after {
    display: none;
  }

  .navbar__dropdown-menu {
    position: static;
    display: grid;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    background: none;
    border: 0;
    gap: .15rem;
    min-width: 0;
    padding: 0 0 0 .7rem;
    transform: none;
  }

  .navbar__dropdown-link {
    position: relative;
    background: #fffcf685;
    border-radius: 10px;
    justify-content: flex-start;
    min-height: 2.2rem;
    padding: .52rem .7rem;
    font-size: .82rem;
  }

  .navbar__dropdown-link:hover, .navbar__dropdown-link--active, .navbar__dropdown-link--active:visited {
    color: var(--text);
    background: #2d7c6f1a;
  }

  .navbar__dropdown-link--active:after, .navbar__dropdown > .navbar__link--active:after {
    display: none;
  }

  .navbar__link--active, .navbar__link--active:visited {
    color: var(--text);
    background: #ba5a311f;
  }

  .navbar__link--active:after, .navbar__label--desktop {
    display: none;
  }

  .navbar__label--mobile {
    display: inline;
  }

  .account-login, .account-menu__trigger {
    max-width: 7.5rem;
    min-height: 2.2rem;
    padding: .48rem .64rem .44rem;
    font-size: .82rem;
    font-weight: 800;
  }

  .account-menu__dropdown {
    min-width: 10.5rem;
    top: calc(100% + .45rem);
  }

  .shoppinglist-table--shopping th, .shoppinglist-table--shopping td {
    padding: .75rem .65rem;
  }

  .shoppinglist-table--shopping th:first-child, .shoppinglist-table--shopping td:first-child {
    width: 4rem;
  }

  .shoppinglist-table--shopping th:last-child, .shoppinglist-table--shopping td:last-child {
    width: 4.5rem;
  }

  .shoppinglist-table--shopping .shoppinglist-table__date {
    text-align: right;
    white-space: normal;
    font-size: .72rem;
  }

  .shoppinglist-table--shopping .shoppinglist-table__date-label {
    display: block;
    margin: 0;
  }

  .shoppinglist-table--shopping .shoppinglist-table__date-value {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .shoppinglist-table--shopping .shoppinglist-product {
    align-items:  flex-start;
  }

  .shoppinglist-table--shopping .shoppinglist-product__image {
    width: 40px;
    height: 40px;
  }

  .shoppinglist-table--shopping .shoppinglist-product__name {
    font-size: .96rem;
    line-height: 1.12;
  }

  .shoppinglist-table {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .todos-panel-actions {
    justify-content: flex-start;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .todos-panel-actions .primary {
    white-space: nowrap;
    flex: none;
    margin-left: 0;
  }

  .shoppinglist-table--todos {
    display: block;
    background: none;
    border: 0;
  }

  .shoppinglist-table--todos thead {
    display: none;
  }

  .shoppinglist-table--todos tbody {
    display: grid;
    gap: .75rem;
    padding: 0 1rem;
  }

  .shoppinglist-table--todos tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "check title" "check due" "check action";
    border: 1px solid var(--line);
    background: #fff9;
    border-radius: 18px;
    align-items:  center;
    gap: .35rem .8rem;
    padding: .9rem .85rem;
  }

  .shoppinglist-table--todos tbody tr + tr td {
    border-top: 0;
  }

  .shoppinglist-table--todos td {
    display: block;
    padding: 0;
  }

  .shoppinglist-table--todos td:first-child {
    grid-area: check;
    width: auto;
  }

  .shoppinglist-table--todos td:nth-child(2) {
    grid-area: title;
    min-width: 0;
  }

  .shoppinglist-table--todos td:nth-child(3) {
    grid-area: due;
    white-space: normal;
    width: auto;
    font-size: .88rem;
  }

  .shoppinglist-table--todos td:last-child {
    grid-area: action;
    justify-self: start;
    width: auto;
  }

  .shoppinglist-table--todos td:last-child .secondary {
    min-width: 0;
    padding: .65rem .8rem;
  }

  .shoppinglist-results-panel {
    padding-left: 0;
    padding-right: 0;
  }

  .shoppinglist-results-panel .section-header {
    padding: 0 1rem;
  }

  .shoppinglist-results-panel .results {
    gap: 0;
  }

  .shoppinglist-table--shopping th, .shoppinglist-table--shopping td {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .shoppinglist-table--shopping th:first-child, .shoppinglist-table--shopping td:first-child {
    width: 3.75rem;
  }

  .shoppinglist-table--shopping th:last-child, .shoppinglist-table--shopping td:last-child {
    width: 4.25rem;
  }
}
