* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #f2f4f7;
  color: #1c1c1e;
}

header {
  padding: 30px 20px 22px;
  text-align: center;
  background: #ffffff;
  border-bottom: 1px solid #ddd;
}

header h1 {
  margin: 0;
  font-size: 28px;
}

header p {
  margin: 6px 0 0;
  color: #777;
}

main {
  width: 100%;
  max-width: 600px;
  margin: auto;
  padding: 18px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.summary div {
  background: white;
  padding: 16px 5px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.summary strong {
  display: block;
  font-size: 25px;
}

.summary span {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  color: #666;
}

#pridat {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 18px;
  background: #007aff;
  color: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

#pridat:active {
  opacity: 0.8;
}

#zoznam {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.osoba {
  background: white;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.osoba h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.zaplatene {
  border-left: 6px solid #34c759;
}

.nezaplatene {
  border-left: 6px solid #ff3b30;
}
.osoba button {
  border: none;
  border-radius: 9px;
  padding: 10px 12px;
  margin: 5px 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #e9e9eb;
  color: #1c1c1e;
}

.osoba button:first-of-type {
  background: #34c759;
  color: white;
}

.osoba button:active {
  opacity: 0.7;
  transform: scale(0.98);
}

.osoba p {
  margin: 10px 0;
  line-height: 1.4;
}

.osoba h2 {
  margin-bottom: 14px;
}
.ovladanie {
  margin-bottom: 18px;
}

#hladat {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid #d1d1d6;
  border-radius: 12px;
  background: white;
  font-size: 16px;
  outline: none;
}

#hladat:focus {
  border-color: #007aff;
}

.filtre {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.filtre button {
  border: none;
  border-radius: 10px;
  padding: 11px 5px;
  background: #e5e5ea;
  color: #1c1c1e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.filtre button.aktivny {
  background: #007aff;
  color: white;
}

.filtre button:active {
  opacity: 0.75;
}
#datumDialog {
  border: none;
  border-radius: 18px;
  padding: 24px;
  width: 90%;
  max-width: 340px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

#datumDialog::backdrop {
  background: rgba(0,0,0,0.45);
}

#datumDialog h2 {
  margin: 0 0 20px;
  text-align: center;
  font-size: 22px;
}

#datumInput {
  width: 100%;
  padding: 14px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  font-size: 18px;
  margin-bottom: 18px;
}

#datumDialog div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#datumDialog button {
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#datumZrusit {
  background: #e5e5ea;
  color: #1c1c1e;
}

#datumPotvrdit {
  background: #007aff;
  color: white;
}
#osobaDialog {
  border: none;
  border-radius: 18px;
  padding: 24px;
  width: 92%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

#osobaDialog::backdrop {
  background: rgba(0,0,0,0.45);
}

#osobaDialog h2 {
  margin: 0 0 20px;
  text-align: center;
  font-size: 22px;
}

#osobaDialog label {
  display: block;
  margin: 12px 0 5px;
  font-weight: 600;
}

#osobaDialog input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  font-size: 16px;
  background: white;
}

#osobaDialog input:focus {
  outline: none;
  border-color: #007aff;
}

.formTlacidla {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.formTlacidla button {
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#formZrusit {
  background: #e5e5ea;
  color: #1c1c1e;
}

#formUlozit {
  background: #007aff;
  color: white;
}
.hesloPole {
  position: relative;
  width: 100%;
}

#osobaDialog .hesloPole input {
  width: 100%;
  padding-right: 50px;
}

#osobaDialog .hesloPole #formHesloOko {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 38px;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}
.upozornenie {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.upozornenie.vyprsala {
  background: #ffe5e5;
  color: #b00020;
}

.upozornenie.dnes {
  background: #fff0d6;
  color: #a34b00;
}

.upozornenie.coskoro {
  background: #fff8cc;
  color: #7a6200;
}
#zalohovat,
#obnovit {
  width: auto;
  padding: 9px 14px;
  margin-top: 8px;
  margin-right: 6px;
  border: none;
  border-radius: 9px;
  background: #e5e5ea;
  color: #1c1c1e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#zalohovat:hover,
#obnovit:hover {
  background: #d1d1d6;
}
