:root {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    system-ui,
    sans-serif;

  color: #22221f;
  background: #f4f1ea;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f4f1ea;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    linear-gradient(
      180deg,
      #faf8f3 0%,
      #f1ede4 100%
    );
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color:
    transparent;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.loading-screen,
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    22px
    max(24px, env(safe-area-inset-bottom));
}

.loading-screen {
  align-content: center;
  gap: 14px;
  color: #6d6a62;
}

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px;
  background: #252621;
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  box-shadow:
    0 12px 28px
    rgba(32, 31, 27, 0.14);
}

.login-card {
  width: min(100%, 430px);
  padding: 32px 26px 28px;
  border: 1px solid
    rgba(44, 43, 39, 0.08);
  border-radius: 28px;
  background:
    rgba(255, 255, 255, 0.78);
  box-shadow:
    0 24px 70px
    rgba(53, 49, 40, 0.10);
  backdrop-filter: blur(18px);
}

.login-heading {
  margin: 26px 0 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: #77736a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(
    30px,
    8vw,
    42px
  );
  line-height: 1.04;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.muted {
  margin-bottom: 0;
  color: #716e67;
  line-height: 1.5;
}

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

label {
  display: grid;
  gap: 8px;
  color: #514f49;
  font-size: 14px;
  font-weight: 650;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #d7d2c8;
  border-radius: 14px;
  outline: none;
  background: #fffefa;
  color: #22221f;
  font-size: 17px;
}

input:focus {
  border-color: #55574e;
  box-shadow:
    0 0 0 3px
    rgba(85, 87, 78, 0.11);
}

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  min-height: 54px;
  margin-top: 4px;
  border-radius: 15px;
  background: #252621;
  color: #ffffff;
  font-weight: 700;
}

.secondary-button {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 12px;
  background: #ebe7de;
  color: #373732;
  font-weight: 650;
}

.text-button {
  padding: 8px 0 8px 14px;
  background: transparent;
  color: #69665f;
  font-weight: 650;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.error-box {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 13px;
  background: #fff0ec;
  color: #813d31;
  font-size: 14px;
  line-height: 1.4;
}

.dashboard {
  width: min(
    100%,
    640px
  );
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(22px, env(safe-area-inset-top))
    18px
    max(30px, env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 4px 26px;
}

.topbar h1 {
  margin-bottom: 0;
}

.summary-card {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid
    rgba(44, 43, 39, 0.07);
  border-radius: 22px;
  background:
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 10px 35px
    rgba(55, 50, 42, 0.06);
}

.summary-number {
  display: block;
  font-size: 32px;
  font-weight: 750;
  line-height: 1;
}

.summary-label {
  display: block;
  margin-top: 6px;
  color: #77736a;
  font-size: 13px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 12px;
}

.section-heading span,
.completed-section summary span {
  color: #8a867d;
  font-size: 13px;
}

.shopping-list {
  display: grid;
  gap: 9px;
}

.shopping-item {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
  border: 1px solid
    rgba(44, 43, 39, 0.07);
  border-radius: 17px;
  background:
    rgba(255, 255, 255, 0.80);
}

.status-dot {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 2px solid #aaa69c;
  border-radius: 50%;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.item-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 560;
}

.is-completed {
  opacity: 0.58;
}

.is-completed .status-dot {
  border-color: #65685e;
  background: #65685e;
}

.is-completed .item-title {
  text-decoration: line-through;
}

.empty-list {
  padding: 24px;
  border: 1px dashed #cbc6bc;
  border-radius: 17px;
  color: #858178;
  text-align: center;
}

.completed-section {
  margin-top: 28px;
}

.completed-section summary {
  display: flex;
  justify-content: space-between;
  margin: 0 4px 12px;
  cursor: pointer;
  color: #5a5852;
  font-size: 16px;
  font-weight: 700;
  list-style: none;
}

.completed-section summary::-webkit-details-marker {
  display: none;
}

footer {
  padding: 30px 4px 10px;
  color: #969187;
  font-size: 12px;
  text-align: center;
}

@media (min-width: 700px) {
  .dashboard {
    padding-top: 46px;
  }

  .login-card {
    padding: 38px 34px 34px;
  }
}
