/* ═══════════════════════════════════════════════════════════════════════
   Theme of the «Управління стада» (Herd management) branch — following Roman's «Події ВРХ» (Cattle events) mockup.
   Dark-brown menu, cream background, rusty accent, IBM Plex Sans.
   Applies ONLY where <body> has .theme-herd (other branches are untouched)
   and only in the light theme — in the dark theme the general app look remains.
   ═══════════════════════════════════════════════════════════════════════ */

html:not([data-theme="dark"]) body.theme-herd {
    /* ── mockup palette ── */
    --bg: #fbf4e9;
    --surface: #fff7ee;
    --surface-2: #f4e9d8;
    --border: #e2d3bc;
    /* panel borders visible from a distance: a thin light frame blended
       with the page background, and block edges read poorly (Roman 2026-09-16) */
    --border-strong: #cdb28c;
    --text: #2e2015;
    --text-soft: #4a3728;
    --text-mute: #6b5844;
    --primary: #a1481e;
    --primary-soft: #f7efe2;
    --primary-strong: #86360f;
    --danger: #b3372f;
    --danger-soft: #f8e7e2;
    --success: #5b7043;
    --warn: #a8741c;
    --shadow: 0 1px 2px rgba(46, 32, 21, .05), 0 6px 18px rgba(46, 32, 21, .07);
    --shadow-lg: 0 8px 32px rgba(46, 32, 21, .20);
    --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    /* branch input fields (light blue in the blue theme) */
    --field: #fdf8f0;
    --field-b: #e2d3bc;
    background: var(--bg);
    font-family: var(--font);
}

/* ── side menu: dark brown ── */
html:not([data-theme="dark"]) body.theme-herd .sidebar {
    background: linear-gradient(180deg, #3a2a1d 0%, #2e2015 100%);
    color: #e2d3bc;
}
html:not([data-theme="dark"]) body.theme-herd .brand { border-bottom-color: rgba(226, 211, 188, .14); }
html:not([data-theme="dark"]) body.theme-herd .brand-mark {
    background: #a1481e; color: #fff7ee; box-shadow: none;
}
html:not([data-theme="dark"]) body.theme-herd .brand-title { color: #fff7ee; }
html:not([data-theme="dark"]) body.theme-herd .brand-sub,
html:not([data-theme="dark"]) body.theme-herd .sidebar-credit,
html:not([data-theme="dark"]) body.theme-herd .sidebar-version { color: #c0a57f; }
html:not([data-theme="dark"]) body.theme-herd .nav-link { color: #d8c6ab; }
html:not([data-theme="dark"]) body.theme-herd .nav-link:hover {
    background: rgba(226, 211, 188, .10); color: #fff7ee;
}
html:not([data-theme="dark"]) body.theme-herd .nav-link.is-active {
    background: #a1481e; color: #fff7ee; box-shadow: none;
}
html:not([data-theme="dark"]) body.theme-herd .sidebar::-webkit-scrollbar-thumb {
    background: rgba(226, 211, 188, .25);
}

/* ── page title and main canvas ── */
html:not([data-theme="dark"]) body.theme-herd .main { background: var(--bg); }
html:not([data-theme="dark"]) body.theme-herd .page-title,
html:not([data-theme="dark"]) body.theme-herd h1 { color: var(--text); }

/* ── panels: the mockup's monochrome instead of coloured borders ── */
html:not([data-theme="dark"]) body.theme-herd .panel { background: var(--surface); }
html:not([data-theme="dark"]) body.theme-herd .panel-head { background: var(--surface-2); }
html:not([data-theme="dark"]) body.theme-herd .evx-panel,
html:not([data-theme="dark"]) body.theme-herd .hg-panel,
html:not([data-theme="dark"]) body.theme-herd .cat-page .panel,
html:not([data-theme="dark"]) body.theme-herd .hs-block {
    --sp: #a1481e;
    --spbg: #fdf8f0;
}
html:not([data-theme="dark"]) body.theme-herd .eb-rev { --rc: #a1481e; }
html:not([data-theme="dark"]) body.theme-herd .evx-cycle-wrap,
html:not([data-theme="dark"]) body.theme-herd .evx-check-out,
html:not([data-theme="dark"]) body.theme-herd .eb-sec,
html:not([data-theme="dark"]) body.theme-herd .hg-tblwrap,
html:not([data-theme="dark"]) body.theme-herd .evx-card,
html:not([data-theme="dark"]) body.theme-herd .eb-rev {
    background: var(--surface); border-color: var(--border);
}

/* ── input fields: cream instead of light blue ── */
html:not([data-theme="dark"]) body.theme-herd .ref-select,
html:not([data-theme="dark"]) body.theme-herd .eb-in,
html:not([data-theme="dark"]) body.theme-herd .eb-name,
html:not([data-theme="dark"]) body.theme-herd .hg-in,
html:not([data-theme="dark"]) body.theme-herd #pkQuery,
html:not([data-theme="dark"]) body.theme-herd .eb-det input,
html:not([data-theme="dark"]) body.theme-herd input[type="text"],
html:not([data-theme="dark"]) body.theme-herd input[type="search"],
html:not([data-theme="dark"]) body.theme-herd input[type="date"],
html:not([data-theme="dark"]) body.theme-herd input[type="number"],
html:not([data-theme="dark"]) body.theme-herd select,
html:not([data-theme="dark"]) body.theme-herd textarea {
    background: var(--field);
    border-color: var(--field-b);
    color: var(--text);
}
html:not([data-theme="dark"]) body.theme-herd .ref-select:focus,
html:not([data-theme="dark"]) body.theme-herd .eb-in:focus,
html:not([data-theme="dark"]) body.theme-herd .eb-name:focus,
html:not([data-theme="dark"]) body.theme-herd .hg-in:focus,
html:not([data-theme="dark"]) body.theme-herd #pkQuery:focus,
html:not([data-theme="dark"]) body.theme-herd input:focus,
html:not([data-theme="dark"]) body.theme-herd select:focus,
html:not([data-theme="dark"]) body.theme-herd textarea:focus {
    border-color: var(--primary); background: #fff;
}

/* ── buttons ── */
html:not([data-theme="dark"]) body.theme-herd .btn { background: var(--surface-2); color: var(--text); }
html:not([data-theme="dark"]) body.theme-herd .btn:hover { background: #eadfca; }
html:not([data-theme="dark"]) body.theme-herd .btn-primary,
html:not([data-theme="dark"]) body.theme-herd .btn.btn-primary {
    background: var(--primary); border-color: var(--primary); color: #fff7ee;
}
html:not([data-theme="dark"]) body.theme-herd .btn-primary:hover { background: var(--primary-strong); }
html:not([data-theme="dark"]) body.theme-herd .btn-ghost { background: var(--surface); }
html:not([data-theme="dark"]) body.theme-herd .btn.btn-xlsx { background: transparent; }   /* Excel icon — no box (2026-10-13) */
html:not([data-theme="dark"]) body.theme-herd .btn.btn-xlsx:hover { background: color-mix(in srgb, #1d7a45 10%, transparent); }

/* ── steps, chips, pills ── */
html:not([data-theme="dark"]) body.theme-herd .eb-step { background: var(--surface); }
html:not([data-theme="dark"]) body.theme-herd .eb-step b { background: var(--surface-2); color: var(--text-mute); }
html:not([data-theme="dark"]) body.theme-herd .eb-step.is-active { border-color: var(--primary); color: var(--primary); }
html:not([data-theme="dark"]) body.theme-herd .eb-step.is-active b { background: var(--primary); color: #fff7ee; }
html:not([data-theme="dark"]) body.theme-herd .pk-cat.on,
html:not([data-theme="dark"]) body.theme-herd .hg-view.on,
html:not([data-theme="dark"]) body.theme-herd .seg-btn.is-active {
    background: var(--primary); border-color: var(--primary); color: #fff7ee; font-weight: 600;
}
html:not([data-theme="dark"]) body.theme-herd .eb-place.quick {
    background: var(--primary-soft); border-color: #dfc9a8; color: var(--primary-strong);
}
html:not([data-theme="dark"]) body.theme-herd .eb-user.on,
html:not([data-theme="dark"]) body.theme-herd .pk-row.on,
html:not([data-theme="dark"]) body.theme-herd .hg-tbl tr.on {
    background: var(--primary-soft); border-color: #dfc9a8;
}
html:not([data-theme="dark"]) body.theme-herd .eb-user.on .ini { background: var(--primary); color: #fff7ee; }
html:not([data-theme="dark"]) body.theme-herd .eb-user .ini { background: #eadfca; color: var(--text-soft); }

/* ── tables ── */
html:not([data-theme="dark"]) body.theme-herd .hg-tbl th,
html:not([data-theme="dark"]) body.theme-herd .eb-tbl th,
html:not([data-theme="dark"]) body.theme-herd .table thead th,
html:not([data-theme="dark"]) body.theme-herd .cat-table th {
    background: var(--surface-2); color: var(--text-mute);
}
html:not([data-theme="dark"]) body.theme-herd .hg-tbl tbody tr:hover,
html:not([data-theme="dark"]) body.theme-herd .cat-table tbody tr:hover { background: #f7efe2; }

/* ── badges and small stuff ── */
html:not([data-theme="dark"]) body.theme-herd .ev-badge { background: var(--surface-2); color: var(--text-soft); }
html:not([data-theme="dark"]) body.theme-herd .ev-badge.std { background: var(--primary-soft); color: var(--primary-strong); }
html:not([data-theme="dark"]) body.theme-herd .ev-badge.cus { background: #e9eddf; color: #4e6238; }
html:not([data-theme="dark"]) body.theme-herd .opt.ask { background: var(--primary-soft); color: var(--primary-strong); }
html:not([data-theme="dark"]) body.theme-herd .opt.who { background: #f1e6d2; color: #7a5a25; }
html:not([data-theme="dark"]) body.theme-herd .opt.sec { background: #e9eddf; color: #4e6238; }

/* ── reproduction cycle diagram ── */
html:not([data-theme="dark"]) body.theme-herd #evCycle .cyc-node rect { fill: var(--surface); stroke: #cdb590; }
html:not([data-theme="dark"]) body.theme-herd #evCycle .cyc-node text { fill: var(--text); }
html:not([data-theme="dark"]) body.theme-herd #evCycle .cyc-node .cyc-code { fill: var(--text-mute); }
html:not([data-theme="dark"]) body.theme-herd #evCycle .cyc-edge { stroke: #bfa87f; }
html:not([data-theme="dark"]) body.theme-herd #evCycle .cyc-lbl { fill: var(--primary); stroke: var(--surface); }

/* ── self-check ── */
html:not([data-theme="dark"]) body.theme-herd .evx-verdict.ok { color: #4e6238; }
html:not([data-theme="dark"]) body.theme-herd .evx-check-out .row.ok .m { color: #4e6238; }
