/* =========================================
   BELLANOVA - Corporate Website
   ========================================= */

/* --- Local Fonts --- */
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/geist-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/geist-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* Webkit scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

:root {
    --color-bg: #f8f5f0;
    --color-text: #000000;
    --color-text-light: #333333;
    --color-accent: #000000;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-primary: #3a3d38;
    --font-heading: 'Geist', 'Geist Placeholder', sans-serif;
    --font-body: 'Geist', 'Geist Placeholder', sans-serif;
    --topbar-height: 72px;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

ul, ol {
    list-style: none;
}

/* --- Topbar --- */
.topbar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.3s ease;
}

.topbar__inner {
    width: 100%;
    height: 100%;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
}

/* Left: Logo */
.topbar__logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar__logo a {
    display: flex;
    align-items: center;
}

.topbar__logo-link {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 1 !important;
}

.topbar__logo-link:hover {
    opacity: 1 !important;
}

.topbar__logo-icon {
    height: 46px;
    width: auto;
    animation: logoFromLeft 0.5s ease-out both;
}

.topbar__logo-text {
    height: 46px;
    width: auto;
    animation: logoFromTop 0.5s ease-out 0.2s both;
}

@keyframes logoFromLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes logoFromTop {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Center: Navigation */
.topbar__nav {
    display: flex;
    align-items: center;
    gap: 36px;
}

.topbar__nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-light);
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
    position: relative;
}

.topbar__separator {
    width: 1px;
    height: 16px;
    background: rgba(0, 0, 0, 0.15);
}

.topbar__nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-text);
    transition: width 0.3s ease;
}

.topbar__nav a:hover {
    color: var(--color-text);
    opacity: 1;
}

.topbar__nav a:hover::after {
    width: 100%;
}

.topbar__nav a.active {
    color: var(--color-text);
}

.topbar__nav a.active::after {
    width: 100%;
    background: var(--color-primary);
}

/* Right: Actions */
.topbar__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-selector__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 450;
    color: var(--color-text-light);
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.lang-selector__toggle:hover {
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--color-text);
}

.lang-selector__arrow {
    font-size: 0.55rem;
    transition: transform 0.3s ease;
}

.lang-selector.open .lang-selector__arrow {
    transform: rotate(180deg);
}

.lang-selector__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.lang-selector.open .lang-selector__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-selector__dropdown a {
    display: block;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--color-text-light);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.lang-selector__dropdown a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-text);
    opacity: 1;
}

.lang-selector__dropdown a.active {
    color: var(--color-text);
    font-weight: 500;
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.3s ease;
}

.user-menu__toggle:hover {
    opacity: 0.7;
}

.user-menu__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #c9a84c;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.user-menu__arrow {
    font-size: 0.55rem;
    color: var(--color-text-light);
    transition: transform 0.3s ease;
}

.user-menu.open .user-menu__arrow {
    transform: rotate(180deg);
}

.user-menu__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    max-width: 260px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    z-index: 100;
}

.user-menu.open .user-menu__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu__dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--color-text-light);
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu__dropdown a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--color-text);
    opacity: 1;
}

.user-menu__dropdown a svg {
    flex-shrink: 0;
}

/* Login Link */
.topbar__login {
    font-size: 0.8rem;
    font-weight: 450;
    color: var(--color-text-light);
    transition: color 0.3s ease;
}

.topbar__login:hover {
    color: var(--color-text);
    opacity: 1;
}

.topbar__logout {
    display: flex;
    align-items: center;
    color: var(--color-text);
    transition: opacity 0.3s ease;
}

.topbar__logout:hover {
    opacity: 0.5;
}

/* --- Mobile Menu Toggle --- */
.topbar__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.topbar__burger span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.topbar__burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
}

.topbar__burger.active span:nth-child(2) {
    opacity: 0;
}

.topbar__burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* --- Mobile Overlay --- */
.mobile-overlay {
    display: none;
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--topbar-height));
    background: rgba(252, 251, 249, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    padding: 40px;
    flex-direction: column;
    gap: 32px;
    opacity: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.3s ease;
}

.mobile-overlay.open {
    display: flex;
    opacity: 1;
}

.mobile-overlay__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-overlay__nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text);
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.mobile-overlay__actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
}

.mobile-overlay__actions .lang-selector__toggle {
    width: fit-content;
}

.mobile-overlay__actions .topbar__login {
    display: inline-block;
    width: fit-content;
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .topbar__inner {
        padding: 0 24px;
        grid-template-columns: 1fr auto;
    }

    .topbar__nav,
    .topbar__actions {
        display: none;
    }

    .topbar__burger {
        display: flex;
    }
}

/* --- Admin Drawer Toggle --- */
.topbar__admin-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.topbar__admin-toggle:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #111;
}

@media (min-width: 1024px) {
    body.admin-drawer-push .topbar__admin-toggle {
        display: none;
    }
}

/* --- Admin Drawer --- */
/* ── Admin Drawer — Mobile: overlay (default) ── */
.admin-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.admin-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.admin-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    background: #fff;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
}

.admin-drawer.open {
    transform: translateX(0);
}

.admin-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.admin-drawer__title {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
}

.admin-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.admin-drawer__close:hover {
    background: #f0f0f0;
    color: #111;
}

.admin-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.admin-drawer__group {
    margin-bottom: 8px;
}

.admin-drawer__label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    padding: 12px 24px 4px;
}

.admin-drawer__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 550;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    padding: 12px 24px 4px;
    text-align: left;
}

.admin-drawer__toggle:hover {
    color: #333;
}

.admin-drawer__toggle.open {
    color: #111;
}

.admin-drawer__toggle-icon {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    transform: rotate(-90deg);
}

.admin-drawer__toggle.open .admin-drawer__toggle-icon {
    transform: rotate(0deg);
}

.admin-drawer__links {
    display: none;
}

.admin-drawer__links.open {
    display: block;
}

.admin-drawer__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 24px 6px 34px;
    color: #444;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-drawer__link:hover {
    background: #f5f5f5;
    color: #111;
}

.admin-drawer__link.active {
    background: rgba(201, 168, 76, 0.12);
    color: #111;
    font-weight: 550;
}

.admin-drawer__link svg {
    flex-shrink: 0;
    color: #888;
    width: 13px;
    height: 13px;
}

.admin-drawer__link.active svg {
    color: #b8943f;
}

@media (max-width: 600px) {
    .admin-drawer {
        width: 100%;
    }
}

/* ── Admin Drawer — Desktop: push-content ── */
@media (min-width: 1024px) {
    .admin-drawer {
        top: 0;
        box-shadow: none;
        border-right: 1px solid #eee;
        z-index: 1001;
    }

    .admin-drawer__header {
        display: flex;
        border-bottom: none;
        padding: 18px 24px 8px;
    }

    .admin-drawer__close {
        margin-left: auto;
    }

    .admin-drawer__title {
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #999;
    }

    .admin-drawer-backdrop {
        display: none;
    }

    /* Push body content when drawer is open */
    body.admin-drawer-push {
        margin-left: 320px;
    }

    body.admin-drawer-has {
        transition: margin-left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* =========================================
   Scroll Reveal System
   ========================================= */

.reveal {
    opacity: 0.005;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.15s; }
.reveal--delay-2 { transition-delay: 0.3s; }
.reveal--delay-3 { transition-delay: 0.45s; }
.reveal--delay-4 { transition-delay: 0.6s; }
.reveal--delay-5 { transition-delay: 0.75s; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* =========================================
   Hero Section
   ========================================= */

/* --- Keyframes --- */
@keyframes fadeFromLeft {
    from {
        opacity: 0.005;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeFromRight {
    from {
        opacity: 0.005;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeFromBottom {
    from {
        opacity: 0.005;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes creamFromBottom {
    from {
        opacity: 0.005;
        transform: translate(-50%, calc(-50% + 50px));
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes heroFadeIn {
    from { opacity: 0.005; }
    to { opacity: 1; }
}

/* --- Hero Layout --- */
.hero {
    height: calc(100vh - var(--topbar-height));
    display: flex;
    flex-direction: column;
    padding: 0 48px;
    overflow: hidden;
}

/* Top area: staggered layout with centered cream */
.hero__top {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    flex: 1;
    padding-top: 20px;
}

/* 1) Left copy — from left, first to appear */
.hero__copy--left {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    padding-top: 24px;
    animation: fadeFromLeft 0.9s ease-out both;
}

.hero__title {
    font-size: clamp(2.2rem, 3.5vw, 3.4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.08;
    color: var(--color-text);
}

.hero__proof {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero__stars {
    font-size: 0.95rem;
    color: var(--color-text);
    letter-spacing: 2px;
}

.hero__customers {
    font-size: 0.8rem;
    font-weight: 450;
    color: var(--color-text-light);
}

/* 2) Right copy — from right, second to appear */
.hero__copy--right {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    align-self: end;
    text-align: right;
    padding-bottom: 16px;
    animation: fadeFromRight 0.9s ease-out 0.2s both;
}

.hero__tagline {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text);
    max-width: 340px;
}

/* 3) Cream — centered on page, from bottom */
.hero__image--cream {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(200px, 22vw, 320px);
    z-index: 2;
    animation: creamFromBottom 1s ease-out 0.4s both;
}

.hero__image--cream img {
    display: block;
    width: 100%;
    height: auto;
}

/* Bottom: hand + background text — anchored to viewport bottom */
.hero__bottom {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    flex-shrink: 0;
}

.hero__bg-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: clamp(8rem, 16vw, 18rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.18);
    white-space: nowrap;
    line-height: 0.75;
    pointer-events: none;
    user-select: none;
    animation: fadeFromBottom 1.2s ease-out 0.9s both;
    content: none;
}

.hero__bg-text::after {
    content: "BELLANOVA";
}

.hero__image--hand {
    position: relative;
    z-index: 1;
    width: clamp(380px, 52vw, 780px);
    animation: fadeFromBottom 1s ease-out 0.65s both;

}

.hero__image--hand img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: -4px;
}

/* --- Hero Responsive --- */
@media (max-width: 900px) {
    .hero {
        height: auto;
        min-height: calc(100vh - var(--topbar-height));
        padding: 0 24px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .hero__top {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0;
        padding-top: 4vh;
        flex: 1;
        justify-content: space-between;
    }

    .hero__copy--left {
        order: 1;
        align-self: auto;
        justify-self: auto;
        padding-top: 0;
        text-align: center;
        animation: fadeFromBottom 0.9s ease-out both;
    }

    .hero__image--cream {
        order: 2;
        position: static;
        transform: none;
        align-self: auto;
        justify-self: auto;
        width: clamp(150px, 40vw, 220px);
        animation: fadeFromBottom 1s ease-out 0.4s both;
    }

    .hero__copy--right {
        order: 3;
        align-self: auto;
        justify-self: auto;
        text-align: center;
        padding-bottom: 0;
        animation: fadeFromBottom 0.9s ease-out 0.2s both;
    }

    .hero__tagline {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__proof {
        align-items: center;
    }

    .hero__bottom {
        position: relative;
        margin-top: 3vh;
        padding-bottom: 2vh;
    }

    .hero__image--hand {
        display: none;
    }

    .hero__bg-text {
        position: static;
        transform: none;
        width: 100%;
        font-size: clamp(2.5rem, 13vw, 4.5rem);
        text-align: center;
        line-height: 1;
        overflow: hidden;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .hero__copy--left,
    .hero__copy--right,
    .hero__image--cream,
    .hero__image--hand,
    .hero__bg-text {
        animation: heroFadeIn 0.4s ease-out both;
    }
}

/* =========================================
   Philosophy Section
   ========================================= */

.philosophy {
    background: none;
    padding: 160px 0 180px;
}

.philosophy__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

/* Top: title left + content right */
.philosophy__top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.philosophy__title {
    font-size: clamp(2.4rem, 4.5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-text);
}

.philosophy__content {
    padding-top: 8px;
}

.philosophy__badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #3a3d38;
    background: #d4dccf;
    border: none;
    border-radius: 20px;
    padding: 7px 18px;
    margin-top: 24px;
}

.philosophy__lead {
    font-size: clamp(1.15rem, 1.8vw, 1.45rem);
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 24px;
}

.philosophy__text {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* Bottom: 3 principles */
.philosophy__principles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.philosophy__principle-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

.philosophy__principle-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
}

.philosophy__principle-header span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
}

.philosophy__principle p {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* --- Philosophy Responsive --- */
@media (max-width: 900px) {
    .philosophy {
        padding: 64px 0 80px;
    }

    .philosophy__inner {
        padding: 0 24px;
    }

    .philosophy__top {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 48px;
    }

    .philosophy__principles {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .philosophy__principle {
        padding-right: 0;
    }
}

/* =========================================
   Process Section
   ========================================= */

.process {
    width: 100%;
}

.process__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    min-height: 80vh;
    align-items: center;
}

.process__image {
    overflow: hidden;
}

.process__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.process__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 72px;
}

.process__title {
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: 36px;
}

.process__text {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.process__text:last-of-type {
    margin-bottom: 0;
}

.process__cta-wrap {
    margin-top: 48px;
}

.process__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    background: #fff;
    color: #3a3d38;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #bbb;
    border-radius: 50px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.process__cta svg {
    transition: transform 0.2s ease;
}

.process__cta:hover {
    color: #000;
    border-color: #999;
    opacity: 1;
}

.process__cta:hover svg {
    transform: translateX(3px);
}

/* --- Process Responsive --- */
@media (max-width: 900px) {
    .process__inner {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 0 24px;
        gap: 0;
    }

    .process__image {
        max-height: 50vh;
    }

    .process__content {
        padding: 48px 0;
    }
}

/* =========================================
   Workflow Section
   ========================================= */

.workflow {
    padding: 140px 0 20px;
}

.workflow__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.workflow__title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 16px;
}

.workflow__subtitle {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-light);
    text-align: center;
    margin: 0 auto 72px;
    line-height: 1.6;
}

/* Grid */
.workflow__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 40px;
}

/* Cards */
.workflow__card {
    position: relative;
    border: none;
    border-radius: 0;
    padding: 24px;
    background: none;
    z-index: 2;
}

.workflow__number {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 14px;
    letter-spacing: 0.08em;
    position: relative;
}

.workflow__number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 30px;
    right: 0;
    height: 1px;
    background: var(--color-primary);
    opacity: 0.35;
}

.workflow__card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.3;
}

.workflow__card p {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-light);
    line-height: 1.55;
}

/* --- Workflow Responsive --- */
@media (max-width: 900px) {
    .workflow {
        padding: 80px 0;
    }

    .workflow__inner {
        padding: 0 24px;
    }

    .workflow__subtitle {
        margin-bottom: 48px;
    }

    .workflow__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* =========================================
   CTA Section
   ========================================= */

.cta {
    padding: 80px 0;
}

.cta__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.cta__content {
    text-align: left;
}

.cta__image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
}

.cta__text {
    font-size: 1rem;
    font-weight: 450;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.cta__heading {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 40px;
}

.cta__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3a3d38;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50px;
    padding: 10px 28px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cta__link:hover {
    color: #000;
    border-color: #999;
}

.cta__arrow {
    transition: transform 0.2s ease;
}

.cta__link:hover .cta__arrow {
    transform: translateX(3px);
}

/* --- CTA Responsive --- */
@media (max-width: 900px) {
    .cta {
        padding: 80px 0;
    }

    .cta__inner {
        padding: 0 24px;
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cta__content {
        text-align: center;
    }
}

/* =========================================
   About Hero
   ========================================= */

.about-hero {
    height: 750px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    padding: 0 48px;
}

.about-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/12.avif') center/cover no-repeat;
    animation: aboutHeroZoom 2s ease-out both;
    z-index: 0;
}

@keyframes aboutHeroZoom {
    from { transform: scale(1.08); }
    to   { transform: scale(1); }
}

.about-hero--services::before {
    background-image: url('../img/about.avif');
}

.about-hero--contacts::before {
    background-image: url('../img/contact.avif');
}

.philosophy__top--services {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.philosophy__left .philosophy__title {
    margin-bottom: 8px;
}

.philosophy__left .philosophy__badge {
    margin-bottom: 24px;
}

.philosophy__left .philosophy__lead {
    margin-bottom: 16px;
}

.philosophy__media {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.philosophy__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 768px) {
    .philosophy__top--services {
        grid-template-columns: 1fr;
    }

    .philosophy__media {
        aspect-ratio: 16 / 9;
    }
}

.services-icon {
    border-radius: 12px;
    overflow: hidden;
    height: 280px;
    margin-bottom: 20px;
}

.services-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.services-complementary__title {
    margin-top: 40px;
    margin-bottom: 32px;
    font-size: 1.2rem;
    font-weight: 600;
}

.philosophy--services {
    padding-bottom: 80px;
}

.about-hero__inner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-hero__label {
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f8f5f0;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.about-hero__subtitle {
    font-size: 2rem;
    font-weight: 400;
    color: #f8f5f0;
    letter-spacing: 0.02em;
    margin-top: 0;
}

.about-hero__title {
    font-size: clamp(8rem, 16vw, 18rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 1;
    color: #f8f5f0;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    text-align: center;
    margin-top: auto;
    margin-bottom: -0.18em;
    position: relative;
    z-index: 1;
}

/* --- About Hero Responsive --- */
@media (max-width: 900px) {
    .about-hero {
        height: 320px;
        padding: 0 24px;
    }

    .about-hero__label {
        font-size: 1rem;
    }

    .about-hero__subtitle {
        font-size: 1.1rem;
    }

    .about-hero__title {
        font-size: clamp(2.5rem, 13vw, 4.5rem);
        line-height: 1;
        white-space: normal;
        overflow: hidden;
    }
}

/* =========================================
   About Video Section
   ========================================= */

.about-video__thumb {
    position: relative;
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}
.about-video__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: opacity 0.3s, transform 0.4s;
}
.about-video__thumb:hover .about-video__img {
    opacity: 0.8;
    transform: scale(1.02);
}
.about-video__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-video__play svg {
    width: 64px;
    height: 64px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    transition: transform 0.3s;
}
.about-video__thumb:hover .about-video__play svg {
    transform: scale(1.15);
}

/* Video Dialog */
.video-dialog {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.video-dialog--open {
    opacity: 1;
    visibility: visible;
}
.video-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}
.video-dialog__content {
    position: relative;
    width: 90vw;
    max-width: 1100px;
}
.video-dialog__content video {
    display: block;
    width: 100%;
    border-radius: 12px;
    background: #000;
}
.video-dialog__close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.video-dialog__close:hover {
    opacity: 1;
}

/* =========================================
   Commitments Section
   ========================================= */

.commitments {
    padding: 0 0 80px;
}

.commitments__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.commitments__title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--color-text);
    margin-bottom: 40px;
}

.commitments__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.commitments__image {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/5;
    margin-bottom: 20px;
}

.commitments__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.commitments__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    margin-bottom: 16px;
}

.commitments__header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
}

.commitments__header span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
}

.commitments__card p {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* --- Commitments Responsive --- */
@media (max-width: 900px) {
    .commitments__inner {
        padding: 0 24px;
    }

    .commitments__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =========================================
   About Vision CTA Section
   ========================================= */

.about-vision {
    padding: 48px 0 100px;
}

.about-vision__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.about-vision__content {
    text-align: left;
}

.about-vision__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.about-vision__text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.about-vision__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.about-vision__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 50px;
    background: #fff;
    color: #3a3d38;
    border: 1px solid #bbb;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.about-vision__btn svg {
    transition: transform 0.2s ease;
}

.about-vision__btn:hover {
    color: #000;
    border-color: #999;
}

.about-vision__btn:hover svg {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .about-vision__inner {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-vision__content {
        text-align: center;
    }

    .about-vision__title {
        font-size: 1.4rem;
    }

    .about-vision__actions {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
}

/* =========================================
   Contacts Page
   ========================================= */

.contacts {
    padding: 140px 0 100px;
    background: var(--color-bg);
}

.contacts__header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px 48px;
}

.contacts__title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    color: #3a3d38;
    letter-spacing: -0.03em;
    line-height: 1;
}

.contacts__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contacts__intro {
    font-size: 1.15rem;
    line-height: 1.75;
    color: var(--color-text-light);
    margin-bottom: 48px;
}

.contacts__intro strong {
    color: var(--color-text);
}

.contacts__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.contacts__detail--full {
    grid-column: 1 / -1;
}

.contacts__detail-label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
}

.contacts__detail-value {
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-decoration: none;
}

a.contacts__detail-value {
    text-decoration: underline;
    text-underline-offset: 3px;
}

a.contacts__detail-value:hover {
    color: var(--color-text);
}

/* Form */
.contacts__form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.contacts__field {
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.contacts__field--full {
    grid-column: 1 / -1;
}

.contacts__field--hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
    opacity: 0;
}

.contacts__field input,
.contacts__field textarea {
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    padding: 24px 4px;
    outline: none;
}

.contacts__field textarea {
    resize: vertical;
    min-height: 100px;
}

.contacts__field input::placeholder,
.contacts__field textarea::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

.contacts__field--submit {
    display: flex;
    justify-content: flex-end;
    border-bottom: none;
    padding-top: 24px;
}

.contacts__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50px;
    padding: 10px 28px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3a3d38;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.contacts__submit svg {
    transition: transform 0.2s ease;
}

.contacts__submit:hover {
    color: #000;
    border-color: #999;
}

.contacts__submit:hover svg {
    transform: translateX(3px);
}

.contacts__note {
    grid-column: 1 / -1;
    font-size: 0.82rem;
    font-style: italic;
    color: var(--color-text-light);
    margin-top: 24px;
}

/* --- Contact Form Feedback --- */

.contacts__feedback {
    grid-column: 1 / -1;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-top: 8px;
}

.contacts__feedback--ok {
    background: rgba(55, 183, 22, 0.1);
    color: var(--color-green);
}

.contacts__feedback--err {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* --- Message Badge --- */

.msg-badge {
    display: inline-block;
    background: var(--color-green);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.msg-badge--inline {
    margin-left: 8px;
    font-size: 0.68rem;
    vertical-align: middle;
}

.msg-card--unread {
    border-left: 3px solid var(--color-green);
    font-weight: 600;
}

.msg-card--unread .client-card__name,
.msg-card--unread .client-card__location,
.msg-card--unread .client-card__meta {
    font-weight: 600;
}


/* --- Message Detail Page --- */

.portal-bar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.msg-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-family: inherit;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    cursor: pointer;
    color: var(--color-text);
    transition: border-color 0.2s, color 0.2s;
}

.msg-action-btn:hover {
    border-color: #999;
}

.msg-action-btn--danger:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.msg-page {
    overflow: hidden;
}

.msg-page__header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.msg-page__initials {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
    color: var(--color-text);
}

.msg-page__sender {
    flex: 1;
    min-width: 0;
}

.msg-page__subject {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--color-text);
}

.msg-page__from {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.msg-page__from a {
    color: var(--color-green);
    text-decoration: none;
}

.msg-page__date {
    font-size: 0.82rem;
    color: var(--color-text-light);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 4px;
}

.msg-page__company {
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--color-text);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.msg-page__body {
    padding: 20px 0;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--color-text);
    min-height: 120px;
}

.msg-page__footer {
    padding: 20px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.msg-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-family: inherit;
    background: var(--color-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.msg-reply-btn:hover {
    opacity: 0.85;
}

/* --- Contacts Responsive --- */
@media (max-width: 900px) {
    .contacts {
        padding: 120px 0 60px;
    }

    .contacts__header {
        padding: 0 24px 36px;
    }

    .contacts__inner {
        grid-template-columns: 1fr;
        gap: 48px;
        padding: 0 24px;
    }

    .contacts__title {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }
}

@media (max-width: 600px) {
    .contacts__details {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contacts__form {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   FAQ Section
   ========================================= */

.faq {
    padding: 80px 0 100px;
    background: var(--color-bg);
}

.faq__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.faq__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #3a3d38;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.faq__list {
    display: flex;
    flex-direction: column;
}

.faq__item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: color 0.2s ease;
}

.faq__question:hover {
    color: #3a3d38;
}

.faq__chevron {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq__item.active .faq__chevron {
    transform: rotate(180deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq__item.active .faq__answer {
    max-height: 300px;
}

.faq__answer p {
    padding: 0 0 24px;
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--color-text-light);
}

/* --- FAQ Responsive --- */
@media (max-width: 900px) {
    .faq {
        padding: 60px 0 80px;
    }

    .faq__inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 0 24px;
    }

    .faq__title {
    }
}

/* =========================================
   Certifications Section
   ========================================= */

.certifications {
    padding: 80px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.certifications__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    text-align: center;
}

.certifications__label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 12px;
}

.certifications__title {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
    color: var(--color-text);
}

.certifications__grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.certifications__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.certifications__name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.certifications__desc {
    font-size: 0.88rem;
    color: rgba(0, 0, 0, 0.65);
    line-height: 1.5;
}

.certifications__info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 0, 0, 0.25);
    background: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.45);
    padding: 0;
    margin-left: 6px;
    vertical-align: middle;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.certifications__info-btn:hover {
    border-color: var(--color-green);
    color: var(--color-green);
}

/* --- COSMOS Info Dialog --- */
.cosmos-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cosmos-dialog--visible {
    opacity: 1;
    visibility: visible;
}

.cosmos-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.cosmos-dialog__panel {
    position: relative;
    background: var(--color-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 580px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cosmos-dialog--visible .cosmos-dialog__panel {
    transform: translateY(0);
}

.cosmos-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px 0;
}

.cosmos-dialog__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.cosmos-dialog__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    transition: opacity 0.3s ease;
}

.cosmos-dialog__close:hover {
    opacity: 0.5;
}

.cosmos-dialog__body {
    padding: 20px 32px 32px;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(0, 0, 0, 0.7);
}

.cosmos-dialog__body p {
    margin: 0 0 12px;
}

.cosmos-dialog__body p:last-child {
    margin-bottom: 0;
}

.cosmos-dialog__body strong {
    color: var(--color-text);
}

/* --- Certifications Responsive --- */
@media (max-width: 900px) {
    .certifications__inner {
        padding: 0 24px;
    }

    .certifications__title {
        font-size: 1.3rem;
    }

    .certifications__grid {
        gap: 16px;
    }

    .certifications__item {
        min-width: 140px;
        padding: 20px 16px;
    }
}

/* =========================================
   Footer
   ========================================= */

.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 64px;
}

.footer__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

/* Top: 3 columns */
.footer__top {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 0;
}

.footer__col {
    padding: 0 40px 64px 0;
}

.footer__col--border {
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    padding-left: 40px;
}

.footer__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 450;
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.footer__nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__nav a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}

/* Newsletter column */
.footer__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.footer__text {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--color-text-light);
    line-height: 1.65;
    margin-bottom: 24px;
}

.footer__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__input-wrap {
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 8px;
}

.footer__input-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    padding: 8px 0;
}

.footer__input-wrap input::placeholder {
    color: var(--color-text-light);
}

.footer__input-wrap button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.footer__input-wrap button:hover {
    opacity: 0.7;
}

.footer__privacy-note {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.footer__privacy-note a {
    text-decoration: underline;
}

.footer__field--hp {
    position: absolute;
    left: -9999px;
    height: 0;
    overflow: hidden;
}

.footer__feedback {
    font-size: 0.85rem;
    margin-top: 4px;
}

.footer__feedback--ok {
    color: var(--color-green);
}

.footer__feedback--err {
    color: #dc3545;
}

/* Unsubscribe page */
.unsubscribe {
    padding: 120px 0 80px;
}

.unsubscribe__inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--gutter);
    text-align: center;
}

.unsubscribe__title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.unsubscribe__text {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 32px;
}

.unsubscribe__btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-text);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.unsubscribe__btn:hover {
    opacity: 0.85;
}

.unsubscribe__input-wrap {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.unsubscribe__input {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    width: 300px;
    max-width: 100%;
}

.unsubscribe__input:focus {
    outline: none;
    border-color: var(--color-text);
}

/* Bottom bar */
.footer__bottom {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--color-text-light);
}

.footer__bottom a {
    color: var(--color-text-light);
}

.footer__copy {
    margin-left: auto;
}

/* --- Legal Pages --- */
.legal {
    padding: 120px 40px 80px;
}

.legal__inner {
    max-width: 800px;
    margin: 0 auto;
}

.legal__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.legal__updated {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 48px;
}

.legal__content h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 12px;
}

.legal__content p {
    font-size: 0.925rem;
    line-height: 1.75;
    color: var(--color-text-light);
}

@media (max-width: 768px) {
    .legal {
        padding: 100px 24px 60px;
    }
}

/* --- Footer Brand --- */
.footer-brand {
    background: var(--color-bg);
    overflow: hidden;
    text-align: center;
    padding: 0;
    line-height: 1;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-brand__text {
    display: block;
    font-size: clamp(3rem, 16vw, 18rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: #3a3d38;
    padding-bottom: 8px;
}

/* =========================================
   Login Sidebar
   ========================================= */

.login-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.login-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.login-sidebar {
    position: fixed;
    top: 30px;
    right: 30px;
    bottom: 30px;
    width: 400px;
    background: var(--color-bg);
    border-radius: 16px;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(calc(100% + 30px));
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

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

.login-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: var(--topbar-height);
    flex-shrink: 0;
}

.login-sidebar__heading {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.login-sidebar__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    transition: opacity 0.3s ease;
}

.login-sidebar__close:hover {
    opacity: 0.5;
}

.login-sidebar__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 40px 40px;
    overflow-y: auto;
}

.login-sidebar__brand {
    display: block;
    font-size: 2.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.06);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    line-height: 0.85;
    pointer-events: none;
    user-select: none;
    margin-bottom: 40px;
    white-space: nowrap;
}

.login-sidebar__brand::after {
    content: "BELLANOVA";
}

.login-sidebar__logo {
    display: block;
    width: 220px;
    height: auto;
    margin-bottom: 40px;
}

.login-sidebar__desc {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--color-text-light);
    margin-bottom: 36px;
}

.login-sidebar__error {
    font-size: 0.8rem;
    font-weight: 450;
    color: #c0392b;
    margin-bottom: 24px;
}

.login-sidebar__form {
    width: 100%;
}

.login-sidebar__field {
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 8px;
    margin-bottom: 24px;
}

.login-sidebar__field input {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    padding: 8px 0;
}

.login-sidebar__field input::placeholder {
    color: var(--color-text-light);
}

.login-sidebar__field input:-webkit-autofill,
.login-sidebar__field input:-webkit-autofill:hover,
.login-sidebar__field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--color-bg) inset;
    -webkit-text-fill-color: var(--color-text);
    transition: background-color 5000s ease-in-out 0s;
}

.login-sidebar__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.login-sidebar__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50px;
    padding: 10px 28px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3a3d38;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.login-sidebar__submit:hover {
    color: #000;
    border-color: #999;
}

.login-sidebar__submit svg {
    transition: transform 0.2s ease;
}

.login-sidebar__submit:hover svg {
    transform: translateX(3px);
}

.login-sidebar__links {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

.login-sidebar__links a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-light);
}

/* --- Login Sidebar Responsive --- */
@media (max-width: 900px) {
    .login-sidebar {
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-radius: 0;
        transform: translateX(100%);
    }

    .login-sidebar__header {
        padding: 0 24px;
    }

    .login-sidebar__body {
        padding: 0 24px;
    }
}

/* =========================================
   Portal Pages
   ========================================= */

.portal-page {
    min-height: calc(100vh - var(--topbar-height) - 200px);
    padding: 80px 0;
}

.portal-page__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.portal-page__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
}

.portal-page__empty {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* Portal bar */
.portal-bar {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 32px;
}

.portal-bar__count {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-light);
}

/* ── Pagine read-only mirror Odoo ──────────────────────────────────────── */
.odoo-ro-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #6a6f63;
    background: #eef0e9;
    border: 1px solid #dde0d4;
    border-radius: 50px;
    padding: 4px 12px;
    cursor: default;
}

.portal-page__lead {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--color-text-light);
    margin: 0 0 20px;
    max-width: 760px;
}

.pif-doc-dl {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #3a3d38;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 3px 9px;
    margin-right: 5px;
    transition: background 0.18s ease, color 0.18s ease;
}

.pif-doc-dl:hover {
    background: var(--color-text, #242821);
    color: #fff;
    border-color: transparent;
}

.portal-bar .portal-page__title {
    margin-bottom: 0;
}

.portal-bar__add {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: inherit;
    color: #3a3d38;
    text-decoration: none;
    background: #fff;
    padding: 8px 20px;
    border: 1px solid #bbb;
    border-radius: 50px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.portal-bar__add:hover {
    color: #000;
    border-color: #999;
}

/* Client toolbar: search + sort on one row */
.client-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 16px;
}

/* Client search — newsletter style */
.client-search {
    position: relative;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 4px;
    flex: 1;
    max-width: 320px;
}

.client-search__input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--color-text);
    padding: 8px 0;
}

.client-search__input::placeholder {
    color: var(--color-text-light);
}

.client-search__clear {
    font-size: 1.1rem;
    color: rgba(0, 0, 0, 0.4);
    text-decoration: none;
    line-height: 1;
    padding: 4px;
}

.client-search__clear:hover {
    color: var(--color-text);
}

/* Client sort bar */
.client-sort {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.client-sort__item {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(0, 0, 0, 0.5);
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.client-sort__item:hover {
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--color-text);
}

.client-sort__sep {
    color: rgba(0, 0, 0, 0.15);
    font-size: 0.8rem;
    align-self: center;
}

.client-sort__item.active {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}

.client-sort__filter {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    font-family: inherit;
}

/* Bulk action bar */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease;
    margin-bottom: 0;
    padding: 0 16px;
}

.bulk-bar--visible {
    opacity: 1;
    max-height: 60px;
    padding: 10px 16px;
    margin-bottom: 20px;
}

.bulk-bar__select-all {
    font-size: 0.78rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.bulk-bar__count {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.4);
}

.bulk-bar__delete {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    color: #d94040;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.bulk-bar__delete:hover {
    background: rgba(217, 64, 64, 0.06);
}

/* Client card list */
.client-list {
    display: flex;
    flex-direction: column;
}

.client-card {
    display: grid;
    grid-template-columns: 24px 40px 1.5fr 1fr 1.2fr auto auto auto auto;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.client-card a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.client-card a:hover {
    opacity: 0.7;
}

.client-card__check {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.client-card__check input {
    cursor: pointer;
}

.client-card__delete {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
}

.client-card__delete:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.client-card__duplicate {
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
}
.client-card__duplicate:hover {
    color: #2e7cb8;
    background: rgba(46, 124, 184, 0.06);
}

.client-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Client card newsletter */
.client-list--newsletter .client-card {
    grid-template-columns: 24px 40px 2fr 1fr auto auto;
}

/* Client card drag */
.client-list--drag .client-card {
    grid-template-columns: 24px 16px 40px 1.5fr 1fr 1.2fr auto auto auto auto;
}

.client-card__drag {
    color: var(--color-text-light);
    cursor: grab;
    display: flex;
    align-items: center;
}

.client-card__drag:active {
    cursor: grabbing;
}

.client-card.is-dragging {
    opacity: 0.4;
}

.client-card.drag-over {
    border-top: 2px solid var(--color-primary);
}

.client-card__initials {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #d4dccf;
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.client-card__initials--logo {
    background: #fff;
    border: 1px solid var(--color-border);
}

.client-card__initials--inactive {
    background: #d94040;
    color: #fff;
}

.msg-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: var(--color-text-light);
    text-decoration: none;
}

.msg-card__icon--unread {
    color: var(--color-green);
}

.client-card:has(.msg-card__icon) .client-card__name {
    font-weight: 400;
}

.msg-card--unread .client-card__name {
    font-weight: 600;
}

.client-card:has(.msg-card__icon):hover {
    background: rgba(0, 0, 0, 0.02);
}

.client-card__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.client-card__name-col {
    min-width: 0;
}

.client-card__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-card__location {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--color-text-light);
}

.client-card__meta {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--color-text-light);
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.client-card__label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 0, 0, 0.55);
}

/* Supplier card (no checkbox, inside form tabs) */
.client-list--suppliers .client-card {
    grid-template-columns: 40px minmax(120px, 1.5fr) minmax(80px, 1fr) minmax(80px, 1fr) minmax(80px, 1fr) 90px 32px;
}

/* Giacenza list */
.client-list--giacenza .client-card {
    grid-template-columns: 40px 1fr minmax(90px, 0.5fr) minmax(70px, 0.4fr) minmax(100px, 0.5fr);
}

.client-list--giacenza .client-card__meta {
    white-space: nowrap;
}

/* Lots list (inside materie-prime form) */
.client-list--lots .client-card {
    grid-template-columns: minmax(90px, 1.2fr) minmax(80px, 1fr) minmax(60px, 0.8fr) minmax(60px, 0.8fr) minmax(60px, 0.8fr) minmax(60px, 0.8fr) minmax(50px, 0.6fr) 56px;
}

/* Movements list (inside materie-prime form) */
.client-list--movements .client-card {
    grid-template-columns: minmax(80px, 1fr) minmax(100px, 1.2fr) minmax(80px, 1fr) minmax(80px, 1fr) minmax(80px, 1fr);
}

/* Movimenti list page */
.client-list--movimenti .client-card {
    grid-template-columns: minmax(80px, 0.8fr) minmax(100px, 1.5fr) minmax(80px, 1fr) minmax(60px, 0.7fr) minmax(60px, 0.7fr) minmax(70px, 0.8fr) minmax(80px, 1fr);
}

/* Inventory checks list */
.client-list--inv-checks .client-card {
    grid-template-columns: minmax(100px, 1.2fr) minmax(80px, 1fr) minmax(50px, 0.6fr) minmax(70px, 0.8fr) minmax(70px, 0.8fr) 32px;
}

/* Inventory items detail */
.client-list--inv-items .client-card {
    grid-template-columns: minmax(120px, 1.8fr) minmax(80px, 1fr) minmax(80px, 1fr) minmax(80px, 1fr) minmax(60px, 0.8fr);
}

/* ── Tracciabilità ── */

/* Status badges */
.trace-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.trace-badge--active   { background: #e8f5e3; color: #2d7a16; }
.trace-badge--exhausted { background: #f0f0f0; color: #777; }
.trace-badge--expired  { background: #fef3e0; color: #b37300; }
.trace-badge--danger   { background: #fdecea; color: #c62828; }
.trace-badge--draft    { background: #e8eaf6; color: #3949ab; }

/* Section titles */
.trace-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 2rem 0 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}
.trace-section-title:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.trace-section-count {
    font-size: 0.72rem;
    font-weight: 500;
    color: #888;
}

/* Info card (trace detail header) */
.trace-info-card {
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 0.5rem;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,0.08);
}
.trace-info-card__title {
    font-size: 0.72rem;
    font-weight: 600;
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
}
.trace-info-card__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem 2rem;
}
.trace-info-card__item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 0.85rem;
}

/* Back button */
.trace-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    margin-bottom: 1rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    color: #333;
    transition: background 0.15s;
}
.trace-back-btn:hover { background: #f5f5f5; }

/* Card grids for trace lists */
.client-list--trace-rm .client-card {
    grid-template-columns: minmax(90px, 0.8fr) minmax(120px, 1.5fr) minmax(80px, 1fr) minmax(80px, 0.8fr) minmax(60px, 0.6fr);
}
.client-list--trace-pf .client-card {
    grid-template-columns: minmax(90px, 0.8fr) minmax(140px, 1.8fr) minmax(60px, 0.5fr) minmax(70px, 0.7fr) minmax(60px, 0.6fr);
}
.client-list--trace-allocs .client-card {
    grid-template-columns: minmax(120px, 1.5fr) minmax(80px, 0.8fr) minmax(80px, 0.8fr) minmax(70px, 0.7fr);
}
.client-list--trace-movs .client-card {
    grid-template-columns: minmax(120px, 1.2fr) minmax(80px, 0.8fr) minmax(60px, 0.6fr) minmax(120px, 1.5fr);
}

/* Fornitori list page */
.client-list--fornitori .client-card {
    grid-template-columns: 24px 40px 1.5fr 1fr 1fr 1.2fr 80px 32px;
}

.client-list--fornitori.client-list--drag .client-card {
    grid-template-columns: 24px 16px 40px 1.5fr 1fr 1fr 1.2fr 80px 32px;
}

/* User card */
.user-card {
    grid-template-columns: 24px 40px 1.5fr minmax(80px, 0.7fr) minmax(80px, 1fr) minmax(70px, 0.6fr) minmax(70px, 0.6fr) 32px;
}

.user-card__name-col {
    cursor: pointer;
}

.user-card__initials--admin {
    background: #c9a84c;
    color: #1a1a1a;
}

.user-card__initials--operator {
    background: #4a90d9;
    color: #fff;
}

.user-card__initials--customer {
    background: #d4dccf;
    color: var(--color-text);
}

.user-card__role {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.user-card__role--admin {
    background: rgba(55, 183, 22, 0.12);
    color: #2a8c11;
}

.user-card__role--operator {
    background: rgba(74, 144, 217, 0.12);
    color: #3570a8;
}

.user-card__role--customer {
    background: rgba(0, 0, 0, 0.06);
    color: var(--color-text-light);
}

.user-card__status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.user-card__status--active {
    background: #37b716;
}

.user-card__status--inactive {
    background: #aaa;
}

.user-card__status--pending {
    background: #e6a817;
}

/* Profile page */
.profile__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.profile__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.profile__header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.profile__name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.profile__edit-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #3a3d38;
    background: #fff;
    padding: 8px 20px;
    border: 1px solid #bbb;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.profile__edit-btn:hover {
    color: #000;
    border-color: #999;
}

/* Coming soon placeholder */
.portal-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px;
    gap: 12px;
}

.portal-coming-soon__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.portal-coming-soon__text {
    font-size: 0.875rem;
    color: var(--color-text-light);
    max-width: 400px;
    line-height: 1.6;
}

.profile__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.profile__section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.35);
    margin-top: 32px;
    padding-bottom: 10px;
}

.profile__link {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    transition: border-color 0.2s ease;
}

.profile__link:hover {
    border-color: var(--color-text);
}

.profile__avatar--company {
    background: #d4dccf;
    color: var(--color-text);
}

.profile__avatar--logo {
    background: #fff;
    border: 1px solid var(--color-border);
}

.profile__avatar--logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.profile__section-add {
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    color: #3a3d38;
    cursor: pointer;
    padding: 5px 14px;
    margin-left: 8px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.profile__section-add:hover {
    color: #000;
    border-color: #999;
}

.profile__empty {
    font-size: 0.8rem;
    color: var(--color-text-light);
    padding: 14px 0;
}

.profile__row {
    display: flex;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}

.profile__row--actions {
    gap: 12px;
}

.profile__row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.profile__row-btn {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s ease, background 0.2s ease;
    font-size: 0.75rem;
}

.profile__row-btn:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.04);
}

.profile__row-btn--delete:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.profile__row:last-child {
    border-bottom: none;
}

.profile__label {
    width: 160px;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 0, 0, 0.45);
}

.profile__value {
    font-size: 0.875rem;
    color: var(--color-text);
}

@media (max-width: 600px) {
    .profile__header {
        flex-wrap: wrap;
    }

    .profile__edit-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .profile__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 0;
    }

    .profile__label {
        width: auto;
    }
}

.user-form__error {
    color: #d94040;
    font-size: 0.8rem;
    margin: 8px 0 0;
}

@media (max-width: 900px) {
    .user-card {
        grid-template-columns: 24px 40px 1fr auto;
    }
}

/* Entry animation (disabled for admin pages) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.anim-fadeIn {
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--color-text-light);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.pagination__btn:hover:not([disabled]) {
    border-color: rgba(0, 0, 0, 0.2);
    color: var(--color-text);
}

.pagination__btn[disabled] {
    opacity: 0.35;
    pointer-events: none;
}

.pagination__select {
    height: 36px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
    background: #fff;
    cursor: pointer;
}

.pagination__label {
    font-size: 0.8rem;
    color: var(--color-text-light);
}

@media (max-width: 900px) {
    .portal-page__inner {
        padding: 0 24px;
    }

    .client-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .client-search {
        max-width: none;
    }

    .client-card {
        grid-template-columns: 24px 40px 1fr auto;
        gap: 10px;
    }

    .client-list--drag .client-card {
        grid-template-columns: 24px 16px 40px 1fr auto;
    }

    .client-list--newsletter .client-card {
        grid-template-columns: 24px 40px 1fr auto;
    }

    .client-list--suppliers .client-card {
        grid-template-columns: 40px 1fr auto;
    }

    .client-list--fornitori .client-card,
    .client-list--fornitori.client-list--drag .client-card {
        grid-template-columns: 24px 40px 1fr auto;
    }

    .client-list--giacenza .client-card {
        grid-template-columns: 40px 1fr auto;
    }

    .client-list--lots .client-card {
        grid-template-columns: 1fr 1fr;
    }

    .client-list--lots .client-card__meta {
        display: flex;
    }

    .client-list--movements .client-card {
        grid-template-columns: 1fr 1fr;
    }

    .client-list--movements .client-card__meta {
        display: flex;
    }

    .client-list--movimenti .client-card {
        grid-template-columns: 1fr 1fr;
    }

    .client-list--movimenti .client-card__meta {
        display: flex;
    }

    .client-list--inv-checks .client-card {
        grid-template-columns: 1fr 1fr;
    }

    .client-list--inv-checks .client-card__meta {
        display: flex;
    }

    .client-list--inv-items .client-card {
        grid-template-columns: 1fr 1fr;
    }

    .client-list--inv-items .client-card__meta {
        display: flex;
    }

    .client-list--trace-rm .client-card,
    .client-list--trace-pf .client-card,
    .client-list--trace-allocs .client-card,
    .client-list--trace-movs .client-card {
        grid-template-columns: 1fr 1fr;
    }

    .client-list--trace-rm .client-card__meta,
    .client-list--trace-pf .client-card__meta,
    .client-list--trace-allocs .client-card__meta,
    .client-list--trace-movs .client-card__meta {
        display: flex;
    }

    .trace-info-card__grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem 1rem;
    }

    .client-card__meta {
        display: none;
    }
}

/* Client form */
.portal-page__inner--form {
    max-width: 1000px;
}

.portal-page__inner--wide {
    max-width: 1200px;
}

.portal-page__inner--wide {
    max-width: 1200px;
}

/* Professional theme: wider layout, less padding */
.theme-professional .portal-page {
    padding: 32px 0;
}
.theme-professional .portal-page__inner {
    max-width: 1600px;
}
.theme-professional .portal-page__inner--form {
    max-width: 1000px;
}
.theme-professional .portal-page__title {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}
.theme-professional .cf-tabs__item {
    padding: 10px 20px;
    font-size: 0.78rem;
}
.theme-professional .portal-bar__count {
    font-size: 0.72rem;
}

.portal-bar__back {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #3a3d38;
    text-decoration: none;
    background: #fff;
    padding: 8px 20px;
    border: 1px solid #bbb;
    border-radius: 50px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.portal-bar__back:hover {
    color: #000;
    border-color: #999;
}

button.portal-bar__back {
    font-family: inherit;
    cursor: pointer;
}

.portal-bar__back.msg-action-btn--danger:hover {
    color: #dc3545;
    border-color: #dc3545;
}

.form-errors {
    background: rgba(217, 64, 64, 0.06);
    border-left: 3px solid #d94040;
    padding: 14px 20px;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.form-errors p {
    font-size: 0.82rem;
    color: #d94040;
    margin-bottom: 4px;
}

.form-errors p:last-child {
    margin-bottom: 0;
}

.cf__section {
    border: none;
    padding: 0;
    margin: 0 0 40px;
}

.cf__legend {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 20px;
}

.cf__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 30px;
}
.cf__grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}
.cf__grid + .cf__grid {
    margin-top: 24px;
}

.cf__field {
    display: flex;
    flex-direction: column;
}

.cf__field--full {
    grid-column: 1 / -1;
}

.cf__label {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: 6px;
}

.cf__input,
.cf__input-file {
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    padding: 10px 0;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--color-text);
    outline: none;
    transition: border-color 0.2s ease;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.cf__input:focus {
    border-color: var(--color-text);
}

.cf__input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

/* Password toggle */
.pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pw-wrap input {
    flex: 1;
    padding-right: 32px;
}

.pw-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: rgba(0, 0, 0, 0.35);
    line-height: 0;
    transition: color 0.2s;
}

.pw-toggle:hover {
    color: var(--color-text);
}

select.cf__input {
    cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right center;
    padding-right: 20px;
}

.cf__input-file {
    font-size: 0.8rem;
    color: var(--color-text-light);
    padding: 12px 0;
    cursor: pointer;
}

textarea.cf__input {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
    font-family: inherit;
}

.cf__lang-label {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cf__lang-label .cf__lang-flag {
    font-size: 1.1rem;
}

/* Language tabs (inline in form) */
.cf-lang-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 24px;
}

.cf-lang-tabs__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    margin-bottom: -1px;
}

.cf-lang-tabs__item:hover {
    color: var(--color-text);
}

.cf-lang-tabs__item.active {
    color: var(--color-text);
    border-bottom-color: var(--color-text);
}

.cf-lang-tabs__flag {
    font-size: 1rem;
}

.cf-lang-panel {
    display: none;
}

.cf-lang-panel--active {
    display: block;
}

.cf-lang-tabs--modal {
    margin-bottom: 10px;
}

.cf-lang-tabs--modal .cf-lang-tabs__item {
    padding: 8px 14px;
    font-size: 0.72rem;
}

/* Quill editor */
.cf-quill {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    min-height: 120px;
}

.cf-quill .ql-toolbar {
    border: none;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
}

.cf-quill .ql-container {
    border: none;
    font-family: inherit;
    font-size: 0.88rem;
}

.cf-quill .ql-editor {
    padding: 12px 8px;
    min-height: 80px;
}

.cf-quill .ql-editor.ql-blank::before {
    color: rgba(0, 0, 0, 0.3);
    font-style: normal;
}

.cf__logo-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.cf__logo-preview img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.cf__logo-remove {
    font-size: 0.78rem;
    color: var(--color-text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Dropzone */
.cf__dropzone {
    position: relative;
    border: 1.5px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cf__dropzone:hover,
.cf__dropzone--over {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.015);
}

.cf__dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    pointer-events: none;
}

.cf__dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(0, 0, 0, 0.35);
}

.cf__dropzone-text {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.5);
}

.cf__dropzone-text em {
    font-style: normal;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cf__dropzone-hint {
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.3);
}

.cf__dropzone-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: center;
}

.cf__dropzone-preview img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.cf__dropzone-filename {
    font-size: 0.82rem;
    color: var(--color-text-light);
}

.cf__dropzone-remove {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: rgba(0, 0, 0, 0.4);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s ease;
}

.cf__dropzone-remove:hover {
    color: var(--color-text);
}

.cf__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.cf__cancel {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #3a3d38;
    text-decoration: none;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50px;
    padding: 10px 28px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cf__cancel:hover {
    color: #000;
    border-color: #999;
}

.cf__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3a3d38;
    cursor: pointer;
    padding: 10px 28px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cf__submit:hover {
    color: #000;
    border-color: #999;
}

.cf__submit svg {
    transition: transform 0.2s ease;
}

.cf__submit:hover svg {
    transform: translateX(3px);
}

@media (max-width: 600px) {
    .cf__grid {
        grid-template-columns: 1fr;
    }

    .cf__actions {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 12px;
    }

    .cf__submit {
        justify-content: center;
    }

    .cf__cancel {
        text-align: center;
    }
}

/* --- Client Detail Tabs --- */
.cf-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 40px;
    overflow-x: auto;
    overflow-y: hidden;
}

.cf-tabs__item {
    padding: 12px 24px;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.4);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -1px;
}

.cf-tabs__item:hover {
    color: var(--color-text);
}

.cf-tabs__item.active {
    color: var(--color-text);
    border-bottom-color: var(--color-text);
}

.cf-tabs__badge {
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.45);
    padding: 2px 8px;
    border-radius: 10px;
}

/* --- Summary (Riepilogo) --- */
.cf-summary__header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.cf-summary__logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    flex-shrink: 0;
}

.cf-summary__logo--initials {
    background: #d4dccf;
    color: var(--color-text);
}

.cf-summary__logo--image {
    background: #fff;
    border: 1px solid var(--color-border);
}

.cf-summary__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 14px;
}

.cf-summary__info {
    min-width: 0;
}

.cf-summary__name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.cf-summary__status {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.cf-summary__status--active {
    background: rgba(55, 183, 22, 0.1);
    color: var(--color-primary);
}

.cf-summary__status--inactive {
    background: rgba(217, 64, 64, 0.08);
    color: #d94040;
}

.cf-summary__section {
    margin-bottom: 36px;
}

.cf-summary__section-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

.cf-summary__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 30px;
}

.cf-summary__field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cf-summary__label {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.45);
}

.cf-summary__value {
    font-size: 0.88rem;
    color: var(--color-text);
}

.cf-summary__value--empty {
    color: rgba(0, 0, 0, 0.25);
    font-style: italic;
}

.cf-summary__stats {
    display: flex;
    gap: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
    margin-top: 8px;
}

.cf-summary__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* --- Address Cards --- */
.cf-addr-list {
    display: flex;
    flex-direction: column;
}

.cf-addr-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
}

.cf-addr-card__info {
    flex: 1;
    min-width: 0;
}

.cf-addr-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.cf-addr-card__label {
    font-size: 0.88rem;
    font-weight: 600;
}

.cf-addr-card__default {
    font-size: 0.62rem;
    font-weight: 600;
    background: rgba(55, 183, 22, 0.1);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cf-addr-card__line {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.55);
    line-height: 1.5;
}

.cf-addr-card__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.cf-addr-card__btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--color-text);
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-addr-card__btn:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.04);
}

.cf-addr-card__btn--delete:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.cf-addr-card__btn--star:hover {
    color: #d4a017;
    background: rgba(212, 160, 23, 0.06);
}

/* --- User Cards --- */
.cf-user-list {
    display: flex;
    flex-direction: column;
}

.cf-user-card {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.cf-user-card__name {
    font-size: 0.88rem;
    font-weight: 600;
}

.cf-user-card__email {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.55);
}

.cf-user-card__phone {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.55);
}

.cf-user-card__status {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cf-user-card__status--active {
    background: rgba(55, 183, 22, 0.1);
    color: var(--color-primary);
}

.cf-user-card__status--inactive {
    background: rgba(217, 64, 64, 0.08);
    color: #d94040;
}

.cf-user-card__status--pending {
    background: rgba(212, 160, 23, 0.1);
    color: #b8860b;
}

.cf-user-card__login {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.35);
}

/* Shared toolbar for tabs */
.cf-tab-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.cf-tab-toolbar__count {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.4);
}

.cf-tab-toolbar__add {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: #3a3d38;
    text-decoration: none;
    background: #fff;
    border: 1px solid #bbb;
    cursor: pointer;
    font-family: inherit;
    padding: 8px 20px;
    border-radius: 50px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cf-tab-toolbar__add:hover {
    color: #000;
    border-color: #999;
}

/* Empty state */
.cf-tab-empty {
    text-align: center;
    padding: 48px 0;
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.88rem;
}

.cf-tab-hint {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.45);
    margin: 0 0 12px;
    line-height: 1.5;
}

/* --- Settings Cards (Languages, Currencies) --- */
.cf-settings-list {
    display: flex;
    flex-direction: column;
}

.cf-settings-card {
    display: grid;
    grid-template-columns: 40px 60px 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
    transition: opacity 0.2s ease, background 0.2s ease;
}

.cf-settings-list--drag .cf-settings-card {
    grid-template-columns: 24px 40px 60px 1fr auto auto;
}

.cf-settings-list--bulk .cf-settings-card {
    grid-template-columns: 24px 40px 60px 1fr auto auto;
}

.cf-settings-list--bulk.cf-settings-list--drag .cf-settings-card {
    grid-template-columns: 24px 24px 40px 60px 1fr auto auto;
}

.cf-settings-card__check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cf-settings-card__check input[type="checkbox"] {
    cursor: pointer;
}

.cf-settings-card__drag {
    cursor: grab;
    color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
}

.cf-settings-card__drag:active {
    cursor: grabbing;
}

.cf-settings-card__drag:hover {
    color: rgba(0, 0, 0, 0.5);
}

.cf-settings-card.is-dragging {
    opacity: 0.3;
}

.cf-settings-card.drag-over {
    background: rgba(55, 183, 22, 0.04);
}

.cf-settings-card__flag {
    font-size: 1.4rem;
    text-align: center;
    line-height: 1;
}

.cf-settings-card__code {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 0, 0, 0.55);
}

.cf-settings-card__name {
    font-size: 0.88rem;
    font-weight: 600;
}

.cf-settings-card__status {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cf-settings-card__status--active {
    background: rgba(55, 183, 22, 0.1);
    color: var(--color-primary);
}

.cf-settings-card__status--inactive {
    background: rgba(217, 64, 64, 0.08);
    color: #d94040;
}

@media (max-width: 600px) {
    .cf-settings-card {
        grid-template-columns: 32px 1fr auto auto;
    }

    .cf-settings-list--drag .cf-settings-card,
    .cf-settings-list--bulk .cf-settings-card {
        grid-template-columns: 24px 32px 1fr auto auto;
    }

    .cf-settings-list--bulk.cf-settings-list--drag .cf-settings-card {
        grid-template-columns: 24px 24px 32px 1fr auto auto;
    }

    .cf-settings-card__code {
        display: none;
    }
}

/* Draft status badge */
.cf-summary__status--draft,
.cf-user-card__status--draft {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.5);
}

/* Gallery grid */
.cf-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.cf-gallery-item {
    position: relative;
    border-radius: 10px;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-border);
}

.cf-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cf-gallery-item__remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 1rem;
    line-height: 1;
}

.cf-gallery-item:hover .cf-gallery-item__remove {
    opacity: 1;
}

.cf-gallery-item--dragging {
    opacity: 0.4;
}

.cf-gallery-item[draggable="true"] {
    cursor: grab;
}

.cf-gallery-item[draggable="true"]:active {
    cursor: grabbing;
}

/* Gallery dropzone */
.cf-gallery-dropzone {
    position: relative;
    min-height: 120px;
    border-radius: 12px;
    transition: background 0.2s ease;
}

.cf-gallery-dropzone--active {
    background: rgba(55, 183, 22, 0.06);
    outline: 2px dashed var(--color-primary);
    outline-offset: -2px;
}

.cf-gallery-dropzone__hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 32px 20px;
    border: 1.5px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    color: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.cf-gallery-dropzone__hint:hover {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.015);
}

.cf-gallery-dropzone__text {
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.5);
}

.cf-gallery-dropzone__text em {
    font-style: normal;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cf-gallery-dropzone__formats {
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.3);
}

.cf-gallery-dropzone--active .cf-gallery-dropzone__hint {
    border-color: var(--color-primary);
    background: rgba(55, 183, 22, 0.04);
}

.cf-gallery-dropzone--active .cf-gallery-dropzone__hint svg,
.cf-gallery-dropzone--active .cf-gallery-dropzone__text {
    color: var(--color-primary);
}

.cf-gallery-dropzone__hint--compact {
    padding: 20px;
    gap: 6px;
    margin-top: 12px;
    opacity: 0.5;
}
.cf-gallery-dropzone__hint--compact:hover {
    opacity: 1;
}
.cf-gallery-dropzone__hint--compact .cf-gallery-dropzone__formats {
    display: none;
}

/* Document list */
.cf-doc-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.cf-doc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px 16px;
    border-radius: 10px;
    background: var(--color-border);
    text-align: center;
    min-height: 100px;
}

.cf-doc-card__icon {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.06);
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.cf-doc-card__info {
    min-width: 0;
    width: 100%;
}

.cf-doc-card__name {
    font-size: 0.8rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-doc-card__size {
    font-size: 0.68rem;
    color: rgba(0, 0, 0, 0.4);
    margin-top: 2px;
}

.cf-doc-card__actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cf-doc-card:hover .cf-doc-card__actions {
    opacity: 1;
}

.cf-doc-card__btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s ease;
}

.cf-doc-card__btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* ── Variant cards ── */
.cf-variant-card {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 16px;
    background: #fff;
    overflow: hidden;
}

.cf-variant-card.is-dragging {
    opacity: 0.3;
}

.cf-variant-card.drag-over {
    border-color: var(--color-primary);
    background: rgba(55, 183, 22, 0.02);
}

.cf-variant-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
}

.cf-variant-header__drag {
    cursor: grab;
    color: rgba(0, 0, 0, 0.25);
    transition: color 0.2s;
    flex-shrink: 0;
}

.cf-variant-header__drag:hover {
    color: rgba(0, 0, 0, 0.5);
}

.cf-variant-header__info {
    flex: 1;
    font-size: 0.85rem;
    color: var(--color-text);
}

.cf-variant-sku {
    color: rgba(0, 0, 0, 0.4);
    font-size: 0.75rem;
    margin-left: 8px;
    font-weight: 400;
}

.cf-variant-tiers {
    padding: 0 16px 12px;
}

.cf-variant-tiers__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.cf-variant-tiers__table th {
    text-align: left;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.45);
    padding: 10px 6px 6px;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.cf-variant-tiers__table td {
    padding: 4px 4px;
}

.cf-variant-tiers__input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.75rem;
    font-family: inherit;
    background: var(--color-bg);
    transition: border-color 0.2s;
    -moz-appearance: textfield;
}

.cf-variant-tiers__input::-webkit-outer-spin-button,
.cf-variant-tiers__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cf-variant-tiers__input:focus {
    border-color: var(--color-text);
    outline: none;
}

.cf-variant-tiers__remove {
    border: none;
    background: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.25);
    font-size: 1.1rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.cf-variant-tiers__remove:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.cf-variant-tiers__add {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 8px 0;
    font-family: inherit;
    transition: opacity 0.2s;
}

.cf-variant-tiers__add:hover {
    opacity: 0.7;
}

/* Pricing tab */
.cf-pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.cf-pricing-table th {
    text-align: left;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.45);
    padding: 10px 8px 8px;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.cf-pricing-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.cf-pricing-table__variant {
    font-weight: 500;
    white-space: nowrap;
}

.cf-pricing-table__cost {
    color: rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.cf-pricing-table__price {
    font-weight: 600;
    white-space: nowrap;
}

.cf-pricing-table select,
.cf-pricing-table input[type="number"] {
    font-size: 0.82rem;
    padding: 6px 8px;
    min-width: 80px;
}

/* Guide tab */
.cf-guide {
    max-width: 720px;
}

.cf-guide__title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
}

.cf-guide__section {
    margin-bottom: 24px;
}

.cf-guide__section h3 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.cf-guide__section p,
.cf-guide__example p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.cf-guide__example {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.cf-guide__example h3 {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.cf-guide__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin: 12px 0;
}

.cf-guide__table th {
    text-align: left;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}

.cf-guide__table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}

.cf-guide__note {
    margin-top: 10px;
    font-size: 0.8rem !important;
    font-style: italic;
}

.cf-guide__list {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

@media (max-width: 600px) {
    .cf-tabs {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .cf-tabs__item {
        flex: 1;
        text-align: center;
        white-space: nowrap;
        padding: 12px 8px;
        font-size: 0.7rem;
    }

    .cf-summary__grid {
        grid-template-columns: 1fr;
    }

    .cf-summary__stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    .cf-user-card {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
}

/* --- Confirm Dialog --- */
/* --- Confirm Sidebar (login-sidebar style) --- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.confirm-overlay--visible {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    position: fixed;
    top: 30px;
    right: 30px;
    bottom: 30px;
    width: 400px;
    background: var(--color-bg);
    border-radius: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(calc(100% + 30px));
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
}

.confirm-dialog.confirm-overlay--visible {
    transform: translateX(0);
}

.confirm-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: var(--topbar-height);
    flex-shrink: 0;
}

.confirm-dialog__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    transition: opacity 0.3s ease;
}

.confirm-dialog__close:hover {
    opacity: 0.5;
}

.confirm-dialog__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px 40px 40px;
    overflow-y: auto;
}

.confirm-dialog__body .cf__grid {
    grid-template-columns: 1fr;
}

.confirm-dialog__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(217, 64, 64, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: #d94040;
}
.confirm-dialog__icon--duplicate {
    background: rgba(46, 124, 184, 0.08);
    color: #2e7cb8;
}
.confirm-dialog__icon--save {
    background: rgba(55, 183, 22, 0.08);
    color: var(--color-green);
}
.confirm-dialog__icon--info {
    background: rgba(46, 124, 184, 0.08);
    color: #2e7cb8;
}

.confirm-dialog__title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

.confirm-dialog__text {
    font-size: 0.82rem;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.55;
    margin-bottom: 28px;
}

.confirm-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    margin-top: auto;
}

.confirm-dialog__cancel {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--color-text-light);
    padding: 10px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.confirm-dialog__cancel:hover {
    color: var(--color-text);
}

.confirm-dialog__confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #bbb;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    color: #3a3d38;
    padding: 10px 28px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.confirm-dialog__confirm svg {
    transition: transform 0.2s ease;
}

.confirm-dialog__confirm:hover {
    color: #d94040;
    border-color: #d94040;
}

.confirm-dialog__confirm:hover svg {
    transform: translateX(3px);
}

.confirm-dialog__confirm--save:hover {
    color: #000;
    border-color: #999;
}

@media (max-width: 900px) {
    .confirm-dialog {
        top: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        border-radius: 0;
        transform: translateX(100%);
    }

    .confirm-dialog__header {
        padding: 0 24px;
    }

    .confirm-dialog__body {
        padding: 0 24px 24px;
    }
}

/* --- Footer Responsive --- */
@media (max-width: 900px) {
    .footer__inner {
        padding: 0 24px;
    }

    .footer__top {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer__col {
        padding: 0 0 0 0;
    }

    .footer__col--border {
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-left: 0;
        padding-top: 32px;
    }

    .footer__bottom {
        flex-wrap: wrap;
        gap: 16px;
    }

    .footer__copy {
        margin-left: 0;
        width: 100%;
        padding-top: 8px;
    }
}

/* --- Production Line Cost Bar --- */
.pl-cost-bar {
    background: var(--color-primary);
    color: #fff;
    border-radius: 10px;
    padding: 0;
    margin-bottom: 24px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.pl-cost-bar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 24px;
}

.pl-cost-bar__item + .pl-cost-bar__item {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.pl-cost-bar__label {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.55;
}

.pl-cost-bar__value {
    font-weight: 700;
    font-size: 1.05rem;
}

@media (max-width: 600px) {
    .pl-cost-bar {
        flex-wrap: wrap;
    }
    .pl-cost-bar__item {
        min-width: 50%;
    }
}

/* --- Production Line Material Cards --- */
.pl-material-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.pl-material-card__drag-handle {
    color: var(--color-text-light);
    cursor: grab;
    display: flex;
    align-items: center;
    opacity: 0.4;
    transition: opacity 0.15s;
}

.pl-material-card__drag-handle:hover {
    opacity: 0.8;
}

.pl-material-card__drag-handle:active {
    cursor: grabbing;
}

.pl-material-card.is-dragging {
    opacity: 0.3;
}

.pl-material-card.drag-over {
    border-top: 2px solid var(--color-primary);
}

.pl-material-card__info {
    flex: 1;
    min-width: 0;
}

.pl-material-card__title {
    font-size: 0.88rem;
    font-weight: 600;
}

.pl-material-card__meta {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.45);
    margin-top: 2px;
}

.pl-material-card__qty {
    width: 110px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pl-material-card__qty input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.8rem;
    font-family: inherit;
    background: var(--color-bg);
    text-align: right;
    -moz-appearance: textfield;
}

.pl-material-card__qty input::-webkit-outer-spin-button,
.pl-material-card__qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pl-material-card__qty input:focus {
    border-color: var(--color-text);
    outline: none;
}

.pl-material-card__cost {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.5);
    min-width: 80px;
    text-align: right;
}

.pl-material-card__actions {
    display: flex;
    gap: 4px;
}

.pl-material-card__btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

.pl-material-card__btn:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.pl-subtotal {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    font-size: 0.85rem;
    font-weight: 600;
    border-top: 1px solid var(--color-border);
    margin-top: 8px;
}

.pl-subtotal__label {
    color: rgba(0, 0, 0, 0.5);
    font-weight: 400;
}
.pl-subtotal__sep {
    color: rgba(0, 0, 0, 0.25);
    font-weight: 400;
    font-size: 0.8rem;
}

/* --- Raw Material Unit Price --- */
.rm-unit-price {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--color-green);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}
.rm-unit-price__label {
    opacity: 0.85;
    font-weight: 400;
}

/* --- Production Line Cost Rows --- */
.pl-cost-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}

.pl-cost-row__label {
    flex: 1;
}

.pl-cost-row__label input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: inherit;
    background: var(--color-bg);
}

.pl-cost-row__label input:focus {
    border-color: var(--color-text);
    outline: none;
}

.pl-cost-row__amount {
    width: 120px;
}

.pl-cost-row__amount input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: inherit;
    background: var(--color-bg);
    text-align: right;
    -moz-appearance: textfield;
}

.pl-cost-row__amount input::-webkit-outer-spin-button,
.pl-cost-row__amount input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pl-cost-row__amount input:focus {
    border-color: var(--color-text);
    outline: none;
}

.pl-cost-row__btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
}

.pl-cost-row__btn:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.pl-cost-row__btn-spacer {
    width: 26px;
}

.pl-cost-row__markup {
    width: 90px;
}

.pl-cost-row__markup input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-family: inherit;
    background: var(--color-bg);
    text-align: right;
    -moz-appearance: textfield;
}

.pl-cost-row__markup input::-webkit-outer-spin-button,
.pl-cost-row__markup input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pl-cost-row__markup input:focus {
    border-color: var(--color-text);
    outline: none;
}

.pl-cost-row__revenue {
    width: 100px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 500;
}

.pl-cost-row--header {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(0,0,0,0.45);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 6px;
}

.pl-cost-row--header .pl-cost-row__revenue {
    font-weight: 500;
    font-size: 0.72rem;
}

/* ── Production Line Items ── */
.pl-line-item {
    background: #fff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.pl-line-item__header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.pl-line-item__title {
    font-weight: 600;
    font-size: 0.95rem;
}

.pl-line-item__title small {
    font-weight: 400;
    color: rgba(0, 0, 0, 0.45);
}

.pl-line-item__meta {
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.4);
}

.pl-line-item__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.pl-line-item__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pl-line-item__field--hidden {
    display: none;
}

.pl-line-item__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(0, 0, 0, 0.4);
    font-weight: 500;
}

.pl-line-item__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.5);
}

.pl-line-item__summary strong {
    color: rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

.pl-line-item__summary .pl-material-card__btn {
    margin-left: auto;
}

.pl-line-item__client-price {
    background: rgba(0, 0, 0, 0.04);
    color: rgba(0, 0, 0, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}
.pl-line-item__client-price--warn {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}

/* ── Production Line Timeline / Gantt ── */
/* View toggle */
.pl-gantt-view-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
}
.pl-gantt-view-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--color-border);
    background: #fff;
    color: #9e9790;
    cursor: pointer;
    transition: all 0.15s;
}
.pl-gantt-view-btn:first-child {
    border-radius: 6px 0 0 6px;
}
.pl-gantt-view-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}
.pl-gantt-view-btn--active {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}
.pl-gantt-view-btn:not(.pl-gantt-view-btn--active):hover {
    background: var(--color-bg);
}

.pl-gantt-wrap {
    background: #fff;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}
.pl-gantt-scroll {
    overflow-x: auto;
}
.pl-gantt {
    min-width: 900px;
}
.pl-gantt__header {
    display: flex;
    border-bottom: 1.5px solid var(--color-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 5;
}
.pl-gantt__label-col {
    width: 260px;
    min-width: 260px;
    padding: 10px 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9e9790;
    border-right: 1.5px solid var(--color-border);
    display: flex;
    align-items: flex-end;
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
}
.pl-gantt__grid-header {
    display: flex;
    flex-direction: column;
}
.pl-gantt__months-row {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}
.pl-gantt__month-header {
    font-weight: 700;
    font-size: 10px;
    padding: 4px 8px;
    border-right: 1px solid var(--color-border);
    white-space: nowrap;
    color: #6b6560;
    box-sizing: border-box;
}
.pl-gantt__days-row {
    display: flex;
}
.pl-gantt__day-header {
    width: 32px;
    min-width: 32px;
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    color: #9e9790;
    padding: 3px 0;
    border-right: 1px solid rgba(0,0,0,0.04);
    box-sizing: border-box;
}
.pl-gantt__day-header--week {
    width: auto;
    min-width: 0;
    border-right: 1.5px solid rgba(0,0,0,0.08);
    font-size: 10px;
}
.pl-gantt__day-header--weekend {
    background: rgba(0,0,0,0.025);
    color: #c0b8b0;
}
.pl-gantt__day-header--today {
    background: rgba(55, 183, 22, 0.1);
    color: var(--color-green);
    font-weight: 700;
}

/* Rows */
.pl-gantt__rows {
    position: relative;
}
.pl-gantt__row {
    display: flex;
    border-bottom: 1px solid var(--color-border);
}
.pl-gantt__row:last-child {
    border-bottom: none;
}
.pl-gantt__row:hover {
    background: rgba(0,0,0,0.015);
}
.pl-gantt__row:hover .pl-gantt__row-label {
    background: #f7f6f5;
}
.pl-gantt__row-label {
    width: 260px;
    min-width: 260px;
    padding: 14px 20px;
    border-right: 1.5px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}
.pl-gantt__row-av {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.pl-gantt__row-av--round {
    border-radius: 50%;
}
.pl-gantt__row-info {
    flex: 1;
    min-width: 0;
}
.pl-gantt__row-name {
    font-size: 13px;
    font-weight: 700;
}
.pl-gantt__row-sub {
    font-size: 10.5px;
    color: #9e9790;
    margin-top: 1px;
}
.pl-gantt__row-grid {
    position: relative;
    min-height: 50px;
    overflow: visible;
}

/* Bars */
.pl-gantt__bar {
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    cursor: default;
    overflow: hidden;
    white-space: nowrap;
    min-width: 30px;
}
.pl-gantt__bar-prog {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 6px;
}
.pl-gantt__bar span {
    position: relative;
    z-index: 1;
}

/* Bar wrap */
.pl-gantt__bar-wrap {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.pl-gantt__bar-wrap--draggable {
    cursor: grab;
}
.pl-gantt__bar-wrap--dragging {
    cursor: grabbing;
    opacity: 0.85;
    z-index: 10;
}
.pl-gantt__bar-wrap--cascade {
    transition: left 0.1s ease;
}
.pl-gantt__bar--segment {
    height: 26px;
    pointer-events: none;
}

/* Grid column overlays */
.pl-gantt__col {
    position: absolute;
    top: 0;
    bottom: 0;
    border-right: 1px solid rgba(0,0,0,0.05);
}
.pl-gantt__col--weekend {
    background: rgba(0,0,0,0.03);
}
.pl-gantt__col--today {
    background: rgba(55, 183, 22, 0.05);
}

/* Today line */
.pl-gantt__today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #c0392b;
    z-index: 1;
    opacity: 0.5;
    pointer-events: none;
}
.pl-gantt__today-label {
    position: absolute;
    top: -18px;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: 700;
    color: #c0392b;
    white-space: nowrap;
}

/* Weekend columns in grid */
.pl-gantt__weekend-col {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    background: rgba(0,0,0,0.02);
    pointer-events: none;
}

/* SVG dependency overlay */
.pl-gantt__dep-overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 3;
    overflow: visible;
}

/* Milestone */
.pl-gantt__milestone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #c0392b;
    border-radius: 2px;
    z-index: 3;
}
.pl-gantt__milestone-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 700;
    color: #c0392b;
    white-space: nowrap;
    padding-left: 20px;
}

/* Dependency badge */
.pl-gantt__dep-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #2e7cb8;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(46,124,184,0.08);
    border: 1px solid rgba(46,124,184,0.2);
}
.pl-gantt__dep-badge svg {
    width: 10px;
    height: 10px;
}

/* Empty state */
.pl-gantt__empty {
    padding: 48px 24px;
    text-align: center;
    color: #9e9790;
    font-size: 14px;
}

/* Tooltip (floating, appended to body) */
.pl-gantt-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 11px;
    font-family: var(--font-body);
    line-height: 1.6;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity .15s;
}
.pl-gantt-tooltip--visible {
    opacity: 1;
}
.pl-gantt-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
}
.pl-gantt-tooltip--above::after {
    top: 100%;
    border-top-color: #1a1a1a;
}
.pl-gantt-tooltip--below::after {
    bottom: 100%;
    border-bottom-color: #1a1a1a;
}
.pl-gantt-tooltip__title {
    font-weight: 700;
    font-size: 12px;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}
.pl-gantt-tooltip__row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.pl-gantt-tooltip__label {
    color: rgba(255,255,255,0.5);
}
.pl-gantt-tooltip__val {
    font-weight: 600;
    text-align: right;
}

@media (max-width: 768px) {
    .pl-gantt__label-col,
    .pl-gantt__row-label {
        width: 180px;
        min-width: 180px;
        padding: 10px 12px;
    }
    .pl-gantt__row-name { font-size: 12px; }
    .pl-gantt__row-sub { font-size: 9.5px; }
}

/* ── Multi-Line Timeline (list page) ── */

/* View toggle pills (portal-bar) */
.tl-view-toggle {
    display: flex;
    gap: 0;
    margin-left: auto;
}
.tl-view-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--color-border);
    background: #fff;
    color: #9e9790;
    cursor: pointer;
    transition: all 0.15s;
}
.tl-view-btn:first-child {
    border-radius: 6px 0 0 6px;
}
.tl-view-btn:not(:first-child) {
    border-left: none;
}
.tl-view-btn:last-child {
    border-radius: 0 6px 6px 0;
}
.tl-view-btn--active {
    background: var(--color-text);
    color: #fff;
    border-color: var(--color-text);
}
.tl-view-btn:not(.tl-view-btn--active):hover {
    background: var(--color-bg);
}

/* MLT Controls row */
.mlt-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 12px;
}
.mlt-controls__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Legend */
.mlt-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #9e9790;
}
.mlt-legend__item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.mlt-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Search */
.mlt-search {
    border: 1.5px solid var(--color-border);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12px;
    font-family: var(--font-body);
    outline: none;
    width: 220px;
    transition: border-color 0.15s;
}
.mlt-search:focus {
    border-color: var(--color-text);
}

/* Line rows (parent) */
.mlt-row--line .pl-gantt__row-label {
    font-weight: 700;
    cursor: pointer;
}
.mlt-row--line .pl-gantt__row-av {
    border-radius: 6px;
}

/* Sub-rows (products within line) */
.mlt-row--sub {
    background: rgba(0,0,0,0.01);
}
.mlt-row--sub .pl-gantt__row-label {
    padding-left: 52px;
    background: #f9f8f7;
}
.mlt-row--sub .pl-gantt__row-av {
    width: 26px;
    height: 26px;
    font-size: 8px;
    border-radius: 4px;
}
.mlt-row--sub .pl-gantt__row-name {
    font-size: 12px;
    font-weight: 600;
}
.mlt-row--sub .pl-gantt__row-grid {
    min-height: 38px;
}
.mlt-row--sub .pl-gantt__bar {
    height: 20px;
    font-size: 9px;
    border-radius: 4px;
}
.mlt-row--sub .pl-gantt__bar-wrap {
    /* override for sub-row bars */
}

/* Expand button */
.mlt-expand-btn {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: transparent;
    border: 1.5px solid var(--color-border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
    transition: all 0.15s;
    color: #9e9790;
    line-height: 1;
}
.mlt-expand-btn:hover {
    border-color: #9e9790;
}
.mlt-expand-btn.open {
    background: rgba(138,154,108,.1);
    border-color: #8a9a6c;
    color: #8a9a6c;
}

/* Status badge */
.mlt-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
}
.mlt-status--active {
    background: #e8f5e3;
    color: #2d7a16;
}
.mlt-status--confermata {
    background: #ede7f6;
    color: #5e35b1;
}
.mlt-status--draft {
    background: #eee;
    color: #666;
}
.mlt-status--completed {
    background: #e8f5e3;
    color: #2d7a16;
}
.mlt-status--cancelled {
    background: #f0f0f0;
    color: #999;
}

/* Ordini list */
.client-list--ordini .client-card {
    grid-template-columns: 24px 40px 1.5fr minmax(90px, 0.7fr) minmax(90px, 0.7fr) minmax(90px, 0.7fr) 32px;
}

.client-list--fatture .client-card {
    grid-template-columns: 24px 40px 1.5fr minmax(80px, 0.6fr) minmax(80px, 0.6fr) minmax(80px, 0.6fr) minmax(90px, 0.7fr) 32px;
}

/* Wide page when timeline is active */
.portal-page__inner--timeline {
    max-width: 1400px;
}

/* ── Production Line Materials Tab ── */
.pl-materials-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.pl-materials-table th {
    text-align: left;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(0,0,0,0.45);
    padding: 8px 12px;
    border-bottom: 2px solid var(--color-border);
}

.pl-materials-table th:last-child {
    text-align: right;
}

.pl-materials-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}

.pl-materials-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.pl-materials-table tfoot td {
    font-weight: 600;
    border-top: 2px solid var(--color-border);
    border-bottom: none;
}

@media (max-width: 600px) {
    .pl-line-item__fields {
        flex-direction: column;
        align-items: stretch;
    }
    .pl-line-item__fields .cf__input {
        width: 100% !important;
    }
    .pl-line-item__summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* --- Multiselect Dropdown (multi-category) --- */
.cf-multiselect {
    position: relative;
}

.cf-multiselect__trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right center !important;
    padding-right: 20px !important;
    min-height: 38px;
}

.cf-multiselect__trigger:focus {
    border-color: var(--color-text);
}

.cf-multiselect__text {
    color: rgba(0, 0, 0, 0.35);
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cf-multiselect__text--filled {
    color: var(--color-text);
}

.cf-multiselect__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    padding: 6px 0;
    margin-top: 4px;
}

.cf-multiselect--open .cf-multiselect__dropdown {
    display: block;
}

.cf-multiselect__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.12s ease;
    user-select: none;
}

.cf-multiselect__item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.cf-multiselect__item input[type="checkbox"] {
    accent-color: var(--color-text);
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.cf-multiselect__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.cf-multiselect__tags:empty {
    display: none;
}

.cf-multiselect__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    padding: 3px 6px 3px 8px;
    font-size: 0.72rem;
    font-weight: 450;
    color: var(--color-text);
    line-height: 1.3;
}

.cf-multiselect__tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.4);
    padding: 0 1px;
    line-height: 1;
    transition: color 0.15s ease;
}

.cf-multiselect__tag-remove:hover {
    color: var(--color-text);
}

/* ============================================================
   EMAIL SYSTEM
   ============================================================ */

.cf-settings-list--email-accounts.cf-settings-list--bulk.cf-settings-list--drag .cf-settings-card {
    grid-template-columns: 24px 24px 1fr auto auto;
}

.cf-settings-card__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cf-settings-card__info .cf-settings-card__name {
    font-size: 0.88rem;
    font-weight: 600;
}

.cf-settings-card__sub {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .cf-settings-list--email-accounts.cf-settings-list--bulk.cf-settings-list--drag .cf-settings-card {
        grid-template-columns: 24px 24px 1fr auto auto;
    }
}

.email-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.email-toolbar__left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.email-toolbar__right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-toolbar__tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 450;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    background: #f5f5f5;
    transition: all 0.15s ease;
}

.email-toolbar__tab:hover {
    background: #eee;
    color: #333;
}

.email-toolbar__tab--active {
    background: #222;
    color: #fff;
}

.email-toolbar__tab--active:hover {
    background: #333;
    color: #fff;
}

/* ── Email page ── */
.portal-page--email {
    padding: 0;
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
}

.portal-page--email .portal-page__inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 1600px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.portal-page--email .email-toolbar {
    flex-shrink: 0;
    padding: 12px 0;
}

/* Inbox grid: sidebar | main */
.email-inbox-layout {
    flex: 1;
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: 1fr;
    min-height: 0;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
}

/* Sidebar */
.email-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 14px;
    background: #fafafa;
    border-right: 1px solid #eee;
    overflow-y: auto;
}

.email-sidebar__folder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 450;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.email-sidebar__folder:hover {
    background: #eee;
    color: #333;
}

.email-sidebar__folder--active {
    background: #222;
    color: #fff;
}

.email-sidebar__folder--active:hover {
    background: #333;
    color: #fff;
}

.email-sidebar__badge {
    margin-left: auto;
    background: #d94040;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.email-sidebar__folder--active .email-sidebar__badge {
    background: rgba(255, 255, 255, 0.2);
}

/* Main column: header (toolbar) / body (scroll) / footer (pagination) */
.email-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.email-main > .client-toolbar {
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.email-main__scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.email-main__scroll--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.email-main > .pagination {
    flex-shrink: 0;
    padding: 10px 16px;
    border-top: 1px solid #eee;
    margin: 0;
}

/* Scrollbar */
.email-sidebar,
.email-main__scroll {
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.email-sidebar::-webkit-scrollbar,
.email-main__scroll::-webkit-scrollbar {
    width: 6px;
}

.email-sidebar::-webkit-scrollbar-track,
.email-main__scroll::-webkit-scrollbar-track {
    background: transparent;
}

.email-sidebar::-webkit-scrollbar-thumb,
.email-main__scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.email-sidebar::-webkit-scrollbar-thumb:hover,
.email-main__scroll::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Bulk action button */
.bulk-bar__action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.bulk-bar__action:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Email rows */
.email-list {
    display: flex;
    flex-direction: column;
}

.email-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.email-row:hover {
    background: #fafafa;
}

.email-row--unread {
    background: #f8f9ff;
}

.email-row--unread:hover {
    background: #f0f3ff;
}

.email-row__check {
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.email-row__avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.email-row__body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    overflow: hidden;
}

.email-row__sender {
    flex-shrink: 0;
    width: 140px;
    font-size: 13px;
    font-weight: 450;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-row--unread .email-row__sender {
    font-weight: 600;
    color: #111;
}

.email-row__subject {
    font-size: 13px;
    font-weight: 450;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-row--unread .email-row__subject {
    font-weight: 600;
    color: #111;
}

.email-row__preview {
    flex: 1;
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-row__meta {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.email-row__attach {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #999;
}

.email-row__date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    min-width: 110px;
    text-align: right;
}

.email-row--unread .email-row__date {
    color: #555;
    font-weight: 500;
}

.email-row__delete {
    flex-shrink: 0;
    opacity: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.email-row:hover .email-row__delete {
    opacity: 1;
}

.email-row__delete:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

@media (max-width: 768px) {
    .portal-page--email {
        height: auto;
        overflow: visible;
    }
    .portal-page--email .portal-page__inner {
        height: auto;
        padding: 0 16px;
    }
    .email-inbox-layout {
        grid-template-columns: 1fr;
        flex: none;
        margin-bottom: 24px;
    }
    .email-sidebar {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .email-main__scroll {
        overflow-y: visible;
    }
    .email-row__sender {
        width: 100px;
    }
    .email-row__preview {
        display: none;
    }
    .email-row__date {
        min-width: auto;
    }
}

/* Compose form */
.email-compose {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-compose .cf__field {
    margin-bottom: 0;
}

.email-compose .cf-quill {
    background: #fff;
    border-radius: 8px;
}

/* Email body frame (read mode) — isolate external HTML */
.email-body-frame {
    overflow: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 600px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 20px 24px;
}

.email-body-frame img {
    max-width: 100%;
    height: auto;
}

/* Quote block in replies */
.email-quote {
    margin-top: 24px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    max-height: 400px;
    overflow: auto;
}

/* Attachment list */
.email-attachment-list {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.email-attachment-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin: 4px 4px 4px 0;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background 0.15s ease;
}

.email-attachment-item:hover {
    background: #eee;
}

.email-attachment-item small {
    color: #999;
    font-size: 11px;
}

.email-attach-count {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.45);
}

/* Dropzone for attachments */
.email-dropzone {
    border: 2px dashed rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.email-dropzone:hover {
    border-color: rgba(0, 0, 0, 0.25);
}

.email-dropzone--over {
    border-color: var(--color-green);
    background: rgba(55, 183, 22, 0.04);
}

.email-dropzone__prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #aaa;
    font-size: 0.85rem;
    padding: 12px 0;
}

.email-dropzone__prompt svg {
    flex-shrink: 0;
}

.email-dropzone__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-dropzone__file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 6px;
    font-size: 0.82rem;
}

.email-dropzone__file svg {
    flex-shrink: 0;
    color: #999;
}

.email-dropzone__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 450;
}

.email-dropzone__size {
    color: #999;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.email-dropzone__remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #ccc;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s ease;
}

.email-dropzone__remove:hover {
    color: #d94040;
}

/* Hint text below inputs */
.cf__hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

/* --- Toaster --- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 80px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background: #111;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.82rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: toastIn 0.3s ease both;
    max-width: 380px;
}

.toast--success { border-left: 3px solid var(--color-green, #37b716); }
.toast--error { border-left: 3px solid #d94040; }
.toast--info { border-left: 3px solid #5bc0de; }

.toast--out { animation: toastOut 0.25s ease both; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

@media (max-width: 600px) {
    .toast-container { right: 12px; left: 12px; }
    .toast { max-width: 100%; }
}

/* --- Dashboard --- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dash-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: dashFadeIn 0.4s ease both;
}

.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.dash-card__icon {
    color: rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
}

.dash-card__number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.dash-card__label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.dash-card__badge {
    display: inline-block;
    background: var(--color-green, #37b716);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes dashFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dash-card:nth-child(1) { animation-delay: 0s; }
.dash-card:nth-child(2) { animation-delay: 0.05s; }
.dash-card:nth-child(3) { animation-delay: 0.1s; }
.dash-card:nth-child(4) { animation-delay: 0.15s; }
.dash-card:nth-child(5) { animation-delay: 0.2s; }
.dash-card:nth-child(6) { animation-delay: 0.25s; }
.dash-card:nth-child(7) { animation-delay: 0.3s; }
.dash-card:nth-child(8) { animation-delay: 0.35s; }
.dash-card:nth-child(9) { animation-delay: 0.4s; }


@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .dash-grid { grid-template-columns: 1fr; }
}

/* Dashboard — Mock Charts */
.dash-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 40px 0 20px;
}

.dash-section-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
}

.dash-section-header__badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: #999;
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 10px;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

.dash-charts {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 20px;
    animation: dashFadeIn 0.4s ease 0.45s both;
}

.dash-chart-panel {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
}

.dash-chart-panel__title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--color-text-light);
}

/* Donut chart */
.dash-donut {
    display: flex;
    align-items: center;
    gap: 28px;
}

.dash-donut__svg {
    flex-shrink: 0;
}

.dash-donut__center {
    font-size: 1.4rem;
    font-weight: 700;
    fill: var(--color-text);
}

.dash-donut__center-label {
    font-size: 0.55rem;
    font-weight: 400;
    fill: #999;
}

.dash-donut__legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.dash-donut__legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.dash-donut__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-donut__legend-value {
    margin-left: auto;
    font-weight: 600;
}

/* Bar chart */
.dash-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 160px;
    padding-top: 8px;
}

.dash-bars__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.dash-bars__bar {
    width: 100%;
    max-width: 48px;
    border-radius: 6px 6px 0 0;
    transition: opacity 0.2s;
}

.dash-bars__col:hover .dash-bars__bar {
    opacity: 0.8;
}

.dash-bars__value {
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-light);
}

.dash-bars__label {
    font-size: 0.7rem;
    color: #999;
    margin-top: 8px;
}

/* Status pills row */
.dash-status-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
    animation: dashFadeIn 0.4s ease 0.5s both;
}

.dash-status-pill {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dash-status-pill__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dash-status-pill__info {
    display: flex;
    flex-direction: column;
}

.dash-status-pill__value {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.dash-status-pill__label {
    font-size: 0.78rem;
    color: #999;
    margin-top: 2px;
}

@media (max-width: 1024px) {
    .dash-charts { grid-template-columns: 1fr; }
    .dash-status-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .dash-status-row { grid-template-columns: 1fr; }
    .dash-donut { flex-direction: column; text-align: center; }
}

/* --- Company Products: Wide Add Dialog --- */
.confirm-dialog--wide {
    width: min(800px, calc(100vw - 60px));
}
.confirm-dialog--wider {
    width: min(960px, calc(100vw - 60px));
}

.cp-add-search {
    width: 100%;
    margin-bottom: 12px;
}

.cp-add-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.cp-add-table th,
.cp-add-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.cp-add-table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    position: sticky;
    top: 0;
    background: #fff;
}

.cp-add-table__sortable {
    cursor: pointer;
    user-select: none;
}
.cp-add-table__sortable:hover {
    color: #333;
}
.cp-add-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.cp-add-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.cp-add-table input:disabled,
.cp-add-table select:disabled {
    background: rgba(0,0,0,0.03);
    color: rgba(0,0,0,0.25);
    border-color: rgba(0,0,0,0.06);
    cursor: not-allowed;
}

.cp-add-table .cp-add-table__discount {
    width: 80px;
}

.cp-add-scroll {
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}

.cp-add-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 12px;
}

.cp-add-footer__count {
    font-size: 0.85rem;
    color: #666;
}

@media (max-width: 600px) {
    .confirm-dialog--wide,
    .confirm-dialog--wider {
        width: 100%;
        top: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .cp-add-table th:nth-child(4),
    .cp-add-table td:nth-child(4) {
        display: none;
    }
}

/* --- Add Dialog: Expandable Product Rows --- */
.cp-add-table__product-row {
    cursor: pointer;
    user-select: none;
}

.cp-add-table__product-row td:first-child {
    padding-left: 10px;
}

.cp-add-table__toggle {
    display: inline-block;
    width: 16px;
    font-size: 0.7rem;
    color: #999;
    transition: transform 0.2s ease;
}

.cp-add-table__product-row.expanded .cp-add-table__toggle {
    transform: rotate(90deg);
}

.cp-add-table__variant-row {
    background: rgba(0, 0, 0, 0.015);
}

.cp-add-table__variant-row td:first-child {
    padding-left: 28px;
}

.cp-add-table__variant-row.hidden {
    display: none;
}

/* --- Company Products Cards --- */
.cp-card {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}

.cp-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.cp-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cp-card__sku {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.cp-card__name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cp-card__discount {
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(55, 183, 22, 0.1);
    color: var(--color-primary);
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.cp-card__variants {
    border-top: 1px solid var(--color-border);
}

.cp-card__variant {
    padding: 0 16px 12px;
}

.cp-card__variant + .cp-card__variant {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cp-card__variant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.55);
    padding: 10px 0 2px;
    letter-spacing: 0.02em;
}

.cp-card__variant-price {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.cp-card__variant-discount {
    font-size: 0.75rem;
    color: var(--color-green);
    font-weight: 600;
    padding: 0 0 4px;
}

.cp-tier-table__price {
    font-weight: 600;
    color: var(--color-green);
}

.cp-card__no-variants {
    font-size: 0.82rem;
    font-style: italic;
    color: rgba(0, 0, 0, 0.35);
    padding: 14px 16px;
    margin: 0;
}

.cp-card__tiers {
    border-top: 1px solid var(--color-border);
    padding: 0 16px 12px;
}

.cp-tier-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.cp-tier-table th {
    text-align: left;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.45);
    padding: 10px 8px 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cp-tier-table td {
    padding: 6px 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--color-text);
}

.cp-tier-table td:last-child,
.cp-tier-table th:last-child {
    text-align: right;
    width: 32px;
}

.cp-tier-table__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.3);
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.cp-tier-table__remove:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.cp-tier-add {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 10px;
}

.cp-tier-add .cf__input {
    font-size: 0.82rem;
    padding: 6px 10px;
    flex: 1;
    min-width: 0;
}

.cp-tier-add select.cf__input {
    flex: 0 0 auto;
    width: auto;
}

.cp-tier-add__btn {
    background: none;
    border: 1px solid var(--color-border);
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.cp-tier-add__btn:hover {
    background: rgba(55, 183, 22, 0.06);
    border-color: var(--color-primary);
}

/* --- Recipe Equivalences & RM Conversions --- */
.rq-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rq-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.rq-item__text {
    flex: 1;
    font-size: 0.88rem;
    font-weight: 500;
}

.rq-item__delete {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.rq-item__delete:hover {
    color: #d94040;
    background: rgba(217, 64, 64, 0.06);
}

.rq-add-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.rq-add-row .cf__input {
    max-width: 160px;
}

.rq-add-row .cf__submit {
    padding: 8px 16px;
    white-space: nowrap;
}

/* ========== Cookie Banner ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--color-surface-dark, #1a1a1a);
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 0.85rem;
    line-height: 1.5;
    animation: cookieSlideUp 0.35s ease-out;
}

.cookie-banner--hidden {
    animation: cookieSlideDown 0.3s ease-in forwards;
    pointer-events: none;
}

.cookie-banner__text {
    max-width: 720px;
}

.cookie-banner__text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-banner__btn {
    flex-shrink: 0;
    background: #fff;
    color: #1a1a1a;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cookie-banner__btn:hover {
    opacity: 0.85;
}

@keyframes cookieSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

@keyframes cookieSlideDown {
    from { transform: translateY(0); }
    to   { transform: translateY(100%); }
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 14px 16px;
    }
}

/* ========== Magazine / Blog ========== */

.magazine-hero {
    padding: 80px 0 40px;
    text-align: center;
}

.magazine-hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.magazine-hero__desc {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Category filters */
.magazine-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 0 0 32px;
}

.magazine-filters__pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    background: var(--color-bg-alt, #f5f5f5);
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: all 0.2s ease;
}

.magazine-filters__pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.magazine-filters__pill--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* Article grid */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 48px;
}

@media (max-width: 900px) {
    .magazine-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .magazine-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .magazine-hero {
        padding: 60px 0 24px;
    }
    .magazine-hero__title {
        font-size: 1.8rem;
    }
}

/* Magazine card */
.magazine-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.magazine-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.magazine-card__cover {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-bg-alt, #f5f5f5);
}

.magazine-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.magazine-card:hover .magazine-card__cover img {
    transform: scale(1.04);
}

.magazine-card__cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
}

.magazine-card__body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.magazine-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--color-text-light);
}

.magazine-card__badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--color-primary);
    color: #fff;
}

.magazine-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.magazine-card__excerpt {
    font-size: 0.88rem;
    color: var(--color-text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex: 1;
}

.magazine-card__date {
    font-size: 0.78rem;
    color: var(--color-text-light);
    margin-top: auto;
}

/* Magazine empty state */
.magazine-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
    font-size: 1.05rem;
}

/* ========== Article Detail ========== */

.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px 80px;
}

.article-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--color-text-light);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.article-detail__back:hover {
    color: var(--color-primary);
}

.article-detail__cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.article-detail__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-detail__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.article-detail__category {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--color-primary);
    color: #fff;
    text-decoration: none;
}

.article-detail__title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 32px;
}

.article-detail__content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--color-text);
}

.article-detail__content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 40px 0 16px;
}

.article-detail__content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 32px 0 12px;
}

.article-detail__content p {
    margin: 0 0 16px;
}

.article-detail__content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

.article-detail__content blockquote {
    border-left: 3px solid var(--color-primary);
    margin: 24px 0;
    padding: 12px 20px;
    color: var(--color-text-light);
    font-style: italic;
}

.article-detail__content ul,
.article-detail__content ol {
    margin: 0 0 16px;
    padding-left: 24px;
    list-style: revert;
}

.article-detail__content li {
    margin-bottom: 6px;
}

.article-detail__content a {
    color: var(--color-primary);
}

.article-detail__views {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.article-detail__views svg {
    opacity: 0.6;
}

.article-detail__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
    border-top: 1px solid var(--color-border, #e5e5e5);
    padding-top: 24px;
}

.article-detail__share-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-right: 4px;
}

.article-detail__share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.article-detail__share-btn:hover {
    opacity: 0.8;
}

.article-detail__share-btn--facebook { background: #1877f2; }
.article-detail__share-btn--x { background: #000; }
.article-detail__share-btn--linkedin { background: #0a66c2; }
.article-detail__share-btn--whatsapp { background: #25d366; }

.article-detail__share-btn--copy {
    width: auto;
    border-radius: 20px;
    padding: 0 16px;
    gap: 6px;
    background: var(--color-bg-light, #f5f5f5);
    color: var(--color-text);
    font-size: 0.82rem;
    font-family: inherit;
}

.article-detail__share-btn--copy:hover {
    background: var(--color-border, #e5e5e5);
    opacity: 1;
}

.article-detail__share-btn--copy.copied {
    background: var(--color-primary);
    color: #fff;
}

@media (max-width: 600px) {
    .article-detail {
        padding: 40px 16px 60px;
    }
    .article-detail__title {
        font-size: 1.6rem;
    }
    .article-detail__content {
        font-size: 0.95rem;
    }
}

/* ========== Related Articles ========== */

.related-articles {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

.related-articles__title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 20px;
    padding-top: 40px;
    border-top: 1px solid var(--color-border, #e5e5e5);
}

.related-articles__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e5e5);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.related-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    transform: translateY(-1px);
}

.related-card__cover {
    width: 100px;
    min-height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--color-bg-alt, #f5f5f5);
}

.related-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-card__cover--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
}

.related-card__body {
    padding: 10px 12px 10px 0;
    min-width: 0;
}

.related-card__title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-card__date {
    font-size: 0.72rem;
    color: var(--color-text-light);
}

@media (max-width: 600px) {
    .related-articles {
        padding: 0 16px 60px;
    }
    .related-articles__grid {
        grid-template-columns: 1fr;
    }
}

/* ========== Blog status badges (admin) ========== */

.blog-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-status--draft {
    background: #f0f0f0;
    color: #666;
}

.blog-status--published {
    background: #e8f5e9;
    color: #2e7d32;
}

.blog-status--scheduled {
    background: #e3f2fd;
    color: #1565c0;
}

/* Quill article editor (taller) */
.cf-quill--article {
    min-height: 300px;
}

/* ── Portal Table (list view) ── */
.portal-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: #fff;
}
.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.portal-table__th {
    text-align: left;
    padding: 10px 14px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9e9790;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
.portal-table__th--check,
.portal-table__td--check {
    width: 36px;
    text-align: center;
    padding-left: 10px;
    padding-right: 4px;
}
.portal-table__th--img,
.portal-table__td--img {
    width: 44px;
    padding-right: 0;
}
.portal-table__row {
    transition: background 0.12s;
}
.portal-table__row:hover {
    background: var(--color-bg);
}
.portal-table__td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    color: var(--color-text);
}
.portal-table__row:last-child .portal-table__td {
    border-bottom: none;
}
.portal-table__td--name a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}
.portal-table__td--name a:hover {
    text-decoration: underline;
}
.portal-table__td--slug {
    color: #9e9790;
    font-size: 0.78rem;
}
.portal-table__td--num {
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.portal-table__td--date {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #9e9790;
}
.portal-table__td--actions {
    white-space: nowrap;
    text-align: right;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}
.portal-table__img {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}
.portal-table__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.portal-table__initials--inactive {
    opacity: 0.45;
}
.portal-table__th--drag,
.portal-table__td--drag {
    width: 28px;
    padding: 6px 2px 6px 6px;
}
.portal-table__drag-handle {
    color: var(--color-text-light);
    cursor: grab;
    display: flex;
    align-items: center;
}
.portal-table__drag-handle:active {
    cursor: grabbing;
}
.portal-table__row.is-dragging {
    opacity: 0.4;
}
.portal-table__row.drag-over {
    border-top: 2px solid var(--color-primary);
}
.mlt-status--inactive {
    background: #f0f0f0;
    color: #999;
}

/* ── Phases tab (recipe material ↔ operation assignment) ── */
.phases-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    min-height: 200px;
    align-items: start;
}
.phases-column--unassigned {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}
.phases-column--unassigned .phases-drop-zone {
    flex: 1;
    overflow-y: auto;
    min-height: 60px;
}
@media (max-width: 768px) {
    .phases-layout { grid-template-columns: 1fr; }
    .phases-column--unassigned { position: static; max-height: none; }
}
.phases-column__title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0,0,0,0.4);
    margin-bottom: 12px;
}
.phases-drop-zone {
    min-height: 60px;
    border: 2px dashed rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 8px;
    transition: border-color 0.2s, background 0.2s;
}
.phases-drop-zone--active {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb, 58,61,56), 0.04);
}
.phases-bucket {
    margin-bottom: 16px;
}
.phases-bucket__header {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.phases-bucket__header-meta {
    font-weight: 400;
    font-size: 0.72rem;
    color: rgba(0,0,0,0.35);
}
.phases-material-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: grab;
    transition: opacity 0.2s, box-shadow 0.2s;
    user-select: none;
}
.phases-material-card:active {
    cursor: grabbing;
}
.phases-material-card.is-dragging {
    opacity: 0.3;
}
.phases-material-card__drag {
    color: rgba(0,0,0,0.25);
    flex-shrink: 0;
}
.phases-material-card__info {
    flex: 1;
    min-width: 0;
}
.phases-material-card__title {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.phases-material-card__meta {
    font-size: 0.72rem;
    color: rgba(0,0,0,0.4);
    margin-top: 1px;
}
.phases-empty {
    text-align: center;
    padding: 16px 8px;
    color: rgba(0,0,0,0.25);
    font-size: 0.8rem;
    font-style: italic;
}
.phases-hint {
    font-size: 0.8rem;
    color: rgba(0,0,0,0.4);
    margin-bottom: 16px;
    font-style: italic;
}
.phases-layout--full { grid-template-columns: 1fr; }
.phases-material-card__remove {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: rgba(0,0,0,0.3);
    font-size: 18px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}
.phases-material-card__remove:hover {
    color: #e53935;
    background: rgba(229,57,53,0.08);
}

/* === Searchable Select (cf-search-select) — matches cf__input style === */
.cf-search-select { position: relative; }
.cf-search-select__trigger {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 0;
    padding: 10px 0;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s ease;
    text-align: left;
    gap: 6px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}
.cf-search-select__trigger:focus { border-color: var(--color-text); }
.cf-search-select__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-search-select__label--placeholder { color: rgba(0, 0, 0, 0.3); }
.cf-search-select__clear {
    flex-shrink: 0;
    border: none; background: none;
    font-size: 16px; line-height: 1;
    cursor: pointer; padding: 0;
    color: rgba(0,0,0,0.35); transition: color 0.15s;
}
.cf-search-select__clear:hover { color: rgba(0,0,0,0.7); }
.cf-search-select__arrow {
    flex-shrink: 0; width: 10px; height: 10px; color: #999; transition: transform 0.15s;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat center;
}
.cf-search-select__arrow svg { display: none; }
.cf-search-select--open .cf-search-select__arrow { transform: rotate(180deg); }
.cf-search-select__dropdown {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    margin-top: 4px; padding: 8px;
    background: #fff; border: 1px solid rgba(0,0,0,0.12);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 100; max-height: 280px; overflow: hidden;
    flex-direction: column;
}
.cf-search-select--open .cf-search-select__dropdown { display: flex; }
.cf-search-select__search {
    width: 100%; padding: 8px 12px;
    border: 1px solid rgba(0,0,0,0.1); border-radius: 6px;
    font-size: 0.85rem; margin-bottom: 6px;
    font-family: inherit; outline: none;
}
.cf-search-select__search:focus { border-color: var(--color-text); }
.cf-search-select__list {
    list-style: none; margin: 0; padding: 0;
    overflow-y: auto; flex: 1;
}
.cf-search-select__list li {
    padding: 8px 12px; font-size: 0.85rem;
    border-radius: 6px; cursor: pointer;
    transition: background 0.1s;
}
.cf-search-select__list li:hover { background: rgba(0,0,0,0.04); }
.cf-search-select__list li.cf-search-select__item--active { background: rgba(0,0,0,0.06); font-weight: 500; }
.cf-search-select__empty {
    padding: 12px; text-align: center; color: rgba(0,0,0,0.3); font-size: 0.83rem;
}

/* =========================================
   About — Download / Brochures
   ========================================= */

.about-download {
    padding: 0 0 100px;
}

.about-download__inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.about-download__head {
    max-width: 720px;
    margin: 0 auto 48px;
    text-align: center;
}

.about-download__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

.about-download__text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--color-text-light);
}

.about-download__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.brochure-card {
    margin: 0;
}

.brochure-card__thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10);
    aspect-ratio: 1 / 1;
    background: #f7f5f0;
}

.brochure-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.brochure-card__thumb:hover img {
    transform: scale(1.04);
}

/* Gradiente permanente per attenuare la copertina e dare contrasto al testo */
.brochure-card__thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.85) 22%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.25) 72%, rgba(255, 255, 255, 0.10) 100%);
    pointer-events: none;
    z-index: 1;
}

.brochure-card__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 22px;
    z-index: 2;
    padding: 0 20px;
    text-align: center;
    color: #2a2d27;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 6px rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.brochure-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: rgba(36, 40, 33, 0.62);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.brochure-card__thumb:hover .brochure-card__overlay,
.brochure-card__thumb:focus-within .brochure-card__overlay {
    opacity: 1;
}

.brochure-card__overlay-label {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brochure-card__langs {
    display: flex;
    gap: 12px;
}

.brochure-card__lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 50px;
    background: #fff;
    color: #3a3d38;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.brochure-card__lang:hover {
    background: var(--color-text, #242821);
    color: #fff;
    transform: translateY(-2px);
}

.brochure-card__caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
}

.brochure-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
}

/* Static langs in caption: visible only on touch / no-hover devices */
.brochure-card__langs--static {
    display: none;
    gap: 8px;
}

.brochure-card__langs--static .brochure-card__lang {
    min-width: 48px;
    padding: 6px 14px;
    font-size: 0.78rem;
    border: 1px solid #ccc;
    background: #fff;
}

@media (hover: none) {
    /* Touch devices: hover overlay non affidabile → mostra link nella caption */
    .brochure-card__overlay {
        display: none;
    }
    .brochure-card__langs--static {
        display: flex;
    }
}

@media (max-width: 768px) {
    .about-download__grid {
        grid-template-columns: 1fr;
        gap: 32px;
        max-width: 420px;
    }

    .about-download__title {
        font-size: 1.4rem;
    }
}
