/* ==========================================================================
   0. VARIABLES & RESET GLOBAL
   ========================================================================== */
:root {
    /* Couleurs principales */
    --orange: #f15a24;
    --orange-dark: #c74717;
    --primary: #f15a24;
    --primary-dark: #c74717;
    --blue: #0071bc;
    --green: #16a34a;
    --red: #dc2626;
    --dark: #101828;
    --muted: #667085;
    --soft: #f8fafc;
    --line: #e4e7ec;
    --white: #ffffff;
    --shadow: 0 18px 48px rgba(16, 24, 40, .12);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);

    /* Aliases pour composants SaaS */
    --card-bg: #ffffff;
    --border-color: #e4e7ec;
    --text-main: #1e293b;
    --text-muted: #667085;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--dark);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(241, 90, 36, .22), transparent 32%),
        linear-gradient(180deg, #ffffff, #f7f8fb 42%, #eef2f7);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}


/* ==========================================================================
   1. LAYOUT GLOBAL & APP SHELL (Dashboard / Accueil)
   ========================================================================== */

.app-shell {
    width: min(680px, 100%);
    margin: 0 auto;
    padding: max(12px, env(safe-area-inset-top)) 14px 34px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 30px;
    padding: 18px;
    color: white;
    background: linear-gradient(145deg, #f15a24, #ff9f1c 52%, #0071bc);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    right: -72px;
    bottom: -90px;
    width: 210px;
    height: 210px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .19);
}

.hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.logo {
    width: 82px;
    height: 82px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    background: transparent;
    box-shadow: 0 14px 28px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.logo img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    display: block;
}

.install-btn {
    padding: 10px 14px;
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, .22);
    font-weight: 800;
}

.login-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.eyebrow {
    position: relative;
    z-index: 1;
    font-size: 11px;
    letter-spacing: .15em;
    text-transform: uppercase;
    font-weight: 900;
    opacity: .9;
}

h1 {
    position: relative;
    z-index: 1;
    margin: 8px 0 10px;
    max-width: 420px;
    font-size: clamp(28px, 7.5vw, 46px);
    line-height: .98;
    letter-spacing: -.055em;
}

.hero p:not(.eyebrow) {
    position: relative;
    z-index: 1;
    max-width: 440px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
}

.version-pill {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 12px;
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .20);
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 10px;
    margin: 12px 0 10px;
}

.action,
.ghost {
    border-radius: 18px;
    min-height: 52px;
    padding: 12px 13px;
    background: white;
    color: var(--dark);
    box-shadow: 0 8px 22px rgba(16, 24, 40, .08);
    font-weight: 900;
    text-align: center;
}

.action.primary {
    background: var(--orange);
    color: white;
}

.ghost {
    min-height: auto;
    padding: 9px 12px;
    background: #f2f4f7;
    box-shadow: none;
}

.search-box {
    margin: 12px 0;
}

.search-box input {
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 0 17px;
    outline: none;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .06);
}

.search-box input:focus {
    border-color: var(--orange);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
}

.section-title h2 {
    font-size: 19px;
    line-height: 1.15;
}

.section-title span {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fff3ed;
    color: var(--orange);
    font-weight: 900;
}

.structures-list {
    display: grid;
    gap: 12px;
}

.structure-card {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 14px;
    align-items: center;
    background: white;
    border: 1px solid rgba(228, 231, 236, .9);
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 10px 26px rgba(16, 24, 40, .055);
    transition: transform .18s ease, box-shadow .18s ease;
}

.structure-card:active {
    transform: scale(.985);
}

.structure-img {
    width: 78px;
    height: 78px;
    border-radius: 20px;
    object-fit: cover;
    background: linear-gradient(135deg, #fff3ed, #e0f2fe);
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
}

.structure-card h3 {
    font-size: 17px;
    line-height: 1.18;
}

.meta {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.tag {
    display: inline-flex;
    margin-top: 9px;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--blue);
    background: #e6f3fb;
    font-size: 12px;
    font-weight: 900;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.status-pill.open {
    color: #067647;
    background: #dcfae6;
}

.status-pill.closed {
    color: #b42318;
    background: #fee4e2;
}

.status-pill.unknown {
    color: #344054;
    background: #f2f4f7;
}

.empty-state {
    padding: 22px 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .86);
    border: 1px dashed #d0d5dd;
    text-align: center;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .045);
}

.empty-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin: 0 auto 10px;
    border-radius: 18px;
    background: #fff3ed;
}

.empty-state h3 {
    margin-bottom: 6px;
}

.empty-state p {
    color: var(--muted);
    line-height: 1.5;
}


/* ==========================================================================
   2. PANNEAU DE DÉTAILS DE LA STRUCTURE (DETAIL PANEL, ARTICLES & MENUS)
   ========================================================================== */

.detail-panel {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    width: min(680px, 100%);
    max-height: 94vh;
    margin: 0 auto;
    overflow-y: auto;
    border-radius: 30px 30px 0 0;
    padding: 0 16px max(22px, env(safe-area-inset-bottom));
    background: white;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.detail-close {
    position: sticky;
    top: 10px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    min-width: 96px;
    padding: 0 16px;
    margin: 12px 0 10px;
    border-radius: 999px;
    background: #f2f4f7;
    color: var(--dark);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .08);
    transition: background 0.2s;
}

.detail-close:hover {
    background: #e2e8f0;
}

/* Couverture & Avatar */
.detail-cover-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 50px;
    background: #f1f5f9;
}

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

.detail-avatar {
    position: absolute;
    bottom: -35px;
    left: 20px;
    width: 75px;
    height: 75px;
    border-radius: 20px;
    border: 4px solid #ffffff;
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.detail-status {
    position: absolute;
    top: 12px;
    right: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.detail-head {
    margin-bottom: 20px;
}

.detail-type {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--orange);
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-head h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 8px;
}

.detail-description {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Grille d'informations & Boutons de contact */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 5px;
    width: 250px;
    background: #f8fafc;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--line);
    margin: 15px 5px 20px 3px;
}

.info-grid div span {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 2px;
}

.info-grid div strong {
    font-size: 0.9rem;
    color: var(--dark);
}

.contact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.contact-btn:active {
    transform: scale(0.98);
}

.contact-btn.call {
    background: #e0f2fe;
    color: #0284c7;
}

.contact-btn.whatsapp {
    background: #dcfce7;
    color: #15803d;
}

.contact-btn[aria-disabled="true"] {
    opacity: 0.5;
    pointer-events: none;
}

/* En-tête de section des articles */
.menu-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.menu-head h3 {
    font-size: 1.2rem;
    font-weight: 800;
}

.selection-count {
    background: #fff3ed;
    color: var(--orange);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

/* Liste des articles sélectionnables */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #ffffff;
    border: 1.5px solid var(--line);
    border-radius: 18px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-item:hover {
    border-color: #cbd5e1;
}

.menu-item.is-selected {
    border-color: var(--orange);
    background: #fff9f6;
}

.menu-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--orange);
    cursor: pointer;
}

.menu-thumb {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 12px;
    background: #f1f5f9;
    flex-shrink: 0;
}

.menu-text {
    flex: 1;
    min-width: 0;
}

.menu-text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--dark);
    line-height: 1.2;
}

.menu-text small {
    display: inline-block;
    color: var(--orange);
    font-weight: 700;
    font-size: 0.75rem;
    margin-top: 2px;
}

.menu-text p {
    font-size: 0.82rem;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.3;
}

.menu-price {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--dark);
    white-space: nowrap;
}

/* Galerie des articles sur la page catalogue */
.catalogue-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.catalogue-container {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    align-items: start;
    gap: 24px;
    width: min(1280px, calc(100% - 32px));
    margin: 32px auto;
}

.catalogue-sidebar {
    position: sticky;
    top: 92px;
    width: 330px;
    min-width: 0;
}

.catalogue-content {
    min-width: 0;
}

.catalogue-body .detail-cover-wrap {
    height: 205px;
}

.catalogue-body .detail-head,
.catalogue-body .info-grid,
.catalogue-body .contact-actions {
    margin-left: 22px;
    margin-right: 22px;
}

.catalogue-body .contact-actions {
    margin-bottom: 22px;
}

.empty-state-wide {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
}

.empty-state-wide .empty-icon {
    margin-bottom: 12px;
    font-size: 2.6rem;
}

.empty-state-wide h3 {
    margin-bottom: 8px;
}

.empty-state-wide p {
    color: var(--muted);
}

.catalogue-articles-card {
    padding: clamp(18px, 3vw, 30px);
}

.catalogue-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.catalogue-section-heading h1 {
    color: var(--dark);
    font-size: clamp(1.35rem, 3vw, 1.8rem);
    font-weight: 850;
}

.catalogue-eyebrow {
    margin-bottom: 5px;
    color: var(--orange);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.catalogue-article-count {
    flex-shrink: 0;
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff3ed;
    color: var(--orange-dark);
    font-size: .82rem;
    font-weight: 800;
}

.article-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
    gap: 18px;
}

.catalogue-article-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.catalogue-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(16, 24, 40, .1);
}

.catalogue-article-gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.catalogue-article-image-wrap {
    display: grid;
    place-items: center;
    height: 190px;
    overflow: hidden;
    background: #f2f4f7;
}

.catalogue-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalogue-article-image-wrap.image-unavailable {
    background: linear-gradient(135deg, #fff3ed, #f8fafc);
}

.catalogue-article-image-wrap.image-placeholder span {
    font-size: 2.8rem;
}

.catalogue-article-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
}

.catalogue-article-category {
    margin-bottom: 8px;
    color: var(--orange-dark);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.catalogue-article-body h2 {
    margin-bottom: 7px;
    color: var(--dark);
    font-size: 1.05rem;
    line-height: 1.3;
}

.catalogue-article-body p {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.5;
}

.catalogue-article-price {
    margin-top: auto;
    color: var(--dark);
    font-size: 1.02rem;
    font-weight: 850;
}

.catalogue-empty-articles {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 48px 18px;
    text-align: center;
}

.catalogue-empty-articles>span {
    font-size: 2.4rem;
}

.catalogue-empty-articles h2 {
    color: var(--dark);
    font-size: 1.1rem;
}

.catalogue-empty-articles p {
    color: var(--muted);
    font-size: .9rem;
}

.catalogue-gallery-notice {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #f5cc8e;
    border-radius: 12px;
    background: #fff8e9;
    color: #694b14;
    font-size: .9rem;
    line-height: 1.5;
}

.article-gallery .catalogue-article-image {
    cursor: zoom-in;
}

.gallery-lightbox-open {
    overflow: hidden;
}

.article-gallery-lightbox[hidden] {
    display: none !important;
}

.article-gallery-lightbox {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
    background: rgba(8, 13, 22, .42);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    isolation: isolate;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: -24px;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.gallery-lightbox-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(22px);
    transform: scale(1.08);
    opacity: .52;
}

.gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    grid-template-rows: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px 12px;
    width: min(760px, calc(100vw - 48px));
    max-height: 88vh;
    padding: 50px 24px 16px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 22px;
    background: rgba(13, 19, 30, .82);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.gallery-lightbox-figure {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: min(62vh, 540px);
    margin: 0;
}

.gallery-lightbox-figure img {
    display: block;
    max-width: 100%;
    max-height: calc(62vh - 44px);
    object-fit: contain;
    border-radius: 12px;
}

.gallery-lightbox-figure figcaption {
    margin-top: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    transition: background .18s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, .28);
}

.gallery-lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 42px;
    height: 42px;
    font-size: 2.2rem;
}

.gallery-lightbox-nav {
    grid-row: 1;
    width: 44px;
    height: 44px;
}

.gallery-lightbox-prev {
    grid-column: 1;
}

.gallery-lightbox-next {
    grid-column: 3;
}

.gallery-lightbox-count {
    grid-column: 1 / -1;
    grid-row: 2;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    text-align: center;
}

.gallery-lightbox-thumbnails {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    padding: 4px 2px 8px;
}

.gallery-lightbox-thumbnail {
    flex: 0 0 62px;
    width: 62px;
    height: 54px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 9px;
    background: rgba(255, 255, 255, .12);
    cursor: pointer;
    opacity: .72;
}

.gallery-lightbox-thumbnail.is-active {
    border-color: #fff;
    opacity: 1;
}

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

.send-selection {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.3);
    margin-top: 10px;
    transition: transform 0.2s ease;
}

.send-selection:hover {
    transform: translateY(-1px);
}


/* ==========================================================================
   3. FORMULAIRES & LOGIN (Authentification)
   ========================================================================== */

.page-form {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.page-form.wide {
    width: min(1180px, calc(100% - 28px));
    margin: 32px auto;
}

.back {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 16px;
    transition: color 0.2s ease;
}

.page-form.wide .back {
    margin-bottom: 0;
    color: var(--orange);
    font-weight: 800;
}

.back:hover {
    color: #f15a24;
}

.panel.form-panel,
.panel,
.saas-card {
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    width: auto;
    padding: 32px 28px;
    position: relative;
    border: 1px solid var(--line);
}

.panel.form-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(135deg, #f15a24 0%, #ff8c00 50%, #2b7a8d 100%);
}

.panel.form-panel h1,
.section-title h1,
.card-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.panel.form-panel p,
.section-title p {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.4;
    margin-bottom: 24px;
}

.error-msg {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
    border-left: 4px solid #dc2626;
}

.grid-form,
.form-grid-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.grid-form label,
.grid-form-backoffice label,
.form-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    display: block;
}

.grid-form input[type="text"],
.grid-form input[type="password"],
.grid-form input[type="email"],
.form-control {
    width: 100%;
    padding: 14px 18px;
    background-color: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1rem;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

.grid-form input:focus,
.form-control:focus {
    background-color: #ffffff;
    border-color: #f15a24;
    box-shadow: 0 0 0 4px rgba(241, 90, 36, 0.15);
}

.grid-form input::placeholder,
.form-control::placeholder {
    color: #94a3b8;
}


/* ==========================================================================
   4. BACKOFFICE & INTERFACES SAAS
   ========================================================================== */

.saas-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.saas-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saas-container {
    max-width: 1180px;
    width: 100%;
    margin: 32px auto;
    padding: 0 14px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.inline-form,
.form-grid-inline {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 12px;
    align-items: end;
    margin: 24px 0;
}

.inline-form.menu-form {
    grid-template-columns: 1fr 1.5fr 1fr auto;
}

.two-cols,
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.grid-form-backoffice input[type="text"],
.grid-form-backoffice input[type="number"],
.grid-form-backoffice select,
.grid-form-backoffice textarea,
textarea.form-control {
    width: 100%;
    padding: 12px 16px;
    background-color: #f8fafc;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--dark);
    outline: none;
    transition: all 0.2s ease;
}

.grid-form-backoffice input:focus,
.grid-form-backoffice select:focus,
.grid-form-backoffice textarea:focus {
    background-color: #ffffff;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(241, 90, 36, 0.15);
}

/* Tableaux */
.table-wrap,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
}

.table,
.saas-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th,
.saas-table th {
    background-color: #f8fafc;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--line);
}

.table td,
.saas-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--dark);
    font-size: 0.92rem;
}

.table tr:hover td,
.saas-table tr:hover td {
    background-color: #fafbfc;
}

.empty,
.empty-row {
    text-align: center;
    color: var(--muted);
    padding: 24px !important;
}

/* Boutons globaux */
.btn,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    background: linear-gradient(135deg, #f15a24 0%, #e04b15 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(241, 90, 36, 0.3);
    text-decoration: none;
}

.btn-primary:hover,
.btn:hover {
    background: linear-gradient(135deg, #e04b15 0%, #c83d0c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(241, 90, 36, 0.4);
}

.btn-small,
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
    font-weight: 700;
}

.btn-danger,
.btn-danger-soft {
    background-color: #fee2e2;
    color: #dc2626;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover,
.btn-danger-soft:hover {
    background-color: #fecaca;
}

.btn-outline-danger {
    background: transparent;
    border: 1.5px solid #ef4444;
    color: #ef4444;
    font-weight: 600;
    border-radius: 12px;
    padding: 8px 14px;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: #fff;
}

/* Badges & Utilitaires */
.badge-id {
    font-family: monospace;
    font-weight: 600;
    color: var(--muted);
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-structure {
    font-weight: 700;
    color: var(--dark);
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
}

.text-right {
    text-align: right;
}

.font-weight-600 {
    font-weight: 600;
}

.text-primary {
    color: var(--orange);
    font-weight: 700;
}

.text-muted {
    color: var(--muted);
    font-size: 0.92rem;
}

/* Alertes */
.alert,
.alert-success,
.alert-error {
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 600;
    margin-bottom: 20px;
}

.alert.success,
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert.error,
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* ==========================================================================
   5. SCANNER & MODALS
   ========================================================================== */

.scanner-panel {
    position: fixed;
    z-index: 30;
    left: 10px;
    right: 10px;
    top: max(48px, env(safe-area-inset-top));
    width: min(660px, calc(100% - 20px));
    max-height: calc(100vh - 72px);
    margin: 0 auto;
    overflow-y: auto;
    padding: 14px;
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.scanner-panel::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(16, 24, 40, .38);
    backdrop-filter: blur(10px);
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

#reader {
    overflow: hidden;
    border-radius: 24px;
    background: #101828;
    min-height: 245px;
    max-height: min(58vh, 420px);
}

#reader video {
    width: 100% !important;
    height: min(58vh, 420px) !important;
    max-height: 420px !important;
    object-fit: cover !important;
    border-radius: 24px;
}

.hidden {
    display: none !important;
}


/* ==========================================================================
   6. RESPONSIVE DESIGN
   ========================================================================== */

@media (min-width: 560px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .catalogue-container {
        grid-template-columns: 1fr;
        width: min(calc(100% - 20px), 640px);
        margin: 18px auto;
        gap: 16px;
    }

    .catalogue-sidebar {
        position: static;
    }

    .article-gallery {
        grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
        gap: 14px;
    }

    .form-grid-inline,
    .inline-form,
    .inline-form.menu-form,
    .two-cols,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .panel,
    .panel.form-panel,
    .saas-card {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    .article-gallery-lightbox {
        padding: 12px;
    }

    .gallery-lightbox-dialog {
        grid-template-columns: 34px minmax(0, 1fr) 34px;
        gap: 5px;
        width: calc(100vw - 24px);
        max-height: 88vh;
        padding: 48px 8px 12px;
        border-radius: 18px;
    }

    .gallery-lightbox-figure {
        height: min(54vh, 520px);
    }

    .gallery-lightbox-figure img {
        max-height: calc(54vh - 42px);
    }

    .gallery-lightbox-nav {
        width: 32px;
        height: 32px;
        font-size: 1.7rem;
    }

    .catalogue-body .saas-header {
        padding: 12px 14px;
    }

    .catalogue-body .header-container {
        gap: 10px;
    }

    .catalogue-body .badge-structure {
        max-width: 48%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .article-gallery {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .catalogue-article-image-wrap {
        height: 140px;
    }

    .catalogue-article-body {
        padding: 12px;
    }

    .catalogue-article-body h2 {
        font-size: .95rem;
    }

    .catalogue-article-body p {
        font-size: .8rem;
    }

    .catalogue-article-price {
        font-size: .9rem;
    }

    .app-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .hero {
        min-height: 190px;
        border-radius: 26px;
        padding: 16px;
    }

    .quick-actions {
        grid-template-columns: 1fr;
        margin-top: 10px;
    }

    .structure-card {
        grid-template-columns: 70px 1fr;
        padding: 10px;
    }

    .structure-img {
        width: 70px;
        height: 70px;
    }

    .card-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* EmGuide UI polish: shared app, catalogue, and management screens */
:root {
    --orange: #e85d2a;
    --orange-dark: #bf431c;
    --primary: #e85d2a;
    --primary-dark: #bf431c;
    --dark: #172033;
    --muted: #697586;
    --line: #e7eaf0;
    --shadow: 0 22px 60px rgba(23, 32, 51, .12);
    --shadow-md: 0 12px 34px rgba(23, 32, 51, .07);
}

body {
    color: var(--dark);
    background-color: #f5f7fb;
}

.saas-header {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom-color: rgba(231, 234, 240, .85);
}

.saas-card,
.panel,
.panel.form-panel {
    border-color: rgba(231, 234, 240, .9);
    box-shadow: var(--shadow-md);
}

.saas-container {
    gap: 22px;
}

.card-header {
    align-items: flex-start;
    gap: 18px;
}

.card-header h2 {
    letter-spacing: -.035em;
}

.text-muted {
    color: var(--muted);
}

.form-control {
    border-radius: 13px;
    background: #fbfcfe;
    border-color: #e3e7ef;
}

.form-control:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(232, 93, 42, .12);
}

.btn,
.btn-primary {
    border-radius: 13px;
    background: linear-gradient(135deg, #ee7040, #d94d22);
    box-shadow: 0 7px 18px rgba(217, 77, 34, .2);
}

.btn:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #e75e31, #c9461e);
    box-shadow: 0 9px 22px rgba(217, 77, 34, .25);
}

.saas-table th {
    background: #f7f8fb;
}

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

.saas-table td,
.saas-table th {
    padding: 15px 16px;
}

.catalogue-body {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f4f9 60%, #eef2f8 100%);
}

.catalogue-container {
    gap: 26px;
}

.catalogue-articles-card {
    border-radius: 26px;
}

.catalogue-article-card {
    border-color: #edf0f5;
    border-radius: 22px;
    box-shadow: 0 8px 24px rgba(23, 32, 51, .055);
}

.catalogue-article-card:hover {
    box-shadow: 0 18px 38px rgba(23, 32, 51, .11);
}

.catalogue-add-to-cart {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 13px;
    background: #fff2ec;
    color: var(--orange-dark);
    font-weight: 800;
    transition: background .2s, color .2s, transform .2s;
}

.catalogue-add-to-cart:hover,
.catalogue-add-to-cart.is-added {
    background: var(--orange);
    color: white;
    transform: translateY(-1px);
}

.catalogue-add-to-cart span {
    font-size: 1.25rem;
}

.floating-cart-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 11000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 17px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    background: linear-gradient(135deg, #ed7040, #d94d22);
    color: white;
    box-shadow: 0 14px 34px rgba(188, 65, 28, .3);
    font-weight: 850;
    transition: transform .2s, box-shadow .2s;
}

.floating-cart-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(188, 65, 28, .36);
}

.floating-cart-count {
    display: grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    padding: 0 6px;
    border-radius: 50px;
    background: white;
    color: var(--orange-dark);
    font-size: .78rem;
}

.cart-drawer-overlay[hidden] {
    display: none !important;
}

.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    justify-content: flex-end;
    background: rgba(17, 24, 39, .48);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.cart-drawer-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.cart-drawer {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(480px, 100%);
    height: 100%;
    padding: 26px;
    overflow-y: auto;
    background: #fff;
    box-shadow: -20px 0 60px rgba(17, 24, 39, .18);
    animation: cart-drawer-in .22s ease-out;
}

@keyframes cart-drawer-in {
    from {
        transform: translateX(28px);
        opacity: .6;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-drawer-open {
    overflow: hidden;
}

.cart-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.cart-drawer-header h2 {
    color: var(--dark);
    font-size: 1.45rem;
    letter-spacing: -.035em;
}

.cart-drawer-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #f2f4f7;
    color: var(--dark);
    font-size: 1.8rem;
}

.cart-expiry-notice {
    margin-bottom: 18px;
    padding: 10px 12px;
    border-radius: 11px;
    background: #f5f7fa;
    color: var(--muted);
    font-size: .8rem;
    line-height: 1.45;
}

.cart-items {
    display: grid;
    gap: 10px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
}

.cart-item-image {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    border-radius: 11px;
    object-fit: cover;
    background: #f3f4f6;
}

.cart-item-details {
    display: grid;
    flex: 1;
    min-width: 0;
    gap: 5px;
}

.cart-item-details strong {
    overflow: hidden;
    color: var(--dark);
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-details span {
    color: var(--muted);
    font-size: .8rem;
}

.cart-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-quantity-controls button {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f3f5f8;
    color: var(--dark);
    font-size: 1rem;
    font-weight: 800;
}

.cart-quantity-controls button:hover {
    background: #ffe9df;
    color: var(--orange-dark);
}

.cart-quantity-controls span {
    min-width: 16px;
    text-align: center;
    font-weight: 800;
}

.cart-empty-state,
.orders-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 28px 16px;
    border: 1px dashed #d7dce5;
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
    line-height: 1.45;
}

.cart-empty-state[hidden] {
    display: none;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 0;
    padding: 16px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--dark);
}

.cart-total-row strong {
    font-size: 1.05rem;
}

.cart-checkout-form {
    display: grid;
    gap: 9px;
}

.cart-checkout-form[hidden] {
    display: none;
}

.cart-checkout-form h3 {
    margin: 2px 0 6px;
    color: var(--dark);
    font-size: 1rem;
}

.cart-checkout-form label {
    color: #475467;
    font-size: .82rem;
    font-weight: 750;
}

.cart-checkout-form input,
.cart-checkout-form textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #e1e5ec;
    border-radius: 11px;
    outline: none;
    background: #fbfcfe;
    color: var(--dark);
}

.cart-checkout-form input:focus,
.cart-checkout-form textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232, 93, 42, .12);
}

.cart-feedback {
    min-height: 1.3em;
    color: #526071;
    font-size: .84rem;
}

.cart-submit-button {
    width: 100%;
}

.cart-submit-button:disabled {
    cursor: wait;
    opacity: .65;
}

.orders-section {
    scroll-margin-top: 90px;
}

.orders-heading {
    margin-bottom: 20px;
}

.orders-heading .catalogue-eyebrow {
    margin-bottom: 6px;
}

.order-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 16px;
}

.order-card {
    padding: 18px;
    border: 1px solid #e9edf3;
    border-radius: 18px;
    background: linear-gradient(160deg, #fff, #fbfcfe);
    box-shadow: 0 6px 20px rgba(23, 32, 51, .045);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.order-number {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.order-card-header h3 {
    margin: 4px 0;
    color: var(--dark);
    font-size: 1.07rem;
}

.order-phone {
    color: var(--orange-dark);
    font-size: .87rem;
    font-weight: 750;
}

.order-status {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    background: #fff1e9;
    color: #ab451f;
    font-size: .72rem;
    font-weight: 850;
    white-space: nowrap;
}

.order-status-confirmed,
.order-status-ready {
    background: #eaf8ef;
    color: #187344;
}

.order-status-preparing {
    background: #fff6df;
    color: #926100;
}

.order-status-completed {
    background: #edf2ff;
    color: #4259a8;
}

.order-status-cancelled {
    background: #fff0f0;
    color: #aa3030;
}

.order-items-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 13px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    list-style: none;
}

.order-items-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #475467;
    font-size: .86rem;
}

.order-items-list li strong {
    color: var(--dark);
    white-space: nowrap;
}

.order-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f6f7f9;
    color: #526071;
    font-size: .84rem;
    line-height: 1.45;
}

.order-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 13px;
    color: var(--muted);
    font-size: .78rem;
}

.order-card-footer strong {
    color: var(--dark);
    font-size: .84rem;
    white-space: nowrap;
}

.order-status-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: end;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.order-status-form label {
    grid-column: 1/-1;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 750;
}

.order-status-form .form-control {
    min-width: 0;
    padding: 9px 11px;
    font-size: .85rem;
}

.orders-empty span {
    font-size: 1.8rem;
}

.orders-empty strong {
    color: var(--dark);
}

.orders-empty p {
    font-size: .88rem;
}

@media (max-width:600px) {
    .floating-cart-button {
        right: 14px;
        bottom: 14px;
        padding: 12px 14px;
    }

    .cart-drawer {
        padding: 20px 16px;
    }

    .order-card {
        padding: 15px;
    }

    .order-card-footer {
        flex-direction: column;
        gap: 5px;
    }

    .orders-heading {
        flex-direction: column;
    }
}

.category-management-layout {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.category-form-sidebar {
    position: sticky;
    top: 96px;
    padding: 20px;
    border: 1px solid #f0e5df;
    border-radius: 18px;
    background: linear-gradient(160deg, #fff8f4, #fff);
}

.category-form-intro {
    margin-bottom: 20px;
}

.category-form-intro>span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border-radius: 13px;
    background: #ffede4;
    color: var(--orange-dark);
    font-size: 1.4rem;
    font-weight: 700;
}

.category-form-intro h3,
.category-list-heading h3 {
    color: var(--dark);
    font-size: 1rem;
    letter-spacing: -.02em;
}

.category-form-intro p {
    margin-top: 6px;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.45;
}

.category-create-form {
    display: grid;
    gap: 9px;
}

.category-create-form label {
    color: #475467;
    font-size: .82rem;
    font-weight: 750;
}

.category-create-form .btn {
    width: 100%;
    margin-top: 4px;
}

.category-list-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid #edf0f5;
    border-radius: 18px;
    background: #fff;
}

.category-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.category-list-panel .table-responsive {
    margin-top: 10px;
}

@media (max-width:760px) {
    .category-management-layout {
        grid-template-columns: 1fr;
    }

    .category-form-sidebar {
        position: static;
    }

    .category-list-panel {
        padding: 14px 10px;
    }
}

/* EmGuide — nouvelle direction visuelle : nuit botanique, ivoire et citron vert */
:root {
    --orange: #c8f36a;
    --orange-dark: #35513d;
    --primary: #c8f36a;
    --primary-dark: #a9d94c;
    --dark: #172820;
    --muted: #718078;
    --soft: #f4f5ee;
    --line: #e3e8dd;
    --white: #fffefa;
    --shadow: 0 26px 70px rgba(24, 44, 32, .14);
    --shadow-md: 0 12px 34px rgba(24, 44, 32, .07);
    --card-bg: #fffefa;
    --border-color: #e3e8dd;
    --text-main: #172820;
    --text-muted: #718078;
}

html {
    scroll-behavior: smooth;
}

body {
    color: #172820;
    background: #f3f4ed;
}

.app-shell {
    width: min(1120px, 100%);
    padding: 24px 24px 60px;
}

.hero {
    min-height: 310px;
    padding: 28px 34px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 34px;
    background: radial-gradient(ellipse at 88% 15%, rgba(200, 243, 106, .22), transparent 27%), linear-gradient(125deg, #10251b, #1d392b 58%, #274b35);
    box-shadow: 0 30px 80px rgba(19, 42, 28, .22);
}

.hero::before {
    content: "";
    position: absolute;
    right: 11%;
    bottom: -105px;
    width: 275px;
    height: 275px;
    border: 1px solid rgba(200, 243, 106, .26);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(200, 243, 106, .045), 0 0 0 58px rgba(200, 243, 106, .035);
}

.hero::after {
    right: 14%;
    bottom: -72px;
    width: 210px;
    height: 210px;
    background: linear-gradient(135deg, rgba(200, 243, 106, .36), rgba(200, 243, 106, .04));
}

.hero-top {
    margin-bottom: 34px;
}

.logo {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .08);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}

.logo img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.hero h1 {
    max-width: 640px;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    line-height: .98;
    letter-spacing: -.065em;
}

.hero .eyebrow {
    color: #d3f58b;
}

.hero p:not(.eyebrow) {
    max-width: 500px;
    color: rgba(248, 250, 243, .78);
    font-size: 1rem;
}

.version-pill {
    padding: 7px 11px;
    border: 1px solid rgba(200, 243, 106, .28);
    background: rgba(200, 243, 106, .1);
    color: #e1f6bb;
}

.install-btn {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.nav-actions .btn-primary {
    border: 0;
    background: #c8f36a;
    color: #193121;
    box-shadow: none;
}

.nav-actions .btn-danger {
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    background: transparent;
    color: #f9fbf5;
}

.quick-actions {
    gap: 12px;
    margin: 18px 0;
}

.action,
.ghost {
    min-height: 58px;
    border: 1px solid #e3e8dd;
    border-radius: 17px;
    background: #fffefa;
    box-shadow: 0 8px 22px rgba(24, 44, 32, .045);
    font-weight: 800;
}

.action.primary {
    background: #c8f36a;
    color: #193121;
    box-shadow: 0 8px 20px rgba(125, 163, 57, .19);
}

.action:hover,
.ghost:hover {
    transform: translateY(-2px);
    border-color: #c8d5c3;
}

.action.primary:hover {
    background: #b8e95c;
}

.search-box input {
    min-height: 60px;
    border: 1px solid #e0e6dc;
    border-radius: 17px;
    background: #fffefa;
    box-shadow: 0 8px 24px rgba(24, 44, 32, .04);
}

.search-box input:focus {
    border-color: #7e9e5c;
    box-shadow: 0 0 0 4px rgba(141, 176, 100, .13);
}

.section-title {
    margin: 28px 0 16px;
}

.section-title h2 {
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -.04em;
}

.section-title span {
    background: #e7efd9;
    color: #38533d;
}

.structures-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
    gap: 14px;
}

.structure-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 15px;
    padding: 14px;
    border: 1px solid #e4e9df;
    border-radius: 22px;
    background: #fffefa;
    box-shadow: 0 9px 26px rgba(24, 44, 32, .045);
}

.structure-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 17px 34px rgba(24, 44, 32, .09);
}

.structure-img {
    border-radius: 18px;
}

.structure-card h3 {
    letter-spacing: -.025em;
}

.tag {
    background: #eef5e5;
    color: #415e3f;
}

.status-pill.open {
    color: #2e6b48;
    background: #e4f5e7;
}

.detail-panel {
    border-color: #e1e8dc;
    background: #fffefa;
}

.detail-cover-wrap {
    border-radius: 24px;
}

.contact-btn.call {
    background: #ecf3e8;
    color: #33543e;
}

.contact-btn.whatsapp {
    background: #dcf3d9;
    color: #246442;
}

.menu-item {
    border-radius: 16px;
}

.menu-item.is-selected {
    border-color: #84a95d;
    background: #f4f8eb;
}

.selection-count {
    background: #e7efd9;
    color: #36513c;
}

.send-selection {
    background: linear-gradient(135deg, #c8f36a, #a7d74f);
    color: #183020;
    box-shadow: 0 10px 24px rgba(123, 161, 63, .2);
}

.scanner-panel,
.update-box {
    border: 1px solid #e3e8dd;
    border-radius: 22px;
    background: #fffefa;
    box-shadow: var(--shadow-md);
}

.scanner-panel::before {
    background: linear-gradient(90deg, #c8f36a, #86ad5e);
}

.toast {
    border-radius: 14px;
    background: #172820;
    box-shadow: 0 14px 38px rgba(24, 44, 32, .22);
}

.saas-header {
    border-bottom: 1px solid rgba(225, 232, 220, .85);
    background: rgba(250, 251, 246, .88);
}

.saas-container {
    max-width: 1240px;
    gap: 24px;
}

.saas-card,
.panel,
.panel.form-panel {
    border: 1px solid #e4e9df;
    border-radius: 24px;
    background: #fffefa;
    box-shadow: 0 12px 35px rgba(24, 44, 32, .055);
}

.card-header h2,
.panel.form-panel h1 {
    letter-spacing: -.045em;
}

.btn,
.btn-primary {
    border-radius: 13px;
    background: #c8f36a;
    color: #193121;
    box-shadow: 0 7px 16px rgba(123, 161, 63, .15);
}

.btn:hover,
.btn-primary:hover {
    background: #b7e658;
    color: #193121;
    box-shadow: 0 10px 23px rgba(123, 161, 63, .2);
}

.btn-danger-soft,
.btn-danger {
    background: #fce8e5;
    color: #ad493a;
    box-shadow: none;
}

.btn-outline-danger {
    border-color: #d88b7f;
    color: #a7493c;
}

.btn-outline-danger:hover {
    background: #a7493c;
    color: white;
}

.form-control,
.grid-form-backoffice input,
.grid-form-backoffice select,
.grid-form-backoffice textarea {
    border-color: #e0e6dc;
    border-radius: 13px;
    background: #fbfcf7;
}

.form-control:focus {
    border-color: #89a96b;
    box-shadow: 0 0 0 4px rgba(137, 169, 107, .13);
}

.saas-table th {
    background: #f5f7f0;
    color: #708078;
}

.saas-table tr:hover td {
    background: #f8faf3;
}

.catalogue-body {
    background: radial-gradient(ellipse at 10% 0%, #e7efdc 0, transparent 30%), #f3f4ed;
}

.catalogue-body .saas-header {
    background: rgba(248, 249, 242, .9);
}

.catalogue-container {
    max-width: 1360px;
}

.catalogue-articles-card {
    border-radius: 28px;
}

.catalogue-section-heading h1 {
    color: #172820;
    font-size: clamp(1.65rem, 3.2vw, 2.25rem);
    letter-spacing: -.055em;
}

.catalogue-eyebrow {
    color: #66834e;
}

.catalogue-article-count {
    background: #e7efd9;
    color: #38533d;
}

.catalogue-article-card {
    border-color: #e7eadf;
    border-radius: 21px;
    background: #fffefa;
}

.catalogue-article-image-wrap {
    background: #edf0e8;
}

.catalogue-article-category {
    color: #66834e;
}

.catalogue-article-price {
    color: #253d2e;
}

.catalogue-add-to-cart {
    background: #eaf2df;
    color: #33513b;
}

.catalogue-add-to-cart:hover,
.catalogue-add-to-cart.is-added {
    background: #c8f36a;
    color: #183020;
}

.catalogue-searchbar {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 660px;
    min-height: 58px;
    margin: 0 0 8px;
    padding: 0 14px;
    border: 1px solid #dfe5d9;
    border-radius: 17px;
    background: #fffefa;
    box-shadow: 0 8px 24px rgba(24, 44, 32, .04);
}

.catalogue-search-icon {
    color: #64834d;
    font-size: 1.75rem;
    line-height: 1;
    transform: rotate(-20deg);
}

.catalogue-searchbar input {
    flex: 1;
    min-width: 0;
    height: 54px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #172820;
    font-size: .95rem;
}

.catalogue-searchbar input::placeholder {
    color: #9ba69c;
}

.catalogue-searchbar:focus-within {
    border-color: #91aa72;
    box-shadow: 0 0 0 4px rgba(137, 169, 107, .12);
}

.catalogue-searchbar button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #eef2e9;
    color: #526b50;
    font-size: 1.4rem;
}

.catalogue-searchbar button[hidden] {
    display: none;
}

.catalogue-search-status {
    margin: 0 0 16px;
    color: #7a887d;
    font-size: .8rem;
}

.catalogue-no-results {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 38px 16px;
    border: 1px dashed #ccd6c7;
    border-radius: 19px;
    color: #77857a;
    text-align: center;
}

.catalogue-no-results[hidden] {
    display: none;
}

.catalogue-no-results span {
    color: #719254;
    font-size: 2rem;
}

.catalogue-no-results strong {
    color: #263d2e;
}

.catalogue-gallery-notice {
    border-color: #dbe8c9;
    background: #f4f8eb;
    color: #435b3c;
}

.floating-cart-button {
    background: linear-gradient(135deg, #c8f36a, #a8d94e);
    color: #1b3121;
    box-shadow: 0 14px 34px rgba(76, 110, 47, .26);
}

.floating-cart-count {
    background: #193121;
    color: #d7f59a;
}

.cart-drawer {
    background: #fbfcf7;
}

.cart-drawer-header h2 {
    color: #172820;
}

.cart-drawer-close {
    background: #e9eee4;
}

.cart-item-row,
.order-card,
.category-list-panel {
    border-color: #e4e9df;
    background: #fffefa;
}

.cart-quantity-controls button {
    background: #edf2e8;
}

.cart-quantity-controls button:hover {
    background: #c8f36a;
    color: #193121;
}

.cart-expiry-notice {
    background: #eef3e8;
    color: #61745e;
}

.order-status {
    background: #f0f4e8;
    color: #536b43;
}

.order-status-confirmed,
.order-status-ready {
    background: #e4f5e7;
    color: #2e6b48;
}

.order-status-preparing {
    background: #f7f0dc;
    color: #886c24;
}

.order-status-completed {
    background: #e9f0e8;
    color: #405f47;
}

.category-form-sidebar {
    border-color: #e2eadb;
    background: linear-gradient(155deg, #f4f7ed, #fffefa);
}

.category-form-intro>span {
    background: #e7efd9;
    color: #38533d;
}

.category-list-heading .catalogue-article-count {
    background: #e7efd9;
}

.badge-tag {
    background: #eef5e5;
    color: #415e3f;
}

.page-form {
    background: radial-gradient(ellipse at 50% 0%, #e5edd9, transparent 45%), #f3f4ed;
}

.panel.form-panel::before {
    height: 6px;
    background: linear-gradient(90deg, #c8f36a, #6d9470, #263e30);
}

@media (min-width:900px) {
    .hero {
        padding: 32px 42px;
    }

    .hero-top {
        margin-bottom: 42px;
    }
}

@media (max-width:720px) {
    .app-shell {
        padding: 12px 14px 34px;
    }

    .hero {
        min-height: 280px;
        padding: 22px;
        border-radius: 27px;
    }

    .hero::before {
        right: -15px;
        width: 190px;
        height: 190px;
    }

    .hero::after {
        right: 0;
        width: 145px;
        height: 145px;
    }

    .hero-top {
        margin-bottom: 28px;
    }

    .structures-list {
        grid-template-columns: 1fr;
    }

    .catalogue-searchbar {
        max-width: none;
    }
}

/* EmGuide — alternate professional palette: petrol blue, mist, and soft copper */
:root {
    --orange: #14818b;
    --orange-dark: #0e5d67;
    --primary: #14818b;
    --primary-dark: #0e5d67;
    --dark: #152d3d;
    --muted: #687d89;
    --soft: #f1f5f6;
    --line: #dce6e9;
    --white: #ffffff;
    --shadow: 0 24px 64px rgba(20, 48, 64, .12);
    --shadow-md: 0 12px 32px rgba(20, 48, 64, .065);
    --card-bg: rgba(255, 255, 255, .92);
    --border-color: #dce6e9;
    --text-main: #152d3d;
    --text-muted: #687d89;
}

body {
    color: #152d3d;
    background: radial-gradient(ellipse at 8% 0%, rgba(20, 129, 139, .09), transparent 29%), #edf2f4;
}

.app-shell {
    width: min(1160px, 100%);
    padding: 22px 24px 56px;
}

.hero {
    min-height: 286px;
    padding: 28px 36px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 30px;
    background: radial-gradient(ellipse at 88% 15%, rgba(76, 177, 181, .26), transparent 30%), linear-gradient(125deg, #112c3d 0%, #174457 62%, #20616a 100%);
    box-shadow: 0 26px 64px rgba(17, 48, 65, .2);
}

.hero::before {
    content: "";
    position: absolute;
    right: 12%;
    bottom: -100px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(206, 229, 221, .22);
    border-radius: 50%;
    box-shadow: 0 0 0 30px rgba(206, 229, 221, .045), 0 0 0 65px rgba(206, 229, 221, .03);
}

.hero::after {
    right: 15%;
    bottom: -75px;
    width: 190px;
    height: 190px;
    background: linear-gradient(140deg, rgba(95, 185, 183, .32), rgba(211, 154, 103, .12));
}

.hero-top {
    margin-bottom: 32px;
}

.logo {
    width: 66px;
    height: 66px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 19px;
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}

.logo img {
    width: 60px;
    height: 60px;
}

.hero .eyebrow {
    color: #bfe6dc;
}

.hero h1 {
    max-width: 650px;
    font-size: clamp(2.4rem, 5.6vw, 4.2rem);
    letter-spacing: -.06em;
}

.hero p:not(.eyebrow) {
    max-width: 510px;
    color: rgba(246, 250, 249, .78);
}

.version-pill {
    border: 1px solid rgba(195, 225, 220, .2);
    background: rgba(255, 255, 255, .09);
    color: #d7ece8;
}

.install-btn {
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .1);
}

.nav-actions .btn-primary {
    background: #d39a67;
    color: #253947;
}

.nav-actions .btn-danger {
    border: 1px solid rgba(255, 255, 255, .24);
    background: transparent;
}

.quick-actions {
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
}

.action,
.ghost {
    border: 1px solid rgba(212, 225, 228, .9);
    border-radius: 15px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 22px rgba(20, 48, 64, .045);
}

.action.primary {
    background: #14818b;
    color: #fff;
    box-shadow: 0 9px 20px rgba(20, 129, 139, .18);
}

.action.primary:hover {
    background: #0e6b75;
}

.search-box input {
    min-height: 58px;
    border: 1px solid #d8e4e7;
    border-radius: 15px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 8px 22px rgba(20, 48, 64, .045);
}

.search-box input:focus,
.catalogue-searchbar:focus-within {
    border-color: #65a7aa;
    box-shadow: 0 0 0 4px rgba(20, 129, 139, .11);
}

.section-title h2 {
    color: #183648;
    font-size: 1.32rem;
    letter-spacing: -.035em;
}

.section-title span {
    background: #dff0ef;
    color: #176b73;
}

.structures-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.structure-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 13px;
    border: 1px solid rgba(214, 226, 229, .95);
    border-radius: 19px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 23px rgba(20, 48, 64, .05);
}

.structure-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(20, 48, 64, .09);
}

.structure-img {
    border-radius: 15px;
}

.tag {
    background: #e6f1f1;
    color: #176873;
}

.status-pill.open {
    color: #216c57;
    background: #e2f2eb;
}

.detail-panel {
    border-color: #dce6e9;
    background: rgba(255, 255, 255, .96);
}

.contact-btn.call {
    background: #e4f0f3;
    color: #185c70;
}

.contact-btn.whatsapp {
    background: #e4f2ea;
    color: #286c4e;
}

.menu-item.is-selected {
    border-color: #53a0a4;
    background: #eff8f7;
}

.selection-count {
    background: #e0f0ef;
    color: #176b73;
}

.send-selection {
    background: linear-gradient(135deg, #168994, #0d6975);
    color: #fff;
    box-shadow: 0 9px 22px rgba(20, 129, 139, .18);
}

.scanner-panel,
.update-box {
    border: 1px solid #dce6e9;
    border-radius: 19px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow-md);
}

.scanner-panel::before {
    background: linear-gradient(90deg, #14818b, #7ebcb4, #d39a67);
}

.toast {
    background: #173749;
}

.saas-header {
    border-bottom: 1px solid rgba(211, 225, 229, .78);
    background: rgba(246, 249, 250, .88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.saas-card,
.panel,
.panel.form-panel {
    border: 1px solid rgba(216, 228, 231, .88);
    border-radius: 21px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 34px rgba(20, 48, 64, .06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.saas-container {
    max-width: 1220px;
    gap: 22px;
}

.card-header h2,
.panel.form-panel h1 {
    color: #173548;
    letter-spacing: -.04em;
}

.btn,
.btn-primary {
    border-radius: 12px;
    background: linear-gradient(135deg, #188994, #0f6e79);
    color: #fff;
    box-shadow: 0 6px 15px rgba(20, 129, 139, .16);
}

.btn:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #137580, #0d5e68);
    color: #fff;
    box-shadow: 0 9px 20px rgba(20, 129, 139, .22);
}

.btn-danger-soft,
.btn-danger {
    background: #f7e9e4;
    color: #9e523f;
    box-shadow: none;
}

.btn-outline-danger {
    border-color: #c7836f;
    color: #9e523f;
}

.btn-outline-danger:hover {
    background: #9e523f;
    color: white;
}

.form-control,
.grid-form-backoffice input,
.grid-form-backoffice select,
.grid-form-backoffice textarea {
    border-color: #d9e4e7;
    border-radius: 12px;
    background: rgba(250, 252, 252, .92);
}

.form-control:focus {
    border-color: #65a7aa;
    box-shadow: 0 0 0 4px rgba(20, 129, 139, .11);
}

.saas-table th {
    background: #f1f6f7;
    color: #667d88;
}

.saas-table tr:hover td {
    background: #f5f9f9;
}

.catalogue-body {
    background: radial-gradient(ellipse at 8% 0%, rgba(20, 129, 139, .09), transparent 29%), #edf2f4;
}

.catalogue-body .saas-header {
    background: rgba(246, 249, 250, .88);
}

.catalogue-container {
    grid-template-columns: minmax(255px, 310px) minmax(0, 1fr);
    gap: 22px;
    max-width: 1380px;
}

.catalogue-articles-card {
    border-radius: 23px;
}

.catalogue-section-heading h1 {
    color: #173548;
    letter-spacing: -.05em;
}

.catalogue-eyebrow {
    color: #56848b;
}

.catalogue-article-count {
    background: #e1eeee;
    color: #176b73;
}

.catalogue-article-card {
    border-color: #dfe8e9;
    border-radius: 18px;
    background: rgba(255, 255, 255, .94);
}

.catalogue-article-image-wrap {
    background: #eaf0f1;
}

.catalogue-article-category {
    color: #427980;
}

.catalogue-article-price {
    color: #173548;
}

.catalogue-add-to-cart {
    background: #e1eeee;
    color: #145e68;
}

.catalogue-add-to-cart:hover,
.catalogue-add-to-cart.is-added {
    background: #14818b;
    color: #fff;
}

.catalogue-searchbar {
    border: 1px solid #d8e4e7;
    border-radius: 15px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 8px 22px rgba(20, 48, 64, .045);
}

.catalogue-search-icon {
    color: #287c84;
}

.catalogue-searchbar input {
    color: #173548;
}

.catalogue-searchbar button {
    background: #e6eff0;
    color: #356d75;
}

.catalogue-search-status {
    color: #71838b;
}

.catalogue-no-results {
    border-color: #cddde0;
    color: #71838b;
}

.catalogue-no-results span {
    color: #c08353;
}

.catalogue-no-results strong {
    color: #173548;
}

.catalogue-gallery-notice {
    border-color: #d3e5e6;
    background: #edf6f5;
    color: #315f66;
}

.floating-cart-button {
    background: linear-gradient(135deg, #188994, #0f6e79);
    color: white;
    box-shadow: 0 12px 30px rgba(20, 98, 112, .27);
}

.floating-cart-count {
    background: #f1c79c;
    color: #243e4a;
}

.cart-drawer {
    background: rgba(250, 252, 251, .98);
}

.cart-drawer-header h2 {
    color: #173548;
}

.cart-drawer-close {
    background: #e8eff0;
}

.cart-item-row,
.order-card,
.category-list-panel {
    border-color: #dfe8e9;
    background: rgba(255, 255, 255, .94);
}

.cart-quantity-controls button {
    background: #e7eff0;
}

.cart-quantity-controls button:hover {
    background: #14818b;
    color: white;
}

.cart-expiry-notice {
    background: #eaf2f3;
    color: #607b84;
}

.order-status {
    background: #eaf1f2;
    color: #41646e;
}

.order-status-confirmed,
.order-status-ready {
    background: #e3f2eb;
    color: #286c4e;
}

.order-status-preparing {
    background: #f7efe3;
    color: #8c6739;
}

.order-status-completed {
    background: #e4eff1;
    color: #376d78;
}

.category-form-sidebar {
    border-color: #d6e4e6;
    background: linear-gradient(155deg, rgba(232, 243, 244, .94), rgba(255, 255, 255, .92));
}

.category-form-intro>span {
    background: #dceced;
    color: #176b73;
}

.category-list-heading .catalogue-article-count {
    background: #e1eeee;
}

.badge-tag {
    background: #e6f1f1;
    color: #176873;
}

.page-form {
    background: radial-gradient(ellipse at 50% 0%, rgba(20, 129, 139, .1), transparent 44%), #edf2f4;
}

.panel.form-panel::before {
    height: 5px;
    background: linear-gradient(90deg, #14818b, #6ba9a7, #d39a67);
}

@media (min-width:900px) {
    .hero {
        padding: 30px 40px;
    }

    .hero-top {
        margin-bottom: 38px;
    }
}

@media (max-width:800px) {
    .structures-list {
        grid-template-columns: 1fr;
    }

    .catalogue-container {
        grid-template-columns: 1fr;
        max-width: 680px;
    }

    .catalogue-sidebar {
        position: static;
    }
}

@media (max-width:720px) {
    .app-shell {
        padding: 12px 14px 36px;
    }

    .hero {
        min-height: 260px;
        padding: 21px;
        border-radius: 24px;
    }

    .hero::before {
        right: -25px;
        width: 180px;
        height: 180px;
    }

    .hero::after {
        right: -2px;
        width: 135px;
        height: 135px;
    }

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

/* Final catalogue and editor overrides */
.catalogue-container {
    grid-template-columns: minmax(370px, 420px) minmax(0, 1fr);
    gap: 32px;
    width: min(1480px, calc(100% - 48px));
    max-width: 1480px;
}

.catalogue-sidebar,
.catalogue-content,
.catalogue-sidebar .saas-card {
    min-width: 0;
    width: 100%;
}

.catalogue-body .sidebar-card {
    padding: 18px;
}

.catalogue-body .detail-cover-wrap {
    width: 100%;
    height: 230px;
}

.catalogue-body .detail-head,
.catalogue-body .info-grid,
.catalogue-body .contact-actions {
    margin-left: 14px;
    margin-right: 14px;
    width: auto;
    min-width: 0;
}

.catalogue-body .info-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
}

.catalogue-body .info-grid>div {
    min-width: 0;
}

.catalogue-body .info-grid div strong {
    display: block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.catalogue-body .detail-head h2,
.catalogue-body .detail-description {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.catalogue-body .contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.catalogue-body .contact-btn {
    min-width: 0;
    padding: 11px 8px;
    font-size: .88rem;
}

.catalogue-body .contact-btn strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.article-admin-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.btn-outline-primary {
    border: 1px solid #70a8ad;
    background: rgba(224, 240, 241, .55);
    color: #155c67;
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: #14818b;
    color: white;
}

.article-edit-container {
    max-width: 900px;
}

.article-edit-card {
    padding: clamp(22px, 4vw, 38px);
}

.article-edit-card h1 {
    color: #173548;
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    letter-spacing: -.05em;
}

.edit-image-section {
    display: grid;
    gap: 10px;
}

.edit-image-label {
    color: #526d78;
    font-size: .82rem;
    font-weight: 800;
}

.edit-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 10px;
}

.edit-image-grid img {
    width: 100%;
    height: 96px;
    border: 1px solid #dce6e9;
    border-radius: 12px;
    background: #edf2f4;
    object-fit: cover;
}

.article-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 8px;
}

@media (max-width:960px) {
    .catalogue-container {
        grid-template-columns: 1fr;
        width: min(720px, calc(100% - 28px));
        gap: 18px;
    }

    .catalogue-sidebar {
        position: static;
    }
}

@media (max-width:560px) {
    .catalogue-body .detail-cover-wrap {
        height: 190px;
    }

    .catalogue-body .detail-head,
    .catalogue-body .info-grid,
    .catalogue-body .contact-actions {
        margin-left: 18px;
        margin-right: 18px;
    }

    .catalogue-body .info-grid {
        padding: 15px;
    }

    .article-admin-actions {
        justify-content: flex-start;
    }

    .article-edit-actions {
        flex-direction: column-reverse;
    }

    .article-edit-actions .btn {
        width: 100%;
    }
}

/* Perfomei reference direction adapted to EmGuide: editorial cosmetics, dusty rose, warm ivory */
:root {
    --orange: #90677f;
    --orange-dark: #68485c;
    --primary: #90677f;
    --primary-dark: #68485c;
    --dark: #272228;
    --muted: #817780;
    --soft: #faf7f6;
    --line: #ebe3e5;
    --white: #fffdfc;
    --shadow: 0 22px 55px rgba(68, 45, 59, .12);
    --shadow-md: 0 10px 28px rgba(68, 45, 59, .065);
    --card-bg: rgba(255, 253, 252, .94);
    --border-color: #ebe3e5;
    --text-main: #272228;
    --text-muted: #817780;
}

body {
    color: #272228;
    background: radial-gradient(ellipse at 10% 0%, rgba(186, 144, 163, .14), transparent 32%), #faf7f6;
}

h1,
h2,
h3,
.catalogue-section-heading h1,
.detail-head h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: -.035em;
}

.app-shell {
    width: min(1180px, 100%);
}

.hero {
    min-height: 280px;
    border-radius: 8px;
    background: radial-gradient(ellipse at 84% 18%, rgba(255, 255, 255, .17), transparent 25%), linear-gradient(118deg, #a98396 0%, #8c687f 48%, #70546d 100%);
    box-shadow: 0 24px 55px rgba(92, 63, 80, .18);
}

.hero::before {
    content: "";
    position: absolute;
    right: 13%;
    bottom: -125px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    box-shadow: 0 0 0 36px rgba(255, 255, 255, .045), 0 0 0 74px rgba(255, 255, 255, .03);
}

.hero::after {
    right: 17%;
    bottom: -88px;
    width: 215px;
    height: 215px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(238, 213, 222, .06));
}

.hero .eyebrow {
    color: #faeaf0;
    letter-spacing: .18em;
}

.hero h1 {
    max-width: 700px;
    font-size: clamp(2.45rem, 5.4vw, 4.25rem);
    line-height: 1.02;
}

.hero p:not(.eyebrow) {
    color: rgba(255, 250, 250, .84);
}

.logo {
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    box-shadow: 0 8px 24px rgba(65, 43, 57, .16);
}

.version-pill {
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 4px;
    background: rgba(255, 255, 255, .13);
    color: #fff9fb;
}

.nav-actions .btn-primary {
    background: #fffaf8;
    color: #76566c;
}

.nav-actions .btn-danger {
    border-color: rgba(255, 255, 255, .42);
    color: #fff;
}

.install-btn {
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 4px;
    background: rgba(255, 255, 255, .13);
}

.quick-actions {
    gap: 10px;
}

.action,
.ghost {
    border: 1px solid #e8dfe2;
    border-radius: 5px;
    background: rgba(255, 253, 252, .92);
    color: #302830;
    box-shadow: 0 7px 20px rgba(68, 45, 59, .045);
    font-weight: 750;
}

.action.primary {
    background: #90677f;
    color: white;
    box-shadow: 0 8px 18px rgba(105, 70, 91, .19);
}

.action.primary:hover {
    background: #76566c;
}

.search-box input {
    border: 1px solid #e8dfe2;
    border-radius: 5px;
    background: rgba(255, 253, 252, .94);
}

.section-title h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
    font-weight: 500;
}

.section-title span {
    border-radius: 4px;
    background: #f0e5e9;
    color: #795a70;
}

.structures-list {
    gap: 16px;
}

.structure-card {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 16px;
    border: 1px solid rgba(232, 222, 225, .9);
    border-radius: 5px;
    background: rgba(255, 253, 252, .92);
    box-shadow: 0 8px 24px rgba(68, 45, 59, .045);
}

.structure-card:hover {
    box-shadow: 0 16px 32px rgba(68, 45, 59, .09);
}

.structure-img {
    width: 100px;
    height: 100px;
    border-radius: 3px;
}

.structure-card h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.18rem;
    font-weight: 500;
}

.tag {
    border-radius: 3px;
    background: #f0e6ea;
    color: #77586e;
}

.status-pill {
    border-radius: 3px;
}

.detail-panel {
    border-color: #eadfe3;
    border-radius: 10px 10px 0 0;
    background: rgba(255, 253, 252, .97);
}

.detail-cover-wrap {
    border-radius: 4px;
}

.detail-head h2 {
    font-size: 1.7rem;
}

.contact-btn {
    border-radius: 4px;
}

.contact-btn.call {
    background: #f1e9ec;
    color: #76566c;
}

.menu-item {
    border-radius: 4px;
}

.menu-item.is-selected {
    border-color: #a77e95;
    background: #fbf3f6;
}

.selection-count {
    border-radius: 4px;
    background: #f0e5e9;
    color: #76566c;
}

.send-selection {
    border-radius: 4px;
    background: linear-gradient(110deg, #90677f, #76566c);
    color: white;
}

.scanner-panel,
.update-box {
    border: 1px solid #eadfe3;
    border-radius: 7px;
    background: rgba(255, 253, 252, .94);
}

.scanner-panel::before {
    background: linear-gradient(90deg, #90677f, #c79aaa, #dfc7ac);
}

.toast {
    border-radius: 5px;
    background: #493843;
}

.saas-header {
    border-bottom: 1px solid rgba(232, 222, 225, .88);
    background: rgba(255, 253, 252, .9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.saas-container {
    max-width: 1240px;
}

.saas-card,
.panel,
.panel.form-panel {
    border: 1px solid rgba(232, 222, 225, .9);
    border-radius: 7px;
    background: rgba(255, 253, 252, .94);
    box-shadow: 0 10px 30px rgba(68, 45, 59, .055);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card-header h2,
.panel.form-panel h1 {
    font-family: Georgia, "Times New Roman", serif;
    color: #332832;
    font-weight: 500;
}

.btn,
.btn-primary {
    border: 1px solid transparent;
    border-radius: 4px;
    background: #90677f;
    color: #fff;
    box-shadow: none;
}

.btn:hover,
.btn-primary:hover {
    background: #76566c;
    color: white;
    box-shadow: 0 7px 17px rgba(105, 70, 91, .17);
}

.btn-danger-soft,
.btn-danger {
    border-radius: 4px;
    background: #f5e9e9;
    color: #92585e;
    box-shadow: none;
}

.btn-outline-danger {
    border-color: #b9898d;
    border-radius: 4px;
    color: #86575c;
}

.form-control,
.grid-form-backoffice input,
.grid-form-backoffice select,
.grid-form-backoffice textarea {
    border: 1px solid #e8dfe2;
    border-radius: 4px;
    background: rgba(255, 255, 255, .8);
}

.form-control:focus {
    border-color: #b48b9f;
    box-shadow: 0 0 0 3px rgba(144, 103, 127, .12);
}

.saas-table th {
    background: #f7f1f2;
    color: #82757e;
}

.saas-table td {
    border-color: #eee7e8;
}

.catalogue-body {
    background: radial-gradient(ellipse at 8% 0%, rgba(186, 144, 163, .12), transparent 30%), #faf7f6;
}

.catalogue-body .saas-header {
    background: rgba(255, 253, 252, .9);
}

.catalogue-articles-card {
    border-radius: 7px;
}

.catalogue-section-heading h1 {
    color: #30262e;
}

.catalogue-eyebrow {
    color: #9a7188;
}

.catalogue-article-count {
    border-radius: 4px;
    background: #f0e5e9;
    color: #795a70;
}

.catalogue-article-card {
    border: 1px solid #eee6e8;
    border-radius: 5px;
    background: rgba(255, 253, 252, .96);
    box-shadow: 0 7px 22px rgba(68, 45, 59, .04);
}

.catalogue-article-card:hover {
    box-shadow: 0 14px 30px rgba(68, 45, 59, .1);
}

.catalogue-article-image-wrap {
    background: #f4eff0;
}

.catalogue-article-category {
    color: #9a7188;
}

.catalogue-article-price {
    color: #4c3a47;
}

.catalogue-add-to-cart {
    border-radius: 4px;
    background: #f1e7eb;
    color: #76566c;
}

.catalogue-add-to-cart:hover,
.catalogue-add-to-cart.is-added {
    background: #90677f;
    color: white;
}

.catalogue-searchbar {
    border: 1px solid #e8dfe2;
    border-radius: 5px;
    background: rgba(255, 253, 252, .94);
}

.catalogue-search-icon {
    color: #90677f;
}

.catalogue-searchbar button {
    border-radius: 4px;
    background: #f0e7ea;
    color: #795a70;
}

.catalogue-searchbar:focus-within {
    border-color: #b48b9f;
    box-shadow: 0 0 0 3px rgba(144, 103, 127, .1);
}

.catalogue-no-results {
    border-color: #dfcfd6;
    border-radius: 5px;
}

.catalogue-no-results span {
    color: #a77e95;
}

.catalogue-gallery-notice {
    border-color: #e7d8de;
    border-radius: 4px;
    background: #f8eff2;
    color: #745a69;
}

.floating-cart-button {
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 4px;
    background: #76566c;
    color: white;
    box-shadow: 0 12px 28px rgba(91, 62, 80, .23);
}

.floating-cart-count {
    border-radius: 3px;
    background: #f0dbe2;
    color: #68485c;
}

.cart-drawer-overlay {
    background: rgba(47, 34, 44, .38);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.cart-drawer {
    background: rgba(255, 253, 252, .97);
}

.cart-drawer-close,
.cart-quantity-controls button {
    border-radius: 4px;
    background: #f1e8eb;
    color: #76566c;
}

.cart-item-row,
.order-card,
.category-list-panel {
    border-color: #eee5e7;
    border-radius: 5px;
    background: rgba(255, 253, 252, .95);
}

.cart-expiry-notice {
    border-radius: 4px;
    background: #f5eef0;
    color: #806e79;
}

.order-status {
    border-radius: 4px;
    background: #f1e8eb;
    color: #76566c;
}

.order-status-confirmed,
.order-status-ready {
    background: #e8f1e9;
    color: #466d50;
}

.order-status-preparing {
    background: #f5eddf;
    color: #896d42;
}

.order-status-completed {
    background: #e9edf2;
    color: #4f6477;
}

.category-form-sidebar {
    border: 1px solid #eadfe3;
    border-radius: 5px;
    background: linear-gradient(145deg, rgba(246, 237, 240, .9), rgba(255, 253, 252, .95));
}

.category-form-intro>span {
    border-radius: 4px;
    background: #f0e2e8;
    color: #76566c;
}

.category-list-panel {
    border-radius: 5px;
}

.badge-tag {
    border-radius: 3px;
    background: #f0e6ea;
    color: #795a70;
}

.page-form {
    background: radial-gradient(ellipse at 50% 0%, rgba(186, 144, 163, .15), transparent 42%), #faf7f6;
}

.panel.form-panel::before {
    height: 4px;
    background: linear-gradient(90deg, #90677f, #c79aaa, #dfc7ac);
}

.article-edit-card h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
}

.edit-image-grid img {
    border-color: #eadfe3;
    border-radius: 4px;
}

.btn-outline-primary {
    border: 1px solid #b995a7;
    border-radius: 4px;
    background: #f5edf0;
    color: #76566c;
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: #90677f;
    color: #fff;
}

@media (max-width:760px) {
    .hero {
        min-height: 250px;
    }

    .hero::before {
        right: -40px;
        width: 190px;
        height: 190px;
    }

    .hero::after {
        right: -4px;
        width: 145px;
        height: 145px;
    }

    .structure-card {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .structure-img {
        width: 78px;
        height: 78px;
    }
}