:root {
    --bg: #f6f3ee;
    --surface: #ffffff;
    --surface-soft: #fbfaf7;
    --ink: #221b15;
    --muted: #73685c;
    --line: #e4dcd2;
    --accent: #7a4b24;
    --accent-strong: #4d2f18;
    --accent-soft: #f1e4d6;
    --green: #1f6f4a;
    --danger: #b42318;
    --warn: #a15c07;
    --shadow: 0 18px 45px rgba(55, 37, 21, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(122, 75, 36, 0.08), rgba(122, 75, 36, 0) 260px),
        var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}

a {
    color: var(--accent);
    text-decoration: none;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 82px;
    padding: 12px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand-wrap {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 12px;
    min-width: 210px;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: flex;
}

.brand img {
    height: 58px;
    object-fit: contain;
    width: 168px;
}

.brand-copy {
    display: grid;
    gap: 1px;
}

.brand-copy strong {
    font-size: 16px;
}

.brand-copy small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.button,
button {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
}

.nav a {
    align-items: center;
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 10px 12px;
}

.button:hover,
button:hover {
    border-color: #cdbca9;
}

.button.primary,
button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.nav a:hover {
    background: var(--accent-soft);
}

.nav a.active {
    background: var(--accent);
    color: #fff;
}

.button.danger,
button.danger {
    background: #fff;
    border-color: #f0c9c4;
    color: var(--danger);
}

.page {
    margin: 0 auto;
    max-width: 1240px;
    padding: 28px;
}

body.wide-page .page {
    max-width: none;
    width: 100%;
}

.settings-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr);
}

.settings-wide-panel {
    grid-column: 1 / -1;
}

.settings-form {
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    padding-bottom: 16px;
}

.inline-settings-form,
.filter-edit-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(160px, 1fr)) auto;
}

.filter-edit-form {
    align-items: start;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.settings-keywords {
    grid-column: span 2;
}

.settings-list {
    display: grid;
    gap: 8px;
}

.settings-row {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
}

.settings-row small,
.filter-admin-card small {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
}

.filter-admin-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.filter-admin-card {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 12px;
}

.filter-admin-card .filter-logo {
    height: 76px;
    width: 76px;
}

.filter-admin-card .filter-logo img {
    max-height: 60px;
    max-width: 64px;
}

.auth-page {
    max-width: 460px;
}

.auth-page.panel {
    margin-left: auto;
    margin-right: auto;
}

.login-page .page {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 110px);
}

.login-page .auth-page {
    width: min(100%, 575px);
}

.panel,
.hero-panel,
.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 22px;
}

.hero-panel {
    align-items: center;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 18px;
    padding: 26px;
}

.hero-panel h1 {
    font-size: 32px;
    line-height: 1.12;
    margin-bottom: 8px;
}

.hero-panel p {
    color: var(--muted);
    margin-bottom: 0;
    max-width: 680px;
}

.eyebrow {
    color: var(--accent);
    display: block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.toolbar {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) auto;
    margin-bottom: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.two {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.products-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(520px, 1.35fr) minmax(340px, 0.8fr) minmax(340px, 0.8fr);
}

.products-side {
    display: contents;
}

.product-form-panel,
.import-panel {
    box-shadow: var(--shadow);
    position: sticky;
    top: 106px;
}

.products-layout > section .toolbar {
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 280px) auto;
}

.dashboard-grid {
    align-items: start;
}

.dashboard-hero {
    margin-bottom: 14px;
}

.stat-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.compact-stats .stat-card {
    padding: 14px 16px;
}

.compact-stats .stat-card strong {
    font-size: 28px;
}

.filter-dashboard {
    display: grid;
    gap: 28px;
}

.filter-section {
    display: grid;
    gap: 14px;
}

.filter-tile-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.filter-tile {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--ink);
    display: grid;
    gap: 10px;
    justify-items: center;
    min-height: 188px;
    padding: 18px 14px;
    text-align: center;
}

.filter-tile:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.filter-logo {
    align-items: center;
    background: #f3eee7;
    border-radius: 8px;
    color: var(--accent-strong);
    display: flex;
    font-size: 34px;
    font-weight: 900;
    height: 118px;
    justify-content: center;
    line-height: 1;
    padding: 12px;
    width: 118px;
}

.filter-logo img {
    display: block;
    max-height: 92px;
    max-width: 100px;
    object-fit: contain;
}

.filter-tile strong {
    font-size: 16px;
    line-height: 1.2;
}

.filter-tile small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.logo-illy,
.logo-kitkat,
.logo-snickers {
    background: #df251c;
    color: #fff;
}

.logo-kimbo,
.logo-didiesse-frog {
    background: #171717;
    color: #e71919;
}

.logo-lavazza,
.logo-borbone,
.logo-didiesse {
    background: #f5f3ef;
    color: #214d91;
}

.logo-maracatu {
    color: #004b56;
}

.logo-nescafe-dolce-gusto,
.logo-dolce-gusto {
    background: radial-gradient(circle at 50% 50%, #53260f, #160b06);
    color: #fff;
}

.logo-bialetti,
.logo-delonghi,
.logo-all {
    background: #f0e7dc;
    color: #2a2119;
}

.logo-nespresso {
    background: #111;
    color: #fff;
}

.logo-a-modo-mio,
.logo-ese-44,
.logo-boabe,
.logo-macinata {
    background: #f5f0e9;
    color: #2a2119;
}

.active-filter {
    align-items: center;
    background: var(--accent-soft);
    border: 1px solid #d9c3ad;
    border-radius: 8px;
    color: var(--ink);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.active-filter a {
    font-weight: 800;
}

.quick-filter-dashboard {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 22px;
    margin-top: 20px;
    padding-top: 20px;
}

.quick-filter-section {
    display: grid;
    gap: 12px;
}

.quick-filter-section h2 {
    font-size: 22px;
    margin-bottom: 0;
}

.quick-filter-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.quick-filter-tile {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 7px;
    justify-items: center;
    min-height: 152px;
    padding: 12px 10px;
    text-align: center;
}

.quick-filter-tile:hover,
.quick-filter-tile.active {
    border-color: var(--accent);
    box-shadow: 0 10px 26px rgba(55, 37, 21, 0.08);
}

.quick-filter-tile.active {
    background: var(--accent-soft);
}

.quick-filter-logo {
    align-items: center;
    background: #f3eee7;
    border-radius: 8px;
    display: flex;
    height: 84px;
    justify-content: center;
    padding: 8px;
    width: 84px;
}

.quick-filter-logo img {
    display: block;
    max-height: 68px;
    max-width: 70px;
    object-fit: contain;
}

.quick-filter-tile strong {
    font-size: 14px;
    line-height: 1.18;
}

.quick-filter-tile small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    line-height: 1;
}

.stat-card.warn strong {
    color: var(--warn);
}

.section-head {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: 20px;
    margin-bottom: 0;
}

label {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    outline: 3px solid var(--accent-soft);
}

input[type="checkbox"] {
    min-height: auto;
    width: auto;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.field {
    margin-bottom: 14px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: auto;
}

table {
    border-collapse: collapse;
    min-width: 820px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-soft);
    color: #4a4035;
    font-size: 12px;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

.code {
    background: #2a2119;
    border-radius: 8px;
    color: #fff;
    display: inline-block;
    font-size: 22px;
    font-weight: 800;
    min-width: 72px;
    padding: 8px 12px;
    text-align: center;
}

.small-code {
    font-size: 15px;
    min-width: 54px;
    padding: 6px 8px;
}

.price {
    color: var(--green);
    font-size: 22px;
    font-weight: 800;
    white-space: nowrap;
}

.empty-price {
    color: var(--warn);
    font-weight: 700;
}

.search-input {
    font-size: 22px;
    min-height: 58px;
}

.results {
    display: grid;
    gap: 10px;
}

.search-note,
.search-results-block {
    margin-top: 18px;
}

.product-list {
    display: grid;
    gap: 10px;
}

.product-card {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(55, 37, 21, 0.05);
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 74px;
    padding: 12px;
}

.product-main h3 {
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 7px;
}

.product-meta {
    align-items: center;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.product-meta span {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 7px;
}

.product-price {
    font-weight: 800;
    margin-top: 7px;
    white-space: nowrap;
}

.product-price strong {
    color: var(--green);
    font-size: 14px;
}

.product-actions {
    display: grid;
    gap: 7px;
    grid-template-columns: 1fr;
}

.product-actions .button,
.product-actions button {
    min-height: 36px;
    padding: 7px 10px;
}

.product-actions form {
    margin: 0;
}

.result {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 18px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 14px;
}

.result .price,
.result .empty-price {
    display: block;
    text-align: right;
}

.price-edit-toggle {
    gap: 6px;
    margin-left: auto;
    margin-top: 8px;
    min-height: 34px;
    padding: 7px 10px;
}

.price-edit-toggle span {
    align-items: center;
    background: var(--accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.price-editor {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: none;
    margin-top: 10px;
    padding: 10px;
    width: min(320px, 100%);
}

.price-editor.open {
    display: block;
}

.price-editor label {
    text-align: left;
}

.price-editor-row {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(100px, 1fr) 46px;
}

.price-editor-row input {
    min-height: 40px;
}

.price-editor-row button {
    min-height: 40px;
    padding-left: 8px;
    padding-right: 8px;
}

.price-save-status {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 7px;
    min-height: 18px;
}

.price-save-status.pending {
    color: var(--warn);
}

.price-save-status.saving {
    color: var(--accent);
}

.price-save-status.saved {
    color: var(--green);
}

.price-save-status.error {
    color: var(--danger);
}

.result-name {
    font-size: 19px;
    font-weight: 700;
}

.category-list,
.compact-list {
    display: grid;
    gap: 8px;
}

.category-row,
.compact-row {
    align-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    display: grid;
    gap: 12px;
    padding: 12px;
}

.category-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.compact-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.category-row small,
.compact-row small {
    color: var(--muted);
    display: block;
    font-size: 12px;
}

.category-row b {
    background: var(--accent-soft);
    border-radius: 8px;
    min-width: 42px;
    padding: 7px 10px;
    text-align: center;
}

.compact-row em {
    color: var(--muted);
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}

.alert {
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert.success {
    background: #e6f4ed;
    color: #0f5139;
}

.alert.error {
    background: #fef3f2;
    color: var(--danger);
}

.small {
    font-size: 13px;
}

@media (max-width: 980px) {
    .topbar {
        align-items: flex-start;
        display: grid;
    }

    .brand-wrap {
        width: 100%;
    }

    .nav {
        justify-content: flex-start;
        width: 100%;
    }

    .hero-panel,
    .grid.two,
    .dashboard-grid,
    .products-layout,
    .settings-layout,
    .toolbar {
        grid-template-columns: 1fr;
    }

    .settings-wide-panel {
        grid-column: auto;
    }

    .inline-settings-form,
    .filter-edit-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-side {
        display: grid;
        gap: 16px;
    }

    .product-form-panel,
    .import-panel {
        position: static;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-tile-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 981px) and (max-width: 1320px) {
    .products-layout {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
    }

    .products-side {
        display: grid;
        gap: 16px;
    }

    .product-form-panel,
    .import-panel {
        position: static;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 15px;
    }

    .topbar {
        padding: 10px 12px;
    }

    .brand-wrap {
        display: grid;
        justify-items: center;
        min-width: 0;
        width: 100%;
    }

    .brand-copy {
        display: none;
    }

    .brand img {
        height: 58px;
        width: 174px;
    }

    .nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 2px 0 6px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        white-space: nowrap;
        width: calc(100vw - 24px);
        flex-wrap: nowrap;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        background: var(--surface);
        border: 1px solid var(--line);
        flex: 0 0 auto;
        min-width: 116px;
        scroll-snap-align: start;
    }

    .nav a,
    .button,
    button {
        min-height: 40px;
        padding: 9px 11px;
    }

    .page {
        padding: 14px;
    }

    .panel,
    .hero-panel {
        padding: 16px;
    }

    .hero-panel h1 {
        font-size: 25px;
    }

    .stat-grid,
    .result,
    .product-card,
    .settings-row,
    .filter-admin-card,
    .compact-row {
        grid-template-columns: 1fr;
    }

    .inline-settings-form,
    .filter-edit-form,
    .settings-keywords {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .product-card {
        align-items: start;
        gap: 10px;
    }

    .product-price {
        text-align: left;
    }

    .product-actions {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .product-actions .button,
    .product-actions button {
        width: 100%;
    }

    .stat-card strong {
        font-size: 28px;
    }

    .filter-tile-grid {
        gap: 12px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-filter-dashboard {
        gap: 18px;
        margin-left: -16px;
        margin-right: -16px;
    }

    .quick-filter-section h2 {
        font-size: 20px;
        padding: 0 16px;
    }

    .quick-filter-row {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0 16px 4px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }

    .quick-filter-row::-webkit-scrollbar {
        display: none;
    }

    .quick-filter-tile {
        flex: 0 0 136px;
        min-height: 146px;
        scroll-snap-align: start;
    }

    .filter-tile {
        min-height: 154px;
        padding: 14px 10px;
    }

    .filter-logo {
        font-size: 25px;
        height: 86px;
        width: 86px;
    }

    .search-input {
        font-size: 18px;
        min-height: 52px;
    }

    .result {
        align-items: start;
        gap: 10px;
    }

    .result .code {
        width: 100%;
    }

    .result .price,
    .result .empty-price {
        text-align: left;
    }

    .price-edit-toggle {
        margin-left: 0;
    }

    .price-editor {
        width: 100%;
    }

    .price-editor-row {
        grid-template-columns: minmax(0, 1fr) 46px;
    }

    .code {
        font-size: 20px;
        min-width: 64px;
    }

    .price {
        font-size: 20px;
    }
}

/* Settings page refinement */
.settings-page .page {
    padding-top: 22px;
}

.settings-page .panel {
    overflow: hidden;
}

.settings-hero {
    margin-bottom: 14px;
}

.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.settings-tabs::-webkit-scrollbar {
    display: none;
}

.settings-tabs a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    flex: 0 0 auto;
    font-weight: 800;
    padding: 10px 14px;
}

.settings-tabs a:hover {
    border-color: var(--accent);
}

#users,
#groups,
#filters {
    scroll-margin-top: 120px;
}

.settings-layout {
    grid-template-columns: minmax(330px, 0.8fr) minmax(420px, 1.2fr);
}

.settings-form {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 16px;
}

.settings-form .actions {
    align-items: center;
}

.inline-settings-form {
    align-items: end;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto auto;
}

.filter-edit-form {
    align-items: end;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.settings-keywords {
    grid-column: span 2;
}

.settings-row {
    background: #fff;
    box-shadow: 0 8px 22px rgba(55, 37, 21, 0.04);
}

.settings-row .actions {
    justify-content: flex-end;
}

.settings-row .actions form {
    margin: 0;
}

.filter-admin-grid {
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.filter-admin-card {
    align-items: stretch;
    background: #fff;
    box-shadow: 0 10px 28px rgba(55, 37, 21, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 260px;
    padding: 14px;
}

.filter-admin-media {
    display: flex;
    justify-content: center;
}

.filter-admin-card .filter-logo {
    height: 96px;
    width: 96px;
}

.filter-admin-card .filter-logo img {
    max-height: 78px;
    max-width: 82px;
}

.filter-admin-body {
    display: grid;
    gap: 5px;
    justify-items: center;
    min-height: 74px;
    padding: 12px 4px 10px;
    text-align: center;
}

.filter-admin-body strong {
    font-size: 17px;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.status-pill.is-active {
    background: #e6f4ed;
    color: #0f5139;
}

.status-pill.is-inactive {
    background: #fef3f2;
    color: var(--danger);
}

.filter-admin-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-top: auto;
}

.filter-admin-actions form {
    margin: 0;
}

.filter-admin-actions .button,
.filter-admin-actions button {
    min-height: 40px;
    width: 100%;
}

@media (max-width: 980px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-wide-panel {
        grid-column: auto;
    }

    .inline-settings-form,
    .filter-edit-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-keywords {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .settings-page .page {
        padding: 12px;
    }

    .settings-hero {
        margin-bottom: 10px;
    }

    .settings-tabs {
        margin-left: -12px;
        margin-right: -12px;
        padding: 0 12px 6px;
    }

    .settings-tabs a {
        min-width: 132px;
        text-align: center;
    }

    .settings-form,
    .inline-settings-form,
    .filter-edit-form {
        grid-template-columns: 1fr;
    }

    .settings-keywords {
        grid-column: auto;
    }

    .settings-row {
        grid-template-columns: 1fr;
    }

    .settings-row .actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .settings-row .actions .button,
    .settings-row .actions button {
        width: 100%;
    }

    .filter-admin-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-admin-card {
        min-height: 238px;
        padding: 12px;
    }

    .filter-admin-card .filter-logo {
        height: 82px;
        width: 82px;
    }

    .filter-admin-card .filter-logo img {
        max-height: 66px;
        max-width: 68px;
    }

    .filter-admin-body strong {
        font-size: 15px;
    }

    .filter-admin-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .filter-admin-grid {
        grid-template-columns: 1fr;
    }
}
