.kd-alf {
    --kd-alf-sidebar-width: 25%;
    --kd-alf-radius: 14px;
    --kd-alf-border: #dfe4ea;
    --kd-alf-bg: #fff;
    --kd-alf-muted: #667085;
    --kd-alf-text: #182230;
    --kd-alf-accent: #111827;
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, var(--kd-alf-sidebar-width)) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}
.kd-alf-sidebar,.kd-alf-content { min-width: 0; }
.kd-alf-panel { padding:22px; border:1px solid var(--kd-alf-border); border-radius:var(--kd-alf-radius); background:var(--kd-alf-bg); box-shadow:0 8px 30px rgba(16,24,40,.05); position:sticky; top:24px; }
.kd-alf-search-wrap { position:relative; margin-bottom:18px; }
.kd-alf-search { width:100%; min-height:54px; padding:0 42px!important; border:1px solid var(--kd-alf-border)!important; border-radius:12px!important; background:#fff!important; color:var(--kd-alf-text)!important; outline:none; box-shadow:none!important; font-size:15px; }
.kd-alf-search:focus,.kd-alf-field select:focus { border-color:#98a2b3!important; box-shadow:0 0 0 3px rgba(152,162,179,.14)!important; }
.kd-alf-search-icon { position:absolute; left:15px; top:50%; transform:translateY(-50%); font-size:22px; color:var(--kd-alf-muted); pointer-events:none; }
.kd-alf-clear-search { position:absolute; right:8px; top:50%; transform:translateY(-50%); width:32px; height:32px; border:0; background:transparent; color:var(--kd-alf-muted); font-size:24px; line-height:1; cursor:pointer; }
.kd-alf-filters { display:flex; flex-direction:column; gap:14px; }
.kd-alf-field { display:flex; flex-direction:column; gap:7px; }
.kd-alf-field[hidden] { display:none!important; }
.kd-alf-field>span { font-size:13px; font-weight:600; color:var(--kd-alf-text); }
.kd-alf-field select { width:100%; min-height:46px; padding:0 36px 0 12px!important; border:1px solid var(--kd-alf-border)!important; border-radius:10px!important; background-color:#fff!important; color:var(--kd-alf-text)!important; font-size:14px; outline:none; }
.kd-alf-actions { display:flex; margin-top:18px; }
.kd-alf-reset { width:100%; padding:10px 14px; border:1px solid var(--kd-alf-border); border-radius:9px; background:transparent; color:var(--kd-alf-text); cursor:pointer; font-weight:600; transition:.2s ease; }
.kd-alf-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.kd-alf-item { min-width:0; }
.kd-alf-pagination { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin-top:30px; }
.kd-alf-page { min-width:40px; height:40px; padding:0 12px; border:1px solid var(--kd-alf-border); border-radius:9px; background:#fff; color:var(--kd-alf-text); cursor:pointer; }
.kd-alf-page.is-active { background:var(--kd-alf-accent); border-color:var(--kd-alf-accent); color:#fff; }
.kd-alf-empty { padding:38px 20px; text-align:center; border:1px dashed var(--kd-alf-border); border-radius:var(--kd-alf-radius); color:var(--kd-alf-muted); }
.kd-alf-status { min-height:0; font-size:13px; color:var(--kd-alf-muted); margin-bottom:8px; }
.kd-alf.is-loading .kd-alf-results { opacity:.45; pointer-events:none; transition:opacity .15s ease; }
.kd-alf-fallback { display:block; padding:20px; border:1px solid var(--kd-alf-border); border-radius:var(--kd-alf-radius); text-decoration:none; }

/* Mobile UI elements are desktop-hidden. */
.kd-alf-mobile-toggle,.kd-alf-mobile-header,.kd-alf-mobile-footer,.kd-alf-backdrop { display:none; }

@media (max-width:1024px) and (min-width:768px) {
    .kd-alf { --kd-alf-sidebar-width:32%; gap:24px; }
}

@media (max-width:767px) {
    html.kd-alf-lock-scroll, html.kd-alf-lock-scroll body { overflow:hidden!important; }
    .kd-alf { display:block; }
    .kd-alf-mobile-toggle { display:flex; width:100%; min-height:52px; align-items:center; justify-content:center; gap:9px; margin:0 0 18px; padding:11px 16px; border:1px solid var(--kd-alf-border); border-radius:10px; background:#fff; color:var(--kd-alf-text); cursor:pointer; font-weight:700; }
    .kd-alf-mobile-toggle-icon { font-size:17px; line-height:1; }
    .kd-alf-active-count { display:inline-flex; align-items:center; justify-content:center; min-width:23px; height:23px; padding:0 6px; border-radius:999px; background:var(--kd-alf-accent); color:#fff; font-size:12px; }
    .kd-alf-active-count[hidden] { display:none!important; }
    .kd-alf-backdrop { display:block; position:fixed; inset:0; z-index:99996; background:rgba(15,23,42,.48); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .25s ease, visibility .25s ease; }
    .kd-alf-sidebar { --kd-alf-mobile-drawer-bg:#fff; position:fixed; z-index:99997; left:0; top:0; bottom:0; width:min(92vw,420px); max-width:100%; background:var(--kd-alf-mobile-drawer-bg); transform:translateX(-102%); transition:transform .28s cubic-bezier(.22,1,.36,1); display:flex; flex-direction:column; box-shadow:18px 0 45px rgba(15,23,42,.18); }
    .kd-alf.is-filter-open .kd-alf-sidebar { transform:translateX(0); }
    .kd-alf.is-filter-open .kd-alf-backdrop { opacity:1; visibility:visible; pointer-events:auto; }
    .kd-alf-mobile-header { display:flex; align-items:center; justify-content:space-between; padding:17px 18px; border-bottom:1px solid var(--kd-alf-border); background:var(--kd-alf-mobile-drawer-bg); flex:0 0 auto; }
    .kd-alf-mobile-header strong { font-size:18px; }
    .kd-alf-mobile-close { width:40px; height:40px; border:0; border-radius:50%; background:rgba(15,23,42,.06); color:var(--kd-alf-text); font-size:27px; line-height:1; cursor:pointer; }
    .kd-alf-panel { position:static; flex:1 1 auto; overflow-y:auto; padding:18px; border:0!important; border-radius:0!important; box-shadow:none!important; background:var(--kd-alf-mobile-drawer-bg); }
    .kd-alf-mobile-footer { display:block; flex:0 0 auto; padding:14px 18px calc(14px + env(safe-area-inset-bottom)); border-top:1px solid var(--kd-alf-border); background:var(--kd-alf-mobile-drawer-bg); }
    .kd-alf-mobile-apply { width:100%; min-height:52px; padding:12px 18px; border:1px solid var(--kd-alf-accent); border-radius:10px; background:var(--kd-alf-accent); color:#fff; cursor:pointer; font-weight:700; }
    .kd-alf-grid { grid-template-columns:1fr; }
}

/* Search category scope */
.kd-alf-search-block { display:grid; grid-template-columns:1fr; gap:10px; margin-bottom:18px; }
.kd-alf-search-block .kd-alf-search-wrap { margin-bottom:0; }
.kd-alf-search-category-label { display:block; }
.kd-alf-search-category { width:100%; min-height:46px; padding:0 36px 0 12px!important; border:1px solid var(--kd-alf-border)!important; border-radius:10px!important; background-color:#fff!important; color:var(--kd-alf-text)!important; font-size:14px; outline:none; }
.kd-alf-search-category:focus { border-color:#98a2b3!important; box-shadow:0 0 0 3px rgba(152,162,179,.14)!important; }
