@import url("https://fonts.googleapis.com/css2?family=Della+Respira&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Italiana&display=swap");


:root {
  color-scheme: light;
  font-family: "Della Respira";
  background: #f4f7f4;
  color: #17231b;
  --keeply-green: #10291e;
  --keeply-green-hover: #0b1f17;
  --keeply-green-soft: #183d2b;
  --keeply-gold: #c5a15a;
}

* {
  box-sizing: border-box;
  font-family: "Della Respira";
}

body {
  margin: 0;
  font-family: "Della Respira";
  padding-bottom: 86px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(216, 183, 111, 0.22), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(16, 42, 30, 0.12), transparent 26%),
    linear-gradient(135deg, #fffaf0 0%, #f4ead5 52%, #fffdf8 100%);
  position: relative;
}

body:not(.is-authenticated) {
  padding-bottom: 0;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: 0;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.72) 0 18%, transparent 18% 42%, rgba(197, 161, 90, 0.2) 42% 43%, transparent 43% 100%),
    linear-gradient(42deg, transparent 0 28%, rgba(16, 42, 30, 0.14) 28% 29%, transparent 29% 58%, rgba(197, 161, 90, 0.18) 58% 59%, transparent 59% 100%),
    repeating-linear-gradient(90deg, rgba(18, 53, 31, 0.09) 0 1px, transparent 1px 82px),
    repeating-linear-gradient(0deg, rgba(197, 161, 90, 0.12) 0 1px, transparent 1px 76px);
  background-size: 180% 180%, 150% 150%, 190px 190px, 180px 180px;
  animation: keeply-login-grid 18s linear infinite;
}

body::after {
  z-index: 0;
  background:
    linear-gradient(132deg, transparent 0 10%, rgba(255, 255, 255, 0.8) 24%, transparent 38%),
    linear-gradient(36deg, transparent 0 50%, rgba(18, 53, 31, 0.16) 66%, transparent 82%),
    linear-gradient(90deg, transparent 0 8%, rgba(197, 161, 90, 0.24) 8% 8.35%, transparent 8.35% 100%);
  background-size: 150% 150%, 140% 140%, 100% 100%;
  animation: keeply-login-light 10s ease-in-out infinite alternate;
}

html,
body,
body *,
button,
input,
select,
textarea,
label,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a {
  font-family: "Della Respira" !important;
}

button,
input,
select,
textarea,
label {
  font-family: "Della Respira" !important;
}

button:disabled,
select:disabled,
.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.quick-quantity {
  display: flex;
  gap: 8px;
  align-items: center;
}

.quick-quantity button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

body:not(.is-authenticated) .shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 22px 0 36px;
}

.topbar {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
}

.brand-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 0;
  text-align: center;
}

.brand-icon {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(16, 42, 30, 0.16);
}

.brand-header h1 {
  margin-top: 7px;
  color: var(--keeply-green);
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1;
}

.brand-header p {
  margin-top: 9px;
  color: #42544a;
  font-size: 12px;
  line-height: 1.2;
}

body:not(.is-authenticated) .topbar {
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

body:not(.is-authenticated) .brand-header {
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
}

body:not(.is-authenticated) .brand-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(16, 42, 30, 0.16);
}

body:not(.is-authenticated) .brand-header h1 {
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1;
  color: var(--keeply-green);
  margin-top: 7px;
}

body:not(.is-authenticated) .brand-header p {
  max-width: 330px;
  color: #42544a;
  font-size: 12px;
  line-height: 1.2;
  margin-top: 9px;
}

.top-actions {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

#connection,
#open-app-menu,
body:not(.is-authenticated) .bottom-nav {
  display: none;
}

body.is-authenticated.is-home-view .bottom-nav {
  display: none;
}

.icon-button {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.08), rgba(16, 42, 30, 0.12)),
    url("/keeply-splash-bg.webp") center / cover no-repeat,
    linear-gradient(145deg, #fffaf0 0%, #f4ead5 100%);
  color: #102219;
  opacity: 1;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.splash-screen.is-fast {
  transition: opacity 180ms ease, visibility 180ms ease;
}

.splash-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-mark {
  font-size: clamp(44px, 10vw, 82px);
  line-height: 1;
  color: #12351f;
}

.splash-logo {
  width: min(460px, 72vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 36px rgba(16, 42, 30, 0.18));
  animation: keeply-splash-arrive 740ms ease-out both;
}

.splash-logo-frame {
  display: contents;
}

.splash-brand {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  width: min(360px, 72vw);
  min-height: 280px;
  margin-top: -122px;
  padding-top: 4px;
  text-align: center;
  animation: keeply-splash-arrive 740ms ease-out both;
}

.splash-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(16, 42, 30, 0.2);
}

.splash-title {
  color: var(--keeply-green);
  font-size: clamp(38px, 12vw, 58px);
  line-height: 0.95;
}

.splash-payoff {
  max-width: 250px;
  color: #42544a;
  font-size: 14px;
  line-height: 1.25;
}

.app-view-hidden {
  display: none !important;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 60;
  width: min(680px, calc(100% - 24px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(207, 222, 213, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 50px rgba(20, 42, 29, 0.16);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-height: 48px;
  padding: 8px 6px;
  border-radius: 16px;
  background: transparent;
  color: #244331;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  font-size: 11px;
}

.bottom-nav button.active {
  background: var(--keeply-green);
  color: #ffffff;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav span {
  line-height: 1;
}

.app-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: end;
  background: rgba(13, 24, 17, 0.22);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.app-menu.is-open {
  opacity: 1;
  visibility: visible;
}

.app-menu-panel {
  width: min(360px, calc(100% - 28px));
  height: 100%;
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 12px;
  background: #fbfdfb;
  box-shadow: -20px 0 50px rgba(20, 42, 29, 0.16);
}

.app-menu-panel button:not(.icon-button) {
  min-height: 52px;
  text-align: left;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
}

.topbar p,
.muted {
  color: #5d6b62;
}

.status {
  border: 1px solid #bac8bf;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.online {
  background: #dff5df;
  color: #245b2d;
}

.offline {
  background: #ffe6df;
  color: #87311f;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

body:not(.is-authenticated) .grid {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body:not(.is-authenticated) #home-dashboard,
body.is-authenticated #auth-form {
  display: none !important;
}

.home-dashboard {
  grid-column: 1 / -1;
  display: grid;
  gap: 22px;
  padding: 24px;
}

.home-family-id {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: -6px 0 10px;
  color: #53645a;
  font-size: 13px;
  text-align: center;
}

.home-family-id[hidden],
body:not(.is-authenticated) .home-family-id {
  display: none !important;
}

.home-family-id span {
  color: var(--keeply-gold);
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-family-id strong {
  color: var(--keeply-green);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.home-app-version {
  grid-column: 1 / -1;
  margin: -4px 0 16px;
  text-align: center;
  color: rgba(11, 48, 35, 0.56);
  font-size: 0.86rem;
}

body:not(.is-authenticated) .home-app-version {
  display: none;
}

.first-load-page {
  grid-column: 1 / -1;
}

.home-welcome {
  display: grid;
  gap: 8px;
  max-width: 760px;
}

.home-eyebrow {
  color: var(--keeply-gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-welcome h2 {
  color: var(--keeply-green);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
}

.home-welcome p {
  color: #42544a;
  font-size: 17px;
  line-height: 1.45;
}

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

.home-actions-grouped {
  grid-template-columns: 1fr;
  gap: 18px;
}

.home-action-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(197, 161, 90, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.42), rgba(255, 255, 255, 0.18)),
    rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.home-action-group-heading {
  display: grid;
  gap: 3px;
}

.home-action-group-heading strong {
  color: var(--keeply-green);
  font-size: 1.05rem;
  line-height: 1.1;
}

.home-action-group-heading span {
  color: #53645a;
  font-size: 0.9rem;
  line-height: 1.3;
}

.home-action-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-action-group-start .home-action-group-grid,
.home-action-group-single .home-action-group-grid {
  grid-template-columns: minmax(0, 1fr);
}

.home-action-group-start .home-icon-tile {
  min-height: 116px;
  background:
    radial-gradient(circle at 50% 16%, rgba(197, 161, 90, 0.26), transparent 44%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.82), rgba(255, 248, 235, 0.5)),
    rgba(255, 255, 255, 0.36);
  border-color: rgba(197, 161, 90, 0.42);
}

.home-action-group-start .home-icon-tile span {
  font-size: 1.15rem;
}

.home-actions button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  min-height: 98px;
  padding: 12px 8px;
  border: 1px solid rgba(197, 161, 90, 0.28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 18%, rgba(197, 161, 90, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.64), rgba(255, 248, 235, 0.28)),
    rgba(255, 255, 255, 0.18);
  color: var(--keeply-green);
  text-align: center;
  box-shadow:
    0 16px 38px rgba(16, 42, 30, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.home-actions button:hover:not(:disabled) {
  background:
    radial-gradient(circle at 50% 18%, rgba(197, 161, 90, 0.24), transparent 42%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.78), rgba(255, 248, 235, 0.42)),
    rgba(255, 255, 255, 0.28);
  border-color: rgba(197, 161, 90, 0.44);
  color: var(--keeply-green-hover);
  transform: translateY(-2px);
  box-shadow:
    0 22px 48px rgba(16, 42, 30, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.home-icon-tile svg {
  width: 48px;
  height: 48px;
  padding: 6px;
  overflow: visible;
  color: var(--keeply-gold);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 18px rgba(16, 42, 30, 0.12));
}

.home-actions span {
  font-size: 16px;
  font-weight: 800;
}

.home-actions small {
  color: #53645a;
  font-size: 14px;
  line-height: 1.35;
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.58), rgba(255, 248, 235, 0.38)),
    rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(197, 161, 90, 0.24);
  border-radius: 20px;
  padding: 16px;
  box-shadow:
    0 24px 64px rgba(16, 42, 30, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
  align-self: start;
}

.auth-panel {
  max-width: 420px;
  gap: 18px;
}

body:not(.is-authenticated) .auth-panel {
  position: relative;
  width: min(430px, 100%);
  max-width: 430px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
  overflow: visible;
}

body:not(.is-authenticated) #auth-form.panel.auth-panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body:not(.is-authenticated) #auth-result:empty {
  display: none;
}

.auth-alert {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(191, 159, 100, 0.55);
  border-radius: 14px;
  background: rgba(255, 247, 225, 0.88);
  color: #6e4511;
  box-shadow: 0 14px 34px rgba(17, 53, 38, 0.1);
}

.auth-alert:empty {
  display: none;
}

body:not(.is-authenticated) .auth-panel::before {
  content: none;
}

body:not(.is-authenticated) .auth-panel::after {
  content: none;
}

.auth-card {
  display: grid;
  gap: 12px;
}

body:not(.is-authenticated) .auth-card {
  position: relative;
  padding: 22px;
  border: 1px solid rgba(197, 161, 90, 0.24);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.36), rgba(255, 248, 235, 0.18)),
    rgba(255, 255, 255, 0.12);
  box-shadow:
    0 24px 64px rgba(16, 42, 30, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.terms-consent {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: #34493c;
  line-height: 1.35;
}

.terms-consent input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin-top: 2px;
}

.terms-consent .link-button {
  font-size: inherit;
  vertical-align: baseline;
}

.terms-consent-alert {
  animation: keeply-consent-pulse 900ms ease-in-out 2;
}

.terms-consent-alert span {
  color: #7b241c;
}

.terms-consent-alert input {
  outline: 3px solid rgba(197, 161, 90, 0.55);
  outline-offset: 3px;
}

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

.auth-switch {
  margin: 2px 0 0;
  color: #4d5d52;
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.social-auth {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.social-auth[hidden] {
  display: none;
}

.social-auth > span {
  display: grid;
  grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr);
  align-items: center;
  width: 100%;
  gap: 10px;
  color: rgba(11, 48, 35, 0.62);
  font-size: 0.9rem;
}

.social-auth > span::before,
.social-auth > span::after {
  content: "";
  height: 1px;
  background: rgba(191, 159, 100, 0.32);
}

.google-auth-button {
  min-height: 44px;
}

.remember-option {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: #34493c;
  line-height: 1;
}

.remember-option input {
  width: 18px;
  min-height: 18px;
  height: 18px;
}

.link-button {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--keeply-green);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover:not(:disabled) {
  background: transparent;
  color: var(--keeply-green-hover);
}

.legal-footer {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin: 10px 0 0;
  color: #526158;
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.legal-footer .app-version {
  margin-bottom: 8px;
  color: rgba(11, 48, 35, 0.74);
  font-weight: 700;
}

.policy-links {
  display: inline-flex !important;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.policy-links a {
  color: var(--keeply-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body:not(.is-authenticated) .auth-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(197, 161, 90, 0.18);
  border-radius: 14px;
  pointer-events: none;
}

body:not(.is-authenticated) .auth-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(197, 161, 90, 0.86), transparent);
}

.auth-section {
  display: grid;
  gap: 12px;
}

.auth-section > strong {
  font-size: 20px;
  color: #102219;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: #6d7a71;
  font-size: 12px;
}

body:not(.is-authenticated) .auth-divider {
  margin: 2px 4px;
  color: #536156;
}

body:not(.is-authenticated) .auth-divider span {
  padding: 4px 10px;
  border: 1px solid rgba(197, 161, 90, 0.25);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.72);
  box-shadow: 0 8px 22px rgba(16, 42, 30, 0.08);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: #dfe8e2;
}

.register-section {
  padding-top: 2px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #425147;
}

input,
select,
button {
  width: 100%;
  min-height: 40px;
  border-radius: 6px;
  font: inherit;
}

input,
select {
  border: 1px solid #c9d5cd;
  padding: 8px 10px;
  background: #fbfdfb;
}

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

.compact-form {
  gap: 16px;
}

input[type="checkbox"] {
  accent-color: var(--keeply-green);
}

button {
  border: 0;
  background: var(--keeply-green);
  color: white;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 44px;
}

button:hover:not(:disabled) {
  background: var(--keeply-green-hover);
}

.danger-button {
  background: #9f2f2f;
}

.danger-button:hover {
  background: #842727;
}

.compact-action {
  width: auto;
  min-height: 34px;
  margin-top: 8px;
  padding: 6px 10px;
}

button:disabled {
  background: #96aa9d;
  cursor: not-allowed;
}

#profile-panel .compact-form {
  margin-bottom: 18px;
}

#save-profile {
  margin-top: 4px;
}

.profile-billing-panel,
.profile-danger-panel,
.profile-legal-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(191, 159, 100, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.78), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.34);
}

.profile-danger-panel {
  border-color: rgba(121, 35, 20, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 249, 242, 0.82), rgba(255, 255, 255, 0.38)),
    rgba(255, 248, 238, 0.34);
}

.profile-danger-panel p {
  margin: 0;
  color: #526158;
  line-height: 1.35;
}

.profile-danger-panel .danger-button {
  justify-self: start;
}

.legal-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.legal-doc-card {
  display: grid;
  gap: 7px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(191, 159, 100, 0.24);
  border-radius: 16px;
  background: rgba(255, 252, 244, 0.52);
  color: #17231b;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.legal-doc-card:hover {
  border-color: rgba(197, 161, 90, 0.48);
  background: rgba(255, 250, 239, 0.72);
}

.legal-doc-card strong {
  color: var(--keeply-green);
  font-size: 1rem;
  line-height: 1.1;
}

.legal-doc-card span {
  color: #526158;
  font-size: 0.88rem;
  line-height: 1.28;
}

@media (max-width: 760px) {
  .legal-doc-grid {
    grid-template-columns: 1fr;
  }

  .legal-doc-card {
    min-height: auto;
  }
}

.profile-security-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(191, 159, 100, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.78), rgba(255, 255, 255, 0.42)),
    rgba(255, 255, 255, 0.34);
}

.mfa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mfa-actions button {
  flex: 1 1 150px;
}

.mfa-setup-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(191, 159, 100, 0.22);
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.48);
}

.mfa-setup-panel code,
.mfa-recovery-codes code {
  display: inline-block;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(16, 42, 30, 0.08);
  color: var(--keeply-green);
  font-weight: 800;
  word-break: break-all;
}

.mfa-recovery-codes {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(16, 42, 30, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
}

.mfa-recovery-codes ul {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding-left: 18px;
}

.section-header-compact {
  margin-bottom: 0;
}

.section-header-compact h3 {
  margin: 0;
}

.invoice-list {
  display: grid;
  gap: 10px;
}

.profile-logout {
  margin-top: 18px;
  width: 100%;
}

@keyframes keeply-login-grid {
  from {
    background-position: 0% 0%, 0% 0%, 0 0, 0 0;
  }

  to {
    background-position: 90% 40%, -70% 60%, 190px 120px, -180px 120px;
  }
}

@keyframes keeply-login-light {
  from {
    background-position: 0% 0%, 0% 0%, 0 0;
    opacity: 0.85;
  }

  to {
    background-position: 70% 44%, 42% 20%, 0 0;
    opacity: 1;
  }
}

@keyframes keeply-consent-pulse {
  0%,
  100% {
    transform: scale(1);
    filter: none;
  }

  38% {
    transform: scale(1.025);
    filter: drop-shadow(0 0 12px rgba(197, 161, 90, 0.52));
  }

  70% {
    transform: scale(0.995);
  }
}

@keyframes keeply-splash-arrive {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.actions button {
  min-height: 54px;
}

#product-form button,
#lot-form button,
#consume-form button {
  min-height: 50px;
}

.product-photo-field {
  display: grid;
  gap: 10px;
}

.product-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.product-photo-preview {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(191, 158, 96, 0.28);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.74);
}

.product-photo-preview[hidden] {
  display: none;
}

.product-photo-preview img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid #d9e4dd;
  border-radius: 8px;
  background: #fff;
}

.product-photo-preview figcaption {
  color: #56665d;
  line-height: 1.25;
}

#auth-result,
#product-result,
#lot-result,
#consume-result {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

#consume-form {
  gap: 14px;
}

.context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

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

.inline-form {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 12px;
}

.context-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.context-card {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.context-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.geo-chip {
  border: 1px solid rgba(191, 158, 96, 0.4);
  border-radius: 999px;
  color: #0b3728;
  background: rgba(214, 185, 122, 0.18);
  font-size: 0.82rem;
  padding: 5px 9px;
  text-align: right;
}

.context-home-editor {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.context-home-editor button {
  min-height: 44px;
}

@media (max-width: 760px) {
  .context-card-header,
  .context-home-editor {
    grid-template-columns: 1fr;
  }

  .context-card-header {
    display: grid;
  }

  .geo-chip {
    text-align: left;
    width: fit-content;
  }
}

.member-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.member-card {
  grid-template-columns: minmax(0, 1fr) 150px;
  align-items: end;
}

.member-card p {
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.location-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.location-tags .location-tag {
  position: static;
}

.inventory-panel {
  margin-top: 14px;
}

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

.section-header button {
  width: auto;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.header-actions #first-load-stop,
.header-actions #scan-mode-stop {
  flex: 0 0 100%;
  width: fit-content;
  min-width: 120px;
}

.scan-mode-panel .header-actions {
  flex-wrap: wrap;
}

.scan-mode-panel .header-actions button {
  min-width: 96px;
}

.scan-mode {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.scan-mode[hidden] {
  display: none;
}

.scan-mode video {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #101813;
  border-radius: 8px;
  object-fit: cover;
}

.scan-mode-log {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.scan-log-row {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdfb;
}

.notification-danger {
  border-color: #f2b8b5;
  background: #fff5f5;
}

.notification-warning {
  border-color: #f1d48b;
  background: #fff9e8;
}

.notification-info {
  border-color: #bad6ff;
  background: #f4f8ff;
}

.inventory-controls {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.initial-stock-box {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 14px;
  display: grid;
  gap: 12px;
  background: #fbfdfb;
}

.initial-stock-fields {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(120px, 1fr));
  gap: 10px;
  align-items: end;
}

.initial-stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.initial-stock-actions button {
  width: auto;
  min-width: 120px;
}

.initial-stock-actions #initial-stock-stop {
  flex: 0 0 100%;
  width: fit-content;
}

.compact-scanner {
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
}

.first-load-box {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  display: grid;
  gap: 14px;
  background: transparent;
}

.first-load-box h2,
.first-load-box h3 {
  margin: 0;
  color: var(--keeply-green);
  font-size: clamp(22px, 4vw, 34px);
  white-space: nowrap;
}

.first-load-header {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.section-description {
  margin: 0;
  color: #42544a;
  font-size: 15px;
  line-height: 1.35;
}

.first-load-header .header-actions {
  margin-top: 4px;
  width: 100%;
}

.first-load-header .header-actions button {
  width: auto;
  min-width: min(100%, 260px);
}

.first-load-draft {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 72px minmax(180px, 1.4fr) repeat(3, minmax(120px, 1fr)) minmax(140px, auto);
  gap: 12px;
  align-items: end;
  background: #ffffff;
}

.first-load-draft[hidden] {
  display: none;
}

.first-load-draft img {
  width: 72px;
  height: 72px;
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  object-fit: contain;
  background: #f8fbf9;
}

.first-load-info {
  display: grid;
  gap: 4px;
  align-self: center;
}

.first-load-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.first-load-summary span {
  border: 1px solid #d9e2dc;
  border-radius: 999px;
  padding: 8px 12px;
  background: #ffffff;
}

.first-load-inventory {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.first-load-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(197, 161, 90, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.24);
}

.first-load-item-body {
  min-width: 0;
}

.first-load-item img,
.first-load-item-monogram {
  width: 48px;
  height: 48px;
  border: 1px solid #d9e4dd;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.first-load-item-monogram {
  display: grid;
  place-items: center;
  color: var(--keeply-green);
  font-size: 22px;
  font-weight: 800;
}

.first-load-item strong,
.first-load-item span {
  display: block;
}

.first-load-item span {
  margin-top: 3px;
  color: #42544a;
  font-size: 13px;
}

.first-load-lot-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.first-load-lot-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(197, 161, 90, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
}

.first-load-delete {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(197, 161, 90, 0.36);
  background: rgba(255, 248, 235, 0.72);
  color: var(--keeply-green);
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.first-load-delete:hover {
  background: var(--keeply-green);
  color: #fff9ec;
}

.inventory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.lot {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 12px;
  position: relative;
  display: grid;
  gap: 6px;
}

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

.item-actions button {
  min-height: 34px;
  font-size: 13px;
  padding: 6px 8px;
}

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

.lot strong {
  font-size: 16px;
}

.total-quantity {
  font-weight: 800;
}

.lot-row {
  border-top: 1px solid #e4ece7;
  display: grid;
  gap: 4px;
  padding-top: 8px;
}

.location-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  position: absolute;
  right: 12px;
  top: 12px;
}

.tag-fridge {
  background: #dff4ff;
  color: #075979;
}

.tag-freezer {
  background: #e8ecff;
  color: #273f9b;
}

.tag-pantry {
  background: #fff0c7;
  color: #745000;
}

.tag-cellar {
  background: #efe2d0;
  color: #68451f;
}

.tag-garage {
  background: #e5e7eb;
  color: #374151;
}

.tag-other {
  background: #e2f6e8;
  color: #24623a;
}

.category-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  background: #eef2ff;
  color: #38408a;
}

.category-search {
  display: grid;
  gap: 8px;
  margin: 14px 0 12px;
}

.category-card {
  display: grid;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:active {
  transform: scale(0.99);
  border-color: rgba(197, 161, 90, 0.52);
  box-shadow: 0 10px 24px rgba(12, 41, 29, 0.1);
}

.category-label {
  width: fit-content;
}

.category-edit-hint {
  color: #68776e;
  font-size: 13px;
}

.category-card-editing {
  gap: 12px;
  cursor: default;
}

.category-edit-field {
  display: grid;
  gap: 8px;
}

.category-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.empty {
  color: #66756b;
  padding: 20px 0;
}

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

  .inventory-category-mode {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    display: grid;
  }

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

  .grid,
  .inventory {
    grid-template-columns: 1fr;
  }

  .inventory-category-mode {
    grid-template-columns: 1fr;
  }

  .inventory-category-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .inventory-category-card small {
    grid-column: auto;
  }

  .low-stock-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .low-stock-row button {
    grid-column: 2;
    justify-self: start;
  }

  .inventory-category-heading {
    grid-template-columns: 1fr;
  }

  .shopping-row {
    display: grid;
  }

  .shopping-row-actions {
    width: 100%;
  }

  .shopping-row-actions button {
    width: 100%;
  }

  .shopping-item-actions {
    grid-template-columns: 1fr;
  }
}

.inventory {
  align-items: start;
}

.lot {
  align-self: start;
  gap: 12px;
  padding: 14px;
}

.lot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}

.inventory-inline-image {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid #d9e4dd;
  border-radius: 8px;
  background: #fff;
}

.inventory-image-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.inventory-image-button .inventory-inline-image {
  display: block;
}

.inventory-image-placeholder {
  display: grid;
  place-items: center;
  color: #bf9e60;
  background: rgba(255, 252, 244, 0.9);
}

.inventory-image-placeholder svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-image-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 47, 34, 0.42);
}

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

.product-image-modal-panel {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(92vw, 420px);
  padding: 18px;
  border-radius: 8px;
  background: #fffdf7;
  box-shadow: 0 18px 45px rgba(8, 47, 34, 0.24);
}

.product-image-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
}

.product-image-modal-panel img {
  width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border: 1px solid #d9e4dd;
  border-radius: 8px;
  background: #fff;
}

.product-image-modal-actions,
.product-image-change-choices {
  display: grid;
  gap: 8px;
}

.inventory-category-mode {
  grid-template-columns: 1fr;
}

.inventory-category-card {
  appearance: none;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 14px;
  text-align: left;
  border: 1px solid rgba(191, 158, 96, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.86), rgba(255, 248, 235, 0.56)),
    rgba(255, 255, 255, 0.46);
  color: #0b2f22;
  box-shadow: 0 14px 30px rgba(17, 53, 38, 0.07);
}

.inventory-category-image {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  object-fit: contain;
  border: 1px solid rgba(191, 158, 96, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #bf9e60;
}

.inventory-category-image svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inventory-category-text {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.inventory-category-card strong {
  color: #0b2f22;
  line-height: 1.14;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-category-card small {
  color: #53665b;
  white-space: nowrap;
}

.inventory-category-count {
  color: #53665b;
  white-space: nowrap;
}

.inventory-category-card:hover,
.inventory-category-card:focus-visible,
.inventory-category-card.active,
.inventory-category-card[aria-selected="true"] {
  background: #092f22;
  border-color: rgba(191, 158, 96, 0.55);
}

.inventory-category-card:hover strong,
.inventory-category-card:focus-visible strong,
.inventory-category-card.active strong,
.inventory-category-card[aria-selected="true"] strong {
  color: #fff8e7;
}

.inventory-category-card:hover small,
.inventory-category-card:hover .inventory-category-count,
.inventory-category-card:focus-visible small,
.inventory-category-card:focus-visible .inventory-category-count,
.inventory-category-card.active small,
.inventory-category-card.active .inventory-category-count,
.inventory-category-card[aria-selected="true"] small,
.inventory-category-card[aria-selected="true"] .inventory-category-count {
  color: rgba(255, 248, 231, 0.82);
}

.low-stock-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(191, 158, 96, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.82), rgba(255, 248, 235, 0.54)),
    rgba(255, 255, 255, 0.46);
  box-shadow: 0 10px 22px rgba(17, 53, 38, 0.06);
}

.low-stock-row strong {
  min-width: 0;
  color: #0b2f22;
  line-height: 1.18;
}

.low-stock-row button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

.inventory-category-heading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 4px;
}

.inventory-category-heading .ghost-button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
}

.inventory-category-heading strong {
  color: #0b2f22;
}

.lot-header strong {
  font-size: 16px;
  padding-top: 2px;
  margin-right: auto;
}

.lot-header .location-tag {
  position: static;
  flex: 0 0 auto;
}

.lot-row {
  gap: 6px;
  padding-top: 12px;
}

.lot-header + .lot-row {
  border-top: 0;
  padding-top: 0;
}

.consume-button {
  width: 100%;
  height: 50px;
  min-height: 50px;
  align-self: end;
}
.inventory-delete-x {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border-radius: 999px;
  background: rgba(159, 47, 47, 0.1);
  border: 1px solid rgba(159, 47, 47, 0.28);
  color: #8f2727;
  font-size: 20px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.inventory-delete-x:hover:not(:disabled),
.inventory-delete-x:focus-visible {
  background: #9f2f2f;
  color: #fff8e7;
}

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

.inventory-detail-actions.item-actions-single {
  grid-template-columns: 1fr;
}

.inventory-delete-button {
  min-height: 44px;
}

.inventory-detail-actions .inventory-delete-button:last-child:nth-child(3) {
  grid-column: 1 / -1;
}


.preference-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: end;
}

.preference-row button {
  min-height: 40px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-row {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.notification-card {
  border: 1px solid #d9e2dc;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
}

.notification-card p {
  grid-column: 1 / -1;
  line-height: 1.45;
}

.notification-card button {
  min-height: 40px;
  width: auto;
  justify-self: end;
}

.notification-card.is-read {
  opacity: 0.68;
}

.notification-priority {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4ef;
  color: #405047;
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 16px;
  border: 1px solid rgba(197, 161, 90, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.72), rgba(255, 248, 235, 0.38)),
    rgba(255, 255, 255, 0.28);
  box-shadow:
    0 14px 34px rgba(16, 42, 30, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.stat-card.is-clickable {
  cursor: pointer;
}

.stat-card.is-clickable:hover,
.stat-card.is-clickable:focus-visible {
  border-color: rgba(197, 161, 90, 0.48);
  transform: translateY(-2px);
  box-shadow:
    0 20px 44px rgba(16, 42, 30, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
  outline: none;
}

.stat-card-wide {
  grid-column: span 3;
  min-height: auto;
}

.stat-card span {
  color: #5d6b62;
  font-size: 13px;
}

.stat-card strong {
  font-size: 24px;
  color: var(--keeply-green);
  line-height: 1.08;
}

.stat-card small {
  color: var(--keeply-gold);
  font-size: 12px;
  font-weight: 800;
}

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

.stat-breakdown-row {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(197, 161, 90, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  color: #10251b;
  text-align: left;
}

.stat-breakdown-row strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.stat-breakdown-row span {
  color: #5d6b62;
  font-size: 13px;
}

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

.savings-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(191, 158, 96, 0.24);
  border-radius: 22px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.86), rgba(255, 248, 235, 0.58)),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 38px rgba(17, 53, 38, 0.08);
}

.savings-card.has-saving {
  border-color: rgba(13, 84, 55, 0.34);
  box-shadow: 0 22px 46px rgba(13, 84, 55, 0.12);
}

.savings-product {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.savings-product img,
.savings-placeholder {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  border: 1px solid rgba(191, 158, 96, 0.26);
  background: rgba(255, 252, 244, 0.8);
  object-fit: contain;
}

.savings-placeholder {
  display: grid;
  place-items: center;
  color: #b28b45;
  font-weight: 900;
  font-size: 1.35rem;
}

.savings-product strong {
  display: block;
  color: #0b2f22;
  font-size: 1.05rem;
}

.savings-product span,
.savings-product small,
.savings-metrics small,
.savings-zone {
  color: #53665b;
}

.savings-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.savings-metrics > div {
  display: grid;
  gap: 4px;
  min-height: 92px;
  border: 1px solid rgba(207, 222, 213, 0.74);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.savings-metrics span {
  color: #52675c;
  font-size: 0.86rem;
}

.savings-metrics strong {
  color: #0b2f22;
  font-size: 1.18rem;
}

.saving-value strong {
  color: #0d5437;
}

.savings-zone {
  margin: 0;
  font-size: 0.92rem;
}

.flyer-status,
.flyer-supplier-grid,
.flyer-source-grid,
.flyer-offers {
  display: grid;
  gap: 12px;
}

.flyer-page-header {
  display: block;
  margin-bottom: 12px;
}

.flyer-page-header h2 {
  margin: 0;
  white-space: nowrap;
}

.flyer-page-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.flyer-page-actions button {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: clamp(0.92rem, 3.6vw, 1.02rem);
  line-height: 1.1;
}

.flyer-source-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.flyer-source-form button {
  align-self: end;
}

.flyer-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 4px 0 14px;
}

.flyer-status > div,
.flyer-supplier-card,
.flyer-source-grid article,
.flyer-offer-card {
  border: 1px solid rgba(191, 158, 96, 0.24);
  border-radius: 18px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.82), rgba(255, 248, 235, 0.52)),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 16px 34px rgba(17, 53, 38, 0.07);
}

.flyer-status span,
.flyer-supplier-card span,
.flyer-supplier-card small,
.flyer-source-grid span,
.flyer-source-grid small,
.flyer-offer-card span,
.flyer-offer-card small {
  color: #53665b;
}

.flyer-status strong,
.flyer-supplier-card strong,
.flyer-source-grid strong,
.flyer-offer-card strong {
  color: #0b2f22;
}

.flyer-status small {
  display: block;
  margin-top: 4px;
  line-height: 1.25;
}

.flyer-supplier-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0;
}

.flyer-supplier-card {
  appearance: none;
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 12px;
  align-items: center;
  min-height: 126px;
  cursor: pointer;
}

.flyer-supplier-card > div,
.flyer-category-card > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.flyer-supplier-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  justify-self: end;
  align-self: center;
}

.flyer-supplier-logo-penny {
  padding: 4px;
}

.flyer-supplier-logo-lidl {
  padding: 3px;
}

.flyer-supplier-logo-ao,
.flyer-supplier-logo-todis,
.flyer-supplier-logo-despar,
.flyer-supplier-logo-famila {
  width: 96px;
  height: 72px;
}

.flyer-supplier-logo-deco {
  padding: 3px;
}

.flyer-supplier-logo-fallback {
  max-width: 72px;
}

.flyer-supplier-card.is-active {
  border-color: rgba(191, 158, 96, 0.68);
  background:
    linear-gradient(145deg, rgba(13, 55, 38, 0.92), rgba(20, 79, 54, 0.86)),
    rgba(13, 55, 38, 0.9);
}

.flyer-supplier-card.is-active span,
.flyer-supplier-card.is-active strong,
.flyer-supplier-card.is-active small {
  color: #fff9ea;
}

.flyer-clear-store {
  margin-bottom: 14px;
}

.flyer-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.flyer-category-card {
  appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 12px;
  text-align: left;
  border: 1px solid rgba(191, 158, 96, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.86), rgba(255, 248, 235, 0.56)),
    rgba(255, 255, 255, 0.46);
  color: #0b2f22;
  box-shadow: 0 14px 30px rgba(17, 53, 38, 0.07);
}

.flyer-category-card span,
.flyer-category-card small {
  color: #53665b;
}

.flyer-category-card strong {
  color: #0b2f22;
  line-height: 1.12;
}

.flyer-category-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 10px 0 14px;
}

.flyer-category-heading .ghost-button {
  width: auto;
  min-height: 38px;
  padding: 8px 12px;
}

.flyer-category-heading strong {
  color: #0b2f22;
}

.flyer-category-heading span {
  color: #53665b;
}

.flyer-sources h3 {
  margin: 8px 0 10px;
  color: #0b2f22;
}

.flyer-source-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.flyer-source-grid article {
  display: grid;
  gap: 5px;
}

.flyer-offer-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 104px;
}

.flyer-offer-image {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(191, 158, 96, 0.22);
  padding: 7px;
}

.flyer-offer-image-empty {
  display: grid;
  place-items: center;
  color: #b28a42;
}

.flyer-offer-image-empty svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flyer-offer-copy {
  min-width: 0;
}

.flyer-offer-copy strong {
  font-size: 1.08rem;
  line-height: 1.15;
}

.flyer-offer-price {
  min-width: 118px;
}

.flyer-offer-price button,
.flyer-shopping-item button {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.88rem;
}

.flyer-offer-price button.is-added {
  background: #bf9e60;
  color: #fff9ea;
  cursor: default;
  opacity: 1;
}

.flyer-shopping-list {
  margin-top: 18px;
}

.flyer-shopping-items {
  display: grid;
  gap: 10px;
}

.flyer-shopping-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 74px auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(191, 158, 96, 0.24);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 252, 244, 0.68);
}

.flyer-shopping-item img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.flyer-shopping-item input {
  min-height: 38px;
  padding: 7px 8px;
}

.flyer-offer-card > div {
  display: grid;
  gap: 4px;
}

.flyer-offer-card > div:last-child {
  text-align: right;
}

.flyer-offer-card > div:last-child strong {
  font-size: 1.28rem;
  color: #0d5437;
}

@media (max-width: 980px) {
  .history-row {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .stat-card-wide {
    grid-column: span 2;
  }

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

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

  .member-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .savings-metrics {
    grid-template-columns: 1fr;
  }

  .flyer-status,
  .flyer-supplier-grid,
  .flyer-source-grid,
  .flyer-source-form {
    grid-template-columns: 1fr;
  }

  .flyer-page-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .flyer-category-grid {
    grid-template-columns: 1fr;
  }

  .flyer-supplier-card {
    grid-template-columns: minmax(0, 1fr) 78px;
  }

  .flyer-category-card {
    grid-template-columns: minmax(0, 1fr) 76px;
  }

  .flyer-supplier-logo {
    width: 72px;
    height: 72px;
  }

  .flyer-category-heading {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .flyer-offer-card {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .flyer-offer-image {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .flyer-offer-price {
    min-width: 86px;
  }

  .flyer-offer-price button {
    padding: 7px 8px;
    font-size: 0.74rem;
  }

  .flyer-shopping-item {
    grid-template-columns: 42px minmax(0, 1fr) 64px;
  }

  .flyer-shopping-item span,
  .flyer-shopping-item button {
    grid-column: 2 / -1;
  }

  .flyer-offer-card > div:last-child {
    text-align: left;
  }

  .stat-card-wide {
    grid-column: span 1;
  }

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

  .context-grid,
  .context-list {
    grid-template-columns: 1fr;
  }

  .member-list {
    grid-template-columns: 1fr;
  }

  .ocr-inline {
    grid-template-columns: 1fr;
  }

  .scan-mode {
    grid-template-columns: 1fr;
  }

  .scan-mode-panel .header-actions {
    width: 100%;
  }

  .scan-mode-panel .header-actions button {
    flex: 1 1 120px;
  }
}

.compact-lot {
  gap: 10px;
}

.expiry-groups {
  display: grid;
  gap: 14px;
}

.expiry-urgency-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(197, 161, 90, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.74), rgba(255, 248, 235, 0.42)),
    rgba(255, 255, 255, 0.36);
  box-shadow: 0 12px 30px rgba(12, 41, 29, 0.07);
}

.expiry-urgency-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.expiry-urgency-heading strong {
  font-size: 18px;
  color: #10251b;
}

.expiry-urgency-heading span {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}

.expiry-urgency-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.urgency-critical {
  border-color: rgba(153, 27, 27, 0.24);
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.78), rgba(255, 241, 242, 0.5));
}

.urgency-critical .expiry-urgency-heading span {
  background: #991b1b;
}

.urgency-warning {
  border-color: rgba(217, 119, 6, 0.25);
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.78), rgba(255, 247, 237, 0.45));
}

.urgency-warning .expiry-urgency-heading span {
  background: #b45309;
}

.urgency-soft {
  border-color: rgba(31, 122, 70, 0.22);
  background: linear-gradient(180deg, rgba(240, 253, 244, 0.74), rgba(255, 252, 244, 0.42));
}

.urgency-soft .expiry-urgency-heading span {
  background: var(--keeply-green);
}

.expiry-lot-card {
  border-color: rgba(197, 161, 90, 0.22);
  background: rgba(255, 255, 255, 0.66);
}

.expiry-lot-card.is-expired {
  border-color: rgba(153, 27, 27, 0.26);
  background: linear-gradient(180deg, rgba(255, 247, 247, 0.78), rgba(255, 255, 255, 0.56));
}

.expired-panel {
  border-color: rgba(153, 27, 27, 0.18);
}

.expiry-mini-thumb {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
  border: 1px solid rgba(197, 161, 90, 0.22);
  border-radius: 10px;
  background: #fff;
}

@media (max-width: 680px) {
  .inventory-controls {
    grid-template-columns: 1fr;
  }

  .initial-stock-fields {
    grid-template-columns: 1fr;
  }

  .initial-stock-actions button {
    flex: 1 1 160px;
  }

  .first-load-draft {
    grid-template-columns: 64px 1fr;
  }

  .first-load-draft label,
  .first-load-draft button {
    grid-column: 1 / -1;
  }

  .first-load-draft img {
    width: 64px;
    height: 64px;
  }
}
.share-layout {
  display: grid;
  gap: 12px;
}

#shopping-share-text {
  min-height: 150px;
  resize: vertical;
  line-height: 1.45;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-actions button {
  min-width: 170px;
  min-height: 48px;
}

.shopping-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.shopping-tab {
  min-height: 42px;
  padding: 0 14px;
  background: #f8faf8;
  color: #123127;
  border: 1px solid #cfded4;
}

.shopping-tab.is-active {
  background: var(--keeply-green);
  color: #fff;
  border-color: var(--keeply-green);
}

.shopping-overview {
  display: grid;
  gap: 10px;
}

.shopping-item-card {
  display: grid;
  gap: 14px;
  align-self: start;
  padding: 14px;
  border: 1px solid rgba(197, 161, 90, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.72), rgba(255, 248, 235, 0.42)),
    rgba(255, 255, 255, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 12px 30px rgba(12, 41, 29, 0.08);
}

.shopping-item-main,
.shopping-row-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.shopping-item-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(197, 161, 90, 0.34);
  border-radius: 14px;
  background: rgba(255, 251, 241, 0.74);
  color: var(--keeply-gold);
}

.shopping-item-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shopping-item-icon.is-postponed {
  color: #8b6b1f;
  background: rgba(255, 241, 202, 0.82);
}

.shopping-item-icon.is-muted {
  color: #6b756f;
  background: rgba(239, 243, 240, 0.82);
}

.shopping-item-card strong,
.shopping-row-main strong {
  display: block;
  color: #0b2d20;
  font-size: 18px;
  line-height: 1.15;
}

.shopping-item-status,
.shopping-item-quantity {
  display: block;
  color: #5d6d63;
  font-size: 14px;
  line-height: 1.35;
}

.shopping-quantity-field {
  display: grid;
  gap: 7px;
}

.shopping-item-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.shopping-item-actions button {
  min-height: 44px;
  padding-inline: 10px;
}

.shopping-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(197, 161, 90, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.72), rgba(255, 248, 235, 0.42)),
    rgba(255, 255, 255, 0.34);
  box-shadow: 0 12px 30px rgba(12, 41, 29, 0.08);
}

.shopping-row + .shopping-row {
  margin-top: 10px;
}

.shopping-row strong {
  display: block;
  margin-bottom: 6px;
}

.shopping-row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 0;
}

.quantity-edit input {
  width: 82px;
  min-height: 38px;
  padding: 6px 8px;
  text-align: center;
}

.shopping-row {
  min-height: auto;
}

.shopping-row.product-card-with-image,
.shopping-row {
  padding-left: 14px;
}

.shopping-row .product-thumb,
.shopping-row .shopping-product-thumb {
  position: static;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

.shopping-product-placeholder {
  display: grid;
  place-items: center;
  color: var(--keeply-gold);
  background: rgba(255, 251, 241, 0.74);
}

.shopping-product-placeholder svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shopping-quantity-save.is-hidden {
  display: none;
}

.flyer-shopping-overview-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(197, 161, 90, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.72), rgba(255, 248, 235, 0.42)),
    rgba(255, 255, 255, 0.34);
  box-shadow: 0 12px 30px rgba(12, 41, 29, 0.08);
}

.flyer-shopping-overview-card + .flyer-shopping-overview-card {
  margin-top: 12px;
}

.flyer-shopping-overview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.flyer-shopping-overview-head span,
.flyer-shopping-overview-head small {
  display: block;
  color: #5d6d63;
}

.flyer-shopping-overview-items {
  display: grid;
  gap: 8px;
}

.flyer-shopping-overview-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.flyer-shopping-overview-item small {
  color: #5d6d63;
  white-space: nowrap;
}

.budget-panel {
  margin-top: 16px;
  margin-bottom: 16px;
}

.budget-grid {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(100px, 160px) minmax(120px, 180px);
  gap: 12px;
  align-items: end;
}

.budget-meter {
  width: 100%;
  height: 14px;
  margin: 16px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eee8;
}

#budget-meter-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--keeply-green);
  transition: width 180ms ease;
}

#budget-meter-fill.is-warning {
  background: #d97706;
}

#budget-meter-fill.is-over {
  background: #b91c1c;
}

.budget-summary {
  margin: 0 0 12px;
  color: #344b40;
  font-weight: 700;
}

#save-budget {
  min-width: 170px;
  min-height: 48px;
}

.barcode-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0 12px;
}

.barcode-tools button {
  width: min(100%, 260px);
  min-height: 50px;
  padding: 8px 12px;
  font-size: inherit;
  font-weight: 700;
}

.barcode-scanner {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.barcode-scanner video {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border: 1px solid #d4e0d8;
  border-radius: 8px;
  background: #10251b;
}

.product-lookup-tools {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

#product-lookup-button {
  min-height: 42px;
  padding: 0 12px;
}

.product-lookup-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(197, 161, 90, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.68), rgba(255, 248, 235, 0.36)),
    rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.product-lookup-preview:has(#product-lookup-title:empty) {
  grid-template-columns: 1fr;
  justify-items: center;
}

.product-lookup-preview:has(#product-lookup-title:empty) > div:not(.product-lookup-image-shell) {
  display: none;
}

.product-lookup-image-shell {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(197, 161, 90, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 25%, rgba(197, 161, 90, 0.22), transparent 52%),
    rgba(255, 255, 255, 0.52);
}

.product-lookup-preview img,
.product-lookup-image-shell span {
  grid-area: 1 / 1;
}

.product-lookup-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.product-lookup-image-shell span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--keeply-gold);
}

.product-lookup-image-shell svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 16px rgba(197, 161, 90, 0.22));
}

.product-lookup-preview p {
  margin: 4px 0 0;
  color: #52675c;
}

.currency-field {
  display: none !important;
}

.web-search-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.web-search-links a {
  color: #1f7a46;
  font-weight: 800;
}

.inventory-card-with-image {
  position: relative;
  padding-left: 104px;
  min-height: 118px;
}

.inventory-product-image {
  display: none;
}

.product-card-with-image {
  position: relative;
  padding-left: 64px;
  min-height: 64px;
}

.product-thumb {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  object-fit: contain;
  border: 1px solid #d9e4dd;
  border-radius: 8px;
  background: #fff;
}

.shopping-panel .product-card-with-image,
.shopping-row.product-card-with-image {
  padding-left: 48px;
  min-height: 54px;
}

.shopping-panel .product-thumb,
.shopping-row .product-thumb {
  width: 24px;
  height: 24px;
  top: 15px;
  left: 14px;
}

.inline-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.inline-category input {
  min-height: 42px;
}

.inline-category button {
  min-height: 50px;
  padding: 8px 12px;
  font-size: inherit;
  font-weight: 700;
  white-space: nowrap;
}

.pack-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.pack-fields input {
  min-height: 42px;
}

.expiry-panel {
  margin-top: 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border-color: #cfdcd5;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 249, 246, 0.92)),
    radial-gradient(circle at top left, rgba(31, 122, 70, 0.12), transparent 34%);
  box-shadow: 0 18px 40px rgba(28, 52, 39, 0.08);
}

.expiry-panel .section-header h2 {
  font-size: clamp(24px, 2vw, 34px);
  letter-spacing: 0;
  color: #10251b;
}

.expiry-panel .section-header {
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 122, 70, 0.14);
}

.expiry-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.expiry-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(206, 220, 212, 0.95);
  border-left-width: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(17, 38, 27, 0.06);
}

.expiry-thumb {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border: 1px solid #d9e4dd;
  border-radius: 8px;
  background: #fff;
}

.expiry-monogram {
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: #1f7a46;
  background: linear-gradient(145deg, #eef8f2, #ffffff);
}

.expiry-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  line-height: 1.18;
  color: #0d2118;
}

.expiry-item div div {
  margin-top: 3px;
  color: #3e5448;
  font-size: 14px;
  line-height: 1.28;
}

.expiry-item.is-expired {
  border-left-color: #991b1b;
  background: linear-gradient(135deg, #fff, #fff5f5);
}

.expiry-item.is-urgent {
  border-left-color: #dc2626;
  background: linear-gradient(135deg, #fff, #fff7ed);
}

.expiry-item.is-soon {
  border-left-color: #d97706;
  background: linear-gradient(135deg, #fff, #fffbeb);
}

.expiry-item.is-later {
  border-left-color: #1f7a46;
  background: linear-gradient(135deg, #fff, #f0fdf4);
}

@media (max-width: 760px) {
  .home-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .home-actions-grouped {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .home-action-group {
    padding: 10px;
    border-radius: 18px;
  }

  .home-action-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .home-action-group-start .home-action-group-grid,
  .home-action-group-single .home-action-group-grid {
    grid-template-columns: 1fr;
  }

  .home-actions button {
    min-height: 88px;
    padding: 10px 6px;
  }

  .home-icon-tile svg {
    width: 42px;
    height: 42px;
  }

  .home-actions span {
    font-size: 13px;
  }

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

  .inline-category {
    grid-template-columns: 1fr;
  }

  .pack-fields {
    grid-template-columns: 1fr;
  }
}

.shopping-panel {
  margin-top: 16px;
  margin-bottom: 16px;
}

.inventory-panel,
.shopping-panel,
.budget-panel,
.expiry-panel {
  border-color: rgba(197, 161, 90, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.58), rgba(255, 248, 235, 0.38)),
    rgba(255, 255, 255, 0.24);
  box-shadow:
    0 24px 64px rgba(16, 42, 30, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(12px);
}

.shopping-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 420px;
}

.shopping-row-actions button {
  min-height: 40px;
  padding: 0 12px;
}

.empty-state {
  margin: 0;
  color: #52675c;
}

.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
  font-weight: 700;
  color: #344b40;
}

.remember-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.online {
  background: #dff6e8;
  color: #145c34;
  border-color: #9fd7b7;
}

.offline {
  background: #fff0e8;
  color: #9a3412;
  border-color: #f2c7b5;
}

* {
  font-family: "Italiana", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  font-family: "Italiana", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.recipe-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(191, 159, 100, 0.28);
  border-radius: 18px;
  background: rgba(255, 252, 244, 0.74);
  box-shadow: 0 18px 44px rgba(17, 53, 38, 0.1);
  overflow: hidden;
}

.recipe-visual {
  min-height: 170px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(191, 159, 100, 0.18), rgba(16, 58, 41, 0.08));
}

.recipe-visual img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  display: block;
  object-fit: cover;
}

.recipe-image-placeholder {
  height: 100%;
  min-height: 170px;
  display: grid;
  place-items: center;
  color: #bf9f64;
}

.recipe-image-placeholder svg {
  width: 58px;
  height: 58px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recipe-content {
  display: grid;
  gap: 12px;
  align-content: start;
}

.recipe-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recipe-card-head strong {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.1;
  color: #0b2f22;
}

.recipe-card-head span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(11, 47, 34, 0.1);
  color: #0b2f22;
  font-weight: 700;
}

.recipe-card p {
  margin: 0;
  color: rgba(23, 35, 27, 0.82);
}

.recipe-meta,
.recipe-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.recipe-meta span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(191, 159, 100, 0.22);
  font-size: 0.94rem;
}

.recipe-chip-title {
  width: 100%;
  font-weight: 800;
  color: #0b2f22;
}

.recipe-chip {
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.recipe-chip.owned {
  background: rgba(20, 116, 74, 0.12);
  color: #0f5b3d;
}

.recipe-chip.missing {
  background: rgba(191, 159, 100, 0.18);
  color: #725819;
}

.recipe-chip.muted {
  background: rgba(23, 35, 27, 0.08);
  color: rgba(23, 35, 27, 0.72);
}

.recipe-details {
  border-top: 1px solid rgba(191, 159, 100, 0.25);
  padding-top: 10px;
}

.recipe-details summary {
  cursor: pointer;
  color: #0b2f22;
  font-weight: 800;
}

.recipe-detail-body {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.recipe-detail-body ul,
.recipe-detail-body ol {
  margin: 0;
  padding-left: 22px;
}

.recipe-detail-body li {
  margin-bottom: 5px;
}

.recipe-detail-body img,
.recipe-detail-body picture,
.recipe-detail-body figure,
.recipe-detail-body .product-thumb,
.recipe-detail-body .recipe-thumb,
.recipe-detail-body .lot-thumb {
  display: none !important;
}

.recipe-card .product-thumb,
.recipe-card .lot-thumb,
.recipe-card .ingredient-thumb,
.recipe-card .recipe-thumb,
.recipe-card .owned-product-image,
.recipe-card .recipe-owned-image,
.recipe-card .recipe-ingredient-image {
  display: none !important;
}

.current-plan-hero {
  grid-column: 1 / -1;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(191, 159, 100, 0.32);
  background:
    linear-gradient(135deg, rgba(11, 47, 34, 0.94), rgba(20, 68, 48, 0.88)),
    rgba(11, 47, 34, 0.9);
  color: #fff8e8;
  box-shadow: 0 24px 58px rgba(17, 53, 38, 0.18);
}

.current-plan-hero span {
  color: rgba(255, 248, 232, 0.78);
  font-weight: 800;
}

.current-plan-hero strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.current-plan-hero p {
  max-width: 720px;
  margin: 10px 0 0;
}

.profile-plan-status {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.current-plan-hero.is-profile-plan {
  padding: 18px;
  border-radius: 18px;
}

.current-plan-hero.is-profile-plan strong {
  font-size: clamp(1.65rem, 4vw, 2.8rem);
}

.plan-feature-grid,
.pricing-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.plan-feature-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.plan-feature-grid-compact .stat-card {
  min-height: 0;
  padding: 12px;
}

.plan-feature-grid-compact .stat-card span {
  font-size: 0.88rem;
}

.plan-feature-grid-compact .stat-card strong {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
}

.trial-strip {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(191, 159, 100, 0.35);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.9), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 42px rgba(17, 53, 38, 0.08);
}

.trial-strip strong {
  color: #0b3023;
  font-size: 1.2rem;
}

.trial-strip span {
  color: rgba(11, 48, 35, 0.78);
  line-height: 1.35;
}

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

.feature-disabled {
  opacity: 0.62;
}

.pricing-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 360px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(191, 159, 100, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.82), rgba(255, 248, 235, 0.48)),
    rgba(255, 255, 255, 0.36);
  box-shadow: 0 22px 52px rgba(17, 53, 38, 0.12);
}

.pricing-card.is-featured {
  border-color: rgba(191, 159, 100, 0.65);
  transform: translateY(-4px);
  box-shadow: 0 28px 68px rgba(17, 53, 38, 0.18);
}

.pricing-card.is-current::after {
  content: "Attivo";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(20, 116, 74, 0.14);
  color: #0f5b3d;
  font-weight: 900;
}

.pricing-kicker {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(191, 159, 100, 0.18);
  color: #725819;
  font-weight: 900;
}

.pricing-card h3 {
  margin: 0;
  color: #0b2f22;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1;
}

.pricing-price strong {
  display: block;
  color: #0b2f22;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.pricing-price span {
  display: block;
  margin-top: 5px;
  color: rgba(23, 35, 27, 0.72);
}

.pricing-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.pricing-cta {
  align-self: end;
  min-height: 50px;
  border-radius: 14px;
  background: #0b2f22;
  color: #fff8e8;
}

.pricing-actions {
  display: grid;
  gap: 10px;
  align-self: end;
}

.pricing-secondary-cta {
  min-height: 46px;
  border-radius: 14px;
}

.pricing-cta:disabled {
  cursor: default;
  opacity: 0.72;
}

.one-shot-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.one-shot-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(191, 159, 100, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.82), rgba(241, 229, 202, 0.46)),
    rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 44px rgba(17, 53, 38, 0.1);
}

.one-shot-card h3 {
  margin: 0;
  color: #0b2f22;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
}

.one-shot-card p {
  margin: 0;
  max-width: 760px;
}

@media (max-width: 860px) {
  .plan-feature-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .plan-feature-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pricing-card.is-featured {
    transform: none;
  }
}

@media (max-width: 720px) {
  .recipe-card {
    grid-template-columns: 1fr;
  }

  .recipe-visual,
  .recipe-visual img,
  .recipe-image-placeholder {
    min-height: 190px;
  }
}

.recipe-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
}

.recipe-category-tabs button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(191, 159, 100, 0.32);
  background: rgba(255, 252, 244, 0.72);
  color: #0b2f22;
  box-shadow: 0 10px 26px rgba(17, 53, 38, 0.08);
}

.recipe-category-tabs button.is-active {
  background: #0b2f22;
  border-color: #0b2f22;
  color: #fff8e8;
}

.recipe-category-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.recipe-category-tile {
  min-height: 92px;
  display: grid;
  place-items: center;
  gap: 7px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(191, 159, 100, 0.32);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.82), rgba(255, 248, 235, 0.5)),
    rgba(255, 255, 255, 0.36);
  color: #0b2f22;
  box-shadow: 0 14px 34px rgba(17, 53, 38, 0.1);
  text-align: center;
}

.recipe-category-tile.is-active {
  background: linear-gradient(135deg, #0b2f22, #123d2e);
  border-color: rgba(191, 159, 100, 0.55);
  color: #fff8e8;
}

.recipe-category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(191, 159, 100, 0.18);
  color: #bf9f64;
  font-size: 24px;
  line-height: 1;
}

.recipe-category-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recipe-category-tile.is-active .recipe-category-icon {
  background: rgba(255, 248, 232, 0.14);
}

.recipe-list {
  display: grid;
  gap: 14px;
}

.recipe-card {
  grid-template-columns: minmax(160px, 0.36fr) 1fr;
}

.recipe-visual.is-empty::after {
  content: "Foto piatto";
  display: grid;
  height: 100%;
  min-height: 170px;
  place-items: center;
  color: #725819;
  font-weight: 800;
}

.recipe-category-badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(191, 159, 100, 0.2);
  color: #725819;
  font-size: 0.9rem;
  font-weight: 800;
}

.recipe-card-head > div {
  display: grid;
  gap: 2px;
}

@media (max-width: 720px) {
  .recipe-category-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-card {
    grid-template-columns: 1fr;
  }
}

.shopping-row .product-thumb,
.shopping-row .shopping-product-thumb,
.flyer-shopping-overview-item .product-thumb,
.flyer-shopping-overview-item .shopping-product-thumb {
  position: static;
  width: 42px;
  height: 42px;
  top: auto;
  left: auto;
}

.low-stock-row {
  grid-template-columns: 38px minmax(0, 1fr) 70px !important;
  gap: 8px;
}

.low-stock-row strong {
  overflow: hidden;
  font-size: clamp(14px, 3.4vw, 16px);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.low-stock-row button {
  grid-column: auto !important;
  justify-self: end !important;
  width: 70px !important;
  min-width: 70px;
  min-height: 34px;
  padding: 6px 7px;
  font-size: 0.88rem;
  line-height: 1.05;
  white-space: nowrap;
}

.low-stock-row button.is-added {
  background: #bf9f64;
  color: #0b2f22;
  cursor: default;
}

.shopping-row {
  grid-template-columns: minmax(0, 1fr) minmax(82px, auto);
  align-items: center;
}

.shopping-row-main {
  min-width: 0;
}

.shopping-row-actions {
  justify-self: end;
  width: auto !important;
  max-width: none;
}

.shopping-row-actions .shopping-quantity-save {
  width: 82px !important;
  min-height: 54px;
  padding: 6px 8px;
  font-size: 0.9rem;
  line-height: 1.05;
  white-space: normal;
}

#shopping-overview + #shopping-overview-result {
  margin-top: 16px;
}

@media (max-width: 680px) {
  .shopping-row {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  .shopping-row-actions button {
    width: auto;
  }
}

.flyer-supplier-logo-md {
  padding: 3px;
}

.flyer-supplier-logo-conad {
  width: 112px;
  height: 54px;
  padding: 4px;
  object-fit: contain;
}

.flyer-supplier-logo-dok {
  width: 104px;
  height: 72px;
  padding: 3px;
  object-fit: contain;
}

.flyer-supplier-logo-famila {
  width: 128px;
  height: 54px;
  padding: 4px;
  object-fit: contain;
}

.comparator-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
}

.comparator-search button {
  min-height: 52px;
  padding-inline: 22px;
}

.comparator-highlights,
.comparator-list {
  display: grid;
  gap: 12px;
}

.comparator-highlights {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.comparator-segment {
  display: grid;
  gap: 12px;
}

.comparator-segment + .comparator-segment {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(191, 159, 100, 0.22);
}

.comparator-segment-head {
  display: grid;
  gap: 4px;
  padding: 4px 2px;
}

.comparator-segment-head h3 {
  margin: 0;
  color: #0b2f22;
  font-size: clamp(1.3rem, 4.6vw, 1.85rem);
  line-height: 1.08;
}

.comparator-segment-head p {
  margin: 0;
  color: rgba(11, 47, 34, 0.72);
}

.comparator-highlight,
.comparator-card,
.comparator-offer-row {
  border: 1px solid rgba(191, 159, 100, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.82), rgba(241, 229, 202, 0.46)),
    rgba(255, 255, 255, 0.36);
  box-shadow: 0 14px 34px rgba(17, 53, 38, 0.09);
}

.comparator-highlight {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 12px;
  border-radius: 18px;
}

.comparator-highlight img,
.comparator-card-head img,
.offer-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  object-fit: contain;
  background: rgba(255, 252, 244, 0.82);
  border: 1px solid rgba(191, 159, 100, 0.28);
}

.offer-placeholder {
  display: grid;
  place-items: center;
  color: #bf9f64;
  font-size: 1.45rem;
}

.comparator-highlight span,
.comparator-card-head span,
.comparator-offer-row span,
.price-stack span {
  color: rgba(11, 47, 34, 0.72);
}

.comparator-highlight strong,
.comparator-card-head strong {
  display: block;
  color: #0b2f22;
  line-height: 1.1;
}

.comparator-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
}

.comparator-card-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.comparator-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.comparator-metrics span {
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(191, 159, 100, 0.13);
  color: rgba(11, 47, 34, 0.8);
}

.comparator-metrics strong {
  display: block;
  color: #0b2f22;
}

.comparator-offers {
  display: grid;
  gap: 8px;
}

.comparator-offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 74px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
}

.comparator-offer-row.is-best {
  border-color: rgba(11, 47, 34, 0.38);
  background: rgba(235, 246, 237, 0.66);
}

.price-stack {
  display: grid;
  gap: 2px;
  text-align: right;
}

.price-stack strong {
  color: #0b6b47;
  font-size: 1.25rem;
}

.price-stack.compact strong {
  font-size: 1.05rem;
}

.compact-action {
  min-height: 38px;
  padding: 6px 8px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.compact-action.is-added {
  background: #bf9f64;
  color: #0b2f22;
}

@media (max-width: 760px) {
  .comparator-search,
  .comparator-highlights {
    grid-template-columns: 1fr;
  }

  .comparator-card-head {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .comparator-card-head .price-stack {
    grid-column: 1 / -1;
    grid-template-columns: auto auto;
    justify-content: space-between;
    text-align: left;
  }

  .comparator-metrics {
    grid-template-columns: 1fr;
  }

  .comparator-offer-row {
    grid-template-columns: minmax(0, 1fr) auto 70px;
  }
}
.audit-log-list {
  display: grid;
  gap: 12px;
}

.audit-log-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(195, 159, 92, 0.24);
  border-radius: 18px;
  background: rgba(255, 252, 242, 0.68);
  box-shadow: 0 14px 30px rgba(9, 38, 28, 0.06);
}

.audit-log-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
}

.audit-log-card strong {
  color: #082f22;
}

.audit-log-card span,
.audit-log-card small,
.audit-log-card p {
  color: rgba(8, 48, 34, 0.72);
}

.audit-log-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.audit-log-details {
  justify-content: flex-start !important;
}

.audit-log-details span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(195, 159, 92, 0.14);
}
.audit-filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}

.audit-filter-panel label {
  display: grid;
  gap: 6px;
}

.audit-filter-panel input,
.audit-filter-panel select {
  width: 100%;
}

.audit-filter-panel button {
  min-height: 44px;
}

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

@media (max-width: 560px) {
  .audit-filter-panel {
    grid-template-columns: 1fr;
  }
}

.inventory-category-card {
  position: relative;
  display: block;
  padding: 0;
  overflow: visible;
}

.inventory-category-open {
  appearance: none;
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 48px 14px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.inventory-category-count {
  padding-right: 2px;
}

.inventory-category-delete-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.inventory-category-card:hover .inventory-category-delete-x,
.inventory-category-card:focus-within .inventory-category-delete-x {
  border-color: rgba(255, 248, 231, 0.58);
}

@media (max-width: 680px) {
  .inventory-category-open {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    padding-right: 44px;
  }
}

.category-label {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  cursor: text;
}

.category-label:focus-visible {
  outline: 2px solid rgba(191, 158, 96, 0.72);
  outline-offset: 4px;
  border-radius: 8px;
}

.category-card-editing input {
  width: 100%;
}

.category-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.category-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.category-edit-button {
  width: auto;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
}

.category-card-editing {
  grid-template-columns: 1fr;
}

@media (max-width: 520px) {
  .category-card {
    grid-template-columns: 1fr;
  }

  .category-edit-button {
    justify-self: start;
  }
}


.shopping-item-card,
.shopping-row {
  position: relative;
}

.shopping-item-card > .shopping-delete-x,
.shopping-row > .shopping-delete-x {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.shopping-item-card .shopping-item-main,
.shopping-row .shopping-row-main {
  padding-right: 42px;
}

.shopping-delete-x {
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  padding: 0;
  border-radius: 999px;
  background: rgba(159, 47, 47, 0.1);
  border: 1px solid rgba(159, 47, 47, 0.28);
  color: #8f2727;
  font-size: 20px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
}

.shopping-delete-x:hover:not(:disabled),
.shopping-delete-x:focus-visible {
  background: #9f2f2f;
  color: #fff8e7;
}

.flyer-shopping-overview-item {
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
}

.flyer-shopping-delete-x {
  width: 28px;
  height: 28px;
  min-height: 28px;
  font-size: 18px;
}

.flyer-shopping-item .flyer-shopping-delete-x {
  justify-self: end;
}


.google-auth-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: min(340px, 100%);
  border: 1px solid rgba(6, 45, 32, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #0a3123;
  font-weight: 700;
}
/* keeply product image placeholder fix v44 */
.product-lookup-image-shell.has-image::before,
.product-lookup-image-shell.has-image::after,
.image-placeholder.has-image::before,
.image-placeholder.has-image::after,
.placeholder.has-image::before,
.placeholder.has-image::after {
  content: none !important;
  display: none !important;
}

.product-lookup-image-shell.has-image img,
.image-placeholder.has-image img,
.placeholder.has-image img {
  opacity: 1;
}
.product-lookup-preview:has(#product-lookup-image:not([hidden])[src]) #product-lookup-photo-icon {
  display: none !important;
}
.barcode-tools,
.initial-stock-scan-tools,
.scan-tools {
  width: 100%;
}

.barcode-tools button,
#barcode-scan-launch,
#barcode-scan-stop,
#initial-stock-scan,
#initial-stock-stop {
  width: 100%;
  max-width: 100%;
}

/* keeply initial stock scanner width fix v54 */
.initial-stock-scan-tools {
  width: 100%;
  max-width: 100%;
}

.initial-stock-scan-tools button,
.initial-stock-scan-tools .scan-button,
.initial-stock-scan-tools [type="button"] {
  width: 100%;
  max-width: 100%;
}

/* keeply active plan disabled buttons v54 */
.pricing-card button:disabled,
.pricing-card button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.2);
}

/* keeply initial stock scanner equal button width v54-fix4 */
.initial-stock-scan-tools,
.initial-stock-scan-tools .scan-tools,
.initial-stock-scan-tools .barcode-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
}

.initial-stock-scan-tools button,
.initial-stock-scan-tools .scan-tools button,
.initial-stock-scan-tools .barcode-tools button,
#initial-stock-scan-launch,
#initial-stock-scan-stop,
#initial-stock-continuous-scan,
#initial-stock-continuous-stop {
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  flex: 1 1 100%;
}
