/* Esmart Mall premium admin bridge */
body.es-admin-legacy {
    margin: 0;
    min-height: 100vh;
    color: var(--es-neutral-800);
    background: #f7f6f3;
    font-family: var(--es-font) !important;
    font-size: 14px;
    line-height: 1.55;
}
body.es-admin-legacy h1,
body.es-admin-legacy h2,
body.es-admin-legacy h3,
body.es-admin-legacy h4,
body.es-admin-legacy h5,
body.es-admin-legacy h6,
body.es-admin-legacy input,
body.es-admin-legacy select,
body.es-admin-legacy textarea,
body.es-admin-legacy button,
body.es-admin-legacy table { font-family: var(--es-font) !important; }

.es-admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    min-height: 72px;
    display: grid;
    grid-template-columns: 260px minmax(0,1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 0 28px;
    background: rgba(255,255,255,.97);
    border-bottom: 1px solid var(--es-border);
    backdrop-filter: blur(14px);
}
.es-admin-topbar__brand { min-width: 0; }
.es-admin-topbar__context { min-width: 0; display:flex; flex-direction:column; gap:2px; }
.es-admin-topbar__eyebrow { color: var(--es-neutral-500); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.es-admin-topbar__context strong { overflow:hidden; color: var(--es-neutral-950); font-size: 15px; font-weight: 650; text-overflow:ellipsis; white-space:nowrap; }
.es-admin-topbar__actions { display:flex; align-items:center; gap:10px; }
.es-admin-avatar { width:38px; height:38px; display:grid; place-items:center; color:#fff; background:var(--es-neutral-950); border-radius:50%; font-weight:700; }
.es-admin-avatar:hover { color:#fff; transform:translateY(-1px); }
.es-admin-menu-button { width:42px; height:42px; display:none; place-items:center; color:var(--es-neutral-950); background:#fff; border:1px solid var(--es-border); border-radius:8px; }

body.es-admin-legacy > .products {
    min-height: calc(100vh - 122px);
    padding: 32px 0 64px !important;
    background: #f7f6f3 !important;
}
body.es-admin-legacy > .products > .container {
    width: min(1440px, calc(100% - 48px));
    max-width: 1440px;
    display: grid;
    grid-template-columns: 248px minmax(0,1fr);
    gap: 28px;
    align-items: start;
}
body.es-admin-legacy > .products > .container > .col-md-9,
body.es-admin-legacy > .products > .container > .col-md-8,
body.es-admin-legacy > .products > .container > .product-w3ls-right,
body.es-admin-legacy > .products > .container > .producta {
    width: auto !important;
    float: none !important;
    grid-column: 2;
    padding: 0 !important;
}
body.es-admin-legacy > .products > .container > .rsidebar {
    width: auto !important;
    float: none !important;
    grid-column: 1;
    grid-row: 1;
    padding: 0 !important;
}

.es-admin-sidebar {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    padding: 14px 10px 16px !important;
    background: #fff;
    border: 1px solid var(--es-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(23,23,23,.04);
}
.es-admin-sidebar__mobile-head { display:none; }
.es-admin-nav { display:flex; flex-direction:column; gap:2px; }
.es-admin-nav__label { margin:18px 12px 6px; color:var(--es-neutral-500); font-size:10px; font-weight:700; letter-spacing:.07em; text-transform:uppercase; }
.es-admin-nav__item { min-height:42px; display:flex; align-items:center; gap:11px; padding:9px 12px; color:var(--es-neutral-800); border-radius:7px; font-size:13px; font-weight:550; transition:background var(--es-duration-fast) var(--es-ease),color var(--es-duration-fast) var(--es-ease),transform var(--es-duration-fast) var(--es-ease); }
.es-admin-nav__item i { width:16px; color:var(--es-neutral-500); text-align:center; }
.es-admin-nav__item:hover { color:var(--es-neutral-950); background:var(--es-neutral-50); }
.es-admin-nav__item.is-active { color:var(--es-orange-900); background:var(--es-orange-50); font-weight:650; box-shadow:inset 3px 0 0 var(--es-orange-700); }
.es-admin-nav__item.is-active i { color:var(--es-orange-700); }
.es-admin-nav__item--danger { margin-top:12px; color:var(--es-error); }
.es-admin-sidebar-backdrop { display:none; }

body.es-admin-legacy .modal-content {
    background:#fff !important;
    border:1px solid var(--es-border) !important;
    border-radius:12px !important;
    box-shadow:0 12px 34px rgba(23,23,23,.05) !important;
}
body.es-admin-legacy .modal-body-sub_agile { padding:28px !important; }
body.es-admin-legacy .w3ls-title,
body.es-admin-legacy .w3ls-title1,
body.es-admin-legacy .agileinfo_sign {
    margin:0 0 24px !important;
    color:var(--es-neutral-950) !important;
    font-size:clamp(26px,2.7vw,36px) !important;
    font-weight:700 !important;
    line-height:1.2 !important;
    letter-spacing:-.03em !important;
    text-align:left !important;
    text-transform:none !important;
}
body.es-admin-legacy > h3.w3ls-title { width:min(1440px,calc(100% - 48px)); margin:28px auto 0 !important; }

body.es-admin-legacy table.table,
body.es-admin-legacy .table {
    width:100% !important;
    color:var(--es-neutral-800) !important;
    background:#fff !important;
    border:1px solid var(--es-border) !important;
    border-radius:9px !important;
    border-collapse:separate !important;
    border-spacing:0 !important;
    overflow:hidden;
    font-size:13px !important;
}
body.es-admin-legacy .table th { padding:12px 14px !important; color:var(--es-neutral-600) !important; background:var(--es-neutral-50) !important; border:0 !important; border-bottom:1px solid var(--es-border) !important; font-size:11px !important; font-weight:700 !important; letter-spacing:.02em; text-transform:none !important; }
body.es-admin-legacy .table td { padding:13px 14px !important; color:var(--es-neutral-800) !important; background:#fff !important; border:0 !important; border-bottom:1px solid var(--es-border) !important; vertical-align:middle !important; }
body.es-admin-legacy .table tr:last-child td { border-bottom:0 !important; }
body.es-admin-legacy .table-hover tbody tr:hover td { background:#fbfaf8 !important; }
/* Neutralise destructive legacy cell backgrounds while preserving readable status text. */
body.es-admin-legacy .table td[style*="background: red"],
body.es-admin-legacy .table td[style*="background:red"] { color:var(--es-error) !important; background:var(--es-error-bg) !important; border-radius:0 !important; }
body.es-admin-legacy .table td[style*="background: green"],
body.es-admin-legacy .table td[style*="background:green"] { color:var(--es-success) !important; background:var(--es-success-bg) !important; border-radius:0 !important; }
body.es-admin-legacy .table td[style*="skyblue"] { color:var(--es-info) !important; background:var(--es-info-bg) !important; border-radius:0 !important; }

body.es-admin-legacy input[type="text"],
body.es-admin-legacy input[type="email"],
body.es-admin-legacy input[type="password"],
body.es-admin-legacy input[type="tel"],
body.es-admin-legacy input[type="number"],
body.es-admin-legacy input[type="date"],
body.es-admin-legacy input[type="time"],
body.es-admin-legacy select,
body.es-admin-legacy textarea,
body.es-admin-legacy .form-control {
    min-height:44px !important;
    width:100%;
    padding:10px 12px !important;
    color:var(--es-neutral-900) !important;
    background:#fff !important;
    border:1px solid var(--es-border-strong) !important;
    border-radius:var(--es-radius-control) !important;
    box-shadow:none !important;
    outline:none !important;
    font-size:14px !important;
}
body.es-admin-legacy input:focus,
body.es-admin-legacy select:focus,
body.es-admin-legacy textarea:focus,
body.es-admin-legacy .form-control:focus { border-color:var(--es-orange-700) !important; box-shadow:0 0 0 3px var(--es-orange-100) !important; }
body.es-admin-legacy label { color:var(--es-neutral-900) !important; font-weight:600 !important; }

body.es-admin-legacy input[type="submit"],
body.es-admin-legacy button[type="submit"],
body.es-admin-legacy .new-card a,
body.es-admin-legacy .btn-primary {
    min-height:42px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:9px 16px !important;
    color:#fff !important;
    background:var(--es-orange-700) !important;
    border:1px solid var(--es-orange-700) !important;
    border-radius:var(--es-radius-control) !important;
    box-shadow:none !important;
    font-size:13px !important;
    font-weight:650 !important;
    text-transform:none !important;
}
body.es-admin-legacy input[type="submit"]:hover,
body.es-admin-legacy button[type="submit"]:hover,
body.es-admin-legacy .new-card a:hover,
body.es-admin-legacy .btn-primary:hover { background:var(--es-orange-800) !important; border-color:var(--es-orange-800) !important; transform:translateY(-1px); }
body.es-admin-legacy .paginate { display:flex !important; justify-content:flex-end; gap:8px; margin-top:24px !important; }
body.es-admin-legacy .paginate a { width:38px; height:38px; display:grid !important; place-items:center; color:var(--es-neutral-800) !important; background:#fff !important; border:1px solid var(--es-border) !important; border-radius:6px !important; }
body.es-admin-legacy .paginate a.active { color:#fff !important; background:var(--es-orange-700) !important; border-color:var(--es-orange-700) !important; }

.es-admin-footer { min-height:50px; display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 32px; color:var(--es-neutral-500); background:#fff; border-top:1px solid var(--es-border); font-size:11px; }

@media (max-width: 991px) {
    .es-admin-topbar { grid-template-columns:minmax(0,1fr) auto; padding:0 20px; }
    .es-admin-topbar__context { display:none; }
    .es-admin-topbar__actions .es-button { display:none; }
    .es-admin-menu-button { display:grid; }
    body.es-admin-legacy > .products > .container { width:calc(100% - 32px); display:block; }
    body.es-admin-legacy > .products > .container > .col-md-9,
    body.es-admin-legacy > .products > .container > .col-md-8,
    body.es-admin-legacy > .products > .container > .product-w3ls-right,
    body.es-admin-legacy > .products > .container > .producta { width:100% !important; }
    .es-admin-sidebar { position:fixed; top:0; bottom:0; left:0; z-index:1400; width:min(320px,88vw) !important; max-height:none; padding:18px 12px !important; border:0; border-radius:0 14px 14px 0; transform:translateX(-105%); transition:transform var(--es-duration-normal) var(--es-ease); }
    .es-admin-sidebar.is-open { transform:translateX(0); }
    .es-admin-sidebar__mobile-head { display:flex; align-items:center; justify-content:space-between; padding:4px 10px 12px; border-bottom:1px solid var(--es-border); }
    .es-admin-sidebar__mobile-head button { width:38px; height:38px; display:grid; place-items:center; color:var(--es-neutral-800); background:#fff; border:1px solid var(--es-border); border-radius:8px; }
    .es-admin-sidebar-backdrop { position:fixed; inset:0; z-index:1390; background:rgba(23,23,23,.36); opacity:0; pointer-events:none; transition:opacity var(--es-duration-normal) var(--es-ease); }
    .es-admin-sidebar-backdrop.is-open { display:block; opacity:1; pointer-events:auto; }
}
@media (max-width: 767px) {
    .es-admin-topbar { min-height:64px; padding:0 16px; }
    body.es-admin-legacy > .products { padding:22px 0 44px !important; }
    body.es-admin-legacy > .products > .container { width:calc(100% - 24px); }
    body.es-admin-legacy .modal-body-sub_agile { padding:18px !important; }
    body.es-admin-legacy .table { min-width:680px; }
    body.es-admin-legacy .modal-content { overflow:hidden; }
    .es-admin-footer { padding:14px 18px; flex-direction:column; align-items:flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .es-admin-sidebar,
    .es-admin-sidebar-backdrop,
    .es-admin-nav__item { transition:none !important; }
}

/* Premium admin shell V5 */
/* ---------- Admin shell ---------- */
.es-admin-topbar {
    height: 72px;
    background: rgba(250,249,247,.90);
    border-bottom-color: rgba(203,199,193,.62);
    backdrop-filter: saturate(130%) blur(16px);
    -webkit-backdrop-filter: saturate(130%) blur(16px);
}
.es-admin-topbar__context strong { letter-spacing: -.025em; }
.es-admin-avatar { background: linear-gradient(145deg, #2d2c28, #151513); box-shadow: 0 5px 14px rgba(23,23,21,.10); }
body.es-admin-legacy .es-admin-sidebar,
.es-admin-sidebar {
    background: linear-gradient(180deg, #1f1f1c 0%, #141412 100%);
    border-right-color: #282722;
}
body.es-admin-legacy .es-admin-sidebar a,
.es-admin-sidebar a { color: rgba(255,255,255,.68); }
body.es-admin-legacy .es-admin-sidebar a:hover,
.es-admin-sidebar a:hover { color: #fff; background: rgba(255,255,255,.055); }
body.es-admin-legacy .es-admin-sidebar a.is-active,
.es-admin-sidebar a.is-active { color: #fff; background: rgba(242,106,33,.105); box-shadow: inset 2px 0 #f27a3b; }
body.es-admin-legacy .es-admin-sidebar__label,
.es-admin-sidebar__label { color: rgba(255,255,255,.34); letter-spacing: .13em; }
body.es-admin-legacy .es-admin-main,
.es-admin-main { background: var(--es-page); }
body.es-admin-legacy .panel,
body.es-admin-legacy .well,
body.es-admin-legacy .box,
body.es-admin-legacy .card {
    border-color: #e1ddd6 !important;
    border-radius: 12px !important;
    box-shadow: var(--es-shadow-xs) !important;
}

/* Admin dark navigation refinements for the existing .es-admin-nav structure. */
body.es-admin-legacy .es-admin-sidebar {
    border-color: #2a2925;
    box-shadow: 0 18px 42px rgba(23,23,21,.13);
}
body.es-admin-legacy .es-admin-nav__label { color: rgba(255,255,255,.31); letter-spacing: .13em; }
body.es-admin-legacy .es-admin-nav__item { color: rgba(255,255,255,.67); border-radius: 8px; }
body.es-admin-legacy .es-admin-nav__item i { color: rgba(255,255,255,.38); }
body.es-admin-legacy .es-admin-nav__item:hover { color: #fff; background: rgba(255,255,255,.055); }
body.es-admin-legacy .es-admin-nav__item:hover i { color: rgba(255,255,255,.74); }
body.es-admin-legacy .es-admin-nav__item.is-active { color: #fff; background: rgba(242,106,33,.115); box-shadow: inset 2px 0 0 #f27a3b; }
body.es-admin-legacy .es-admin-nav__item.is-active i { color: #ff9a65; }
body.es-admin-legacy .es-admin-nav__item--danger { color: #ffaaa3; }
@media (max-width: 991px) {
    body.es-admin-legacy .es-admin-sidebar__mobile-head { border-bottom-color: rgba(255,255,255,.10); color: #fff; }
    body.es-admin-legacy .es-admin-sidebar__mobile-head button { color: #fff; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.10); }
}


/* V6.6 admin navigation/layout stabilization */
@media (min-width: 992px) {
    body.es-admin-legacy .es-admin-sidebar {
        position: fixed;
        top: 88px;
        left: max(24px, calc((100vw - 1440px) / 2));
        width: 248px !important;
        max-height: calc(100vh - 108px);
        z-index: 1100;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }
    body.es-admin-legacy > .products > .container {
        grid-template-columns: 248px minmax(0,1fr);
        min-height: 420px;
    }
    body.es-admin-legacy > .products > .container > .col-md-9,
    body.es-admin-legacy > .products > .container > .col-md-8,
    body.es-admin-legacy > .products > .container > .product-w3ls-right,
    body.es-admin-legacy > .products > .container > .producta {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        margin-top: 0 !important;
    }
    /* A few older event pages use .wthree-offers rather than .products. Keep
       them aligned with the same fixed navigation instead of allowing legacy
       floats to push the page content below the sidebar. */
    body.es-admin-legacy > .wthree-offers {
        padding: 32px 0 64px !important;
        background: #f7f6f3 !important;
    }
    body.es-admin-legacy > .wthree-offers > .container {
        width: min(1440px, calc(100% - 48px));
        max-width: 1440px;
        padding-left: 276px !important;
        padding-right: 0 !important;
    }
    body.es-admin-legacy > .wthree-offers .offer-bottom,
    body.es-admin-legacy > .wthree-offers .offer-bottom-grids {
        width: 100% !important;
        float: none !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Align legacy summary/breadcrumb blocks on sales/withdrawal pages with
       the main content column rather than letting them sit over the sidebar. */
    body.es-admin-legacy > .es-admin-topbar + .container {
        width: min(1440px, calc(100% - 48px));
        max-width: 1440px;
        padding-left: 276px;
        padding-right: 0;
    }
}


/* ============================================================
   ESMART ADMIN REAL LOGO LOCKUP 2026
   Uses clean emblem + real HTML typography.
   No cropped raster wordmark.
   ============================================================ */


.es-admin-topbar__brand {
    display: inline-flex;
    align-items: center;

    min-width: 0;

    padding: 0;

    overflow: visible;

    color: inherit;

    background: transparent;

    text-decoration: none;
}


.es-admin-logo-lockup {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    min-width: 0;

    line-height: 1;
}


.es-admin-logo-lockup__mark {
    display: block;

    width: 48px;
    height: 48px;

    flex: 0 0 auto;

    object-fit: contain;
    object-position: center;

    overflow: visible;
}


.es-admin-logo-lockup__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;
}


.es-admin-logo-lockup__word {
    display: flex;
    align-items: baseline;

    color: #1c1b19;

    font-family:
        "Plus Jakarta Sans",
        sans-serif;

    font-size: 23px;
    font-weight: 800;

    letter-spacing: -1.2px;

    line-height: .92;

    white-space: nowrap;
}


.es-admin-logo-lockup__e {
    color: #ef6500;
}


.es-admin-logo-lockup__smart {
    color: #191817;
}


.es-admin-logo-lockup__descriptor {
    display: block;

    margin-top: 5px;

    color: #817a72;

    font-size: 7px;
    font-weight: 800;

    letter-spacing: .12em;

    line-height: 1;

    text-transform: uppercase;

    white-space: nowrap;
}


/*
Ensure none of the new emblem is clipped.
*/
.es-admin-topbar,
.es-admin-topbar__brand {
    overflow: visible;
}


/* ============================================================
   MOBILE SIDEBAR BRAND
   ============================================================ */

.es-admin-sidebar__mobile-brand {
    display: inline-flex;
    align-items: center;

    min-width: 0;

    color: inherit;

    text-decoration: none;
}


.es-admin-logo-lockup--sidebar
.es-admin-logo-lockup__mark {
    width: 43px;
    height: 43px;
}


.es-admin-logo-lockup--sidebar
.es-admin-logo-lockup__word {
    font-size: 21px;
}


.es-admin-logo-lockup--sidebar
.es-admin-logo-lockup__descriptor {
    font-size: 6.5px;
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 991px) {

    .es-admin-topbar__brand {
        width: auto;
        min-width: 0;
    }

    .es-admin-logo-lockup__mark {
        width: 44px;
        height: 44px;
    }

    .es-admin-logo-lockup__word {
        font-size: 21px;
    }

    .es-admin-logo-lockup__descriptor {
        font-size: 6.5px;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    .es-admin-topbar {
        overflow: visible;
    }

    .es-admin-logo-lockup {
        gap: 5px;
    }

    .es-admin-logo-lockup__mark {
        width: 39px;
        height: 39px;
    }

    .es-admin-logo-lockup__word {
        font-size: 19px;
        letter-spacing: -.9px;
    }

    /*
     Keep topbar compact.
    */
    .es-admin-topbar
    .es-admin-logo-lockup__descriptor {
        display: none;
    }

    .es-admin-sidebar__mobile-head {
        min-height: 61px;

        gap: 12px;

        padding-top: 4px;
        padding-bottom: 12px;
    }

    .es-admin-sidebar__mobile-brand {
        min-width: 0;
        flex: 1 1 auto;
    }

    .es-admin-logo-lockup--sidebar
    .es-admin-logo-lockup__mark {
        width: 42px;
        height: 42px;
    }

    .es-admin-logo-lockup--sidebar
    .es-admin-logo-lockup__word {
        font-size: 20px;
    }
}


/* ============================================================
   VERY SMALL MOBILE
   ============================================================ */

@media (max-width: 380px) {

    .es-admin-logo-lockup__mark {
        width: 36px;
        height: 36px;
    }

    .es-admin-logo-lockup__word {
        font-size: 18px;
    }

    .es-admin-logo-lockup--sidebar
    .es-admin-logo-lockup__mark {
        width: 39px;
        height: 39px;
    }
}

