﻿/* =============================================================
   AtemisCloud POS Web — Charte ANNAM
   Couleurs : rouge laque #A81D1D, or #C9A24A, noir #1A1A1A, ivoire #FAF7F2
   Polices : Cinzel (titres), Inter (interface)
   =============================================================

   ORGANISATION DU FICHIER
   -----------------------
    1. Variables CSS (couleurs, espacements)
    2. Reset et base (html, body)
    3. APP SHELL                          (header, footer, navigation)
    4. LOGIN                              (page d'accueil de connexion)
    5. KEYPAD                             (clavier numérique : login + cash)
    6. CAISSE                             (écran principal de prise de commande)
    7. ENCAISSEMENT                       (page de paiement)
    8. TICKET                             (ticket fiscal après paiement)
    9. RESPONSIVE iPhone et petits écrans (caisse)
   10. KDS — Itération 2                  (écran cuisine)
       10a. BANDEAU "Commandes prêtes au comptoir"
       10b. LIGNES PANIER état "envoyée en cuisine"
       10c. BOUTON "Envoyer en cuisine"
       10d. ÉCRAN KDS CUISINE
       10e. RESPONSIVE KDS sur iPad
   11. PAGE D'ACCUEIL CAISSIER + sélection table
   12. TOGGLE Caisse / Back-office
   13. ADMIN SHELL                        (sidebar + content)
   14. DASHBOARD                          (back-office, KPIs et graphes)
   15. RESPONSIVE ADMIN
   16. MODALE OPTIONS PRODUIT             (Itération C)
   17. SOUS-LIGNES MODIFIERS DANS PANIER
   18. KDS structure modifiers verticaux  (Itération C3b)

   CONVENTIONS
   -----------
   - Couleurs : utiliser var(--annam-*) plutôt que hardcoder le hex
   - Padding/margin : valeurs en px (pas en rem) pour cohérence
   - Animations : transition 0.15s ease-out par défaut
   - Border-radius : --radius (12px) ou variantes (8px boutons, 16px cartes)
   - Pour ajouter un nouveau composant : créer une section commentée

   ============================================================= */

:root {
    /* === Couleurs principales ANNAM === */
    --annam-red:        #A81D1D;
    --annam-red-dark:   #7E1414;
    --annam-gold:       #ffbe00;
    --annam-gold-dark:  #A6843D;
    --annam-black:      #1A1A1A;
    --annam-ivory:      #FAF7F2;
    --annam-text:       #2A2A2A;
    --annam-muted:      #6E6E6E;
    --annam-border:     #E5DFD5;

    /* === Variantes rouge === */
    --annam-red-50:       #fff5f5;
    --annam-red-50-warm:  #fef9f7;
    --annam-red-100:      #fde0e0;
    --annam-red-300:      #d04545;
    --annam-red-700:      #8a1f1f;
    --annam-red-bright:   #FF453A;

    /* === Variantes or === */
    --annam-gold-50:    #fffaeb;
    --annam-gold-600:   #B8901A;
    --annam-gold-700:   #7a5e0a;

    /* === Vert (succès, validation) === */
    --annam-green-50:   #f0fbf4;
    --annam-green-100:  #d4f4dd;
    --annam-green-400:  #56b378;
    --annam-green-600:  #2D7A3E;
    --annam-green-700:  #1a6b34;

    /* === Orange (modifs cuisine) === */
    --annam-orange-700: #A85F1D;

    /* === Neutres crème (entre ivoire et bord) === */
    --annam-cream-100:  #F5F5F0;
    --annam-cream-200:  #f0ece0;
    --annam-cream-300:  #e0d5c0;
    --annam-cream-400:  #d0c8b8;

    /* === Échelle de gris (utilitaires) === */
    --gray-500:         #888;
    --gray-600:         #666;
    --gray-700:         #555;

    /* === Pures === */
    --white:            #fff;
    --black:            #000;

    /* === Ombres === */
    --annam-shadow:     0 4px 16px rgba(26, 26, 26, 0.08);
    --annam-shadow-lg:  0 8px 32px rgba(26, 26, 26, 0.12);

    /* === Rayons === */
    --radius:           12px;

    /* === Espacements (réservé pour le futur) === */
    --space-xs:         4px;
    --space-sm:         8px;
    --space-md:         16px;
    --space-lg:         24px;
    --space-xl:         32px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--annam-text);
    background: var(--annam-ivory);
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}

#blazor-error-ui {
    background: var(--annam-red);
    color: white;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
#blazor-error-ui a { color: white; text-decoration: underline; }

/* ============================================================
   APP SHELL
   ============================================================ */

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

.app-header {
    background:linear-gradient(135deg, var(--annam-gold) 0%, var(--annam-red) 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--annam-shadow);
    flex-shrink: 0;
    border-bottom: solid 2px var(--annam-black);
}

.app-star {
    width:30px;
}

.app-title {
   height:40px;
}

.employee-pill {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.9rem;
}

.employee-pill small { color: rgba(255, 255, 255, 0.6); margin-left: 0.25rem; }

.app-content {
    flex: 1;
    overflow: hidden;
}

/* ============================================================
   LOGIN
   ============================================================ */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--annam-gold) 0%, var(--annam-red) 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--annam-shadow-lg);
}

.login-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 8px auto;
    display: block;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: none;
}



/* Au cas où d'anciennes règles parasites existent encore */
.login-card .text-center,
.login-card:focus,
.login-card:focus-visible {
    outline: none;
}

.pin-leds {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding: 0.5rem;
}

.pin-led {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--annam-border);
    background: white;
    transition: all 0.15s;
}

.pin-led-on {
    background: var(--annam-red);
    border-color: var(--annam-red);
    box-shadow: 0 0 8px rgba(168, 29, 29, 0.4);
}

/* ============================================================
   KEYPAD (login + cash)
   ============================================================ */

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.key-btn {
    background: white;
    border: 1px solid var(--annam-border);
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--annam-text);
    cursor: pointer;
    transition: all 0.1s;
    min-height: 60px;
}

.key-btn:hover:not(:disabled) {
    background: var(--annam-ivory);
    border-color: var(--annam-gold);
}

.key-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.key-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.key-secondary {
    background: var(--annam-ivory);
    color: var(--annam-muted);
    font-size: 1rem;
}

.key-validate {
    background: var(--annam-red);
    color: white;
    border-color: var(--annam-red);
}

.key-validate:hover:not(:disabled) {
    background: var(--annam-red-dark);
    border-color: var(--annam-red-dark);
}

.small-keypad {
    margin-top: 1rem;
}
.small-keypad .key-btn {
    min-height: 48px;
    font-size: 1.2rem;
    padding: 0.5rem;
}

/* ============================================================
   CAISSE
   ============================================================ */

.caisse-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.caisse-products {
    padding: 1rem;
    overflow-y: auto;
    background: var(--annam-ivory);
}

.category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cat-btn {
    background: white;
    border: 1px solid var(--annam-border);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: var(--annam-text);
    cursor: pointer;
    transition: all 0.15s;
}

.cat-btn:hover { border-color: var(--annam-gold); }

.cat-btn.active {
    background: var(--annam-red);
    color: white;
    border-color: var(--annam-red);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.product-card {
    background: white;
    border: 1px solid var(--annam-border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card:hover:not(:disabled) {
    border-color: var(--annam-gold);
    box-shadow: var(--annam-shadow);
    transform: translateY(-2px);
}

.product-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--annam-text);
    line-height: 1.3;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--annam-red);
    margin-top: 0.5rem;
}

/* Cart */

.caisse-cart {
    background: white;
    border-left: 1px solid var(--annam-border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

.cart-title {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    color: var(--annam-black);
    margin: 0 0 1rem;
}

.order-lines {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    flex: 1;
    overflow-y: auto;
}

.order-line {
    border-bottom: 1px solid var(--annam-border);
    padding: 0.75rem 0;
}

.line-name {
    font-weight: 500;
    color: var(--annam-text);
}

.line-total {
    font-weight: 700;
    color: var(--annam-red);
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--annam-border);
    background: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--annam-text);
}

.qty-btn:hover:not(:disabled) {
    background: var(--annam-ivory);
    border-color: var(--annam-gold);
}

.qty-value {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-totals {
    border-top: 2px solid var(--annam-border);
    padding-top: 1rem;
    margin-bottom: 1rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.total-grand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--annam-black);
    margin-top: 0.5rem;
}

.btn-encaisser {
    background: var(--annam-red);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.15s;
}

.btn-encaisser:hover:not(:disabled) {
    background: var(--annam-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--annam-shadow);
}

.btn-encaisser:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   ENCAISSEMENT
   ============================================================ */

.encaissement-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.encaissement-summary {
    background: white;
    border-right: 1px solid var(--annam-border);
    padding: 1.25rem;
    overflow-y: auto;
}

.section-title {
    font-family: 'Cinzel', serif;
    color: var(--annam-black);
    font-size: 1.2rem;
    margin: 0 0 1rem;
}

.summary-lines {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.summary-lines li {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--annam-border);
    font-size: 0.95rem;
}

.line-qty {
    color: var(--annam-muted);
    font-weight: 600;
}

.summary-total, .summary-paid, .summary-remaining {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--annam-border);
}

.summary-total {
    font-size: 1.2rem;
    font-weight: 700;
    border-top: 2px solid var(--annam-border);
    border-bottom: 2px solid var(--annam-border);
    padding: 0.75rem 0;
    margin-top: 0.5rem;
}

.summary-paid { color: var(--annam-muted); }

.summary-remaining {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--annam-red);
}

.payments-already {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--annam-border);
}

.payments-title {
    font-size: 0.9rem;
    color: var(--annam-muted);
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.payments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.payments-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

.encaissement-actions {
    padding: 1.5rem;
    overflow-y: auto;
    background: var(--annam-ivory);
}

.method-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.method-tab {
    background: white;
    border: 2px solid var(--annam-border);
    border-radius: var(--radius);
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--annam-text);
    cursor: pointer;
    transition: all 0.15s;
}

.method-tab:hover:not(:disabled):not(.active) {
    border-color: var(--annam-gold);
}

.method-tab.active {
    background: var(--annam-red);
    color: white;
    border-color: var(--annam-red);
}

.cash-pad, .card-external-box, .mv-box {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--annam-shadow);
}

.cash-label, .mv-label {
    margin: 0 0 0.5rem;
    color: var(--annam-muted);
    font-size: 0.9rem;
}

.amount-display {
    background: var(--annam-ivory);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Inter', monospace;
    color: var(--annam-black);
    margin-bottom: 1rem;
}

.quick-cash {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.quick-cash button {
    background: var(--annam-ivory);
    border: 1px solid var(--annam-border);
    border-radius: var(--radius);
    padding: 0.7rem;
    font-weight: 600;
    cursor: pointer;
}

.quick-cash button:hover:not(:disabled) {
    background: white;
    border-color: var(--annam-gold);
}

.cash-change {
    background: var(--annam-gold);
    color: var(--annam-black);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
}

.change-value { font-size: 1.3rem; font-weight: 700; }

.btn-validate-payment {
    background: var(--annam-red);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
}

.btn-validate-payment:hover:not(:disabled) {
    background: var(--annam-red-dark);
}

.btn-validate-payment:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cb-instruction {
    font-size: 1.1rem;
    color: var(--annam-text);
    margin: 0 0 0.5rem;
}

.cb-amount {
    font-size: 1.5rem;
    text-align: center;
    margin: 1rem 0;
    color: var(--annam-red);
}

.cb-note {
    color: var(--annam-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================================
   TICKET
   ============================================================ */

.ticket-page {
    max-width: 480px;
    margin: 1.5rem auto;
    padding: 1rem;
}

.ticket-confirmation {
    background: var(--annam-green-600);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.ticket-check {
    font-size: 1.5rem;
    background: rgba(255,255,255,0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-paper {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--annam-shadow);
    font-family: 'Inter', monospace;
}

.ticket-header { text-align: center; }

.ticket-restaurant {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--annam-red);
    letter-spacing: 0.1em;
}

.ticket-address {
    color: var(--annam-muted);
    font-size: 0.85rem;
    margin: 0.25rem 0 0.75rem;
}

.ticket-meta {
    font-size: 0.85rem;
    color: var(--annam-muted);
}

.ticket-meta div { padding: 0.1rem 0; }

.ticket-paper hr {
    border: none;
    border-top: 1px dashed var(--annam-border);
    margin: 0.75rem 0;
}

.ticket-line {
    padding: 0.2rem 0;
}

.line-main {
    display: flex;
    justify-content: space-between;
}

.vat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--annam-muted);
    padding: 0.15rem 0;
}

.ticket-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--annam-black);
    padding: 0.5rem 0;
}

.ticket-payment-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 0.15rem 0;
}

.ticket-footer {
    text-align: center;
    margin-top: 0.5rem;
}

.ticket-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ticket-actions button { flex: 1; padding: 0.75rem; }

@media print {
    .app-header, .ticket-confirmation, .ticket-actions { display: none; }
    .ticket-page { margin: 0; padding: 0; max-width: 80mm; }
    .ticket-paper { box-shadow: none; padding: 0.5rem; }
}

/* ============================================================
   RESPONSIVE — iPhone et petits écrans
   ============================================================ */

@media (max-width: 768px) {
    .caisse-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .caisse-cart {
        border-left: none;
        border-top: 1px solid var(--annam-border);
        max-height: 50vh;
    }
    .encaissement-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .encaissement-summary {
        border-right: none;
        border-bottom: 1px solid var(--annam-border);
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .app-title { height:40px; }
    .login-card { padding: 1.5rem; }
    .key-btn { min-height: 50px; font-size: 1.2rem; padding: 0.75rem; }
}
/* =============================================================
   AJOUTS CSS — Itération 2 KDS
   À CONCATÉNER à la fin de AtemisCloud.POS.Web/wwwroot/css/site.css
   ============================================================= */

/* ============================================================
   BANDEAU "COMMANDES PRÊTES AU COMPTOIR" sur la caisse
   ============================================================ */

.ready-banner {
    background: linear-gradient(135deg, var(--annam-gold) 0%, var(--annam-gold-dark) 100%);
    color: var(--annam-black);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--annam-shadow);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ready-banner-icon {
    font-size: 1.6rem;
    animation: ring 1s ease-in-out 3;
}

@keyframes ring {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.ready-banner-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 1rem;
}

.ready-chip {
    background: rgba(26, 26, 26, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* ============================================================
   LIGNES PANIER — état "envoyée en cuisine"
   ============================================================ */

.order-line-sent {
    background: rgba(168, 29, 29, 0.04);
    border-left: 3px solid var(--annam-red);
    padding-left: 0.5rem !important;
}

.line-sent-badge {
    display: inline-block;
    margin-right: 0.35rem;
    font-size: 0.95rem;
}

/* ============================================================
   BOUTON "ENVOYER EN CUISINE"
   ============================================================ */

.btn-send-kitchen {
    background: var(--annam-gold);
    color: var(--annam-black);
    border: none;
    border-radius: var(--radius);
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-bottom: 0.5rem;
    transition: all 0.15s;
}

.btn-send-kitchen:hover:not(:disabled) {
    background: var(--annam-gold-dark);
    transform: translateY(-1px);
    box-shadow: var(--annam-shadow);
}

.btn-send-kitchen:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   ÉCRAN KDS CUISINE
   ============================================================ */

.kds-screen {
    background: #0F0F12;
    color: var(--annam-cream-100);
    min-height: 100vh;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.kds-header {
    background: var(--annam-black);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--annam-gold);
}

.kds-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.kds-icon { font-size: 1.8rem; }

.kds-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-size: 1.1rem;
}

.kds-count {
    background: var(--annam-red);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-weight: 700;
}

.kds-clock {
    color: var(--annam-gold);
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
}

.kds-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6E6E78;
    font-size: 1.5rem;
}

.kds-empty-icon {
    font-size: 5rem;
    color: var(--annam-green-600);
    margin-bottom: 1rem;
}

.kds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    padding: 1rem;
    flex: 1;
}

.kds-card {
    background: #1E1E24;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    border-left: 6px solid var(--annam-gold);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.15s;
}

.kds-card.kds-fresh { border-left-color: #30D158; }
.kds-card.kds-warm { border-left-color: var(--annam-gold); }
.kds-card.kds-late {
    border-left-color: var(--annam-red-bright);
    animation: pulse-late 2s ease-in-out infinite;
}

@keyframes pulse-late {
    0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.4); }
    50%      { box-shadow: 0 4px 24px rgba(255, 69, 58, 0.5); }
}

.kds-card-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: baseline;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.kds-card-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--annam-gold);
    font-family: 'Cinzel', serif;
}

.kds-card-table {
    color: #C8C8CD;
    font-size: 0.95rem;
}

.kds-card-wait {
    background: rgba(255,255,255,0.08);
    color: var(--annam-cream-100);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.95rem;
}

.kds-card.kds-late .kds-card-wait {
    background: var(--annam-red-bright);
    color: white;
}

.kds-lines {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    flex: 1;
}

.kds-line {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 1.15rem;
}

.kds-line:last-child { border-bottom: none; }

.kds-qty {
    color: var(--annam-gold);
    font-weight: 700;
    font-family: monospace;
}

.kds-name {
    color: var(--annam-cream-100);
    font-weight: 500;
    line-height: 1.3;
}

.kds-note {
    grid-column: 2;
    color: #FFB84D;
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 0.25rem;
}

.kds-ready-btn {
    background: var(--annam-green-600);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s;
    margin-top: auto;
}

.kds-ready-btn:hover:not(:disabled) {
    background: #34A04F;
    transform: translateY(-2px);
}

.kds-ready-btn:active:not(:disabled) { transform: scale(0.97); }

.kds-ready-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* L'écran KDS est full-screen sans header de l'app principale.
   Le header app est masqué via CSS dans la page Kitchen.razor elle-même. */
.kds-screen ~ * .app-header,
body:has(.kds-screen) .app-header {
    display: none;
}

/* ============================================================
   RESPONSIVE — KDS sur iPad portrait ou paysage
   ============================================================ */

@media (max-width: 768px) {
    .kds-grid {
        grid-template-columns: 1fr;
    }
    .ready-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}


/* ---- Bandeau contextuel sur Caisse ---- */

.caisse-context {
    background: var(--annam-ivory);
    border-bottom: 1px solid var(--annam-cream-300);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.btn-back-home {
    background: transparent;
    border: 1px solid var(--annam-gold);
    color: var(--annam-black);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-back-home:hover {
    background: var(--annam-gold);
    color: var(--white);
}

.context-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.context-label {
    font-size: 16px;
    color: var(--annam-black);
}

.context-order {
    font-size: 13px;
    color: var(--gray-500);
}

.btn-transfer {
    background: var(--white);
    border: 1px solid var(--annam-red-300);
    color: var(--annam-red-300);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.btn-transfer:hover:not(:disabled) {
    background: var(--annam-red-300);
    color: var(--white);
}

/* ---- Dialog transfert de table ---- */

.modal-backdrop-custom {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.modal-card h3 {
    font-family: 'Cinzel', serif;
    margin-bottom: 16px;
    color: var(--annam-black);
}

.transfer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.transfer-btn {
    background: var(--annam-green-50);
    border: 1px solid var(--annam-green-400);
    color: var(--annam-green-700);
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
}

.transfer-btn:hover:not(:disabled) {
    background: var(--annam-green-400);
    color: var(--white);
}

/* ---- Encaissement : badge contexte + toggle partiel ---- */

.encaissement-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--annam-ivory);
    border-radius: 8px;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.ctx-badge {
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 14px;
}

.ctx-onsite {
    background: var(--annam-green-100);
    color: var(--annam-green-700);
}

.ctx-takeaway {
    background: #fde9d4;
    color: #7a4a0a;
}

.ctx-order-num {
    color: var(--gray-500);
    font-size: 13px;
}

.ticket-service-mode {
    text-align: center;
    margin-top: 8px;
    padding: 6px 0;
    background: var(--annam-ivory);
    border-radius: 4px;
    font-size: 14px;
    color: var(--annam-black);
}

/* Toggle paiement complet / partiel */

.payment-mode-toggle {
    display: flex;
    gap: 4px;
    margin: 12px 0;
    padding: 4px;
    background: var(--annam-cream-200);
    border-radius: 8px;
}

.payment-mode-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-500);
    transition: all 0.15s;
}

.payment-mode-toggle button.active {
    background: var(--white);
    color: var(--annam-black);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.payment-mode-toggle button:hover:not(:disabled):not(.active) {
    color: var(--annam-black);
}

/* Responsive : mobile */

@media (max-width: 767px) {
    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .table-card {
        min-height: 80px;
        padding: 10px 6px;
    }

    .table-card .table-name {
        font-size: 18px;
    }

    .btn-counter-takeaway {
        font-size: 18px;
        padding: 20px;
    }

    .btn-counter-icon {
        font-size: 28px;
    }

    .caisse-context {
        flex-wrap: wrap;
        gap: 8px;
    }
}

.login-title {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--annam-black);
    margin: 8px 0 4px 0;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Empêche le titre d'être tabbable et de prendre le focus initial */
    -webkit-tap-highlight-color: transparent;
}

    .login-title:focus,
    .login-title:focus-visible,
    .login-title:active {
        outline: none;
        border: none;
        box-shadow: none;
        background: transparent;
    }

.login-subtitle {
    color: var(--gray-500);
    font-size: 14px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    outline: none;
    text-align: center;
}

.login-star {
    font-size: 32px;
    color: var(--annam-gold);
    margin-bottom: 4px;
    border: none;
    background: transparent;
    outline: none;
}

/* Au cas où c'est la div .text-center (parent) qui hérite d'un focus */
.login-card .text-center {
    outline: none;
}

/* Le card lui-même ne doit pas avoir de focus visible parasite */
.login-card:focus,
.login-card:focus-visible {
    outline: none;
}

/* ---- En-tête du panneau commande avec kebab à droite ---- */

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

    .cart-header .cart-title {
        margin: 0;
        flex: 1;
    }

/* ---- Menu kebab (3 points) ---- */

.kebab-wrapper {
    position: relative;
    display: inline-block;
}

.btn-kebab {
    background: transparent;
    border: 1px solid var(--annam-cream-400);
    color: var(--annam-black);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

    .btn-kebab:hover:not(:disabled) {
        background: var(--annam-ivory);
        border-color: var(--annam-gold);
    }

    .btn-kebab:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.kebab-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--annam-cream-300);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
}

.kebab-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 14px;
    color: var(--annam-black);
    cursor: pointer;
    font-family: inherit;
}

    .kebab-item:hover:not(.kebab-disabled) {
        background: var(--annam-ivory);
    }

.kebab-disabled {
    color: #aaa;
    cursor: default;
    font-style: italic;
}

/* Overlay invisible qui ferme le menu si clic en dehors */
.kebab-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: transparent;
}

.home-screen {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ---- Bouton "Comptoir / À emporter" ---- */

.btn-counter-takeaway {
    width: 100%;
    background: linear-gradient(135deg, var(--annam-gold) 0%, var(--annam-red) 100%);
    color: var(--annam-black);
    border: none;
    border-radius: 16px;
    padding: 28px;
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201, 162, 74, 0.4);
    margin-bottom: 24px;
    transition: transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

    .btn-counter-takeaway:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(201, 162, 74, 0.5);
    }

    .btn-counter-takeaway:active:not(:disabled) {
        transform: translateY(0);
    }

.btn-counter-icon {
    font-size: 36px;
}

/* ---- Légende ---- */

.tables-legend {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.legend-chip {
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid transparent;
}

    .legend-chip.legend-free {
        background: var(--annam-green-50);
        color: var(--annam-green-700);
        border-color: var(--annam-green-400);
    }

    .legend-chip.legend-progress {
        background: var(--annam-red-50);
        color: var(--annam-red-700);
        border-color: var(--annam-red-300);
    }

    .legend-chip.legend-ready {
        background: var(--annam-gold-50);
        color: var(--annam-gold-700);
        border-color: var(--annam-gold);
    }

/* ---- Titres de section ---- */

.home-section-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--annam-black);
    margin: 32px 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--annam-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .home-section-title:first-of-type {
        margin-top: 8px;
    }

.section-icon {
    font-size: 20px;
}

/* ---- Grille des tables ---- */

.tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

/* ---- Carte table ---- */

.table-card {
    background: var(--white);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px 12px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

    .table-card:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    }

    .table-card:active:not(:disabled) {
        transform: translateY(0);
    }

    .table-card:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .table-card .table-name {
        font-family: 'Cinzel', serif;
        font-size: 24px;
        font-weight: 700;
        line-height: 1;
    }

    .table-card .table-status {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-weight: 600;
    }

    .table-card .table-amount {
        font-size: 18px;
        font-weight: 800;
    }

    /* ---- Variantes par état (avec couleurs FORTES) ---- */

    /* Libre : vert pâle, accent vert */
    .table-card.table-free {
        background: var(--annam-green-50);
        border-color: var(--annam-green-400);
    }

        .table-card.table-free .table-name {
            color: var(--annam-green-700);
        }

        .table-card.table-free .table-status {
            color: var(--annam-green-700);
        }

    /* En cours : rouge pâle, accent rouge */
    .table-card.table-progress {
        background: var(--annam-red-50);
        border-color: var(--annam-red-300);
    }

        .table-card.table-progress .table-name {
            color: var(--annam-red-700);
        }

        .table-card.table-progress .table-amount {
            color: var(--annam-red-700);
        }

        .table-card.table-progress .table-status {
            color: var(--annam-red-700);
        }

    /* À encaisser : or pâle, accent or, pulsation discrète */
    .table-card.table-ready {
        background: var(--annam-gold-50);
        border-color: var(--annam-gold);
        animation: table-ready-pulse 2s ease-in-out infinite;
    }

        .table-card.table-ready .table-name {
            color: var(--annam-gold-700);
        }

        .table-card.table-ready .table-amount {
            color: var(--annam-gold-700);
            font-weight: 800;
        }

        .table-card.table-ready .table-status {
            color: var(--annam-gold-700);
            font-weight: 700;
        }

@keyframes table-ready-pulse {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(201, 162, 74, 0.3);
    }

    50% {
        box-shadow: 0 4px 14px rgba(201, 162, 74, 0.7);
    }
}

/* ---- Responsive (mobile) ---- */

@media (max-width: 767px) {
    .home-screen {
        padding: 16px;
    }

    .tables-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .table-card {
        min-height: 90px;
        padding: 12px 8px;
    }

        .table-card .table-name {
            font-size: 20px;
        }

        .table-card .table-amount {
            font-size: 15px;
        }

    .btn-counter-takeaway {
        font-size: 18px;
        padding: 20px;
    }

    .btn-counter-icon {
        font-size: 28px;
    }

    .home-section-title {
        font-size: 18px;
        margin: 24px 0 12px 0;
    }
}

/* ========================================
   TOGGLE Caisse / Back-office (login)
   ======================================== */

.dest-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--annam-cream-200);
    border-radius: 10px;
}

.dest-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray-500);
    font-size: 14px;
    transition: all 0.15s;
}

.dest-toggle button.active {
    background: var(--white);
    color: var(--annam-black);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dest-toggle button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   ADMIN SHELL : sidebar + content
   ======================================== */

.admin-shell {
    display: flex;
    min-height: 100vh;
    background: var(--annam-ivory);
}

.admin-sidebar {
    width: 240px;
    background: var(--annam-black);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.12);
}

.admin-brand {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--annam-text);
}

.admin-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.admin-brand-text {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--annam-gold);
    letter-spacing: 1px;
}

.admin-nav {
    flex: 1;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--annam-cream-300);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.admin-nav-link:hover {
    background: var(--annam-text);
    color: var(--white);
}

.admin-nav-link.active {
    background: var(--annam-gold);
    color: var(--annam-black);
    font-weight: 600;
}

.admin-nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--annam-text);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.admin-user-name {
    color: var(--white);
    font-weight: 600;
    font-size: 14px;
}

.admin-user-role {
    color: var(--annam-gold);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-back-caisse,
.btn-logout {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #444;
    background: transparent;
    color: var(--annam-cream-300);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s;
}

.btn-back-caisse:hover {
    background: var(--annam-gold);
    color: var(--annam-black);
    border-color: var(--annam-gold);
}

.btn-logout:hover {
    background: var(--annam-red);
    color: var(--white);
    border-color: var(--annam-red);
}

.admin-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* ========================================
   DASHBOARD
   ======================================== */

.dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--annam-gold);
    padding-bottom: 12px;
}

.dashboard-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    color: var(--annam-black);
    margin: 0;
}

.dashboard-date {
    color: var(--gray-500);
    font-size: 14px;
}

/* KPI cards */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 4px solid var(--annam-gold);
}

.kpi-card.kpi-card-primary {
    border-top-color: var(--annam-red);
    background: linear-gradient(135deg, var(--white) 0%, var(--annam-red-50-warm) 100%);
}

.kpi-label {
    font-size: 13px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.kpi-value {
    font-family: 'Cinzel', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--annam-black);
    line-height: 1.1;
    margin-bottom: 8px;
}

.kpi-card-primary .kpi-value {
    color: var(--annam-red);
}

.kpi-baseline {
    font-size: 13px;
    color: var(--gray-600);
}

/* Sections */

.dashboard-section {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.dashboard-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--annam-black);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--annam-cream-200);
}

.section-hint {
    font-size: 13px;
    color: var(--gray-500);
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

.legend-dot.legend-today { background: var(--annam-red); }
.legend-dot.legend-avg { background: var(--annam-gold); }

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

.section-head-with-tabs h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.period-tabs {
    display: flex;
    gap: 4px;
    background: var(--annam-cream-200);
    padding: 4px;
    border-radius: 8px;
}

.period-tabs button {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    font-weight: 500;
}

.period-tabs button.active {
    background: var(--white);
    color: var(--annam-black);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Tableaux */

.table-responsive {
    overflow-x: auto;
}

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

.dashboard-table thead th {
    background: var(--annam-ivory);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--annam-cream-300);
}

.dashboard-table thead th.num {
    text-align: right;
}

.dashboard-table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--annam-cream-200);
    font-size: 14px;
}

.dashboard-table tbody td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.dashboard-table tbody tr:hover {
    background: var(--annam-ivory);
}

.dashboard-table tbody tr.row-counter {
    background: var(--annam-red-50-warm);
    font-weight: 600;
}

.dashboard-table tbody tr.row-counter:hover {
    background: #fef0eb;
}

/* Chart horaire */

.hourly-chart {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hourly-row {
    display: grid;
    grid-template-columns: 50px 1fr 220px;
    align-items: center;
    gap: 12px;
}

.hourly-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 13px;
}

.hourly-bars {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hourly-bar {
    height: 12px;
    border-radius: 3px;
    min-width: 1px;
}

.hourly-bar-today {
    background: var(--annam-red);
}

.hourly-bar-avg {
    background: var(--annam-gold);
}

.hourly-amount {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.amount-today { color: var(--annam-red); font-weight: 600; }
.amount-avg { color: var(--annam-gold); }

/* Top produits */

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

.top-product-row {
    display: grid;
    grid-template-columns: 36px 1fr 160px;
    align-items: center;
    gap: 12px;
}

.top-rank {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--annam-gold);
    text-align: center;
}

.top-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.top-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--annam-black);
}

.top-cat {
    color: var(--gray-500);
    font-weight: 400;
    font-size: 12px;
}

.top-bar-wrapper {
    background: var(--annam-cream-200);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.top-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--annam-red) 0%, var(--annam-red-300) 100%);
    border-radius: 4px;
    min-width: 4px;
}

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

.top-qty {
    font-size: 13px;
    font-weight: 600;
    color: var(--annam-black);
}

.top-revenue {
    font-size: 12px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

/* ========================================
   Responsive admin
   ======================================== */

@media (max-width: 1024px) {
    .admin-sidebar {
        width: 200px;
    }

    .admin-content {
        padding: 20px;
    }

    .hourly-row {
        grid-template-columns: 40px 1fr 140px;
    }

    .top-product-row {
        grid-template-columns: 32px 1fr 120px;
    }
}

@media (max-width: 767px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
    }

    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
    }

    .admin-nav-link {
        flex-direction: column;
        gap: 4px;
        padding: 8px 12px;
        white-space: nowrap;
    }

    .admin-nav-link span:not(.admin-nav-icon) {
        font-size: 11px;
    }

    .admin-sidebar-footer {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .admin-user {
        margin: 0;
        flex: 1;
    }

    .btn-back-caisse,
    .btn-logout {
        width: auto;
        flex-shrink: 0;
    }
}


.admin-page {
    max-width: 1400px;
    margin: 0 auto;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--annam-gold);
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-page-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 26px;
    color: var(--annam-black);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input {
    width: 240px;
}

/* ---- Boutons primary / secondary / danger ---- */

.btn-primary-action,
.btn-secondary-action,
.btn-danger-action {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary-action {
    background: var(--annam-red);
    color: var(--white);
}

.btn-primary-action:hover:not(:disabled) {
    background: var(--annam-red-700);
    transform: translateY(-1px);
}

.btn-secondary-action {
    background: var(--white);
    color: var(--annam-black);
    border: 1px solid var(--annam-cream-400);
}

.btn-secondary-action:hover:not(:disabled) {
    background: var(--annam-cream-100);
    border-color: var(--annam-gold);
}

.btn-danger-action {
    background: var(--white);
    color: var(--annam-red);
    border: 1px solid var(--annam-red);
}

.btn-danger-action:hover:not(:disabled) {
    background: var(--annam-red);
    color: var(--white);
}

.btn-primary-action:disabled,
.btn-secondary-action:disabled,
.btn-danger-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---- Layout liste + formulaire à droite ---- */

.admin-page-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
}

/* En l'absence de panel d'édition, la liste prend tout */
.admin-page-grid:not(:has(.admin-form-panel)) {
    grid-template-columns: 1fr;
}

.admin-list {
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.admin-form-panel {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-top: 4px solid var(--annam-gold);
    position: sticky;
    top: 16px;
}

.admin-form-panel h2 {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--annam-black);
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--annam-cream-200);
}

.form-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
}

.form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.form-actions > button {
    flex: 1;
    min-width: 100px;
}

.form-secondary-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-hint {
    margin-bottom: 0;
    font-size: 12px;
    line-height: 1.4;
}

.reset-pin-box {
    background: var(--annam-ivory);
    border-radius: 8px;
    padding: 12px;
}

/* ---- Lignes table : variations d'état ---- */

.row-editing {
    background: var(--annam-red-50-warm) !important;
    border-left: 3px solid var(--annam-red);
}

.row-unavailable td {
    opacity: 0.55;
}

.row-inactive {
    background: #f7f5f0;
}

.row-inactive td {
    opacity: 0.7;
}

td.actions {
    text-align: right;
    white-space: nowrap;
}

.btn-row-edit {
    background: transparent;
    border: 1px solid var(--annam-cream-400);
    color: var(--annam-black);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.12s;
}

.btn-row-edit:hover:not(:disabled) {
    background: var(--annam-gold);
    color: var(--annam-black);
    border-color: var(--annam-gold);
}

/* ---- Toggle disponibilité (Produits) ---- */

.availability-toggle {
    border: none;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.availability-toggle.available {
    background: var(--annam-green-100);
    color: var(--annam-green-700);
}

.availability-toggle.available:hover:not(:disabled) {
    background: #b5e8c5;
}

.availability-toggle.unavailable {
    background: var(--annam-red-100);
    color: var(--annam-red-700);
}

.availability-toggle.unavailable:hover:not(:disabled) {
    background: #f8c8c8;
}

/* ---- Tag catégorie (Produits) ---- */

.cat-tag {
    background: var(--annam-cream-200);
    color: var(--gray-700);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
}

/* ---- Badge statut employé ---- */

.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: var(--annam-green-100);
    color: var(--annam-green-700);
}

.status-inactive {
    background: #f0e8d8;
    color: var(--gray-500);
}

/* ---- Color picker (Catégories) ---- */

.color-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-input-row input[type="color"] {
    width: 60px;
    height: 38px;
    padding: 4px;
    cursor: pointer;
}

.color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-right: 6px;
    vertical-align: middle;
}

.color-hex {
    font-family: monospace;
    font-size: 12px;
    color: var(--gray-500);
}

.btn-clear-color {
    background: transparent;
    border: 1px solid var(--annam-cream-400);
    color: var(--gray-500);
    width: 32px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.btn-clear-color:hover:not(:disabled) {
    background: var(--annam-cream-100);
    color: var(--annam-black);
}

/* ---- Responsive admin pages ---- */

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

    .admin-form-panel {
        position: static;
    }
}

@media (max-width: 767px) {
    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }
}

/* ---- Tag compteur d'options dans la liste produits ---- */

.option-count-tag {
    display: inline-block;
    background: var(--annam-ivory);
    color: var(--annam-black);
    border: 1px solid var(--annam-cream-400);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

/* ---- Section options dans le panneau d'édition ---- */

.options-section {
    margin-top: 8px;
}

.options-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
    font-size: 13px;
}

.options-table thead th {
    background: var(--annam-ivory);
    color: var(--gray-700);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid var(--annam-cream-300);
}

.options-table thead th.num {
    text-align: right;
}

.options-table tbody td {
    padding: 8px;
    border-bottom: 1px solid var(--annam-cream-200);
    vertical-align: middle;
}

.options-table tbody td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.options-table tbody td.actions {
    text-align: right;
    padding-right: 4px;
}

.options-table tbody tr:hover {
    background: var(--annam-ivory);
}

.options-table tbody tr.row-editing {
    background: var(--annam-red-50-warm);
}

.options-table tbody tr.row-unavailable td {
    opacity: 0.55;
}

/* ---- Badge type d'option (modif vs supplément) ---- */

.option-type-badge {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    font-weight: 700;
    font-size: 12px;
}

.option-type-badge.modif {
    background: var(--annam-cream-200);
    color: var(--gray-500);
}

.option-type-badge.extra {
    background: #fff0e6;
    color: var(--annam-orange-700);
}

/* ---- Boutons d'ajout d'option ---- */

.options-add-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.options-add-buttons .btn-secondary-action {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    font-size: 13px;
}

/* ---- Mini-formulaire d'option (inline dans le panel) ---- */

.option-mini-form {
    background: var(--annam-ivory);
    border: 1px solid var(--annam-cream-300);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.option-mini-form h4 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--annam-black);
    margin: 0 0 10px 0;
}

.option-mini-form .form-label.small {
    font-size: 12px;
    margin-bottom: 2px;
}

.option-mini-form .form-control,
.option-mini-form .form-select {
    font-size: 13px;
    padding: 6px 8px;
}

.option-mini-form .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.option-mini-form .alert {
    padding: 6px 10px;
    margin-bottom: 8px;
}

/* ---- Overlay (fond sombre derrière la modale) ---- */

.options-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 16px;
    animation: fade-in 0.15s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---- Conteneur modale ---- */

.options-modal {
    background: var(--white);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slide-up 0.2s ease-out;
    border-top: 4px solid var(--annam-gold);
}

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

/* ---- En-tête ---- */

.options-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--annam-cream-200);
}

.options-modal-title {
    flex: 1;
}

.options-modal-title .product-name {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--annam-black);
    line-height: 1.2;
    margin-bottom: 4px;
}

.options-modal-title .product-base-price {
    font-size: 18px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.options-modal-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: var(--gray-500);
    cursor: pointer;
    line-height: 1;
    padding: 0 8px;
    margin-top: -4px;
    transition: color 0.15s;
}

.options-modal-close:hover {
    color: var(--annam-red);
}

/* ---- Corps : sections modifications / suppléments ---- */

.options-modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.options-section-title {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 12px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--annam-cream-200);
}

.options-section-title:first-child {
    margin-top: 0;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

/* ---- Ligne d'option (label + checkbox + prix) ---- */

.option-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}

.option-row:hover {
    background: var(--annam-ivory);
}

.option-row.selected {
    background: var(--annam-red-50-warm);
    border-color: var(--annam-red);
}

.option-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--annam-red);
    margin: 0;
}

.option-row .option-name {
    font-size: 16px;
    color: var(--annam-black);
    font-weight: 500;
}

.option-row .option-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--annam-orange-700);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.option-row .option-price-blank {
    /* Espace réservé pour aligner les colonnes des modifications gratuites */
    min-width: 60px;
}

.option-row.option-row-extra {
    /* Légère teinte pour distinguer les suppléments dans la liste */
}

/* ---- Footer : total + actions ---- */

.options-modal-footer {
    border-top: 1px solid var(--annam-cream-200);
    padding: 16px 24px 20px;
    background: var(--annam-ivory);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.options-modal-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 14px;
}

.options-modal-total .total-label {
    font-family: 'Cinzel', serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.options-modal-total .total-amount {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--annam-red);
    font-variant-numeric: tabular-nums;
}

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

.options-modal-actions button {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.options-modal-actions .btn-cancel {
    background: var(--white);
    color: var(--annam-black);
    border: 1px solid var(--annam-cream-400);
}

.options-modal-actions .btn-cancel:hover {
    background: var(--annam-cream-200);
}

.options-modal-actions .btn-confirm {
    background: var(--annam-red);
    color: var(--white);
    box-shadow: 0 2px 6px rgba(168, 29, 29, 0.3);
}

.options-modal-actions .btn-confirm:hover {
    background: var(--annam-red-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(168, 29, 29, 0.4);
}

/* ============================================================
   SOUS-LIGNES MODIFIERS DANS LE PANIER (CAISSE)
   ============================================================ */

.cart-line-modifiers {
    margin-top: 4px;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-line-modifier {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    color: var(--gray-500);
    line-height: 1.3;
}

.cart-line-modifier-name {
    flex: 1;
}

.cart-line-modifier-name::before {
    content: "↳ ";
    color: var(--annam-gold);
    margin-right: 2px;
}

.cart-line-modifier.is-extra .cart-line-modifier-name {
    color: var(--annam-orange-700);
    font-weight: 500;
}

.cart-line-modifier-price {
    font-variant-numeric: tabular-nums;
    color: var(--annam-orange-700);
    font-weight: 600;
}

/* ---- Responsive mobile ---- */

@media (max-width: 600px) {
    .options-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        border-top: none;
    }

    .options-modal-overlay {
        padding: 0;
    }

    .options-modal-title .product-name {
        font-size: 18px;
    }

    .options-modal-total .total-amount {
        font-size: 22px;
    }

    .options-modal-actions button {
        padding: 12px;
        font-size: 14px;
    }
}

/* ---- KDS : structure de ligne avec modifiers verticaux ----
   IMPORTANT : le KDS est en DARK MODE. Les couleurs de texte doivent être
   claires (ivoire pour le nom, or pour la quantité), pas du noir. */

.kds-line {
    /* On force display:block (et non pas le grid de la version legacy
       ligne ~1118) pour pouvoir afficher les sous-lignes modifiers en dessous
       du nom du produit. */
    display: block;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .kds-line:last-child {
        border-bottom: none;
    }

.kds-line-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
}

    .kds-line-main .kds-qty {
        color: var(--annam-gold);     /* or sur fond noir = lisible et signature ANNAM */
        font-weight: 700;
        min-width: 36px;
    }

    .kds-line-main .kds-name {
        color: var(--annam-ivory);    /* ivoire sur fond noir = lisibilité maximum */
        flex: 1;
    }

/* ---- Sous-lignes des modifiers ---- */

.kds-modifiers {
    margin-top: 4px;
    margin-left: 36px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.kds-modifier {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    line-height: 1.3;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.kds-modifier-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.kds-modifier-name {
    flex: 1;
}

/* Modifications gratuites = ⚠ jaune (ATTENTION : ne pas mettre) */
.kds-modifier-modif {
    background: #FFF8E1;
    color: #8B6914;
}

    .kds-modifier-modif .kds-modifier-icon {
        background: #FFB300;
        color: var(--white);
    }

/* Suppléments payants = + orange (À AJOUTER) */
.kds-modifier-extra {
    background: #FFF3E0;
    color: var(--annam-orange-700);
}

    .kds-modifier-extra .kds-modifier-icon {
        background: #FF6F00;
        color: var(--white);
    }

/* ---- Note libre = autre style, distinct ---- */

.kds-note {
    margin-top: 4px;
    margin-left: 36px;
    color: var(--gray-700);
    font-size: 14px;
    font-style: italic;
}

/* ---- TICKET FISCAL : sous-lignes des suppléments payants ---- */

.ticket-modifier {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-left: 12px;
    font-size: 13px;
    color: var(--gray-700);
    line-height: 1.4;
}

.ticket-modifier-name {
    flex: 1;
}

.ticket-modifier-price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--gray-700);
}

/* En mode impression, les modifiers ticket gardent une mise en forme propre */
@media print {
    .ticket-modifier {
        color: var(--black);
    }

    .ticket-modifier-price {
        color: var(--black);
    }
}


.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.qr-card {
    background: var(--white);
    border: 1px solid var(--annam-cream-300);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: box-shadow 0.15s;
}

    .qr-card:hover {
        box-shadow: 0 4px 12px rgba(26, 26, 26, 0.1);
    }

.qr-card-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--annam-red);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qr-card-image {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--annam-cream-100);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

    .qr-card-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        padding: 8px;
    }

.qr-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-card-url {
    font-family: 'Inter', monospace;
    font-size: 11px;
    color: var(--gray-600);
    word-break: break-all;
    margin-bottom: 12px;
    padding: 8px;
    background: var(--annam-cream-100);
    border-radius: 6px;
    max-height: 60px;
    overflow-y: auto;
}

    .qr-card-url a {
        color: var(--annam-red);
        text-decoration: none;
    }

        .qr-card-url a:hover {
            text-decoration: underline;
        }

.qr-card-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

    .qr-card-actions .btn-sm {
        padding: 4px 12px;
        font-size: 12px;
    }

/* =================================================================
   Layout mobile — Page Admin Produits
   Breakpoint : ≤768px (smartphones et petites tablettes portrait)
   ================================================================= */

@media (max-width: 768px) {

    /* -------------------------------------------------------------
       1. Masquer la liste quand le formulaire est ouvert (mobile)
       ------------------------------------------------------------- */
    .admin-page-grid.is-mobile-edit-open .admin-list {
        display: none;
    }

    .admin-page-grid.is-mobile-edit-open .admin-form-panel {
        position: relative;
        width: 100%;
        max-width: 100%;
    }

    /* -------------------------------------------------------------
       2. Header de la page : actions empilées
       ------------------------------------------------------------- */
    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

        .admin-page-header .header-actions {
            flex-direction: column;
            gap: 8px;
        }

        .admin-page-header .search-input {
            width: 100%;
        }

        .admin-page-header .btn-primary-action {
            width: 100%;
            padding: 12px;
        }

    /* -------------------------------------------------------------
       3. Tableau des produits → cartes (2 lignes par produit)
       ------------------------------------------------------------- */
    .dashboard-table thead {
        display: none; /* Cacher les en-têtes de colonnes */
    }

    .dashboard-table,
    .dashboard-table tbody,
    .dashboard-table tr,
    .dashboard-table td {
        display: block;
        width: 100%;
    }

        .dashboard-table tr {
            background: var(--card-bg, #fff);
            border: 1px solid var(--bordure, rgba(212,160,23,0.15));
            border-radius: 8px;
            padding: 12px 14px;
            margin-bottom: 10px;
            position: relative;
        }

            .dashboard-table tr.row-editing {
                border-color: var(--or, #D4A017);
                box-shadow: 0 0 0 1px var(--or, #D4A017);
            }

            .dashboard-table tr.row-unavailable {
                opacity: 0.65;
            }

        .dashboard-table td {
            padding: 0;
            border: none;
            text-align: left;
        }

            /* Ligne 1 : Nom du produit en grand */
            .dashboard-table td:nth-child(2) {
                order: 1;
                font-size: 1.05rem;
                margin-bottom: 8px;
                padding-bottom: 8px;
                border-bottom: 1px dashed rgba(0,0,0,0.06);
            }

                .dashboard-table td:nth-child(2) strong {
                    font-size: 1.05rem;
                    font-weight: 700;
                }

        /* Ligne 2 : tous les autres champs en une seule ligne flex */
        .dashboard-table tr {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 10px 14px;
        }

        /* Catégorie en deuxième position dans le flex */
        .dashboard-table td:nth-child(1) {
            order: 2;
        }

        /* Prix */
        .dashboard-table td:nth-child(3) {
            order: 3;
            font-weight: 600;
            text-align: left !important;
        }

        /* TVA */
        .dashboard-table td:nth-child(4) {
            order: 4;
            font-size: 0.85rem;
            color: var(--texte2, #666);
            text-align: left !important;
        }

        /* Options (badge si présent) */
        .dashboard-table td:nth-child(5) {
            order: 5;
            text-align: left !important;
        }

        /* Disponible */
        .dashboard-table td:nth-child(6) {
            order: 6;
            margin-left: auto;
        }

            .dashboard-table td:nth-child(6) .availability-toggle {
                padding: 6px 10px;
                font-size: 0.85rem;
            }

        /* Bouton Éditer en bas à droite */
        .dashboard-table td:nth-child(7) {
            order: 7;
            width: 100%;
            margin-top: 6px;
        }

            .dashboard-table td:nth-child(7) .btn-row-edit {
                width: 100%;
                padding: 10px;
            }

    /* -------------------------------------------------------------
       4. Formulaire d'édition / création
       ------------------------------------------------------------- */
    .admin-form-panel {
        padding: 14px;
    }

        /* Les champs prennent toute la largeur sur mobile */
        .admin-form-panel .form-row,
        .admin-form-panel .form-group {
            flex-direction: column;
        }

        .admin-form-panel input,
        .admin-form-panel select,
        .admin-form-panel textarea {
            width: 100%;
            font-size: 16px; /* évite le zoom auto iOS */
        }

        /* Boutons d'action empilés verticalement */
        .admin-form-panel .form-actions {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-top: 16px;
        }

            .admin-form-panel .form-actions .btn-primary-action,
            .admin-form-panel .form-actions .btn-secondary-action,
            .admin-form-panel .form-actions .btn-danger-action {
                width: 100%;
                padding: 12px;
                font-size: 1rem;
            }

        /* -------------------------------------------------------------
       5. Liste des options du produit
       ------------------------------------------------------------- */
        .admin-form-panel .options-section {
            margin-top: 20px;
        }

            .admin-form-panel .options-section table {
                font-size: 0.9rem;
            }

            .admin-form-panel .options-section .btn-secondary-action {
                margin-bottom: 6px;
                width: 100%;
            }
}
.order-logo
{
    height:30px;
}


