/* Административна Къща (/kashta.html): forms, profile, printable brochure. */

.k-view { padding: 40px 0 80px; }
.k-intro { max-width: 760px; margin-bottom: 26px; }
.k-intro h1, .k-head h1, .k-narrow h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -.5px; margin-bottom: 12px; }
.k-intro p { color: var(--muted); font-size: 18px; }
.k-intro .hello { color: #fff; margin-bottom: 16px; }
.k-switch { margin-top: 14px; color: var(--muted); }
.k-switch a { color: var(--red); font-weight: 600; }

.k-card { background: var(--paper); border-radius: 22px; padding: 30px 32px; }
.k-card h2 { font-family: var(--serif); font-size: 24px; margin: 26px 0 8px; }
.k-card h2:first-child { margin-top: 0; }
.k-card h2 small { font-family: 'Rubik', sans-serif; font-size: 14px; font-weight: 400; color: var(--muted); }
.k-narrow { max-width: 480px; margin: 20px auto; }
.k-narrow h1 { font-size: 32px; }
.k-f { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 15px; margin-top: 12px; }
.k-f input, .k-f select { font: 400 16px 'Rubik', sans-serif; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #d9cfc0; background: #fff; color: var(--ink); width: 100%; }
.k-f input:focus, .k-f select:focus { outline: 0; border-color: var(--red); }
.k-f select:disabled { background: #f3eee6; color: var(--muted); }
.k-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.k-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.k-kinds { display: flex; gap: 10px; flex-wrap: wrap; }
.k-kinds label { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #d9cfc0; border-radius: 12px; padding: 10px 16px; cursor: pointer; font-weight: 500; }
.k-kinds label:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.k-kinds input { accent-color: var(--red); }
.k-agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; color: var(--muted); font-size: 15px; }
.k-agree input { margin-top: 4px; accent-color: var(--red); width: 18px; height: 18px; flex: none; }
.k-err { min-height: 24px; margin: 14px 0 8px; color: var(--red-dark); font-weight: 500; }
.k-muted { color: var(--muted); }

.k-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 14px; }
.k-kind { font-family: 'Lobster', cursive; font-size: 22px; color: var(--red); }
.k-place { color: var(--muted); font-size: 17px; }
.k-status { flex: none; font-weight: 600; padding: 8px 16px; border-radius: 999px; }
.k-status.wait { background: #fff1c9; color: #7a5a00; }
.k-status.ok { background: var(--green-soft); color: #1f6e34; }
.k-status.no { background: var(--red-soft); color: var(--red-dark); }
.k-note { background: #fff1c9; border-radius: 14px; padding: 14px 18px; margin-bottom: 20px; }
.k-plan-note { margin-top: 12px; color: var(--muted); font-size: 15px; }
.k-plan { margin-bottom: 20px; }
.k-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.k-plans article { background: #fff; border: 1.5px solid #d9cfc0; border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.k-plans article.chosen { border-color: var(--red); background: var(--red-soft); }
.k-plans h3 { font-family: var(--serif); font-size: 22px; }
.k-plans .price { font-size: 26px; font-weight: 700; }
.k-plans .per { color: var(--muted); font-size: 14px; min-height: 20px; }
.k-plans .btn { margin-top: 8px; justify-content: center; }
.k-pay { margin-top: 18px; background: #fff; border-radius: 14px; padding: 16px 18px; }
.k-pay dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin-top: 8px; }
.k-pay dt { color: var(--muted); }
.k-pay dd { font-weight: 500; word-break: break-word; }
.k-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.k-print { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.k-print .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.k-tip { font-size: 14px; }
.k-preview { --s: .5; margin-top: 18px; height: calc(210mm * var(--s)); overflow: hidden; border-radius: 10px; box-shadow: 0 8px 26px rgba(29, 27, 24, .16); }
.leaf-scale { width: 148mm; transform: scale(var(--s)); transform-origin: top left; }

@media (max-width: 960px) {
  .k-grid { grid-template-columns: 1fr; }
  .k-plans { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .k-card { padding: 22px 18px; }
  .k-row2, .k-row3 { grid-template-columns: 1fr; }
  .k-head { flex-direction: column; }
}

/* ---------- the brochure page (A5, all sizes in mm so print is exact) ---------- */
.leaf { position: relative; width: 148mm; height: 210mm; overflow: hidden; background: #fffaf2; color: #1d1b18;
        padding: 9mm 9mm 7mm; display: flex; flex-direction: column; font-family: 'Rubik', sans-serif; font-size: 3.1mm; line-height: 1.35;
        border-top: 3mm solid #d8363e; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.lf-top { display: flex; justify-content: space-between; align-items: baseline; }
.lf-logo { font-family: 'Lobster', cursive; color: #d8363e; font-size: 9mm; line-height: 1; }
.lf-tag { font-family: 'Lobster', cursive; color: #6b6358; font-size: 4.2mm; }
.lf-title { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 8.6mm; line-height: 1.05; margin: 4.5mm 0 2mm; letter-spacing: -.1mm; }
.lf-title em { font-style: normal; color: #d8363e; }
.lf-lead { font-size: 3.5mm; color: #4a443c; }
.lf-mid { display: grid; grid-template-columns: 46mm 1fr; gap: 6mm; align-items: center; margin: 5mm 0 4mm; }
.lf-qr { background: #fff; border-radius: 3mm; padding: 3.5mm; text-align: center; box-shadow: 0 0 0 .4mm #e2d8c9; }
.lf-qr svg { display: block; width: 100%; height: auto; }
.lf-qr span { display: block; font-size: 2.5mm; color: #6b6358; margin-top: 2mm; }
.lf-steps { list-style: none; counter-reset: s; display: grid; gap: 3mm; }
.lf-steps li { counter-increment: s; position: relative; padding-left: 9mm; font-size: 3.4mm; }
.lf-steps li::before { content: counter(s); position: absolute; left: 0; top: -.3mm; width: 6.5mm; height: 6.5mm; border-radius: 50%; background: #ffc94d;
                       display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 3.8mm; }
.lf-cats h3, .lf-contact h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 4.2mm; margin-bottom: 2mm; }
.lf-cats ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.6mm 3mm; }
.lf-cats li { font-size: 2.35mm; color: #6b6358; line-height: 1.25; border-left: .8mm solid #2f9a4a; padding-left: 1.6mm; }
.lf-cats li:nth-child(3n+2) { border-color: #d8363e; }
.lf-cats li:nth-child(3n) { border-color: #ffc94d; }
.lf-cats li b { display: block; color: #1d1b18; font-size: 2.85mm; font-weight: 600; }
.lf-contact { margin-top: auto; background: #1d1b18; color: #fff; border-radius: 3mm; padding: 4mm 5mm; }
.lf-contact h3 { color: #ffc94d; font-size: 3.8mm; }
.lf-contact b { display: block; font-size: 3.6mm; margin-bottom: .8mm; }
.lf-contact p { font-size: 3mm; color: #e6dfd3; }
.lf-foot { margin-top: 3mm; font-size: 2.4mm; color: #6b6358; text-align: center; }
.lf-draft { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
            font-family: 'Lobster', cursive; font-size: 30mm; color: rgba(216, 54, 62, .16); transform: rotate(-28deg); }

/* ---------- printing ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .print-only { display: block; }
  .print-leaflet { display: flex; width: 297mm; height: 210mm; }
  .print-leaflet .leaf { width: 148.5mm; }
  .print-leaflet .leaf + .leaf { border-left: .2mm dashed #bbb; }
  .print-poster .leaf { zoom: 1.4142; }
}

/* ---------- panel: tabs, dashboard, posts, all-village brochures, report ---------- */
.k-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.k-tabs button { font: 500 15px 'Rubik', sans-serif; border: 0; background: #f3eee6; color: var(--ink); padding: 10px 16px; border-radius: 999px; cursor: pointer; }
.k-tabs button:hover { background: #e9e0d2; }
.k-tabs button.on { background: var(--ink); color: #fff; }
.k-tabs button.locked::after { content: ''; display: inline-block; width: 10px; height: 12px; margin-left: 6px; vertical-align: -1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 14'%3E%3Crect x='1' y='6' width='10' height='8' rx='1.5' fill='%236b6358'/%3E%3Cpath d='M3.5 6V4a2.5 2.5 0 0 1 5 0v2' fill='none' stroke='%236b6358' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / contain; }
.k-pane > .k-card + .k-card { margin-top: 18px; }
.k-panel-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.k-panel-head h2 { margin: 0; }
.k-inline { margin-top: 0; min-width: 220px; }
.k-h3 { font-family: var(--serif); font-size: 19px; margin: 26px 0 10px; }
.k-small { font-size: 13px; }
.k-empty { background: #fff; border-radius: 14px; padding: 16px 18px; margin-top: 16px; color: var(--muted); }
.k-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.k-tile { background: #fff; border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; }
.k-tile b { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.k-tile span { color: var(--muted); font-size: 14px; }
.k-tile small { color: var(--muted); font-size: 12px; }
.k-tablewrap { overflow-x: auto; }
.k-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.k-table th, .k-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #ebe3d6; }
.k-table th { font-weight: 500; color: var(--muted); font-size: 13px; }
.k-table .num, .k-chart .num { text-align: right; font-variant-numeric: tabular-nums; }
.k-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; margin-bottom: 6px; }
.k-legend span { display: inline-flex; align-items: center; gap: 6px; }
.k-legend i { width: 12px; height: 12px; border-radius: 3px; }
.k-chart { width: 100%; border-collapse: collapse; font-size: 14px; }
.k-chart th, .k-chart td { padding: 5px 8px; border-bottom: 1px solid #f0e9de; }
.k-chart thead th { font-weight: 500; color: var(--muted); font-size: 13px; text-align: left; }
.k-chart thead th.l { text-align: right; }
.k-chart tbody th { text-align: left; font-weight: 500; white-space: nowrap; width: 1%; }
.k-chart .cb { width: 38%; position: relative; }
.k-chart .cb span { display: block; height: 14px; max-width: calc(100% - 30px); }
.k-chart .cb.l span { margin-left: auto; border-radius: 4px 0 0 4px; }
.k-chart .cb.r span { border-radius: 0 4px 4px 0; }
.k-chart .cb.l { border-right: 2px solid var(--paper); }
.k-chart .cb em { position: absolute; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.k-chart .cb.l em { left: 8px; }
.k-chart .cb.r em { right: 8px; }
.k-spark { position: relative; width: 45%; }
.k-spark span { display: block; height: 10px; border-radius: 0 4px 4px 0; background: #6b6358; min-width: 2px; max-width: calc(100% - 40px); }
.k-spark em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-variant-numeric: tabular-nums; }
.k-tip-pop { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.k-protocol { margin-top: 14px; font-size: 13px; color: var(--muted); background: #fff; border-radius: 12px; padding: 12px 14px; line-height: 1.5; }
.k-protocol b { color: var(--ink); font-weight: 500; }
.k-sample { margin-top: 18px; filter: blur(4px); opacity: .65; user-select: none; pointer-events: none; }
.k-lockbox { background: #fff1c9; border-radius: 14px; padding: 16px 18px; margin-top: 16px; }
.k-lockbox p { margin-top: 6px; color: #5c4600; }
.k-card.k-lockbox { margin: 0 0 18px; }
.k-dim { opacity: .5; }
.k-badge { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin-top: 26px; padding-top: 20px; border-top: 1px solid #ebe3d6; }
.k-badge svg { display: block; width: 260px; height: auto; }
.k-badge .k-h3 { margin-top: 0; }
.k-badge .btn { margin-top: 10px; }
.btn.sm { padding: 8px 14px; font-size: 14px; }
.k-f textarea { font: 400 16px 'Rubik', sans-serif; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #d9cfc0; background: #fff; color: var(--ink); width: 100%; resize: vertical; }
.k-f textarea:focus { outline: 0; border-color: var(--red); }
.k-posts { list-style: none; display: grid; gap: 10px; }
.k-posts li { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; background: #fff; border-radius: 12px; padding: 12px 14px; }
.k-posts li.old { opacity: .55; }
.k-posts small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.k-posts p { margin-top: 6px; font-size: 15px; }
.k-list .k-h3:first-child { margin-top: 0; }
.lf-support { margin-top: 2.5mm; font-size: 2.8mm; font-weight: 600; color: #1f6e34; text-align: center; }
@media (max-width: 640px) { .k-badge { grid-template-columns: 1fr; } .k-chart tbody th { white-space: normal; } }

/* the quarterly report (A4) */
.report { font-family: 'Rubik', sans-serif; color: #1d1b18; font-size: 10.5pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.report header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1mm solid #d8363e; padding-bottom: 2mm; color: #6b6358; }
.report .lf-logo { font-size: 20pt; }
.report h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 20pt; margin: 5mm 0 1mm; }
.report h2, .report .k-h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 13pt; margin: 6mm 0 2mm; break-after: avoid; }
.report .r-sub { color: #6b6358; }
.report .k-tile { border: .3mm solid #e2d8c9; }
.report .k-tile b { font-size: 18pt; }
.report table { break-inside: auto; }
.report tr { break-inside: avoid; }
.report footer { margin-top: 8mm; font-size: 8.5pt; color: #6b6358; border-top: .3mm solid #e2d8c9; padding-top: 2mm; }
@media print {
  .print-many .sheet { display: flex; width: 297mm; height: 210mm; break-after: page; }
  .print-many .sheet .leaf { width: 148.5mm; }
  .print-many .sheet .leaf + .leaf { border-left: .2mm dashed #bbb; }
  .k-tip-pop { display: none; }
}
.k-pane[hidden] { display: none !important; }
.k-plans:empty { display: none; }
#plan .k-err:empty { min-height: 0; margin: 0; }
.k-err.ok { color: #1f6e34; }

/* Доброволци */
.k-person { margin-top: 16px; padding: 16px; border: 1px solid var(--line, #e6dcc6); border-radius: 12px; }
.k-person p { margin: 0 0 8px; }
.k-person .k-agree { margin-top: 12px; }
.k-person .btn { margin-top: 16px; }
#t-doverie h2 .i { width: 22px; height: 22px; vertical-align: -4px; }
