.bfl-shell,
.bfl-dashboard {
    width: min(1120px, 100%);
    margin: 0 auto;
    color: #1f2a24;
    font-family: inherit;
}

.bfl-narrow {
    width: min(760px, 100%);
}

.bfl-toolbar,
.bfl-tabs,
.bfl-inline-form,
.bfl-card-actions,
.bfl-actions,
.bfl-section-head {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.bfl-toolbar {
    padding: 14px;
    margin: 0 0 18px;
    background: #f4f7f1;
    border: 1px solid #d9e0d3;
    border-radius: 8px;
}

.bfl-toolbar input,
.bfl-toolbar select,
.bfl-form input,
.bfl-form textarea,
.bfl-form select,
.bfl-inline-form input,
.bfl-inline-form textarea,
.bfl-inline-form select {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cfd8c8;
    border-radius: 6px;
    background: #fff;
    color: #1f2a24;
}

.bfl-toolbar input[type="search"] {
    min-width: min(280px, 100%);
    flex: 1;
}

.bfl-shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.bfl-card,
.bfl-stat {
    background: #fff;
    border: 1px solid #d9e0d3;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(31, 42, 36, 0.06);
}

.bfl-card {
    padding: 18px;
    margin-bottom: 18px;
}

.bfl-product-card {
    padding: 0;
    overflow: hidden;
}

.bfl-product-image {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: #eef3ea;
    color: #68736b;
    text-decoration: none;
}

.bfl-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bfl-card-body {
    padding: 14px;
}

.bfl-card h2,
.bfl-card h3,
.bfl-dashboard h2,
.bfl-dashboard h3 {
    margin: 0 0 12px;
}

.bfl-muted {
    color: #6c786f;
    margin: 0 0 10px;
}

.bfl-farmer-mini {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    margin: 0 0 12px;
}

.bfl-farmer-mini strong,
.bfl-farmer-mini small {
    display: block;
}

.bfl-farmer-mini small {
    color: #6c786f;
}

.bfl-farmer-logo-img,
.bfl-farmer-logo-fallback {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.bfl-farmer-logo-img {
    object-fit: cover;
    border: 1px solid #d9e0d3;
}

.bfl-farmer-logo-fallback {
    display: grid;
    place-items: center;
    background: #e8f5ed;
    color: #24583e;
    font-weight: 800;
}

.bfl-product-meta,
.bfl-summary-card div,
.bfl-stat {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.bfl-product-meta {
    margin: 0 0 12px;
}

.bfl-card-actions {
    align-items: center;
}

.bfl-button,
.bfl-button:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #2f6f4e;
    border-radius: 6px;
    background: #2f6f4e;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.bfl-button:hover,
.bfl-button:focus {
    background: #24583e;
    color: #fff;
}

.bfl-button-muted,
.bfl-button-muted:visited {
    background: #fff;
    color: #2f6f4e;
}

.bfl-button-small {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 14px;
}

.bfl-text-link {
    color: #2f6f4e;
    font-weight: 700;
}

.bfl-badge,
.bfl-alert {
    display: inline-flex;
    padding: 8px 10px;
    border-radius: 6px;
    font-weight: 700;
}

.bfl-badge {
    background: #ece7dc;
    color: #705b23;
}

.bfl-alert {
    display: flex;
    margin: 0 0 16px;
}

.bfl-alert-success {
    background: #e8f5ed;
    color: #24583e;
    border: 1px solid #b7dcc5;
}

.bfl-alert-error {
    background: #fbede9;
    color: #9c3222;
    border: 1px solid #efc6bb;
}

.bfl-table {
    width: 100%;
    border-collapse: collapse;
}

.bfl-table th,
.bfl-table td {
    padding: 10px;
    border-bottom: 1px solid #e5eadf;
    text-align: left;
    vertical-align: middle;
}

.bfl-table th {
    color: #4f5d52;
    font-size: 13px;
    text-transform: uppercase;
}

.bfl-form {
    display: grid;
    gap: 14px;
}

.bfl-form label {
    display: grid;
    gap: 6px;
}

.bfl-form label > span,
.bfl-form-grid label > span {
    font-weight: 700;
}

.bfl-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.bfl-field-wide {
    grid-column: 1 / -1;
}

.bfl-tabs {
    margin: 0 0 16px;
    border-bottom: 1px solid #d9e0d3;
}

.bfl-tabs a {
    padding: 10px 12px;
    color: #33443a;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.bfl-tabs a.is-active {
    color: #2f6f4e;
    border-color: #2f6f4e;
    font-weight: 700;
}

.bfl-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.bfl-stat {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
}

.bfl-stat span {
    color: #647268;
}

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

.bfl-fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    padding: 12px;
    border: 1px solid #d9e0d3;
    border-radius: 8px;
}

.bfl-fieldset legend {
    font-weight: 700;
}

.bfl-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.bfl-gallery img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
}

.bfl-current-image {
    display: block;
}

.bfl-current-image img,
.bfl-gallery-choice img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 1px solid #d9e0d3;
    border-radius: 8px;
}

.bfl-gallery-manager {
    align-items: flex-start;
}

.bfl-gallery-choice {
    display: grid;
    gap: 6px;
    width: 116px;
}

.bfl-link-danger {
    border: 0;
    background: transparent;
    color: #9c3222;
    text-decoration: underline;
    cursor: pointer;
}

.bfl-packing-slip {
    padding: 14px 0;
    border-top: 1px dashed #c8d1c1;
}

.bfl-packing-slip ul {
    margin: 0;
    padding-left: 20px;
}

.bfl-packing-slip span {
    color: #647268;
}

.bfl-order-detail-row td {
    background: #f8faf6;
}

.bfl-order-details summary {
    color: #2f6f4e;
    font-weight: 700;
    cursor: pointer;
}

.bfl-order-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 12px 0;
}

.bfl-inner-table {
    background: #fff;
}

.bfl-create-user-form {
    margin-bottom: 16px;
}

.bfl-user-edit-form {
    align-items: flex-start;
}

.bfl-user-profile {
    flex-basis: 100%;
    width: 100%;
}

.bfl-user-profile summary {
    color: #2f6f4e;
    font-weight: 700;
    cursor: pointer;
}

.bfl-user-profile .bfl-form-grid {
    margin-top: 10px;
    padding: 12px;
    background: #f8faf6;
    border: 1px solid #d9e0d3;
    border-radius: 8px;
}

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

.bfl-filter-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
    background: #f8faf6;
    border: 1px solid #d9e0d3;
    border-radius: 8px;
}

.bfl-filter-panel h3 {
    margin: 0;
}

.bfl-create-term-form,
.bfl-term-edit-form {
    align-items: center;
}

.bfl-term-count {
    min-width: 44px;
    color: #647268;
    text-align: center;
}

@media (max-width: 680px) {
    .bfl-toolbar,
    .bfl-inline-form {
        align-items: stretch;
        flex-direction: column;
    }

    .bfl-toolbar input,
    .bfl-toolbar select,
    .bfl-button,
    .bfl-inline-form input,
    .bfl-inline-form select {
        width: 100%;
    }

    .bfl-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media print {
    body * {
        visibility: hidden;
    }

    .bfl-print-area,
    .bfl-print-area * {
        visibility: visible;
    }

    .bfl-print-area {
        position: absolute;
        inset: 0;
        box-shadow: none;
        border: 0;
    }

    [data-bfl-print],
    .bfl-no-print {
        display: none;
    }
}
