* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  font-family: Arial, sans-serif;
  background: url("slika.jpg") center / cover no-repeat;
  color: #1e293b;
}

.app {
  width: min(100%, 680px);
  padding: 28px;
  background: white;
  border-radius: 22px;
  box-shadow: 0 12px 35px #1e293b20;
}

h1 { margin: 0; text-align: center; color: #174ea6; }

.podnaslov {
  margin: 8px 0 24px;
  text-align: center;
  color: #64748b;
}

.unos {
  display: grid;
  grid-template-columns: 1fr 125px auto;
  gap: 8px;
}

input, select, button {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: #2563eb;
  color: white;
  font-weight: bold;
}

button:hover { filter: brightness(.94); }

.filteri { display: flex; gap: 8px; margin: 20px 0; }

.filter { background: #e2e8f0; color: #334155; }

.filter.aktivan { background: #2563eb; color: white; }

.lista {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stavka {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #2563eb;
  border-radius: 12px;
}

.stavka[data-kategorija="Kuća"] { border-left-color: #f59e0b; }
.stavka[data-kategorija="Hobi"] { border-left-color: #8b5cf6; }
.stavka label { flex: 1; overflow-wrap: anywhere; }

.stavka.zavrsen label {
  color: #64748b;
  text-decoration: line-through;
}

.stavka input { min-height: auto; width: 18px; height: 18px; }
.kategorija-oznaka { font-size: 12px; color: #64748b; }
.obrisi { min-height: 34px; padding: 6px 10px; background: #ef4444; }

.statistika {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 22px 0 14px;
  padding: 14px;
  background: #eff6ff;
  border-radius: 12px;
  font-size: 14px;
}

.obrisi-sve { width: 100%; background: #dc2626; }
.prazno { padding: 18px; text-align: center; color: #64748b; }

@media (max-width: 560px) {
  body { padding: 12px; }
  .app { padding: 18px; }
  .unos { grid-template-columns: 1fr; }
  .statistika { flex-direction: column; }
}


/* PWA instalacija */
.install-shortcut { position: fixed; right: 16px; bottom: 16px; z-index: 20; border: 0; border-radius: 999px; padding: 12px 17px; background: #174ea6; color: #fff; font-weight: 700; box-shadow: 0 5px 18px #0f285044; cursor: pointer; }
.install-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; background: #0f172acc; backdrop-filter: blur(5px); }
.install-overlay[hidden] { display: none; }
.install-card { width: min(100%, 420px); max-height: 90vh; overflow-y: auto; padding: 26px; border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 20px 60px #0004; }
.install-logo { width: 86px; height: 86px; object-fit: cover; border-radius: 20px; box-shadow: 0 5px 16px #174ea633; }
.install-card h2 { margin: 16px 0 8px; color: #174ea6; font-size: 1.4rem; }
.install-card p { color: #475569; line-height: 1.55; }
.install-primary, .install-secondary, .install-dismiss { display: block; width: 100%; margin-top: 10px; padding: 13px 16px; border: 0; border-radius: 12px; font-weight: 700; cursor: pointer; }
.install-primary { color: #fff; background: #174ea6; }
.install-secondary { color: #174ea6; background: #eaf2ff; }
.install-dismiss { color: #64748b; background: transparent; }
.install-instructions { margin: 14px 0; padding: 13px; border-radius: 12px; background: #f1f5f9; color: #334155; text-align: left; line-height: 1.55; }
