:root {
  --bg:      #faf6f9;
  --card:    #ffffff;
  --ink:     #241f23;
  --dim:     #8a838a;
  --line:    #ece6eb;
  --accent:  #CD2BA8;
  --accent-d:#A81F87;
  --tint:    #fbe6f5;
  --ok:      #3f7d52;
  --radius:  14px;
  --shadow:  0 1px 2px rgba(40,20,40,.04), 0 8px 24px rgba(40,20,40,.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-size: 18px; font-weight: 700; }
.who { color: var(--dim); font-size: 14px; }
.who a { color: var(--accent); text-decoration: none; }

.wrap { max-width: 760px; margin: 28px auto; padding: 0 18px; display: grid; gap: 22px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px;
}
.card > h2 { margin: 0 0 16px; font-size: 20px; }

label { display: block; font-size: 13px; color: var(--dim); margin-bottom: 12px; }
input, textarea {
  width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 9px; outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(205,43,168,.15); }
textarea { resize: vertical; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.drop {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 24px; border: 1.5px dashed var(--line); border-radius: 11px;
  background: #fbf4f9; cursor: pointer; color: var(--dim); transition: .15s;
}
.drop.over { border-color: var(--accent); background: var(--tint); color: var(--accent-d); }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; }
.thumb img { width: 76px; height: 76px; object-fit: cover; border-radius: 9px; }
.thumb button {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; line-height: 18px;
  border: none; border-radius: 50%; background: var(--ink); color: #fff; cursor: pointer;
}

.actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
button[type=submit] {
  padding: 11px 18px; font: inherit; font-weight: 600; color: #fff; cursor: pointer;
  background: var(--accent); border: none; border-radius: 9px; transition: .15s;
}
button[type=submit]:hover { background: var(--accent-d); }
button[type=submit]:disabled { opacity: .55; cursor: default; }
.status { font-size: 14px; color: var(--dim); }

.list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.list-head h2 { margin: 0; font-size: 20px; }
.search { display: flex; gap: 8px; }
.search input { margin: 0; width: 230px; }
.search button { padding: 9px 14px; background: #fff; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font: inherit; }

.note { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.note:first-of-type { border-top: none; }
.note-main { flex: 1; min-width: 0; }
.note h3 { margin: 0 0 4px; font-size: 16px; }
.note h3 small { color: var(--dim); font-weight: 500; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.meta .dim { margin-left: auto; }
.body { margin: 6px 0 0; white-space: pre-wrap; }
.note-imgs { display: flex; gap: 6px; flex-wrap: wrap; max-width: 200px; }
.note-imgs img { width: 60px; height: 60px; object-fit: cover; border-radius: 7px; }
.empty { color: var(--dim); }

/* auth */
body.auth { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.auth-card { width: 340px; text-align: center; }
.logo { margin: 0 0 4px; font-size: 24px; }
.sub { margin: 0 0 20px; color: var(--dim); }
.auth-card label { text-align: left; }
.auth-card button { width: 100%; margin-top: 6px; }
.alert { background: var(--tint); color: var(--accent-d); padding: 10px 12px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .note { flex-direction: column; }
  .note-imgs { max-width: none; }
  .search input { width: 160px; }
}

/* ---- sekcije forme (klijent + petovi) ---- */
.section {
  border: 1px solid var(--line); border-radius: 11px;
  padding: 16px 18px 4px; margin: 0 0 16px; background: #fffafd;
}
.section legend {
  font-weight: 700; font-size: 15px;
  padding: 0 8px; color: var(--ink);
}
.pet legend { display: flex; align-items: center; gap: 8px; }
.rmPet {
  width: 20px; height: 20px; line-height: 17px; padding: 0; border: none;
  border-radius: 50%; background: var(--line); color: var(--ink);
  cursor: pointer; font-size: 15px;
}
.rmPet:hover { background: var(--accent); color: #fff; }
select {
  width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
}
button.ghost {
  display: inline-block; padding: 9px 16px; margin: 0 0 18px; font: inherit; font-weight: 600;
  color: var(--accent-d); background: #fff; border: 1.5px dashed var(--accent);
  border-radius: 9px; cursor: pointer;
}
button.ghost:hover { background: var(--tint); }

/* ---- petovi u listi ---- */
.petcard { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.petcard strong { font-size: 14px; }
.pf { font-size: 13px; color: var(--ink); margin-top: 2px; }
.pf em { color: var(--dim); font-style: normal; }
.tag {
  background: var(--tint); color: var(--accent-d); padding: 1px 8px;
  border-radius: 20px; font-size: 12px; font-weight: 600;
}
