/* ===== LakoFon — professional light theme (ekoklik-style) ===== */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-mute: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --amber: #d97706;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow: 0 4px 6px -1px rgba(15,23,42,.07), 0 2px 4px -2px rgba(15,23,42,.05);
  --shadow-lg: 0 20px 40px -12px rgba(15,23,42,.18);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wide { max-width: 1140px; }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; color: var(--text); }
.logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #60a5fa);
  display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 17px;
  box-shadow: 0 4px 12px rgba(37,99,235,.35);
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav a.link { color: var(--muted); font-weight: 600; font-size: 14.5px; transition: color .15s; }
.nav a.link:hover { color: var(--text); }

/* ===== Hero ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 72px 20px 40px;
  background:
    radial-gradient(600px 300px at 50% -20%, var(--brand-soft) 0%, transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
  border: 1px solid #dbeafe;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 46px); line-height: 1.1; margin: 0 auto 16px;
  letter-spacing: -.03em; font-weight: 800; max-width: 700px;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), #7c3aed);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { font-size: 18px; color: var(--muted); margin: 0 auto 30px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Feature strip ===== */
.features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  max-width: 1000px; margin: 0 auto; padding: 44px 20px 10px;
}
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ic {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  font-size: 22px; margin-bottom: 12px; background: var(--brand-soft);
}
.feature h3 { margin: 0 0 5px; font-size: 16px; font-weight: 700; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ===== Section ===== */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 6px; }
.section-head h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -.02em; font-weight: 800; }
.section-head p { color: var(--muted); margin: 0 auto; max-width: 520px; }

/* ===== Card ===== */
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); margin-top: 24px;
}
.card h2 { margin: 0 0 4px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.card .sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* ===== Form ===== */
label { display: block; font-size: 13px; color: var(--text); margin: 16px 0 7px; font-weight: 600; }
label .mini, .mini { font-weight: 500; color: var(--muted); font-size: 12px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--bg);
  color: var(--text); font-size: 15px; font-family: var(--font); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; cursor: pointer; }
input[type=file] { padding: 9px 12px; cursor: pointer; }
input[type=file]::file-selector-button { border: 1px solid var(--line-strong); background: var(--bg-mute); color: var(--text); padding: 7px 12px; border-radius: 8px; margin-right: 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  cursor: pointer; font-weight: 650; font-size: 15px; font-family: var(--font);
  color: #fff; background: var(--brand); transition: background .15s, transform .06s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(37,99,235,.25);
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: translateY(1px); }
.btn.full { width: 100%; margin-top: 22px; }
.btn.ghost { background: var(--bg); color: var(--text); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--bg-mute); }
.btn.sm { padding: 8px 13px; font-size: 13px; }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.danger:hover { background: #b91c1c; }
.btn.ok { background: var(--green); box-shadow: none; }
.btn.ok:hover { background: #15803d; }

/* ===== Email preview + price ===== */
.email-preview {
  margin-top: 8px; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px dashed var(--line-strong); background: var(--bg-soft); color: var(--green);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14.5px; word-break: break-all; font-weight: 600;
}
.price-badge {
  display: none; align-items: center; gap: 9px; margin-top: 14px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--green-soft); border: 1px solid #bbf7d0; color: var(--green); font-weight: 650; font-size: 14.5px;
}
.price-badge.show { display: flex; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 60; padding: 18px;
}
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 30px;
  max-width: 460px; width: 100%; box-shadow: var(--shadow-lg); animation: pop .2s ease;
}
@keyframes pop { from { transform: scale(.96) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.modal .muted { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.pay-amount {
  text-align: center; font-size: 40px; font-weight: 900; letter-spacing: -.03em;
  color: var(--brand); margin: 4px 0 6px;
}
.pay-amount small { font-size: 18px; font-weight: 700; color: var(--muted); }
.pay-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; margin: 18px 0 4px; }
.pay-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pay-row:last-child { border-bottom: none; }
.pay-row .k { color: var(--muted); font-size: 14px; }
.pay-row .v { font-weight: 700; font-family: ui-monospace, Menlo, monospace; text-align: right; word-break: break-all; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

/* ===== Uplatnica ===== */
.uplatnica-modal { max-width: 520px; }
.uplatnica {
  border: 2px solid var(--text); border-radius: 12px; overflow: hidden;
  margin-top: 16px; background: #fff;
}
.uplatnica-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--bg-mute); border-bottom: 2px solid var(--text);
}
.uplatnica-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.uplatnica-amount { font-size: 22px; font-weight: 900; color: var(--brand); letter-spacing: -.02em; }
.uplatnica-body { padding: 6px 18px 14px; }
.uplatnica-section { padding: 10px 0; border-bottom: 1px solid var(--line); }
.uplatnica-section:last-child { border-bottom: none; }
.uplatnica-label { font-size: 10px; font-weight: 700; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 3px; }
.uplatnica-value { font-size: 15px; font-weight: 600; color: var(--text); }
.uplatnica-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .03em; }
.uplatnica-row2 { display: flex; gap: 12px; border-bottom: 1px solid var(--line); }
.uplatnica-row2 .uplatnica-section { border-bottom: none; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 13px 20px; border-radius: 12px;
  box-shadow: var(--shadow-lg); opacity: 0; transition: all .25s; z-index: 100; font-weight: 600; font-size: 14.5px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--green); }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 34px 20px; margin-top: 40px; text-align: center; color: var(--muted); font-size: 14px;
}
.footer .brand { justify-content: center; margin-bottom: 10px; font-size: 17px; }

/* ===== Admin ===== */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 26px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tabs { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.tab { padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--muted); cursor: pointer; font-weight: 600; font-size: 14px; transition: all .15s; }
.tab:hover { background: var(--bg-mute); }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.panel { display: none; }
.panel.active { display: block; }

table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
tbody tr:hover { background: var(--bg-soft); }
.tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.novo { background: var(--brand-soft); color: var(--brand-dark); }
.tag.uradu { background: #fffbeb; color: var(--amber); }
.tag.zavrseno { background: var(--green-soft); color: var(--green); }
.table-wrap { overflow-x: auto; }
.center { text-align: center; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* Admin: blokovi predmeta i podstavki */
.subj-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 14px; background: var(--bg); }
.subj-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.subj-head .sName { flex: 1 1 200px; font-weight: 600; }
.subj-head .sPrice { width: 130px; }
.subj-items { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.item-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.item-row .iName, .item-row .niName { flex: 1 1 180px; }
.item-row .iPrice, .item-row .niPrice { width: 110px; }
.item-row.add { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0; font-weight: 500; }
.chk input { width: auto; }

/* Admin: request sub-tabs */
.req-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.req-tab {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--muted); cursor: pointer; font-weight: 600;
  font-size: 14px; font-family: var(--font); transition: all .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.req-tab:hover { background: var(--bg-mute); }
.req-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.req-tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: rgba(0,0,0,.1); font-size: 12px; font-weight: 700;
}
.req-tab.active .req-tab-count { background: rgba(255,255,255,.25); color: #fff; }
.row-done td { opacity: .5; }
.row-done td:last-child { opacity: 1; }
.move-cell { white-space: nowrap; }
.move-cell .moveBtn { font-size: 12px !important; padding: 4px 10px !important; }

/* Request cards */
.req-cards { display: flex; flex-direction: column; gap: 12px; }
.req-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px; transition: box-shadow .15s;
}
.req-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.req-card-done { opacity: .55; }
.rc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rc-id { font-weight: 700; color: var(--brand); font-size: 14px; }
.rc-date { font-size: 12px; color: var(--muted); }
.rc-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rc-info { flex: 1; min-width: 200px; }
.rc-name { font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.rc-detail { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.rc-subject { font-size: 14px; margin-bottom: 4px; }
.rc-msg { font-size: 13px; color: var(--muted); margin-top: 4px; padding: 6px 8px; background: var(--bg-mute); border-radius: 6px; }
.rc-files { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.rc-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--bg-mute); flex-wrap: wrap; gap: 8px; }
.rc-move { display: flex; gap: 4px; flex-wrap: wrap; }
.rc-btns { display: flex; gap: 6px; }

@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; margin-top: 24px; }
  .row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .hero { padding: 52px 20px 36px; }
  .rc-body { flex-direction: column; }
  .rc-actions { flex-direction: column; align-items: stretch; }
  .rc-move { justify-content: center; }
  .rc-btns { justify-content: center; }
}
