/* ============================================
   iHeal Sales Dashboard — CSS
   Dedicated styles for the /sales/ admin area
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --sales-sidebar-w: 280px;
    --sales-header-h: 70px;
    --sales-footer-h: 36px;
    --sales-bg: #F7F7F0;
    --sales-white: #ffffff;
    --sales-primary: #9BC864;
    --sales-primary-dark: #315E26;
    --sales-primary-darker: #1E3D17;
    --sales-text: #292D32;
    --sales-text-light: #888;
    --sales-border: #eee;
    --sales-radius: 14px;
    --sales-radius-lg: 20px;
    --sales-shadow: 0 2px 12px rgba(0,0,0,.06);
    --sales-font: 'Montserrat', sans-serif;
}

/* ---------- Global Reset for Sales ---------- */
.sales-layout * { box-sizing: border-box; }
.sales-layout {
    display: flex;
    min-height: 100vh;
    background: var(--sales-bg);
    font-family: var(--sales-font);
    color: var(--sales-text);
}

/* ---------- Sidebar ---------- */
.sales-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sales-sidebar-w);
    height: calc(100vh - var(--sales-footer-h));
    background: var(--sales-white);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    box-shadow: 2px 0 16px rgba(0,0,0,.04);
    z-index: 100;
    overflow-y: auto;
}

.sales-sidebar__logo { text-align: center; margin-bottom: 28px; }
.sales-sidebar__logo-img { height: 70px; width: auto; }

.sales-sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.sales-sidebar__link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--sales-text);
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
}
.sales-sidebar__link:hover {
    background: #f0f5ea;
    color: var(--sales-primary-dark);
}
.sales-sidebar__link--active {
    background: var(--sales-primary);
    color: #fff;
    font-weight: 700;
}
.sales-sidebar__link--active:hover {
    background: #8bba55;
    color: #fff;
}
.sales-sidebar__link--active .sales-sidebar__icon svg { stroke: #fff; }
.sales-sidebar__icon { display: flex; align-items: center; width: 24px; height: 24px; flex-shrink: 0; }

.sales-sidebar__footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--sales-border);
}

/* ---------- Main Content Area ---------- */
.sales-main {
    margin-left: var(--sales-sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- Header ---------- */
.sales-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: var(--sales-white);
    border-bottom: 1px solid var(--sales-border);
    height: var(--sales-header-h);
    position: sticky;
    top: 0;
    z-index: 90;
}

.sales-header__title {
    font-size: 26px;
    font-weight: 800;
    color: var(--sales-primary-dark);
    margin: 0;
}
.sales-header__greeting { display: flex; flex-direction: column; }
.sales-header__greeting-sub { font-size: 12px; color: var(--sales-text-light); }
.sales-header__greeting-main { font-size: 18px; font-weight: 700; }

.sales-header__right { display: flex; align-items: center; gap: 20px; }

.sales-header__search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 8px 16px;
    min-width: 220px;
}
.sales-header__search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    font-family: var(--sales-font);
    width: 100%;
    color: #333;
}

.sales-header__notif {
    position: relative;
    cursor: pointer;
}
.sales-header__notif-badge {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--sales-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sales-header__user {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.sales-header__avatar img {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.sales-header__user-info { display: flex; flex-direction: column; }
.sales-header__user-name { font-size: 13px; font-weight: 600; }
.sales-header__user-role { font-size: 11px; color: var(--sales-text-light); }

.sales-content {
    flex: 1;
    padding: 28px 32px 60px 32px; /* Extra bottom padding to clear the 30px fixed footer */
}

/* ---------- Footer ---------- */
.sales-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    background: var(--sales-primary-darker);
    height: var(--sales-footer-h);
    display: flex;
    align-items: center;
}
.sales-footer__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 32px;
    width: 100%;
    font-size: 11px;
    color: #fff;
}
.sales-footer__copy { opacity: .8; white-space: nowrap; }
.sales-footer__version {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--sales-primary-dark);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}
.sales-footer__version-dot {
    width: 6px; height: 6px;
    background: var(--sales-primary);
    border-radius: 50%;
}
.sales-footer__link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: .85;
    transition: opacity .2s;
    white-space: nowrap;
}
.sales-footer__link:hover { opacity: 1; }
.sales-footer__divider {
    width: 1px;
    height: 14px;
    background: rgba(92,201,162,.4);
}
.sales-footer__support-label {
    color: var(--sales-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ============ COMMON CARD ============ */
.sales-card {
    background: var(--sales-white);
    border-radius: var(--sales-radius-lg);
    padding: 24px;
    box-shadow: var(--sales-shadow);
}

/* ============ OVERVIEW STAT CARDS ============ */
.sales-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.sales-stat-card { background: var(--sales-white); border-radius: var(--sales-radius-lg); padding: 22px 26px; border: 1px solid var(--sales-border); position: relative; }
.sales-stat-card__header { display: flex; justify-content: space-between; align-items: flex-start; }
.sales-stat-card__label { font-size: 13px; color: var(--sales-text-light); font-weight: 500; }
.sales-stat-card__icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.sales-stat-card__icon--order { background: #fef9e7; color: #f1c40f; }
.sales-stat-card__icon--sales { background: #eaf7e7; color: var(--sales-primary); }
.sales-stat-card__icon--profit { background: #fde8e8; color: #e74c3c; }
.sales-stat-card__value { font-size: 32px; font-weight: 800; margin: 8px 0 12px; }
.sales-stat-card__trend { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.sales-stat-card__trend--up { color: #27ae60; }
.sales-stat-card__trend--down { color: #e74c3c; }

/* ============ TABLE STYLES ============ */
.sales-table { width: 100%; border-collapse: collapse; }
.sales-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--sales-text-light);
    padding: 14px 16px;
    border-bottom: 2px solid var(--sales-border);
}
.sales-table td {
    padding: 16px;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}
.sales-table tr:hover { background: #fafaf5; }

/* ============ STATUS BADGES ============ */
.sales-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.sales-badge--shipping { background: #fef9e7; color: #d4a017; border: 1px solid #f1c40f; }
.sales-badge--pending { background: #f5f5f5; color: #666; border: 1px solid #ccc; }
.sales-badge--completed { background: #eaf7e7; color: var(--sales-primary-dark); border: 1px solid var(--sales-primary); }
.sales-badge--processing { background: #e8f4fd; color: #2980b9; border: 1px solid #3498db; }
.sales-badge--cancelled { background: #fde8e8; color: #c0392b; border: 1px solid #e74c3c; }
.sales-badge--paid { background: #eaf7e7; color: var(--sales-primary-dark); border: 1px solid var(--sales-primary); }
.sales-badge--fail { background: #fde8e8; color: #c0392b; border: 1px solid #e74c3c; }
.sales-badge--refunded { background: #f5f5f5; color: #666; border: 1px solid #aaa; }
.sales-badge--active { background: var(--sales-primary); color: #fff; font-size: 10px; padding: 3px 12px; }
.sales-badge--delivered { background: #eaf7e7; color: var(--sales-primary-dark); border: 1px solid var(--sales-primary); }

/* ============ FILTER BAR ============ */
.sales-filter {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: var(--sales-white);
    border-radius: var(--sales-radius);
    margin-bottom: 20px;
    box-shadow: var(--sales-shadow);
}
.sales-filter__label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.sales-filter__search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 8px 16px;
    flex: 1;
    max-width: 300px;
    margin-left: auto;
}
.sales-filter__search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    font-family: var(--sales-font);
    width: 100%;
}
.sales-filter__select {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--sales-border);
    font-family: var(--sales-font);
    font-size: 13px;
    cursor: pointer;
    background: var(--sales-white);
    min-width: 130px;
}

/* ============ TABS ============ */
.sales-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.sales-tab {
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--sales-text);
    border: 1px solid var(--sales-border);
    transition: all .2s;
}
.sales-tab:hover { background: #f0f5ea; }
.sales-tab--active {
    background: var(--sales-primary-dark);
    color: #fff;
    border-color: var(--sales-primary-dark);
}

/* ============ PAGINATION ============ */
.sales-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    font-size: 13px;
}
.sales-pagination__btn {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid var(--sales-border);
    background: var(--sales-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .2s;
}
.sales-pagination__btn:hover { background: #f0f5ea; }
.sales-pagination__btn--active {
    background: var(--sales-primary);
    color: #fff;
    border-color: var(--sales-primary);
}

/* ============ CHART PLACEHOLDER ============ */
.sales-chart-placeholder {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #f9faf5 0%, #f0f5ea 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sales-text-light);
    font-size: 14px;
    font-weight: 500;
}

/* ============ TOP-SELLING PRODUCT CARD ============ */
.sales-product-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
}
.sales-product-item:last-child { border-bottom: none; }
.sales-product-item__img {
    width: 56px; height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f5f0;
}
.sales-product-item__info { flex: 1; }
.sales-product-item__name { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.sales-product-item__desc { font-size: 11px; color: var(--sales-text-light); }
.sales-product-item__price { font-size: 15px; font-weight: 700; }

/* ============ CUSTOMER LIST ============ */
.sales-customer-list { display: flex; flex-direction: column; gap: 4px; }
.sales-customer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s;
}
.sales-customer-item:hover { background: #f5f5f0; }
.sales-customer-item--active { background: #f0f5ea; }
.sales-customer-item__avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}
.sales-customer-item__info { flex: 1; }
.sales-customer-item__name { font-size: 14px; font-weight: 600; }
.sales-customer-item__id { font-size: 11px; color: var(--sales-primary); }

/* ============ CUSTOMER PROFILE CARD ============ */
.sales-profile-card { text-align: center; padding: 30px; }
.sales-profile-card__avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 8px;
    border: 3px solid var(--sales-primary);
}
.sales-profile-card__id { font-size: 11px; color: var(--sales-text-light); }
.sales-profile-card__name { font-size: 20px; font-weight: 700; margin: 4px 0 16px; }
.sales-profile-detail {
    background: #f0f5ea;
    border-radius: var(--sales-radius);
    padding: 20px 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sales-profile-detail__row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sales-profile-detail__row svg { flex-shrink: 0; }
.sales-profile-detail__label { font-weight: 700; min-width: 80px; }

/* ============ PAYMENT CARDS ============ */
.sales-payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all .2s;
}
.sales-payment-item:hover { border-color: var(--sales-primary); background: #fafaf5; }
.sales-payment-item--active { border-color: var(--sales-primary); background: #f0f5ea; }

.sales-payment-item__id { font-size: 16px; font-weight: 700; }
.sales-payment-item__date { font-size: 12px; color: var(--sales-text-light); margin-top: 4px; }
.sales-payment-item__right { text-align: right; }
.sales-payment-item__amount-label { font-size: 11px; color: var(--sales-text-light); }
.sales-payment-item__amount { font-size: 20px; font-weight: 800; color: var(--sales-primary-dark); }

/* ============ PAYMENT DETAIL PANEL ============ */

.sales-payment-detail__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.sales-payment-detail__title { font-size: 24px; font-weight: 800; }
.sales-payment-detail__section-title {
    background: var(--sales-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 12px;
}
.sales-payment-detail__row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}
.sales-payment-detail__row:last-child { border-bottom: none; }
.sales-payment-detail__label { color: var(--sales-text-light); }

/* ============ VIEW MORE BUTTON ============ */
.sales-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all .2s;
    font-family: var(--sales-font);
}
.sales-btn--primary { background: var(--sales-primary-dark); color: #fff; }
.sales-btn--primary:hover { background: #274a1e; }
.sales-btn--outline { background: transparent; border: 1px solid var(--sales-border); color: var(--sales-text); }
.sales-btn--outline:hover { border-color: var(--sales-primary); color: var(--sales-primary-dark); }

/* ============ SECTION HEADING ============ */
.sales-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.sales-section-header__title { font-size: 20px; font-weight: 800; }
.sales-section-header__filter {
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--sales-border);
    font-size: 13px;
    font-family: var(--sales-font);
    cursor: pointer;
    background: var(--sales-white);
}

/* ============ ACTION LINK ============ */
.sales-action-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--sales-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}
.sales-action-link:hover { color: var(--sales-primary-dark); }

/* ============ REPORT GRID ============ */
.sales-report-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.sales-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* ---------- Products Page ---------- */
.sales-products {
    background: var(--sales-white);
    border-radius: 12px;
    padding: 24px;
}

.sales-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sales-product-card {
    border: 1px solid var(--sales-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.sales-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.sales-product-card__image {
    position: relative;
    height: 180px;
    background: #f8f8f8;
}

.sales-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.sales-product-card__status {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.sales-product-card__status.active { background: #e6f6ec; color: #22c55e; }
.sales-product-card__status.out-of-stock { background: #fee2e2; color: #ef4444; }
.sales-product-card__status.low-stock { background: #fff7ed; color: #f97316; }

.sales-product-card__content {
    padding: 16px;
}

.sales-product-card__id {
    font-size: 11px;
    color: var(--sales-text-light);
    display: block;
    margin-bottom: 4px;
}

.sales-product-card__name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--sales-text);
}

.sales-product-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sales-product-card__price {
    font-size: 16px;
    font-weight: 700;
    color: var(--sales-primary);
}

.sales-product-card__stock {
    font-size: 12px;
    color: var(--sales-text-light);
}

.sales-product-card__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* ---------- Chat Page ---------- */
.sales-chat {
    display: flex;
    height: calc(100vh - var(--sales-header-h) - var(--sales-footer-h));
    background: var(--sales-white);
}

/* ============ CHAT & MESSAGES (Figma-matching) ============ */
.chat-container {
    display: flex;
    height: calc(100vh - 140px);
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius-lg);
    overflow: hidden;
    background: #fff;
}

/* --- Left: Contacts Sidebar --- */
.chat-sidebar {
    width: 340px;
    border-right: 1px solid var(--sales-border);
    display: flex;
    flex-direction: column;
    background: #fff;
}
.chat-sidebar__top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid var(--sales-border);
}
.chat-sidebar__search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f8f5;
    border: 1px solid #e5e5e0;
    border-radius: 10px;
    padding: 10px 14px;
}
.chat-sidebar__search input {
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--sales-font);
    font-size: 13px;
    width: 100%;
    color: #333;
}
.chat-sidebar__search input::placeholder { color: #aaa; }
.chat-sidebar__filter-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e5e0;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.chat-sidebar__new-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: #4a7c3a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.chat-sidebar__list {
    flex: 1;
    overflow-y: auto;
}

/* Contact item */
.chat-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .15s;
}
.chat-contact:hover { background: #f9faf7; }
.chat-contact--active {
    background: #f0f5ea;
    border-left-color: #4a7c3a;
}
.chat-contact__avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.chat-contact__avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}
.chat-contact__body { flex: 1; min-width: 0; }
.chat-contact__top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.chat-contact__name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}
.chat-contact__role {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.chat-contact__time {
    font-size: 11px;
    color: #999;
    margin-left: auto;
    white-space: nowrap;
}
.chat-contact__bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-contact__msg {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.chat-contact__badge {
    background: #4a7c3a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
}

/* --- Right: Chat Main Area --- */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f8f5;
}
.chat-main__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: #fff;
    border-bottom: 1px solid var(--sales-border);
}
.chat-main__user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-main__user-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}
.chat-main__user-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.chat-main__user-status {
    font-size: 12px;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
}
.chat-main__online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}
.chat-main__more-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* Messages stream */
.chat-main__stream {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-main__divider {
    text-align: center;
    margin: 8px 0 16px;
}
.chat-main__divider span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8e8e3;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #777;
    font-weight: 500;
}

/* Message bubbles */
.chat-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 6px;
}
.chat-msg--received {
    align-self: flex-start;
    max-width: 65%;
}
.chat-msg--sent {
    align-self: flex-end;
    flex-direction: row-reverse;
    max-width: 65%;
}
.chat-msg__avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #ddd;
}
.chat-msg__wrapper {
    display: flex;
    flex-direction: column;
}
.chat-msg__time-top {
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}
.chat-msg--sent .chat-msg__time-top {
    display: none;
}
.chat-msg__bubble {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.chat-msg--received .chat-msg__bubble {
    background: #e8e8e3;
    color: #333;
    border-bottom-left-radius: 4px;
}
.chat-msg--sent .chat-msg__bubble {
    background: #c5e8f7;
    color: #333;
    border-bottom-right-radius: 4px;
}
.chat-msg__meta {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: 4px;
    align-self: flex-end;
}
.chat-msg--sent .chat-msg__meta {
    flex-direction: row-reverse;
    gap: 2px;
}
.chat-msg__time-sent {
    font-size: 11px;
    color: #999;
    margin-right: 4px;
}

/* Input bar */
.chat-main__input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: #fff;
    border-top: 1px solid var(--sales-border);
}
.chat-main__emoji-btn,
.chat-main__attach-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-main__input-field {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--sales-font);
    font-size: 14px;
    color: #333;
    background: transparent;
}
.chat-main__input-field::placeholder { color: #aaa; }
.chat-main__send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #4a7c3a;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: var(--sales-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.chat-main__send-btn:hover { background: #3d6a2f; }



/* ============ ACCOUNT SETTINGS ============ */
.account-banner {
    height: 180px;
    background: linear-gradient(135deg, #5a7d3a 0%, #3d5c28 100%);
    border-radius: var(--sales-radius-lg) var(--sales-radius-lg) 0 0;
    margin: -28px -32px 0 -32px;
}
.account-profile-header {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-top: -60px;
    margin-bottom: 32px;
    padding: 0 16px;
}
.account-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    background: #ddd;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.account-profile-name { font-size: 24px; font-weight: 700; margin-bottom: 2px; }
.account-profile-role { font-size: 14px; color: #888; }
.account-profile-join { font-size: 13px; color: #aaa; }

.account-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.account-field label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}
.account-field-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1.5px solid #c5d6b8;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}
.account-field-value svg { cursor: pointer; opacity: .6; transition: opacity .2s; flex-shrink: 0; }
.account-field-value svg:hover { opacity: 1; }

/* ============ NOTIFICATIONS ============ */
.noti-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--sales-radius);
    margin-bottom: 10px;
    background: var(--sales-white);
    border: 1px solid var(--sales-border);
    transition: background .2s;
}
.noti-item--unread {
    background: #f0f5ea;
    border-color: #d4e5c3;
}
.noti-item__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e8f2de;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.noti-item__content { flex: 1; }
.noti-item__text { font-size: 15px; font-weight: 500; margin-bottom: 4px; }
.noti-item__time { font-size: 12px; color: #999; }
.noti-item__right { display: flex; align-items: center; gap: 12px; }
.noti-item__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9BC864;
}
.noti-item__menu {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

/* ============ HEADER DROPDOWN ============ */
.sales-header__user-wrapper {
    position: relative;
}
.sales-header__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 200px;
    z-index: 999;
    padding: 8px 0;
    border: 1px solid #eee;
}
.sales-header__user-wrapper:hover .sales-header__dropdown,
.sales-header__user-wrapper.open .sales-header__dropdown {
    display: block;
}
.sales-header__dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--sales-text);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s;
}
.sales-header__dropdown-item:hover { background: #f5f5f0; }
.sales-header__dropdown-item svg { width: 18px; height: 18px; }

/* Notification Bell Dropdown */
.sales-header__notif-wrapper { position: relative; }
.sales-header__notif-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: -80px;
    margin-top: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    min-width: 320px;
    z-index: 999;
    padding: 16px;
    border: 1px solid #eee;
}
.sales-header__notif-wrapper:hover .sales-header__notif-dropdown,
.sales-header__notif-wrapper.open .sales-header__notif-dropdown {
    display: block;
}
.sales-header__notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.sales-header__notif-dropdown-header strong { font-size: 16px; }
.sales-header__notif-dropdown-header a { font-size: 13px; color: #4a7c3a; text-decoration: none; }
.sales-header__notif-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}
.sales-header__notif-mini-item:last-child { border-bottom: none; }
.sales-header__notif-mini-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e8f2de;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============ PRODUCT LIST TABLE (Tab 1) ============ */
.sales-products-tabs {
    display: flex;
    border-bottom: 2px solid var(--sales-border);
    margin-bottom: 24px;
}
.sales-products-tab {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all .2s;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--sales-font);
}
.sales-products-tab:hover { color: #333; }
.sales-products-tab--active {
    color: #4a7c3a;
    border-bottom-color: #4a7c3a;
}

.products-tab-panel { display: none; }
.products-tab-panel.active { display: block; }

/* Bundle card grid */
.bundle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.bundle-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--sales-border);
    transition: box-shadow .2s;
}
.bundle-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.bundle-card__image {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.bundle-card__image img { width: 100%; height: 100%; object-fit: cover; }
.bundle-card__category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #4a7c3a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.bundle-card__discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #4a7c3a;
}
.bundle-card__body { padding: 16px; }
.bundle-card__name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.bundle-card__price { font-size: 16px; font-weight: 700; color: #333; float: right; margin-top: -20px; }
.bundle-card__rating { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #888; margin-bottom: 12px; }
.bundle-card__rating .stars { color: #f1c40f; }
.bundle-card__view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #9BC864;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

/* Promotion cards */
.promo-card {
    background: #fff;
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius);
    padding: 24px 28px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.promo-card__title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.promo-card__details { display: flex; gap: 40px; margin-top: 12px; }
.promo-card__detail-label { font-size: 12px; color: #888; margin-bottom: 4px; }
.promo-card__detail-value { font-size: 14px; font-weight: 600; }
.promo-card__link { color: #4a7c3a; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }

/* ============ ORDER DETAILS VIEW ============ */
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}
.order-detail-header__left { display: flex; align-items: center; gap: 16px; }
.order-detail-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--sales-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}
.order-detail-title { font-size: 24px; font-weight: 800; }
.order-detail-date { font-size: 13px; color: #888; }
.order-detail-header__right { display: flex; align-items: center; gap: 12px; }
.order-detail-status-select {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--sales-border);
    font-family: var(--sales-font);
    font-size: 14px;
    cursor: pointer;
}
.order-detail-update-btn {
    padding: 10px 24px;
    border-radius: 10px;
    background: #333;
    color: #fff;
    border: none;
    font-family: var(--sales-font);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.order-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.order-item-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}
.order-item-row img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f5f5f0; }
.order-item-name { font-size: 15px; font-weight: 600; }
.order-item-cat { font-size: 11px; color: #888; }
.order-item-qty { font-size: 13px; color: #888; }
.order-item-price { margin-left: auto; font-size: 16px; font-weight: 700; }

.order-summary-table { width: 100%; }
.order-summary-table td { padding: 10px 0; font-size: 14px; }
.order-summary-table .label { color: #888; }
.order-summary-table .total-row td { font-size: 20px; font-weight: 800; border-top: 2px solid var(--sales-border); }

.order-info-card {
    background: #fff;
    border: 1px solid var(--sales-border);
    border-radius: var(--sales-radius);
    padding: 18px 20px;
    margin-bottom: 12px;
}
.order-info-card__title { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }

/* ============ REFUND & CANCELLATION ============ */
.refund-card {
    background: var(--sales-white);
    border-radius: var(--sales-radius-lg);
    padding: 28px;
    box-shadow: var(--sales-shadow);
    margin-bottom: 24px;
}
.refund-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.refund-card__title { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.refund-card__actions { display: flex; gap: 10px; }
.refund-card__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #333;
    background: #fff;
    color: #333;
    font-family: var(--sales-font);
    transition: all .2s;
}
.refund-card__btn--approve { border-color: #4a7c3a; color: #4a7c3a; }
.refund-card__btn--approve:hover { background: #4a7c3a; color: #fff; }
.refund-card__btn--reject { border-color: #c0392b; color: #c0392b; }
.refund-card__btn--reject:hover { background: #c0392b; color: #fff; }
.refund-card__id { font-size: 16px; font-weight: 700; }
.refund-card__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.refund-card__field-label { font-size: 12px; color: #888; margin-bottom: 4px; }
.refund-card__field-value { font-size: 15px; font-weight: 600; }

