:root {
  --ink: #242721;
  --muted: #77796f;
  --paper: #f7f5ef;
  --white: #fffefa;
  --green: #48604d;
  --green-dark: #334a39;
  --line: #e6e2d8;
  --shadow: 0 16px 50px rgba(53, 57, 48, 0.09);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.mobile-only { display: none; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(200, 218, 193, .55), transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(237, 207, 163, .45), transparent 32%),
    var(--paper);
}

.login-card {
  width: min(440px, 100%);
  padding: 44px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 32px;
  background: rgba(255, 254, 250, .88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  text-align: center;
}

.brand-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--green);
  color: white;
  font: 700 29px Georgia, serif;
  transform: rotate(-3deg);
  box-shadow: 0 9px 20px rgba(72, 96, 77, .25);
}
.brand-mark.small { width: 42px; height: 42px; margin: 0; border-radius: 13px; font-size: 20px; }
.eyebrow { margin: 0 0 8px; color: #889081; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.login-card h1 { margin: 0; font: 600 50px Georgia, serif; }
.login-copy { margin: 12px auto 32px; max-width: 310px; color: var(--muted); line-height: 1.55; }
.auth-mode-copy { margin: 0 0 20px; color: var(--green-dark); font-size: 14px; font-weight: 750; }
label { display: block; margin: 16px 0 8px; text-align: left; font-size: 13px; font-weight: 700; }
.label-hint { color: var(--muted); font-size: 11px; font-weight: 500; }
input, select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  padding: 0 15px;
}
input:focus, select:focus { border-color: #788d7a; box-shadow: 0 0 0 3px rgba(72,96,77,.1); }
.password-row { position: relative; }
.password-row input { padding-right: 48px; }
.eye-button { position: absolute; right: 5px; top: 5px; width: 40px; height: 40px; border: 0; background: transparent; opacity: .55; }
.primary-button { width: 100%; min-height: 52px; margin-top: 8px; border: 0; border-radius: 14px; color: white; background: var(--green); font-weight: 750; box-shadow: 0 8px 18px rgba(72,96,77,.2); }
.primary-button:hover { background: var(--green-dark); }
.secondary-button { width: 100%; min-height: 48px; margin-top: 9px; border: 1px solid var(--line); border-radius: 14px; background: transparent; color: var(--green-dark); font-weight: 750; }
.secondary-button:hover { background: #f0f2ec; }
.text-button { width: 100%; padding: 12px 5px 4px; border: 0; background: transparent; color: var(--muted); font-size: 12px; }
.text-button:hover { color: var(--green-dark); }
.form-error { min-height: 20px; margin: 7px 0 0; color: #a94d43; font-size: 12px; text-align: left; }
.privacy-note { margin: 24px 0 0; color: #96988f; font-size: 12px; }
.language-select { width: auto; min-height: 34px; margin-top: 14px; padding: 0 9px; border-radius: 10px; color: var(--muted); font-size: 11px; }
.sidebar-language { margin: 10px 8px 0 auto; background: transparent; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 280px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #eeece5;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.sidebar-brand strong { display: block; font: 600 22px Georgia, serif; }
.sidebar-brand span, .sidebar-footer span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.dashboard-link { width: 100%; margin: 0 0 12px; padding: 12px 13px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 12px; background: transparent; color: #4e534b; font-weight: 750; text-align: left; }
.dashboard-link:hover, .dashboard-link.active { background: var(--white); box-shadow: 0 4px 14px rgba(60,60,50,.05); }
.dashboard-link span { font-size: 18px; color: var(--green); }
.project-home-link { width: 100%; margin: 0 0 9px; padding: 11px 13px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 12px; background: transparent; color: #4e534b; font-weight: 750; text-align: left; }
.project-home-link:hover, .project-home-link.active { background: rgba(255,255,255,.65); }
.project-home-link span { color: var(--green); font-size: 17px; }
.project-switcher { margin: 0 0 20px; padding: 0 5px 18px; border-bottom: 1px solid #dcd8ce; }
.project-switcher > label { margin: 0 0 7px 4px; color: #8b8d84; font-size: 9px; letter-spacing: .14em; }
.project-switcher > div { display: flex; gap: 6px; }
.project-switcher select { min-height: 44px; padding: 0 10px; border-color: #d9d5ca; background: rgba(255,255,255,.65); font-size: 13px; font-weight: 750; }
.project-switcher button { flex: 0 0 44px; border: 1px solid #d9d5ca; border-radius: 12px; background: var(--white); color: var(--green); font-size: 20px; }
.lists-nav { display: grid; gap: 6px; }
.list-link {
  width: 100%;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #3f433d;
  font-weight: 750;
  text-align: left;
}
.list-link:hover { background: rgba(255,255,255,.55); }
.list-link.active { background: var(--white); color: var(--ink); box-shadow: 0 4px 14px rgba(60,60,50,.06); font-weight: 700; }
.list-link .count { margin-left: auto; min-width: 23px; padding: 3px 6px; border-radius: 9px; background: rgba(72,96,77,.1); color: var(--green); font-size: 11px; text-align: center; }
.new-list-button { margin-top: 14px; padding: 12px; border: 1px dashed #b9b8af; border-radius: 13px; background: transparent; color: #696b64; text-align: left; }
.costs-button { margin-top: 7px; border-style: solid; border-color: #d7cfbe; color: #77684e; background: rgba(255,255,255,.28); }
.shopping-button { margin-top: 7px; border-color: #b9c9b8; color: var(--green-dark); }
.new-list-button b { float: right; font-weight: 700; }
.sidebar-footer { margin-top: auto; padding: 16px 8px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid #dcd8ce; }
.sidebar-footer strong { display: block; font-size: 12px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: white; background: #b78367; font-weight: 800; }
.icon-button, .more-button { border: 0; background: transparent; color: #6e7169; font-size: 22px; }
.sidebar-footer .icon-button { margin-left: auto; font-size: 18px; }

.main-content { grid-column: 2; width: min(920px, 100%); margin: 0 auto; padding: 55px 60px 150px; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 35px; }
.dashboard-brand { margin: -20px 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dashboard-logo { display: flex; align-items: center; gap: 10px; }
.dashboard-logo > span { font: 600 21px Georgia, serif; }
.dashboard-brand .brand-mark { margin: 0; }
.dashboard-account { display: flex; align-items: center; gap: 8px; }
.dashboard-account label { color: var(--muted); font-size: 12px; }
.dashboard-account .language-select { margin: 0; background: #fff; }
.dashboard-logout { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; }
.dashboard-logout:hover { color: var(--ink); border-color: #c9c5bb; }
.dashboard-heading h1 { margin: 0; font: 600 clamp(36px, 5vw, 50px) Georgia, serif; }
.dashboard-heading p:last-child { margin: 11px 0 0; color: var(--muted); }
.dashboard-heading .primary-button { width: auto; min-width: 170px; padding: 0 20px; }
.project-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.project-card { position: relative; min-height: 170px; padding: 0; display: flex; border: 1px solid var(--line); border-radius: 22px; background: var(--white); color: var(--ink); box-shadow: 0 8px 25px rgba(53,57,48,.05); transition: transform .16s, box-shadow .16s; overflow: hidden; }
.project-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(53,57,48,.09); }
.project-card-main { width: 100%; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; border: 0; background: transparent; color: inherit; text-align: left; }
.project-card-options { position: absolute; right: 14px; top: 14px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 11px; background: #f2f1eb; color: #6f736b; font-weight: 800; letter-spacing: .08em; }
.project-card-options:hover { background: #e8e7df; }
.project-card .project-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: #edf0e8; font-size: 23px; }
.project-card h2 { margin: 17px 0 5px; font: 600 22px Georgia, serif; }
.project-card p { margin: 0; color: var(--muted); font-size: 12px; }
.project-card .project-meta { width: 100%; margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; border-top: 1px solid #efede7; color: #777b72; font-size: 11px; }
.project-overview-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.back-button { margin: 0 0 19px; padding: 7px 10px; border: 0; border-radius: 10px; background: transparent; color: #6d746a; font-size: 12px; font-weight: 750; }
.back-button:hover { background: #e9ebe5; color: var(--green-dark); }
.list-back { margin: 0 0 8px -10px; }
.project-overview-heading h1 { margin: 0; font: 600 clamp(36px,5vw,50px) Georgia, serif; }
.project-overview-heading p:last-child { margin: 10px 0 0; color: var(--muted); }
.overview-options { width: 46px; height: 46px; border-radius: 14px; background: var(--white); }
.overview-actions { margin: 0 0 36px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.overview-actions button { min-height: 112px; padding: 17px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 18px; background: var(--white); color: var(--ink); text-align: left; }
.overview-actions button:hover { border-color: #becabc; background: #fbfcf9; }
.overview-actions span { font-size: 24px; }
.overview-actions strong { margin-top: 9px; font-size: 13px; }
.overview-actions small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.overview-section-title { margin: 32px 0 13px; color: #73766e; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.add-section-title { margin-top: 34px; padding-top: 25px; border-top: 1px solid var(--line); }
.overview-list-cards { display: grid; grid-template-columns: 1fr; gap: 9px; }
.overview-list-card { min-height: 90px; padding: 16px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 17px; background: var(--white); color: var(--ink); text-align: left; }
.overview-list-card:hover { box-shadow: 0 8px 20px rgba(53,57,48,.07); }
.overview-list-card > span:first-child { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: #eef0ea; font-size: 21px; }
.overview-list-card strong, .overview-list-card small { display: block; }
.overview-list-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.overview-list-card > b { color: #9b9e96; font-size: 18px; }
.project-options-panel { position: relative; padding: 32px; }
.project-options-panel h2 { margin: 0 0 22px; font: 600 30px Georgia, serif; }
.project-menu-actions { display: grid; gap: 7px; }
.project-menu-actions > button { width: 100%; padding: 12px; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; border: 1px solid #ece9e1; border-radius: 14px; background: #fbfaf6; color: var(--ink); text-align: left; }
.project-menu-actions > button:hover { border-color: #d9ded5; background: #f3f6f0; }
.project-menu-actions div strong, .project-menu-actions div small { display: block; }
.project-menu-actions div strong { font-size: 13px; }
.project-menu-actions div small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.project-menu-actions > button > b { color: #a2a49d; font-size: 20px; }
.project-edit-form { margin-top: 16px; }
.invite-preview { padding: 22px 10px 8px; text-align: center; }
.invite-preview .invite-icon { width: 52px; height: 52px; margin: auto; display: grid; place-items: center; border-radius: 16px; background: #e8eee5; font-size: 23px; }
.invite-preview h3 { margin: 13px 0 5px; font: 600 20px Georgia, serif; }
.invite-preview p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.topbar { display: flex; align-items: center; gap: 16px; }
.topbar h1 { margin: 0; font: 600 clamp(32px, 5vw, 48px) Georgia, serif; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.sync-status { color: var(--muted); font-size: 12px; }
.sync-status i { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #6b986d; }
.menu-button { display: none; }
.summary-row { margin: 28px 0 22px; padding-bottom: 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.summary-row p { margin: 0; color: var(--muted); font-size: 13px; }
.summary-row button { border: 0; background: transparent; color: #9a7666; font-size: 12px; }

.category-group { margin-bottom: 28px; }
.category-heading { margin: 0 0 11px; display: flex; align-items: center; gap: 8px; color: #65685f; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.category-heading span { width: 9px; height: 9px; border-radius: 50%; background: var(--category); }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.product-card {
  min-height: 64px;
  display: flex;
  align-items: center;
  border: 1px solid color-mix(in srgb, var(--category), white 60%);
  border-radius: 16px;
  background: color-mix(in srgb, var(--category), white 88%);
  color: var(--ink);
  text-align: left;
  transition: transform .15s, opacity .15s;
}
.product-toggle { min-width: 0; flex: 1; padding: 12px 10px 12px 15px; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: inherit; text-align: left; }
.product-actions { padding-right: 8px; display: flex; align-items: center; gap: 2px; }
.product-actions button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: #7e8179; font-size: 15px; }
.product-actions button:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.product-card:active { transform: scale(.98); }
.checkmark { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border: 1.5px solid var(--category); border-radius: 8px; color: white; font-size: 15px; }
.product-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.product-copy { flex: 1; min-width: 0; }
.product-copy .product-name { display: block; }
.product-details { display: block; margin-top: 4px; color: #777b72; font-size: 10px; font-weight: 500; }
.remove-product, .edit-product { opacity: 0; }
.product-card:hover .remove-product, .product-card:hover .edit-product { opacity: 1; }
.product-card.bought { opacity: .48; background: #f3f2ed; border-color: #dddcd6; }
.product-card.bought .checkmark { background: var(--category); }
.product-card.bought .product-name { text-decoration: line-through; }
.empty-state { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty-state div { width: 60px; height: 60px; margin: auto; display: grid; place-items: center; border-radius: 50%; background: #e3e9df; color: var(--green); font-size: 26px; }
.empty-state h2 { margin-bottom: 5px; color: var(--ink); font: 600 24px Georgia, serif; }
.empty-state p { margin-top: 0; font-size: 13px; }

.add-product {
  position: relative;
  width: 100%;
  margin-top: 42px;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid rgba(220,218,208,.9);
  border-radius: 20px;
  background: rgba(255,254,250,.92);
  box-shadow: 0 14px 40px rgba(53,57,48,.14);
  backdrop-filter: blur(12px);
}
.add-fields { flex: 1; display: grid; grid-template-columns: 1fr; gap: 8px; }
.add-product:not(.expanded) #productCategory,
.add-product:not(.expanded) .optional-field { display: none; }
.add-product.expanded .add-fields { grid-template-columns: minmax(180px,1fr) 180px 120px minmax(150px,.8fr); }
.add-product input, .add-product select { border: 0; background: transparent; }
.add-product select { color: #62665e; font-size: 13px; }
.add-product > button { width: 52px; border: 0; border-radius: 14px; background: var(--green); color: white; font-size: 25px; }
.add-product > .details-toggle { width: 40px; background: #ecefe9; color: #667064; font-size: 16px; transition: transform .15s; }
.add-product.expanded > .details-toggle { transform: rotate(180deg); }
.recent-products { flex: 0 0 100%; order: -1; padding: 7px; display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); background: transparent; }
.recent-products::before { content: attr(data-label); padding: 7px 4px; color: var(--muted); font-size: 10px; }
.recent-products button { flex: 0 0 auto; padding: 6px 10px; border: 0; border-radius: 999px; background: #edf0e9; color: #4c574d; font-size: 11px; }
.undo-toast { position: fixed; z-index: 100; left: 50%; bottom: 25px; min-width: 260px; padding: 12px 14px 12px 17px; display: flex; align-items: center; justify-content: space-between; gap: 25px; transform: translateX(-50%); border-radius: 14px; background: #292e29; color: white; box-shadow: 0 12px 30px rgba(0,0,0,.2); font-size: 12px; }
.undo-toast button { padding: 7px 10px; border: 0; border-radius: 9px; background: #dce8d7; color: var(--green-dark); font-weight: 800; }

dialog { width: min(430px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 24px; background: var(--white); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(38,40,35,.38); backdrop-filter: blur(3px); }
dialog form { position: relative; padding: 32px; }
dialog h2 { margin: 0 0 24px; font: 600 30px Georgia, serif; }
.dialog-close { position: absolute; right: 18px; top: 14px; border: 0; background: transparent; font-size: 24px; color: var(--muted); }
.danger-button { width: 100%; min-height: 46px; margin-top: 10px; border: 1px solid #ead5d1; border-radius: 14px; background: #fff8f6; color: #a34f45; font-weight: 700; }
.simple-group { margin-top: 4px; }
.add-product.simple-mode .add-fields { grid-template-columns: 1fr; }

.expenses-view { margin-top: 30px; }
.expense-toolbar {
  display: grid;
  grid-template-columns: 1fr 190px;
  align-items: end;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
}
.expenses-view h2 { margin: 0 0 14px; font: 600 21px Georgia, serif; }
.people-chips { min-height: 34px; display: flex; flex-wrap: wrap; gap: 7px; }
.person-chip { padding: 7px 8px 7px 11px; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; background: #e8eee7; color: var(--green-dark); font-size: 13px; font-weight: 700; }
.person-chip button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: rgba(72,96,77,.12); color: var(--green); }
.muted-hint { margin: 7px 0; color: var(--muted); font-size: 12px; }
.inline-form { margin-top: 12px; display: flex; gap: 8px; }
.inline-form input { min-height: 42px; }
.inline-form button { flex: 0 0 auto; padding: 0 16px; border: 0; border-radius: 12px; background: #e7ebe4; color: var(--green-dark); font-weight: 700; }
.add-expense-button { margin: 0; }
.add-expense-button:disabled { cursor: not-allowed; opacity: .45; }
.expense-columns { margin-top: 28px; display: grid; grid-template-columns: 1.12fr .88fr; gap: 28px; }
.expense-list, .settlements { display: grid; gap: 9px; }
.expense-card { padding: 15px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); }
.expense-card strong, .expense-card span, .expense-card small { display: block; }
.expense-card span { margin-top: 4px; color: #676b62; font-size: 12px; }
.expense-card small { margin-top: 3px; color: #92948d; font-size: 10px; }
.expense-card > b { white-space: nowrap; font-size: 14px; }
.expense-card > button { border: 0; background: transparent; color: #aaa89e; font-size: 18px; }
.expense-actions { display: flex; align-items: center; gap: 3px; }
.expense-actions button { padding: 5px; border: 0; background: transparent; color: #777b72; font-size: 15px; }
.soft-empty { padding: 28px 18px; border: 1px dashed #d6d2c8; border-radius: 15px; color: var(--muted); font-size: 12px; text-align: center; }
.currency-settlement { padding: 16px; border-radius: 15px; background: #e9eee7; }
.currency-settlement h3 { margin: 0 0 10px; color: var(--green-dark); font-size: 12px; letter-spacing: .1em; }
.transfer { padding: 9px 0; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(72,96,77,.12); font-size: 12px; }
.transfer b { white-space: nowrap; }
.balanced { margin: 0; color: var(--green); font-size: 13px; }
.amount-row { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.participant-checks { display: flex; flex-wrap: wrap; gap: 7px; }
.check-chip { margin: 0; cursor: pointer; }
.check-chip input { position: absolute; opacity: 0; pointer-events: none; }
.check-chip span { padding: 9px 12px; display: block; border: 1px solid var(--line); border-radius: 999px; background: var(--white); color: #6d7068; font-size: 12px; }
.check-chip input:checked + span { border-color: #8da08d; background: #e5ede3; color: var(--green-dark); font-weight: 700; }

@media (max-width: 760px) {
  .mobile-only, .menu-button { display: block; }
  .app-shell { display: block; }
  .sidebar { width: min(310px, 87vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(33,36,31,.35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .drawer-backdrop.open { opacity: 1; pointer-events: auto; }
  .sidebar-brand .mobile-only { margin-left: auto; }
  .main-content { width: 100%; padding: 28px 18px 145px; }
  .dashboard-heading { align-items: stretch; flex-direction: column; }
  .dashboard-heading .primary-button { width: 100%; }
  .dashboard-brand { margin-top: -8px; align-items: flex-start; }
  .dashboard-account { flex-wrap: wrap; }
  .dashboard-account label { display: none; }
  .project-cards { grid-template-columns: 1fr; }
  .overview-actions { display: flex; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
  .overview-actions button { flex: 0 0 175px; min-height: 100px; scroll-snap-align: start; }
  .overview-list-cards { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; }
  .topbar h1 { font-size: 35px; }
  .topbar-actions { gap: 5px; }
  .sync-status { display: none; }
  .product-grid { grid-template-columns: 1fr; }
  .remove-product, .edit-product { width: 40px !important; height: 40px !important; opacity: .8; font-size: 17px !important; }
  .add-product { width: 100%; margin-top: 34px; display: flex; }
  .add-product.expanded { display: grid; grid-template-columns: 1fr 40px 52px; }
  .add-fields, .add-product.expanded .add-fields { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 0; }
  .add-product select { min-height: 40px; border-top: 1px solid var(--line); border-radius: 0; }
  .add-product .optional-field { min-height: 40px; padding-right: 15px; border-top: 1px solid var(--line); border-radius: 0; }
  .add-product > button { position: static; flex: 0 0 auto; }
  .add-product.expanded > .details-toggle { grid-column: 2; }
  .add-product.expanded > button[type="submit"] { grid-column: 3; }
  .add-product input { padding-right: 60px; }
  .add-product .optional-field { padding-right: 15px; }
  .recent-products { grid-column: 1 / -1; }
  .expense-toolbar { grid-template-columns: 1fr; }
  .expense-columns { grid-template-columns: 1fr; }
  .add-expense-button { width: 100%; }
  .inline-form { align-items: stretch; }
  .expense-card { grid-template-columns: 1fr auto; }
  .expense-card > button { grid-column: 2; }
}

@media (max-width: 420px) {
  .login-card { padding: 34px 24px; border-radius: 25px; }
}
