/* =========================================
    EKKO Portal CSS (Complete & Fixed)
   ========================================= */

/* ===== Variables & Base ===== */
:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --text: #1f2430;
    --muted: #6e7693;
    --primary: #5a57ff;
    --primary-2: #00b7d4;
    --border: #e6e8ee;
    --shadow: 0 10px 24px rgba(31, 38, 135, .08);
    --radius: 14px;
    --radius-lg: 20px;
    --sidebar-w: 260px;
    --gap: 24px;
    --adminbar-h: 32px; /* desktop WP admin bar */
}

.ekko-portal,
.ekko-portal *,
.ekko-portal *::before,
.ekko-portal *::after {
    box-sizing: border-box;
}

.ekko-portal a {
    text-decoration: none;
    color: inherit;
}

.ekko-portal ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ekko-portal {
    display: flex;
    gap: var(--gap);
    background: var(--bg);
    color: var(--text);
  
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Sidebar ===== */
.ekko-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 100vh;
    min-width: var(--sidebar-w);
    background: linear-gradient(180deg, #6b7bff, #6b55ff);
    color: #fff;
    border-radius: 0px;
    padding: 24px 14px;
    box-shadow: var(--shadow);
    padding-bottom: 1650px; /* THÊM DÒNG NÀY */
    
}

body.admin-bar .ekko-sidebar {
    top: var(--adminbar-h);
}

@media (max-width: 782px) {
    :root { --adminbar-h: 46px; }
}

.ekko-sidebar .brand {
    font-weight: 800;
    font-size: 22px;
    margin: 6px 10px 16px;
}

.ekko-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ekko-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    opacity: .95;
    transition: background .15s ease, transform .1s ease;
}

.ekko-sidebar nav a:hover { background: rgba(255, 255, 255, .12); }
.ekko-sidebar nav a:active { transform: translateY(1px); }
.ekko-sidebar nav a.active {
    background: rgba(255, 255, 255, .18);
    box-shadow: var(--shadow);
}

/* ===== Main Content ===== */
.ekko-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

/* Breadcrumb */
.ekko-breadcrumb {
    background: #fff;
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.ekko-breadcrumb .crumb-home { display: inline-flex; align-items: center; gap: 6px; color: #334; }
.ekko-breadcrumb .sep { opacity: .5; }
.ekko-breadcrumb .current { font-weight: 700; }

/* Hero */
.ekko-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #5e67ff, #00b8d4);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 22px 26px;
    margin: 10px 0 18px;
    box-shadow: var(--shadow);
}

.ekko-hero h1 { margin: 0 0 6px; font-size: 30px; line-height: 1.15; }
.ekko-hero p { margin: 0; opacity: .95; }
.ekko-hero .ekko-time { opacity: .95; }

/* Cards & Panels */
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 10px;
    padding: 16px;
    align-items: center;
}
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: #f5f6ff; display: grid; place-items: center; }
.card__meta .card__value { font-weight: 800; font-size: 28px; }
.card__meta .card__label { color: var(--muted); font-size: 12px; }
.card__hint { font-size: 12px; margin-top: 6px; }
.card__hint.up { color: #10b981; }
.card__hint.wait { color: #d97706; }
.card__hint.ok { color: #22c55e; }

.panels { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin: 18px 0; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.panel__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }

/* Quick Tiles & Widgets */
.quick__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; }
.quick__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: block; transition: transform .08s ease; }
.tile:hover { transform: translateY(-1px); }
.tile__icon { font-size: 22px; }
.tile__title { font-weight: 700; margin-top: 6px; }
.tile__hint { color: var(--muted); font-size: 12px; }

.widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.widget { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.widget__title { font-weight: 700; margin-bottom: 8px; }

/* Sections & General Components */
.ekko-section { display: none; }
.ekko-section.show { display: block; }

.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #f2f3f8; margin-left: 8px; font-weight: 600; }
.badge.admin { background: #e9f0ff; color: #3b5998; }
.badge.seller { background: #ebfff5; color: #059669; }
.badge.ok { background: #eafff2; color: #059669; }
.badge.warn { background: #fffbeb; color: #d97706; }

/* ===== Users Management ===== */
.users-toolbar { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.users-toolbar .search { flex: 1; }
.users-toolbar input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    outline: none;
}
.users-toolbar input:focus { border-color: #cfd3f5; box-shadow: 0 0 0 3px rgba(90, 87, 255, .12); }

.filters { display: flex; gap: 8px; margin: 8px 0 12px; flex-wrap: wrap; }
.filters .pill {
    padding: 8px 14px;
    border-radius: 999px;
    background: #f1f3f7;
    cursor: pointer;
    color: #334;
    transition: background .15s ease;
}
.filters .pill:hover { background: #e9ecf6; }
.filters .pill.active { background: #eceaff; color: var(--primary); }

.user-list { display: grid; gap: 10px; }
.user-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px 14px;
}
.user-left { display: flex; gap: 10px; align-items: center; min-width: 0; }
.user-left .avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #eef;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #475;
    flex-shrink: 0;
}
.user-left .meta { min-width: 0; }
.user-left .meta .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-left .email { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-right { display: flex; gap: 10px; align-items: center; }
.user-right .money { font-weight: 700; }
.user-right .date { color: var(--muted); font-size: 12px; }

.btns .btn-eye,
.btns .btn-toggle {
    border: 1px solid var(--border);
    background: #fff;
    color: #333;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background .12s ease, transform .08s ease;
}
.btns .btn-eye:hover,
.btns .btn-toggle:hover { background: #f6f7ff; }
.btns .btn-eye:active,
.btns .btn-toggle:active { transform: translateY(1px); }

/* ===== Modal & New Quick View Design ===== */
.ekko-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .25);
    z-index: 99999;
}

.ekko-modal__content {
    background: #fff;
    border-radius: 16px;
    max-width: 720px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    position: relative;
    animation: ekkoModalIn .3s ease;
    box-shadow: 0 24px 60px -32px rgba(15, 23, 42, 0.45);
}

.ekko-modal__content--wide {
    max-width: 900px;
}

.ekko-modal__content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.ekko-modal__content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.ekko-modal__content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

.ekko-modal__content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.ekko-modal__body {
    padding: 32px 36px;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

@media (max-width: 600px) {
    .ekko-modal__body {
        padding: 24px 22px;
    }
}

/* Scrollbar cho danh sách virtual accounts */
.info-group > div[style*="max-height: 300px"]::-webkit-scrollbar {
    width: 6px;
}

.info-group > div[style*="max-height: 300px"]::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.info-group > div[style*="max-height: 300px"]::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 3px;
}

.info-group > div[style*="max-height: 300px"]::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.ekko-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: #f1f3f7;
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
    z-index: 10;
}
.ekko-modal__close:hover {
    background: #f87171;
    color: #fff;
}

.qv-new {
    padding: 0;
}

.qv-new__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.qv-new__avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #eef;
    color: #4b5563;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.qv-new__name { margin: 0 0 4px; font-size: 20px; color: var(--text); }
.qv-new__info { font-size: 14px; color: var(--muted); }

.qv-new__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px 40px;
    align-items: start;
}

.qv-new__section { margin-bottom: 24px; }
.qv-new__section:last-child { margin-bottom: 0; }
.qv-new__section label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 14px; font-weight: 500; }
.qv-new__section p { margin: 0; font-weight: 500; color: var(--text); }
.qv-new__section label strong { color: var(--text); font-weight: 700; }

.qv-new__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.qv-new__button {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.qv-new__button.primary { background-color: var(--primary); border-color: var(--primary); color: #fff; }
.qv-new__button.primary:hover { filter: brightness(1.1); }
.qv-new__button.ghost { background-color: transparent; color: var(--muted); }
.qv-new__button.ghost:hover { background-color: #f6f7fb; border-color: #d1d5db; color: var(--text); }
.qv-new__button:disabled { opacity: 0.7; cursor: not-allowed; background-color: #f1f3f7; color: var(--muted); }
.qv-new__button.small { padding: 8px 12px; }

.qv-new__input {
    width: 100%;
    max-width: 150px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    outline: none;
}
.qv-new__input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(90, 87, 255, .12); }

/* ===== EKKO Wallet Box (Bootstrap Icons Version with Shine Effect) ===== */
.ekko-wallet-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, #16c97e, #10b981);
    border-radius: 10px;
    padding: 8px 10px 8px 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(20, 150, 70, .25);
    font-size: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ekko-wallet-box:hover {
    box-shadow: 0 6px 16px rgba(20, 150, 70, .35);
    filter: brightness(1.05);
}

.ekko-wallet-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.25) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: left 0.65s ease-in-out;
}

.ekko-wallet-box:hover::before {
    left: 120%;
}

.ekko-wallet-box .wallet-icon i { font-size: 20px; vertical-align: middle; }
.ekko-wallet-box .coin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.15);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.ekko-wallet-box .coin-icon i { font-size: 18px; color: rgba(255, 255, 255, 0.9); }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panels { grid-template-columns: 1fr; }
    .widgets { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .ekko-portal { flex-direction: column; }
    .ekko-sidebar {
        position: static;
        height: auto;
        min-width: 0;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    .qv-new__grid {
        grid-template-columns: 1fr;
    }
}
/* ===== Thống kê trang Users ===== */
.ekko-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.ekko-stats .stat {
    background: var(--panel);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.ekko-stats .val {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
}

.ekko-stats .lbl {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}
/* ===== HOTFIX: Sửa lỗi Modal không căn giữa & Input quá nhỏ ===== */
/* ===== HOTFIX v3: Sửa lỗi căn giữa và các lỗi hiển thị khác ===== */

/* 1. Thay đổi hoàn toàn phương pháp căn giữa modal */
.ekko-modal {
    /* Bỏ display:flex đi để tránh xung đột */
    display: block; 
}

.ekko-modal__content {
    /* Dùng phương pháp transform để căn giữa, an toàn hơn */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Giữ lại các thuộc tính kích thước */
    max-width: 720px;
    width: 92%;
}

/* 2. Sửa lỗi ô nhập tiền (giữ lại từ lần trước) */
.qv-new__input {
    flex: 1;
    min-width: 120px;
    width: auto;
    max-width: none;
}
/* ===== Product Management Page ===== */
.product-hero {
    background: linear-gradient(90deg, #10b981, #14b8a6);
}
.product-stats .stat {
    background-color: #f8fafc;
    border: 1px solid var(--border);
    box-shadow: none;
}
.product-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 20px 0 12px;
    border: 1px solid var(--border);
}
.product-toolbar .search-box { display: flex; align-items: center; gap: 8px; flex-grow: 1; }
.product-toolbar .search-box i { color: var(--muted); }
.product-toolbar .search-box input { border: none; outline: none; width: 100%; font-size: 14px; }
.product-toolbar .actions { display: flex; gap: 8px; }
.product-filters { background-color: #fff; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.product-filters .pill { background-color: #f1f3f7; color: var(--muted); transition: all .2s ease; cursor: pointer; padding: 8px 16px; border-radius: 8px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.product-filters .pill:hover { background-color: #e2e8f0; color: var(--text); }
.product-filters .pill.active { background-color: #10b981; color: #fff; }
.product-list { display: grid; gap: 16px; margin-top: 16px; }
.product-card { display: flex; gap: 16px; align-items: center; background: #fff; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); transition: box-shadow .2s ease, border-color .2s ease; }
.product-card:hover { border-color: #d1d5db; box-shadow: var(--shadow); }
.product-card__image { width: 64px; height: 64px; flex-shrink: 0; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.product-card__details { flex-grow: 1; min-width: 0; }
.product-card__title { font-size: 16px; margin: 0 0 6px; font-weight: 600; }
.product-card__meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.product-card__meta span { display: flex; align-items: center; gap: 4px; }
.product-card__tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.product-card__info { text-align: right; margin-left: auto; }
.product-card__price { font-weight: 700; font-size: 18px; color: var(--primary); }
.product-card__date { font-size: 12px; color: var(--muted); }
.product-card__actions { display: flex; gap: 8px; padding-left: 16px; border-left: 1px solid var(--border); margin-left: 16px; }
.product-card__actions .action-btn { background: #f1f3f7; border: 1px solid transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; transition: all .2s ease; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.product-card__actions .action-btn:hover { background: #e2e8f0; color: var(--text); }
.product-card__actions .action-btn.star:hover, .product-card__actions .action-btn .bi-star-fill { background: #fffbeb; color: #f59e0b; border-color: #fef3c7; }

/* ===== Product Quick View Modal ===== */
.product-qv { padding: 16px 24px 24px; }
.product-qv__header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 16px; }
.product-qv__header h2 { margin: 0; font-size: 20px; }
.product-qv__body { max-height: 60vh; overflow-y: auto; padding: 10px; margin: 0 -10px;}
.product-qv__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.product-qv .info-group { margin-bottom: 16px; }
.product-qv .info-group h4 { font-size: 14px; margin: 0 0 10px; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.product-qv .info-group p { margin: 0 0 8px; font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;}
.product-qv .info-group p strong { color: var(--text); }
.product-qv .info-group p span { text-align: right; }
.product-qv__footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
/* ===== Product Management Page ===== */
.product-hero {
    background: linear-gradient(90deg, #10b981, #14b8a6);
}
.product-stats .stat {
    background-color: #f8fafc;
    border: 1px solid var(--border);
    box-shadow: none;
}
.product-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: #fff;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin: 20px 0 12px;
    border: 1px solid var(--border);
}
.product-toolbar .search-box { display: flex; align-items: center; gap: 8px; flex-grow: 1; }
.product-toolbar .search-box i { color: var(--muted); }
.product-toolbar .search-box input { border: none; outline: none; width: 100%; font-size: 14px; }
.product-toolbar .actions { display: flex; gap: 8px; }
.product-filters { background-color: #fff; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.product-filters .pill { background-color: #f1f3f7; color: var(--muted); transition: all .2s ease; cursor: pointer; padding: 8px 16px; border-radius: 8px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.product-filters .pill:hover { background-color: #e2e8f0; color: var(--text); }
.product-filters .pill.active { background-color: #10b981; color: #fff; }
.product-list { display: grid; gap: 16px; margin-top: 16px; }
.product-card { display: flex; gap: 16px; align-items: center; background: #fff; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); transition: box-shadow .2s ease, border-color .2s ease; }
.product-card:hover { border-color: #d1d5db; box-shadow: var(--shadow); }
.product-card__image { width: 64px; height: 64px; flex-shrink: 0; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.product-card__details { flex-grow: 1; min-width: 0; }
.product-card__title { font-size: 16px; margin: 0 0 6px; font-weight: 600; }
.product-card__meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.product-card__meta span { display: flex; align-items: center; gap: 4px; }
.product-card__tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.product-card__info { text-align: right; margin-left: auto; }
.product-card__price { font-weight: 700; font-size: 18px; color: var(--primary); }
.product-card__date { font-size: 12px; color: var(--muted); }
.product-card__actions { display: flex; gap: 8px; padding-left: 16px; border-left: 1px solid var(--border); margin-left: 16px; }
.product-card__actions .action-btn { background: #f1f3f7; border: 1px solid transparent; color: var(--muted); width: 36px; height: 36px; border-radius: 8px; cursor: pointer; transition: all .2s ease; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.product-card__actions .action-btn:hover { background: #e2e8f0; color: var(--text); }
.product-card__actions .action-btn.star:hover, .product-card__actions .action-btn .bi-star-fill { background: #fffbeb; color: #f59e0b; border-color: #fef3c7; }

/* ===== Product Quick View Modal ===== */
.product-qv { padding: 16px 24px 24px; }
.product-qv__header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 16px; }
.product-qv__header h2 { margin: 0; font-size: 20px; }
.product-qv__body { max-height: 60vh; overflow-y: auto; padding: 10px; margin: 0 -10px;}
.product-qv__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.product-qv .info-group { margin-bottom: 16px; }
.product-qv .info-group h4 { font-size: 14px; margin: 0 0 10px; color: var(--muted); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.product-qv .info-group p { margin: 0 0 8px; font-size: 14px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;}
.product-qv .info-group p strong { color: var(--text); }
.product-qv .info-group p span { text-align: right; }
.product-qv__footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
/* ===== Categories List (Fancy) ===== */
:root{
  --tbl-bg:#ffffff;
  --tbl-border:#e8ecf3;
  --tbl-head:#f4f7ff;
  --tbl-zebra:#fbfcff;
  --ink:#0f172a;
  --muted:#6b7280;
  --brand:#6366f1;
  --green:#10b981;
  --amber:#f59e0b;
  --red:#ef4444;
  --shadow:0 6px 20px rgba(31,38,135,.08);
}

/* Wrapper */
.table{
  width:100%;
  background:var(--tbl-bg);
  border:1px solid var(--tbl-border);
  border-radius:16px;
  overflow:hidden;
  box-shadow:var(--shadow);
  --h-pad:16px;
}

/* Header row */
.table-row.head{
  display:grid;
  grid-template-columns: 92px 1.4fr 1.1fr 2fr 200px;
  align-items:center;
  gap:14px;
  padding:14px var(--h-pad);
  background:linear-gradient(180deg,var(--tbl-head),#eef3ff);
  color:#1f2937;
  font-weight:700;
  letter-spacing:.2px;
  border-bottom:1px solid var(--tbl-border);
}

/* Data rows */
.table-row{
  display:grid;
  grid-template-columns: 92px 1.4fr 1.1fr 2fr 200px;
  align-items:center;
  gap:14px;
  padding:14px var(--h-pad);
  border-bottom:1px solid var(--tbl-border);
  transition: background .2s ease, transform .05s ease, box-shadow .2s ease;
}
.table-row:nth-child(odd){ background:var(--tbl-zebra); }
.table-row:last-child{ border-bottom:none; }

/* Hover highlight */
.table-row:hover{
  background:#f6f9ff;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.08);
}

/* Cells */
.table .cell{ font-size:14px; color:var(--ink); min-width:0; }
.table .cell.muted{ color:var(--muted); }
.table .cell strong{ font-weight:700; }
.table .cell code{
  background:#f1f5f9;
  padding:3px 8px;
  border-radius:8px;
  font-size:12px;
  color:#334155;
  border:1px dashed #e2e8f0;
}

/* Name cell nổi bật */
.table .cell.name{
  font-weight:700;
  display:flex; align-items:center; gap:10px;
}
.table .cell.name .dot{
  width:10px;height:10px;border-radius:50%;
  background:linear-gradient(135deg,#a5b4fc,#6366f1);
  box-shadow:0 0 0 3px rgba(99,102,241,.15);
}

/* Description clamp (2 dòng) */
.table .cell.desc{
  color:#475569;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* Action area */
.table .actions{
  display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap;
}

/* Buttons */
.table .button{
  height:36px; line-height:36px; padding:0 12px;
  border-radius:10px; border:1px solid transparent;
  font-size:13px; font-weight:600; cursor:pointer;
  display:inline-flex; align-items:center; gap:8px;
  background:#f3f6fb; color:#0f172a;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.table .button:active{ transform: translateY(1px); }

.table .button.ghost{ background:#f6f8ff; border-color:#e5e7eb;padding-top: 0;padding-bottom: 0; }
.table .button.ghost:hover{ background:#eef2ff; border-color:#d8def0; }

/* Color variants */
.table .button.view{ background:#eef7ff; color:#0c4a6e; border-color:#cfe9ff; }
.table .button.view:hover{ background:#e1f1ff; }

.table .button.edit{ background:#eef2ff; color:#3730a3; border-color:#dcdffe; }
.table .button.edit:hover{ background:#e6e9ff; }

.table .button.delete{ background:#fff1f2; color:#991b1b; border-color:#fecaca; }
.table .button.delete:hover{ background:#ffe4e6; }

/* Tiny icon circle for action buttons if dùng <i> */
.table .button i{
  width:20px;height:20px;border-radius:50%;
  display:inline-grid;place-items:center;
  background:#ffffff90;font-size:12px;
}

/* Status chips (nếu có) */
.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding:4px 10px; border-radius:999px; font-weight:700; font-size:12px;
}
.chip.visible{ background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.chip.hidden { background:#fff7ed; color:#9a3412; border:1px solid #fed7aa; }

/* Row entry animation (nhẹ) */
.table-row{ animation: tblFade .12s ease both; }
@keyframes tblFade{
  from{ opacity:.0; transform: translateY(2px); }
  to{ opacity:1; transform: translateY(0); }
}

/* Focus ring khi tab vào nút */
.table .button:focus{
  outline:none;
  box-shadow:0 0 0 3px rgba(99,102,241,.25);
}

/* ===== Responsive ===== */
@media (max-width: 1024px){
  .table-row,
  .table-row.head{
    grid-template-columns: 80px 1.2fr 1fr 1.8fr 170px;
  }
}

@media (max-width: 780px){
  .table{ border-radius:14px; }
  .table-row.head{
    display:none; /* ẩn header trên mobile */
  }
  .table-row{
    grid-template-columns: 1fr; gap:8px; padding:14px;
    background:#fff; border-left:4px solid #e5e9f7;
  }
  .table-row:nth-child(odd){ background:#fff; }
  .table .cell{ display:block; }
  .table .cell.name{ font-size:15px; }
  .table .actions{ justify-content:flex-start; }
}
/* ===== Promotions Page ===== */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.promo-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.promo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(31, 38, 135, .1);
}

.promo-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.promo-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.promo-status.active { background-color: #10b981; }
.promo-status.scheduled { background-color: #f59e0b; }
.promo-status.expired { background-color: #6b7280; }

.promo-card-actions { display: flex; gap: 8px; }
.promo-card-actions .action-btn { 
    background: #f1f3f7; 
    border: none; 
    width: 32px; 
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: var(--muted);
 }
.promo-card-actions .action-btn:hover { background: #e2e8f0; color: var(--text); }
.promo-card-actions .action-btn i { font-size: 14px; }

.promo-card-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}
.promo-card-discount {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin: auto 0 10px;
}
.promo-card-dates {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Promotion Form in Modal --- */
.ekko-form { display: flex; flex-direction: column; gap: 15px; }
.ekko-form h2 { margin-top: 0; }
.ekko-form label { font-weight: 600; font-size: 14px; margin-bottom: -5px; color: var(--muted); }
.ekko-form input, .ekko-form select, .ekko-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fdfdff;
}
.ekko-form input:focus, .ekko-form select:focus, .ekko-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 87, 255, .12);
}
.promo-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}
/* FIX: Căn chỉnh các mục trong form khuyến mãi */
.promo-form-grid > div {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Tùy chọn: Thêm khoảng cách nhỏ giữa nhãn và ô nhập liệu */
}
/* ===== HOTFIX: Bảng Coupons 6 cột ===== */
.table--coupons .table-row,
.table--coupons .table-row.head {
    /* Định nghĩa lại layout grid thành 6 cột */
    grid-template-columns: 1.5fr 2fr 1fr 1fr 1.2fr 180px;
}
/* ===== Notifications Page Enhancements ===== */
.ekko-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.tab-link {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: var(--muted);
}
.tab-link:hover {
    color: var(--text);
}
.tab-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

#user-search-results {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 5px;
    max-height: 150px;
    overflow-y: auto;
}
.user-result-item {
    padding: 10px 12px;
    cursor: pointer;
}
.user-result-item:hover {
    background-color: #f6f7fb;
}
.user-result-item span {
    font-size: 12px;
    color: var(--muted);
    margin-left: 8px;
}
#selected-user-display {
    margin-top: 10px;
    padding: 10px;
    background-color: #eef2ff;
    border: 1px solid #dcdffe;
    border-radius: 8px;
    font-weight: 600;
}
/* ===== Product Form Enhancements ===== */
#ekkoProductForm select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fdfdff;
}
#ekkoProductForm select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 87, 255, .12);
}
.table .table-row .cell {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
/* ===== HOTFIX: Bảng Audit Log 7 cột ===== */
/* ===== Blog Management Page ===== */
.table--blog .table-row,
.table--blog .table-row.head {
    grid-template-columns: 2.5fr 1fr 1fr 1.2fr 210px; /* Layout 5 cột */
}
.badge.status-publish { background-color: #ecfdf5; color: #065f46; }
.badge.status-draft { background-color: #f1f5f9; color: #334155; }
.badge.status-pending { background-color: #fffbeb; color: #b45309; }
.badge.status-private { background-color: #f3e8ff; color: #6b21a8; }
/* ===== Chat Module ===== */
.ekko-chat-container {
    display: flex;
    height: 75vh;
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.ekko-chat-sidebar {
    width: 320px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.conversation-list {
    flex-grow: 1;
    overflow-y: auto;
}
.conversation-list .loading {
    padding: 20px;
    text-align: center;
    color: var(--muted);
}
.conversation-item {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background-color .2s ease;
}
.conversation-item:hover {
    background-color: #f9f9fb;
}
.conversation-item.active {
    background-color: #f0f0ff;
}
.conversation-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9e9ff;
    color: var(--primary);
    display: grid;
    place-items: center;
    font-weight: bold;
    margin-right: 12px;
}
.conversation-item .details .name {
    font-weight: 600;
}
.conversation-item .details .excerpt {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.ekko-chat-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.chat-welcome {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--muted);
}
.chat-window {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.chat-message {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
}
.chat-message.sent {
    background-color: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-message.received {
    background-color: #f1f3f7;
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--border);
}
.chat-input-area textarea {
    flex-grow: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    resize: none;
    height: 50px;
    margin-right: 10px;
}
.chat-input-area .send-btn {
    flex-shrink: 0;
    height: 50px;
    width: 50px;
}
/* ===================================================
    SETTINGS PAGE STYLES
   =================================================== */

/* --- Tabs --- */
.settings-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 25px;
}

.settings-tabs .tab-link {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px; /* Nâng lên để đè lên border chính */
    color: #6b7280;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease-in-out;
}

.settings-tabs .tab-link:hover {
    color: #111827;
    background-color: #f9fafb;
}

.settings-tabs .tab-link.active {
    color: #4f46e5;
    border-color: #4f46e5;
}

.settings-tabs + .tab-content {
    display: none;
}

.settings-tabs + .tab-content.active {
    display: block;
}

/* --- Form Elements & Layout --- */
.ekko-form h4 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.ekko-form .description {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

/* --- Toggle Switch --- */
.toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    margin-bottom: 10px;
}

.toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #d1d5db;
    border-radius: 9999px;
    transition: background-color 0.2s ease;
}

.toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.toggle input[type="checkbox"]:checked {
    background-color: #4f46e5;
}

.toggle input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

/* --- Save Status --- */
#settingsSaveStatus {
    font-style: italic;
    transition: color 0.3s;
}
/* ===================================================
   BỔ SUNG CSS RIÊNG CHO TRANG ANALYTICS
   =================================================== */

/* --- Thanh công cụ (Toolbar) --- */
.analytics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Cho phép xuống dòng trên màn hình nhỏ */
    gap: 20px;
    padding: 16px;
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.analytics-toolbar .filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.analytics-toolbar .filter-group label {
    font-weight: 500;
    color: #4b5563;
    font-size: 14px;
    margin-right: 4px;
}

/* --- Nút bấm trong Toolbar --- */
.analytics-toolbar .button.ghost {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

.analytics-toolbar .button.ghost:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

/* Nút bấm được chọn (active) */
.analytics-toolbar .button.ghost.active {
    background-color: #5a57ff;
    color: #fff;
    border-color: #5a57ff;
    font-weight: 600;
}

/* --- Ô chọn ngày (Date Input) --- */
.analytics-toolbar input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    color: #374151;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.analytics-toolbar input[type="date"]:focus {
    outline: none;
    border-color: #5a57ff;
    box-shadow: 0 0 0 3px rgba(90, 87, 255, 0.1);
}

/* --- Khu vực nội dung --- */
#analytics_content {
    padding-top: 24px;
}

/* --- Giao diện các thẻ KPI --- */
#analytics_content .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

#analytics_content .card .card__icon {
    font-size: 28px;
    line-height: 1;
}

/* --- Bảng và biểu đồ --- */
#analytics_content .panels {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Biểu đồ chiếm 2 phần, bảng top list chiếm 1 phần */
    gap: 24px;
    align-items: flex-start;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 992px) {
    .analytics-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    #analytics_content .panels {
        grid-template-columns: 1fr; /* Xếp chồng lên nhau */
    }
}
/* ===================================================
   CSS CHO TRANG HỒ SƠ NGƯỜI DÙNG (GIAO DIỆN HOÀN CHỈNH)
   =================================================== */

/* --- Bố cục lưới chính --- */
.ekko-profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr; /* Sidebar rộng 280px */
    gap: 30px;
    max-width: 1200px;
    margin: 20px auto;
}

/* --- Sidebar điều hướng --- */
.profile-sidebar {
    background-color: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    align-self: flex-start;
}

.profile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.profile-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: black;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background-color 0.2s, color 0.2s;
    border: 1px solid transparent;
}

.profile-menu .menu-link:hover {
    background: #9494ff;
background: linear-gradient(90deg, rgba(148, 148, 255, 1) 14%, rgba(0, 212, 255, 1) 100%);
    color: white;
}

.profile-menu .menu-link.active {
    background-color: #F7F5FF; /* Màu nền tím nhạt khi active */
    color: #309dee; /* Màu chữ tím đậm khi active */
    font-weight: 600;
}

.profile-menu .menu-link i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #9CA3AF; /* Màu icon xám */
}

.profile-menu .menu-link.active i {
    color: #309dee; /* Màu icon tím đậm khi active */
}


/* --- Vùng nội dung chính --- */
.profile-panel { display: none; }
.profile-panel.active { display: block; }

.profile-panel__section {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #f0f0f0;
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.profile-panel__title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

/* --- Khối "Ví của tôi" --- */
.wallet-overview { display: flex; gap: 24px; align-items: center; }
.wallet-balance .label { font-size: 14px; color: #6B7280; margin-bottom: 4px; }
/* Gradient chữ chạy liên tục, không bị ngắt */
/* Gradient chữ chạy liên tục, không biến */
/* Gradient chữ mượt + chạy ngang liên tục */
.wallet-balance .value{
  font-size:32px;
  font-weight:700;
  display:inline-block;

  /* dải màu mượt (đầu và cuối cùng màu để liền mạch) */
  background: linear-gradient(90deg,
    #00c6ff 0%,
    #0096ff 25%,
    #0066ff 50%,
    #0044ff 75%,
    #00c6ff 100%
  );
  background-size: 300% 100%;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;

  animation: value-gradient-slide 6s linear infinite;
  will-change: background-position;
}

@keyframes value-gradient-slide{
  to { background-position: 300% 0; }
}

.wallet-details { display: flex; gap: 20px; flex-grow: 1; }
.wallet-details .detail-item { background-color: #f9fafb; padding: 16px; border-radius: 8px; border: 1px solid #f3f4f6; flex: 1; }
.wallet-details .detail-item .label { display: block; color: #6B7280; font-size: 13px; margin-bottom: 4px; }
.wallet-details .detail-item .value { font-weight: 600; color: #111827; font-size: 18px; }

/* --- Lưới thông tin người dùng --- */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px 30px;
}
.info-item .label { display: block; color: #6B7280; font-size: 13px; margin-bottom: 4px; }
.info-item .value { font-weight: 500; color: #111827; font-size: 15px; background-color: #f3f4f6; padding: 10px 14px; border-radius: 6px; display: block; border: 1px solid #e5e7eb; min-height: 40px; }
.button.primary.small { padding: 8px 16px; font-size: 14px;background: #9494ff;
background: linear-gradient(90deg, rgba(148, 148, 255, 1) 14%, rgba(0, 212, 255, 1) 100%); border-color: #6D28D9; }
.button.primary.small:hover { background-color: #5B21B6; border-color: #5B21B6; }

/* CSS cho KYC và các form (giữ nguyên) */
.kyc-status{display:flex;align-items:center;gap:20px;padding:24px;border-radius:8px;margin-top:20px}.kyc-status i{font-size:36px;flex-shrink:0}.kyc-status h4{margin:0 0 8px 0;font-size:18px}.kyc-status p{margin:0;color:#4B5563}.kyc-approved{background-color:#f0fdf4;color:#15803d}.kyc-approved i{color:#22c55e}.kyc-pending{background-color:#fffbeb;color:#b45309}.kyc-pending i{color:#f59e0b}.kyc-form-wrapper .ekko-form input[type="file"]{width:100%;padding:10px;border:1px solid #d1d5db;border-radius:6px;background-color:#f9fafb}.ekko-error{background-color:#fef2f2;color:#b91c1c;border:1px solid #fecaca;border-left-width:4px;border-left-color:#ef4444;padding:16px;border-radius:6px;margin-bottom:24px}

/* --- Responsive --- */
@media (max-width: 992px) {
    .ekko-profile-grid {
        grid-template-columns: 1fr;
    }
    .wallet-overview {
        flex-direction: column;
        align-items: stretch;
    }
}
/* ===================================================
    EKKO Portal CSS - Transaction Management Styles
   =================================================== */

/* ---- Main Table Container ---- */
.panel .table--transactions {
    border: 1px solid #e5e7eb; /* Thêm viền nhẹ cho toàn bộ bảng */
    border-radius: 8px;
    overflow: hidden; /* Đảm bảo các góc bo được áp dụng cho các dòng bên trong */
    background-color: #fff;
}

.table--transactions .table-row {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) 1.5fr 1fr 1.2fr minmax(220px, 1.5fr); /* Layout cột linh hoạt */
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease-in-out;
}

.table--transactions .table-row:last-child {
    border-bottom: none; /* Bỏ viền cho dòng cuối cùng */
}

.table--transactions .table-row:not(.head):hover {
    background-color: #f9fafb; /* Hiệu ứng hover nhẹ */
}

/* ---- Table Header ---- */
.table--transactions .table-row.head {
    background-color: #f9fafb;
    padding-top: 12px;
    padding-bottom: 12px;
}

.table--transactions .table-row.head .cell {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- Table Cells ---- */
.table--transactions .cell {
    display: flex;
    align-items: center;
    gap: 8px; /* Khoảng cách cho các phần tử trong cell (ví dụ: dot và text) */
}

/* Cell for Transaction ID and Date */
.table--transactions .cell.name strong {
    color: #111827;
    font-weight: 600;
}

.table--transactions .cell .muted {
    font-size: 0.85rem;
    color: #6b7280;
}

.table--transactions .cell .dot {
    width: 8px;
    height: 8px;
    background-color: var(--ekko-primary, #5a57ff);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Cell for Actions */
.table--transactions .cell.actions {
    justify-content: flex-end; /* Căn phải các nút */
    gap: 10px;
}

/* ---- Status Badge ---- */
.table--transactions .badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
}

.badge.status-wc-awaiting-delivery {
    background-color: #f59e0b; /* Màu cam cho "Chờ giao hàng" */
}
.badge.status-wc-delivered {
    background-color: #3b82f6; /* Màu xanh dương cho "Đã giao hàng" */
}
.badge.status-wc-completed {
    background-color: #16a34a; /* Màu xanh lá cho "Hoàn thành" */
}
.badge.status-wc-processing {
    background-color: #a855f7; /* Màu tím cho "Đang xử lý" */
}
.badge.status-wc-cancelled,
.badge.status-wc-failed,
.badge.status-wc-refunded {
    background-color: #ef4444; /* Màu đỏ cho các trạng thái hủy/lỗi */
}
.badge.status-wc-on-hold {
    background-color: #6b7280; /* Màu xám cho "Tạm giữ" */
}

/* ---- Action Buttons ---- */
.table--transactions .cell.actions .button {
    font-size: 0.85rem;
}

.table--transactions .cell.actions .button.seller-delivery-btn {
    background-color: #1d4ed8;
    color: #fff;
}
.table--transactions .cell.actions .button.seller-delivery-btn:hover {
    background-color: #1e40af;
}

.table--transactions .cell.actions .button.buyer-complete-btn {
    background-color: #15803d;
    color: #fff;
}
.table--transactions .cell.actions .button.buyer-complete-btn:hover {
    background-color: #166534;
}

/* ---- Responsive for smaller screens ---- */
@media (max-width: 992px) {
    .table--transactions .table-row {
        grid-template-columns: 1.5fr 1fr 1fr; /* Ẩn bớt cột */
        padding: 12px 15px;
    }
    .table--transactions .cell:nth-child(2), /* Ẩn cột Đối tác */
    .table--transactions .cell:nth-child(4) { /* Ẩn cột Trạng thái (có thể xem chi tiết) */
        display: none;
    }
}

@media (max-width: 768px) {
    .ekko-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .table--transactions .table-row {
        display: flex; /* Chuyển về layout flex cho mobile */
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .table--transactions .table-row.head {
        display: none; /* Ẩn header trên mobile */
    }
    .table--transactions .cell {
        width: 100%;
    }
    /* Thêm label cho từng cell trên mobile */
    .table--transactions .cell:before {
        content: attr(data-label);
        font-weight: 600;
        color: #374151;
        margin-right: 10px;
    }
    .table--transactions .cell.name:before { content: 'Giao dịch: '; }
    .table--transactions .cell.muted:before { content: 'Đối tác: '; }
    .table--transactions .cell:nth-child(3):before { content: 'Tổng tiền: '; }
    .table--transactions .cell.actions {
        justify-content: flex-start;
        padding-top: 10px;
    }
     .table--transactions .cell.actions:before {
        content: ''; /* Bỏ label cho actions */
    }
}
/* ===================================================
    EKKO Portal CSS - Transaction Status Colors
   =================================================== */

/* Màu xanh lá cho các trạng thái hoàn thành/thành công */
.badge.status-completed,
.badge.status-wc-completed {
    background-color: #dcfce7; /* Nền xanh nhạt */
    color: #166534; /* Chữ xanh đậm */
}

/* Màu cam cho các trạng thái đang chờ */
.badge.status-pending,
.badge.status-awaiting-delivery,
.badge.status-wc-processing {
    background-color: #ffedd5; /* Nền cam nhạt */
    color: #9a3412; /* Chữ cam đậm */
}

/* Màu xanh dương cho trạng thái đã giao hàng */
.badge.status-delivered,
.badge.status-wc-delivered {
    background-color: #dbeafe; /* Nền xanh dương nhạt */
    color: #1e40af; /* Chữ xanh dương đậm */
}

/* Màu đỏ cho các trạng thái bị hủy/thất bại */
.badge.status-cancelled,
.badge.status-wc-cancelled,
.badge.status-failed,
.badge.status-wc-failed,
.badge.status-refunded,
.badge.status-wc-refunded {
    background-color: #fee2e2; /* Nền đỏ nhạt */
    color: #991b1b; /* Chữ đỏ đậm */
}

/* Màu xám cho các trạng thái khác */
.badge.status-on-hold,
.badge.status-wc-on-hold {
    background-color: #f3f4f6; /* Nền xám nhạt (mặc định) */
    color: #4b5563; /* Chữ xám đậm */
}
/* Styling for Chat Sender Labels */
.chat-message-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    max-width: 80%;
}

.chat-message-wrapper.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message-wrapper.received {
    align-self: flex-start;
    align-items: flex-start;
}

.sender-label {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
    padding: 0 12px;
}

.chat-message-wrapper.sent .chat-message {
    background-color: #007bff; /* Màu tin nhắn gửi đi */
    color: white;
    border-radius: 18px 18px 4px 18px;
}

.chat-message-wrapper.received .chat-message {
    background-color: #e9e9eb; /* Màu tin nhắn nhận được */
    color: #333;
    border-radius: 18px 18px 18px 4px;
}

.chat-message {
    padding: 10px 15px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap; /* Giữ lại các lần xuống dòng */
}
/* ===== Bố cục Panel chung ===== */
.panel {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
}

/* ===== Bố cục Bảng (Table) ===== */
.table {
    width: 100%;
    background: var(--tbl-bg);
    border: 1px solid var(--tbl-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    --h-pad: 16px;
}

/* Dòng Header của bảng */
.table-row.head {
    display: grid;
    /* Cấu trúc cột sẽ được tùy chỉnh cho từng bảng cụ thể */
    align-items: center;
    gap: 14px;
    padding: 14px var(--h-pad);
    background: linear-gradient(180deg, var(--tbl-head), #eef3ff);
    color: #1f2937;
    font-weight: 700;
    letter-spacing: .2px;
    border-bottom: 1px solid var(--tbl-border);
}

/* Các dòng dữ liệu trong bảng */
.table-row {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 14px var(--h-pad);
    border-bottom: 1px solid var(--tbl-border);
    transition: background .2s ease, transform .05s ease, box-shadow .2s ease;
}
.table-row:nth-child(odd) { background: var(--tbl-zebra); }
.table-row:last-child { border-bottom: none; }
.table-row:hover {
    background: #f6f9ff;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, .08);
}

/* Các ô (Cell) trong bảng */
.table .cell {
    font-size: 14px;
    color: var(--ink);
    min-width: 0;
    display: flex; /* Đảm bảo căn giữa theo chiều dọc */
    align-items: center;
}
.table .cell.muted { color: var(--muted); }
.table .cell strong { font-weight: 700; }
.table .cell.name {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.table .cell.name .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a5b4fc, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

/* Khu vực chứa các nút Hành động */
.table .actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ===== Các loại Nút bấm (Button) ===== */
.table .button {
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f3f6fb;
    color: #0f172a;
    transition: transform .06s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.table .button:active { transform: translateY(1px); }

/* Nút "Xem" (View) */
.table .button.view {
    background: #eef7ff;
    color: #0c4a6e;
    border-color: #cfe9ff;
}
.table .button.view:hover { background: #e1f1ff; }

/* Nút "Phê duyệt" (Approve) - Mượn style từ nút Edit */
.table .button.approve {
    background: #eef2ff;
    color: #3730a3;
    border-color: #dcdffe;
}
.table .button.approve:hover { background: #e6e9ff; }

/* Nút "Từ chối" (Reject/Delete) */
.table .button.delete {
    background: #fff1f2;
    color: #991b1b;
    border-color: #fecaca;
}
.table .button.delete:hover { background: #ffe4e6; }
/* =============================================================
   MODULE HỘP THOẠI HƯỚNG DẪN (MESSAGE BOX)
   ============================================================= */

.ekko-message-box-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(17, 24, 39, 0.4);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ekko-message-box-overlay.show {
    opacity: 1;
}

.ekko-message-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 480px;
    max-width: 90vw;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    z-index: 99999;
    text-align: center;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ekko-message-box-overlay.show .ekko-message-box {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ekko-message-box__icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
}
.ekko-message-box__icon i { font-size: 32px; color: #fff; }

.ekko-message-box__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #111827;
}

.ekko-message-box__message {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 24px;
}

.ekko-message-box__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Các biến thể màu sắc */
.ekko-message-box.info .ekko-message-box__icon { background-color: #3b82f6; }
.ekko-message-box.success .ekko-message-box__icon { background-color: #16a34a; }
/* ===================================================
   VENDOR PORTAL - PRODUCT MANAGEMENT STYLES
   =================================================== */

.ekko-portal.vendor .product-hero {
    background: linear-gradient(90deg, #5a57ff, #3c82ff);
    color: #fff;
}

.ekko-portal.vendor .product-list {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.ekko-portal.vendor .product-card {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ekko-portal.vendor .product-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ekko-portal.vendor .product-card__image img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f3f4f6;
}

.ekko-portal.vendor .product-card__details .product-card__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

.ekko-portal.vendor .product-card__tags {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ekko-portal.vendor .product-card__info {
    text-align: right;
}

.ekko-portal.vendor .product-card__price {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.ekko-portal.vendor .product-card__actions {
    display: flex;
    gap: 8px;
    padding-left: 16px;
    border-left: 1px solid #e5e7eb;
    margin-left: 16px;
}
.ekko-portal.vendor .product-card__actions .action-btn {
    background-color: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #6b7280;
    transition: all 0.2s ease;
}
.ekko-portal.vendor .product-card__actions .action-btn:hover {
    background-color: #e5e7eb;
    color: #111827;
}
.ekko-portal.vendor .product-card__actions .action-btn.delete:hover {
    background-color: #fee2e2;
    color: #ef4444;
}
/* ===================================================
   BỔ SUNG CSS SỬA LỖI HIỂN THỊ BẢNG (TABLE LAYOUT FIX)
   =================================================== */

.ekko-portal .table {
    width: 100%;
    display: table; /* Giúp layout ổn định hơn */
    border-collapse: collapse;
}

.ekko-portal .table .table-row {
    display: flex; /* Dùng Flexbox để căn chỉnh các cột */
    align-items: center; /* Căn giữa các cell theo chiều dọc */
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 15px;
    box-sizing: border-box;
}

.ekko-portal .table .table-row:last-child {
    border-bottom: none;
}

.ekko-portal .table .table-row.head {
    background-color: #f9fafb;
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9rem;
    padding: 10px 15px;
}

.ekko-portal .table .table-row .cell {
    flex: 1; /* Chia đều không gian cho các cột */
    padding: 0 8px; /* Thêm khoảng cách giữa các cột */
    min-width: 0; /* Ngăn nội dung dài làm vỡ layout */
    box-sizing: border-box;
}

/* Tùy chỉnh chiều rộng cho các cột đặc thù nếu cần */
.table--transactions .table-row .cell:nth-child(1), /* Cột Giao dịch */
.table--audit .table-row .cell:nth-child(1) { /* Cột Người dùng */
    flex-basis: 25%;
}

.table--transactions .table-row .cell.actions,
.table--audit .table-row .cell:last-child {
    flex: 0 0 200px; /* Cố định chiều rộng cột Action */
    justify-content: flex-end;
    display: flex;
}
/* ===================================================
    FIX: WordPress Editor (TinyMCE) UI Conflict
   =================================================== */

/* Ngăn các button trong trình soạn thảo bị kéo dài 100% chiều rộng */
.wp-editor-container .mce-container,
.wp-editor-container .mce-container *,
.wp-editor-container .mce-widget,
.wp-editor-container .mce-widget *,
.wp-editor-container .mce-btn button {
    width: auto !important;
    min-width: 0 !important;
}

/* Đảm bảo các toolbar hiển thị đúng trên một hàng */
.wp-editor-container .mce-toolbar-grp,
.wp-editor-container .mce-statusbar {
    display: flex;
    flex-wrap: wrap;
}

.wp-editor-container .mce-btn {
    padding: 0 2px !important;
}
#qt_message_group_toolbar{
    display:none;
}
#qt_message_individual_toolbar{
    display:none;
}
/* ===== Bổ sung thanh thông báo chạy cho Vendor Dashboard ===== */
.ekko-ticker-wrap {
    background: linear-gradient(90deg, #f0f3ff, #e6e9ff);
    border: 1px solid #dcdffe;
    border-radius: 12px;
    padding: 12px 0;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(90, 87, 255, .08);
    margin-top: 10px;
    margin-bottom: 24px;
}

.ekko-ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ekko-marquee 35s linear infinite;
    font-weight: 500;
    color: #4338ca;
}

.ekko-ticker-content i {
    margin-right: 15px;
    font-size: 1.1em;
    vertical-align: middle;
}

.ekko-ticker-content span {
    vertical-align: middle;
}

/* Hiệu ứng chạy chữ từ phải qua trái */
@keyframes ekko-marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
/* ===================================================
   MODULE: GIAN HÀNG NỔI BẬT
   =================================================== */

/* --- Frontend Shortcode --- */
.featured-vendors-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.featured-vendor-card {
    display: grid;
    grid-template-columns: 50px 80px 1fr auto;
    gap: 20px;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.featured-vendor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.vendor-rank {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}
.vendor-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.vendor-info .vendor-name {
    margin: 0 0 5px;
    font-size: 18px;
}
.vendor-info .vendor-name a {
    text-decoration: none;
    color: var(--text);
}
.vendor-info .vendor-name a:hover {
    color: var(--primary);
}
.vendor-info .vendor-description {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}
.vendor-action .button {
    white-space: nowrap;
}

/* --- Admin UI --- */
.featured-vendors-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}
.vendor-sortable-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    min-height: 400px;
    background-color: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
}
.vendor-sortable-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: grab;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.vendor-sortable-list li:active {
    cursor: grabbing;
}
.vendor-sortable-list li img {
    border-radius: 50%;
}
.vendor-sortable-list li.dragging {
    opacity: 0.5;
    background: #eef2ff;
}
.vendor-sortable-list.drag-over {
    border-color: var(--primary);
    background-color: #f4f4f8;
}


/* --- Responsive --- */
@media (max-width: 900px) {
    .featured-vendors-admin-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    .featured-vendor-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .vendor-rank, .vendor-avatar, .vendor-action {
        justify-self: center;
    }
}
/* ===================================================
    CSS cho Nút Chat với Nhà bán hàng
   =================================================== */
/* portal.css */

/* --- Sponsored Products Shortcode --- */
/* ============================================= */
/* == MODULE: SẢN PHẨM TÀI TRỢ - NÂNG CẤP V2 == */
/* ============================================= */

.sponsored-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.sponsored-card {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.sponsored-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.sponsored-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(45deg, #ffc107, #ff9800);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sponsored-card__image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.sponsored-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sponsored-card:hover .sponsored-card__image img {
    transform: scale(1.05);
}

.sponsored-card__content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sponsored-card__vendor {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b7280;
}

.sponsored-card__vendor img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.sponsored-card__title {
    font-size: 17px;
    margin: 0 0 12px;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1; /* Đẩy các phần tử khác xuống dưới */
}

.sponsored-card__title a {
    text-decoration: none;
    color: #1f2430;
}
.sponsored-card__title a:hover {
    color: var(--primary, #5a57ff);
}

.sponsored-card__stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.sponsored-card__stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sponsored-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.sponsored-card__price {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary, #5a57ff);
}

.sponsored-card__price del {
    font-size: 14px;
    color: #9ca3af;
    margin-right: 5px;
}

.sponsored-card__cta {
    background-color: #f3f4f6;
    color: #374151;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sponsored-card__cta:hover {
    background-color: var(--primary, #5a57ff);
    color: #fff;
}
/* --- Admin UI for Sponsored Products --- */
.product-search-wrapper {
    position: relative;
}
#sponsoredProductSearchResults {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    width: 100%;
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
}
.search-result-item:hover {
    background-color: #f0f0f0;
}
.vendor-sortable-list.product-list li img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}
/* --- CSS cho nút xóa sản phẩm tài trợ --- */

.vendor-sortable-list.product-list li {
    position: relative; /* Bắt buộc phải có để định vị nút xóa */
    padding-right: 35px; /* Thêm khoảng trống để nút xóa không đè lên chữ */
}

.remove-sponsored-item {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background-color: #f1f3f7;
    color: #6b7280;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.remove-sponsored-item:hover {
    background-color: #fee2e2; /* Màu đỏ nhạt */
    color: #ef4444; /* Màu đỏ đậm */
}
/* ===================================================
   VENDOR FORM ENHANCEMENTS
   =================================================== */

/* Giao diện form chung trong modal cho Vendor */
/* ===================================================
   VENDOR FORM ENHANCEMENTS V2 (2-COLUMN LAYOUT)
   =================================================== */

.vendor-form {
  max-width: 800px; /* Tăng chiều rộng để chứa 2 cột */
  width: 90%;
  margin: 0 auto;
  background: #fff;
  padding: 24px 30px;
  border-radius: 12px;
  overflow-y: auto;
  max-height: 85vh;
}

.vendor-form h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 22px;
    text-align: center;
    color: var(--text);
}

/* Bố cục lưới 2 cột chính */
.vendor-form .form-grid-main {
    display: grid; /* Cột trái rộng hơn cột phải */
    gap: 24px;
    margin-bottom: 20px;
}

/* Nhóm các label và input */
.vendor-form .info-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

/* Style chung cho input, select, textarea */
.vendor-form label {
    font-weight: 600;
    font-size: 14px;
    color: var(--muted);
}

.vendor-form input[type="text"],
.vendor-form input[type="number"],
.vendor-form textarea,
.vendor-form .ekko-select-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fdfdff;
    font-size: 15px;
    transition: all 0.2s ease;
}

.vendor-form .ekko-select-input{
    padding: 0 14px;
}

.vendor-form input:focus,
.vendor-form textarea:focus,
.vendor-form .ekko-select-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 87, 255, .12);
}

/* Cột phải - Khu vực tải ảnh */
.vendor-form .ekko-thumbnail-uploader {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.vendor-form .ekko-thumbnail-preview {
    border: 2px dashed #e5e7eb;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9fafb;
    flex-grow: 1; /* Cho phép khu vực này giãn ra */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.vendor-form .ekko-thumbnail-preview img {
    max-width: 100%;
    max-height: 250px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}

.vendor-form .ekko-thumbnail-uploader .button {
    width: 100%;
    justify-content: center; /* Căn giữa icon và text trong button */
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
    .vendor-form .form-grid-main {
        grid-template-columns: 1fr; /* Chuyển về 1 cột trên mobile */
    }
}
/* TRONG FILE portal.css */
/* ===== FIX: LỖI HIỂN THỊ DROPDOWN DANH MỤC ===== */

/* Hủy bỏ các style mặc định đang làm hỏng dropdown */
.ekko-form div > select#product_cat {
    width: auto; /* Cho phép select co dãn theo nội dung */
    min-width: 200px; /* Đặt chiều rộng tối thiểu */
    padding: 10px 12px !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    background: #fdfdff !important;
    flex-grow: 1; /* Cho phép nó lấp đầy không gian nếu cần */
}

/* Áp dụng style hiện đại hơn cho dropdown */
.ekko-form .ekko-select-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fdfdff;
    font-size: 14px;
}

.ekko-form .ekko-select-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(90, 87, 255, .12);
}
/* ===================================================
   AVATAR UPLOADER STYLES (DÙNG CHUNG)
   =================================================== */

.profile-header-grid { 
    display: flex; 
    align-items: flex-start; 
    gap: 24px; 
}
.profile-avatar-wrapper { 
    position: relative; 
    flex-shrink: 0; 
}
.profile-avatar-wrapper .avatar { 
    border-radius: 50%; 
    width: 96px; 
    height: 96px; 
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.avatar-change-button { 
    position: absolute; 
    bottom: 0; 
    right: 0; 
    background-color: #fff; 
    border-radius: 50%; 
    width: 32px; 
    height: 32px; 
    display: grid; 
    place-items: center; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    cursor: pointer; 
    transition: background-color 0.2s; 
}
.avatar-change-button:hover { 
    background-color: #f0f0f0; 
}
.avatar-change-button i { 
    font-size: 16px; 
    color: #333; 
}
.avatar-loading-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(255,255,255,0.7) url('/wp-includes/images/spinner-2x.gif') no-repeat center; 
    background-size: 20px 20px; 
    border-radius: 50%; 
}
.profile-header-info { 
    flex-grow: 1; 
}
/* =============================================================
   COMPONENT: BANK DETAILS DISPLAY (FINAL REFACTORED VERSION)
   ============================================================= */

/* Bỏ padding mặc định của cell trong bảng */
.withdrawal-details-row .details-cell-wrapper {
    padding: 0 !important;
}

/* Container chính cho thông tin chi tiết */
.ekko-bank-details {
    display: grid;
    grid-template-columns: max-content 1fr; /* Cột 1: Nhãn, Cột 2: Giá trị */
    gap: 16px 20px; /* Khoảng cách hàng và cột */
    padding: 24px;
    background-color: #f8f9fe;
    border-left: 4px solid var(--primary);
}

/* Style cho Nhãn (cột 1) */
.ekko-bank-details__label {
    font-weight: 600;
    color: var(--muted);
    text-align: right;
}

/* Style cho Giá trị (cột 2) */
.ekko-bank-details__value {
    font-weight: 500;
    color: var(--text);
}

/* Style riêng cho số tài khoản */
.ekko-bank-details__value code {
    background: #eef2ff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 15px;
    color: #4338ca;
    border: 1px solid #dcdffe;
}

/* Style cho thông báo lỗi */
.ekko-bank-details__error {
    grid-column: 1 / -1; /* Chiếm toàn bộ chiều rộng grid */
    color: #ef4444;
}
/* ===================================================
   CSS CHO NÚT BẤM DUYỆT (APPROVE BUTTON)
   =================================================== */

/* Style chung cho các nút có class .approve */
.button.approve {
    background-color: #f0fdf4; /* Nền xanh lá cây rất nhạt */
    color: #15803d; /* Chữ màu xanh lá cây đậm */
    border: 1px solid #a7f3d0; /* Viền màu xanh lá cây nhạt */
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

/* Hiệu ứng khi di chuột qua */
.button.approve:hover {
    background-color: #dcfce7; /* Nền đậm hơn một chút */
    border-color: #6ee7b7;
    color: #14532d; /* Chữ đậm hơn */
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.1);
}

/* Hiệu ứng khi nhấn nút */
.button.approve:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Style cho nút khi bị vô hiệu hóa (disabled), ví dụ khi đang xử lý */
.button.approve:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Tùy chỉnh kích thước riêng cho nút duyệt vendor trong thẻ user-card */
.user-card .btns .vendor-approve-btn {
    padding: 6px 12px;
    font-size: 13px;
    height: auto;
    line-height: normal;
}

/* ===== Transaction Modal ===== */
.ekko-transaction-modal {
    font-family: "Segoe UI", sans-serif;
    color: #1f2937;
    max-width: 720px;
    display: grid;
    gap: 24px;
}
.ekko-transaction-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}
.ekko-transaction-modal__title {
    display: grid;
    gap: 4px;
}
.ekko-transaction-modal__heading {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}
.ekko-transaction-modal__created {
    color: #6b7280;
    font-size: 13px;
}
.badge.transaction-status {
    background: #eef2ff;
    color: #4338ca;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
}
.ekko-transaction-modal__meta {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
}
.ekko-transaction-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: 18px 20px;
    display: grid;
    gap: 12px;
    box-shadow: 0 18px 40px -30px rgba(30, 41, 59, 0.55);
}
.ekko-transaction-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}
.ekko-transaction-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.ekko-transaction-card__item {
    font-size: 14px;
    color: #374151;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ekko-transaction-card__item-label {
    font-weight: 500;
}
.ekko-transaction-card__item-label--strong {
    font-weight: 600;
}
.ekko-transaction-card__item-value {
    font-size: 13px;
    color: #6b7280;
}
.ekko-transaction-card__item--empty {
    color: #9ca3af;
    font-style: italic;
}
.ekko-transaction-items {
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 20px 45px -32px rgba(30, 64, 175, 0.45);
}
.ekko-transaction-items__table {
    width: 100%;
    border-collapse: collapse;
}
.ekko-transaction-items__table th,
.ekko-transaction-items__table td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.ekko-transaction-items__table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.6);
}
.ekko-transaction-items__table th {
    background: linear-gradient(180deg, #f8fbff 0%, #eef2ff 100%);
    font-weight: 600;
    color: #1f2937;
    text-align: left;
}
.ekko-transaction-items__name {
    display: block;
    color: #111827;
}
.ekko-transaction-items__meta {
    display: block;
    color: #6b7280;
    margin-top: 4px;
}
.ekko-transaction-items__qty {
    white-space: nowrap;
}
.ekko-transaction-items__amount {
    text-align: right;
}
.ekko-transaction-items__empty {
    text-align: center;
    color: #9ca3af;
}
.ekko-transaction-totals {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    padding: 18px 20px;
    display: grid;
    gap: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f3f4ff 100%);
    box-shadow: 0 16px 34px -26px rgba(79, 70, 229, 0.4);
}
.ekko-transaction-totals__row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #374151;
}
.ekko-transaction-totals__row.is-total {
    font-size: 18px;
    font-weight: 700;
    color: #1d1f2f;
}
.ekko-transaction-note {
    margin-top: 16px;
    padding: 16px 18px;
    border-left: 4px solid #3b82f6;
    background: linear-gradient(180deg, rgba(224, 231, 255, 0.65) 0%, rgba(238, 242, 255, 0.95) 100%);
    border-radius: 12px;
    font-size: 14px;
    color: #1f2937;
    display: grid;
    gap: 6px;
}
.ekko-transaction-note__title {
    font-weight: 600;
}
.ekko-transaction-note__content {
    color: #1f2937;
}
@media (max-width: 600px) {
    .ekko-transaction-modal__header {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 768px) {
    #ekkoQuickCheckoutModal > div {
        max-width: 100% !important;
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    #ekkoQuickCheckoutContent > div:nth-child(2) {
        grid-template-columns: 1fr !important;
        overflow-y: auto !important;
        max-height: calc(100vh - 100px) !important;
    }
}