/* Modern admin theme overrides */
:root {
    --rp-bg: #f6f8fb;
    --rp-surface: #ffffff;
    --rp-surface-muted: #f9fbfd;
    --rp-border: #e3e8ef;
    --rp-border-strong: #d5dde8;
    --rp-text: #172033;
    --rp-muted: #6b7484;
    --rp-primary: #009688;
    --rp-primary-dark: #115e59;
    --rp-primary-soft: #e6f5f2;
    --rp-accent: #f59e0b;
    --rp-danger: #dc2626;
    --rp-success: #16a34a;
    --rp-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --rp-shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
    --rp-radius: 8px;
}

html,
body {
    background: var(--rp-bg);
    color: var(--rp-text);
    font-family: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

body {
    letter-spacing: 0;
}

a {
    color: var(--rp-primary);
}

a:hover,
a:focus {
    color: var(--rp-primary-dark);
    text-decoration: none;
}

.container {
    max-width: 1280px;
}

.slim-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--rp-border);
    box-shadow: var(--rp-shadow-sm);
    min-height: 68px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.slim-header .container {
    min-height: 68px;
}

.slim-logo {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.slim-logo a {
    color: var(--rp-text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.slim-logo img {
    height: 34px;
}

.slim-logo a::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: var(--rp-radius);
    background: linear-gradient(135deg, var(--rp-primary), #14b8a6);
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.22);
}

.slim-header-right {
    gap: 10px;
}

.header-notification,
.logged-user {
    border: 1px solid var(--rp-border);
    background: var(--rp-surface);
    box-shadow: var(--rp-shadow-sm);
}

.header-notification {
    width: 38px;
    height: 38px;
    border-radius: var(--rp-radius);
    color: var(--rp-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-notification:hover,
.header-notification:focus {
    background: var(--rp-primary-soft);
    border-color: rgba(15, 118, 110, 0.25);
    color: var(--rp-primary);
}

.logged-user {
    min-height: 42px;
    padding: 5px 10px 5px 6px;
    border-radius: var(--rp-radius);
    color: var(--rp-text);
}

.logged-user img,
.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.logged-user span {
    color: var(--rp-text);
    font-weight: 700;
}

.slim-navbar {
    background: var(--rp-surface);
    border-bottom: 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.slim-navbar .nav {
    align-items: center;
    gap: 8px;
}

.slim-navbar .nav-item {
    border: 0;
}

.slim-navbar .nav-link {
    min-height: 40px;
    padding: 10px 13px;
    border-radius: var(--rp-radius);
    color: var(--rp-primary);
    font-weight: 700;
    letter-spacing: 0;
    transition: background 0.18s ease, color 0.18s ease;
}

.slim-navbar .nav-link .icon,
.slim-navbar .nav-link i {
    color: var(--rp-primary);
}

.slim-navbar .nav-item.active > .nav-link,
.slim-navbar .nav-link:hover,
.slim-navbar .nav-link:focus {
    background: var(--rp-primary);
    color: #ffffff;
}

.slim-navbar .nav-item.active > .nav-link .icon,
.slim-navbar .nav-link:hover .icon,
.slim-navbar .nav-link:hover i {
    color: #ffffff;
}

.slim-navbar .sub-item {
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    box-shadow: var(--rp-shadow);
    overflow: hidden;
}

.slim-navbar .sub-item .section-label,
.section-label {
    color: var(--rp-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.slim-navbar .sub-item a {
    color: var(--rp-text);
    border-radius: 6px;
}

.slim-navbar .sub-item a:hover {
    color: var(--rp-primary);
    background: var(--rp-primary-soft);
}

.slim-mainpanel {
    background: var(--rp-bg);
}

.slim-pageheader {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rp-border);
}

.slim-pagetitle,
.slim-card-title,
.section-title {
    color: var(--rp-text);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.slim-pagetitle {
    font-size: 20px;
}

.breadcrumb,
.slim-breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item,
.breadcrumb-item a {
    color: var(--rp-muted);
}

.card,
.section-wrapper,
.card-table {
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
    color: var(--rp-text);
    box-shadow: var(--rp-shadow-sm);
}

.card {
    width: auto;
    height: auto;
    min-height: 0;
    overflow: hidden;
}

.card-header {
    background: var(--rp-surface);
    border-bottom: 1px solid var(--rp-border);
    padding: 16px 18px;
}

.card-body {
    padding: 18px;
}

.section-wrapper {
    padding: 20px;
}

.card-dash-one {
    border: 0;
    box-shadow: var(--rp-shadow);
}

.card-dash-one .row > div {
    padding: 24px;
    border-right: 1px solid var(--rp-border);
}

.card-dash-one .row > div:last-child {
    border-right: 0;
}

.card-dash-one i {
    width: 48px;
    height: 48px;
    border-radius: var(--rp-radius);
    background: var(--rp-primary-soft);
    color: var(--rp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.card-dash-one .dash-content label {
    color: var(--rp-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.card-dash-one .dash-content h2 {
    color: var(--rp-text);
    font-weight: 800;
}

.table-responsive {
    border-radius: var(--rp-radius);
}

.table,
table.dataTable {
    color: var(--rp-text);
    background: var(--rp-surface);
}

.table th,
.table td,
table.dataTable tbody th,
table.dataTable tbody td {
    border-color: var(--rp-border);
    vertical-align: middle;
}

.table thead th,
table.dataTable thead th,
table.dataTable thead td {
    background: var(--rp-surface-muted);
    border-bottom: 1px solid var(--rp-border-strong);
    color: var(--rp-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.table-striped tbody tr:nth-of-type(odd),
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background: #fbfcfe;
}

.table-hover tbody tr:hover,
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background: var(--rp-primary-soft) !important;
}

.dataTables_wrapper .dataTables_length {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-bottom: 10px;
    padding-bottom: 0;
}

.dataTables_wrapper .dataTables_filter {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-bottom: 10px;
    padding: 0;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

.dataTables_wrapper .dataTables_length select {
    min-width: 72px;
    height: 40px;
    padding: 5px 30px 5px 12px;
    border: 1px solid var(--rp-border-strong);
    border-radius: var(--rp-radius);
    background-color: var(--rp-surface);
    color: var(--rp-text);
    font-weight: 800;
}

.dataTables_wrapper .dataTables_length .select2-container {
    width: 76px !important;
    margin: 0;
}

.dataTables_wrapper .dataTables_length .select2-container--default .select2-selection--single {
    min-height: 40px;
    height: 40px;
    border-color: var(--rp-border-strong);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
}

.dataTables_wrapper .dataTables_length .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 12px;
    padding-right: 28px;
    color: var(--rp-text);
    font-size: 13px;
    font-weight: 800;
    line-height: 38px;
}

.dataTables_wrapper .dataTables_length .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
    right: 5px;
}

.form-control,
.dataTables_filter input,
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 40px;
    border: 1px solid var(--rp-border-strong);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
    color: var(--rp-text);
    box-shadow: none;
}

.form-control:focus,
.dataTables_filter input:focus,
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--rp-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.input-group-text {
    border-color: var(--rp-border-strong);
    background: var(--rp-surface-muted);
    color: var(--rp-muted);
}

.btn,
.fc-button {
    border-radius: var(--rp-radius) !important;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover,
.fc-button:hover {
    transform: translateY(-1px);
}

.btn-primary,
.fc-state-active,
.fc-button.fc-state-active {
    background: var(--rp-primary) !important;
    border-color: var(--rp-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--rp-primary-dark) !important;
    border-color: var(--rp-primary-dark) !important;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.20);
}

.btn-secondary,
.fc-state-default {
    background: var(--rp-surface);
    border-color: var(--rp-border-strong);
    color: var(--rp-text);
}

.dropdown-menu {
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    box-shadow: var(--rp-shadow);
    padding: 8px;
}

.dropdown-menu .nav-link,
.dropdown-menu a {
    border-radius: 6px;
    color: var(--rp-text);
}

.dropdown-menu .nav-link:hover,
.dropdown-menu a:hover {
    background: var(--rp-primary-soft);
    color: var(--rp-primary);
}

.modal-content {
    border: 0;
    border-radius: var(--rp-radius);
    box-shadow: var(--rp-shadow);
}

.modal-header,
.modal-footer {
    border-color: var(--rp-border);
}

.alert {
    border: 0;
    border-radius: var(--rp-radius);
    box-shadow: var(--rp-shadow-sm);
}

.badge,
.label {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0;
}

.slim-footer {
    background: var(--rp-surface);
    border-top: 1px solid var(--rp-border);
    color: var(--rp-muted);
}

.float {
    box-shadow: 0 16px 32px rgba(37, 211, 102, 0.28);
}

.tx-primary,
.font-awesome-icon-primary {
    color: var(--rp-primary) !important;
}

.tx-success {
    color: var(--rp-success) !important;
}

.tx-danger {
    color: var(--rp-danger) !important;
}

.switch .slider {
    background-color: #cbd5e1;
}

input:checked + .slider {
    background-color: var(--rp-primary);
}

.box,
.panel,
.nav-tabs-custom {
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
    box-shadow: var(--rp-shadow-sm);
}

.box-header,
.panel-heading,
.nav-tabs-custom > .nav-tabs {
    border-color: var(--rp-border);
    background: var(--rp-surface);
}

.nav-tabs {
    border-color: var(--rp-border);
}

.nav-tabs .nav-link,
.nav-tabs > li > a {
    border-radius: var(--rp-radius) var(--rp-radius) 0 0;
    color: var(--rp-muted);
    font-weight: 800;
}

.nav-tabs .nav-link.active,
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:focus,
.nav-tabs > li.active > a:hover {
    color: var(--rp-primary);
    border-color: var(--rp-border) var(--rp-border) var(--rp-surface);
    background: var(--rp-surface);
}

.signin-left {
    background: var(--rp-primary);
}

.signin-left .signin-box {
    color: rgba(255, 255, 255, 0.84);
}

.signin-left .slim-logo a {
    color: #ffffff;
}

.signin-right {
    background: var(--rp-bg);
}

.signin-right .signin-box {
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
    box-shadow: var(--rp-shadow);
    padding: 34px;
}

.signin-title-primary {
    color: var(--rp-text);
    font-weight: 800;
    letter-spacing: 0;
}

.signin-title-secondary {
    color: var(--rp-muted);
    letter-spacing: 0;
}

.modern-dashboard-header {
    margin-bottom: 16px;
}

.dashboard-title-row,
.dashboard-toolbar,
.dashboard-meta,
.dashboard-list-row {
    display: flex;
    align-items: center;
}

.dashboard-title-row {
    justify-content: space-between;
    gap: 16px;
}

.dashboard-subtitle {
    margin: 6px 0 0;
    color: var(--rp-muted);
}

.dashboard-toolbar {
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
    box-shadow: var(--rp-shadow-sm);
}

.dashboard-duration,
.dashboard-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-duration .btn {
    margin: 0 !important;
}

.dashboard-filters {
    justify-content: flex-end;
}

.dashboard-filters .form-control {
    width: auto;
    min-width: 148px;
}

.dashboard-filters #dashboard_outlet {
    min-width: 220px;
}

.dashboard-loading {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
    color: var(--rp-muted);
}

.dashboard-loading img {
    width: 26px;
    height: 26px;
}

/* ---- Dashboard skeleton (shadow) loading ---- */
@keyframes rpSkelShimmer {
    0% { background-position: -260px 0; }
    100% { background-position: calc(260px + 100%) 0; }
}

.rp-skel-line,
.rp-skel-block,
#merchant-dashboard.is-loading .merchant-kpi-card strong,
#merchant-dashboard.is-loading .merchant-kpi-card small,
#merchant-dashboard.is-loading #dashboard_active_outlets,
#merchant-dashboard.is-loading #dashboard_total_outlets {
    background-color: var(--rp-surface, #eef1f6);
    background-image: linear-gradient(90deg,
        rgba(0, 0, 0, 0) 0,
        rgba(0, 0, 0, 0.07) 40%,
        rgba(0, 0, 0, 0.07) 60%,
        rgba(0, 0, 0, 0) 100%);
    background-size: 260px 100%;
    background-repeat: no-repeat;
    border-radius: 6px;
    animation: rpSkelShimmer 1.2s ease-in-out infinite;
}

/* KPI numbers / growth / outlet counts: hide the "0" text and show a shimmer bar */
#merchant-dashboard.is-loading .merchant-kpi-card strong,
#merchant-dashboard.is-loading .merchant-kpi-card small,
#merchant-dashboard.is-loading #dashboard_active_outlets,
#merchant-dashboard.is-loading #dashboard_total_outlets {
    color: transparent !important;
    display: inline-block;
    min-width: 90px;
    max-width: 100%;
    vertical-align: middle;
}

#merchant-dashboard.is-loading .merchant-kpi-card small {
    min-width: 130px;
    height: 13px;
}

/* Injected skeleton placeholders inside panels */
.rp-skel-line {
    height: 14px;
    width: 100%;
    margin-bottom: 12px;
}

.rp-skel-line:last-child {
    margin-bottom: 0;
}

.rp-skel-line:nth-child(2) { width: 88%; }
.rp-skel-line:nth-child(3) { width: 72%; }
.rp-skel-line:nth-child(4) { width: 90%; }
.rp-skel-line:nth-child(5) { width: 65%; }

.rp-skel-block {
    height: 62px;
    border-radius: 10px;
}

.dashboard-error {
    display: none;
    margin-top: 14px;
}

.dashboard-meta {
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--rp-muted);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.dashboard-kpi {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 8px 12px;
    align-items: center;
    min-height: 130px;
    padding: 18px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-surface);
    color: var(--rp-text);
    box-shadow: var(--rp-shadow-sm);
}

.dashboard-kpi:hover {
    color: var(--rp-text);
    box-shadow: var(--rp-shadow);
}

.dashboard-kpi-icon {
    grid-row: span 3;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--rp-radius);
    font-size: 20px;
}

.dashboard-kpi-icon.sales,
.dashboard-kpi-icon.average {
    background: var(--rp-primary-soft);
    color: var(--rp-primary);
}

.dashboard-kpi-icon.orders {
    background: #eff6ff;
    color: #2563eb;
}

.dashboard-kpi-icon.expenses {
    background: #fff7ed;
    color: #ea580c;
}

.dashboard-kpi-icon.discount {
    background: #fdf2f8;
    color: #db2777;
}

.dashboard-kpi-label {
    color: var(--rp-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-kpi strong {
    display: block;
    color: var(--rp-text);
    font-size: 24px;
    line-height: 1.1;
}

.dashboard-kpi small {
    color: var(--rp-muted);
    font-weight: 800;
}

.dashboard-kpi .is-up,
.dashboard-insight.positive strong {
    color: var(--rp-success);
}

.dashboard-kpi .is-down,
.dashboard-insight.negative strong {
    color: var(--rp-danger);
}

.dashboard-kpi .is-flat,
.dashboard-insight.info strong {
    color: var(--rp-muted);
}

.dashboard-card {
    height: 100%;
}

.dashboard-chart {
    width: 100%;
    min-height: 300px;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-list-row {
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--rp-border);
    border-radius: var(--rp-radius);
    background: var(--rp-surface-muted);
}

.dashboard-list-row div {
    flex: 1;
    min-width: 0;
}

.dashboard-list-row strong {
    display: block;
    color: var(--rp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-list-row small {
    color: var(--rp-muted);
}

.dashboard-list-row b {
    color: var(--rp-primary);
}

.dashboard-rank {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--rp-primary);
    color: #fff;
    font-weight: 800;
}

.dashboard-table th,
.dashboard-table td {
    padding: 13px 16px;
}

.dashboard-insights {
    display: grid;
    gap: 10px;
}

.dashboard-insight {
    padding: 12px;
    border: 1px solid var(--rp-border);
    border-left: 4px solid var(--rp-primary);
    border-radius: var(--rp-radius);
    background: var(--rp-surface-muted);
}

.dashboard-insight.warning {
    border-left-color: var(--rp-accent);
}

.dashboard-insight.negative {
    border-left-color: var(--rp-danger);
}

.dashboard-insight.positive {
    border-left-color: var(--rp-success);
}

.dashboard-insight p {
    margin: 4px 0 0;
    color: var(--rp-muted);
}

.dashboard-empty {
    padding: 18px;
    border: 1px dashed var(--rp-border-strong);
    border-radius: var(--rp-radius);
    color: var(--rp-muted);
    text-align: center;
}

@media (max-width: 1199.98px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .dashboard-title-row,
    .dashboard-toolbar,
    .dashboard-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filters .form-control,
    .dashboard-filters #dashboard_outlet,
    .dashboard-filters .btn {
        width: 100%;
    }
}

/* Merchant app inspired /admin/dashboard for web view */
body.merchant-dashboard-page {
    background: #f7f7f7;
}

body.merchant-dashboard-page .slim-mainpanel {
    padding: 24px 0 40px;
    background: #f7f7f7;
}

body.merchant-dashboard-page .slim-mainpanel > .container {
    width: 100%;
    max-width: none;
    padding-left: 24px;
    padding-right: 24px;
}

.merchant-app-dashboard {
    color: #14171d;
    background: #f7f7f7;
    font-family: "Inter", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

.merchant-app-topbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-radius: 14px 14px 0 0;
    background: #f5eef8;
}

.merchant-greeting {
    color: #12151b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.merchant-brand-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #12151b;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
}

.merchant-top-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.merchant-icon-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #50515a;
    font-size: 22px;
}

.merchant-duration-bar {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 22px;
    background: #ffffff;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.merchant-duration-bar label {
    margin: 0;
    color: #2e3137;
    font-size: 16px;
    font-weight: 500;
}

.merchant-duration-select {
    min-width: 118px;
    border: 0;
    background: transparent;
    color: #2e3137;
    font-size: 15px;
    font-weight: 500;
    text-align: right;
}

.merchant-custom-range {
    display: none;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    padding: 16px 0 0;
}

.merchant-app-dashboard .dashboard-loading {
    margin: 18px 0 0;
}

.merchant-app-dashboard .dashboard-error {
    margin: 18px 0 0;
}

.merchant-performance-card,
.merchant-panel,
.merchant-expense-card,
.merchant-kpi-card,
.merchant-action-card {
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.merchant-performance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 18px 0;
    padding: 18px 20px;
    background: #eef9f7;
}

.merchant-performance-card span {
    display: block;
    color: #74777f;
    font-size: 14px;
}

.merchant-performance-card strong {
    display: block;
    margin-top: 8px;
    color: #11141b;
    font-size: 22px;
    font-weight: 800;
}

.merchant-outlet-status {
    text-align: right;
}

.merchant-outlet-status strong {
    margin: 0;
    font-size: 20px;
}

.merchant-outlet-status span {
    margin-top: 6px;
    font-size: 14px;
}

.merchant-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
}

.merchant-kpi-card {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 18px;
    color: #14171d;
}

.merchant-kpi-list {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 16px;
    height: 100%;
    min-height: 132px;
}

.merchant-kpi-card-compact {
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 14px;
}

.merchant-kpi-card:hover,
.merchant-action-card:hover,
.merchant-expense-card:hover {
    color: #14171d;
}

.merchant-kpi-label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #777a82;
    font-size: 14px;
    font-weight: 500;
}

.merchant-kpi-label i {
    color: #0f9f97;
    font-size: 17px;
}

.merchant-kpi-card strong {
    color: #11141b;
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.merchant-kpi-card-compact strong {
    font-size: 22px;
    font-weight: 700;
}

.merchant-kpi-card small {
    font-size: 12px;
    font-weight: 500;
}

.merchant-kpi-card small .positive {
    color: #579f62;
}

.merchant-kpi-card small .negative {
    color: #ce6670;
}

.merchant-kpi-card small .neutral {
    color: #a1a3a8;
}

.merchant-action-card {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 18px;
    color: #16191f;
    font-size: 15px;
    font-weight: 800;
}

.merchant-action-card span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.merchant-action-card span i {
    color: #0f9f97;
}

.merchant-action-card > i {
    color: #b0b4ba;
    font-size: 20px;
}

.merchant-expense-card {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 20px;
    padding: 0 18px;
    color: #14171d;
}

.merchant-expense-card span {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #777a82;
    font-size: 14px;
}

.merchant-expense-card i {
    color: #ef4444;
    font-size: 17px;
}

.merchant-expense-card strong {
    color: #11141b;
    font-size: 22px;
    font-weight: 700;
}

.merchant-panel {
    margin: 20px 0;
    padding: 22px 20px;
    height: 400px;
    overflow: auto;
}

.merchant-panel h2 {
    margin: 0 0 18px;
    color: #11141b;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.merchant-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.merchant-panel-heading h2 {
    margin: 0;
}

.merchant-outletwise-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #e6f7f4;
    color: #0f8f88;
    font-size: 13px;
    font-weight: 800;
}

.merchant-progress-list {
    display: grid;
    gap: 18px;
}

.merchant-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.merchant-progress-head strong {
    color: #151820;
    font-size: 16px;
    font-weight: 600;
}

.merchant-progress-head span,
.merchant-progress-meta {
    color: #74777f;
    font-size: 14px;
}

.merchant-progress-meta {
    margin-top: 6px;
}

.merchant-progress-track {
    height: 8px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9edf2;
}

.merchant-progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #119f96;
}

.merchant-hourly-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.merchant-hour-card {
    height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 7px 8px;
    border-radius: 8px;
    color: #11141b;
}

.merchant-hour-card span {
    color: rgba(17, 20, 27, 0.86);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-hour-card strong {
    color: #11141b;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-hour-card small {
    color: rgba(17, 20, 27, 0.78);
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-hour-card.light,
.merchant-hour-card.light span,
.merchant-hour-card.light strong,
.merchant-hour-card.light small {
    color: #ffffff;
}

.merchant-hour-card.light span {
    color: rgba(255, 255, 255, 0.82);
}

.merchant-hour-card.light small {
    color: rgba(255, 255, 255, 0.78);
}

.merchant-hour-legend {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    color: #777a82;
    font-size: 13px;
}

.merchant-hour-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.merchant-hour-legend i {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 5px;
}

.merchant-hour-legend .warm {
    background: #fff7d6;
}

.merchant-hour-legend .busy {
    background: #ff9d44;
}

.merchant-hour-legend .hot {
    background: #d72638;
}

.merchant-top-items {
    display: grid;
    gap: 20px;
}

.merchant-item-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.merchant-item-rank {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dff6f3;
    color: #0f9f97;
    font-size: 15px;
    font-weight: 800;
}

.merchant-item-row strong {
    display: block;
    color: #24262d;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-item-row small {
    display: block;
    margin-top: 4px;
    color: #74777f;
    font-size: 13px;
}

.merchant-item-row b {
    color: #24262d;
    font-size: 15px;
}

.merchant-insights {
    display: grid;
    gap: 12px;
}

.merchant-insight {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    padding: 15px;
    border: 1px solid #bde5c7;
    border-radius: 12px;
    background: #edf8ef;
}

.merchant-insight.info {
    border-color: #b8e5e5;
    background: #eaf8f8;
}

.merchant-insight.warning {
    border-color: #f5ddb0;
    background: #fff8eb;
}

.merchant-insight.negative {
    border-color: #f2c5cb;
    background: #fff1f3;
}

.merchant-insight > span {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #d8f4de;
    color: #5eba68;
    font-size: 17px;
}

.merchant-insight.info > span {
    background: #d4f2f2;
    color: #0f9f97;
}

.merchant-insight.warning > span {
    background: #ffefce;
    color: #c98212;
}

.merchant-insight.negative > span {
    background: #ffe0e5;
    color: #ce4b5a;
}

.merchant-insight strong {
    display: block;
    color: #171a21;
    font-size: 16px;
    font-weight: 800;
}

.merchant-insight p {
    margin: 5px 0 0;
    color: #6e727b;
    font-size: 14px;
    line-height: 1.35;
}

.merchant-empty {
    padding: 18px;
    border-radius: 12px;
    background: #f4f6f8;
    color: #777a82;
    text-align: center;
}

@media (min-width: 768px) {
    .merchant-app-dashboard {
        overflow: visible;
        border-radius: 0;
        box-shadow: none;
    }

    .merchant-dashboard-web-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
        gap: 20px;
        align-items: start;
    }
}

@media (max-width: 575.98px) {
    body.merchant-dashboard-page .slim-mainpanel .container {
        padding-left: 0;
        padding-right: 0;
    }

    .merchant-app-topbar {
        min-height: 146px;
        padding: 28px 28px 18px;
    }

    .merchant-brand-button {
        font-size: 28px;
    }

    .merchant-duration-bar {
        padding: 0 34px;
    }

    .merchant-duration-bar label {
        font-size: 24px;
    }

    .merchant-kpi-card {
        min-height: 208px;
    }

    .merchant-kpi-list {
        min-height: 208px;
    }
}

@media (max-width: 1199.98px) {
    .merchant-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .merchant-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .merchant-kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {
    .merchant-kpi-grid {
        gap: 12px;
        margin-left: 14px;
        margin-right: 14px;
    }

    .merchant-performance-card,
    .merchant-panel,
    .merchant-expense-card {
        margin-left: 14px;
        margin-right: 14px;
    }

    .merchant-kpi-card {
        padding: 22px 18px;
    }

    .merchant-kpi-card strong {
        font-size: 30px;
    }

    .merchant-kpi-card-compact strong {
        font-size: 22px;
    }

    .merchant-panel {
        padding: 28px 22px;
    }

    .merchant-hourly-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .slim-header,
    .slim-navbar {
        position: relative;
        top: auto;
    }

    .slim-navbar .nav {
        padding: 10px 0;
        gap: 6px;
    }

    .slim-navbar .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .card-dash-one .row > div {
        border-right: 0;
        border-bottom: 1px solid var(--rp-border);
    }

    .card-dash-one .row > div:last-child {
        border-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .slim-mainpanel {
        padding-top: 18px;
    }

    .slim-header .container,
    .slim-navbar .container,
    .slim-mainpanel .container,
    .slim-footer .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .logged-user span {
        display: none;
    }

    .section-wrapper,
    .card-body {
        padding: 14px;
    }
}

.btn-outline-white {
    color: #fff;
    background-color: transparent;
    background-image: none;
    border-color: #fff;
}

.btn-outline-white:hover {
    color: #fff;
    background-color: var(--rp-primary);
    border-color: #fff;
}
