/**
 * Hubble Coffee / Kali — design system
 * Palette da kali.hubblecoffe.com
 */
:root {
    /* Marchio: latte #F5E5D5 ed espresso #4B3B2A (design-system/hubblecoffe-ds). */
    --hc-bg: #fbf3ea;
    --hc-bg-cream: #f5e5d5;
    --hc-surface: #ffffff;
    --hc-text: #2e2318;
    --hc-heading: #4b3b2a;
    --hc-text-muted: #7a6650;
    --hc-primary: #b67534;
    --hc-primary-hover: #9a5f27;
    --hc-primary-dark: #4b3b2a;
    --hc-action: #4b3b2a;
    --hc-action-hover: #2e2318;
    --hc-on-action: #fbf3ea;
    --hc-border: #ecdfce;
    --hc-border-soft: #e6d8c3;
    --hc-hover: #faf5ee;
    --hc-input-bg: #ffffff;
    --hc-input-border: #dccdb8;
    --hc-input-focus-bg: #fffdf9;
    --hc-input-focus-border: #ce8f43;
    --hc-shadow: 0 16px 40px rgba(75, 59, 42, 0.14);
    --hc-shadow-sm: 0 1px 2px rgba(75, 59, 42, 0.05), 0 4px 14px rgba(75, 59, 42, 0.06);
    --hc-shadow-md: 0 2px 4px rgba(75, 59, 42, 0.05), 0 10px 26px rgba(75, 59, 42, 0.10);
    --hc-radius: 16px;
    --hc-radius-sm: 10px;
    --hc-sidebar-w: 16rem;
    --hc-success: #3f7a45;
    --hc-success-bg: #e6f1e2;
    --hc-warning: #a9670f;
    --hc-warning-bg: #fbeecf;
    --hc-danger: #b3402f;
    --hc-danger-bg: #f8e2dc;
    --hc-accent: #ce8f43;
    --hc-accent-soft: #f8e8ce;
    --hc-ring: 0 0 0 3px rgba(206, 143, 67, 0.3);
    --hc-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    /* La shell (barra in alto, laterale, in basso) resta quella di kali: carattere di sistema. */
    --hc-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --hc-font-ui: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --hc-font-display: "Fredoka", "Nunito", ui-sans-serif, system-ui, sans-serif;
    --hc-font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

    /* Alias monitor / preparazioni → stessa palette Kali */
    --monitor-bg: var(--hc-bg);
    --monitor-surface: var(--hc-surface);
    --monitor-text: var(--hc-text);
    --monitor-muted: var(--hc-text-muted);
    --monitor-primary: var(--hc-primary);
    --monitor-primary-hover: var(--hc-primary-hover);
    --monitor-ricette: var(--hc-warning);
    --monitor-etichette: var(--hc-primary);
    --monitor-border: var(--hc-border);

    --coffee-bg: var(--hc-bg);
    --coffee-surface: var(--hc-surface);
    --coffee-text: var(--hc-text);
    --coffee-accent: var(--hc-primary);
    --coffee-accent-dark: var(--hc-primary-hover);
    --coffee-border: var(--hc-border-soft);
}

/* Shell identica a kali (hubble-shared/shell): qui i colori restano quelli di prima del restyling,
   così barra laterale, barra in alto e barra in basso non cambiano rispetto alle altre app. */
.hc-sidebar,
.hc-topbar,
.hc-footerbar {
    --hc-text: #1f2937;
    --hc-heading: #4b3b2a;
    --hc-text-muted: #4b5563;
    --hc-primary: #93876d;
    --hc-primary-hover: #847962;
    --hc-border: #e5e7eb;
    --hc-border-soft: #e8dcc8;
    --hc-hover: #faf8f4;
    --hc-surface: #ffffff;
    --hc-radius: 12px;
    --hc-radius-sm: 6px;
    --hc-shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    font-family: var(--hc-font);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--hc-bg);
    color: var(--hc-text);
    font-family: var(--hc-font);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.hc-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--hc-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

h1,
.fc-monitor-title {
    font-weight: 800;
}

p {
    line-height: 1.6;
    margin-bottom: 0.9rem;
}

.text-muted {
    color: var(--hc-text-muted) !important;
    line-height: 1.45;
}

a {
    color: var(--hc-heading);
}

a:hover {
    color: var(--hc-primary-hover);
}

/* ——— Shell Kali (topbar + sidebar) ——— */
.hc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 0.5rem 0.75rem;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
    background: rgba(250, 248, 244, 0.95);
    color: #4b3b2a;
    border-bottom: 1px solid rgba(232, 220, 200, 0.8);
    box-shadow: 0 1px 2px rgba(75, 59, 42, 0.06);
    backdrop-filter: blur(6px);
}

.hc-topbar--eco-open {
    z-index: 92;
    box-shadow: 0 4px 8px rgba(75, 59, 42, 0.08);
}

@media (min-width: 640px) {
    .hc-topbar {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.hc-topbar-start,
.hc-topbar-end {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.hc-layout .hc-shell {
    flex: 1;
    min-height: 100vh;
    align-items: stretch;
}

.hc-layout .hc-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hc-layout .hc-sidebar-inner {
    flex: 1;
    overflow-y: auto;
    padding-top: 0.35rem;
}

.hc-layout .hc-main-col {
    min-height: 100vh;
}

.hc-layout .hc-topbar {
    justify-content: flex-start;
}

.hc-topbar-eco {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.hc-layout .hc-topbar .hc-topbar-end {
    margin-left: auto;
}

.hc-icon-btn.hc-topbar-menu {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    margin-right: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    box-shadow: none;
    color: #4b3b2a;
}

.hc-icon-btn.hc-topbar-menu:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #4b3b2a;
}

.hc-layout:not(.sidebar-open) .hc-icon-btn.hc-topbar-menu {
    display: inline-flex;
}

.hc-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 0.65rem 0.15rem 1rem;
}

.hc-sidebar-logo img {
    height: 2rem;
    width: auto;
    display: block;
}

.hc-sidebar-collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--hc-text-muted);
}

.hc-sidebar-collapse:hover {
    background: var(--hc-hover);
    color: var(--hc-text);
}

.hc-topbar-logo {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: var(--hc-radius-sm);
    text-decoration: none;
}

.hc-topbar-logo:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hc-topbar-logo img {
    height: 2rem;
    width: auto;
    display: block;
}

.hc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--hc-border-soft);
    background: var(--hc-surface);
    color: var(--hc-text);
    box-shadow: var(--hc-shadow-sm);
    text-decoration: none;
    transition: background-color 0.2s;
}

.hc-icon-btn:hover {
    background: var(--hc-hover);
    color: var(--hc-text);
}

.hc-icon-btn i {
    font-size: 1.15rem;
}

.hc-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.hc-sidebar {
    width: var(--hc-sidebar-w);
    flex-shrink: 0;
    background: var(--hc-surface);
    border-right: 1px solid var(--hc-border-soft);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.06);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.hc-sidebar-brand {
    padding: 1rem 1.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    text-align: center;
}

.hc-sidebar-brand img {
    height: 2.5rem;
    width: auto;
}

.hc-sidebar-inner {
    padding: 1.25rem 1rem 4.5rem;
}

.hc-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 190;
}

.hc-nav-link,
.hc-nav-sublink,
.hc-nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--hc-radius-sm);
    background: transparent;
    color: var(--hc-text);
    font-size: 0.875rem;
    text-decoration: none;
    text-align: left;
    transition: background-color 0.15s;
}

.hc-nav-link:hover,
.hc-nav-sublink:hover,
.hc-nav-group-toggle:hover {
    background: #f3f4f6;
    color: var(--hc-text);
}

.hc-nav-link.active,
.hc-nav-sublink.active,
.hc-nav-group-toggle.active {
    background: #f3f4f6;
    font-weight: 600;
}

.hc-nav-icon {
    color: var(--hc-primary);
    font-size: 1rem;
    width: 1rem;
    flex-shrink: 0;
}

.hc-nav-group {
    margin-top: 0.15rem;
}

.hc-nav-group-toggle {
    justify-content: space-between;
}

.hc-nav-group-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hc-nav-chevron {
    font-size: 0.75rem;
    color: var(--hc-text-muted);
    transition: transform 0.2s;
}

.hc-nav-group-toggle[aria-expanded="true"] .hc-nav-chevron {
    transform: rotate(180deg);
}

.hc-nav-sub {
    padding-left: 1.25rem;
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hc-nav-sublink {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
}

.hc-nav-sublink .hc-nav-icon {
    font-size: 0.8rem;
}

.hc-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.hc-main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hc-main {
    flex: 1;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.hc-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
    margin: 0 0 1rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--hc-text-muted);
}

.hc-breadcrumb-link {
    color: var(--hc-text-muted);
    text-decoration: none;
    font-weight: 500;
}

.hc-breadcrumb-link:hover {
    color: var(--hc-heading);
    text-decoration: none;
}

.hc-breadcrumb-muted {
    color: var(--hc-text-muted);
    font-weight: 500;
}

.hc-breadcrumb-sep {
    color: var(--hc-border-soft);
    user-select: none;
}

.hc-breadcrumb-current {
    color: var(--hc-heading);
    font-weight: 600;
}

@media (min-width: 640px) {
    .hc-main {
        padding-top: 0.5rem;
    }
}

.hc-footerbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    min-height: 46px;
    padding: 0.45rem 1rem;
    background: #f8f8f8;
    border-top: 1px solid #e7e7e7;
}

.hc-footerbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.15rem;
    width: 100%;
    min-height: 2.35rem;
}

.hc-footerbar-shop {
    min-width: 0;
    flex: 0 1 auto;
    margin-right: auto;
}

.hc-footerbar-tools {
    flex: 0 0 auto;
    margin-left: auto;
}

.fc-footer-anno {
    margin: 0;
}

.hc-footerbar .fc-year-panel,
.kali-bottom-bar .fc-year-panel {
    top: auto;
    bottom: calc(100% + 0.45rem);
}

.hc-footerbar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
}

.hc-footerbar-toggle:hover,
.hc-footerbar-toggle:focus {
    color: #756646;
}

/* Tailwind (CDN) definisce anche lui un'utility `.collapse` (visibility: collapse,
   per righe/colonne di tabella) che va in conflitto col componente Bootstrap
   `.collapse.show` usato qui: a fine apertura l'elemento resta visivamente
   nascosto. Specificità doppia per vincere sempre, indipendentemente dall'ordine
   di caricamento degli stylesheet. */
.collapse.show {
    visibility: visible;
}

.hc-footerbar-shops {
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
    max-height: 14rem;
    overflow-y: auto;
}

.hc-footerbar-shops button {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.15rem;
    border: 0;
    background: none;
    text-align: left;
    color: #333;
}

.hc-footerbar-shops button.is-current,
.hc-footerbar-shops button:hover {
    color: #756646;
    font-weight: 600;
}

.hc-main {
    padding-bottom: 4.5rem;
}

.hc-avatar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.2rem 0.15rem;
    border: 0;
    background: transparent;
    color: #4b3b2a;
}

.hc-avatar-btn .bi-chevron-down {
    font-size: 0.75rem;
}

.hc-avatar-img,
.hc-avatar-fallback {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    object-fit: cover;
}

.hc-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e7e1d6;
    color: #756646;
}

.hc-account-menu {
    width: 15rem;
    padding: 0;
    overflow: hidden;
}

.hc-account-head {
    padding: 0.55rem 0.85rem;
    background: #f4f4f4;
    font-weight: 600;
}

.hc-account-body {
    padding: 0.85rem;
    text-align: center;
}

.hc-account-photo {
    width: 96px;
    height: 96px;
    border-radius: 6px;
    object-fit: cover;
}

.hc-account-name {
    margin: 0.65rem 0 0.85rem;
    font-weight: 600;
}

.hc-account-logout {
    display: block;
    width: 100%;
    background: #dd4b39;
    border-color: #d73925;
    color: #fff;
    font-weight: 600;
}

.hc-account-logout:hover {
    background: #c23321;
    color: #fff;
}

@media (max-width: 639px) {
    .hc-sidebar,
    .hc-layout .hc-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
    }

    .hc-app.sidebar-open .hc-sidebar {
        transform: translateX(0);
    }

    .hc-app.sidebar-open .hc-sidebar-backdrop {
        display: block;
    }
}

@media (min-width: 640px) {
    .hc-app:not(.sidebar-open) .hc-sidebar {
        display: none;
    }
}

.dropdown-menu {
    border: 1px solid var(--hc-border-soft);
    border-radius: var(--hc-radius-sm);
    box-shadow: var(--hc-shadow-sm);
}

.dropdown-item {
    color: var(--hc-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--hc-input-focus-bg);
    color: var(--hc-primary-dark);
}

main.container {
    background: transparent;
    padding-bottom: 2rem;
}

/* ——— Cards & tables ——— */
.card,
.table,
.alert {
    background-color: var(--hc-surface);
}

.card {
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow-sm);
}

.card-body {
    padding: 1.15rem 1.2rem;
}

.card-header {
    background-color: #faf7f2;
    border-bottom: 1px solid var(--hc-border-soft);
    color: var(--hc-heading);
    font-weight: 700;
}

.table thead th {
    background-color: #faf7f2;
    color: var(--hc-heading);
    border-bottom: 1px solid var(--hc-border-soft);
    font-weight: 700;
}

.table-hover tbody tr:hover {
    background-color: #faf7f2;
}

.table > :not(caption) > * > * {
    padding: 0.75rem 0.8rem;
    vertical-align: middle;
    border-color: var(--hc-border);
}

.list-group-item {
    border-color: var(--hc-border);
    color: var(--hc-text);
}

.list-group-item-action:hover {
    background-color: var(--hc-input-focus-bg);
}

/* ——— Forms ——— */
.form-label {
    margin-bottom: 0.45rem;
    font-weight: 500;
    color: var(--hc-text);
}

.form-control,
.form-select {
    background-color: var(--hc-input-bg);
    border: 1px solid var(--hc-input-border);
    border-radius: var(--hc-radius-sm);
    color: var(--hc-text);
    padding: 0.65rem 0.75rem;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--hc-input-focus-bg);
    border-color: var(--hc-input-focus-border);
    box-shadow: 0 0 0 0.15rem rgba(147, 135, 109, 0.2);
    color: var(--hc-text);
}

.input-group-text {
    background-color: var(--hc-surface);
    border: 1px solid var(--hc-input-border);
    color: var(--hc-text-muted);
}

.form-check-input:checked {
    background-color: var(--hc-primary);
    border-color: var(--hc-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(147, 135, 109, 0.25);
}

/* ——— Buttons ——— */
.btn {
    padding: 0.5rem 0.9rem;
    line-height: 1.35;
    border-radius: var(--hc-radius-sm);
    font-weight: 600;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
    background-color: var(--hc-action);
    border-color: var(--hc-action);
    color: var(--hc-on-action);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--hc-action-hover) !important;
    border-color: var(--hc-action-hover) !important;
    color: var(--hc-on-action) !important;
}

.btn-outline-primary {
    color: var(--hc-primary-dark);
    border-color: var(--hc-primary);
}

.btn-outline-primary:hover {
    background-color: var(--hc-action);
    border-color: var(--hc-action);
    color: var(--hc-on-action);
}

.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: var(--hc-action);
    border-color: var(--hc-action);
    color: var(--hc-on-action);
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: var(--hc-action-hover);
    border-color: var(--hc-action-hover);
}

.btn-danger {
    background-color: var(--hc-danger);
    border-color: var(--hc-danger);
    color: #fff;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
    background-color: #a93226 !important;
    border-color: #a93226 !important;
    color: #fff !important;
}

.btn-outline-secondary {
    color: var(--hc-heading);
    border-color: var(--hc-border-soft);
    background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    color: var(--hc-heading);
    background: #f3ebe1;
    border-color: #dfd2be;
}

.btn-outline-danger {
    color: var(--hc-danger);
    border-color: var(--hc-danger);
    background-color: transparent;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
    background-color: var(--hc-hover, #faf8f4);
    border-color: var(--hc-danger);
    color: var(--hc-danger) !important;
}

.btn-secondary {
    background-color: #f3ebe1;
    border-color: #dfd2be;
    color: var(--hc-heading);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: #e7dcc8 !important;
    border-color: #dfd2be !important;
    color: var(--hc-heading) !important;
}

.btn-outline-secondary {
    color: var(--hc-heading);
    border-color: var(--hc-border-soft);
    background-color: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: #f3ebe1;
    border-color: #dfd2be;
    color: var(--hc-heading);
}

.page-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.page-actions form {
    margin: 0;
}

.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    justify-content: space-between;
}

.bulk-category-input {
    min-width: 220px;
}

/* ——— Pannelli riepilogo (preparazioni/ricette) ——— */
.hc-summary {
    border-radius: var(--hc-radius-sm);
    padding: 0.75rem 1rem;
}

.hc-summary-primary {
    background: #f3f4f6;
    border: 2px solid var(--hc-primary);
}

.hc-summary-primary .hc-summary-label {
    font-weight: 600;
    color: var(--hc-primary-dark);
}

.hc-summary-primary .hc-summary-value {
    color: var(--hc-primary);
    font-size: 1.1rem;
}

.hc-summary-success,
.hc-summary-warning {
    background: #f3ebe1;
    border: 1px solid #dfd2be;
    border-radius: var(--hc-radius-sm);
}

.hc-summary-success .hc-summary-value,
.hc-summary-warning .hc-summary-value {
    color: var(--hc-heading);
    font-size: 1.1rem;
}

.hc-summary-warning .hc-summary-label {
    font-weight: 600;
    color: var(--hc-heading);
}

.costo-ingrediente {
    background: #f3f4f6 !important;
    border: 1px solid var(--hc-border) !important;
    color: var(--hc-primary-dark) !important;
    padding: 0.5rem;
    border-radius: var(--hc-radius-sm);
    font-weight: 600;
    text-align: center;
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.costo-ingrediente.costo-positive {
    color: var(--hc-heading) !important;
    background: #f3ebe1 !important;
    border-color: #dfd2be !important;
}

.costo-ingrediente.costo-cliccabile { cursor: pointer; gap: 0.35rem; }
.costo-ingrediente.costo-verificato { color: #1e6b3a !important; border-color: #9ccfae !important; background: #eaf6ee !important; }
.costo-ingrediente.costo-da-fattura { color: #b42318 !important; border-color: #f0a9a3 !important; background: #fdecea !important; }
.costo-ingrediente.costo-cliccabile:hover { filter: brightness(0.96); }

/* ——— Hero & filtri ——— */
.coffee-hero {
    background: var(--hc-action);
    padding: 2.5rem 2rem;
    border-radius: var(--hc-radius);
    color: var(--hc-on-action);
    position: relative;
    overflow: hidden;
    box-shadow: var(--hc-shadow-sm);
}

.coffee-hero-circle {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
}

.coffee-hero-content {
    position: relative;
    z-index: 1;
}

.coffee-hero-title {
    color: var(--hc-on-action);
    margin-bottom: 0.5rem;
}

.coffee-hero-subtitle {
    margin: 0;
    font-size: 1.05rem;
    opacity: 0.95;
}

.coffee-filter-box {
    background: var(--hc-surface);
    padding: 1rem;
    border-radius: var(--hc-radius-sm);
    border: 1px solid var(--hc-border);
    box-shadow: var(--hc-shadow-sm);
}

.coffee-filter-title {
    color: var(--hc-primary-dark);
    font-weight: 600;
    display: block;
    margin-bottom: 0.75rem;
}

.coffee-search-addon {
    border: 1px solid var(--hc-input-border);
    background: var(--hc-surface);
}

.coffee-price {
    color: var(--hc-heading);
}

.coffee-alert-item {
    border-left: 4px solid var(--hc-danger);
}

/* Dashboard — schede alert FC / DC affiancate */
.dashboard-alert-row > [class*="col-"] {
    display: flex;
}

.dashboard-alert-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-alert-card .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.dashboard-alert-card.is-expanded {
    height: auto;
}

.dashboard-alert-body--paired {
    min-height: 17.5rem;
}

.dashboard-alert-list {
    flex: 1 1 auto;
}

.dashboard-alert-toggle {
    align-self: flex-start;
    padding-left: 0;
    text-decoration: none;
}

.dashboard-alert-toggle:hover {
    text-decoration: underline;
}

.coffee-empty-state {
    text-align: center;
    padding: 2rem;
}

.coffee-empty-icon {
    font-size: 2.4rem;
    color: var(--hc-primary);
    margin-bottom: 1rem;
    display: block;
}

.coffee-ok-icon {
    font-size: 3rem;
    color: var(--hc-success);
    margin-bottom: 1rem;
    display: block;
}

.coffee-empty-panel {
    background: #faf7f2;
    padding: 2rem;
    border-radius: var(--hc-radius);
    border-left: 4px solid var(--hc-primary);
}

.coffee-empty-title {
    color: var(--hc-primary-dark);
    margin-bottom: 0.5rem;
}

.coffee-accent-text {
    color: var(--hc-primary);
}

.coffee-warm-text {
    color: var(--hc-primary);
}

.coffee-muted-strong {
    color: var(--hc-primary-dark);
    font-size: 1rem;
}

.coffee-left-border {
    border-left: 4px solid var(--hc-primary);
}

.stat-card .card-body h2 {
    color: var(--hc-primary-dark);
}

.stat-card .card-body h6 {
    color: var(--hc-text-muted);
}

/* ——— Alert: stessa pasta di Kali, niente giallo/blu/verde Bootstrap ——— */
.alert {
    border-radius: 12px;
    border: 1px solid #dfd2be;
    background: #f3ebe1;
    color: var(--hc-heading);
}

.alert-success,
.alert-warning,
.alert-info,
.alert-primary,
.alert-secondary,
.alert-light {
    background: #f3ebe1;
    border-color: #dfd2be;
    color: var(--hc-heading);
}

.alert-danger {
    background: #f6efe8;
    border-color: #e0d0c0;
    color: var(--hc-heading);
}

.alert a {
    color: var(--hc-heading);
    font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════════════════
   Restyling 2026-11-26 — componenti generici (schede, tabelle, campi, pulsanti,
   avvisi, finestre). Sta dopo le regole base e PRIMA delle regole di pagina:
   quelle più sotto e i CSS delle singole pagine continuano a vincere.
   Riguarda solo il contenuto (.hc-main, finestre, tendine): la shell è di kali.
   ══════════════════════════════════════════════════════════════════════════ */
.hc-main,
.modal,
.offcanvas,
.toast,
.select2-container {
    --hc-font: var(--hc-font-ui);
    font-family: var(--hc-font-ui);
    font-feature-settings: "tnum" 0;
}

.hc-main {
    color: var(--hc-text);
    /* Puntinato leggero in cima alla pagina, che sfuma: un cenno al cielo stellato del marchio. */
    background-image:
        linear-gradient(to bottom, rgba(251, 243, 234, 0) 0, var(--hc-bg) 300px),
        radial-gradient(rgba(75, 59, 42, 0.11) 1px, transparent 1.2px);
    background-size: auto, 20px 20px;
    background-repeat: no-repeat, repeat;
}

::selection {
    background: rgba(206, 143, 67, 0.32);
}

/* Titoli: Tailwind (CDN) li azzera tutti a 1rem. Specificità bassa: una classe di pagina li cambia. */
main h1, main h2, main h3, main h4, main h5, main h6,
.modal h1, .modal h2, .modal h3, .modal h4, .modal h5, .modal h6 {
    font-family: var(--hc-font-display);
    font-weight: 600;
    letter-spacing: -0.012em;
    color: var(--hc-heading);
}
main h1 { font-size: 1.6rem; }
main h2 { font-size: 1.3rem; }
main h3 { font-size: 1.15rem; }
main h4 { font-size: 1.05rem; }
main h5, .modal h5 { font-size: 1rem; }
main h6 { font-size: 0.875rem; }

.hc-main a {
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

.hc-main code, .hc-main kbd, .hc-main pre, .hc-main samp {
    font-family: var(--hc-font-mono);
}

/* Numeri: cifre allineate in colonna nelle tabelle; Space Mono solo sui numeri grandi (indicatori). */
.coffee-price,
.fc-supplier-num,
.fc-supplier-date,
.fc-rfc-prezzo,
.fc-rfc-ricette,
.fc-lt .c-prezzo,
.table td.text-end,
.fc-num {
    font-variant-numeric: tabular-nums;
}
.hc-summary-value,
.stat-card .card-body h2,
.fc-rfc-conteggio {
    font-family: var(--hc-font-mono);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

/* Caselle e interruttori nativi (senza classi Bootstrap): colore del marchio invece del blu del browser. */
.hc-main,
.modal {
    accent-color: var(--hc-action);
}

/* Fuoco da tastiera: un solo anello caramello ovunque. */
.hc-main :focus-visible,
.modal :focus-visible {
    outline: 2px solid var(--hc-accent);
    outline-offset: 2px;
}
.hc-main .form-control:focus-visible,
.hc-main .form-select:focus-visible,
.modal .form-control:focus-visible,
.modal .form-select:focus-visible,
.hc-main input[type="search"]:focus-visible {
    outline: none;
}

/* ——— Schede ——— */
.card {
    --bs-card-border-color: var(--hc-border);
    --bs-card-cap-bg: #fffaf3;
    border: 1px solid var(--hc-border);
    border-radius: var(--hc-radius);
    box-shadow: var(--hc-shadow-sm);
    overflow: clip;
}
.card-header {
    background-color: #fffaf3;
    border-bottom: 1px solid var(--hc-border);
    font-family: var(--hc-font-display);
    font-weight: 600;
    letter-spacing: -0.005em;
    padding: 0.8rem 1.2rem;
}
.card-footer {
    background-color: #fffaf3;
    border-top: 1px solid var(--hc-border);
    padding: 0.8rem 1.2rem;
}
.card-body {
    padding: 1.2rem 1.25rem;
}
.stat-card .card-body h6 {
    font-family: var(--hc-font-ui);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}
.stat-card .card-body h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* ——— Tabelle ——— */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--hc-text);
    --bs-table-border-color: var(--hc-border);
    --bs-table-striped-bg: #fdf9f3;
    --bs-table-striped-color: var(--hc-text);
    --bs-table-hover-bg: #fcf5ea;
    --bs-table-hover-color: var(--hc-text);
    --bs-table-active-bg: #f8e8ce;
    color: var(--hc-text);
    background-color: var(--hc-surface);
}
.table thead th {
    background-color: #fdf8f1;
    color: var(--hc-text-muted);
    border-bottom: 1px solid var(--hc-border);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    white-space: nowrap;
}
.table > :not(caption) > * > * {
    padding: 0.7rem 0.85rem;
    border-color: var(--hc-border);
}
.table-sm > :not(caption) > * > * {
    padding: 0.4rem 0.6rem;
}
.table-hover tbody tr {
    transition: background-color 0.12s;
}
.table-hover tbody tr:hover {
    background-color: #fcf5ea;
}
.table-light,
.table > thead.table-light > tr > th {
    --bs-table-bg: #fdf8f1;
    --bs-table-color: var(--hc-text-muted);
    --bs-table-border-color: var(--hc-border);
}
.table-warning { --bs-table-bg: #fbeecf; --bs-table-color: var(--hc-text); --bs-table-border-color: #f1ddb0; }
.table-danger { --bs-table-bg: #f8e2dc; --bs-table-color: var(--hc-text); --bs-table-border-color: #eec9c0; }
.table-success { --bs-table-bg: #e6f1e2; --bs-table-color: var(--hc-text); --bs-table-border-color: #cfe2c8; }
.table-info, .table-primary, .table-secondary { --bs-table-bg: #f6efe5; --bs-table-color: var(--hc-text); --bs-table-border-color: var(--hc-border); }
.table-responsive {
    border-radius: inherit;
    scrollbar-width: thin;
}

/* ——— Campi ——— */
.form-label {
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--hc-heading);
}
.form-control,
.form-select {
    background-color: var(--hc-input-bg);
    border: 1px solid var(--hc-input-border);
    border-radius: var(--hc-radius-sm);
    color: var(--hc-text);
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.form-control::placeholder {
    color: #a8977f;
    opacity: 1;
}
.form-control:hover:not(:focus):not(:disabled):not([readonly]),
.form-select:hover:not(:focus):not(:disabled) {
    border-color: #c9b69c;
}
.form-control:focus,
.form-select:focus {
    background-color: var(--hc-input-focus-bg);
    border-color: var(--hc-input-focus-border);
    box-shadow: var(--hc-ring);
    color: var(--hc-text);
}
.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    background-color: #f7f0e6;
    color: var(--hc-text-muted);
}
.form-control-sm,
.form-select-sm {
    border-radius: 8px;
}
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--hc-danger);
}
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: var(--hc-danger);
    box-shadow: 0 0 0 3px rgba(179, 64, 47, 0.2);
}
.invalid-feedback {
    color: var(--hc-danger);
    font-weight: 600;
}
.form-text {
    color: var(--hc-text-muted);
}
.input-group-text {
    background-color: #fdf8f1;
    border: 1px solid var(--hc-input-border);
    border-radius: var(--hc-radius-sm);
    color: var(--hc-text-muted);
}
.form-check-input {
    border-color: #cbb89e;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--hc-action);
    border-color: var(--hc-action);
}
.form-check-input:focus {
    border-color: var(--hc-accent);
    box-shadow: var(--hc-ring);
}
.form-switch .form-check-input {
    transition: background-position 0.18s var(--hc-ease), background-color 0.15s, border-color 0.15s;
}
.form-switch .form-check-input:checked {
    background-color: var(--hc-success);
    border-color: var(--hc-success);
}
.form-check-label {
    cursor: pointer;
}
.form-range::-webkit-slider-thumb { background: var(--hc-action); }
.form-range::-moz-range-thumb { background: var(--hc-action); }

/* ——— Pulsanti ——— */
.btn {
    --bs-btn-focus-box-shadow: var(--hc-ring);
    border-radius: var(--hc-radius-sm);
    font-weight: 700;
    letter-spacing: 0.005em;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s var(--hc-ease);
}
.btn:active:not(:disabled):not(.disabled) {
    transform: translateY(1px) scale(0.985);
}
.btn:focus-visible {
    outline: none;
    box-shadow: var(--hc-ring);
}
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
}
.btn-sm {
    border-radius: 8px;
}
.btn-lg {
    border-radius: 12px;
}
.btn-primary,
.btn-success {
    --bs-btn-color: var(--hc-on-action);
    --bs-btn-bg: var(--hc-action);
    --bs-btn-border-color: var(--hc-action);
    --bs-btn-hover-color: var(--hc-on-action);
    --bs-btn-hover-bg: var(--hc-action-hover);
    --bs-btn-hover-border-color: var(--hc-action-hover);
    --bs-btn-active-color: var(--hc-on-action);
    --bs-btn-active-bg: var(--hc-action-hover);
    --bs-btn-active-border-color: var(--hc-action-hover);
    --bs-btn-disabled-color: var(--hc-on-action);
    --bs-btn-disabled-bg: var(--hc-action);
    --bs-btn-disabled-border-color: var(--hc-action);
    box-shadow: 0 1px 2px rgba(46, 35, 24, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-primary:hover,
.btn-success:hover {
    box-shadow: 0 4px 12px rgba(46, 35, 24, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn-secondary {
    --bs-btn-disabled-color: var(--hc-heading);
    --bs-btn-disabled-bg: #f3ebe1;
    --bs-btn-disabled-border-color: #dfd2be;
    background-color: #f5ecdf;
    border-color: #e6d8c3;
    color: var(--hc-heading);
}
.btn-outline-primary {
    --bs-btn-color: var(--hc-heading);
    --bs-btn-border-color: var(--hc-heading);
    --bs-btn-disabled-color: var(--hc-heading);
    --bs-btn-disabled-border-color: var(--hc-heading);
    --bs-btn-active-bg: var(--hc-action);
    --bs-btn-active-border-color: var(--hc-action);
    --bs-btn-active-color: var(--hc-on-action);
    color: var(--hc-heading);
    border-color: var(--hc-heading);
}
.btn-outline-secondary {
    --bs-btn-disabled-color: var(--hc-text-muted);
    --bs-btn-disabled-border-color: var(--hc-border-soft);
    --bs-btn-active-bg: #f3ebe1;
    --bs-btn-active-border-color: #dfd2be;
    --bs-btn-active-color: var(--hc-heading);
    border-color: var(--hc-input-border);
}
.btn-outline-success,
.btn-outline-dark {
    --bs-btn-color: var(--hc-heading);
    --bs-btn-border-color: var(--hc-input-border);
    --bs-btn-hover-color: var(--hc-heading);
    --bs-btn-hover-bg: #f3ebe1;
    --bs-btn-hover-border-color: #dfd2be;
    --bs-btn-active-color: var(--hc-heading);
    --bs-btn-active-bg: #eadfcd;
    --bs-btn-active-border-color: #dfd2be;
    --bs-btn-disabled-color: var(--hc-text-muted);
    --bs-btn-disabled-border-color: var(--hc-border-soft);
    background-color: #fff;
}
.btn-outline-warning,
.btn-outline-info {
    --bs-btn-color: var(--hc-primary-hover);
    --bs-btn-border-color: #e0ab68;
    --bs-btn-hover-color: #40270d;
    --bs-btn-hover-bg: #f8e8ce;
    --bs-btn-hover-border-color: #e0ab68;
    --bs-btn-active-color: #40270d;
    --bs-btn-active-bg: #f3dcb5;
    --bs-btn-active-border-color: #e0ab68;
}
.btn-warning {
    --bs-btn-color: #40270d;
    --bs-btn-bg: #e9b877;
    --bs-btn-border-color: #e0ab68;
    --bs-btn-hover-color: #40270d;
    --bs-btn-hover-bg: #e0ab68;
    --bs-btn-hover-border-color: #ce8f43;
    --bs-btn-active-color: #40270d;
    --bs-btn-active-bg: #ce8f43;
    --bs-btn-active-border-color: #ce8f43;
    --bs-btn-disabled-color: #40270d;
    --bs-btn-disabled-bg: #e9b877;
    --bs-btn-disabled-border-color: #e0ab68;
}
.btn-info,
.btn-light {
    --bs-btn-color: var(--hc-heading);
    --bs-btn-bg: #f8e8ce;
    --bs-btn-border-color: #f0d9b3;
    --bs-btn-hover-color: var(--hc-heading);
    --bs-btn-hover-bg: #f3dcb5;
    --bs-btn-hover-border-color: #e9cc9c;
    --bs-btn-active-color: var(--hc-heading);
    --bs-btn-active-bg: #edd0a2;
    --bs-btn-active-border-color: #e9cc9c;
    --bs-btn-disabled-color: var(--hc-heading);
    --bs-btn-disabled-bg: #f8e8ce;
    --bs-btn-disabled-border-color: #f0d9b3;
}
.btn-light {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--hc-border-soft);
    --bs-btn-hover-bg: #faf5ee;
    --bs-btn-hover-border-color: var(--hc-input-border);
    --bs-btn-active-bg: #f3ebe1;
    --bs-btn-disabled-bg: #fff;
    --bs-btn-disabled-border-color: var(--hc-border-soft);
}
.btn-dark {
    --bs-btn-bg: #2e2318;
    --bs-btn-border-color: #2e2318;
    --bs-btn-hover-bg: #211812;
    --bs-btn-hover-border-color: #211812;
    --bs-btn-active-bg: #211812;
    --bs-btn-active-border-color: #211812;
    --bs-btn-disabled-bg: #2e2318;
    --bs-btn-disabled-border-color: #2e2318;
}
.btn-danger {
    --bs-btn-disabled-bg: var(--hc-danger);
    --bs-btn-disabled-border-color: var(--hc-danger);
    box-shadow: 0 1px 2px rgba(120, 40, 28, 0.25);
}
.btn-outline-danger {
    --bs-btn-disabled-color: var(--hc-danger);
    --bs-btn-disabled-border-color: var(--hc-danger);
    border-color: #e3b3aa;
}
.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
    background-color: var(--hc-danger-bg);
}
.btn-link {
    --bs-btn-color: var(--hc-primary-hover);
    --bs-btn-hover-color: var(--hc-heading);
    --bs-btn-active-color: var(--hc-heading);
    --bs-btn-disabled-color: var(--hc-text-muted);
    font-weight: 700;
    text-underline-offset: 0.18em;
}
.btn-close:focus {
    box-shadow: var(--hc-ring);
}
.dashboard-alert-toggle {
    padding-left: 0;
}

/* ——— Etichette (badge): pillole a tinta leggera ——— */
.badge {
    border-radius: 999px;
    padding: 0.36em 0.7em;
    font-family: var(--hc-font-ui);
    font-weight: 800;
    letter-spacing: 0.02em;
}
.badge.bg-success, .badge.text-bg-success { background-color: #e3eedc !important; color: #2f5e33 !important; }
.badge.bg-warning, .badge.text-bg-warning { background-color: #fbeecf !important; color: #7d4d08 !important; }
.badge.bg-danger, .badge.text-bg-danger { background-color: #f6ded8 !important; color: #8f2f21 !important; }
.badge.bg-info, .badge.text-bg-info { background-color: #dee7f3 !important; color: #2f4c77 !important; }
.badge.bg-secondary, .badge.text-bg-secondary { background-color: #efe4d4 !important; color: #5c4a36 !important; }
.badge.bg-light, .badge.text-bg-light { background-color: #fdf8f1 !important; color: #5c4a36 !important; box-shadow: inset 0 0 0 1px var(--hc-border-soft); }
.badge.bg-primary, .badge.text-bg-primary,
.badge.bg-dark, .badge.text-bg-dark { background-color: var(--hc-action) !important; color: var(--hc-on-action) !important; }

/* ——— Colori di servizio Bootstrap ricondotti al marchio ——— */
.hc-main .text-primary, .modal .text-primary { color: var(--hc-primary-hover) !important; }
.hc-main .text-success, .modal .text-success { color: var(--hc-success) !important; }
.hc-main .text-danger, .modal .text-danger { color: var(--hc-danger) !important; }
.hc-main .text-warning, .modal .text-warning { color: var(--hc-warning) !important; }
.hc-main .text-info, .modal .text-info { color: #3e6194 !important; }
.hc-main .bg-primary:not(.badge) { background-color: var(--hc-action) !important; }
.hc-main .bg-light:not(.badge), .modal .bg-light:not(.badge) { background-color: #fdf8f1 !important; }
.hc-main .border-primary { border-color: var(--hc-accent) !important; }
.hc-main .link-primary { color: var(--hc-primary-hover) !important; }
.hc-main hr, .modal hr { border-color: var(--hc-border-soft); opacity: 1; }
.spinner-border { --bs-spinner-border-width: 0.18em; }
.progress {
    --bs-progress-bg: #f1e6d6;
    --bs-progress-bar-bg: var(--hc-accent);
    --bs-progress-border-radius: 999px;
    --bs-progress-height: 0.6rem;
}

/* ——— Avvisi: fondo caldo e una riga di colore a sinistra che dice di che tipo sono ——— */
.alert {
    position: relative;
    border-radius: 14px;
    border: 1px solid var(--hc-border-soft);
    background: #fffaf3;
    color: var(--hc-heading);
    box-shadow: var(--hc-shadow-sm);
    padding-left: 1.25rem;
}
.alert::before {
    content: "";
    position: absolute;
    left: 0.45rem;
    top: 0.6rem;
    bottom: 0.6rem;
    width: 4px;
    border-radius: 4px;
    background: var(--hc-accent);
}
.alert-success,
.alert-warning,
.alert-info,
.alert-primary,
.alert-secondary,
.alert-light {
    background: #fffaf3;
    border-color: var(--hc-border-soft);
    color: var(--hc-heading);
}
.alert-success::before { background: var(--hc-success); }
.alert-danger { background: #fdf3f0; border-color: #efd3cc; color: #6f2a1f; }
.alert-danger::before { background: var(--hc-danger); }
.alert-info::before, .alert-secondary::before, .alert-light::before { background: #c4b096; }

/* ——— Finestre, tendine, linguette ——— */
.modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(46, 35, 24, 0.28);
}
.modal-header {
    border-bottom: 1px solid var(--hc-border);
    padding: 1rem 1.25rem;
}
.modal-title {
    font-family: var(--hc-font-display);
    font-weight: 600;
}
.modal-body {
    padding: 1.25rem;
}
.modal-footer {
    border-top: 1px solid var(--hc-border);
    padding: 0.85rem 1.25rem;
    background: #fffaf3;
    border-radius: 0 0 20px 20px;
}
.modal-backdrop {
    --bs-backdrop-bg: #2e2318;
    --bs-backdrop-opacity: 0.46;
}
.modal-backdrop.show {
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.modal.fade .modal-dialog {
    transition: transform 0.22s var(--hc-ease);
    transform: translateY(14px) scale(0.985);
}
.modal.show .modal-dialog {
    transform: none;
}
.hc-main .dropdown-menu {
    --bs-dropdown-link-hover-bg: #faf2e6;
    --bs-dropdown-link-hover-color: var(--hc-heading);
    --bs-dropdown-link-active-bg: var(--hc-action);
    --bs-dropdown-link-active-color: var(--hc-on-action);
    --bs-dropdown-link-color: var(--hc-text);
    border: 1px solid var(--hc-border);
    border-radius: 14px;
    padding: 0.35rem;
    box-shadow: var(--hc-shadow);
}
.hc-main .dropdown-item {
    border-radius: 9px;
    padding: 0.45rem 0.7rem;
    font-weight: 600;
}
.hc-main .nav-tabs {
    --bs-nav-tabs-border-color: var(--hc-border-soft);
    --bs-nav-tabs-link-active-bg: transparent;
    --bs-nav-tabs-link-active-color: var(--hc-heading);
    --bs-nav-tabs-link-hover-border-color: transparent;
    --bs-nav-link-color: var(--hc-text-muted);
    --bs-nav-link-hover-color: var(--hc-heading);
    gap: 0.25rem;
}
.hc-main .nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    font-weight: 700;
    margin-bottom: -1px;
}
.hc-main .nav-tabs .nav-link.active {
    border-bottom-color: var(--hc-accent);
}
.hc-main .nav-pills {
    --bs-nav-pills-link-active-bg: var(--hc-action);
    --bs-nav-pills-link-active-color: var(--hc-on-action);
    --bs-nav-pills-border-radius: 999px;
    --bs-nav-link-color: var(--hc-heading);
    --bs-nav-link-hover-color: var(--hc-heading);
    gap: 0.3rem;
}
.hc-main .nav-pills .nav-link {
    font-weight: 700;
}
.hc-main .nav-pills .nav-link:not(.active):hover {
    background: #f3ebe1;
}
.pagination {
    --bs-pagination-color: var(--hc-heading);
    --bs-pagination-border-color: var(--hc-border-soft);
    --bs-pagination-hover-color: var(--hc-heading);
    --bs-pagination-hover-bg: #f3ebe1;
    --bs-pagination-hover-border-color: var(--hc-border-soft);
    --bs-pagination-focus-color: var(--hc-heading);
    --bs-pagination-focus-bg: #f3ebe1;
    --bs-pagination-focus-box-shadow: var(--hc-ring);
    --bs-pagination-active-bg: var(--hc-action);
    --bs-pagination-active-border-color: var(--hc-action);
    --bs-pagination-active-color: var(--hc-on-action);
    --bs-pagination-border-radius: 10px;
    font-family: var(--hc-font-mono);
    font-size: 0.85rem;
}
.list-group {
    --bs-list-group-border-color: var(--hc-border);
    --bs-list-group-active-bg: var(--hc-action);
    --bs-list-group-active-border-color: var(--hc-action);
    --bs-list-group-active-color: var(--hc-on-action);
    --bs-list-group-action-hover-bg: #faf2e6;
    --bs-list-group-action-active-bg: #f3ebe1;
    --bs-list-group-border-radius: 14px;
}
.list-group-item-action:hover {
    background-color: #faf2e6;
}
.list-group-item.active {
    background-color: var(--hc-action);
    border-color: var(--hc-action);
    color: var(--hc-on-action);
}

/* ——— Percorso (breadcrumb) ——— */
.hc-breadcrumb {
    font-size: 0.8rem;
    gap: 0.25rem 0.4rem;
}
.hc-breadcrumb-link {
    padding: 0.15rem 0.45rem;
    margin-left: -0.45rem;
    border-radius: 7px;
    font-weight: 600;
    transition: background-color 0.12s, color 0.12s;
}
.hc-breadcrumb-link:hover {
    background: rgba(75, 59, 42, 0.07);
}
.hc-breadcrumb-sep {
    color: #c4b096;
    font-size: 0;
}
.hc-breadcrumb-sep::before {
    content: "›";
    font-size: 0.95rem;
}
.hc-breadcrumb-current {
    font-weight: 700;
}

/* ——— Riquadri di testata, filtri e stati vuoti ——— */
.coffee-hero {
    background:
        radial-gradient(rgba(251, 243, 234, 0.16) 1px, transparent 1.2px) 0 0 / 18px 18px,
        var(--hc-action);
    border-radius: 22px;
    padding: 2.25rem 2rem;
    box-shadow: var(--hc-shadow-md);
}
.coffee-hero-circle {
    background: radial-gradient(circle at 35% 35%, rgba(224, 171, 104, 0.5), rgba(224, 171, 104, 0) 70%);
}
.coffee-hero-title {
    font-family: var(--hc-font-display);
    font-size: 1.9rem;
    letter-spacing: -0.02em;
}
.coffee-filter-box {
    border-radius: var(--hc-radius);
    border-color: var(--hc-border);
    padding: 1rem 1.1rem;
}
.coffee-filter-title {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hc-text-muted);
    margin-bottom: 0.6rem;
}
.coffee-empty-panel {
    background: #fffaf3;
    border: 1px dashed #d9c7ad;
    border-left: 1px dashed #d9c7ad;
    border-radius: var(--hc-radius);
    text-align: center;
    color: var(--hc-text-muted);
}
.coffee-empty-title {
    font-family: var(--hc-font-display);
}
.coffee-empty-icon {
    color: var(--hc-accent);
}
.hc-summary {
    border-radius: 12px;
}
.hc-summary-primary {
    background: var(--hc-accent-soft);
    border: 1px solid #edc790;
}
.hc-summary-primary .hc-summary-value {
    color: var(--hc-heading);
}
.costo-ingrediente {
    background: #faf5ee !important;
    font-variant-numeric: tabular-nums;
}

/* ——— Barre di scorrimento sottili e calde (solo nel contenuto) ——— */
.hc-main, .hc-main *, .modal, .modal * {
    scrollbar-color: #d6c4a8 transparent;
}

/* ——— Passaggio tra le pagine: dissolvenza breve. Niente view-transition-name su .hc-main:
   creerebbe un contesto di impilamento e le finestre (modal) finirebbero sotto il velo scuro. ——— */
@view-transition {
    navigation: auto;
}
::view-transition-old(root) {
    animation-duration: 0.08s;
}
::view-transition-new(root) {
    animation-duration: 0.16s;
}

/* ——— Barra di caricamento in cima (hc-app.js) ——— */
.hc-loadbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 2000;
    pointer-events: none;
    background: linear-gradient(90deg, var(--hc-accent), #f2c879);
    transform-origin: 0 50%;
    transform: scaleX(0);
    opacity: 0;
}
.hc-loadbar.is-on {
    opacity: 1;
    transform: scaleX(0.85);
    transition: transform 6s cubic-bezier(0.05, 0.6, 0.1, 1), opacity 0.1s;
}

/* ——— Ricerca rapida (Ctrl/⌘ K, hc-app.js) ——— */
.hc-nav-cerca {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin: 0 0 0.75rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #6b7280;
    font: inherit;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.hc-nav-cerca:hover {
    background: #fff;
    border-color: #d1c5b0;
    box-shadow: 0 1px 3px rgba(75, 59, 42, 0.08);
}
.hc-nav-cerca span {
    flex: 1 1 auto;
}
.hc-nav-cerca kbd,
.hc-cmd kbd {
    font-family: var(--hc-font-mono);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.22rem 0.36rem;
    border-radius: 5px;
    border: 1px solid #e0d6c6;
    background: #fff;
    color: #7a6650;
    box-shadow: 0 1px 0 #e0d6c6;
}
@media (hover: none) {
    .hc-nav-cerca kbd { display: none; }
}
.hc-cmd {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: min(14vh, 7rem) 1rem 1rem;
    background: rgba(46, 35, 24, 0.44);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    font-family: var(--hc-font-ui);
    animation: hc-cmd-fade 0.12s ease-out;
}
.hc-cmd[hidden] {
    display: none;
}
.hc-cmd-box {
    width: min(38rem, 100%);
    max-height: min(70vh, 34rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fffdf9;
    border: 1px solid rgba(75, 59, 42, 0.14);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(33, 24, 18, 0.4);
    animation: hc-cmd-pop 0.18s var(--hc-ease);
}
.hc-cmd-top {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--hc-border);
    color: var(--hc-text-muted);
}
.hc-cmd-top .bi {
    font-size: 1.05rem;
}
.hc-cmd-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--hc-text);
    font-size: 1.05rem;
    font-weight: 600;
}
.hc-cmd-input::placeholder {
    color: #a8977f;
    font-weight: 500;
}
.hc-cmd-list {
    overflow-y: auto;
    padding: 0.4rem;
    scrollbar-width: thin;
}
.hc-cmd-gruppo {
    padding: 0.55rem 0.7rem 0.3rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #a38b6e;
}
.hc-cmd-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--hc-text);
    font-size: 0.93rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.hc-cmd-item .bi {
    flex: none;
    width: 1.9rem;
    height: 1.9rem;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f7eee3;
    color: var(--hc-primary-hover);
    font-size: 0.95rem;
}
.hc-cmd-item span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hc-cmd-item small {
    flex: none;
    color: #a38b6e;
    font-size: 0.75rem;
    font-weight: 600;
}
.hc-cmd-item.is-on {
    background: var(--hc-action);
    color: var(--hc-on-action);
}
.hc-cmd-item.is-on .bi {
    background: rgba(251, 243, 234, 0.14);
    color: #f2c879;
}
.hc-cmd-item.is-on small {
    color: rgba(251, 243, 234, 0.7);
}
.hc-cmd-vuoto {
    padding: 1.6rem 1rem;
    text-align: center;
    color: var(--hc-text-muted);
    font-size: 0.9rem;
}
.hc-cmd-piede {
    display: flex;
    gap: 1rem;
    padding: 0.55rem 1rem;
    border-top: 1px solid var(--hc-border);
    background: #fdf8f1;
    color: #8a7558;
    font-size: 0.72rem;
    font-weight: 600;
}
.hc-cmd-piede span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
@media (max-width: 575.98px) {
    .hc-cmd { padding-top: 0.75rem; }
    .hc-cmd-piede { display: none; }
    .hc-cmd-input { font-size: 1rem; }
}
@keyframes hc-cmd-fade {
    from { opacity: 0; }
}
@keyframes hc-cmd-pop {
    from { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
    .btn, .modal.fade .modal-dialog, .hc-cmd, .hc-cmd-box, .hc-loadbar.is-on { transition: none; animation: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
    html { scroll-behavior: auto; }
}

/* ——— Select2 (preparazioni/ricette) ——— */
.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--hc-input-bg);
    border-color: var(--hc-input-border);
    border-radius: var(--hc-radius-sm);
    min-height: 2.1rem;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    background-color: var(--hc-input-focus-bg);
    border-color: var(--hc-input-focus-border);
    box-shadow: 0 0 0 0.15rem rgba(147, 135, 109, 0.2);
}

/* Righe ingrediente nel picker preparazioni: verde = prezzo/unità verificati a mano
   (pulsante «Modifica»), bianco = grezzo da fattura (pulsante «Real Food Cost»).
   Entrambi aprono la finestra prezzo #modalPrezzoIngrediente. */
.fc-ing-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.15rem 0.3rem;
    border-radius: var(--hc-radius-sm);
}

.fc-ing-opt-verificato {
    background-color: var(--hc-success-bg);
}

.fc-ing-opt-grezzo {
    background-color: #fff;
}

.fc-ing-opt-add {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: var(--hc-action);
    color: var(--hc-on-action);
    font-size: 0.8rem;
}

/* Non aggiungibile (manca il Real Food Cost): cerchio vuoto e tratteggiato, cursore di divieto. */
.fc-ing-opt-add-off {
    background-color: transparent;
    border: 1px dashed #b8b2a3;
    color: #b8b2a3;
}

.select2-results__option[aria-disabled="true"] {
    cursor: not-allowed;
}

.select2-results__option[aria-disabled="true"] .fc-ing-opt-btn {
    cursor: pointer;
}

.fc-ing-opt-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
}

/* Dialog ingrediente — parte iniziale: due campi gemelli (cerca / nuovo), stessa pillola. */
#modalIngredientePrep .fc-scelta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    height: 3.1rem;
    padding: 0 0.4rem 0 1.1rem;
    border: 1px solid var(--hc-border-soft);
    border-radius: 999px;
    background-color: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#modalIngredientePrep .fc-scelta:hover {
    border-color: var(--hc-primary);
}

#modalIngredientePrep .fc-scelta:focus-within {
    border-color: var(--hc-primary);
    box-shadow: 0 0 0 0.2rem rgba(147, 135, 109, 0.2);
}

#modalIngredientePrep .fc-scelta-icona {
    flex: 0 0 auto;
    font-size: 1.05rem;
    color: var(--hc-primary);
}

#modalIngredientePrep .fc-scelta-campo {
    flex: 1 1 auto;
    min-width: 0;
}

/* Il select di ricerca perde bordo e fondo: lo disegna il contenitore .fc-scelta. */
#modalIngredientePrep .fc-scelta .select2-container--bootstrap-5 .select2-selection {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: 0;
    background-color: transparent;
    box-shadow: none;
    font-size: 1rem;
    padding-left: 0;
}

#modalIngredientePrep .fc-scelta .select2-selection__rendered {
    padding-left: 0;
}

#modalIngredientePrep .fc-scelta-input {
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 1rem;
    color: var(--hc-text);
}

#modalIngredientePrep .fc-scelta-input::placeholder,
#modalIngredientePrep .fc-scelta .select2-selection__placeholder {
    color: var(--hc-text-muted);
    opacity: 0.8;
}

#modalIngredientePrep .fc-scelta-azione {
    flex: 0 0 auto;
    height: 2.35rem;
    padding: 0 1.15rem;
    border: 0;
    border-radius: 999px;
    background-color: var(--hc-action);
    color: var(--hc-on-action);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

#modalIngredientePrep .fc-scelta-azione:hover {
    background-color: var(--hc-action-hover);
}

#modalIngredientePrep .fc-scelta-azione:disabled {
    opacity: 0.6;
}

.fc-oppure {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 1.1rem 0;
    color: var(--hc-primary);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.fc-oppure::before,
.fc-oppure::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--hc-border-soft) 40%, var(--hc-border-soft) 60%, transparent);
}

/* Senza Real Food Cost l'ingrediente non è selezionabile: nome attenuato, ma il pulsante resta attivo. */
.fc-ing-opt-bloccato .fc-ing-opt-label {
    opacity: 0.5;
}

.select2-results__option[aria-disabled="true"] .fc-ing-opt-btn {
    pointer-events: auto;
}

/* Prezzo / unità accanto al nome, solo dove il Real Food Cost è impostato. */
.fc-ing-opt-prezzo {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    background-color: var(--hc-bg-cream);
    border: 1px solid var(--hc-border-soft);
    color: var(--hc-heading);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: 0.05em;
}

.fc-ing-opt-btn {
    flex: 0 0 auto;
    font-size: 0.78rem;
    padding: 0.15rem 0.5rem;
}

/* Finestra prezzo: riga di fattura che ha generato il prezzo base. */
.fc-riga-fattura-titolo-ref {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--hc-heading);
    word-break: break-word;
}

.fc-riga-fattura-fonte {
    font-size: 0.75rem;
    color: var(--bs-secondary-color);
    margin: 0.15rem 0 0.55rem;
}

.fc-riga-fattura-fonte a {
    color: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
}

.fc-riga-fattura-fonte a:hover {
    color: var(--hc-action);
}

.fc-riga-fattura {
    border: 1px solid var(--hc-border-soft);
    border-radius: var(--hc-radius-sm);
    background-color: #faf7f2;
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
}

.fc-riga-fattura-titolo {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bs-secondary-color);
    margin-bottom: 0.25rem;
}

.fc-riga-fattura-descr {
    font-family: var(--bs-font-monospace);
    font-size: 0.8rem;
    word-break: break-word;
    margin-bottom: 0.4rem;
}

.fc-riga-fattura-dati {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    font-weight: 600;
}

.fc-riga-fattura-etichetta {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

/* Chip giallo: l'unità della fattura e, nel box sotto, lo stesso chip davanti a «= quantità». */
.fc-unita-chip {
    display: inline-block;
    background-color: #ffe08a;
    border-radius: 0.25rem;
    padding: 0 0.4rem;
    font-weight: 600;
}

.fc-equiv {
    position: relative;
    border: 1px solid #ffe08a;
    border-radius: var(--hc-radius-sm);
    background-color: #fffbea;
    padding: 0.6rem 0.75rem;
    margin-top: 1.1rem;
}

/* Prezzo risultante per kg/l: è il numero che finisce nelle ricette, deve saltare all'occhio. */
.fc-equiv-prezzo {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.1rem;
    margin-top: 0.85rem;
    padding: 0.85rem 1rem 0.75rem;
    border: 1px solid var(--hc-border-soft);
    border-top: 3px solid var(--hc-primary);
    border-radius: var(--hc-radius);
    background: linear-gradient(180deg, #ffffff 0%, #fbf5ec 100%);
    box-shadow: 0 6px 18px rgba(75, 59, 42, 0.08), inset 0 1px 0 #ffffff;
    color: var(--hc-heading);
    font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
}

.fc-equiv-prezzo-euro {
    align-self: flex-start;
    margin-top: 0.35rem;
    margin-right: 0.15rem;
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--hc-primary);
}

.fc-equiv-prezzo-intero {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
}

.fc-equiv-prezzo-dec {
    align-self: flex-start;
    margin-top: 0.35rem;
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1;
    color: var(--hc-heading);
}

.fc-equiv-prezzo-slash {
    margin: 0 0.4rem 0 0.7rem;
    font-size: 2.2rem;
    font-weight: 200;
    line-height: 1;
    color: var(--hc-primary);
    transform: skewX(-12deg);
}

.fc-equiv-prezzo-unita {
    font-family: var(--hc-font);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hc-primary);
}

/* Resa utile: input stretto e costo reale per kg/l utile. */
.fc-resa-input {
    max-width: 8rem;
}

.fc-info {
    margin-left: 0.2rem;
    color: var(--hc-primary);
    cursor: help;
    vertical-align: -0.1em;
}

.fc-info:hover,
.fc-info:focus {
    color: var(--hc-action);
    outline: none;
}

/* Freccia gialla che scende dall'unità del box fattura al box equivalenza. */
.fc-equiv-riga {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.fc-equiv-col {
    flex: 1 1 auto;
    min-width: 0;
}

.fc-equiv-riga .fc-resa {
    flex: 0 0 7.5rem;
}

.fc-equiv-collega {
    position: absolute;
    top: -1.45rem;
    left: 1.2rem;
    width: 1.5rem;
    height: 1.6rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: #b58900;
    border-left: 2px solid #ffe08a;
    font-size: 1rem;
    line-height: 1;
}

.fc-ing-legend {
    margin-left: 0.5rem;
    white-space: nowrap;
}

.fc-ing-legend-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    margin: 0 0.25rem 0 0.5rem;
    vertical-align: middle;
    border: 1px solid var(--hc-border-soft);
}

.fc-ing-legend-dot-verificato {
    background-color: var(--hc-success-bg);
}

.fc-ing-legend-dot-grezzo {
    background-color: #fff;
}

@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.65;
    }

    h1, h2, h3 {
        line-height: 1.35;
        margin-bottom: 0.85rem;
    }

    .hc-main {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .card-body {
        padding: 1rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.7rem 0.6rem;
    }

    .btn {
        padding: 0.55rem 0.9rem;
    }
}

/* Scelta fornitori da monitorare */
.fc-pick {
    width: 100%;
}

.fc-pick-home {
    padding-top: 1.25rem;
    max-width: 66rem;
    margin-left: auto;
    margin-right: auto;
}

.fc-pick-hero {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    border-radius: 18px;
    padding: 1.35rem 1.4rem 1.2rem;
    box-shadow: var(--hc-shadow-sm);
    margin-bottom: 1rem;
}

.fc-pick-hero::after {
    content: "";
    position: absolute;
    right: -2.5rem;
    top: -2.8rem;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: rgba(147, 135, 109, 0.18);
}

.fc-pick-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hc-primary-dark);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.55rem;
}

.fc-pick-hero h2 {
    position: relative;
    z-index: 1;
    margin-bottom: 0.35rem;
}

.fc-pick-hero p {
    position: relative;
    z-index: 1;
    max-width: 36rem;
    margin-bottom: 0;
    color: var(--hc-text);
}

.fc-pick-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.fc-pick-step {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border-soft);
    border-radius: var(--hc-radius);
    padding: 0.75rem 0.8rem;
    box-shadow: var(--hc-shadow-sm);
}

.fc-pick-step strong {
    display: block;
    font-size: 0.92rem;
}

.fc-pick-step span {
    display: block;
    color: var(--hc-text-muted);
    font-size: 0.8rem;
    line-height: 1.35;
}

.fc-pick-step em {
    font-style: normal;
    font-weight: 700;
    color: var(--hc-primary);
    font-size: 0.75rem;
}

.fc-pick-panel {
    background: var(--hc-surface);
    border: 1px solid var(--hc-border-soft);
    border-radius: 18px;
    box-shadow: var(--hc-shadow);
    padding: 1rem;
}

.fc-pick-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.fc-pick-search {
    flex: 1 1 16rem;
    position: relative;
}

.fc-pick-search i {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hc-text-muted);
}

.fc-pick-search input {
    padding-left: 2.2rem;
    border-radius: 999px;
    background: var(--hc-hover);
    border-color: var(--hc-border-soft);
}

.fc-pick-head,
.fc-supplier {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr) 6.5rem 9.5rem;
    gap: 0.85rem;
    align-items: center;
}

.fc-pick-head {
    padding: 0 0.85rem 0.45rem;
    color: var(--hc-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fc-pick-head span:nth-child(n + 3) {
    text-align: right;
}

.fc-pick-list {
    max-height: 34rem;
    overflow: auto;
    border: 1px solid var(--hc-border-soft);
    border-radius: 14px;
}

.fc-supplier {
    margin: 0;
    padding: 0.72rem 0.85rem;
    border-bottom: 1px solid var(--hc-border-soft);
    background: #fff;
    cursor: pointer;
}

.fc-supplier:last-child {
    border-bottom: 0;
}

.fc-supplier:hover {
    border-color: #d9cbb6;
    background: var(--hc-hover);
}

.fc-supplier:has(input:checked) {
    border-color: var(--hc-primary);
    background: #fbf6ee;
    box-shadow: inset 0 0 0 1px var(--hc-primary);
}

.fc-supplier input {
    margin: 0;
    width: 1.05rem;
    height: 1.05rem;
    justify-self: center;
}

.fc-supplier-name {
    font-weight: 600;
    line-height: 1.25;
    min-width: 0;
}

.fc-supplier-num,
.fc-supplier-date {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--hc-text);
    white-space: nowrap;
}

.fc-supplier-date {
    color: var(--hc-text-muted);
}

.fc-pick-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--hc-border-soft);
}

.fc-pick-count {
    font-weight: 600;
}

.fc-pick-count span {
    color: var(--hc-text-muted);
    font-weight: 400;
}

.fc-cerca-box {
    position: relative;
    z-index: 20;
    overflow: visible;
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    border-radius: 18px;
    box-shadow: var(--hc-shadow-sm);
    padding: 1rem 1.1rem 1.1rem;
    margin-bottom: 1rem;
}

.fc-cerca-box.is-risultati-aperti {
    z-index: 60;
}

.fc-azioni-home {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    max-width: none;
    margin: 0 0 1.25rem;
}

@media (min-width: 760px) {
    .fc-azioni-home {
        grid-template-columns: 1fr 1fr;
        margin-top: 1.5rem;
    }
}

.fc-cerca-fornitori {
    margin-bottom: 1rem;
}

.fc-azione-card-scongela .fc-azione-badge {
    background: #0369a1;
}

.fc-azione-bottoni {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.fc-azione-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
}

.fc-azione-btn:hover,
.fc-azione-btn:focus {
    color: #fff;
    filter: brightness(1.08);
}

.fc-azione-btn-scongela {
    background: #5b7c8d;
}

.fc-azione-btn-controlla {
    background: #4b3b2a;
}

/* Bootstrap applica `.btn:hover { background-color: var(--bs-btn-hover-bg); }`:
   qui la variabile non è definita (nessuna variante btn-primary/ecc. in uso), e
   senza fallback il valore ricade sull'iniziale `transparent`. Specificità più
   alta di `.btn:hover` per vincere sempre e mantenere il colore del bottone. */
.fc-azione-btn.fc-azione-btn-scongela:hover,
.fc-azione-btn.fc-azione-btn-scongela:focus {
    background-color: #5b7c8d;
}

.fc-azione-btn.fc-azione-btn-controlla:hover,
.fc-azione-btn.fc-azione-btn-controlla:focus {
    background-color: #4b3b2a;
}

.fc-azione-card {
    position: relative;
    margin-bottom: 0;
    padding: 1.6rem 1.5rem 1.5rem;
    text-align: center;
    background: linear-gradient(165deg, #ffffff 0%, #fffaf3 62%, var(--hc-bg) 150%);
    border: 1px solid var(--hc-border-soft);
    border-radius: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fc-azione-card::before {
    content: "";
    position: absolute;
    z-index: 0;
    right: 0.6rem;
    top: 0.6rem;
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    background: rgba(147, 135, 109, 0.12);
    pointer-events: none;
}

.fc-azione-card:hover,
.fc-azione-card.is-risultati-aperti {
    box-shadow: 0 14px 32px rgba(75, 59, 42, 0.14);
    transform: translateY(-2px);
}

.fc-azione-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: var(--hc-primary);
    color: #fff;
    font-size: 1.35rem;
    box-shadow: 0 8px 18px rgba(75, 59, 42, 0.22);
}

.fc-azione-card-etichette .fc-azione-badge {
    background: var(--hc-action);
}

.fc-azione-link-top {
    position: absolute;
    z-index: 2;
    top: 1rem;
    right: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    color: var(--hc-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}

.fc-azione-link-privato {
    right: 3.6rem;
    cursor: pointer;
}

.fc-azione-link-top:has(> i:only-child) {
    width: 2rem;
    height: 2rem;
    padding: 0;
    justify-content: center;
    font-size: 1rem;
}

.fc-azione-link-top:hover {
    color: var(--hc-heading);
    border-color: var(--hc-primary);
}

.fc-azione-titolo {
    position: relative;
    z-index: 1;
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--hc-heading);
}

.fc-azione-card-etichette .fc-azione-titolo,
.fc-azione-card-scongela .fc-azione-titolo {
    margin-bottom: 1.1rem;
}

.fc-azione-sub {
    position: relative;
    z-index: 1;
    margin: 0 0 1.1rem;
    color: var(--hc-text-muted);
    font-size: 0.85rem;
}

.fc-azione-card .fc-google {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0;
    text-align: left;
}

.fc-cerca-anno {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 0.45rem;
}

.fc-cerca-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.fc-cerca-row .fc-google {
    flex: 1 1 auto;
    min-width: 0;
}

.fc-year {
    position: relative;
    flex: 0 0 auto;
}

.fc-year-native {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.fc-year-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 2.35rem;
    margin: 0;
    padding: 0 0.72rem 0 0.8rem;
    border: 1px solid #d4d4d8;
    border-radius: 999px;
    background: #fff;
    color: #3f3f46;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
    cursor: pointer;
}

.fc-year-btn .bi-calendar3 {
    color: #71717a;
}

.fc-year-btn:hover {
    background: #fafafa;
    border-color: #a1a1aa;
}

.fc-year-btn:focus-visible {
    outline: 2px solid #a1a1aa;
    outline-offset: 3px;
}

.fc-year-value {
    min-width: 2.6rem;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.fc-year-chev {
    font-size: 0.72rem;
    opacity: 0.85;
    transition: transform 0.16s ease;
}

.fc-year.is-open .fc-year-chev {
    transform: rotate(180deg);
}

.fc-year.is-all .fc-year-btn {
    color: #52525b;
    letter-spacing: 0;
}

.fc-year.is-all .fc-year-value {
    min-width: 2.8rem;
    font-size: 0.82rem;
}

.fc-year-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 0.45rem);
    right: 0;
    width: 16.4rem;
    max-width: calc(100vw - 2.4rem);
    padding: 0.7rem;
    background: #fff;
    border: 1px solid #eadfce;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(75, 59, 42, 0.18);
}

.fc-year-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
}

.fc-year-opt,
.fc-year-all {
    border: 0;
    cursor: pointer;
    font-weight: 800;
}

.fc-year-opt {
    padding: 0.62rem 0.2rem;
    border-radius: 12px;
    background: #faf6f0;
    color: #4b3b2a;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}

.fc-year-opt:hover,
.fc-year-all:hover {
    background: #f3e6d4;
}

.fc-year-opt.is-on {
    background: #f4f4f5;
    color: #18181b;
    box-shadow: inset 0 0 0 1px #d4d4d8;
}

.fc-year-all {
    display: block;
    width: 100%;
    margin-top: 0.45rem;
    padding: 0.5rem 0.4rem;
    border-radius: 12px;
    background: transparent;
    color: #6b6256;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fc-year-all.is-on {
    background: #f5e5d5;
    color: #4b3b2a;
}

.fc-cerca-box .fc-google {
    max-width: none;
    margin: 0;
}

.fc-monitor-box {
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    border-radius: 18px;
    box-shadow: var(--hc-shadow-sm);
    padding: 1rem 1.1rem 1.1rem;
}

.fc-monitor-box .fc-pick-panel {
    box-shadow: none;
}

.fc-monitor-box .fc-pick-panel + .fc-pick-panel,
.fc-monitor-box .alert + .fc-pick-panel {
    margin-top: 1rem;
}

.fc-google {
    position: relative;
    max-width: 26rem;
    margin: 0 0 0.85rem;
}

.fc-google.is-open {
    z-index: 30;
}

.fc-google-bar {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.35rem;
    margin: 0;
    padding: 0 0.85rem;
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(75, 59, 42, 0.06);
}

.fc-google.is-open .fc-google-bar {
    border-radius: 1.15rem 1.15rem 0 0;
    border-bottom-color: transparent;
    box-shadow: none;
}

.fc-google-bar i {
    color: var(--hc-primary);
    font-size: 0.95rem;
}

.fc-google-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 0.95rem;
    color: var(--hc-text);
}

.fc-google-drop {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    border-top: 0;
    border-radius: 0 0 1.15rem 1.15rem;
    box-shadow: 0 8px 16px rgba(75, 59, 42, 0.08);
    max-height: 18rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.fc-google-hit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.9rem;
    color: inherit;
    text-decoration: none;
}

.fc-google-hit-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.fc-google-hit:hover,
.fc-google-hit.is-active {
    background: #faf7f2;
}

.fc-google-hit-name {
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-google-hit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.18rem;
}

.fc-google-hit-forn,
.fc-google-hit-shop {
    display: inline-block;
    max-width: 100%;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-google-hit-forn {
    background: #0f6e6b;
    color: #fff;
}

.fc-google-hit-shop {
    background: #c2410c;
    color: #fff;
}

.fc-google-hit-prezzo {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

.fc-google-hit-lotto {
    background: #f0f9ee;
    border-left: 3px solid #2d7d46;
}

.fc-google-hit-lotto:hover,
.fc-google-hit-lotto.is-active {
    background: #e3f4e0;
}

.fc-google-hit-lotto-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    padding: 0.08rem 0.45rem;
    border-radius: 999px;
    background: #2d7d46;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-google-empty {
    padding: 0.55rem 0.9rem 0.7rem;
    color: var(--hc-text-muted);
    font-size: 0.85rem;
}

.fc-google-etichette .fc-google-bar i {
    color: var(--hc-text);
}

.fc-google-section {
    margin: 0;
    padding: 0.4rem 0.9rem 0.2rem;
    color: var(--hc-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fc-monitor-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.85rem;
}

.fc-monitor-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--hc-heading);
}

.fc-monitor-add-ico {
    display: none;
}

.fc-monitor-top-end {
    justify-content: flex-end;
}

.fc-monitor-top-end .fc-monitor-anno {
    margin: 0;
}

.fc-pick-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fc-pick-hero-row h2 {
    margin: 0;
}

.fc-monitor,
.fc-pick-head.fc-monitor-head,
.fc-monitor-totale {
    grid-template-columns: minmax(0, 1fr) 5.2rem 8.2rem 4rem 2.25rem;
}

a.fc-monitor-link {
    display: contents;
    color: inherit;
    text-decoration: none;
}

.fc-monitor-remove {
    margin: 0;
}

.fc-monitor-remove button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #9a3b32;
    cursor: pointer;
}

.fc-monitor-remove button svg {
    width: 1.35rem;
    height: 1.35rem;
    display: block;
}

.fc-monitor-remove button circle,
.fc-monitor-remove button path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.15;
    stroke-linecap: round;
}

.fc-monitor-remove button:hover {
    color: #7a2e28;
}

a.fc-supplier {
    color: inherit;
    text-decoration: none;
}

.fc-pick-head.fc-storico-head,
.fc-supplier.fc-storico {
    grid-template-columns: minmax(0, 1fr) 8.5rem;
    cursor: pointer;
}

button.fc-supplier.fc-storico {
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    font: inherit;
    text-align: left;
    color: inherit;
}

.fc-storico.is-current {
    background: #f8f1e4;
    box-shadow: inset 3px 0 0 #756646;
}

.fc-doc {
    background: #fff;
    border: 1px solid #e4d5c0;
    border-radius: 2px 2px 14px 14px;
    box-shadow: 0 12px 32px rgba(75, 59, 42, 0.08);
    overflow: hidden;
}

.fc-doc-head {
    display: flex;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.15rem 1.2rem 1rem;
    background:
        linear-gradient(#4b3b2a, #4b3b2a) top / 100% 5px no-repeat,
        #fbf7f1;
    border-bottom: 1px solid #eadfce;
}

.fc-doc-kicker {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #93876d;
}

.fc-doc-fornitore {
    margin: 0.25rem 0 0;
    font-size: 1.2rem;
    font-weight: 750;
    line-height: 1.2;
    color: #4b3b2a;
}

.fc-doc-piva {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: #6b6256;
}

.fc-doc-meta {
    flex: 0 0 auto;
    text-align: right;
}

.fc-doc-meta p {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    margin: 0 0 0.4rem;
}

.fc-doc-meta p:last-child {
    margin-bottom: 0;
}

.fc-doc-meta span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93876d;
}

.fc-doc-meta strong {
    font-size: 0.95rem;
    font-weight: 650;
    color: #1f2937;
}

.fc-doc-lines {
    max-height: 28rem;
    overflow: auto;
}

.fc-doc-line {
    padding: 0.75rem 1.2rem 0.7rem;
    border-bottom: 1px dashed #eadfce;
}

.fc-doc-line.is-current {
    background: #f8f1e4;
    box-shadow: inset 3px 0 0 #756646;
}

.fc-doc-desc {
    margin: 0;
    font-weight: 600;
    line-height: 1.35;
    color: #1f2937;
}

.fc-doc-calc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.85rem;
    align-items: center;
    margin: 0.3rem 0 0;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
    color: #4b5563;
}

.fc-doc-prezzo {
    justify-self: start;
    padding: 0.08rem 0.42rem 0.1rem;
    border-radius: 999px;
    background: #f3ebe1;
    color: #6b5340;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.fc-doc-prezzo small {
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.fc-doc-line.is-current .fc-doc-prezzo {
    padding: 0.22rem 0.6rem 0.24rem;
    background: #756646;
    color: #f5e5d5;
    font-size: 1.05rem;
}

.fc-doc-line-tot {
    font-weight: 700;
    color: #1f2937;
    text-align: right;
}

.fc-doc-aliq {
    margin: 0.12rem 0 0;
    font-size: 0.72rem;
    color: #8a7b66;
}

.fc-doc-tot {
    padding: 0.85rem 1.2rem 1rem;
    background: #fbf7f1;
    border-top: 1px solid #eadfce;
}

.fc-doc-tot p {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.15rem 0;
    font-size: 0.92rem;
}

.fc-doc-tot em {
    margin-left: 0.35rem;
    font-style: normal;
    font-size: 0.68rem;
    font-weight: 500;
    color: #8a7b66;
}

.fc-doc-lordo {
    margin-top: 0.45rem !important;
    padding-top: 0.5rem;
    border-top: 1px solid #e4d5c0;
    font-size: 1.05rem !important;
    font-weight: 700;
    color: #4b3b2a;
}

.fc-pick-head.fc-storico-head span:last-child,
.fc-storico .fc-supplier-num {
    text-align: right;
}

.fc-chart-wrap {
    height: 18rem;
    padding: 0.75rem 0.5rem 0.4rem;
}

.fc-ref-preview {
    position: fixed;
    z-index: 40;
    width: 20rem;
    padding: 0.75rem 0.85rem 0.65rem;
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(75, 59, 42, 0.18);
    pointer-events: none;
}

.fc-ref-preview-name {
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-ref-preview-range {
    min-height: 1.1rem;
    color: var(--hc-text-muted);
    font-size: 0.78rem;
}

.fc-ref-preview-chart {
    height: 9rem;
    margin-top: 0.2rem;
}

.fc-ref-preview-note {
    color: var(--hc-text-muted);
    font-size: 0.8rem;
}

.fc-ref-anno {
    flex: 0 0 11rem;
}

.fc-monitor-anno {
    display: flex;
    justify-content: flex-end;
    margin: 0 0.15rem 0.45rem;
}

.fc-monitor-anno-out {
    margin: 0 0 0.45rem;
}

.fc-monitor-anno .form-select {
    width: 11rem;
}

.fc-ref-table .fc-pick-head,
.fc-ref-table .fc-supplier {
    grid-template-columns: minmax(0, 1fr) 6.1rem 4.6rem 7.2rem 8.6rem;
    column-gap: 0.7rem;
}

.fc-ref-table .fc-ref-head {
    align-items: start;
    letter-spacing: 0.02em;
}

.fc-ref-table .fc-ref-head .fc-ref-sort,
.fc-ref-table .fc-ref-head > .fc-ref-unita {
    justify-self: stretch;
    min-width: 0;
    text-align: right;
}

.fc-ref-table .fc-ref-prezzo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    gap: 0.2rem;
    white-space: normal;
    line-height: 1.1;
}

.fc-ref-prezzo-val {
    white-space: nowrap;
    font-weight: 600;
}

.fc-unita-label {
    display: inline-block;
    padding: 0.05rem 0.42rem 0.08rem;
    border-radius: 999px;
    background: #f6e4dc;
    color: #8a4b32;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.fc-ref-prezzo[data-unita="kg"] .fc-unita-label {
    background: #e3f0df;
    color: #2f6a34;
}

.fc-ref-prezzo[data-unita="pz"] .fc-unita-label,
.fc-ref-prezzo[data-unita="nr"] .fc-unita-label {
    background: #f3ebe1;
    color: #6b5340;
}

.fc-ref-prezzo[data-unita="conf"] .fc-unita-label,
.fc-ref-prezzo[data-unita="cf"] .fc-unita-label,
.fc-ref-prezzo[data-unita="ct"] .fc-unita-label {
    background: #f8e3c8;
    color: #8a4e12;
}

.fc-pick-head .fc-ref-sort {
    justify-self: end;
}

.fc-monitor-head .fc-ref-sort-name {
    justify-self: start;
    text-align: left;
}

.fc-ref-sort {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    text-align: right;
    cursor: pointer;
}

.fc-ref-sort.is-active {
    color: var(--hc-text);
    font-weight: 700;
}

.fc-iva {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--hc-text-muted);
    line-height: 1.15;
}

.fc-ref-total {
    cursor: default;
    background: var(--hc-hover);
    border-bottom: 0;
    border-radius: 0 0 14px 14px;
}

.fc-ref-table .fc-pick-list {
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
}

.fc-pick-head.fc-fatture-head,
.fc-pick-head.fc-fattura-head {
    align-items: start;
}

.fc-pick-head.fc-fattura-head span:nth-child(n + 2) {
    text-align: right;
}

.fc-pick-head.fc-fatture-head,
button.fc-supplier.fc-fatture-riga,
.fc-supplier.fc-fatture-totale {
    grid-template-columns: 6.5rem minmax(0, 1fr) 8.5rem;
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    font: inherit;
    text-align: left;
    color: inherit;
}

.fc-pick-head.fc-fatture-head span:last-child,
.fc-fatture-riga .fc-supplier-num,
.fc-fatture-totale .fc-supplier-num {
    text-align: right;
}

.fc-fatture-riga.is-current {
    background: #faf7f2;
}

#lista-fatture {
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
}

.fc-fatture-totale {
    cursor: default;
    background: var(--hc-hover);
    border-radius: 0 0 14px 14px;
    font-weight: 700;
}

.fc-fattura-head,
.fc-fattura-riga {
    grid-template-columns: minmax(0, 1fr) 4.2rem 4.2rem 6.5rem 7rem;
    cursor: default;
}

.fc-fattura-riga.is-current {
    background: #fbf6ee;
}

.fc-monitor-quota,
.fc-monitor-quota-head {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--hc-text-muted);
}

.fc-monitor-totale {
    display: grid;
    gap: 0.85rem;
    align-items: center;
    margin-top: 0.35rem;
    padding: 0.75rem 0.85rem 0.15rem;
    border-top: 1px solid var(--hc-border-soft);
    font-weight: 700;
}

.fc-monitor-totale .fc-supplier-name,
.fc-monitor-totale .fc-supplier-num {
    color: var(--hc-text);
}

@media (max-width: 640px) {
    .fc-pick-head,
    .fc-supplier {
        grid-template-columns: 1.15rem minmax(0, 1fr) 3.2rem 6.4rem;
        gap: 0.45rem;
    }

    .fc-ref-table .fc-pick-head,
    .fc-ref-table .fc-supplier {
        grid-template-columns: minmax(0, 1fr) 4.8rem 5.6rem 6.5rem;
        column-gap: 0.45rem;
        padding-left: 0.55rem;
        padding-right: 0.55rem;
    }

    .fc-ref-table .fc-ref-unita {
        display: none;
    }

    .fc-ref-table .fc-supplier {
        font-size: 0.92rem;
    }

    .fc-ref-table .fc-unita-label {
        font-size: 0.64rem;
    }

    .fc-fattura-head,
    .fc-fattura-riga {
        grid-template-columns: minmax(0, 1fr) 2.4rem 2.2rem 4rem 4.4rem;
        gap: 0.3rem;
    }

    .fc-doc-head {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 0.85rem 0.85rem;
    }

    .fc-doc-meta {
        display: flex;
        gap: 1.5rem;
        text-align: left;
    }

    .fc-doc-fornitore {
        font-size: 1.05rem;
    }

    .fc-doc-line {
        padding: 0.7rem 0.85rem 0.65rem;
    }

    .fc-doc-calc {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.2rem 0.75rem;
        font-size: 0.9rem;
    }

    .fc-doc-calc span:nth-child(2) {
        grid-column: 1;
    }

    .fc-doc-line-tot {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
        font-size: 1rem;
    }

    .fc-doc-lines {
        max-height: 22rem;
    }

    .fc-doc-tot {
        padding: 0.75rem 0.85rem 0.9rem;
    }

    .fc-pick-head.fc-storico-head,
    .fc-supplier.fc-storico {
        grid-template-columns: minmax(0, 1fr) 6.4rem;
        gap: 0.45rem;
    }

    .fc-monitor,
    .fc-pick-head.fc-monitor-head,
    .fc-monitor-totale {
        grid-template-columns: minmax(0, 1fr) 5.6rem 3.1rem 2rem;
        gap: 0.5rem;
    }

    .fc-monitor-top .fc-monitor-title {
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .fc-monitor-add-ico {
        display: inline;
    }

    .fc-monitor-add-txt {
        display: none;
    }

    .fc-pick-head.fc-monitor-head .fc-ref-sort[data-sort="referenze"],
    .fc-monitor .fc-monitor-link .fc-supplier-num:nth-of-type(2),
    .fc-monitor-totale .fc-monitor-refs {
        display: none;
    }
}

.fc-stampa-btn {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--hc-action);
    color: var(--hc-on-action);
    font-weight: 700;
    padding: 0.75rem 1.15rem;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 1rem;
}
.fc-stampa-btn:hover {
    background: var(--hc-action-hover);
    color: var(--hc-on-action);
}

.fc-stampanti-alert {
    background: #f3ebe1;
    border: 1px solid #dfd2be;
    color: var(--hc-heading);
    font-size: 1.05rem;
    font-weight: 700;
    padding: 1rem 1.15rem;
}
.fc-stampanti-alert a {
    color: var(--hc-heading);
    font-weight: 700;
    text-decoration: underline;
}

/* Lotti Consegne */
.fc-lotti-consegne {
    width: 100%;
    max-width: none;
}

.fc-lotti-consegne .fc-pick-panel {
    padding: 0;
    overflow: hidden;
}

.fc-lotti-consegne .fc-pick-panel--flush .fc-pick-tools,
.fc-lotti-consegne .fc-pick-panel--flush .fc-lotti-forn-head,
.fc-lotti-consegne .fc-pick-panel--flush .fc-lotti-forn-list {
    padding-left: 1rem;
    padding-right: 1rem;
}

.fc-lotti-consegne .fc-pick-panel--flush .fc-pick-tools {
    padding-top: 1rem;
    margin-bottom: 0;
}

.fc-lotti-consegne .fc-pick-panel--flush .fc-lotti-forn-head {
    padding-top: 0.85rem;
    padding-bottom: 0.45rem;
}

.fc-lotti-consegne .fc-lotti-forn-list {
    max-height: none;
    border: 0;
    border-radius: 0;
    border-top: 1px solid var(--hc-border-soft);
}

.fc-lotti-consegne .fc-lotti-forn-head,
.fc-lotti-consegne a.fc-lotti-forn-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.5rem;
    gap: 1rem;
    align-items: center;
}

.fc-lotti-consegne .fc-lotti-forn-head {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hc-text-muted);
}

.fc-lotti-consegne .fc-lotti-forn-head span:last-child,
.fc-lotti-consegne a.fc-lotti-forn-row .fc-lotti-forn-n {
    text-align: right;
    justify-self: end;
}

.fc-lotti-consegne a.fc-lotti-forn-row {
    padding: 0.78rem 1rem;
    margin: 0;
    border-bottom: 1px solid var(--hc-border-soft);
    background: #fff;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.12s ease;
}

.fc-lotti-consegne a.fc-lotti-forn-row:last-child {
    border-bottom: 0;
}

.fc-lotti-consegne a.fc-lotti-forn-row:hover {
    background: var(--hc-hover);
    color: inherit;
}

.fc-lotti-consegne a.fc-lotti-forn-row.is-hidden {
    display: none;
}

.fc-lotti-consegne .fc-lotti-forn-n {
    font-variant-numeric: tabular-nums;
    color: var(--hc-text-muted);
}

.fc-lotti-consegne .fc-lotti-back {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hc-primary);
    text-decoration: none;
}

.fc-lotti-consegne .fc-lotti-back:hover {
    text-decoration: underline;
}

.fc-lotti-consegne .fc-lotti-meta {
    font-size: 0.875rem;
    color: var(--hc-text-muted);
    margin: 0.15rem 0 0;
}

.fc-lotti-consegne .fc-lotti-detail-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    margin-bottom: 0.25rem;
}

.fc-lotti-consegne .fc-lotti-detail-intro {
    flex: 1 1 12rem;
    min-width: 0;
}

.fc-lotti-consegne .fc-lotti-search-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    flex: 1 1 20rem;
    min-width: min(100%, 22rem);
    max-width: 36rem;
    margin: 0;
}

.fc-lotti-consegne .fc-lotti-search-field {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
}

.fc-lotti-consegne .fc-lotti-search-field input.form-control {
    width: 100%;
}

.fc-lotti-consegne .fc-lotti-search-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.fc-lotti-consegne .fc-lotti-search-actions .btn {
    white-space: nowrap;
}

.fc-lotti-consegne .fc-lotti-grid-head,
.fc-lotti-consegne .fc-lotti-grid-row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1.4fr) minmax(6rem, 0.9fr) 6.5rem minmax(5rem, 0.75fr);
    gap: 0.75rem 1rem;
    align-items: center;
    padding: 0.55rem 1rem;
}

.fc-lotti-consegne .fc-lotti-grid-head {
    position: sticky;
    top: 0;
    z-index: 2;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hc-text-muted);
    background: var(--hc-bg-cream);
    border-bottom: 1px solid var(--hc-border-soft);
}

.fc-lotti-consegne .fc-lotti-grid-body {
    max-height: min(70vh, 42rem);
    overflow: auto;
}

.fc-lotti-consegne .fc-lotti-grid-row {
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--hc-border-soft);
    background: #fff;
}

.fc-lotti-consegne .fc-lotti-grid-row:last-child {
    border-bottom: 0;
}

.fc-lotti-consegne .fc-lotti-grid-row:hover {
    background: var(--hc-hover);
}

.fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-plu {
    font-family: var(--bs-font-monospace, ui-monospace, monospace);
    font-size: 0.8125rem;
    color: var(--hc-text-muted);
}

.fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-lotto {
    font-family: var(--bs-font-monospace, ui-monospace, monospace);
    font-weight: 600;
    font-size: 0.875rem;
    word-break: break-all;
}

.fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-prodotto {
    min-width: 0;
    line-height: 1.35;
}

.fc-lotti-consegne .fc-lotti-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--hc-text-muted);
}

@media (max-width: 768px) {
    .fc-lotti-consegne .fc-lotti-detail-top {
        flex-direction: column;
        align-items: stretch;
    }

    .fc-lotti-consegne .fc-lotti-search-bar {
        max-width: none;
        flex-direction: column;
        align-items: stretch;
    }

    .fc-lotti-consegne .fc-lotti-search-actions {
        justify-content: flex-start;
    }

    .fc-lotti-consegne .fc-lotti-grid-head {
        display: none;
    }

    .fc-lotti-consegne .fc-lotti-grid-row {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "prodotto prodotto"
            "lotto data"
            "plu reparto";
        padding: 0.85rem 1rem;
        gap: 0.35rem 0.75rem;
    }

    .fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-prodotto {
        grid-area: prodotto;
        font-weight: 600;
    }

    .fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-lotto {
        grid-area: lotto;
    }

    .fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-data {
        grid-area: data;
        text-align: right;
    }

    .fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-plu {
        grid-area: plu;
    }

    .fc-lotti-consegne .fc-lotti-grid-row .fc-lotti-reparto {
        grid-area: reparto;
        text-align: right;
        font-size: 0.8125rem;
        color: var(--hc-text-muted);
    }
}

/* Safari iOS zooma la pagina al focus su un campo con font-size < 16px: molte pagine
   usano form-control-sm/variabili --prep-fs sotto quella soglia per stare compatte
   (compreso il search field interno di select2, che è un <input> vero). Qui si forza
   16px su ogni campo editabile, solo sotto 768px, con !important per vincere su
   qualsiasi override più specifico delle singole pagine. */
@media (max-width: 767.98px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Home: ultime righe importate dai fornitori monitorati */
.fc-home-ultime {
    background: #fff;
    border: 1px solid var(--hc-border-soft);
    border-radius: 18px;
    box-shadow: var(--hc-shadow-sm);
    padding: 0.9rem 1.1rem 0.4rem;
}

.fc-home-ultime-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.fc-home-ultime-title {
    font-weight: 700;
    color: #4b3b2a;
}

.fc-home-riga {
    display: grid;
    grid-template-columns: 5.75rem minmax(0, 1fr) 8rem;
    gap: 0.85rem;
    align-items: center;
    padding: 0.55rem 0;
    border-top: 1px solid var(--hc-border-soft);
    text-decoration: none;
    color: inherit;
}

.fc-home-head {
    border-top: 0;
    padding-top: 0;
    color: var(--hc-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fc-home-voce:hover {
    background: var(--hc-hover);
}

.fc-home-data {
    color: var(--hc-text-muted);
    font-size: 0.85rem;
}

.fc-home-ref {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.fc-home-forn {
    font-size: 0.78rem;
    color: var(--hc-text-muted);
}

.fc-home-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.fc-home-vuoto {
    padding: 0.75rem 0;
    color: var(--hc-text-muted);
}

@media (max-width: 640px) {
    .fc-home-riga {
        grid-template-columns: minmax(0, 1fr) 7rem;
        gap: 0.5rem;
    }
    .fc-home-riga > :nth-child(1) {
        display: none;
    }
}


/* Home: referenze in ricetta senza Real Food Cost. Stessa larghezza delle schede in alto. */
.fc-rfc-card {
    container-type: inline-size;
    margin-top: 0;
    padding: 1.15rem 1.25rem 0.5rem;
    border: 1px solid #ead3b4;
    border-radius: 18px;
    background:
        radial-gradient(ellipse 16rem 9rem at 0% 0%, rgba(196, 122, 42, 0.14), transparent 72%),
        #ffffff;
    box-shadow: var(--hc-shadow-sm);
}

.fc-rfc-testata {
    display: flex;
    align-items: center;
    gap: 1.05rem;
    margin-bottom: 0.95rem;
}

.fc-rfc-orologio {
    position: relative;
    flex: 0 0 auto;
    width: 5.35rem;
    height: 5.35rem;
}

.fc-rfc-orologio svg {
    display: block;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 4px 8px rgba(154, 84, 16, 0.16));
}

.fc-rfc-anello-fondo,
.fc-rfc-anello-resto {
    fill: none;
    stroke-width: 7;
}

.fc-rfc-anello-fondo {
    stroke: #f3e6d4;
}

.fc-rfc-anello-resto {
    stroke: #c47a2a;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease, stroke 0.35s ease;
}

.fc-rfc-orologio-centro {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.fc-rfc-conteggio {
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #9a5410;
}

.fc-rfc-conteggio.is-tick {
    animation: fc-rfc-tick 0.4s ease;
}

@keyframes fc-rfc-tick {
    0% { transform: translateY(-2px) scale(1.12); }
    100% { transform: none; }
}

.fc-rfc-conteggio-label {
    margin-top: 0.18rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a07a52;
}

.fc-rfc-testo {
    flex: 1 1 auto;
    min-width: 0;
}

.fc-rfc-titolo {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hc-heading);
}

.fc-rfc-sottotitolo {
    margin: 0.2rem 0 0;
    font-size: 0.84rem;
    color: var(--hc-text-muted);
}

.fc-rfc-barra {
    height: 0.48rem;
    margin-top: 0.6rem;
    border-radius: 999px;
    background: #f3e6d4;
    overflow: hidden;
}

.fc-rfc-barra-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e8a04a 0%, #c47a2a 100%);
    transition: width 0.5s ease;
}

.fc-rfc-legenda {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: var(--hc-text-muted);
}

.fc-rfc-legenda-resta::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: #c47a2a;
    vertical-align: -0.05rem;
}

.fc-rfc-card.is-esaurito .fc-rfc-legenda {
    display: none;
}

.fc-rfc-card.is-esaurito {
    border-color: #c9e6d2;
    background:
        radial-gradient(ellipse 16rem 9rem at 0% 0%, rgba(45, 125, 70, 0.12), transparent 72%),
        #ffffff;
}

.fc-rfc-card.is-esaurito .fc-rfc-anello-resto {
    stroke: var(--hc-success);
    stroke-dashoffset: 0;
}

.fc-rfc-card.is-esaurito .fc-rfc-orologio svg {
    filter: drop-shadow(0 4px 8px rgba(45, 125, 70, 0.16));
}

.fc-rfc-card.is-esaurito .fc-rfc-conteggio,
.fc-rfc-card.is-esaurito .fc-rfc-conteggio-label {
    display: none;
}

.fc-rfc-card.is-esaurito .fc-rfc-orologio-centro::after {
    content: "\2713";
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--hc-success);
}

.fc-rfc-card.is-esaurito .fc-rfc-barra-fill {
    width: 0 !important;
    background: var(--hc-success);
}

/* Elenco intero in pagina: niente riquadro con scroll proprio. */
.fc-rfc-tabella {
    max-height: none;
    overflow: visible;
    margin: 0 -0.25rem 0.75rem;
    border-top: 1px solid var(--hc-border-soft);
}

.fc-rfc-table {
    table-layout: fixed;
    width: 100%;
    min-width: 40rem;
}

.fc-rfc-col-fornitore { width: 10rem; }
.fc-rfc-col-prezzo { width: 6rem; }
.fc-rfc-col-ricette { width: 4.75rem; }
.fc-rfc-col-azione { width: 10.5rem; }

.fc-rfc-table th,
.fc-rfc-table td {
    padding: 0.55rem 0.7rem;
}

.fc-rfc-table thead th {
    background-color: #faf6ef;
    border-bottom: 1px solid var(--hc-border-soft);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--hc-text-muted);
    white-space: nowrap;
}

.fc-rfc-table tbody td {
    border-color: var(--hc-border-soft);
    font-size: 0.88rem;
    vertical-align: middle;
}

.fc-rfc-table tbody tr:hover td {
    background-color: var(--hc-hover);
}

/* Nome: al massimo due righe, il testo intero è nel tooltip. */
.fc-rfc-nome span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
    line-height: 1.3;
    color: var(--hc-heading);
    word-break: break-word;
}

/* Fornitore: una riga sola, con i puntini se non ci sta. */
.fc-rfc-fornitore span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--hc-text-muted);
}

.fc-rfc-table td.text-end {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.fc-rfc-btn {
    border: 1px solid var(--hc-border-soft);
    background-color: #ffffff;
    color: var(--hc-heading);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.fc-rfc-btn:hover {
    background-color: var(--hc-action);
    border-color: var(--hc-action);
    color: var(--hc-on-action);
}

.fc-rfc-vuoto {
    padding: 0.4rem 0 0.9rem;
    color: var(--hc-success);
    font-size: 0.9rem;
}


/* Scheda stretta (telefono, o barra laterale aperta): righe impilate invece della tabella a 5 colonne. */
@container (max-width: 40rem) {
    .fc-rfc-tabella {
        margin: 0 -0.25rem 0.75rem;
    }

    .fc-rfc-table,
    .fc-rfc-table tbody {
        display: block;
        min-width: 0;
    }

    .fc-rfc-table colgroup,
    .fc-rfc-table thead {
        display: none;
    }

    .fc-rfc-table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.2rem 0.85rem;
        padding: 0.7rem 0.45rem;
        border-bottom: 1px solid var(--hc-border-soft);
    }

    .fc-rfc-table tbody td {
        display: block;
        padding: 0;
        border: 0;
        width: auto;
        font-size: 0.8rem;
        color: var(--hc-text-muted);
    }

    .fc-rfc-table tbody td.fc-rfc-nome {
        flex: 1 1 100%;
        font-size: 0.9rem;
    }

    .fc-rfc-table tbody td.fc-rfc-fornitore {
        max-width: 9rem;
    }

    .fc-rfc-table tbody td.fc-rfc-ricette::after {
        content: " ricette";
    }

    .fc-rfc-table tbody td.fc-rfc-azione {
        margin-left: auto;
    }

    .fc-rfc-table .fc-rfc-btn-testo {
        display: none;
    }
}


/* ——— Sidebar come kali (hubble-shared/shell/views/components/frame.blade.php): logo centrato con riga sotto,
   larghezza 16rem, apertura e chiusura dal pulsante della top bar. ——— */
.hc-layout .hc-sidebar {
    width: 16rem;
    max-width: 85vw;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.hc-layout .hc-sidebar-head {
    position: relative;
    justify-content: center;
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.hc-layout .hc-sidebar-logo img {
    height: 2.25rem;
}

.hc-layout .hc-sidebar-inner {
    padding: 1rem 1.5rem 4.5rem;
}

.hc-layout .hc-sidebar-collapse {
    display: none;
}

@media (max-width: 639px) {
    .hc-layout .hc-sidebar-head {
        padding: 1.25rem 1.5rem 1rem;
    }

    .hc-layout .hc-sidebar-collapse {
        display: inline-flex;
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        color: #4b3b2a;
    }

    .hc-layout .hc-sidebar-inner {
        padding: 0.75rem 1rem 4.5rem;
    }
}

/* ══ Restyling 2026-11-26 — ritocchi di pagina (home, elenchi) ══ */
.fc-azione-card {
    background: #ffffff;
    border-color: var(--hc-border);
    border-radius: 22px;
    box-shadow: var(--hc-shadow-sm);
}

/* Al posto del cerchio grigio: un angolo di puntinato che sfuma, come in cima alla pagina. */
.fc-azione-card::before {
    right: 0;
    top: 0;
    width: 11rem;
    height: 7rem;
    border-radius: 0 22px 0 0;
    background: radial-gradient(rgba(75, 59, 42, 0.2) 1px, transparent 1.2px) 0 0 / 12px 12px;
    -webkit-mask-image: linear-gradient(215deg, #000 0%, transparent 62%);
    mask-image: linear-gradient(215deg, #000 0%, transparent 62%);
}

.fc-azione-card:hover,
.fc-azione-card.is-risultati-aperti {
    box-shadow: var(--hc-shadow-md);
}

.fc-azione-badge {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 16px;
    box-shadow: 0 6px 14px rgba(75, 59, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.fc-azione-card-etichette .fc-azione-badge {
    color: #f2c879;
}

.fc-azione-btn {
    min-height: 2.75rem;
}

/* Campo di ricerca della home: più alto (si tocca meglio) e con l'anello caramello quando è attivo. */
.fc-azione-card .fc-google-bar {
    height: 2.75rem;
    border-color: var(--hc-input-border);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fc-azione-card .fc-google:not(.is-open) .fc-google-bar:focus-within {
    border-color: var(--hc-accent);
    box-shadow: var(--hc-ring);
}

.fc-google-bar input:focus-visible,
.fc-listini-search input:focus-visible,
.fc-pick-search input:focus-visible {
    outline: none;
}

.fc-rfc-card {
    border-color: var(--hc-border);
    border-radius: 22px;
}

.fc-rfc-btn {
    border-radius: 999px;
    font-weight: 700;
}


/* ══ Restyling 2026-11-26 — telefono e schermi a tocco ══ */
/* Dove si usa il dito: pulsanti e campi alti almeno 44px (i piccoli 36px), senza cambiare il computer. */
@media (pointer: coarse) {
    .hc-main .btn:not(.btn-sm):not(.btn-close):not(.btn-link),
    .modal .btn:not(.btn-sm):not(.btn-close):not(.btn-link) {
        min-height: 2.75rem;
    }
    .hc-main .btn-sm,
    .modal .btn-sm {
        min-height: 2.25rem;
        min-width: 2.25rem;
    }
    .hc-main .form-control:not(textarea):not(.form-control-sm),
    .hc-main .form-select:not(.form-select-sm),
    .modal .form-control:not(textarea):not(.form-control-sm),
    .modal .form-select:not(.form-select-sm) {
        min-height: 2.75rem;
    }
    .hc-main .form-check-input:not([role="switch"]) {
        width: 1.25em;
        height: 1.25em;
    }
    .hc-main .dropdown-item {
        padding: 0.65rem 0.8rem;
    }
    .hc-main .nav-tabs .nav-link,
    .hc-main .nav-pills .nav-link {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }
    .hc-breadcrumb-link {
        padding: 0.4rem 0.5rem;
        margin-left: -0.5rem;
    }
    /* Niente sollevamento al passaggio: sul tocco resta "incollato" dopo il dito. */
    .fc-azione-card:hover {
        transform: none;
    }
}

@media (max-width: 575.98px) {
    main h1 { font-size: 1.4rem; }
    main h2 { font-size: 1.2rem; }
    main h3 { font-size: 1.08rem; }

    .hc-breadcrumb {
        margin-top: 0.6rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
    }
    .hc-breadcrumb::-webkit-scrollbar { display: none; }

    .card { border-radius: 14px; }
    .card-body { padding: 1rem; }
    .card-header, .card-footer { padding: 0.7rem 1rem; }
    .alert { border-radius: 12px; padding-top: 0.75rem; padding-bottom: 0.75rem; }
    .coffee-hero { padding: 1.5rem 1.25rem; border-radius: 18px; }
    .coffee-hero-title { font-size: 1.5rem; }
    .coffee-hero-circle { width: 200px; height: 200px; top: -70px; right: -70px; }

    /* Tabelle: righe più compatte, intestazione che resta leggibile, bordo che segnala lo scorrimento laterale. */
    .table > :not(caption) > * > * { padding: 0.6rem 0.65rem; }
    .table thead th { font-size: 0.66rem; letter-spacing: 0.06em; }
    .table-responsive {
        background:
            linear-gradient(to right, var(--hc-surface) 30%, rgba(255, 255, 255, 0)) left center / 28px 100% no-repeat local,
            linear-gradient(to left, var(--hc-surface) 30%, rgba(255, 255, 255, 0)) right center / 28px 100% no-repeat local,
            radial-gradient(farthest-side at 0 50%, rgba(75, 59, 42, 0.16), transparent) left center / 10px 100% no-repeat scroll,
            radial-gradient(farthest-side at 100% 50%, rgba(75, 59, 42, 0.16), transparent) right center / 10px 100% no-repeat scroll;
    }
    .table-responsive > .table { background-color: transparent; }

    /* Azioni di pagina: i pulsanti si dividono la riga invece di restare piccoli a sinistra. */
    .page-actions { gap: 0.5rem; }
    .page-actions > .btn,
    .page-actions > form,
    .page-actions > form > .btn { flex: 1 1 auto; justify-content: center; }

    /* Finestre: quasi a tutto schermo, angoli morbidi, pulsanti del piede affiancati e larghi. */
    .modal-dialog:not(.modal-fullscreen) { margin: 0.5rem; }
    .modal-content { border-radius: 18px; }
    .modal-header { padding: 0.85rem 1rem; }
    .modal-body { padding: 1rem; }
    .modal-footer { padding: 0.7rem 1rem; border-radius: 0 0 18px 18px; }
    .modal-footer > .btn { flex: 1 1 0; }

    .pagination { flex-wrap: wrap; gap: 0.25rem; }
    .fc-azione-card { border-radius: 18px; padding: 1.35rem 1.1rem 1.2rem; }
    .fc-azione-card::before { border-radius: 0 18px 0 0; }
    .fc-rfc-card { border-radius: 18px; }
}
