/* *****************************************************
    HopeIDC Custom Optimizations
***************************************************** */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Better image rendering */
img {
    max-width: 100%;
    height: auto;
}

/* Top navbar logo size (front-end pages) */
.navbar-brand img {
    height: 40px;
    width: auto;
}

/* Account dropdown menu */
.nav-item.account .dropdown-menu {
    min-width: 200px;
    right: 0;
    left: auto;
}
.nav-item.account .dropdown-item {
    padding: 8px 18px;
    font-size: 14px;
    white-space: nowrap;
}
.nav-item.account .dropdown-item i {
    width: 18px;
    text-align: center;
}

/* Card hover effects */
.card {
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Smoother button transitions */
.btn {
    transition: all 0.25s ease;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 164, 255, 0.35);
}

/* Table row hover */
.table tbody tr {
    transition: background-color 0.15s ease;
}

/* Badge status improvements */
.badge.status {
    font-weight: 500;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
}

/* Responsive table on small screens */
@media (max-width: 767px) {
    .table-responsive {
        border: 0;
    }
    .clientareahome .col-sm-8,
    .clientareahome .col-xl-4 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Loading skeleton animation */
@keyframes skeleton-loading {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* Print styles */
@media print {
    .main-sidebar,
    .sidebar-backdrop,
    .top-main,
    header,
    footer,
    .navbar {
        display: none !important;
    }
    .main-body {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* =============================================
   CTG-Style Dashboard Layout
   main-wrapper > main-sidebar + main-body
============================================= */

.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.main-sidebar {
    width: 240px;
    min-width: 240px;
    background: #1e2a3a;
    color: #c2c7d0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: left 0.25s ease;
}
.main-sidebar::-webkit-scrollbar {
    display: none;
}

/* Sidebar logo */
.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo-img {
    height: 36px;
    width: auto;
}

/* Sidebar close button (mobile) */
.main-sidebar .sidebar-close-btn {
    position: absolute;
    top: 16px;
    right: 12px;
    background: none;
    border: none;
    color: #8899a6;
    font-size: 22px;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}
.main-sidebar .sidebar-close-btn:hover {
    color: #fff;
}

/* Sidebar list */
.sidebar-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar-list::-webkit-scrollbar {
    display: none;
}
.sidebar-list li {
    list-style: none;
}
.sidebar-list li::marker {
    content: none;
}

/* Title items (section headers) */
.sidebar-list .nav-item.title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7a8d;
    padding: 18px 20px 8px;
}

/* Nav links */
.sidebar-list .nav-item > .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #b0bec5;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.sidebar-list .nav-item > .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}
.sidebar-list .nav-item.active > .nav-link {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-left-color: #1a73e8;
}
.sidebar-list .nav-item > .nav-link i {
    font-size: 15px;
    width: 20px;
    text-align: center;
}
.sidebar-list .nav-title {
    display: flex;
    align-items: center;
}

/* Sidebar dropdown */
.sidebar-list .nav-item.dropdown .dropdown-menu {
    position: static !important;
    float: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    display: none;
}
.sidebar-list .nav-item.dropdown.show .dropdown-menu {
    display: block;
}
.sidebar-list .dropdown-item {
    padding: 0;
    background: rgba(0,0,0,0.15);
}
.sidebar-list .dropdown-link {
    display: block;
    padding: 8px 20px 8px 52px;
    color: #8899a6;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}
.sidebar-list .dropdown-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.04);
}

/* Sidebar dropdown group title */
.sidebar-list .sidebar-dropdown-title {
    font-size: 11px;
    font-weight: 600;
    color: #6b7a8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 20px 4px 52px;
    pointer-events: none;
}

/* Dropdown toggle arrow */
.sidebar-list .nav-link.dropdown-toggle::after {
    margin-left: auto;
    font-family: "font awesome 5 pro";
    font-weight: 900;
    content: "\f054";
    border: 0;
    font-size: 12px;
    line-height: 1;
    color: #b7c0cd;
    transition: transform 0.2s ease;
}
.sidebar-list .nav-item.dropdown.show .nav-link.dropdown-toggle::after {
    transform: rotate(90deg);
}

/* ---------- Main Body ---------- */
.main-body {
    flex: 1;
    margin-left: 240px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #f5f6fa;
}

/* ---------- Top Main Bar ---------- */
.top-main {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    min-height: 56px;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.top-main .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    float: none;
}
.top-main .navbar-nav {
    display: flex;
    flex-direction: row;
    list-style: none;
    padding: 0;
    margin: 0;
}
.top-main .nav-link {
    padding: 6px 10px;
}
.top-main .dropdown {
    position: relative;
}
.top-main .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    float: none;
}
.top-main .dropdown.open > .dropdown-menu {
    display: block;
}
.dropdown.open .dropdown-menu {
    display: block;
}
.top-main .navbar-toggler {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
}
.top-main .nav-link i.fas {
    font-size: 16px;
    vertical-align: middle;
}

/* ---------- Notification Dropdown ---------- */
.topbar-noti { position: relative; }
.topbar-noti .noti-badge {
    position: absolute;
    top: 2px;
    right: 0;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    border-radius: 8px;
}
.topbar-noti .noti-dropdown {
    width: 300px;
    padding: 0;
    border: 1px solid #e5e8ec;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}
.noti-dropdown-header {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
}
.noti-dropdown-body {
    max-height: 260px;
    overflow-y: auto;
}
.noti-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    color: #444;
    text-decoration: none;
    border-bottom: 1px solid #f5f6f8;
    transition: background 0.15s;
}
.noti-item:hover { background: #f8f9fb; color: #333; text-decoration: none; }
.noti-item:last-child { border-bottom: none; }
.noti-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
    color: #fff;
    margin-top: 2px;
}
.noti-item-icon.noti-danger { background: #e74c3c; }
.noti-item-icon.noti-warning { background: #f39c12; }
.noti-item-icon.noti-info { background: #2193ec; }
.noti-item-icon.noti-success { background: #27ae60; }
.noti-item-text {
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}
.noti-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 16px;
    color: #aaa;
    font-size: 13px;
}
.noti-empty i { font-size: 24px; }

/* ---------- Primary Content ---------- */
.primary-content {
    flex: 1;
    padding: 20px 24px;
}
/* Override statics/style.css margins for new layout */
.main-wrapper .content-page {
    margin-left: 0 !important;
}
.main-wrapper .content {
    margin-top: 0 !important;
}
.is-dashboard .left.side-menu {
    display: none !important;
}

/* ---------- Sidebar Backdrop ---------- */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1040;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 767px) {
    .main-sidebar {
        left: -240px;
    }
    .main-body {
        margin-left: 0;
    }
    .top-main {
        padding: 8px 12px;
    }
    .primary-content {
        padding: 12px;
    }
    .top-main .breadcrumb {
        display: none;
    }
    body.sidebar-open .main-sidebar {
        left: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    }
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
}

/* Desktop: always show sidebar */
@media (min-width: 768px) {
    .main-sidebar {
        left: 0;
    }
    .main-sidebar .sidebar-close-btn {
        display: none;
    }
}

/* =============================================
   Dashboard Header Card
============================================= */
.card-dashboard-header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border: none;
    border-radius: 8px;
    overflow: hidden;
    color: #fff;
}

/* 上半部：头像 + 用户信息 */
.card-dashboard-header .card-user {
    display: flex;
    align-items: center;
    padding: 20px 25px 15px;
}
.card-dashboard-header .avatar-lg {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}
.card-dashboard-header .avatar-lg img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}
.card-dashboard-header .card-info {
    margin-left: 15px;
    min-width: 0;
}
.card-dashboard-header .card-info h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 2px;
}
.card-dashboard-header .card-info h3 small {
    font-size: 12px;
    opacity: 0.8;
}

/* 下半部：统计项 */
.card-dashboard-header .card-stats {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.12);
}
.card-dashboard-header .card-stat-item {
    flex: 1;
    text-align: center;
    padding: 14px 10px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-left: 1px solid rgba(255,255,255,0.12);
}
.card-dashboard-header .card-stat-item:first-child {
    border-left: none;
}
.card-dashboard-header .card-stat-item:hover {
    background: rgba(255,255,255,0.08);
}
.card-dashboard-header .card-stat-item small {
    font-size: 12px;
    opacity: 0.85;
}
.card-dashboard-header .card-stat-item h3 {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 4px 0 0;
    white-space: nowrap;
}
.btn-addfunds {
    padding: 2px 14px;
    display: inline-block;
    font-size: 12px;
    border: 1px solid #fff;
    border-radius: 4px;
    color: #fff;
    background: rgba(255,255,255,0.2);
    text-decoration: none;
    margin-left: 8px;
    vertical-align: middle;
}
.btn-addfunds:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
    text-decoration: none;
}

/* 移动端 */
@media (max-width: 575px) {
    .card-dashboard-header .card-user {
        padding: 15px;
    }
    .card-dashboard-header .avatar-lg,
    .card-dashboard-header .avatar-lg img {
        width: 44px;
        height: 44px;
    }
    .card-dashboard-header .card-info h3 {
        font-size: 15px;
    }
    .card-dashboard-header .card-stats {
        flex-wrap: wrap;
    }
    .card-dashboard-header .card-stat-item {
        flex: 0 0 50%;
        padding: 12px 8px;
        border-left: none;
    }
    .card-dashboard-header .card-stat-item:nth-child(even) {
        border-left: 1px solid rgba(255,255,255,0.12);
    }
    .card-dashboard-header .card-stat-item:nth-child(n+3) {
        border-top: 1px solid rgba(255,255,255,0.12);
    }
    .card-dashboard-header .card-stat-item h3 {
        font-size: 17px;
    }
    .btn-addfunds {
        display: block;
        margin: 6px 0 0;
        text-align: center;
    }
}

/* =============================================
   Store Page
============================================= */
.store-section {
    margin-bottom: 28px;
}
.store-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

/* Tab pills */
.store-tabs {
    margin-bottom: 16px;
    gap: 8px;
}
.store-tabs .nav-link {
    border-radius: 6px;
    padding: 8px 20px;
    font-size: 14px;
    color: #555;
    background: #f0f2f5;
    border: none;
}
.store-tabs .nav-link.active {
    background: #1a73e8;
    color: #fff;
}

/* Product group cards */
.store-groups {
    margin: 0 -6px;
}
.store-groups .col-md-4,
.store-groups .col-6 {
    padding: 6px;
}
.store-group-card {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e5e8ec;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
}
.store-group-card:hover {
    border-color: #1a73e8;
    color: #1a73e8;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(26,115,232,0.1);
}
.store-group-card.active {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1a73e8;
}
.store-group-name {
    font-size: 14px;
    font-weight: 500;
}

/* Store badge labels */
.badge-hot {
    background: #ff4d4f;
    color: #fff;
}
.badge-new {
    background: #52c41a;
    color: #fff;
}
.badge-sale {
    background: #fa8c16;
    color: #fff;
}
.badge-recommend {
    background: #1a73e8;
    color: #fff;
}

/* Product table */
.store-product-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e8ec;
}
.store-product-table thead th {
    background: #f8f9fa;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e8ec;
    white-space: nowrap;
}
.store-product-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}
.store-product-table tbody tr:last-child td {
    border-bottom: none;
}
.store-product-table tbody tr:hover {
    background: #f8f9fb;
}
.store-price {
    font-weight: 600;
    color: #1a73e8;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .store-product-table {
        display: block;
        overflow-x: auto;
    }
}

/* =============================================
   Dashboard Home Cards
============================================= */
.dash-card {
    border: 1px solid #e5e8ec;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}
.dash-card .card-header {
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.dash-card .card-body {
    padding: 0;
}
.clientareahome .card .card-header {
    position: relative;
}
.clientareahome .card .card-header:after {
    content: '';
    background-color: #1b69ff;
    width: 15%;
    height: 2px;
    position: absolute;
    bottom: 0;
    left: 0;
}
.clientareahome .card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    word-wrap: break-word;
    border-radius: .25rem;
    background-color: #fff;
    min-height: 276px;
}

/* List inside card - no scroll, pagination handles overflow */
.dash-list-scroll {
    overflow: visible;
}

/* Card row item */
.card-row {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f2f5;
    color: #333;
    text-decoration: none;
    transition: background 0.15s ease;
}
.card-row:last-child {
    border-bottom: none;
}
.card-row:hover {
    background: #f8f9fb;
    color: #333;
    text-decoration: none;
}
.ticket-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.card-row .cell-title {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-row .cell-date {
    font-size: 12px;
    color: #999;
}
.card-row .cell-status {
    margin-left: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.card-row .cell-total .price {
    font-weight: 600;
    font-size: 14px;
}

/* ---------- Product Wrap (cloud/server cards) ---------- */
.product-wrap {
    display: flex;
    flex-wrap: wrap;
    padding: 10px 12px;
}
.product-wrap-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(50% - 12px);
    margin: 6px;
    padding: 12px 16px;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.product-wrap-item:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 8px rgba(26,115,232,0.08);
}
.product-wrap-item-title {
    display: flex;
    align-items: center;
    font-size: 14px;
    gap: 8px;
}
.product-wrap-item-title .region-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 20px;
    background: #f0f2f5;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    flex-shrink: 0;
}
.product-wrap-item-num {
    font-size: 18px;
    font-weight: 700;
    color: #1a73e8;
    min-width: 28px;
    text-align: right;
}

@media (max-width: 575px) {
    .product-wrap-item {
        width: 100%;
        margin: 4px 0;
    }
}

/* ---------- Empty Product State ---------- */
.dash-empty .dash-empty-icon {
    font-size: 48px;
    color: #c2c7d0;
}
.dash-empty h5 {
    color: #333;
    font-weight: 600;
}

/* ---------- Ticket Status Filter ---------- */
.ticket-status-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 6px;
}
.ticket-status-list li {
    padding: 4px 12px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}
.ticket-status-list li:hover {
    background: #eef1f6;
}
.ticket-status-list li.active {
    background: #d6e4ff;
    color: #1a73e8;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Shared Table Styles ---------- */
.btn-default {
    color: #333; background-color: #fff; border: 1px solid #dce1e6;
    padding: 6px 14px; font-size: 13px; border-radius: 4px; cursor: pointer;
    transition: all 0.15s ease;
}
.btn-default:hover { background-color: #f5f7fa; border-color: #c4cad0; color: #333; text-decoration: none; }
.btn-default:focus { box-shadow: 0 0 0 2px rgba(33,147,236,0.15); }
.btn-default.dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }

.table-container { overflow: visible; }
.table-header, .table-footer {
    padding: 15px 0; display: flex; align-items: center;
    justify-content: space-between; overflow: visible;
}
.table-header .btn { box-shadow: none; background-image: none; min-width: unset !important; }
.table-header .btn-group .btn {
    color: #555; background-color: #fff; border: 1px solid #dce1e6;
    padding: 6px 14px; font-size: 13px;
}
.table-header .btn-group .btn:hover { background-color: #f5f7fa; }
.table-header .btn-group .btn.active {
    color: #2193ec; font-weight: 500;
    background-color: #f8fcfd; border-color: #2193ec;
}
.table-search-box {
    display: flex; align-items: center; width: 300px;
    margin-left: 10px; position: relative;
}
.table-search-box .form-control { max-height: 36px; padding-top: .5rem; padding-bottom: .5rem; }

.table-list > tbody > tr:hover { background-color: #f8f9fa; }
.table-list thead th {
    font-weight: 600; font-size: 13px; color: #555;
    border-bottom: 2px solid #dee2e6;
}

.dataTables_wrapper { position: relative; }
.dataTables_wrapper::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.8); backdrop-filter: blur(5px);
    z-index: 10; display: none; transition: all 0.3s ease;
}
.dataTables_wrapper.loading::before { display: block; }
.dataTables_wrapper.loading::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 40px; height: 40px; margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3; border-top: 3px solid #2193ec;
    border-radius: 50%; z-index: 11; animation: tbl-spin 1s linear infinite;
}
@keyframes tbl-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.table-paginate { display: flex; align-items: center; }
.table-paginate .dropdown { margin-right: 10px; }
.table-paginate .dropdown .btn { padding: 5px 20px 5px 10px; background-image: none; height: 31px; }
.table-paginate .dropdown .btn:after {
    position: absolute; top: 6px; right: 7px;
    font-family: "Font Awesome 5 Pro"; font-weight: 900;
    content: "\f107"; color: #2092eb; border: 0 none;
}
.table-paginate .dropdown .c-dropdown__menu { width: 60px; min-width: 60px; }
.table-paginate .pagination { margin: 0; display: flex; align-items: center; }
.table-paginate .pagination .paginate_button a {
    padding: 6px 12px; border: 1px solid #dee2e6;
    color: #007bff; background-color: #fff; cursor: pointer;
}
.table-paginate .pagination .paginate_button.active a {
    background-color: #007bff; border-color: #007bff; color: #fff; cursor: default;
}
.table-paginate .pagination .paginate_button.disabled a {
    color: #6c757d; pointer-events: none; background-color: #fff; border-color: #dee2e6;
}

.table:has(.no-data-row) { border: none !important; }
.table-container:has(.no-data-row) .table-footer { display: none; }
.table td:has(.no-data-row) { background: transparent !important; padding: 0 !important; }

@media (max-width: 576px) {
    .table-header, .table-footer { display: block; }
    .table-header .btn-group { display: flex; flex-wrap: wrap; }
    .table-header .btn-group .btn { flex: 1; }
    .table-search-box { width: 100%; margin-left: 0; margin-top: 10px; }
}

/* ===== Markdown editor footer ===== */
.md-footer {
    background-color: #f6f7f8;
    color: #999;
    font-size: 12px;
    text-align: right;
    padding: 4px 10px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
    border: 1px solid #ddd;
    border-top: none;
}
.md-fullscreen-controls,
.md-controls {
    display: none !important;
}

/* ===== Responsive table (rwd-table) - ticket related service ===== */
.rwd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.rwd-table th {
    background-color: #f6f7f8;
    font-weight: 600;
    color: #555;
    padding: 10px 12px;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}
.rwd-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.rwd-table tr:hover td {
    background-color: #f9fafb;
}
@media (max-width: 768px) {
    .rwd-table tr { display: block; margin-bottom: 10px; border: 1px solid #eee; border-radius: 4px; }
    .rwd-table th { display: none; }
    .rwd-table td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 8px 12px; border-bottom: 1px solid #f0f0f0;
    }
    .rwd-table td::before {
        content: attr(data-th);
        font-weight: 600; color: #555; margin-right: 10px; white-space: nowrap;
    }
}