:root{
    --znet-violet:#6d28d9;
    --znet-violet-light:#8b5cf6;
    --znet-violet-soft:#f3e8ff;

    --znet-blue:#2563eb;
    --znet-blue-light:#3b82f6;
    --znet-blue-soft:#eff6ff;

    --znet-text:#111827;
    --znet-text-soft:#6b7280;

    --znet-bg:#f8fafc;
    --znet-card:#ffffff;
    --znet-border:#e5e7eb;

    --znet-success:#16a34a;
    --znet-success-soft:#dcfce7;

    --znet-danger:#dc2626;
    --znet-danger-soft:#fee2e2;

    --znet-warning:#d97706;
    --znet-warning-soft:#fef3c7;

    --znet-radius:18px;
    --znet-radius-sm:12px;

    --znet-shadow:
        0 10px 30px rgba(15,23,42,.08);

    --znet-gradient:
        linear-gradient(
            135deg,
            var(--znet-violet),
            var(--znet-blue)
        );
}

*{
    box-sizing:border-box;
}

html{
    -webkit-text-size-adjust:100%;
}

body{
    margin:0;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            rgba(139,92,246,.10),
            transparent 35%
        ),
        radial-gradient(
            circle at top right,
            rgba(59,130,246,.10),
            transparent 32%
        ),
        var(--znet-bg);

    color:var(--znet-text);
    min-height:100vh;
}

.znet-shell{
    width:min(1180px,100%);
    margin:auto;
    padding:20px;
}

.znet-brand{
    display:flex;
    align-items:center;
    gap:12px;
}

.znet-brand-mark{
    width:46px;
    height:46px;
    border-radius:15px;
    display:grid;
    place-items:center;
    color:#fff;
    font-weight:900;
    font-size:20px;
    background:var(--znet-gradient);
    box-shadow:
        0 8px 24px rgba(109,40,217,.25);
}

.znet-brand-title{
    margin:0;
    font-size:24px;
    font-weight:800;
}

.znet-brand-subtitle{
    margin:3px 0 0;
    color:var(--znet-text-soft);
    font-size:14px;
}

.znet-card{
    background:rgba(255,255,255,.96);
    border:1px solid rgba(226,232,240,.9);
    border-radius:var(--znet-radius);
    padding:22px;
    box-shadow:var(--znet-shadow);
}

.znet-card + .znet-card{
    margin-top:18px;
}

.znet-hero{
    background:var(--znet-gradient);
    color:#fff;
    border-radius:24px;
    padding:24px;
    box-shadow:
        0 18px 40px rgba(76,29,149,.22);
}

.znet-hero p{
    color:rgba(255,255,255,.85);
}

.znet-grid{
    display:grid;
    gap:16px;
}

.znet-grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.znet-grid-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.znet-stat{
    border-radius:16px;
    padding:18px;
    background:
        linear-gradient(
            145deg,
            #fff,
            #f8fafc
        );
    border:1px solid var(--znet-border);
}

.znet-stat-label{
    color:var(--znet-text-soft);
    font-size:13px;
}

.znet-stat-value{
    margin-top:6px;
    font-size:26px;
    font-weight:800;
}

.znet-input,
.znet-select{
    width:100%;
    border:1px solid #dbe3ef;
    background:#fff;
    border-radius:var(--znet-radius-sm);
    padding:14px 15px;
    font-size:16px;
    color:var(--znet-text);
    outline:none;
    transition:.18s ease;
}

.znet-input:focus,
.znet-select:focus{
    border-color:var(--znet-violet-light);
    box-shadow:
        0 0 0 4px rgba(139,92,246,.12);
}

.znet-btn{
    appearance:none;
    border:0;
    border-radius:var(--znet-radius-sm);
    padding:13px 17px;
    font-size:15px;
    font-weight:750;
    cursor:pointer;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        opacity .15s ease;
}

.znet-btn:hover{
    transform:translateY(-1px);
}

.znet-btn:disabled{
    opacity:.55;
    cursor:not-allowed;
    transform:none;
}

.znet-btn-primary{
    color:#fff;
    background:var(--znet-gradient);
    box-shadow:
        0 8px 22px rgba(109,40,217,.22);
}

.znet-btn-secondary{
    background:#eef2ff;
    color:#4338ca;
}

.znet-btn-danger{
    background:var(--znet-danger-soft);
    color:#991b1b;
}

.znet-btn-success{
    background:var(--znet-success-soft);
    color:#166534;
}

.znet-message{
    margin-top:12px;
    font-size:14px;
}

.znet-error{
    color:var(--znet-danger);
}

.znet-success{
    color:var(--znet-success);
}

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

.znet-badge{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:5px 9px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
}

.znet-badge-active{
    background:var(--znet-success-soft);
    color:#166534;
}

.znet-badge-inactive{
    background:var(--znet-danger-soft);
    color:#991b1b;
}

.znet-table-wrap{
    overflow-x:auto;
}

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

.znet-table th,
.znet-table td{
    text-align:left;
    padding:13px 10px;
    border-bottom:1px solid var(--znet-border);
    white-space:nowrap;
}

.znet-table th{
    color:var(--znet-text-soft);
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.znet-hidden{
    display:none !important;
}

.znet-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
}

.znet-section-title{
    margin:0;
    font-size:19px;
}

.znet-login-wrap{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:20px;
}

.znet-login-card{
    width:min(430px,100%);
}

.znet-login-card .znet-input{
    margin-top:12px;
}

.znet-login-card .znet-btn{
    width:100%;
    margin-top:14px;
}

@media(max-width:760px){
    .znet-shell{
        padding:12px;
    }

    .znet-grid-2,
    .znet-grid-3{
        grid-template-columns:1fr;
    }

    .znet-card{
        padding:17px;
        border-radius:16px;
    }

    .znet-hero{
        padding:20px;
        border-radius:18px;
    }

    .znet-brand-title{
        font-size:21px;
    }

    .znet-toolbar{
        align-items:stretch;
    }

    .znet-toolbar .znet-btn{
        width:100%;
    }
}

/* Audit table responsive */
#auditTable {
    width: 100%;
}

#auditTable td,
#auditTable th {
    white-space: normal;
    word-break: break-word;
}

.znet-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}



/* =========================================================
   Z@NETWORK - INTERFACE VENDEUR
   ========================================================= */

.hidden{
    display:none !important;
}

.seller-body{
    min-height:100vh;
    margin:0;
    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(124,58,237,.16),
            transparent 32%
        ),
        radial-gradient(
            circle at 100% 15%,
            rgba(37,99,235,.12),
            transparent 30%
        ),
        #f5f7fb;
}


/* LOGIN */

.seller-login{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px 18px;
}

.seller-login-card{
    width:min(430px,100%);
    background:rgba(255,255,255,.96);
    border:1px solid rgba(255,255,255,.8);
    border-radius:28px;
    padding:30px 24px;
    box-shadow:
        0 30px 80px rgba(51,65,85,.15);
    backdrop-filter:blur(14px);
}

.seller-login-logo{
    width:68px;
    height:68px;
    display:grid;
    place-items:center;
    margin:0 auto;
    border-radius:22px;
    color:#fff;
    font-size:27px;
    font-weight:900;
    letter-spacing:-1px;
    background:var(--znet-gradient);
    box-shadow:
        0 16px 34px rgba(109,40,217,.30);
}

.seller-login-heading{
    text-align:center;
    margin-top:18px;
}

.seller-login-heading h1{
    margin:0;
    font-size:28px;
    letter-spacing:-.7px;
}

.seller-login-heading p{
    margin:5px 0 0;
    color:var(--znet-violet);
    font-weight:700;
}

.seller-login-welcome{
    margin:22px 0 18px;
    text-align:center;
    color:var(--znet-text-soft);
    font-size:14px;
    line-height:1.5;
}


/* STRUCTURE */

.seller-shell{
    width:min(560px,100%);
    margin:0 auto;
    padding:
        max(16px,env(safe-area-inset-top))
        16px
        max(30px,env(safe-area-inset-bottom));
}


/* HERO */

.seller-hero{
    position:relative;
    overflow:hidden;
    padding:20px;
    border-radius:27px;
    color:#fff;
    background:
        linear-gradient(
            135deg,
            #6d28d9 0%,
            #5b21b6 43%,
            #2563eb 100%
        );
    box-shadow:
        0 20px 42px rgba(91,33,182,.26);
}

.seller-hero::before{
    content:"";
    position:absolute;
    width:220px;
    height:220px;
    border-radius:50%;
    right:-100px;
    top:-120px;
    background:rgba(255,255,255,.10);
}

.seller-hero::after{
    content:"";
    position:absolute;
    width:130px;
    height:130px;
    border-radius:50%;
    left:-70px;
    bottom:-80px;
    background:rgba(255,255,255,.07);
}

.seller-hero-top,
.seller-profile{
    position:relative;
    z-index:1;
}

.seller-hero-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
}

.seller-brand{
    display:flex;
    align-items:center;
    gap:10px;
}

.seller-brand-mark{
    width:43px;
    height:43px;
    border-radius:14px;
    display:grid;
    place-items:center;
    background:rgba(255,255,255,.17);
    border:1px solid rgba(255,255,255,.20);
    font-weight:900;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.20);
}

.seller-brand-name{
    font-size:17px;
    font-weight:850;
}

.seller-brand-role{
    font-size:12px;
    margin-top:2px;
    color:rgba(255,255,255,.72);
}

.seller-logout{
    width:auto;
    margin:0;
    padding:9px 11px;
    border:1px solid rgba(255,255,255,.22);
    border-radius:11px;
    color:#fff;
    background:rgba(255,255,255,.12);
    font-size:12px;
    font-weight:700;
    cursor:pointer;
}

.seller-profile{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:18px;
    align-items:end;
    margin-top:28px;
}

.seller-profile-label,
.seller-wallet-label{
    color:rgba(255,255,255,.68);
    font-size:11px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.06em;
}

.seller-profile-name{
    margin-top:5px;
    font-size:21px;
    font-weight:850;
    line-height:1.15;
}

.seller-site{
    display:flex;
    align-items:center;
    gap:6px;
    margin-top:8px;
    font-size:13px;
    color:rgba(255,255,255,.84);
}

.seller-site-dot{
    width:7px;
    height:7px;
    border-radius:50%;
    background:#86efac;
    box-shadow:
        0 0 0 4px rgba(134,239,172,.13);
}

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

.seller-wallet-value{
    margin-top:4px;
    font-size:29px;
    line-height:1;
    font-weight:900;
    letter-spacing:-1px;
}

.seller-wallet-value small{
    font-size:11px;
    letter-spacing:0;
    font-weight:750;
    color:rgba(255,255,255,.70);
}


/* SECTIONS */

.seller-section{
    margin-top:16px;
    padding:20px;
    border:1px solid rgba(226,232,240,.90);
    border-radius:23px;
    background:rgba(255,255,255,.97);
    box-shadow:
        0 10px 30px rgba(15,23,42,.065);
}

.seller-section-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}

.seller-section-head h2{
    margin:3px 0 0;
    font-size:20px;
    letter-spacing:-.3px;
}

.seller-eyebrow{
    color:var(--znet-violet);
    font-size:11px;
    font-weight:850;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.seller-section-icon{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:var(--znet-violet-soft);
    color:var(--znet-violet);
    font-size:18px;
    font-weight:900;
}

.seller-section-description{
    margin:12px 0 18px;
    color:var(--znet-text-soft);
    font-size:13px;
    line-height:1.55;
}


/* FORMULAIRES */

.seller-field{
    margin-top:15px;
}

.seller-field label{
    display:block;
    margin-bottom:7px;
    color:#475569;
    font-size:12px;
    font-weight:750;
}

.seller-input{
    display:block;
    width:100%;
    min-height:50px;
    margin:0;
    padding:13px 14px;
    border:1px solid #dbe2ea;
    border-radius:14px;
    background:#fff;
    color:#111827;
    outline:none;
    font-size:16px;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}

.seller-input:focus{
    border-color:#8b5cf6;
    box-shadow:
        0 0 0 4px rgba(139,92,246,.11);
}

.seller-select{
    appearance:auto;
}


/* BOUTONS */

.seller-btn{
    width:100%;
    min-height:50px;
    border:0;
    border-radius:14px;
    padding:13px 16px;
    margin-top:18px;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
}

.seller-btn-primary{
    color:#fff;
    background:var(--znet-gradient);
    box-shadow:
        0 10px 24px rgba(109,40,217,.21);
}


/* CARTES FORFAITS */

.seller-plans{
    display:grid;
    gap:11px;
    margin-top:16px;
}

.seller-plans .plan{
    position:relative;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:12px;

    margin:0;
    padding:15px;

    border:1px solid #e7eaf0;
    border-radius:17px;
    background:
        linear-gradient(
            145deg,
            #fff,
            #fafaff
        );

    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}

.seller-plans .plan:hover{
    transform:translateY(-1px);
    border-color:#ddd6fe;
    box-shadow:
        0 8px 22px rgba(79,70,229,.08);
}

.seller-plans .plan strong{
    font-size:16px;
    color:#111827;
}

.seller-plans .plan button{
    grid-column:2;
    grid-row:1 / span 2;
    width:auto;
    min-width:92px;
    min-height:42px;
    margin:0;
    padding:10px 15px;
    border:0;
    border-radius:13px;
    color:#fff;
    background:var(--znet-gradient);
    font-size:13px;
    font-weight:800;
    cursor:pointer;
    box-shadow:
        0 7px 17px rgba(109,40,217,.18);
}


/* LOT */

.seller-batch-total{
    display:flex;
    justify-content:space-between;
    align-items:center;

    margin-top:16px;
    padding:14px 15px;

    border-radius:14px;
    background:#f8fafc;
    border:1px solid #e5e7eb;
}

.seller-batch-total span{
    color:#64748b;
    font-size:13px;
}

.seller-batch-total strong{
    color:#4c1d95;
    font-size:18px;
}


/* MESSAGES */

.seller-message,
.seller-app-message{
    font-size:14px;
}

.seller-app-message:empty{
    display:none;
}

.seller-app-message:not(:empty){
    margin-top:16px;
}

.error{
    color:var(--znet-danger);
}

.success{
    color:var(--znet-success);
}


/* HISTORIQUE INJECTE PAR history.js */

#historyBtn{
    width:100% !important;
    min-height:50px;
    margin:16px 0 0 !important;
    border:1px solid #ddd6fe !important;
    border-radius:15px !important;
    color:#5b21b6 !important;
    background:#f5f3ff !important;
    font-size:14px !important;
    font-weight:800 !important;
    cursor:pointer;
}

#historyBox{
    padding:18px !important;
    margin-top:10px !important;
    border:1px solid #e5e7eb;
    border-radius:20px;
    background:#fff;
    box-shadow:
        0 10px 30px rgba(15,23,42,.06);
}

#historyBox h3{
    margin:0 0 15px;
    font-size:18px;
}


/* TICKET VENDU */

#appMsg > div{
    border:1px solid #ddd6fe !important;
    border-radius:20px !important;
    padding:18px !important;
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #faf7ff
        ) !important;
    box-shadow:
        0 12px 30px rgba(109,40,217,.08);
}

#copyVoucherBtn{
    width:100%;
    min-height:46px;
    border:0;
    border-radius:13px;
    color:#fff;
    background:var(--znet-gradient);
    font-weight:800;
}


/* FOOTER */

.seller-footer{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    padding:25px 12px 10px;
    color:#64748b;
    font-size:12px;
}

.seller-footer-mark{
    width:31px;
    height:31px;
    display:grid;
    place-items:center;
    border-radius:10px;
    background:var(--znet-gradient);
    color:#fff;
    font-size:11px;
    font-weight:900;
}

.seller-footer strong{
    display:block;
    color:#475569;
}

.seller-footer span{
    display:block;
    margin-top:1px;
    font-size:10px;
}


/* MOBILE */

@media (max-width:420px){

    .seller-shell{
        padding-left:12px;
        padding-right:12px;
    }

    .seller-hero{
        padding:18px;
        border-radius:23px;
    }

    .seller-profile{
        grid-template-columns:minmax(0,1fr) auto;
        gap:10px;
    }

    .seller-wallet-value{
        font-size:24px;
    }

    .seller-profile-name{
        font-size:18px;
    }

    .seller-section{
        padding:17px;
        border-radius:20px;
    }

    .seller-logout{
        font-size:11px;
        padding:8px 9px;
    }
}

/* =========================================================
   TICKET VENDEUR PREMIUM
   ========================================================= */

.seller-ticket{
    margin-top:16px;
    padding:20px;
    border:1px solid #ddd6fe;
    border-radius:24px;
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #faf7ff
        );
    box-shadow:
        0 18px 40px rgba(91,33,182,.10);
}

.seller-ticket-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
}

.seller-ticket-head h3{
    margin:3px 0 0;
    font-size:21px;
    color:#111827;
}

.seller-ticket-eyebrow{
    color:#16a34a;
    font-size:11px;
    font-weight:900;
    letter-spacing:.08em;
}

.seller-ticket-check{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#dcfce7;
    color:#16a34a;
    font-size:0;
    font-weight:900;
}

.seller-ticket-check::before{
    content:"OK";
    font-size:13px;
}

.seller-ticket-voucher-label{
    margin-top:22px;
    color:#64748b;
    font-size:11px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
    text-align:center;
}

.seller-ticket-voucher{
    margin-top:6px;
    text-align:center;
    font-size:28px;
    line-height:1.15;
    font-weight:900;
    letter-spacing:1px;
    color:#4c1d95;
    word-break:break-all;
}

.seller-ticket-qr{
    display:flex;
    justify-content:center;
    margin-top:18px;
}

.seller-ticket-qr img,
.seller-ticket-qr canvas{
    padding:10px;
    border-radius:16px;
    background:#fff;
    box-shadow:
        0 8px 24px rgba(15,23,42,.08);
}

.seller-ticket-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:20px;
}

.seller-ticket-grid > div{
    padding:12px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
}

.seller-ticket-grid span{
    display:block;
    color:#64748b;
    font-size:11px;
    font-weight:700;
}

.seller-ticket-grid strong{
    display:block;
    margin-top:4px;
    color:#111827;
    font-size:14px;
    word-break:break-word;
}

.seller-ticket-actions{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
    margin-top:18px;
}

.seller-ticket-actions button{
    width:100%;
    min-height:46px;
    margin:0;
    border:0;
    border-radius:13px;
    font-size:14px;
    font-weight:800;
    cursor:pointer;
}

#copyVoucherBtn{
    color:#5b21b6;
    background:#f3e8ff;
}

#shareTicketBtn{
    color:#fff;
    background:var(--znet-gradient);
}

@media (max-width:420px){
    .seller-ticket{
        padding:17px;
        border-radius:21px;
    }

    .seller-ticket-voucher{
        font-size:24px;
    }
}

.seller-ticket-scan{
    margin-top:12px;
    text-align:center;
    color:#64748b;
    font-size:12px;
}

.seller-ticket-actions-3{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

#openTicketBtn{
    color:#5b21b6;
    background:#eef2ff;
}

@media (max-width:420px){
    .seller-ticket-actions-3{
        grid-template-columns:1fr;
    }
}

/* =========================
   MESSAGERIE VENDEUR
   ========================= */

.seller-messaging {
    overflow: hidden;
}

.seller-chat-new,
.seller-chat-back {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.seller-chat-new {
    background: rgba(109, 40, 217, 0.10);
    color: #6d28d9;
}

.seller-chat-back {
    background: rgba(0, 0, 0, 0.05);
    color: inherit;
}

.seller-chat-summary {
    margin: 4px 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.035);
    font-size: 14px;
    font-weight: 600;
}

.seller-chat-summary.has-unread {
    background: rgba(109, 40, 217, 0.10);
    color: #6d28d9;
}

.seller-chat-list,
.seller-chat-vendors {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.seller-chat-conversation,
.seller-chat-vendor {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.seller-chat-conversation:active,
.seller-chat-vendor:active {
    transform: scale(0.99);
}

.seller-chat-conversation-main,
.seller-chat-vendor > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seller-chat-conversation-main strong,
.seller-chat-vendor strong {
    font-size: 15px;
}

.seller-chat-preview,
.seller-chat-vendor span {
    font-size: 13px;
    opacity: 0.68;
}

.seller-chat-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.seller-chat-conversation-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.seller-chat-time {
    font-size: 11px;
    opacity: 0.55;
}

.seller-chat-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #6d28d9;
    color: white;
    font-size: 12px;
    font-weight: 800;
}

.seller-chat-panel {
    margin-top: 8px;
}

.seller-chat-panel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.seller-chat-panel-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seller-chat-messages {
    min-height: 260px;
    max-height: 430px;
    overflow-y: auto;
    padding: 12px 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.seller-chat-message-row {
    display: flex;
    width: 100%;
}

.seller-chat-message-row.mine {
    justify-content: flex-end;
}

.seller-chat-message-row.other {
    justify-content: flex-start;
}

.seller-chat-message {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.055);
    word-break: break-word;
}

.seller-chat-message-row.mine .seller-chat-message {
    background: rgba(109, 40, 217, 0.12);
}

.seller-chat-message-body {
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.seller-chat-message-meta {
    margin-top: 5px;
    font-size: 10px;
    opacity: 0.55;
    text-align: right;
}

.seller-chat-compose {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 10px;
}

.seller-chat-input {
    flex: 1;
    resize: none;
    min-height: 46px;
    max-height: 120px;
}

.seller-chat-compose .seller-btn {
    width: auto;
    min-width: 88px;
    margin: 0;
}

.seller-chat-vendor-action {
    flex-shrink: 0;
    font-weight: 700;
    color: #6d28d9;
}

.seller-chat-empty {
    padding: 18px 12px;
    text-align: center;
    font-size: 14px;
    opacity: 0.58;
}

@media (max-width: 520px) {
    .seller-chat-preview {
        max-width: 165px;
    }

    .seller-chat-compose {
        flex-direction: column;
        align-items: stretch;
    }

    .seller-chat-compose .seller-btn {
        width: 100%;
    }

    .seller-chat-message {
        max-width: 88%;
    }
}


/* =========================
   MESSAGERIE ADMIN
   ========================= */

#adminMessagingCard {
    overflow: hidden;
}

.admin-chat-conversation,
.admin-chat-vendor {
    width: 100%;
    border: 1px solid rgba(0,0,0,0.08);
    background: #fff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.admin-chat-conversation-main,
.admin-chat-vendor > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-chat-conversation-main strong,
.admin-chat-vendor strong {
    font-size: 15px;
}

.admin-chat-conversation-main span,
.admin-chat-vendor span {
    font-size: 13px;
    opacity: 0.68;
}

.admin-chat-conversation-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.admin-chat-time {
    font-size: 11px;
    opacity: 0.55;
}

.admin-chat-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #6d28d9;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.admin-chat-has-unread {
    color: #6d28d9;
    font-weight: 700;
}

.admin-chat-messages {
    min-height: 280px;
    max-height: 480px;
    overflow-y: auto;
    padding: 14px 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-chat-message-row {
    display: flex;
    width: 100%;
}

.admin-chat-message-row.mine {
    justify-content: flex-end;
}

.admin-chat-message-row.other {
    justify-content: flex-start;
}

.admin-chat-message {
    max-width: 78%;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(0,0,0,0.055);
    word-break: break-word;
}

.admin-chat-message-row.mine .admin-chat-message {
    background: rgba(109,40,217,0.12);
}

.admin-chat-message-body {
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.admin-chat-message-meta {
    margin-top: 5px;
    font-size: 10px;
    opacity: 0.55;
    text-align: right;
}

.admin-chat-compose {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-top: 12px;
}

.admin-chat-compose textarea {
    flex: 1;
    resize: vertical;
    min-height: 70px;
}

.admin-chat-empty {
    padding: 18px 12px;
    text-align: center;
    opacity: 0.6;
}

.admin-chat-vendor-action {
    flex-shrink: 0;
    color: #6d28d9;
    font-weight: 700;
}

@media (max-width: 700px) {
    .admin-chat-compose {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-chat-message {
        max-width: 88%;
    }
}


.admin-announcement-item{
    padding:16px;
    border:1px solid rgba(127,127,127,.18);
    border-radius:14px;
    margin-top:12px;
}

.admin-announcement-head{
    display:flex;
    justify-content:space-between;
    gap:14px;
    align-items:flex-start;
}

.admin-announcement-body{
    margin-top:10px;
    line-height:1.5;
    white-space:pre-wrap;
}

.admin-announcement-badge{
    display:inline-flex;
    align-items:center;
    padding:5px 9px;
    border-radius:999px;
    font-size:.78rem;
    font-weight:700;
    background:rgba(127,127,127,.12);
    white-space:nowrap;
}

.seller-announcement-item{
    width:100%;
    text-align:left;
    border:1px solid rgba(127,127,127,.18);
    border-radius:16px;
    padding:16px;
    margin-top:12px;
    background:transparent;
    color:inherit;
    cursor:pointer;
}

.seller-announcement-unread{
    border-width:2px;
}

.seller-announcement-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:flex-start;
}

.seller-announcement-meta{
    margin-top:6px;
    font-size:.82rem;
    opacity:.68;
}

.seller-announcement-body{
    margin-top:12px;
    line-height:1.5;
    white-space:pre-wrap;
}

.seller-announcement-badge{
    display:inline-flex;
    align-items:center;
    padding:5px 9px;
    border-radius:999px;
    font-size:.75rem;
    font-weight:700;
    background:rgba(127,127,127,.12);
    white-space:nowrap;
}

.seller-announcement-new{
    margin-top:10px;
    font-size:.78rem;
    font-weight:700;
}

.seller-announcement-warning{
    border-left:4px solid #f0a000;
}

.seller-announcement-critical{
    border-left:4px solid #d93025;
}

.seller-announcement-success{
    border-left:4px solid #1f9d55;
}

.seller-notification-btn{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    border:0;
    border-radius:14px;
    background:rgba(255,255,255,.14);
    color:inherit;
    cursor:pointer;
    flex:0 0 auto;
}

.seller-notification-icon{
    font-size:1.2rem;
    line-height:1;
}

.seller-notification-badge{
    position:absolute;
    top:-5px;
    right:-5px;
    min-width:20px;
    height:20px;
    padding:0 5px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:.7rem;
    font-weight:800;
    background:#dc2626;
    color:#fff;
    box-shadow:0 2px 7px rgba(0,0,0,.25);
}

.seller-notification-active{
    box-shadow:0 0 0 2px rgba(255,255,255,.22);
}

.admin-notification-btn{
    position:relative;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    border:0;
    border-radius:14px;
    background:rgba(255,255,255,.14);
    color:inherit;
    cursor:pointer;
    flex:0 0 auto;
}

.admin-notification-icon{
    font-size:1.2rem;
    line-height:1;
}

.admin-notification-badge{
    position:absolute;
    top:-5px;
    right:-5px;
    min-width:20px;
    height:20px;
    padding:0 5px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:.7rem;
    font-weight:800;
    background:#dc2626;
    color:#fff;
    box-shadow:0 2px 7px rgba(0,0,0,.25);
}

.admin-notification-active{
    box-shadow:0 0 0 2px rgba(255,255,255,.22);
}


/* =========================================================
   Z@NETWORK - MODES CLAIR / SOMBRE
   ========================================================= */

.znet-theme-toggle{
    border:1px solid var(--znet-border);
    border-radius:999px;
    padding:9px 14px;
    font:inherit;
    font-weight:700;
    cursor:pointer;
    background:var(--znet-card);
    color:var(--znet-text);
    white-space:nowrap;
    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease,
        transform .15s ease;
}

.znet-theme-toggle:active{
    transform:scale(.97);
}


html[data-theme="dark"]{
    --znet-text:#f1f5f9;
    --znet-text-soft:#94a3b8;

    --znet-bg:#0b1120;
    --znet-card:#111827;
    --znet-border:#334155;

    --znet-violet-soft:#2e1065;
    --znet-blue-soft:#172554;

    --znet-success-soft:#052e16;
    --znet-danger-soft:#450a0a;
    --znet-warning-soft:#451a03;

    --znet-shadow:
        0 15px 40px rgba(0,0,0,.30);
}


html[data-theme="dark"] body,
html[data-theme="dark"] .seller-body{
    background:#0b1120 !important;
    color:var(--znet-text);
}


html[data-theme="dark"] .znet-card,
html[data-theme="dark"] .znet-stat,
html[data-theme="dark"] .seller-login-card{
    background:var(--znet-card) !important;
    color:var(--znet-text) !important;
    border-color:var(--znet-border) !important;
}


html[data-theme="dark"] .znet-input,
html[data-theme="dark"] .znet-select,
html[data-theme="dark"] .seller-input,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea{
    background:#0f172a !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}


html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{
    color:#64748b !important;
}


html[data-theme="dark"] .znet-table,
html[data-theme="dark"] .znet-table th,
html[data-theme="dark"] .znet-table td{
    color:var(--znet-text);
    border-color:var(--znet-border);
}


html[data-theme="dark"] .znet-table th{
    background:#0f172a !important;
}


html[data-theme="dark"] .znet-muted,
html[data-theme="dark"] .znet-stat-label,
html[data-theme="dark"] .seller-section-description{
    color:var(--znet-text-soft) !important;
}


html[data-theme="dark"] .znet-theme-toggle{
    background:#1e293b;
    color:#f8fafc;
    border-color:#475569;
}


@media (max-width:600px){
    .znet-theme-toggle{
        padding:8px 10px;
        font-size:13px;
    }
}


/* =========================================================
   DARK MODE - MESSAGERIE
   ========================================================= */

html[data-theme="dark"] #adminChatConversationPanel,
html[data-theme="dark"] #chatConversationPanel{
    background:#0f172a !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] #adminChatConversationPanel > .znet-toolbar,
html[data-theme="dark"] #chatConversationPanel > .seller-toolbar,
html[data-theme="dark"] .admin-chat-compose,
html[data-theme="dark"] .seller-chat-compose{
    background:#111827 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] .admin-chat-messages,
html[data-theme="dark"] .seller-chat-messages{
    background:#0b1120 !important;
}

html[data-theme="dark"] #adminChatMessageInput,
html[data-theme="dark"] #chatMessageInput{
    background:#0f172a !important;
    color:#f1f5f9 !important;
    border-color:#475569 !important;
}

html[data-theme="dark"] #adminChatMessageInput:focus,
html[data-theme="dark"] #chatMessageInput:focus{
    background:#111827 !important;
    border-color:#8b5cf6 !important;
}

html[data-theme="dark"] .admin-chat-conversation,
html[data-theme="dark"] .seller-chat-conversation,
html[data-theme="dark"] .admin-chat-vendor,
html[data-theme="dark"] .seller-chat-vendor{
    background:#111827 !important;
    color:#f1f5f9 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] .admin-chat-conversation-main strong,
html[data-theme="dark"] .seller-chat-conversation-main strong{
    color:#f1f5f9 !important;
}

html[data-theme="dark"] .admin-chat-conversation-main span,
html[data-theme="dark"] .seller-chat-preview,
html[data-theme="dark"] .admin-chat-time,
html[data-theme="dark"] .seller-chat-time,
html[data-theme="dark"] .admin-chat-empty,
html[data-theme="dark"] .seller-chat-empty{
    color:#94a3b8 !important;
}

html[data-theme="dark"] .admin-chat-message-row.other .admin-chat-message,
html[data-theme="dark"] .seller-chat-message-row.other .seller-chat-message{
    background:#1e293b !important;
    color:#f1f5f9 !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] #adminChatMessageInput::placeholder,
html[data-theme="dark"] #chatMessageInput::placeholder{
    color:#64748b !important;
}

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

/* =========================================================
   DARK MODE - MESSAGERIE VENDEUR - VERSION INTEGREE
   ========================================================= */

html[data-theme="dark"] .seller-messaging{
    color:var(--znet-text);
}

html[data-theme="dark"] .seller-chat-new{
    background:rgba(139,92,246,.16);
    color:#c4b5fd;
}

html[data-theme="dark"] .seller-chat-back{
    background:rgba(255,255,255,.07);
    color:#e2e8f0;
}

html[data-theme="dark"] .seller-chat-summary{
    background:rgba(255,255,255,.045);
    color:#cbd5e1;
}

html[data-theme="dark"] .seller-chat-summary.has-unread{
    background:rgba(139,92,246,.16);
    color:#c4b5fd;
}

html[data-theme="dark"] .seller-chat-conversation,
html[data-theme="dark"] .seller-chat-vendor{
    background:rgba(255,255,255,.035);
    border-color:rgba(255,255,255,.09);
    color:#f1f5f9;
}

html[data-theme="dark"] .seller-chat-conversation:active,
html[data-theme="dark"] .seller-chat-vendor:active{
    background:rgba(255,255,255,.065);
}

html[data-theme="dark"] .seller-chat-preview,
html[data-theme="dark"] .seller-chat-vendor span,
html[data-theme="dark"] .seller-chat-time{
    color:#94a3b8;
}

html[data-theme="dark"] .seller-chat-panel{
    color:#f1f5f9;
}

html[data-theme="dark"] .seller-chat-panel-head{
    color:#f8fafc;
}

html[data-theme="dark"] .seller-chat-messages{
    background:transparent !important;
}

html[data-theme="dark"] .seller-chat-message{
    background:rgba(255,255,255,.07);
    color:#e2e8f0;
}

html[data-theme="dark"] .seller-chat-message-row.mine .seller-chat-message{
    background:rgba(109,40,217,.28);
    color:#f8fafc;
}

html[data-theme="dark"] .seller-chat-message-meta{
    color:#94a3b8;
}

html[data-theme="dark"] .seller-chat-compose{
    background:transparent !important;
}

html[data-theme="dark"] .seller-chat-input,
html[data-theme="dark"] #chatMessageInput{
    background:rgba(255,255,255,.055) !important;
    color:#f8fafc !important;
    border-color:rgba(255,255,255,.12) !important;
}

html[data-theme="dark"] .seller-chat-input:focus,
html[data-theme="dark"] #chatMessageInput:focus{
    background:rgba(255,255,255,.075) !important;
    border-color:#8b5cf6 !important;
    box-shadow:0 0 0 3px rgba(139,92,246,.14) !important;
}

html[data-theme="dark"] .seller-chat-input::placeholder,
html[data-theme="dark"] #chatMessageInput::placeholder{
    color:#64748b !important;
}

html[data-theme="dark"] .seller-chat-vendor-action{
    color:#a78bfa;
}

html[data-theme="dark"] .seller-chat-empty{
    color:#94a3b8;
}

/* DARK MODE VENDEUR - FINAL */

html[data-theme="dark"] .seller-section{
    background:#111827 !important;
    border-color:#263449 !important;
    color:#f1f5f9 !important;
}

html[data-theme="dark"] .seller-section-head h2{
    color:#f8fafc !important;
}

html[data-theme="dark"] .seller-plans .plan{
    background:#0f172a !important;
    border-color:#283548 !important;
    color:#94a3b8 !important;
}

html[data-theme="dark"] .seller-plans .plan strong{
    color:#f8fafc !important;
}

html[data-theme="dark"] .seller-batch-total{
    background:#0f172a !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] .seller-batch-total span{
    color:#94a3b8 !important;
}

html[data-theme="dark"] .seller-batch-total strong{
    color:#c4b5fd !important;
}

html[data-theme="dark"] #historyBox{
    background:#111827 !important;
    border-color:#334155 !important;
    color:#f1f5f9 !important;
}

html[data-theme="dark"] #historyBox h3{
    color:#f8fafc !important;
}

html[data-theme="dark"] .seller-history-card{
    background:#0f172a !important;
    border:1px solid #334155 !important;
    color:#f1f5f9 !important;
}

html[data-theme="dark"] .seller-history-card strong{
    color:#f8fafc !important;
}

html[data-theme="dark"] .seller-history-card div{
    color:#cbd5e1;
}

html[data-theme="dark"] .seller-history-card button:not(.seller-btn){
    background:#334155;
    color:#f8fafc;
    border:0;
    border-radius:7px;
    padding:6px 9px;
}

html[data-theme="dark"] .seller-ticket{
    background:
        linear-gradient(
            145deg,
            rgba(109,40,217,.14),
            rgba(37,99,235,.08)
        ),
        #111827 !important;
    border-color:#4c3c84 !important;
    color:#f1f5f9 !important;
}

html[data-theme="dark"] .seller-ticket-head h3{
    color:#f8fafc !important;
}

html[data-theme="dark"] .seller-ticket-voucher{
    color:#c4b5fd !important;
}

html[data-theme="dark"] .seller-ticket-grid > div{
    background:#0f172a !important;
    border-color:#334155 !important;
}

html[data-theme="dark"] .seller-ticket-grid span{
    color:#94a3b8 !important;
}

html[data-theme="dark"] .seller-ticket-grid strong{
    color:#f8fafc !important;
}

html[data-theme="dark"] .seller-ticket-qr img,
html[data-theme="dark"] .seller-ticket-qr canvas{
    background:#fff !important;
}

html[data-theme="dark"] .seller-chat-conversation,
html[data-theme="dark"] .seller-chat-vendor{
    background:#0f172a !important;
    border-color:#2f3e52 !important;
}

html[data-theme="dark"] .seller-chat-conversation-main strong,
html[data-theme="dark"] .seller-chat-vendor strong{
    color:#f8fafc !important;
}

html[data-theme="dark"] .seller-chat-preview,
html[data-theme="dark"] .seller-chat-time,
html[data-theme="dark"] .seller-chat-vendor span{
    color:#94a3b8 !important;
}

html[data-theme="dark"] .seller-chat-summary{
    background:#151c31 !important;
    color:#c4b5fd !important;
}

html[data-theme="dark"] .seller-chat-summary.has-unread{
    background:#292052 !important;
    color:#c4b5fd !important;
}

html[data-theme="dark"] .seller-chat-message-row.other .seller-chat-message{
    background:#1e293b !important;
    color:#e2e8f0 !important;
}

html[data-theme="dark"] .seller-chat-message-row.mine .seller-chat-message{
    background:linear-gradient(135deg,#6d28d9,#315df5) !important;
    color:#fff !important;
}
