
/* ==================== Data Grid Enhancements ==================== */
/*
 * Reusable CSS classes for consistent data grid styling across the application
 * Usage: Add these classes to your RadzenDataGrid or container elements
 * 
 * Examples:
 *   - <RadzenDataGrid class="grid-hover">  // Adds hover effects
 *   - <div class="empty-state-container">  // Empty state with dashed border
 *   - <RadzenText class="results-count">  // Results count text
 */

/* Grid hover effect - reusable for any grid with grid-hover class */
.grid-click {
    background-color: #f5f5f5;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.clickable {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* ==================== Reusable Page Header ==================== */
/*
 * Adds an icon bubble + subtitle to any standard page header card.
 *
 * Structure:
 *   <RadzenColumn SizeMD="6">
 *     <div class="page-header-left">
 *       <div class="page-header-icon-wrap">
 *         <RadzenIcon Icon="bar_chart" class="page-header-icon" />
 *       </div>
 *       <div>
 *         <RadzenLabel style="font-size: 24px; font-weight: 900;" Text="Page Title" />
 *         <p class="page-header-subtitle">Short description here</p>
 *       </div>
 *     </div>
 *   </RadzenColumn>
 */

/* Subtle shading card — wrap any standard page header RadzenCard with this class */
.page-header-card {
    background: linear-gradient(to right, #f8fbff, #edf4fc);
    border-left: 4px solid var(--rz-primary);
    margin-bottom: 15px;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(0, 120, 212, 0.14);
    flex-shrink: 0;
}

.page-header-icon {
    font-size: 1.5rem;
    color: var(--rz-primary);
}

.page-header-subtitle {
    margin: 2px 0 0 0;
    color: #5a6a7e;
    font-size: 0.8rem;
    font-weight: 400;
}

/* ==================== Reusable Stat Cards ==================== */
/*
 * Generic KPI / stat card system — use on any dashboard or summary page.
 *
 * Structure:
 *   <RadzenCard class="stat-card stat-card-info">
 *     <ChildContent>
 *       <div class="stat-card-content">
 *         <div class="stat-card-icon-wrap">
 *           <RadzenIcon Icon="groups" class="stat-card-icon" />
 *         </div>
 *         <div class="stat-card-body">
 *           <p class="stat-card-label">My Label</p>
 *           <p class="stat-card-value">42</p>
 *         </div>
 *         <RadzenButton ... class="stat-card-action" />
 *       </div>
 *     </ChildContent>
 *   </RadzenCard>
 *
 * Colour variants: stat-card-info | stat-card-success | stat-card-danger | stat-card-warning | stat-card-primary
 */





.stat-card-info    { border-left-color: #17a2b8; background: #f0fbfc; }
.stat-card-success { border-left-color: #28a745; background: #f2faf4; }
.stat-card-danger  { border-left-color: #dc3545; background: #fdf2f3; }
.stat-card-warning { border-left-color: #e6a817; background: #fffcf0; }
.stat-card-primary { border-left-color: var(--rz-primary); background: #f5f7ff; }

/* Horizontal row — [icon] [label + value grows] [button right] */
.stat-card-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    height: 100%;
}

/* Rounded icon bubble with a soft tinted background */
.stat-card-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-card-info    .stat-card-icon-wrap { background: rgba(23,  162, 184, 0.15); }
.stat-card-success .stat-card-icon-wrap { background: rgba(40,  167,  69, 0.15); }
.stat-card-danger  .stat-card-icon-wrap { background: rgba(220,  53,  69, 0.15); }
.stat-card-warning .stat-card-icon-wrap { background: rgba(230, 168,  23, 0.2);  }
.stat-card-primary .stat-card-icon-wrap { background: rgba(0,   122, 204, 0.15); }

.stat-card-icon { font-size: 1.75rem; }

.stat-card-info    .stat-card-icon { color: #17a2b8; }
.stat-card-success .stat-card-icon { color: #28a745; }
.stat-card-danger  .stat-card-icon { color: #dc3545; }
.stat-card-warning .stat-card-icon { color: #e6a817; }
.stat-card-primary .stat-card-icon { color: var(--rz-primary); }

/* Middle section — grows to fill the space between icon and button */
.stat-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-card-label {
    margin: 0 0 0.2rem 0;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.7px;
}

.stat-card-value {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    color: #212529;
    line-height: 1.2;
}

.stat-card-action {
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
}

/* ==================== Sales Dashboard Styles ==================== */

/* Performance (last/current month) cards */
.sales-performance-card {
    border-top: 3px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.sales-performance-card:hover {
    border-top-color: var(--rz-primary);
}

/* Top clients / inventory cards */
.sales-top-card {
    height: 100%;
}

/* ==================== Sales Commission Styles ==================== */

/* Inline legend strip showing rate brackets in the header card */
.commission-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e9ecef;
}

.commission-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-left: 4px solid transparent;
    border-radius: 7px;
    padding: 0.35rem 0.85rem 0.35rem 0.7rem;
    font-size: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.commission-legend-range {
    color: #343a40;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.commission-legend-rate {
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    min-width: 52px;
    text-align: center;
    letter-spacing: 0.02em;
}

/* Badge used inside the commission rate grid column */
.commission-rate-badge {
    display: inline-block;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    min-width: 52px;
    text-align: center;
}

/* ==================== Home Page Styles ==================== */

/* Inline cost-monitor alert strip */
.home-alert-card {
    border-left: 4px solid var(--rz-danger);
    background: #fdf2f3;
    margin-bottom: 15px;
}

.home-alert-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.home-alert-icon {
    font-size: 1.75rem;
    color: var(--rz-danger);
    flex-shrink: 0;
}

.home-alert-message {
    flex: 1;
    margin: 0.2rem 0 0 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Stat cards used on the home dashboard */
.home-stat-card {
    height: 100%;
    border-top: 3px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.home-stat-card-primary { border-top-color: var(--rz-primary); }
.home-stat-card-info    { border-top-color: #17a2b8; }
.home-stat-card-warning { border-top-color: #e6a817; }
.home-stat-card-success { border-top-color: #28a745; }

/* Card section header: icon bubble + title label */
.home-stat-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.home-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.home-stat-icon-primary { background: rgba(0,   120, 212, 0.1);  color: var(--rz-primary); }
.home-stat-icon-info    { background: rgba(23,  162, 184, 0.15); color: #17a2b8; }
.home-stat-icon-warning { background: rgba(230, 168,  23, 0.15); color: #e6a817; }
.home-stat-icon-success { background: rgba(40,  167,  69, 0.15); color: #28a745; }
.home-stat-icon-danger  { background: rgba(220,  53,  69, 0.15); color: #dc3545; }

.home-stat-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #6c757d;
}

/* Large hero number */
.home-stat-value-large {
    font-size: 2rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
    margin: 0 0 0.1rem 0;
}

.home-stat-sublabel {
    font-size: 0.75rem;
    color: #adb5bd;
    margin: 0 0 0.75rem 0;
}

/* Key-value rows inside a card */
.home-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-top: 1px solid #f8f9fa;
}

.home-stat-label {
    font-size: 0.83rem;
    color: #6c757d;
}

.home-stat-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: #212529;
}

/* Progress bar for targets */
.home-progress-item {
    margin-bottom: 0.65rem;
}

.home-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #6c757d;
    margin-bottom: 0.3rem;
}

.home-progress-track {
    height: 7px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.home-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease, background-color 0.6s ease;
}

/* Attendance summary badges */
.home-attendance-summary {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.home-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.home-badge-warning { background: rgba(230, 168, 23, 0.15); color: #9a6e00; }
.home-badge-danger  { background: rgba(220,  53, 69, 0.15); color: #b02a37; }

.commission-footer-total {
    font-weight: 700;
    color: #212529;
}

/* Rep mismatch highlight — client's default rep in Sage does not match the transaction rep */
.commission-rep-mismatch td {
    background-color: #fde8e8 !important;
    color: #7b1c1c !important;
}

/* Empty state styling - reusable for any empty data view */
.empty-state-container {
    padding: 60px 20px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    text-align: center;
}

.empty-state-icon {
    font-size: 64px;
    color: #ccc;
}

.empty-state-title {
    color: #666;
    margin: 10px 0;
}

.empty-state-description {
    color: #999;
}

/* Loading state styling */
.loading-container {
    padding: 60px 20px;
    text-align: center;
}


/* ==================== CRM Module Styles ==================== */
/* CRM stat cards */
.crm-stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crm-stat-icon {
    font-size: 2.5rem;
}

.crm-stat-icon-primary {
    color: #007bff;
}

.crm-stat-icon-success {
    color: #28a745;
}

.crm-stat-icon-info {
    color: #17a2b8;
}

.crm-stat-icon-warning {
    color: #ffc107;
}

.crm-stat-icon-danger {
    color: #dc3545;
}

.crm-stat-heading {
    margin: 0 !important;
}

.crm-quick-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* CRM status badges with custom colors */
.crm-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    color: white;
    font-weight: 500;
}

/* CRM meeting cards */
.crm-meeting-card {
    border-left: 4px solid #007bff;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
}

.crm-meeting-card:hover {
    background: #e9ecef;
}

    

/* ==================== Brand Page Styles ==================== */
/* Brand statistics card content */
.brand-stat-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-stat-icon {
    font-size: 2.5rem;
}

.brand-stat-icon-primary {
    color: var(--rz-primary);
}

.brand-stat-icon-success {
    color: #28a745;
}

.brand-stat-icon-warning {
    color: #ffc107;
}

.brand-stat-icon-danger {
    color: #dc3545;
}

.brand-stat-heading {
    margin: 0;
    margin-block-end: 0 !important; 
}

/* Brand action buttons container */
.brand-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Brand image display */
.brand-image-display {
    max-height: 30px;
}

.brand-image-large {
    max-height: 100px;
    max-width: 200px;
}

/* Brand form sections */
.brand-form-section {
    width: 100%;
}

.loading-text {
    color: #666;
}

/* Results count text */
.results-count {
    margin-bottom: 10px;
    color: #666;
}

/* Toolbar styling */
.toolbar-container {
    margin-bottom: 15px;
}

/* ==================== PIM Category Tiles ==================== */
/* Simple tile layout matching PimBrands design */
.pim-category-tile-icon {
    font-size: 2.5rem;
    color: var(--rz-primary);
}

.pim-category-tile-heading {
    margin: 0;
}

.pim-category-tile-subtitle {
    /* Uses Radzen TextStyle.Subtitle1 - no additional styles needed */
}

/* ==================== PIM Category Component Styles ==================== */
/* FileUpload customization for PIM Categories */
.rz-fileupload-content.rz-corner-bottom {
    display: none;
}

.rz-multiselect-item {
    padding: 2px !important;
}

    .rz-multiselect-item.rz-state-highlight:after {
        content: unset !important;
    }

.rz-listbox:focus, .rz-listbox:focus-within {

    box-shadow: none;
}

.sync-status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-synced {
    background-color: #28a745;
    color: white;
}

.status-missing {
    background-color: #dc3545;
    color: white;
}

.status-mismatch {
    background-color: #ffc107;
    color: black;
}

/* ==================== Product Page Styles ==================== */
/* Product statistics card content - reuses brand stat classes */
.product-filter-section {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

.product-stat-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==================== Log Grids Formatting ==================== */

.rz-data-grid.log-grid .rz-grid-table td .rz-cell-data {
    font-size: 10px;
}

/* ==================== Button Improvements ==================== */

/* Remove extra margin between adjacent buttons */
.rz-button + .rz-button {
    margin-left: 0;
}

/* ==================== Progress Bar Styling ==================== */

.rz-progressbar-circular {
    color: #007bff;
}

/* ==================== Existing Styles ==================== */

.spinner {
    z-index: 3000;
    border: 16px solid silver;
    border-top: 16px solid #337AB7;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 700ms linear infinite;
    top: 50%;
    left: 45%;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.body-main .content {
    max-width: 1500px;
    margin: auto;
}

.rz-dialog-wrapper .rz-dialog-content {
    overflow: hidden auto;
    padding: 20px 27px 20px 27px;
}

.rz-dialog-wrapper .rz-dialog {
    border-radius: 15px;
}

.rz-chkbox-box {
    border-width: 1px !important; 
}

.count-num {
    height: 60px;
    width: 100%;
}

    .count-num .rz-inputtext {
        font-size: 55px !important;
        text-align: center !important;
        padding-top: 0px !important;
    }

    .count-num .rz-spinner-button {
        width: 42px !important;
        height: 30px !important;
    }

        .count-num .rz-spinner-button .rz-spinner-button-icon {
            font-size: 30px !important;
        }

.count-btn {
    height: 60px !important;
    width: 60px !important;
}

    .count-btn .rz-button-box .rz-button-text, .count-btn .rz-button-box .rz-button-icon-left {
        font-size: 30px;
    }

.calc-btn {
    width: 80px;
    height: 80px;
    font-size: 36px;
    margin: 5px;
    box-shadow: none;
}

.calc-btn-lrg {
    width: 266px;
    height: 80px;
    font-size: 36px;
    margin: 5px;
    box-shadow: none;
}

.calc-btn-clear {
    width: 173px;
    height: 80px;
    font-size: 36px;
    margin: 5px;
    box-shadow: none;
}

.calc-display {
    width: 358px;
    height: 60px;
    font-size: 36px;
    margin: 5px;
}

    .calc-display .rz-inputtext {
        font-size: 36px;
        text-align: right;
        padding-right: 10px;
    }

.calc-symbol {
    display: inline-flex;
    font-size: 21px;
    font-weight: bold;
    position: absolute;
    right: 93px;
    top: 6px;
}

.stfinal-grid .rz-column-title-content, .stfinal-grid span.rz-cell-data {
    font-size: 12px;
}

.attendance-font, .attendance-font .rz-cell-data {
    font-size: 12px !important;
}

.brandsync-image {
    max-height: 54px;
    max-width: 100%;
}

.card-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background-color: var(--rz-base-100);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.card-popup-importproduct {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 90%;
    max-width: 1450px;
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.card-popup-importproduct-image {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .card-popup-importproduct-image .image-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        text-align: center;
    }

    .card-popup-importproduct-image .popup-image {
        max-width: 100%;
        height: auto;
        max-height: calc(100vh - 150px);
        display: block;
    }

    .card-popup-importproduct-image .close-button {
        margin-top: 10px;
        align-self: center;
    }

.row-error, .row-error .rz-cell-data {
    background-color: var(--warning) !important;
}

.psc-green {
    background-color: limegreen !important;
}

.psc-red, .psc-red .rz-cell-data {
    background-color: red !important;
    color: white !important;
}

.psc-yellow {
    background-color: yellow !important;
}

.psc-blue {
    background-color: dodgerblue !important;
}

.price-upload .rz-fileupload-buttonbar {
    padding: 0px 0px 10px 0px !important;
    background-color: transparent !important;
}

.webprice-upload .rz-fileupload-buttonbar {
    padding: 0px 0px 0px 0px !important;
    background-color: transparent !important;
}

.price-upload .rz-fileupload-buttonbar .rz-button {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    height: auto;
    line-height: 1.25rem;
    min-height: 2.5rem;
    min-width: 2.5rem;
    letter-spacing: normal;
}

.rz-textbox:not([readonly]) {
    background-color: #ffffff;
}

.rz-dropdown:not([readonly]) {
    background-color: #ffffff;
}

.rz-message.rz-messages-error.rz-message-popup {
    position: static !important;
    margin-bottom: 10px;
}

.rz-notification-message.rz-growl {
    width: unset !important;
    max-width: 500px !important;
}

.grid-no-header > .rz-data-grid-data > .rz-grid-table > thead {
    display: none;
}

.rz-tree-toggler.rzi-caret-right:before {
    content: "chevron_right";
    margin-left: -0.125rem;
}

.rz-tree-toggler.rzi-caret-right:before {
    margin-left: 0 !important;
}

.rz-tree-toggler.rzi-caret-down:before {
    content: "expand_more";
    margin-left: -0.125rem;
}

.rz-tree-toggler.rzi-caret-down:before {
    margin-left: 0 !important;
}

.rz-dialog-confirm .rz-dialog-content .rz-dialog-confirm-message {
    white-space: pre-wrap !important;
}

.rz-dialog-alert .rz-dialog-content .rz-dialog-alert-message {
    white-space: pre-wrap !important;
}

.rz-dialog-confirm, .rz-dialog-alert {
    max-width: 600px;
}

.wrap .rz-listbox-list-wrapper .rz-listbox-list {
    display: flex;
    flex-wrap: wrap;
    background: white;
    align-items: flex-start !important;
}

.scroll .rz-listbox-list-wrapper .rz-listbox-list {
    display: flex;
    background: white;
    align-items: flex-start !important;
    overflow-x: auto;
    scroll-behavior: smooth;
    width: 100%;
}

.product-thumbnail {
    max-width: 50px;
    max-height: 50px;
}

.product-thumbnail-container {
    background-color: #ffffff;
    display: inline-block;
    height: 74px;
    padding-bottom: 5px;
    padding-left: 5px;
    padding-right: 5px;
    padding-top: 5px;
    text-align: center;
    vertical-align: middle;
    width: 74px
}

.rz-data-grid.wrappre .rz-data-grid-data .rz-grid-table .rz-data-row .rz-cell-data {
    white-space: pre-wrap;
}

.rz-data-grid.wrapnorm .rz-data-grid-data .rz-grid-table .rz-data-row .rz-cell-data {
    white-space: normal;
}

.rz-datalist-content.rz-density-compact > .rz-datalist-data > li {
    padding: 0.5rem;
}

.rz-datalist-content.rz-density-compact > .rz-datalist-data {
    padding: 5px;
}

.rz-notification-item-wrapper {
    width: 100%;
    max-width: 600px;
}

.rz-custom-header {
    width: 100%;
}

/*optgroup Dashboard Styles*/
.dashboard-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

    .dashboard-card:hover {
        box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    }

.alert-metric {
    background: linear-gradient(135deg, var(--start-color), var(--end-color));
    color: white;
    padding: 28px;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

    .alert-metric::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    }

.metric-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin: 12px 0;
}

.metric-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.95;
    font-weight: 600;
}

.metric-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 8px;
}

.priority-critical {
    border-left: 5px solid #dc3545;
    background: #fff5f5;
}

.priority-high {
    border-left: 5px solid #ffc107;
    background: #fffbf0;
}

.priority-normal {
    border-left: 5px solid #28a745;
    background: #f0fff4;
}

.stat-card {
    background: white;

    padding: 15px;
    border: 1px solid #e9ecef;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.2;
    position: absolute;
    right: 16px;
    top: 16px;
}

.section-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-urgent {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.performance-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.perf-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.perf-label {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.perf-change {
    font-size: 0.8rem;
    margin-top: 4px;
}

.days-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Permission Grid Styles */
.permission-grid-container {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--rz-grid-border-color, #dee2e6);
    background: var(--rz-grid-background-color, #fff);
}

.permission-grid-header {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 2px solid var(--rz-primary);
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--rz-grid-header-background-color, #f8f9fa);
}

/* ==================== Unauthorized Page Styles ==================== */
/* Modern, clean design for access denied page */

.unauthorized-container {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(220, 53, 69, 0.05) 100%);
    min-height: 100%;
}

.unauthorized-card {
    text-align: center;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    border: none;
    background: white;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

    .unauthorized-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, #007bff 0%, #dc3545 100%);
    }

.unauthorized-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.unauthorized-icon-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(220, 53, 69, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 30px rgba(220, 53, 69, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 40px rgba(220, 53, 69, 0.4);
    }
}

.unauthorized-icon {
    font-size: 3.5rem;
    color: white;
}

.unauthorized-title {
    margin: 0;
    margin-bottom: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.unauthorized-subtitle {
    margin: 0;
    color: #6c757d;
    font-weight: 400;
}

.unauthorized-url-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 0.9rem;
    max-width: 100%;
    overflow-x: auto;
}

.unauthorized-url-code {
    background: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    margin-left: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #dc3545;
    border: 1px solid #dee2e6;
    white-space: nowrap;
}

.unauthorized-button {
    width: 100%;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

    .unauthorized-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    .unauthorized-button:active {
        transform: translateY(0);
    }

.unauthorized-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: #6c757d;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
}

    .unauthorized-footer span {
        vertical-align: middle;
    }

/* ==================== Import Batch Lines Styles ==================== */

.batch-line-onoff {
    padding-top: 1px;
    width: 32px;
    height: 15px;
}

.rz-fileupload-buttonbar {
    background-color: unset !important;
    padding: 0px;
}



/* ==================== Product Import Exceptions Sheet ==================== */
.pim-exceptions-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.5rem;
    column-gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.pim-exceptions-hint {
    font-size: 12px;
    color: #6c757d;
    margin-left: 0.25rem;
}

.pim-exceptions-scroll {
    max-height: 520px;
    overflow-y: auto;
    padding-right: 2px;
}

.pim-exceptions-card {
    margin-bottom: 0.6rem;
    border-left: 3px solid #0d6efd;
}

.pim-exceptions-excluded {
    opacity: 0.45;
    border-left: 3px solid #adb5bd;
}

.pim-exceptions-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pim-exceptions-exclude-check {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding-top: 2px;
}

.pim-exceptions-card-titles {
    flex: 1;
    font-size: 13px;
    line-height: 1.6;
}

.pim-exceptions-meta {
    font-size: 11px;
    color: #6c757d;
    margin-left: 0.4rem;
}

.pim-exceptions-field-actions {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

.pim-exceptions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.pim-exceptions-table th {
    background: #f1f3f5;
    padding: 5px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
}

.pim-exceptions-table td {
    padding: 4px 8px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
}

.pim-exceptions-old-value {
    color: #dc3545;
    font-family: 'Courier New', Courier, monospace;
}

.pim-exceptions-new-value {
    color: #198754;
    font-family: 'Courier New', Courier, monospace;
}

.pim-exceptions-row-skip td {
    opacity: 0.45;
    text-decoration: line-through;
}

.pim-exceptions-row-skip td:last-child {
    text-decoration: none;
    opacity: 1;
}

.pim-exceptions-empty {
    text-align: center;
    padding: 2.5rem;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

/* ==================== Import Batch Empty State ==================== */
.import-batch-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    min-height: 300px;
}

@media (max-width: 768px) {
    .unauthorized-card {
        padding: 2rem 1.5rem;
    }

    .unauthorized-icon-circle {
        width: 100px;
        height: 100px;
    }

    .unauthorized-icon {
        font-size: 3rem;
    }

    .unauthorized-url-badge {
        flex-direction: column;
        text-align: center;
    }

    .unauthorized-url-code {
        margin-left: 0;
        margin-top: 0.5rem;
        max-width: 100%;
        overflow-x: auto;
    }
}


.permission-grid-header-label {
    flex: 1;
    min-width: 200px;
    padding-left: 0.25rem;
    overflow: hidden;
}

    .permission-grid-header-label > p {
        margin: 0px;
        font-weight: 600;
    }

.permission-grid-header-actions {
    display: flex;
    gap: 2rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.permission-grid-header-action {
    min-width: 70px;
    width: 70px;
    text-align: center;
    font-weight: 600;
    flex-shrink: 0;
}

    .permission-grid-header-action > p {
        margin: 0px;
        font-weight: 600;
    }

/* ==================== Profile Page Styles ==================== */
/* Profile page readonly sections for rep codes and sales areas */
.profile-no-data {
    color: #999;
    font-style: italic;
}

/* Permission Tree Node Styles */
.permission-node {
    margin-bottom: 0;
}

.permission-parent-node {
    border-bottom: 1px solid var(--rz-grid-border-color, #dee2e6);
    background: var(--rz-grid-row-background-color, #fff);
}

    .permission-parent-node:hover {
        background: var(--rz-grid-row-hover-background-color, #f5f5f5);
    }

.permission-parent-content {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.permission-parent-label {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    overflow: hidden;
}

.permission-parent-actions {
    display: flex;
    gap: 2rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.permission-action-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    flex-shrink: 0;
}

/* Leaf Node Styles */
.permission-leaf-node {
    border-bottom: 1px solid var(--rz-grid-border-color, #dee2e6);
    background: var(--rz-grid-row-background-color, #fff);
}

    .permission-leaf-node:hover {
        background: var(--rz-grid-row-hover-background-color, #f5f5f5);
    }

.permission-leaf-content {
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.permission-leaf-label {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    padding-left: 5px;
}

.permission-leaf-actions {
    display: flex;
    gap: 2rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

/* Icons */
.permission-folder-icon {
    color: var(--rz-warning);
    font-size: 18px;
}

.permission-security-icon {
    color: var(--rz-info);
    font-size: 16px;
}

/* Expand Button */
.permission-expand-button {
    padding: 0;
    min-width: 24px;
}

/* Text Styles */
.permission-label-text {
    margin: 0;
    font-weight: 500;
}

.permission-leaf-label-text {
    margin: 0;
}

/* Button Spacing */
.action-buttons-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
    margin-left: auto;
    flex: 0 0 auto;
}



/* ==================== Dashboard Product Cards ==================== */
/* Hover effect for clickable product cards */
.rz-card:has([style*='cursor: pointer']) .rz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--rz-primary-lighter) !important;
}


/* ==================== Product Import Lines UI ==================== */

/* Stat Card Active State (when filter is ON) */
.stat-card-active {
    border-left-width: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Stat Card Clickable */
.stat-card-clickable {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ── Armadillo Stepper ── */
.armadillo-stepper {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    height: 30px;
}

.armadillo-step {
    position: relative;
    flex: 1;
    height: 30px;
    border-radius: 50px;
    /* Pull each pill left by 30px — enough to bite well into the previous
       pill's body past the cap, giving the real armadillo scale look */
    margin-left: -40px;
    cursor: default;
    transition: filter 0.2s;
    min-width: 0;
}

.armadillo-step:first-child {
    margin-left: 0;
}

/* Icon/content container — absolutely centred across the FULL pill width
   (including the bitten-into portion) exactly as the banking app does it */
.armadillo-step-icon {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    margin: auto;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    color: white;
    pointer-events: none;
}

/* Done — green */
.armadillo-step-done {
    background: #4caf8a;
    border: 1px solid #3a9c78;
}

/* Active — primary colour */
.armadillo-step-active {
    background: #4a90d9;
    box-shadow: 0 2px 14px rgba(74, 144, 217, 0.4);
    border: 1px solid #3a7fc1;
}

/* Pending — light grey */
.armadillo-step-pending {
    background: var(--rz-base-50);
    border: 1px solid var(--rz-base-300);
}

.armadillo-step-pending .armadillo-step-icon {
    color: #adb5bd;
}

.armadillo-icon {
    font-size: 18px !important;
    line-height: 1 !important;
    display: block;
}

.armadillo-label {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95px;
}

/* Grid Status Icons */
.import-grid-status-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.import-grid-status-icon-error {
    color: #dc3545;
}

.import-grid-status-icon-warning {
    color: #e6a817;
}

.import-grid-status-icon-ok {
    color: #28a745;
}


/* -- Price List Catalogue ----------------------------------------------- */
.pricelist-catalogue-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 0.5rem 0;
}

.pricelist-catalogue-tile {
    background: var(--rz-base-background-color);
    border: 1px solid var(--rz-border-color);
    border-radius: 8px;
    width: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.pricelist-catalogue-tile:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.pricelist-catalogue-tile-img-wrap {
    background: var(--rz-base-300);
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pricelist-catalogue-tile-img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    padding: 8px;
}

.pricelist-catalogue-tile-noimg {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricelist-catalogue-tile-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.pricelist-catalogue-tile-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--rz-text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pricelist-catalogue-tile-code {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
}

.pricelist-catalogue-tile-brand {
    font-size: 0.75rem;
    color: var(--rz-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.pricelist-catalogue-tile-category {
    font-size: 0.7rem;
    color: var(--rz-text-secondary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pricelist-catalogue-tile-packsize {
    font-size: 0.7rem;
    color: var(--rz-text-secondary-color);
}

.pricelist-catalogue-tile-price {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--rz-border-color);
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.pricelist-catalogue-tile-price-excl {
    font-size: 0.75rem;
    color: var(--rz-text-secondary-color);
}

.pricelist-catalogue-tile-price-incl {
    font-size: 1rem;
    font-weight: 800;
    color: var(--rz-success);
}

.pricelist-catalogue-empty {
    text-align: center;
    padding: 3rem;
    color: var(--rz-text-secondary-color);
}

.pricelist-catalogue-tile-brandlogo {
    height: 30px;
    width: auto;
    max-width: 70px;
    object-fit: contain;
    flex-shrink: 0;
}

/* PIM vs OPT Comparison */
.pim-opt-diff-cell {
    background-color: #fff3cd;
    border-left: 3px solid #e6a817;
    padding: 2px 6px;
    border-radius: 3px;
}

.pim-opt-diff-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.pim-opt-diff-tag {
    background-color: #e6a817;
    color: #fff;
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.pim-opt-diff-badge {
    background-color: #fff3cd;
    border-left: 3px solid #e6a817;
    padding: 1px 8px;
    border-radius: 3px;
    font-weight: 600;
}

.pim-opt-legend {
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color);
    margin-bottom: 0.75rem;
}

.pim-opt-orphan-info {
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 10px 14px;
    font-size: 0.9rem;
}

.pim-opt-orphan-pimid {
    font-weight: 700;
    color: #dc3545;
}


/* -- PIM Sidebar Alert Badges ------------------------------------------------ */
.pim-menu-item-wrap {
    position: relative;
    display: block;
}

.pim-alert-badge {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background-color: #dc3545;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
    animation: pim-badge-pop 0.25s ease-out;
}

@keyframes pim-badge-pop {
    from { transform: translateY(-50%) scale(0.6); opacity: 0; }
    to   { transform: translateY(-50%) scale(1);   opacity: 1; }
}
