/*
  Labenka Admin – štýly v dizajne labenka.sk
  Farby a písmo sú prevzaté z webu (GeneratePress + vlastné labenka-* triedy).
  Bez build kroku: stačí upraviť tento súbor.
*/

:root {
  --lime-900: #34470a;
  --lime-800: #4c6710;   /* tmavá zelená – hover, aktívne */
  --lime-700: #688c16;   /* hlavná farba webu */
  --lime-500: #6faf24;   /* akcent */
  --lime-200: #e2e8dc;   /* okraje */
  --lime-100: #eef3e4;
  --lime-50:  #f4f7ef;   /* karty */
  --paper:    #fbfcf8;   /* pozadie */
  --white:    #ffffff;
  --ink:      #1a1a1a;
  --ink-2:    #4a4a4a;
  --ink-3:    #666666;
  --line:     #e2e8dc;
  --amber:    #b7791f;
  --amber-bg: #fdf6e3;
  --red:      #b42318;
  --red-bg:   #fdecea;
  --blue:     #1d5fa8;
  --blue-bg:  #e8f1fb;
  --radius:   14px;
  --radius-sm: 9px;
  --shadow:   0 1px 2px rgba(52, 71, 10, .06), 0 4px 16px rgba(52, 71, 10, .05);
  --font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --hand: "Caveat", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--lime-700); text-decoration: none; }
a:hover { color: var(--lime-800); text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0 0 1em; }
code { background: var(--lime-100); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- rozloženie ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { height: 38px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--hand); font-size: 30px; font-weight: 600; color: var(--lime-700); }
.brand-sub { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }

.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding: 14px 10px 4px; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 500;
}
.nav-link svg { width: 18px; height: 18px; flex: none; color: var(--lime-700); opacity: .85; }
.nav-link:hover { background: var(--lime-50); color: var(--ink); text-decoration: none; }
.nav-link.active { background: var(--lime-700); color: var(--white); }
.nav-link.active svg { color: var(--white); opacity: 1; }
.nav-sub { padding-left: 38px; font-size: 14px; padding-top: 5px; padding-bottom: 5px; }
.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.sidebar-foot form { display: inline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 32px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.7);
  backdrop-filter: blur(6px); position: sticky; top: 0; z-index: 5;
}
.topbar .crumbs { color: var(--ink-3); font-size: 14px; }
.topbar .crumbs a { color: var(--ink-3); }
.btn.menu-toggle { display: none; }
.content { padding: 28px 32px 60px; max-width: 1280px; width: 100%; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .lead { color: var(--ink-2); margin: 4px 0 0; }
.hand { font-family: var(--hand); font-weight: 600; color: var(--lime-700); font-size: 1.35em; }

/* ---------- karty a mriežky ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
}
.card + .card { margin-top: 18px; }
.grid > .card + .card { margin-top: 0; }
.card-soft { background: var(--lime-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { color: var(--ink-3); font-size: 13px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--lime-800); line-height: 1.2; }
.stat-sub { color: var(--ink-3); font-size: 12.5px; }

/* ---------- tlačidlá ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  background: var(--lime-700); color: var(--white); transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--lime-800); color: var(--white); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn-ghost { background: var(--white); color: var(--lime-800); border-color: var(--lime-200); }
.btn-ghost:hover { background: var(--lime-50); color: var(--lime-900); border-color: var(--lime-700); }
.btn-danger { background: var(--white); color: var(--red); border-color: #f1c7c2; }
.btn-danger:hover { background: var(--red-bg); color: var(--red); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--lime-700); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- formuláre ---------- */
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 5px; color: var(--ink-2); }
.field { margin-bottom: 14px; }
.help { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=url], input[type=search], input[type=tel], select, textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 9px 12px; border: 1px solid #d5dccb; border-radius: var(--radius-sm); background: var(--white);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime-700); box-shadow: 0 0 0 3px rgba(104, 140, 22, .15); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--lime-700); }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 150px; }
.filters input[type=search] { min-width: 240px; }
.error-text { color: var(--red); font-size: 13px; margin-top: 4px; }

/* ---------- tabuľky ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; background: var(--lime-50); }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcf6; }
td .muted, .muted { color: var(--ink-3); font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- štítky a hlásenia ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; background: var(--lime-100); color: var(--lime-800); white-space: nowrap;
}
.badge-gray { background: #f0f0ee; color: #555; }
.badge-amber { background: var(--amber-bg); color: var(--amber); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-green { background: var(--lime-700); color: var(--white); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; border: 1px solid; }
.alert-ok { background: var(--lime-50); border-color: var(--lime-200); color: var(--lime-900); }
.alert-error { background: var(--red-bg); border-color: #f1c7c2; color: var(--red); }
.alert-info { background: var(--blue-bg); border-color: #c8dcf2; color: var(--blue); }
.alert-warn { background: var(--amber-bg); border-color: #f0dfb4; color: #7a5410; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); }
.empty .hand { display: block; font-size: 28px; margin-bottom: 6px; }

/* ---------- kanban (úlohy) ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kanban-col { background: var(--lime-50); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.kanban-col h3 { display: flex; justify-content: space-between; font-size: 14px; margin: 2px 4px 10px; }
.task {
  background: var(--white); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; margin-bottom: 9px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.task-title { font-weight: 600; color: var(--ink); display: block; }
.task-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; align-items: center; font-size: 12.5px; color: var(--ink-3); }
.task.prio-vysoka { border-left: 4px solid #d9822b; }
.task.overdue .due { color: var(--red); font-weight: 600; }

/* ---------- časová os (CRM) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--lime-200); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--lime-700); }
.timeline .when { font-size: 12.5px; color: var(--ink-3); }

/* ---------- galéria (omaľovánky) ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.shot { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shot-img { aspect-ratio: 2 / 3; background: var(--lime-50); display: grid; place-items: center; color: var(--ink-3); }
.shot-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.shot-body { padding: 10px 12px; }
.animal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.animal { display: flex; gap: 10px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.animal img { width: 52px; height: 52px; object-fit: cover; border-radius: 9px; background: var(--lime-50); flex: none; }
.animal .name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.animal .latin { font-style: italic; color: var(--ink-3); font-size: 12px; }

/* ---------- rozdiel údajov (overovanie) ---------- */
.diff-old { background: var(--red-bg); color: #7a1c14; padding: 2px 6px; border-radius: 6px; text-decoration: line-through; }
.diff-new { background: #e4f3d2; color: var(--lime-900); padding: 2px 6px; border-radius: 6px; }

/* ---------- stránkovanie ---------- */
.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); font-size: 14px; }
.pagination .current { background: var(--lime-700); color: var(--white); border-color: var(--lime-700); }
.pagination .disabled { color: #bbb; }

/* ---------- prihlásenie a verejné stránky ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, var(--lime-100), var(--paper) 60%); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; padding-bottom: 10px; }
.public-wrap { max-width: 760px; margin: 0 auto; padding: 28px 16px 60px; }
.public-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.public-head img { height: 44px; }

details summary { cursor: pointer; font-weight: 600; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.flex { display: flex; gap: 10px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.small { font-size: 13px; }

/* ---------- mobil ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-sidebar { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 20; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  body.nav-open .sidebar { transform: none; }
  .btn.menu-toggle { display: inline-flex; }
  .topbar { padding: 12px 16px; }
  .content { padding: 20px 16px 50px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}
