* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 0% 0%, #1a4a63 0%, transparent 60%),
    #101820;
  color: #e7eef3;
}
.leht {
  max-width: 36rem;
  margin: 3.5rem auto;
  background: #f6f3ec;
  color: #1c1917;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}
.pais {
  padding: 1.6rem 1.6rem 1.35rem;
  background: linear-gradient(135deg, #123044 0%, #1d4e89 70%, #2a6f97 100%);
  color: #f8fafc;
}
.mark {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0c36a;
}
#rent {
  margin: 0.85rem 0 0;
  padding: 0.35rem 0.7rem;
  display: inline-block;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 650;
}
#rent.vaba { background: #dcfce7; color: #14532d; }
#rent.aktiivne { background: #fecaca; color: #7f1d1d; }
#rent.teadmata { background: rgba(255, 255, 255, 0.16); color: #f8fafc; }
h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.paislink {
  display: inline-block;
  margin-top: 0.85rem;
  margin-right: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 0.6rem;
  background: #f0c36a;
  color: #1c1917;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
}
.paislink:hover { background: #f7d48a; }
a.nupulink {
  display: inline-block;
  padding: 0.7rem 1.05rem;
  border-radius: 0.7rem;
  background: #c9842a;
  color: #1c1917;
  text-decoration: none;
  font-weight: 650;
}
a.nupulink:hover { background: #ddb56a; }
.meta { margin: 0 0 0.35rem; font-size: 0.82rem; color: #44403c; }
.kood { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.staatus { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.todo { color: #9a3412; }
.done { color: #166534; }
.kommentaar { margin: 0.45rem 0 0; }
.sisu { padding: 1.35rem 1.6rem 1.6rem; }
.olek {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 650;
}
form { display: grid; gap: 0.9rem; }
form#prioriteet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: end;
  margin-top: 0.8rem;
}
form#prioriteet label { flex: 1 1 8rem; margin: 0; }
form#prioriteet button { background: #0f766e; }
form#prioriteet button:hover { background: #115e59; }
.prioriteetOlek {
  margin: 0.35rem 0 0;
  color: #0f766e;
  font-size: 0.85rem;
}
label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #44403c;
}
input, textarea, select {
  font: inherit;
  font-weight: 450;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d6d3d1;
  border-radius: 0.7rem;
  background: #fff;
  color: #1c1917;
  resize: vertical;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid #1d4e89;
  border-color: #1d4e89;
}
.nupud, .kontod { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.kontod button { background: #44403c; }
.kontod button:hover { background: #292524; }
.toaRiba {
  grid-template-columns: 1fr auto;
  align-items: end;
}
#sonumid {
  list-style: none;
  margin: 0.85rem 0;
  padding: 0.45rem;
  min-height: 12rem;
  max-height: 22rem;
  overflow: auto;
  background: #efeae2;
  border-radius: 0.8rem;
}
#sonumid li { margin: 0.4rem; }
#sonumid p {
  margin: 0.2rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#sonumid .tyhi {
  border: 0;
  background: transparent;
  color: #78716c;
}
button {
  font: inherit;
  font-weight: 650;
  padding: 0.7rem 1.05rem;
  border: 0;
  border-radius: 0.7rem;
  background: #1d4e89;
  color: #fff;
  cursor: pointer;
}
button:hover { background: #163a66; }
button#kysi { background: #c9842a; color: #1c1917; }
button#kysi:hover { background: #a86b1c; color: #fff; }
button#kysi:disabled,
button#kysi:disabled:hover {
  background: #a8a29e;
  color: #57534e;
  cursor: not-allowed;
}
button#valja { background: #44403c; }
button#valja:hover { background: #292524; }
.jrk {
  margin: 0.45rem 0 0;
  color: #44403c;
  font-weight: 650;
}
.teade {
  min-height: 1.2rem;
  margin: 0.85rem 0 0;
  color: #9f1239;
}
ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
li {
  margin: 0.55rem 0;
  padding: 0.8rem 0.9rem;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-left: 4px solid #c9842a;
  border-radius: 0.65rem;
}
time {
  display: block;
  margin-top: 0.3rem;
  color: #78716c;
  font-size: 0.75rem;
}
.juhend {
  padding: 1.15rem 1.35rem 1.45rem;
  border-top: 1px solid #e7e5e4;
  color: #44403c;
  font-size: 0.92rem;
  line-height: 1.5;
}
.juhend h2 {
  margin: 0 0 0.4rem;
  color: #1c1917;
  font-size: 1.05rem;
  font-weight: 650;
}
.juhend h3 { margin: 0.9rem 0 0; font-size: 1rem; color: #1c1917; }
.juhend p, .juhend ol { margin: 0.4rem 0 0; }
.juhend ol { padding-left: 1.2rem; }
@media (max-width: 640px) {
  .leht { margin: 0; border-radius: 0; min-height: 100vh; }
}
