[hidden] {
  display: none !important;
}

.sync-status {
  color: #438a75;
  font-size: 10px;
  margin: 4px 0 0;
}

.sync-status.error {
  color: #bf5360;
}

.save-button:disabled {
  opacity: 0.65;
}

.history-controls {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.filter-buttons,
.sort-buttons {
  display: flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid #e6e1ed;
  border-radius: 14px;
  background: #f7f4fb;
}

.history-controls button {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #827d99;
  font: 700 17px "DM Sans", sans-serif;
}

.history-controls button.selected {
  background: #7358d9;
  color: #fff;
  box-shadow: 0 3px 8px #7358d940;
}

.expires {
  max-width: 112px;
  line-height: 1.25;
}

.expires.expired {
  font-weight: 700;
}

.milk-item.milk-expired {
  border-color: #df8792;
  background: #fff0f1;
  box-shadow: inset 4px 0 0 #c85463, 0 3px 10px #8d263016;
}

.milk-item.milk-expired .item-main,
.milk-item.milk-expired .expires {
  color: #8b7f84;
  text-decoration: line-through;
  text-decoration-color: #c85463;
  text-decoration-thickness: 1.5px;
}

.milk-item.milk-expired .symbol {
  filter: grayscale(1);
  opacity: 0.55;
}

.milk-item.milk-expired .delete {
  color: #c85463;
}

.entry-actions {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
}

.edit-entry,
.delete {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.edit-entry {
  color: #7358d9;
  font-size: 19px;
}

.edit-entry:active,
.delete:active {
  background: #efecf7;
}

.login-dialog {
  max-width: 390px;
}

.login-dialog::backdrop {
  background: #29243be8;
}

.login-dialog form {
  padding: 30px 24px 25px;
  text-align: center;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 20px;
  background: #ded7ff;
  color: #4e3caa;
  font: 700 25px Fraunces, serif;
}

.login-copy {
  margin: 8px 0 22px;
  color: #827d99;
  font-size: 12px;
}

.login-dialog .field-label {
  text-align: left;
}

.form-error {
  min-height: 17px;
  margin: 9px 0 0;
  color: #bf5360;
  font-size: 11px;
}

.feeding-schedule {
  margin-bottom: 28px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #ddd5fa;
  border-radius: 22px;
  background: linear-gradient(145deg, #f4f0ff, #fff);
  box-shadow: 0 7px 20px #3e326b14;
  transition: border-color 0.25s, background 0.25s;
}

.schedule-top,
.deadline-row,
.last-feeding {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reminder-button {
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #d9d1f1;
  border-radius: 12px;
  background: #fff;
  color: #685c94;
  padding: 8px 10px;
  font: 600 10px "DM Sans", sans-serif;
}

.reminder-button.enabled {
  border-color: #8ecbbb;
  background: #e5f7f2;
  color: #307761;
}

.schedule-empty {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 15px;
  padding: 13px;
  border-radius: 14px;
  background: #fff;
}

.schedule-empty > span {
  font-size: 25px;
}

.schedule-empty b,
.schedule-empty small {
  display: block;
}

.schedule-empty b {
  font-size: 13px;
}

.schedule-empty small {
  margin-top: 2px;
  color: #827d99;
  font-size: 10px;
}

.deadline-row {
  align-items: end;
  margin-top: 18px;
}

.deadline-row small,
.last-feeding small {
  display: block;
  color: #827d99;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.deadline-row strong {
  display: block;
  margin-top: 2px;
  color: #4e3caa;
  font: 700 34px Fraunces, serif;
}

.countdown-box {
  text-align: right;
}

.countdown-box strong {
  font: 700 17px "DM Sans", sans-serif;
}

.feeding-progress {
  height: 7px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 10px;
  background: #ddd7ec;
}

.feeding-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #7358d9;
  transition: width 1s linear, background 0.25s;
}

.feeding-alert {
  display: none;
  margin-top: 11px;
  border-radius: 11px;
  padding: 9px 11px;
  font-size: 11px;
  font-weight: 700;
}

.last-feeding {
  justify-content: flex-start;
  gap: 10px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid #e3ddf0;
}

.last-feeding .last-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #dff3ed;
  color: #3f8b73;
  font-size: 13px;
  font-weight: 700;
}

.last-feeding div {
  flex: 1;
}

.last-feeding b {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.last-feeding time {
  color: #4e495e;
  font: 700 13px "DM Sans", sans-serif;
}

.upcoming {
  margin-top: 14px;
}

.upcoming p {
  margin: 0 0 7px;
  color: #827d99;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.upcoming-times {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.upcoming-times span {
  border-radius: 10px;
  background: #fff;
  padding: 8px 5px;
  color: #5e5870;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.schedule-note {
  margin: 13px 0 0;
  color: #90899e;
  font-size: 9px;
  line-height: 1.35;
}

.feeding-schedule.schedule-soon {
  border-color: #efb66f;
  background: linear-gradient(145deg, #fff6e8, #fff);
}

.feeding-schedule.schedule-soon .feeding-progress span {
  background: #e59a3c;
}

.feeding-schedule.schedule-soon .feeding-alert {
  display: block;
  background: #ffedcf;
  color: #9a5c16;
}

.feeding-schedule.schedule-overdue {
  border-color: #d66a78;
  background: linear-gradient(145deg, #fff0f1, #fff);
  box-shadow: 0 7px 22px #a02a371c;
}

.feeding-schedule.schedule-overdue .deadline-row strong {
  color: #b84251;
}

.feeding-schedule.schedule-overdue .feeding-progress span {
  background: #c85463;
}

.feeding-schedule.schedule-overdue .feeding-alert {
  display: block;
  background: #fbd9dd;
  color: #a62f3e;
}

/* Nowoczesna, mobilna warstwa wizualna */
:root {
  --ink: #242337;
  --muted: #77758a;
  --purple: #6852d5;
  --line: #e8e7ee;
}

body {
  background:
    radial-gradient(circle at 12% -5%, #e9e4ff 0, transparent 28%),
    linear-gradient(180deg, #f8f8fb 0%, #f3f4f7 100%);
}

.app-shell {
  padding: max(24px, env(safe-area-inset-top)) 18px 34px;
}

.topbar {
  margin-bottom: 20px;
}

.topbar h1 {
  font-size: 30px;
}

.avatar {
  width: 44px;
  height: 44px;
  border: 1px solid #dcd7f2;
  background: #fff;
  box-shadow: 0 4px 14px #352e5d14;
}

.summary {
  border: 1px solid #3a3752;
  background: linear-gradient(135deg, #29273d, #3a3655);
  box-shadow: 0 9px 24px #2522381f;
}

.summary span {
  font-size: 19px;
}

.feeding-schedule {
  border: 1px solid #ded9f2;
  background: linear-gradient(145deg, #f3f0ff 0%, #ffffff 72%);
  box-shadow: 0 10px 30px #3c326d12;
}

.quick-grid {
  gap: 10px;
}

.quick-card {
  min-height: 118px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 5px 18px #2f2a4410;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.quick-card:active {
  transform: scale(0.97);
}

.quick-card i {
  width: 38px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.milk-card i {
  background: #e9e4ff;
}

.poop-card i {
  background: #fff0db;
}

.pump-card i {
  background: #dcf4ed;
}

.quick-card b {
  font-size: 13px;
}

.milk-panel,
.timeline-panel {
  margin-top: 30px;
}

.milk-item,
.event {
  min-height: 62px;
  border-color: #e7e6ed;
  background: #ffffffd9;
  box-shadow: 0 4px 15px #2d293909;
}

.symbol {
  border-radius: 13px;
}

.history-controls {
  margin-top: 13px;
}

.filter-buttons,
.sort-buttons {
  border-color: #e2e0e9;
  background: #efeff4;
}

.history-controls button {
  min-width: 40px;
  height: 38px;
}

.history-controls button.selected {
  background: #6852d5;
  box-shadow: 0 4px 10px #6852d53d;
}

.bottom-nav {
  border-top-color: #e3e2e9;
  background: #fffffff2;
  box-shadow: 0 -8px 24px #29243b0a;
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-width: 62px;
  min-height: 44px;
}

dialog {
  border: 1px solid #ffffff;
  box-shadow: 0 24px 90px #19142566;
}

dialog form {
  padding: 25px;
}

input {
  min-height: 48px;
  border-bottom-color: #d8d4e2;
}

.choice-row button,
.poop-options button {
  min-height: 44px;
}

.save-button {
  min-height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7358d9, #6048c3);
  box-shadow: 0 7px 18px #6852d538;
}

.auth-locked {
  overflow: hidden;
}

.auth-locked .app-shell,
.auth-locked .bottom-nav {
  pointer-events: none;
  user-select: none;
  filter: blur(5px);
  opacity: 0.3;
}

.login-dialog {
  z-index: 100;
}

.login-dialog h2 {
  font-size: 24px;
}

@media (min-width: 650px) {
  .app-shell {
    margin-top: 24px;
    border: 1px solid #e7e4ef;
    box-shadow: 0 18px 60px #332b5d14;
  }
}

.stats-panel {
  margin-top: 34px;
  padding-bottom: 24px;
  scroll-margin-top: 18px;
}

.timeline-panel {
  scroll-margin-top: 18px;
}

.stats-heading > p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.stats-cards article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  padding: 12px 9px;
  box-shadow: 0 5px 17px #2f2a440c;
}

.stats-cards span,
.stats-cards small,
.stats-cards strong,
.stats-cards em {
  display: block;
}

.stats-cards span {
  margin-bottom: 8px;
  color: #6852d5;
  font-size: 17px;
}

.stats-cards small {
  min-height: 25px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.2;
}

.stats-cards strong {
  overflow: hidden;
  margin-top: 4px;
  color: var(--ink);
  font: 700 17px Fraunces, serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-cards em {
  min-height: 19px;
  margin-top: 2px;
  color: #9a97a7;
  font-size: 8px;
  font-style: normal;
  line-height: 1.15;
}

.chart-card {
  margin-top: 11px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: #fff;
  padding: 17px 14px 14px;
  box-shadow: 0 7px 22px #2f2a440d;
}

.chart-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.chart-heading small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.chart-heading h3 {
  margin: 2px 0 0;
  font: 700 18px Fraunces, serif;
}

.chart-heading > span {
  border-radius: 9px;
  background: #f0edff;
  color: #6852d5;
  padding: 6px 8px;
  font-size: 9px;
  font-weight: 700;
}

.feeding-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 188px;
  margin-top: 16px;
  padding: 18px 1px 0;
  border-bottom: 1px solid #e6e3ec;
  background: repeating-linear-gradient(to top, transparent 0, transparent 41px, #f0eef4 42px);
}

.chart-column {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  justify-content: end;
  align-items: center;
}

.chart-value {
  min-height: 16px;
  color: #5c5770;
  font-size: 9px;
  font-weight: 700;
}

.chart-bar-track {
  display: flex;
  width: 100%;
  max-width: 29px;
  height: 130px;
  align-items: end;
  border-radius: 8px 8px 3px 3px;
  background: #f1eff7;
}

.chart-bar {
  width: 100%;
  min-height: 3px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #8c76ea, #6852d5);
  transition: height 0.3s ease;
}

.chart-day {
  margin: 7px 0 -17px;
  color: #8a8797;
  font-size: 9px;
  font-weight: 600;
}

.chart-column.today .chart-day {
  color: #c77527;
  font-weight: 800;
}

.chart-column.today .chart-bar {
  background: linear-gradient(180deg, #f2b16d, #df8733);
}

.chart-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 9px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: #6852d5;
}

.chart-legend small {
  text-align: right;
}

.last-stat-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 11px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  padding: 13px;
}

.last-stat-card small,
.last-stat-card strong {
  display: block;
}

.last-stat-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.last-stat-card strong {
  margin-top: 3px;
  font-size: 12px;
}
