:root {
  --bg: #e7f0f5;
  --surface: #fffefa;
  --surface-soft: #eef4f7;
  --text: #294c62;
  --text-muted: #6e8795;
  --border: #c4d8e3;
  --border-strong: #a9c4d3;
  --primary: #5b91b3;
  --primary-dark: #3d708f;
  --primary-soft: #deebf2;
  --danger: #d77d78;
  --danger-soft: #f8e2df;
  --warning: #b48b3f;
  --warning-soft: #fff1c9;
  --orange: #d7a35c;
  --orange-soft: #f8ecd3;
  --blue: #5987a4;
  --blue-soft: #e1edf4;
  --shadow: 0 14px 34px rgba(64, 101, 120, 0.12);
  --radius: 15px;
}

html,
body {
  background: #e7f0f5;
}

body {
  color: var(--text);
  background: linear-gradient(145deg, #e9f1f5 0%, #deebf0 100%);
}

.app-header {
  border-bottom: 0;
  background: #4d87aa;
  box-shadow: 0 7px 18px rgba(62, 102, 124, 0.16);
}

.header-inner {
  min-height: 72px;
}

.brand {
  color: #fff;
}

.brand-mark {
  border-radius: 14px;
  color: #4d87aa;
  background: #fff0bf;
  box-shadow: 0 4px 0 #d3a45e;
}

.brand small,
.local-badge {
  color: #e3f0f6;
}

.header-actions .icon-button {
  color: #f8fdff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

.app-main {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 22px;
  width: min(1260px, calc(100% - 40px));
  padding-block: 26px 44px;
}

.page-heading {
  position: relative;
  grid-column: 1 / -1;
  min-height: 178px;
  align-items: center;
  margin-bottom: 20px;
  padding: 27px 31px;
  overflow: hidden;
  border: 2px solid #b8d1dd;
  border-radius: 19px;
  background: #fffefa;
  box-shadow: 0 8px 0 rgba(64, 101, 120, 0.1);
}

.page-heading::before {
  position: absolute;
  right: -30px;
  bottom: -62px;
  width: 47%;
  height: 165px;
  border-radius: 100px 0 0 100px;
  background: #d4e8ee;
  content: "";
}

.page-heading > div:first-child,
.page-heading > .add-button {
  position: relative;
  z-index: 2;
}

.page-heading > .add-button {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 3;
}

.page-heading h1 {
  margin-bottom: 6px;
  color: #2e566e;
  font-size: 29px;
}

.date-line {
  color: #548bac;
}

.heading-summary {
  color: #6d8998;
}

.button-primary {
  color: #25475b;
  background: #f0c878;
  box-shadow: 0 5px 0 #d4a55d;
}

.button-primary:hover {
  background: #e9bb64;
}

.hero-figures {
  position: absolute;
  z-index: 1;
  right: 30px;
  bottom: 17px;
  display: flex;
  align-items: end;
  gap: 13px;
  width: 380px;
  height: 120px;
}

.hero-figure {
  position: relative;
  display: grid;
  width: 68px;
  height: 84px;
  place-items: center;
  border: 3px solid #4b809f;
  border-radius: 17px 17px 12px 12px;
  background: #fdfcf6;
  font-size: 42px;
  box-shadow: 0 6px 0 #d7b274;
}

.hero-figure::after {
  position: absolute;
  bottom: 7px;
  color: #4b7486;
  content: "• ᴗ •";
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
}

.hero-cookie {
  width: 80px;
  height: 77px;
  border-radius: 45%;
  background: #fff1c9;
}

.hero-paper {
  height: 72px;
  background: #eef4f6;
}

.hero-bottle {
  height: 101px;
  background: #f9e7ed;
}

.hero-shelf {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 374px;
  height: 11px;
  border-radius: 9px;
  background: #aa7d4b;
}

.directory-nav {
  display: grid;
  grid-column: 1;
  grid-row: 2 / 4;
  align-content: start;
  gap: 7px;
  margin: 0;
  padding: 10px;
  border: 2px solid #b6d0dc;
  border-radius: 16px;
  background: #5b91b3;
  box-shadow: 0 8px 0 rgba(64, 101, 120, 0.1);
}

.directory-button {
  min-height: 45px;
  justify-content: flex-start;
  padding: 9px 11px;
  border: 0;
  border-radius: 11px;
  color: #ecf6fa;
  background: transparent;
}

.directory-button:hover {
  color: #2e566e;
  background: #e5f0f4;
}

.directory-button.is-active {
  border: 0;
  color: #28536c;
  background: #fffefa;
  box-shadow: 0 4px 0 #d9ae68;
}

.directory-button svg,
.directory-count {
  flex-shrink: 0;
}

.directory-count,
.directory-button.is-active .directory-count {
  background: #f2cc82;
  color: #4a6472;
}

.directory-manage {
  margin-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0 0 10px 10px;
}

.status-grid {
  grid-column: 2;
  grid-row: 2;
  gap: 12px;
  margin-bottom: 18px;
}

.status-card {
  min-height: 105px;
  border: 2px solid #c3d7e0;
  border-radius: 14px;
  background: #fffefa;
  box-shadow: 0 6px 0 rgba(64, 101, 120, 0.08);
}

.status-card.is-active {
  border-color: #83b2c8;
  box-shadow: inset 0 -4px 0 #6197b5, 0 6px 0 rgba(64, 101, 120, 0.08);
}

.status-icon {
  border-radius: 12px;
}

.inventory-section {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
  padding: 20px;
  border: 2px solid #bdd4df;
  border-radius: 17px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 8px 0 rgba(64, 101, 120, 0.08);
}

.inventory-section .inventory-header {
  margin-bottom: 14px;
}

.inventory-header h2 {
  color: #2c5870;
}

.filter-bar {
  border-color: #c4d8e3;
  border-radius: 12px;
  background: #edf4f7;
}

.soft-reminder {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
  padding: 13px 17px;
  overflow: hidden;
  border: 2px solid #d7c8a3;
  border-radius: 14px;
  background: #fff3cc;
}

.soft-reminder-copy span,
.soft-reminder-copy strong,
.soft-reminder-copy p {
  display: block;
}

.soft-reminder-copy span {
  margin-bottom: 2px;
  color: #a4803e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.soft-reminder-copy strong {
  color: #765c31;
  font-size: 15px;
}

.soft-reminder-copy p {
  margin: 2px 0 0;
  color: #8c754d;
  font-size: 11px;
}

.soft-reminder-figures {
  display: flex;
  align-items: end;
  gap: 5px;
  font-size: 31px;
  white-space: nowrap;
}

.inventory-list {
  gap: 10px;
}

.inventory-item {
  min-height: 112px;
  border: 2px solid #c4d8e3;
  border-left: 5px solid #73a9be;
  border-radius: 13px;
  background: #fffefa;
  box-shadow: 0 5px 0 rgba(64, 101, 120, 0.07);
}

.inventory-item.status-warning {
  border-left-color: #e4b45f;
}

.inventory-item.status-danger,
.inventory-item.status-due {
  border-left-color: #de8881;
}

.inventory-item.status-expired {
  border-left-color: #8a9294;
  background: #f5f5f2;
}

.item-photo {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: #e4eff3;
}

.item-photo .product-art {
  border: 0;
  box-shadow: none;
}

.category-chip {
  color: #3f7390;
  background: #deebf2;
}

.opened-chip {
  color: #a26467;
  background: #f7e1e2;
}

.item-actions .icon-button {
  border-radius: 10px;
  border-color: #c4d8e3;
  background: #f4f8f9;
}

.app-footer {
  width: min(1260px, calc(100% - 40px));
  border-top-color: #b9d0dc;
}

@media (max-width: 980px) {
  .app-main {
    grid-template-columns: 172px minmax(0, 1fr);
    column-gap: 14px;
  }

  .hero-figures {
    right: 14px;
    transform: scale(.8);
    transform-origin: right bottom;
  }
}

@media (max-width: 880px) and (min-width: 741px) {
  .inventory-item {
    grid-template-columns: 64px minmax(120px, 1.4fr) minmax(90px, .8fr) 88px 68px;
    gap: 10px;
    padding: 10px;
  }

  .item-photo {
    width: 64px;
    height: 64px;
  }

  .item-actions {
    gap: 3px;
  }

  .item-actions .icon-button {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }
}

@media (max-width: 740px) {
  .app-main {
    display: block;
    width: min(100% - 24px, 620px);
    padding-block: 20px 36px;
  }

  .page-heading {
    min-height: 192px;
    margin-bottom: 16px;
    padding: 21px;
  }

  .page-heading h1 {
    max-width: 60%;
    font-size: 22px;
  }

  .page-heading .add-button {
    position: absolute;
    z-index: 3;
    top: 20px;
    right: 18px;
    width: 46px;
    min-width: 46px;
    height: 46px;
    padding: 0;
    overflow: hidden;
    gap: 0;
    color: transparent;
  }

  .page-heading .add-button svg {
    position: absolute;
    color: #2e566e;
  }

  .hero-figures {
    right: -34px;
    bottom: 5px;
    transform: scale(.63);
    transform-origin: right bottom;
  }

  .directory-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
    padding: 8px;
  }

  .directory-button {
    justify-content: center;
    padding: 9px 5px;
    font-size: 12px;
  }

  .directory-button.directory-manage {
    grid-column: 1 / -1;
  }

  .status-grid {
    margin-bottom: 17px;
  }

  .inventory-section {
    padding: 14px;
  }

  .soft-reminder {
    align-items: flex-start;
  }

  .soft-reminder-figures {
    align-self: center;
    font-size: 24px;
  }

  .app-footer {
    width: min(100% - 24px, 620px);
  }
}

@media (max-width: 480px) {
  .soft-reminder-figures {
    display: none;
  }
}
