﻿:root {
  color-scheme: light;
  --ink: #20352d;
  --muted: #78847c;
  --green: #2f7356;
  --green-dark: #245c44;
  --green-soft: #e8f1e9;
  --line: #e9ece6;
  --paper: #ffffff;
  --background: #f6f7f2;
  --shadow: 0 24px 70px rgba(37, 59, 45, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 12% 10%, rgba(226, 238, 222, 0.78), transparent 35%), radial-gradient(ellipse at 92% 84%, rgba(238, 232, 213, 0.58), transparent 32%), var(--background);
}
.login-view { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.login-view[hidden], .page-shell[hidden] { display: none; }
.login-card { width: min(100%, 390px); padding: 32px; border: 1px solid rgba(224, 229, 220, 0.8); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.login-brand { margin-bottom: 32px; }
.login-card h1 { font-size: 34px; letter-spacing: -1.5px; }
.login-description { margin: 10px 0 24px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-form { display: grid; gap: 9px; }
.login-form label { margin-top: 5px; color: #526258; font-size: 12px; font-weight: 700; }
.login-form input { width: 100%; min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fff; font: inherit; }
.login-form input:focus-visible { outline: 3px solid rgba(36, 92, 68, 0.18); border-color: var(--green-dark); }
.login-form .add-button { width: 100%; margin-top: 8px; }
.login-message { margin: 5px 0 0; color: #a33f35; font-size: 12px; }
.login-message[hidden] { display: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100% - 40px, 760px); margin: 0 auto; padding: 28px 0 34px; }
.topbar, .brand, .store-navigation, .store-tabs, .add-form, .list-toolbar, .shopping-item, .item-main, .item-actions, .store-form { display: flex; align-items: center; }
.topbar { justify-content: space-between; margin-bottom: 48px; }
.brand { gap: 10px; color: var(--ink); font-size: 15px; font-weight: 750; letter-spacing: -0.5px; text-decoration: none; }
.brand-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: #fff; background: var(--green); }
.brand-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.household-name { max-width: 22ch; overflow: hidden; padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; text-overflow: ellipsis; white-space: nowrap; }
.saved-dot { width: 7px; height: 7px; border-radius: 50%; background: #75a57c; }
.list-card { padding: 42px 52px 25px; border: 1px solid rgba(224, 229, 220, 0.8); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.intro { margin-bottom: 26px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1.65px; }
h1 { margin: 0; font-size: clamp(36px, 7vw, 48px); font-weight: 750; letter-spacing: -2.6px; line-height: 1.1; }
.title-period { color: #e8a65b; }
.subtitle { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.store-navigation { justify-content: space-between; gap: 12px; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.store-tabs { min-width: 0; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.store-tab { flex: 0 0 auto; padding: 9px 13px; border: 0; border-radius: 9px; color: #77837a; background: transparent; font-size: 13px; font-weight: 650; transition: background 150ms, color 150ms; }
.store-tab:hover { color: var(--green-dark); background: #f5f8f3; }
.store-tab[aria-selected="true"] { color: #fff; background: var(--green); }
.secondary-button { flex: 0 0 auto; padding: 9px 12px; border: 1px solid #dfe7dd; border-radius: 9px; color: var(--green-dark); background: #fff; font-size: 12px; font-weight: 650; }
.secondary-button:hover { border-color: #9dbba0; background: #f8faf6; }
.store-form { flex-wrap: wrap; gap: 9px; margin: -9px 0 18px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfa; }
.store-form label { width: 100%; color: #526258; font-size: 12px; font-weight: 650; }
.store-form input { min-width: 160px; flex: 1; height: 40px; padding: 0 12px; border: 1px solid #e3e8e1; border-radius: 8px; outline: none; background: #fff; }
.text-button { padding: 7px; border: 0; color: var(--muted); background: transparent; font-size: 12px; }
.add-form { gap: 9px; margin-bottom: 9px; }
.item-input-wrap { position: relative; min-width: 0; flex: 1; }
.item-input-wrap input { width: 100%; height: 50px; padding: 0 16px; border: 1px solid #e3e8e1; border-radius: 10px; outline: none; color: var(--ink); background: #fcfdfb; transition: border-color 150ms, box-shadow 150ms; }
.item-input-wrap input::placeholder { color: #a4ada5; }
.item-input-wrap input:focus, .store-form input:focus { border-color: #83aa8b; box-shadow: 0 0 0 3px rgba(91, 145, 101, 0.13); }
.add-button { display: inline-flex; height: 50px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; padding: 0 17px; border: 0; border-radius: 10px; color: #fff; background: var(--green); font-size: 13px; font-weight: 650; transition: background 150ms, transform 150ms; }
.add-button:hover { background: var(--green-dark); }
.add-button:active { transform: translateY(1px); }
.action-icon { display: block; width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.item-time-compact .timestamp-icon { display: inline-block; width: 12px; height: 12px; margin-right: 3px; vertical-align: -2px; }
.autocomplete-suggestions { position: absolute; top: calc(100% + 3px); left: 0; right: 0; display: none; max-height: 220px; overflow-y: auto; border: 1px solid #e3e8e1; border-radius: 10px; background: var(--paper); box-shadow: 0 7px 18px rgba(37, 59, 45, 0.1); z-index: 10; }
.autocomplete-suggestions.visible { display: block; }
.autocomplete-item { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 11px 14px; border: 0; color: var(--ink); background: #fff; text-align: left; font-size: 13px; }
.autocomplete-item:hover, .autocomplete-item:focus-visible { background: var(--green-soft); }
.item-freq { color: var(--green); font-size: 11px; }
.recommendation-row { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; }
.recommendation-row[hidden] { display: none; }
.recommendation-visibility { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; }
.recommendation-visibility:hover { color: var(--green-dark); background: var(--green-soft); }
.recommendation-visibility .action-icon { width: 18px; height: 18px; }
.product-recommendations { display: flex; flex: 1 1 0; align-items: center; gap: 7px; min-width: 0; overflow: hidden; padding: 1px 0 3px; }
.product-recommendations[hidden] { display: none; }
.recommendation-chip { display: flex; flex: 0 0 auto; align-items: stretch; min-width: 0; max-width: 220px; overflow: hidden; border: 1px solid #cfe0d1; border-radius: 9px; background: var(--green-soft); }
.recommendation-name { display: block; min-width: 0; max-width: 145px; overflow: hidden; color: var(--green-dark); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.recommendation-action { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.recommendation-add { display: flex; width: auto; height: 33px; flex: 1 1 auto; align-items: center; justify-content: flex-start; min-width: 0; padding: 0 10px; border-radius: 0; background: var(--green-soft); text-align: left; }
.recommendation-add:hover { background: #d7e9d9; }
.recommendation-dismiss { width: 33px; height: auto; border-radius: 0; color: #fff; background: #c43d32; font-size: 19px; line-height: 1; }
.recommendation-dismiss:hover { background: #a92f27; }
.recommendation-icon { width: 14px; height: 14px; }
.store-hint { margin: 0 0 18px; color: #98a198; font-size: 11px; }
.form-message { margin: 0 0 14px; color: var(--green-dark); font-size: 12px; }
.form-message.is-error { color: #a33f35; }
.form-message[hidden] { display: none; }
.list-toolbar { justify-content: flex-end; min-height: 35px; border-bottom: 1px solid var(--line); }
.item-count { margin: 0; color: var(--muted); font-size: 11px; }
.shopping-list { margin: 0; padding: 0; list-style: none; }
.shopping-item { min-height: 62px; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); animation: item-in 180ms ease-out; cursor: pointer; }
@keyframes item-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.item-main { min-width: 0; gap: 12px; align-items: flex-start; }
.check-button { display: grid; width: 21px; height: 21px; flex: 0 0 auto; place-items: center; margin-top: 2px; padding: 0; border: 1.5px solid #cbd4ca; border-radius: 7px; color: #fff; background: #fff; transition: border-color 150ms, background 150ms; }
.check-button:hover { border-color: var(--green); }
.is-completed .check-button { border-color: var(--green); background: var(--green); }
.check-mark { display: none; line-height: 0; }
.is-completed .check-mark { display: grid; place-items: center; }
.item-details { display: grid; gap: 5px; min-width: 0; }
.item-times { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.item-times time { white-space: nowrap; }
.item-time-compact { display: none; }
.item-name { overflow: hidden; color: #34463d; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.is-completed .item-name { color: #9aa49c; text-decoration: line-through; text-decoration-color: #b7c1b8; }
.completed-time { color: #8a968c; font-size: 11px; }
.item-actions { gap: 6px; }
.item-action { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 0; border-radius: 8px; color: #a3aca4; background: transparent; font-size: 16px; transition: color 150ms, background 150ms; }
.item-action:hover { color: #a94e44; background: #fbf0ee; }
.empty-state { padding: 36px 12px 39px; color: var(--muted); text-align: center; }
.empty-icon { display: block; margin-bottom: 12px; font-size: 24px; filter: grayscale(0.35); }
.empty-state p { margin: 0; font-size: 12px; }
.empty-state .empty-title { margin-bottom: 6px; color: #405248; font-size: 14px; font-weight: 650; }
.page-note { margin: 20px 0 0; color: #9ba69b; font-size: 11px; text-align: center; letter-spacing: 0.3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
button:focus-visible, select:focus-visible { outline: 3px solid rgba(73, 132, 87, 0.35); outline-offset: 2px; }
button:disabled { cursor: wait; opacity: 0.65; }

@media (max-width: 640px) {
  .login-card { padding: 26px 22px; }
  .login-form input { font-size: 16px; }
  .page-shell { width: min(100% - 28px, 520px); padding: 20px 0 0; }
  .topbar { margin-bottom: 30px; }
  .list-card { padding: 32px 22px 18px; border-radius: 17px; }
  .store-navigation { align-items: flex-start; }
  .store-tab { padding: 8px 10px; font-size: 12px; }
  .add-form { align-items: stretch; flex-direction: column; }
  .add-button { width: 100%; }
  .store-hint { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.store-form[hidden] { display: none; }

@media (max-width: 640px) {
  .topbar { align-items: center; flex-direction: row; gap: 10px; }
  .store-tabs { flex: 1; }
}


.added-time { color: #a0a9a0; font-size: 10px; }


@media (max-width: 360px) {
  .page-shell { width: 100%; padding: 8px 0 0; }
  .topbar { margin: 0 14px 10px; }
  .brand { gap: 7px; font-size: 13px; }
  .brand-icon { width: 26px; height: 26px; border-radius: 8px; }
  .list-card { padding: 20px 14px 14px; border-radius: 14px; }
  .intro { margin-bottom: 16px; }
  .eyebrow { display: none; }
  h1 { font-size: 30px; letter-spacing: -1.5px; }
  .subtitle { margin-top: 6px; font-size: 12px; }
  .store-navigation { gap: 6px; margin-bottom: 12px; padding-bottom: 8px; }
  .store-tabs { flex: 1; min-width: 0; gap: 2px; scrollbar-width: none; }
  .store-tabs::-webkit-scrollbar { display: none; }
  .store-tab { padding: 8px; border-radius: 8px; font-size: 11px; }
  .add-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-bottom: 6px; }
  .item-input-wrap { grid-column: 1; }
  .item-input-wrap input { height: 44px; padding: 0 10px; font-size: 12px; }
  .add-button { grid-column: 2; grid-row: 1; height: 44px; padding: 0 11px; font-size: 12px; }
  .store-hint { display: none; }
  .form-message { margin-bottom: 9px; font-size: 11px; }
  .list-toolbar { min-height: 28px; }
  .item-count { font-size: 10px; }
  .shopping-item { min-height: 52px; gap: 8px; }
  .item-main { gap: 8px; }
  .check-button { width: 20px; height: 20px; }
  .item-details { gap: 3px; }
  .item-name { font-size: 13px; }
  .added-time, .completed-time { font-size: 10px; line-height: 1.2; }
  .item-action { width: 26px; height: 26px; }
  .empty-state { padding: 24px 8px; }
  .page-note { display: none; }
}


.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar .list-mode-switch { flex: 0 0 auto; gap: 2px; margin: 0; padding: 3px; }
.topbar .mode-button { min-height: 32px; flex: 0 0 auto; padding: 0 10px; font-size: 12px; }
.more-menu-wrap { position: relative; }
.more-menu-toggle { display: grid; width: 38px; height: 38px; place-items: center; padding: 0 0 4px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font-size: 24px; line-height: 1; }
.more-menu-toggle:hover { border-color: #b7c8b7; background: #f8faf6; }
.more-menu { position: absolute; top: calc(100% + 7px); right: 0; z-index: 20; min-width: 220px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 10px 24px rgba(37, 59, 45, 0.14); }
.more-menu[hidden], .products-view[hidden] { display: none; }
.more-menu button { display: flex; width: 100%; min-height: 40px; align-items: center; gap: 11px; padding: 9px 11px; border: 0; border-radius: 7px; color: var(--ink); background: transparent; text-align: left; font-size: 13px; }
.more-menu button:hover, .more-menu button:focus-visible { background: var(--green-soft); }
.more-menu-icon, .more-menu-icon-wrap { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; color: var(--green-dark); }
.more-menu-icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.more-menu-icon-wrap .action-icon { width: 19px; height: 19px; }
.more-menu-separator { height: 1px; margin: 5px 8px; background: var(--line); }
#logout-button { color: #7f3933; }
#logout-button .more-menu-icon { color: #a33f35; }
.products-view { padding: 34px 38px; border: 1px solid rgba(224, 229, 220, 0.8); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.products-heading { margin-bottom: 24px; }
.back-button { margin-bottom: 18px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--green-dark); background: #fff; font-size: 12px; font-weight: 650; }
.back-button:hover { background: #f8faf6; }
.products-heading h1 { font-size: 32px; letter-spacing: -1.3px; }
.products-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.product-select-label { display: block; margin: 0 0 7px; color: #526258; font-size: 12px; font-weight: 700; }
.product-select { width: 100%; min-height: 46px; padding: 0 38px 0 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font: inherit; font-size: 14px; }
.product-select:focus-visible { outline: 3px solid rgba(36, 92, 68, 0.18); border-color: var(--green-dark); }
.products-count { margin: 9px 0 12px; color: var(--muted); font-size: 11px; }
.products-message { margin: 0 0 12px; color: #a33f35; font-size: 12px; }
.product-selection-prompt { margin: 18px 0 0; padding: 16px; border: 1px dashed #dfe5dc; border-radius: 11px; color: var(--muted); background: #fbfcf9; font-size: 12px; text-align: center; }
.product-events-panel { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.product-events-title { margin: 0 0 17px; color: var(--ink); font-size: 19px; overflow-wrap: anywhere; }
.product-recommendation-control { display: grid; gap: 7px; margin: 0 0 18px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcf9; }
.product-recommendation-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-recommendation-heading label { color: var(--ink); font-size: 12px; font-weight: 700; }
.product-recommendation-heading output { color: var(--green-dark); font-size: 12px; font-weight: 700; }
#product-recommendation-priority { width: 100%; margin: 0; accent-color: var(--green); }
.product-recommendation-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
#product-recommendation-help { margin: 0; color: var(--muted); font-size: 11px; }
.product-events-empty { margin: 0; color: var(--muted); font-size: 12px; }
.product-events-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.product-event { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding: 0 0 18px 18px; border-left: 2px solid #dfe9df; }
.product-event:last-child { padding-bottom: 0; border-left-color: transparent; }
.product-event::before { position: absolute; top: 2px; left: -6px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--green-dark); content: ""; }
.product-event[data-action="completed"]::before { background: #b85b08; }
.product-event[data-action="uncompleted"]::before { background: #f3df86; }
.product-event[data-action="deleted"]::before { background: #c43d32; }
.product-event-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; min-width: 0; }
.product-event-action { color: #111; font-size: 12px; }
.product-event-time { color: #111; font-size: 11px; text-align: right; }
.product-event-store { grid-column: 1 / -1; color: #111; font-size: 11px; }
.product-event-user { color: var(--muted); font-size: 11px; }

@media (max-width: 640px) {
  .product-select, #add-item-store-select, .item-input-wrap input, .store-form input { font-size: 16px; }
  .topbar-actions { gap: 8px; }
  .more-menu-toggle { width: 34px; height: 34px; }
  .products-view { padding: 26px 22px 20px; border-radius: 17px; }
  .products-heading h1 { font-size: 28px; }
}

@media (max-width: 360px) {
  .topbar { flex-direction: row; align-items: center; justify-content: space-between; gap: 6px; margin: 0 14px 10px; }
  .topbar-actions { gap: 5px; }
  .topbar .mode-button { padding: 0 7px; font-size: 11px; }
  .topbar-actions { display: flex; }
  .more-menu-toggle { width: 32px; height: 32px; border-radius: 8px; }
  .products-view { padding: 20px 14px 14px; border-radius: 14px; }
  .products-heading { margin-bottom: 16px; }
  .back-button { margin-bottom: 13px; }
  .products-heading h1 { font-size: 24px; }
  .products-heading p { font-size: 11px; }
  .product-events-panel { padding: 14px 12px; }
  .product-event { grid-template-columns: 1fr; gap: 4px; }
  .product-event-time { text-align: left; }
  .product-event-store { grid-column: auto; }
}
.settings-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.settings-section-heading h2 { margin: 0; color: var(--ink); font-size: 18px; }
.settings-store-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.settings-store-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 10px 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.settings-store-name { min-width: 0; flex: 1 1 auto; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: 13px; text-align: left; overflow-wrap: anywhere; }
.settings-store-name:hover { color: var(--green-dark); }
.settings-store-active { flex: 0 0 auto; padding: 4px 8px; border-radius: 20px; color: var(--green-dark); background: var(--green-soft); font-size: 10px; font-weight: 700; }
.settings-message { margin: 12px 0 0; color: var(--green-dark); font-size: 12px; }
.settings-message.is-error { color: #a33f35; }
.add-store-dialog { width: min(440px, calc(100% - 28px)); max-width: none; padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--paper); box-shadow: 0 20px 60px rgba(37, 59, 45, 0.22); }
.add-store-dialog::backdrop { background: rgba(26, 40, 31, 0.38); backdrop-filter: blur(2px); }
.store-form { display: flex; align-items: stretch; flex-direction: column; gap: 12px; margin: 0; padding: 0; border: 0; background: transparent; }
.store-form h2 { margin: 0 0 4px; font-size: 20px; }
.store-form label { width: auto; margin: 0; color: #526258; font-size: 12px; font-weight: 650; }
.store-form input { width: 100%; min-width: 0; height: 46px; flex: 0 0 auto; padding: 0 12px; border: 1px solid #e3e8e1; border-radius: 8px; background: #fff; font: inherit; }
.store-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.add-store-message { margin: 0; }

@media (max-width: 360px) {
  .settings-view { padding: 20px 14px 14px; }
  .settings-section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .add-store-dialog { padding: 20px; }
  .store-form-actions { align-items: stretch; flex-direction: column; }
  .store-form-actions button { width: 100%; }
}
.choose-store-dialog .store-form { gap: 12px; }
.choose-store-product { margin: 0; color: var(--green-dark); font-size: 14px; font-weight: 700; }
.choose-store-dialog select { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid #e3e8e1; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; }
.choose-store-hint { margin: -4px 0 0; color: var(--muted); font-size: 11px; }








.due-date { color: #78847c; font-size: 11px; }
.due-date.is-overdue { color: #b5483b; font-weight: 650; }
.item-details-dialog { width: min(430px, calc(100% - 32px)); }
.item-details-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0; }
.item-details-form h2 { margin: 0 0 4px; color: var(--ink); font-size: 20px; overflow-wrap: anywhere; }
.item-added-by-meta { margin: -4px 0 2px; color: var(--muted); font-size: 12px; }
.item-added-by-meta strong { color: var(--ink); font-weight: 650; }
.item-details-form textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid #e3e8e1; border-radius: 8px; color: var(--ink); background: #fff; font: inherit; resize: vertical; }
.item-details-form input { width: 100%; min-width: 0; }
.item-details-form textarea:focus, .item-details-form input:focus { border-color: #83aa8b; outline: 0; box-shadow: 0 0 0 3px rgba(91, 145, 101, 0.13); }
.item-link-open { color: var(--green-dark); font-size: 13px; overflow-wrap: anywhere; }
.item-details-form .store-form-actions { display: flex; justify-content: flex-end; gap: 10px; width: 100%; margin-top: 5px; }
.item-details-dialog::backdrop { background: rgba(25, 38, 29, 0.34); }



.list-mode-switch { display: flex; gap: 6px; margin: 0 0 18px; padding: 4px; border-radius: 11px; background: #f1f4ef; }
.mode-button { flex: 1; min-height: 38px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 650; }
.mode-button[aria-pressed="true"] { color: var(--green-dark); background: #fff; box-shadow: 0 1px 4px rgba(37, 59, 45, 0.1); }
.todo-navigation { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.todo-navigation .store-tabs { flex: 1; }


.todo-item .item-name { white-space: normal; overflow-wrap: anywhere; }
.todo-history-panel { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.todo-history-panel h2 { margin: 0 0 16px; font-size: 17px; }
.dialog-description { color: var(--muted); font-size: 12px; line-height: 1.5; }

.settings-store-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; }
.move-list-button, .remove-store-button { display: grid; width: 30px; height: 32px; place-items: center; padding: 0; border-radius: 7px; }
.move-list-button { color: var(--muted); font-size: 17px; }
.move-list-button:hover:not(:disabled) { color: var(--green-dark); background: var(--green-soft); }
.move-list-button:disabled { cursor: default; opacity: 0.35; }
.remove-store-button { color: #a33f35; }
.remove-store-button { font-size: 22px; line-height: 1; }
.remove-store-button:hover:not(:disabled) { color: #842e28; background: #fbf0ee; }
#remove-store-destination { width: 100%; min-height: 44px; padding: 0 10px; border: 1px solid #e3e8e1; border-radius: 8px; background: #fff; font: inherit; }
#remove-store-dialog .dialog-description { margin: 0; }
@media (max-width: 640px) { .list-mode-switch { margin-bottom: 13px; } .todo-navigation .store-tab { padding: 8px 10px; } }


.shopping-action-dock, .todo-action-dock { display: flex; flex-direction: column; }
.shopping-action-dock .store-navigation, .todo-action-dock .todo-navigation { order: -1; }
@media (max-width: 640px) {
  .store-tabs { overflow-x: hidden; scrollbar-width: none; }
  .store-tabs::-webkit-scrollbar { display: none; }
  .mobile-action-dock .autocomplete-suggestions { top: auto; bottom: calc(100% + 3px); }
  .mobile-action-dock .autocomplete-suggestions.visible { display: flex; flex-direction: column-reverse; }
  .store-tabs.is-compact { justify-content: space-between; }
  .store-tabs.is-compact .store-tab { min-width: 0; flex: 0 1 auto; }
  .store-tabs.is-compact .store-tab-label { max-width: 100%; overflow: hidden; text-overflow: clip; }
  .store-tab { white-space: nowrap; }
  .store-tab-label { display: block; }
  .item-times { flex-wrap: nowrap; gap: 6px; }
  .item-time-full { display: none; }
  .item-time-compact { display: inline; }
  .shopping-item { min-height: 52px; gap: 8px; }
  .item-main { gap: 8px; }
  .topbar { position: sticky; top: 0; z-index: 45; margin: 0 0 24px; padding: 8px 0; background: rgba(246, 247, 242, 0.96); backdrop-filter: blur(12px); }
  .list-card.needs-mobile-dock-space { padding-bottom: var(--mobile-dock-clearance, 120px); }
  .mobile-action-dock { position: fixed; z-index: 40; bottom: 0; left: 50%; display: flex; width: min(520px, calc(100% - 28px)); gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; background: rgba(255, 255, 255, 0.97); box-shadow: 0 -10px 28px rgba(37, 59, 45, 0.13); backdrop-filter: blur(12px); }
  .shopping-action-dock .store-navigation, .todo-action-dock .todo-navigation { order: 0; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
  .mobile-action-dock .add-form { display: flex; align-items: stretch; flex-direction: row; gap: 8px; margin: 0; }
  .mobile-action-dock .item-input-wrap { flex: 1; }
  .mobile-action-dock .item-input-wrap input { height: 44px; padding: 0 11px; font-size: 16px; }
  .mobile-action-dock .add-button { width: auto; height: 44px; padding: 0 12px; white-space: nowrap; }
}
@media (max-width: 360px) {
  .settings-store-list li { gap: 6px; padding-right: 6px; }
  .settings-store-actions { gap: 1px; }
  .move-list-button, .remove-store-button { width: 27px; }
  .settings-store-active { padding: 4px 6px; }
}
@media (max-width: 360px) {
  .mobile-action-dock { width: calc(100% - 16px); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
  .mobile-action-dock .add-form { grid-template-columns: minmax(0, 1fr) auto; }
  .mobile-action-dock .add-button { grid-column: auto; grid-row: auto; padding: 0 9px; font-size: 11px; }
}

.admin-shell { width: min(100% - 40px, 900px); margin: 0 auto; padding: 28px 0 40px; }
.admin-shell[hidden] { display: none; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.admin-label { padding-left: 9px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0; }
.admin-card { padding: 38px; border: 1px solid rgba(224, 229, 220, 0.8); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.admin-heading { margin-bottom: 26px; }
.admin-heading .eyebrow { margin-bottom: 10px; }
.admin-heading h1 { font-size: clamp(30px, 6vw, 42px); }
.admin-heading > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-panel { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fcfdfb; }
.admin-panel h2 { margin: 0 0 16px; font-size: 17px; letter-spacing: -0.3px; }
.admin-form { display: grid; gap: 9px; }
.admin-form label { margin-top: 3px; color: #526258; font-size: 12px; font-weight: 700; }
.admin-form input, .admin-form select, .admin-password-reset-form input { width: 100%; min-width: 0; height: 42px; padding: 0 11px; border: 1px solid #e3e8e1; border-radius: 8px; color: var(--ink); background: #fff; }
.admin-form input:focus, .admin-form select:focus, .admin-password-reset-form input:focus { outline: 3px solid rgba(36, 92, 68, 0.14); border-color: var(--green-dark); }
.admin-form .add-button { width: 100%; height: 44px; margin-top: 5px; }
.admin-message { margin: 12px 0 0; color: var(--green-dark); font-size: 12px; line-height: 1.45; }
.admin-message.is-error { color: #a33f35; }
.admin-message[hidden] { display: none; }
.admin-list-panel { margin-top: 16px; }
.admin-list-hint { margin: -7px 0 13px; color: var(--muted); font-size: 12px; }
.admin-entity-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.admin-entity-list:empty::before { content: "Noch keine Einträge vorhanden."; color: var(--muted); font-size: 12px; }
.admin-entity-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.admin-entity-info { display: grid; min-width: 0; gap: 4px; }
.admin-entity-info strong { overflow-wrap: anywhere; font-size: 13px; }
.admin-entity-info span { color: var(--muted); font-size: 11px; }
.admin-household-edit-form { display: flex; align-items: center; gap: 7px; }
.admin-household-edit-form input { width: 165px; min-width: 0; height: 36px; padding: 0 10px; border: 1px solid #e3e8e1; border-radius: 8px; color: var(--ink); background: #fff; }
.admin-household-edit-form input:focus { outline: 3px solid rgba(36, 92, 68, 0.14); border-color: var(--green-dark); }
.admin-household-edit-form button { min-height: 36px; }
.admin-user-edit { flex: 0 1 175px; min-width: 145px; }
.admin-user-edit summary { color: var(--green-dark); font-size: 12px; font-weight: 650; cursor: pointer; }
.admin-user-edit[open] { flex: 1 1 220px; }
.admin-user-edit-form { min-width: 190px; margin-top: 9px; }
.admin-user-edit-form label { margin-top: 0; }
.admin-user-edit-form input, .admin-user-edit-form select { height: 38px; font-size: 12px; }
.admin-user-edit-form button { width: 100%; min-height: 36px; }
.admin-password-reset-form { display: flex; align-items: center; gap: 7px; }
.admin-password-reset-form input { width: 150px; height: 36px; font-size: 12px; }
.admin-password-reset-form button { min-height: 36px; }
@media (max-width: 640px) {
  .admin-shell { width: min(100% - 28px, 520px); padding: 20px 0 28px; }
  .admin-card { padding: 22px 18px; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-panel { padding: 16px; }
  .admin-entity-list li { align-items: flex-start; flex-direction: column; }
  .admin-household-edit-form { width: 100%; }
  .admin-household-edit-form input { flex: 1; width: auto; }
  .admin-user-edit, .admin-user-edit[open], .admin-user-edit-form { width: 100%; max-width: none; }
  .admin-password-reset-form { width: 100%; }
  .admin-password-reset-form input { flex: 1; width: auto; }
}