/* ==========================================================================
   Starmart Admin - design system
   Loaded after Bootstrap 4. Replaces style.css + admin-theme.css.
   Mobile first: base rules target phones, media queries scale up.
   ========================================================================== */

@media (min-width: 1200px) {
    .col-xl-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

html {
    scroll-behavior: smooth !important;
}

.scroll-highlight {
    animation: highlightPulse 1.2s ease-in-out;
}

@keyframes highlightPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.01); box-shadow: 0 0 25px rgba(16, 185, 129, 0.4); }
    100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
}

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
    /* Brand - matches the customer app's green */
    --c-primary: #16a34a;
    --c-primary-600: #15803d;
    --c-primary-700: #166534;
    --c-primary-soft: #dcfce7;
    --c-primary-ring: rgba(22, 163, 74, .18);

    /* Neutrals */
    --c-bg: #f5f7fa;
    --c-surface: #ffffff;
    --c-surface-2: #f8fafc;
    --c-border: #e5e9f0;
    --c-border-strong: #d3dae5;
    --c-text: #0f172a;
    --c-text-muted: #64748b;
    --c-text-soft: #94a3b8;

    /* Status */
    --c-success: #16a34a;
    --c-success-soft: #dcfce7;
    --c-warning: #d97706;
    --c-warning-soft: #fef3c7;
    --c-danger: #dc2626;
    --c-danger-soft: #fee2e2;
    --c-info: #0284c7;
    --c-info-soft: #e0f2fe;

    /* Shape */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;

    /* Elevation */
    --sh-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --sh-md: 0 2px 8px rgba(15, 23, 42, .06);
    --sh-lg: 0 12px 32px rgba(15, 23, 42, .12);

    /* Layout */
    --sidebar-w: 264px;
    --header-h: 64px;
    --gutter: 16px;

    --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- 2. Base ------------------------------------------------------ */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.55;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -.01em;
}

a {
    color: var(--c-primary-600);
    text-decoration: none;
}

a:hover {
    color: var(--c-primary-700);
    text-decoration: none;
}

::selection {
    background: var(--c-primary-soft);
}

:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* Scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--c-border-strong) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: var(--c-border-strong);
    border-radius: var(--r-pill);
}

*::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------- 3. Layout shell ---------------------------------------------- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
}

.sidebar.open {
    transform: translateX(0);
    box-shadow: var(--sh-lg);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    min-height: var(--header-h);
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    background: var(--c-surface);
    z-index: 2;
}

.side-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.side-logo-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: var(--r-sm);
    background: var(--c-primary);
    color: #fff;
    font-size: 15px;
}

.side-logo-text {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    color: var(--c-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-close-btn {
    border: 0;
    background: transparent;
    color: var(--c-text-muted);
    font-size: 18px;
    padding: 6px 10px;
    border-radius: var(--r-sm);
}

.side-close-btn:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
}

.side-menu {
    list-style: none;
    margin: 0;
    padding: 8px 10px 24px;
}

.side-menu > li {
    margin-bottom: 2px;
}

.side-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    color: var(--c-text-muted);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.side-menu a:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
}

.side-menu .menu-icon,
.side-menu .submenu-icon {
    font-size: 15px !important;
    width: 20px;
    text-align: center;
    flex: 0 0 20px;
}

.side-menu .submenu-icon {
    font-size: 11px !important;
    opacity: .55;
}

.side-menu li.active > a {
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
}

.side-menu li.active > a .menu-icon {
    color: var(--c-primary);
}

.partition {
    margin: 16px 12px 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--c-text-soft);
}

.partition span {
    display: block;
}

/* Sidebar submenu */
.side-menu .dropdown-toggle::after {
    margin-left: auto;
    border-top-color: currentColor;
    transition: transform .2s ease;
}

.side-menu .dropdown.show > a.dropdown-toggle::after,
.side-menu .dropdown.active > a.dropdown-toggle::after {
    transform: rotate(180deg);
}

.side-submenu {
    position: static !important;
    float: none;
    width: auto;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 2px 0 2px 14px;
    margin: 0;
    display: none;
}

.side-submenu.show {
    display: block;
}

.side-submenu .dropdown-item {
    padding: 8px 12px;
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--c-text-muted);
    background: transparent;
}

.side-submenu .dropdown-item:hover,
.side-submenu li.active .dropdown-item {
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
}

/* Content column */
.right-content {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin-left: 0;
    transition: margin-left .26s cubic-bezier(.4, 0, .2, 1);
}

.body-content {
    flex: 1;
    padding: var(--gutter);
    max-width: 100%;
    overflow-x: hidden;
}

/* ---------- 4. Header ---------------------------------------------------- */
.header {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--header-h);
    padding: 10px var(--gutter);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--c-border);
}

.header-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.side-toggle {
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text);
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    display: grid;
    place-items: center;
    padding: 0;
    flex: 0 0 40px;
}

.side-toggle:hover {
    background: var(--c-surface-2);
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border);
    background: var(--c-surface);
    color: var(--c-text-muted);
    display: grid;
    place-items: center;
    position: relative;
}

.header-icon-btn:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
}

.header-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--r-pill);
    object-fit: cover;
    border: 2px solid var(--c-border);
}

/* ---------- 5. Page header / breadcrumb ---------------------------------- */
.page-top-bar {
    margin-bottom: 16px;
}

.page-top-bar .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 13px;
    flex-wrap: wrap;
}

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

.breadcrumb-item.active {
    color: var(--c-text);
    font-weight: 600;
}

.page-title-sm {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px;
}

.box-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.box-title .title {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
}

/* ---------- 6. Cards ----------------------------------------------------- */
.custom-border-card,
.card,
.dashboard-card-box,
.table-card-wrapper {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
}

.custom-border-card {
    padding: 16px;
}

.card {
    margin-bottom: 16px;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--c-border);
    padding: 14px 16px;
    font-weight: 700;
}

.card-body {
    padding: 16px;
}

.dashboard-card-box {
    padding: 16px;
    height: 100%;
}

.card-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.card-box-title {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-box-title i {
    color: var(--c-primary);
}

/* Table card: the table owns its own padding */
.table-card-wrapper {
    padding: 0;
    overflow: hidden;
}

.custom-border-card .table-card-wrapper {
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

/* ---------- 7. Buttons --------------------------------------------------- */
.btn {
    font-family: var(--font);
    font-weight: 600;
    font-size: 13.5px;
    border-radius: var(--r-sm);
    padding: 9px 16px;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.3;
}

.btn:focus,
.btn.focus {
    box-shadow: 0 0 0 3px var(--c-primary-ring);
}

.btn-primary,
.btn-add-new {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}

.btn-primary:hover,
.btn-add-new:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background: var(--c-primary-600);
    border-color: var(--c-primary-600);
    color: #fff;
}

.btn-default,
.btn-cancel,
.btn-secondary {
    background: var(--c-surface);
    border-color: var(--c-border-strong);
    color: var(--c-text);
}

.btn-default:hover,
.btn-cancel:hover,
.btn-secondary:hover {
    background: var(--c-surface-2);
    border-color: var(--c-text-soft);
    color: var(--c-text);
}

.btn-danger {
    background: var(--c-danger);
    border-color: var(--c-danger);
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-link {
    color: var(--c-primary-600);
    padding: 4px 6px;
    font-weight: 600;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

.btn-lg {
    padding: 12px 22px;
    font-size: 15px;
}

/* Small circular row actions */
.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: var(--r-sm);
    display: inline-grid;
    place-items: center;
}

.action-btn-group {
    display: inline-flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: nowrap;
}

/* ---------- 8. Forms ----------------------------------------------------- */
.form-group {
    margin-bottom: 14px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    margin-bottom: 6px;
    display: block;
}

.form-control,
.custom-select,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    height: auto;
    min-height: 42px;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--r-sm);
    padding: 9px 12px;
    font-size: 14px;
    color: var(--c-text);
    background-color: var(--c-surface);
    transition: border-color .15s ease, box-shadow .15s ease;
    /* 16px on mobile stops iOS zooming the viewport on focus */
}

.form-control:focus,
.custom-select:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px var(--c-primary-ring);
    background-color: var(--c-surface);
}

.form-control::placeholder {
    color: var(--c-text-soft);
}

.form-control:disabled,
.form-control[readonly] {
    background: var(--c-surface-2);
    color: var(--c-text-muted);
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -8px;
    margin-left: -8px;
}

.form-row > [class*="col-"] {
    padding-right: 8px;
    padding-left: 8px;
}

.input-group-text {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-strong);
    color: var(--c-text-muted);
    border-radius: var(--r-sm);
    font-size: 13px;
}

.text-danger {
    color: var(--c-danger) !important;
}

.text-muted {
    color: var(--c-text-muted) !important;
}

/* Search input */
.search-input-wrapper {
    position: relative;
    max-width: 340px;
    width: 100%;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--c-text-soft);
    font-size: 13px;
    pointer-events: none;
}

.search-input {
    padding-left: 36px !important;
}

.filter-card-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Radio / checkbox */
.custom-control-label {
    font-weight: 500;
    padding-top: 1px;
    cursor: pointer;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background: var(--c-primary);
    border-color: var(--c-primary);
}

.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px var(--c-primary-ring);
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    align-items: center;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--c-border-strong);
    transition: .25s;
    border-radius: var(--r-pill);
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    transition: .25s;
    border-radius: 50%;
    box-shadow: var(--sh-sm);
}

.switch input:checked + .slider {
    background: var(--c-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* Segmented control */
.segmented-btn {
    display: inline-flex;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: 3px;
    gap: 3px;
    flex-wrap: wrap;
}

.segmented-btn .btn {
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    background: transparent;
    border: 0;
    color: var(--c-text-muted);
}

.segmented-btn .btn.active {
    background: var(--c-surface);
    color: var(--c-text);
    box-shadow: var(--sh-sm);
}

/* Image upload */
.avatar-upload {
    position: relative;
}

.avatar-preview,
.drop-area {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 190px;
    border: 2px dashed var(--c-border-strong);
    border-radius: var(--r-md);
    background: var(--c-surface-2);
    cursor: pointer;
    overflow: hidden;
    margin: 0;
    transition: border-color .15s ease, background .15s ease;
}

.avatar-preview:hover,
.drop-area.dragover {
    border-color: var(--c-primary);
    background: var(--c-primary-soft);
}

.avatar-preview img,
.imagePreview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ---------- 9. Tables ---------------------------------------------------- */
.table-responsive,
.table-scroll {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
}

.table {
    margin: 0;
    color: var(--c-text);
    font-size: 13.5px;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--c-surface-2);
    border: 0;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 12px 14px;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody td {
    border: 0;
    border-bottom: 1px solid var(--c-border);
    padding: 12px 14px;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: var(--c-surface-2);
}

.table img {
    max-width: 60px;
    max-height: 60px;
    border-radius: var(--r-sm);
    object-fit: cover;
}

.avatar-table-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.avatar-table-img {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--c-border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.table .img-thumbnail {
    padding: 0;
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
}

/* ---------- 10. Badges --------------------------------------------------- */
.badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-success, .status-badge.success, .badge-active {
    background: var(--c-success-soft);
    color: var(--c-primary-700);
}

.badge-danger, .status-badge.danger, .badge-inactive {
    background: var(--c-danger-soft);
    color: #991b1b;
}

.badge-warning, .status-badge.warning {
    background: var(--c-warning-soft);
    color: #92400e;
}

.badge-info, .status-badge.info {
    background: var(--c-info-soft);
    color: #075985;
}

.badge-dark, .badge-secondary {
    background: #e2e8f0;
    color: #334155;
}

/* ---------- 11. Modals --------------------------------------------------- */
.modal-content {
    border: 0;
    border-radius: var(--r-lg);
    box-shadow: var(--sh-lg);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--c-border);
    padding: 16px;
    align-items: center;
}

.modal-title {
    font-size: 15.5px;
    font-weight: 700;
}

.modal-body {
    padding: 16px;
}

.modal-footer {
    border-top: 1px solid var(--c-border);
    padding: 12px 16px;
    gap: 8px;
}

.modal-footer > * {
    margin: 0;
}

.close {
    font-size: 24px;
    font-weight: 400;
    opacity: .5;
    text-shadow: none;
}

.close:hover {
    opacity: 1;
}

/* ---------- 12. Tabs ----------------------------------------------------- */
/* The panel's tabbed pages use `nav-pills custom-tabs`; Bootstrap's default
   pill is blue, so restate it in the brand colour. Scrolls horizontally rather
   than wrapping into a ragged block on narrow screens. */
.nav-pills.custom-tabs {
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.nav-pills.custom-tabs .nav-item {
    flex: 0 0 auto;
}

.nav-pills.custom-tabs .nav-link {
    border-radius: var(--r-pill);
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--c-text-muted);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    white-space: nowrap;
}

.nav-pills.custom-tabs .nav-link:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
}

.nav-pills.custom-tabs .nav-link.active,
.nav-pills.custom-tabs .show > .nav-link {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}

.nav-tabs {
    border-bottom: 1px solid var(--c-border);
    gap: 2px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--c-text-muted);
    font-weight: 600;
    font-size: 13.5px;
    padding: 10px 14px;
    white-space: nowrap;
    border-radius: 0;
}

.nav-tabs .nav-link:hover {
    color: var(--c-text);
    border-bottom-color: var(--c-border-strong);
}

.nav-tabs .nav-link.active {
    color: var(--c-primary-700);
    background: transparent;
    border-bottom-color: var(--c-primary);
}

/* ---------- 13. DataTables ----------------------------------------------- */
.dataTables_wrapper {
    padding: 0;
}

.dataTables_wrapper .top {
    padding: 12px 14px 0;
}

.dataTables_wrapper .row {
    margin: 0;
    align-items: center;
    padding: 12px 14px;
    gap: 10px;
}

.dataTables_info {
    font-size: 12.5px;
    color: var(--c-text-muted);
    white-space: nowrap;
    padding: 0 !important;
}

.dataTables_length label,
.dataTables_filter label {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dataTables_length select {
    min-height: 34px;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border-strong);
}

.dataTables_paginate {
    padding: 0 !important;
}

.pagination {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
}

.page-link {
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm) !important;
    color: var(--c-text-muted);
    font-size: 13px;
    font-weight: 600;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 8px;
}

.page-link:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
    border-color: var(--c-border-strong);
}

.page-item.active .page-link {
    background: var(--c-primary);
    border-color: var(--c-primary);
    color: #fff;
}

.page-item.disabled .page-link {
    color: var(--c-text-soft);
    background: var(--c-surface-2);
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    cursor: pointer;
}

.dataTables_processing {
    background: var(--c-surface) !important;
    border: 1px solid var(--c-border) !important;
    border-radius: var(--r-sm);
    box-shadow: var(--sh-md);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- 14. Dashboard widgets ---------------------------------------- */
.stat-card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    box-shadow: var(--sh-sm);
    padding: 16px;
    height: 100%;
}

.stat-icon-wrapper {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    font-size: 18px;
}

.stat-content-wrap {
    min-width: 0;
}

.stat-number {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    display: block;
    color: var(--c-text);
}

.stat-label {
    font-size: 12.5px;
    color: var(--c-text-muted);
    font-weight: 600;
}

.artist-grid-card,
.product-grid-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 10px;
    height: 100%;
}

/* ---------- 14b. Ultra Premium Login ------------------------------------ */
.login-page-container {
    min-height: 100vh;
    background: #090d16;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Ambient Background Glow Orbs */
.login-glow-orb-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.35) 0%, rgba(5, 150, 105, 0) 70%);
    filter: blur(80px);
    pointer-events: none;
    animation: pulseOrb 8s ease-in-out infinite alternate;
}

.login-glow-orb-2 {
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.3) 0%, rgba(15, 23, 42, 0) 70%);
    filter: blur(100px);
    pointer-events: none;
    animation: pulseOrb 10s ease-in-out infinite alternate-reverse;
}

@keyframes pulseOrb {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(30px, -20px); }
}

/* Floating Central Glass Card */
.login-master-card {
    width: 100%;
    max-width: 1060px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: flex;
    min-height: 620px;
    position: relative;
    z-index: 10;
}

/* Left Showcase Panel */
.login-hero-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #022c22;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px;
    color: #ffffff;
}

.login-hero-img-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    filter: saturate(1.2) contrast(1.1);
    transition: transform 10s ease;
}

.login-master-card:hover .login-hero-img-bg {
    transform: scale(1.06);
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 44, 34, 0.75) 0%, rgba(6, 78, 59, 0.92) 100%);
    z-index: 1;
}

.login-hero-content {
    position: relative;
    z-index: 2;
}

.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.login-hero-badge-icon {
    width: 28px;
    height: 28px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.login-hero-badge-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.login-hero-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff !important;
    margin-top: 40px;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.login-hero-subtitle {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 420px;
}

/* Glass Feature Chips */
.login-hero-chips {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 30px;
}

.login-chip-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 14px 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.login-chip-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.login-chip-icon {
    font-size: 18px;
    color: #34d399;
    margin-bottom: 6px;
}

.login-chip-val {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    display: block;
}

.login-chip-lbl {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

/* Right Form Panel */
.login-form-panel {
    flex: 1;
    background: #ffffff;
    padding: 50px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

.login-portal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    color: #059669;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid #a7f3d0;
    margin-bottom: 16px;
}

.login-form-main-title {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.login-form-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 30px;
    font-weight: 500;
}

/* Input Fields */
.login-field-group {
    margin-bottom: 20px;
}

.login-field-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
    display: block;
}

.login-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-prefix-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 15px;
    z-index: 4;
    transition: color 0.2s ease;
}

.login-custom-input {
    width: 100%;
    height: 48px;
    padding-left: 44px !important;
    padding-right: 44px !important;
    border-radius: 12px !important;
    border: 1.5px solid #e2e8f0 !important;
    background: #f8fafc !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    transition: all 0.2s ease !important;
}

.login-custom-input:focus {
    background: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14) !important;
    outline: none !important;
}

.login-input-box:focus-within .login-input-prefix-icon {
    color: #10b981;
}

.login-eye-toggle {
    position: absolute;
    right: 16px;
    color: #94a3b8;
    cursor: pointer;
    font-size: 15px;
    z-index: 4;
    padding: 4px;
    transition: color 0.2s ease;
}

.login-eye-toggle:hover {
    color: #475569;
}

/* Submit Button */
.btn-login-action {
    width: 100%;
    height: 50px;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    margin-top: 10px;
}

.btn-login-action:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.45) !important;
}

.login-footer-copy {
    margin-top: 32px;
    text-align: center;
    font-size: 12.5px;
    color: #94a3b8;
    font-weight: 500;
}

/* Responsive Mobile Layout */
@media (max-width: 991.98px) {
    .login-master-card {
        flex-direction: column;
        max-width: 440px;
        min-height: auto;
        border-radius: 24px;
    }

    .login-hero-panel {
        padding: 32px 24px;
    }

    .login-hero-title {
        font-size: 24px;
        margin-top: 20px;
    }

    .login-form-panel {
        padding: 36px 24px;
    }
}

@media (max-width: 575.98px) {
    .login-page-container {
        padding: 16px 12px;
    }

    .login-master-card {
        border-radius: 20px;
    }

    .login-hero-panel {
        padding: 24px 20px;
    }

    .login-form-panel {
        padding: 28px 20px;
    }

    .login-form-main-title {
        font-size: 22px;
    }
}

/* ---------- 15. Utilities ------------------------------------------------ */
.mw-120 {
    min-width: 120px;
}

.light-gray {
    color: var(--c-text-muted);
}

.primary-color {
    color: var(--c-primary) !important;
}

.text-dark {
    color: var(--c-text) !important;
}

.shadow-sm {
    box-shadow: var(--sh-sm) !important;
}

/* Bootstrap 5 gutter classes used in some blades - make them work on BS4 */
.g-3 {
    margin-right: -8px;
    margin-left: -8px;
}

.g-3 > [class*="col"] {
    padding-right: 8px;
    padding-left: 8px;
}

/* ---------- Premium Glassmorphism Loader ---------- */
#dvloader {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    place-items: center;
    z-index: 99999;
    animation: fadeInLoader 0.25s ease-out forwards;
}

.loader-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(16, 185, 129, 0.15);
    padding: 30px 42px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transform: scale(0.95);
    animation: popInCard 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.loader-spinner-wrapper {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-gradient-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #10B981, #06B6D4, #6366F1, #10B981);
    animation: spinRing 1.1s linear infinite;
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 0);
}

.loader-icon-box {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    animation: pulseIcon 1.5s ease-in-out infinite alternate;
}

.loader-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.loader-title {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.5px;
    color: #0F172A;
    background: linear-gradient(135deg, #0F172A 0%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.loader-sub {
    font-size: 13px;
    font-weight: 500;
    color: #64748B;
}

@keyframes spinRing {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseIcon {
    0% { transform: scale(0.92); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25); }
    100% { transform: scale(1.08); box-shadow: 0 8px 22px rgba(16, 185, 129, 0.45); }
}

@keyframes fadeInLoader {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popInCard {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---------- 16. Responsive ----------------------------------------------- */

/* Phones: stack data tables into cards.
   td[data-label] is populated by admin-ui.js from the matching th. */
@media (max-width: 767.98px) {
    .form-control,
    .custom-select {
        font-size: 16px; /* prevents iOS focus zoom */
    }

    .table-stack thead {
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: nowrap !important;
    }

    .table-stack td::before {
        display: none !important;
        content: none !important;
    }

    .dataTables_wrapper .row {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .dataTables_wrapper .row > [class*="col-"] {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .pagination {
        justify-content: center;
    }

    .search-input-wrapper {
        max-width: 100%;
    }

    /* Full-width action buttons read better on a phone. Every form's button row
       in this panel is written as `.text-right` alongside a pt-* utility
       (usually `border-top pt-3 text-right`), so match that pairing rather than
       bare .text-right, which is also used on table cells and inline text. */
    .form-actions,
    .body-content .pt-2.text-right,
    .body-content .pt-3.text-right,
    .body-content .pt-4.text-right {
        display: flex;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .form-actions .btn,
    .body-content .pt-2.text-right > .btn,
    .body-content .pt-3.text-right > .btn,
    .body-content .pt-4.text-right > .btn,
    .btn-block-sm {
        width: 100%;
        margin: 0;
    }

    /* Summernote ships its own compact toolbar; leave its buttons alone. */
    .note-editor .btn,
    .note-btn {
        width: auto !important;
    }

    /* Nothing inside a card may force the page wider than the screen */
    .custom-border-card [style*="min-width"],
    .card-body [style*="min-width"] {
        min-width: 0 !important;
        width: 100% !important;
    }

    .page-top-bar .d-flex {
        gap: 10px;
    }

    /* Toolbars that sit right of a title should wrap under it */
    .box-title,
    .filter-card-bar {
        align-items: stretch;
    }

    .modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Small tablets and up */
@media (min-width: 576px) {
    :root {
        --gutter: 20px;
    }
}

/* Tablets */
@media (min-width: 768px) {
    .header-title {
        font-size: 17px;
    }

    .stat-number {
        font-size: 24px;
    }
}

/* Desktop: sidebar becomes permanent */
@media (min-width: 992px) {
    :root {
        --gutter: 24px;
    }

    .sidebar {
        transform: translateX(0);
        box-shadow: none;
    }

    .right-content {
        margin-left: var(--sidebar-w);
    }

    .sidebar-overlay {
        display: none;
    }

    /* Collapsed rail */
    body.sidebar-collapsed .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-collapsed .right-content {
        margin-left: 0;
    }
}

@media (min-width: 1400px) {
    .body-content {
        padding-left: 32px;
        padding-right: 32px;
    }
}

/* ---------- 17. Print ---------------------------------------------------- */
@media print {
    .sidebar,
    .header,
    .sidebar-overlay,
    .page-top-bar,
    .dataTables_paginate,
    .dataTables_length,
    .btn {
        display: none !important;
    }

    .right-content {
        margin-left: 0 !important;
    }

    .custom-border-card,
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ---------- 18. Product Grid & Cards ------------------------------------ */
.profile-products-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    gap: 20px !important;
}

.profile-product-card {
    background: #ffffff !important;
    border: 1px solid var(--c-border) !important;
    border-radius: 14px !important;
    padding: 0 !important;
    text-align: left !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.profile-product-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

.product-card-img-wrapper {
    position: relative;
    width: 100%;
    height: 175px;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

.profile-product-card img {
    width: 100% !important;
    height: 100% !important;
    max-height: 175px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    padding: 10px;
    transition: transform 0.3s ease;
}

.profile-product-card:hover img {
    transform: scale(1.05);
}

.profile-product-card .action-buttons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 3;
}

.profile-product-card .action-buttons .btn {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.profile-product-name {
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: 38px !important;
    line-height: 1.35 !important;
    margin: 10px 12px 6px !important;
}

.product-card-footer {
    padding: 0 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-product-price {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #16a34a !important;
}

/* ---------- 19. Dashboard Widgets ---------------------------------------- */
.top-product-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.top-product-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.product-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.product-item-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--c-brand, #16a34a);
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-item-img {
    width: 44px !important;
    height: 44px !important;
    max-height: 44px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.product-item-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-sold-badge {
    padding: 6px 12px;
    border-radius: 20px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 12.5px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
    height: 100%;
}

.brand-grid-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.brand-grid-img {
    width: 44px !important;
    height: 44px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    margin-bottom: 6px;
}

.brand-grid-name {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.artist-grid-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px !important;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.artist-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}



/* ==========================================================================
   18. Page components
   Classes the individual pages use, grouped by the screen they belong to.
   ========================================================================== */

/* ---- Tables ------------------------------------------------------------- */
.custom-modern-table {
    width: 100%;
}

.custom-modern-table td,
.custom-modern-table th {
    vertical-align: middle;
}

.table-bg {
    background: var(--c-surface);
}

/* ---- Dashboard ---------------------------------------------------------- */
.dashboard-welcome-banner {
    background: linear-gradient(120deg, var(--c-primary), var(--c-primary-700));
    color: #fff;
    border-radius: var(--r-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-welcome-title {
    color: #fff;
    font-size: clamp(18px, 3vw, 24px);
    margin: 0 0 4px;
}

.dashboard-welcome-sub {
    color: rgba(255, 255, 255, .88);
    margin: 0;
    font-size: 13.5px;
}

.stat-icon-indigo  { background: #e0e7ff; color: #4338ca; }
.stat-icon-rose    { background: #ffe4e6; color: #be123c; }
.stat-icon-sky     { background: #e0f2fe; color: #0369a1; }
.stat-icon-purple  { background: #f3e8ff; color: #7e22ce; }
.stat-icon-teal    { background: #ccfbf1; color: #0f766e; }
.stat-icon-violet  { background: #ede9fe; color: #6d28d9; }
.stat-icon-amber   { background: #fef3c7; color: #b45309; }
.stat-icon-emerald { background: #d1fae5; color: #047857; }

/* Segmented control: here .segmented-btn is the button itself and
   .segmented-btn-group is the track around it. */
.segmented-btn-group {
    display: inline-flex;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    padding: 3px;
    gap: 3px;
    flex-wrap: wrap;
}

.segmented-btn-group .segmented-btn {
    border: 0;
    background: transparent;
    color: var(--c-text-muted);
    font-family: var(--font);
    font-weight: 600;
    font-size: 12.5px;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.segmented-btn-group .segmented-btn.active {
    background: var(--c-surface);
    color: var(--c-text);
    box-shadow: var(--sh-sm);
}

.brand-grid-item {
    text-align: center;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 10px 6px;
    height: 100%;
    background: var(--c-surface);
}

.brand-grid-img {
    width: 100%;
    height: 54px;
    object-fit: contain;
    margin-bottom: 6px;
}

.brand-grid-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
}

.product-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 220px;
}

.product-item-rank {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    font-size: 11.5px;
    font-weight: 700;
}

.product-item-img {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border);
}

.product-item-title {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-sold-badge {
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
    border-radius: var(--r-pill);
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---- Table cell helpers ------------------------------------------------- */
.user-cell-wrap,
.contact-cell-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
    min-width: 0;
}

.user-fullname,
.contact-email {
    font-weight: 600;
    color: var(--c-text);
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-username,
.contact-phone,
.date-text {
    font-size: 12px;
    color: var(--c-text-muted);
}

.avatar-control img,
.delivery-instructor-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border);
}

.wallet-badge {
    background: var(--c-info-soft);
    color: #075985;
    border-radius: var(--r-pill);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ---- Reviews ------------------------------------------------------------ */
.review-card {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 14px;
    background: var(--c-surface);
    margin-bottom: 12px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.reviewer-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info {
    min-width: 0;
}

.reviewer-name {
    font-weight: 700;
    font-size: 13.5px;
}

.review-date {
    font-size: 12px;
    color: var(--c-text-muted);
}

.review-body {
    font-size: 13.5px;
    color: var(--c-text-muted);
}

.stars,
.review-rating {
    display: inline-flex;
    gap: 2px;
    color: #f59e0b;
    font-size: 13px;
}

/* ---- Info panels -------------------------------------------------------- */
.info-section,
.info-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--c-info-soft);
    border: 1px solid #bae6fd;
    border-radius: var(--r-md);
    padding: 14px;
    margin-bottom: 16px;
}

.info-icon {
    color: var(--c-info);
    font-size: 18px;
    flex: 0 0 auto;
}

.info-content,
.info-text {
    font-size: 13px;
    color: #075985;
    min-width: 0;
}

/* ---- Address / product detail ------------------------------------------- */
.address-container,
.image-gallery,
.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.address-box,
.image-item {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 12px;
    background: var(--c-surface);
    flex: 1 1 260px;
    min-width: 0;
}

.image-item img,
.landscape-preview img,
.screen-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-sm);
}

.product-title {
    font-size: 17px;
    font-weight: 800;
}

.product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--c-primary-700);
}

.product-description,
.product-info,
.product-details {
    font-size: 13.5px;
    color: var(--c-text-muted);
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-md);
}

/* ---- FAQ / repeatable rows ---------------------------------------------- */
.faq-item,
.faq-item-section,
.additional-row,
.faq-additional-row {
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 12px;
    margin-bottom: 10px;
    background: var(--c-surface-2);
}

.faq-question {
    font-weight: 700;
    font-size: 13.5px;
}

.faq-answer {
    font-size: 13px;
    color: var(--c-text-muted);
}

.add-more,
.add-more-social-link,
.add-faq-more,
.add_new_screen,
.cursor-pointer,
.click_checkbox,
.toggle-button,
.upload-btn,
.upload-field {
    cursor: pointer;
}

.faq-remove-more,
.remove_link,
.remove_screen,
.remove-upload {
    cursor: pointer;
    color: var(--c-danger);
}

/* ---- Export toolbar ----------------------------------------------------- */
.export-buttons-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-export,
.btn-csv,
.btn-excel,
.btn-pdf {
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    color: var(--c-text);
    border-radius: var(--r-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.btn-export:hover,
.btn-csv:hover,
.btn-excel:hover,
.btn-pdf:hover {
    background: var(--c-surface-2);
}

.export-banner-card {
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    padding: 14px;
    margin-bottom: 16px;
}

.export-info-text {
    font-size: 12.5px;
    color: var(--c-text-muted);
}

/* ---- Order tracking ----------------------------------------------------- */
.order-tracking {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.order-tracking .step {
    flex: 1 1 120px;
    text-align: center;
    padding: 14px 10px;
    border-radius: 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    transition: all 0.25s ease;
}

.order-tracking .step .icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #E2E8F0;
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    font-size: 18px;
    transition: all 0.25s ease;
}

.order-tracking .step.active {
    background: #EFF6FF;
    border-color: #3B82F6;
    color: #1E40AF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.order-tracking .step.active .icon {
    background: #2563EB;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ---- Misc --------------------------------------------------------------- */
.page-search {
    max-width: 340px;
    width: 100%;
}

.text-gray {
    color: var(--c-text-muted);
    font-size: 12.5px;
}

.hidden {
    display: none !important;
}

.gap-2 {
    gap: 8px;
}

.g-2 {
    margin-right: -6px;
    margin-left: -6px;
}

.g-2 > [class*="col"] {
    padding-right: 6px;
    padding-left: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.form-control-color {
    padding: 4px;
    height: 42px;
    min-height: 42px;
}

.select-wrapper,
.style-select-wrapper,
.custom-select-box {
    position: relative;
    min-width: 0;
}

.select-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.amenity-border-card,
.attributes-section,
.card-earning,
.invoice-container {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-lg);
    padding: 16px;
    margin-bottom: 16px;
}

.category-header,
.subcategory-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}

.subcategories {
    padding-left: 14px;
}

.earning-title {
    font-size: 12.5px;
    color: var(--c-text-muted);
    font-weight: 600;
}

.earning-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--c-text);
}

.social_part {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social_img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: var(--r-sm);
    border: 1px solid var(--c-border);
}

.invoice-title {
    font-size: 18px;
    font-weight: 800;
}

.invoice-details,
.totals {
    font-size: 13.5px;
}

.badge-pill-login {
    border-radius: var(--r-pill);
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 700;
}

.login-google {
    background: var(--c-info-soft);
    color: #075985;
}

.login-normal {
    background: var(--c-primary-soft);
    color: var(--c-primary-700);
}

@media (max-width: 767.98px) {
    .export-buttons-group,
    .export-buttons-group .btn {
        width: 100%;
    }

    .address-box,
    .image-item {
        flex: 1 1 100%;
    }

    .top-product-item {
        align-items: flex-start;
    }

    /* 📱 Mobile-Friendly Admin Panel Table & Form Fixes */
    .table-responsive {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 1rem !important;
        border-radius: 10px !important;
    }

    table.dataTable, table.custom-modern-table {
        width: 100% !important;
        min-width: 600px !important;
    }

    table.dataTable th, table.dataTable td,
    table.custom-modern-table th, table.custom-modern-table td {
        white-space: nowrap !important;
        padding: 10px 12px !important;
        font-size: 13px !important;
        vertical-align: middle !important;
        display: table-cell !important;
    }

    table.dataTable > tbody > tr {
        display: table-row !important;
    }

    table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
    table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
        display: none !important;
    }

    table.dataTable > tbody > tr.child {
        display: none !important;
    }

    .body-content {
        padding: 12px !important;
    }

    .custom-border-card, .dashboard-card-box {
        padding: 14px !important;
        border-radius: 12px !important;
    }

    .page-top-bar {
        margin-bottom: 16px !important;
    }

    /* Sales Reports Controls */
    .segmented-btn-group {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        width: 100% !important;
        margin-top: 10px !important;
    }
    .segmented-btn {
        flex: 1 1 45% !important;
        text-align: center !important;
        padding: 6px 8px !important;
        font-size: 12px !important;
    }
    .export-buttons-group {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
        margin-top: 10px !important;
    }
    .export-buttons-group .btn-export {
        flex: 1 !important;
    }

    /* Scrollable Tabs */
    .nav-pills {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 6px !important;
    }
    .nav-pills .nav-item {
        flex: 0 0 auto !important;
    }
}

.status-card-clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12) !important;
    border-color: #6366F1 !important;
}
