html,
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

a,
.btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 0.3rem !important;
    padding-left: 0rem !important;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #dc3545 !important;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

.position-relative .validation-message {
    position: absolute;
    top: 100%;
    left: 0;
    white-space: nowrap;
    z-index: 10;
    font-size: 0.75rem;
    margin-top: 2px;
}

/* =============================================
   Grade Color Dropdown - Dedicated Custom Class
   ============================================= */
.grade-color-dropdown-select.e-input-group {
    padding-left: 4px !important;
    height: 36px !important;
}

.grade-color-dropdown-select .e-input-value,
.grade-color-dropdown-select input.e-input {
    display: flex !important;
    align-items: center !important;
    padding-left: 2px !important;
}

.grade-color-val {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    vertical-align: middle;
    line-height: 1;
    margin-left: 4px;
}

.grade-color-swatch-val {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    display: inline-block;
    flex-shrink: 0;
}

.grade-color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    width: 100%;
}

.grade-color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    display: inline-block;
    flex-shrink: 0;
}

.grade-color-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary, #1e293b);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =============================================
   Global Grid Action Buttons - Common for all forms
   ============================================= */
.btn-light-primary {
    background: #f0f7ff;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    transition: background 0.2s ease;
}

    .btn-light-primary:hover {
        background: #dbeafe;
    }

.btn-light-danger {
    background: #fff5f5;
    border: none;
    border-radius: 6px;
    padding: 4px 8px;
    transition: background 0.2s ease;
}

    .btn-light-danger:hover {
        background: #fee2e2;
    }

/* Status Badge */
.grid-badge {
    padding: 0.35em 0.75em;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.78rem;
}

/* =============================================
   ERP Card System - Dark/Light Mode Compatible
   ============================================= */
.erp-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--theme-transition);
}

.erp-card-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    transition: var(--theme-transition);
}

.erp-card-body {
    background-color: var(--bg-primary);
    padding: 1.25rem;
    transition: var(--theme-transition);
}

.erp-card-footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    transition: var(--theme-transition);
}

/* Section title inside form */
.erp-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

/* Form labels - theme aware */
.erp-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

/* Status Badges */
.erp-status-badge {
    padding: 0.3em 0.75em;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

    .erp-status-badge.badge-active {
        background-color: rgba(16, 185, 129, 0.15);
        color: #10b981;
    }

    .erp-status-badge.badge-inactive {
        background-color: rgba(239, 68, 68, 0.15);
        color: #ef4444;
    }

/* Dark mode overrides for action buttons */
[data-theme="dark"] .btn-light-primary {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa !important;
}

    [data-theme="dark"] .btn-light-primary:hover {
        background: rgba(96, 165, 250, 0.25);
    }

[data-theme="dark"] .btn-light-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171 !important;
}

    [data-theme="dark"] .btn-light-danger:hover {
        background: rgba(239, 68, 68, 0.25);
    }

/* =============================================
   Uniform Input - All Syncfusion Controls (Height removed for Floating Labels)
   ============================================= */

/* Inner input element padding/font fix */
.e-outline .e-input,
.e-outline.e-input-group .e-input,
.e-outline.e-input-group.e-control-wrapper .e-input {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    line-height: normal !important;
    font-size: 13px !important;
    vertical-align: middle !important;
}

/* DropDown arrow icon - vertically centered */
.e-outline.e-ddl .e-input-group-icon,
.e-outline.e-ddl .e-ddl-icon {
    width: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* NumericTextBox spin buttons - center */
.e-outline .e-spin-up,
.e-outline .e-spin-down {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive: stack form cols on mobile */
@media (max-width: 767px) {
    .erp-card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    .erp-card-footer {
        flex-direction: column;
    }

        .erp-card-footer .e-btn {
            width: 100%;
            justify-content: center;
        }
}


/*setting page css*/

.settings-container {
    padding: 0px;
    padding: 0.3rem;
}

.settings-card {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.tab-pane {
    padding: 16px;
}

.settings-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.settings-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

    .settings-option:last-of-type {
        border-bottom: none;
    }

.option-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.option-desc {
    font-size: 13px;
    color: var(--text-tertiary);
}

.settings-footer {
    padding: 20px 32px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Syncfusion Tab Styling Overrides */
::deep .e-tab .e-tab-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

    ::deep .e-tab .e-tab-header .e-toolbar-item .e-tab-text {
        font-weight: 600 !important;
        font-size: 14px !important;
    }

.color-grid-settings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 16px;
    margin: 20px 0 32px 0;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.color-option-settings {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

    .color-option-settings:hover {
        transform: translateY(-2px);
    }

.color-circle-settings {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.color-option-settings.selected .color-circle-settings {
    border-color: #fff;
    box-shadow: 0 0 0 4px var(--primary-color), 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.color-circle-settings i {
    color: white;
    font-size: 24px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.color-name-settings {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/*settings.razor style*/

.custom-picker-section {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px dashed var(--border-color);
}

.picker-wrapper {
    flex-shrink: 0;
}

.picker-preview-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 2rem;
    border-left: 1px solid var(--border-color);
}

.preview-circle {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    transition: all 0.3s ease;
}

.preview-info {
    display: flex;
    flex-direction: column;
}

.preview-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-hex {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.layout-toggle-container {
    display: flex;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 10px;
    gap: 4px;
}

.layout-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-secondary);
}

    .layout-btn.active {
        background: var(--primary-color);
        color: white;
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    }

    .layout-btn:hover:not(.active) {
        background: var(--border-color);
    }

.rotate-center {
    animation: rotate-center 0.6s ease-in-out both;
}

@@keyframes rotate-center {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== Account Form Section Styles ===== */
.erp-form-section {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.erp-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.erp-section-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.erp-section-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.erp-section-body {
    padding: 16px;
    background: var(--bg-primary);
}

/* Disabled section */
.erp-section-disabled {
    opacity: 0.55;
    pointer-events: none;
}

/* Contact Person Card */
.contact-person-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.contact-person-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.contact-person-body {
    padding: 12px;
    background: var(--bg-primary);
}

/* ===== Sticky Footer ===== */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 260px;
    right: 10px;
    height: 55px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Usually buttons are on the right */
    padding: 0 20px;
    gap: 8px; /* Reduced gap */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 999; /* Higher z-index to stay above everything */
}

/* Sidebar collapsed state (handled in MainLayout) */
.sidebar-collapsed ~ * .sticky-footer,
.sidebar.collapsed ~ * .sticky-footer {
    left: 70px;
}

@media (max-width: 767.98px) {
    .sticky-footer {
        left: 0 !important;
        right: 10px !important;
        padding: 10px 16px !important;
        height: auto;
        min-height: 50px;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

        .sticky-footer .d-flex {
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 6px !important;
            width: 100%;
        }

        .sticky-footer .e-btn {
            font-size: 14px;
            padding: 6px 12px;
            margin-right: 0 !important;
        }
}

/* Make inputs inside tolerances grid compact */
.spec-table-container {
    background-color: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

.table-sm-custom th,
.table-sm-custom td {
    padding: 4px 6px !important;
    vertical-align: middle !important;
    border-color: var(--border-color) !important;
}

.table-sm-custom {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

    .table-sm-custom td {
        background-color: var(--bg-primary) !important;
        color: var(--text-primary) !important;
    }

    .table-sm-custom.table-hover tbody tr:hover td {
        background-color: var(--bg-hover) !important;
    }

    /* Decrease height and padding of Syncfusion DropDownLists and TextBoxes in the table */
    .table-sm-custom .e-input-group.e-small,
    .table-sm-custom .e-input-group.e-control-wrapper.e-small,
    .table-sm-custom .e-ddl.e-input-group.e-small {
        height: 28px !important;
        min-height: 28px !important;
        background-color: var(--input-bg) !important;
        border-color: var(--input-border) !important;
    }

        .table-sm-custom .e-input-group.e-small .e-input,
        .table-sm-custom .e-input-group.e-control-wrapper.e-small .e-input,
        .table-sm-custom .e-ddl.e-input-group.e-small .e-input {
            height: 26px !important;
            min-height: 26px !important;
            font-size: 12px !important;
            padding: 0 4px !important;
            color: var(--text-primary) !important;
            background-color: transparent !important;
        }

    /* Adjust dropdown arrow icons for compact layout */
    .table-sm-custom .e-input-group-icon {
        min-height: 26px !important;
        height: 26px !important;
        width: 24px !important;
        font-size: 10px !important;
        color: var(--text-secondary) !important;
        background-color: transparent !important;
        border-left: 1px solid var(--input-border) !important;
    }

    /* Compact numerical textbox controls */
    .table-sm-custom .e-numeric.e-input-group.e-small {
        height: 28px !important;
        min-height: 28px !important;
    }

    /* Actions button compacting */
    .table-sm-custom .e-btn.e-small.e-danger {
        height: 26px !important;
        width: 30px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
    }

        .table-sm-custom .e-btn.e-small.e-danger i {
            font-size: 12px !important;
        }

    /* Actions outline button compact styling */
    .table-sm-custom .e-btn.e-small.e-outline {
        height: 26px !important;
        width: 30px !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        line-height: 1 !important;
        background-color: var(--bg-primary) !important;
        border-color: var(--input-border) !important;
        color: var(--text-primary) !important;
    }

        .table-sm-custom .e-btn.e-small.e-outline:hover {
            background-color: var(--bg-hover) !important;
        }

    .table-sm-custom th {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: var(--text-primary) !important;
        padding: 6px 6px !important;
        background-color: var(--bg-tertiary) !important;
        border-color: var(--border-color) !important;
    }


/* Status Badges */
.status-badge-active,
.badge-success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
    padding: 2px 10px !important;
    border-radius: 9999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
}

.status-badge-inactive,
.badge-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
    padding: 2px 10px !important;
    border-radius: 9999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
}

/* Right-align all numeric input values globally */
.e-numeric input {
    text-align: right !important;
}

/* Force single-line text inputs to uppercase, strictly excluding textareas and remarks */
input[type="text"],
input[type="password"],
input:not([type]),
input.e-input:not(.e-numerictextbox) {
    text-transform: uppercase;
}

/* Ensure all textareas, remarks and comments are never forced to uppercase (allows μ, °, etc.) */
textarea,
textarea.e-input,
textarea.e-textbox,
.e-input-group textarea,
.e-control-wrapper textarea,
.e-outline textarea,
[name*="remark" i],
[id*="remark" i],
[class*="remark" i],
[placeholder*="remark" i] {
    text-transform: none !important;
}

.badge-warning {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
    padding: 2px 10px !important;
    border-radius: 9999px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
}

/* Rectangular Stat Boxes & Buttons for U-Bend Section (Square style like Save/Cancel buttons) */
.ubend-stat-box {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 4px !important;
    line-height: 1.4;
    white-space: nowrap;
    border: 1px solid transparent;
}

    .ubend-stat-box.stat-primary {
        background-color: var(--primary-color, #d36100) !important;
        color: #ffffff !important;
        border-color: var(--primary-color, #d36100) !important;
    }

    .ubend-stat-box.stat-success {
        background-color: #198754 !important;
        color: #ffffff !important;
        border-color: #198754 !important;
    }

    .ubend-stat-box.stat-warning {
        background-color: #ffc107 !important;
        color: #000000 !important;
        border-color: #ffc107 !important;
    }

.ubend-btn-add {
    font-size: 0.82rem !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.ubend-btn-delete {
    font-size: 0.82rem !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

/* Quick Add Button & Icon alignment styles */
.quick-add-btn {
    height: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 0 !important;
    border-radius: 4px !important;
}

    .quick-add-btn i {
        font-size: 16px !important;
        line-height: 1 !important;
    }

/* Specific GSTIN Validation Red Outline and Text WITH Notch Cutout Fix */
.gstin-invalid-field.e-input-group,
.gstin-invalid-field.e-float-input,
.gstin-invalid-field.e-control-wrapper {
    border-color: #dc3545 !important;
}

/* Notch gap: make top container border transparent when label is floating */
.gstin-invalid-field.e-outline.e-input-group.e-completed,
.gstin-invalid-field.e-outline.e-float-input.e-completed,
.gstin-invalid-field.e-outline.e-input-group.e-valid-input,
.gstin-invalid-field.e-outline.e-float-input.e-valid-input,
.gstin-invalid-field.e-outline.e-input-group.e-input-focus,
.gstin-invalid-field.e-outline.e-float-input.e-input-focus,
.gstin-invalid-field.e-outline.e-input-group:has(.e-label-top),
.gstin-invalid-field.e-outline.e-float-input:has(.e-label-top) {
    border-top-color: transparent !important;
}

/* Top red border segments on pseudo-elements around notch */
.gstin-invalid-field .e-float-text::before,
.gstin-invalid-field .e-float-text::after,
.gstin-invalid-field .e-float-text.e-label-top::before,
.gstin-invalid-field .e-float-text.e-label-top::after {
    border-top-color: #dc3545 !important;
}

.gstin-invalid-field .e-float-text,
.gstin-invalid-field .e-float-text.e-label-top {
    color: #dc3545 !important;
}

.gstin-error-msg {
    color: #dc3545 !important;
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    font-weight: 600;
    display: block;
}

@@media (min-width: 768px) {
    .marking-responsive-box {
        width: calc(200% + 0.5rem) !important;
        min-width: calc(200% + 0.5rem) !important;
    }

    .supp-test-responsive-box {
        margin-top: 76px !important;
    }
}

/* Revision Plus Button Styling & Alignment */
.rev-add-btn {
    height: 36px;
    width: 28px;
    min-width: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--primary-color, #c2185b) !important;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    align-self: flex-end;
    margin-bottom: 2px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

    .rev-add-btn:hover,
    .rev-add-btn:focus,
    .rev-add-btn:active {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: var(--primary-color, #c2185b) !important;
        transform: scale(1.2);
        opacity: 0.85;
    }

/* Compact Table Row Height for Supplementary Test Charges Modal */
.supp-test-table th,
.supp-test-table td {
    padding: 2px 8px !important;
    vertical-align: middle !important;
}

.supp-test-table .e-numeric {
    height: 28px !important;
    min-height: 28px !important;
}

    .supp-test-table .e-numeric .e-input {
        height: 26px !important;
        min-height: 26px !important;
        padding: 0 8px !important;
        font-size: 0.8rem !important;
    }



.store-indent-page .req-found-badge {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border: 1px solid #a3cfbb !important;
    border-radius: 12px !important;
    padding: 4px 12px !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    display: inline-flex;
    align-items: center;
}

.store-indent-page .btn-soft-primary {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    padding: 5px 12px !important;
    font-size: 0.82rem !important;
}

    .store-indent-page .btn-soft-primary:hover {
        background-color: #0284c7 !important;
        color: #ffffff !important;
    }

.store-indent-page .btn-soft-success {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border: 1px solid #a3cfbb !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    padding: 5px 14px !important;
    font-size: 0.82rem !important;
}

    .store-indent-page .btn-soft-success:hover {
        background-color: #198754 !important;
        color: #ffffff !important;
    }

.store-indent-page .btn-soft-danger {
    background-color: #f8d7da !important;
    color: #842029 !important;
    border: 1px solid #f5c2c7 !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    padding: 5px 12px !important;
    font-size: 0.82rem !important;
}

    .store-indent-page .btn-soft-danger:hover {
        background-color: #dc3545 !important;
        color: #ffffff !important;
    }

.store-indent-page .custom-table-header {
    background-color: #f8fafc !important;
    color: #334155 !important;
    font-weight: 600 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    font-size: 0.82rem !important;
}

.store-indent-page .status-pill-pending {
    background-color: #fff3cd !important;
    color: #664d03 !important;
    border: 1px solid #ffecb5 !important;
    border-radius: 12px !important;
    padding: 3px 10px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
}

.store-indent-page .status-pill-approved {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border: 1px solid #a3cfbb !important;
    border-radius: 12px !important;
    padding: 3px 10px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
}

.store-indent-page .status-pill-rejected {
    background-color: #f8d7da !important;
    color: #842029 !important;
    border: 1px solid #f5c2c7 !important;
    border-radius: 12px !important;
    padding: 3px 10px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
}

.store-indent-page .status-pill-active {
    background-color: #cff4fc !important;
    color: #055160 !important;
    border: 1px solid #b6effb !important;
    border-radius: 12px !important;
    padding: 3px 10px !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
}


.compact-grid-input .e-control-wrapper.e-small,
.compact-grid-input .e-input-group.e-small {
    height: 28px !important;
    min-height: 28px !important;
}

.compact-grid-input .e-input-group input.e-input,
.compact-grid-input .e-control-wrapper input.e-input {
    height: 26px !important;
    font-size: 0.78rem !important;
    padding-top: 1px !important;
    padding-bottom: 1px !important;
}

.compact-grid-input .e-input-group-icon {
    min-height: 26px !important;
    height: 26px !important;
    line-height: 26px !important;
    font-size: 0.75rem !important;
}

.compact-table td {
    padding: 2px 4px !important;
}

.compact-uploader .e-file-drop {
    display: none !important;
}

.compact-uploader .e-upload {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
}

.compact-uploader .e-file-select-wrap {
    padding: 0 !important;
    margin: 0 !important;
}

.compact-uploader .e-btn {
    background-color: transparent !important;
    border: 1px solid var(--bs-primary, #0d6efd) !important;
    color: var(--bs-primary, #0d6efd) !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
    height: 28px !important;
    line-height: 1 !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

    .compact-uploader .e-btn:hover {
        background-color: var(--bs-primary, #0d6efd) !important;
        color: #ffffff !important;
    }


.vp-icon-btn {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

    .vp-icon-btn:hover,
    .vp-icon-btn:focus,
    .vp-icon-btn:active {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        color: #198754 !important;
        opacity: 0.75;
    }


.stk-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #198754;
    background-color: transparent;
    color: #198754;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    outline: none;
}

    .stk-action-btn:hover,
    .stk-action-btn.selected,
    .stk-action-btn.selected:hover {
        background-color: rgba(25, 135, 84, 0.2) !important;
        color: #198754 !important;
        border-color: #198754 !important;
        box-shadow: none !important;
        transform: scale(1.05);
    }

.specs-grid-wrapper {
    height: 300px !important;
    max-height: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden !important;
}

.specs-grid-wrapper .grid-container {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
}

.specs-grid-wrapper .grid-header {
    flex: 0 0 auto !important;
    padding: 8px 12px !important;
}

.specs-grid-wrapper .e-grid {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: none !important;
}

.specs-grid-wrapper .e-gridheader {
    flex: 0 0 auto !important;
    overflow: hidden !important;
}

.specs-grid-wrapper .e-gridcontent {
    flex: 1 1 auto !important;
    height: 200px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.specs-grid-wrapper .e-content {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.specs-grid-wrapper .e-gridcontent table,
.specs-grid-wrapper .e-content table {
    margin-bottom: 0 !important;
}

.specs-grid-wrapper .e-gridpager {
    display: none !important;
}

/* =========================================================================
   Minimal Clean Print Preview Dialog (Sales Order)
   ========================================================================= */
.so-print-glass-dialog.e-dialog {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
    background: #ffffff !important;
}

.so-print-glass-dialog .e-dlg-header-content {
    padding: 12px 16px 10px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
}

.so-print-glass-dialog .e-dlg-content {
    padding: 12px 16px 16px 16px !important;
    background: #ffffff !important;
}

.so-print-glass-dialog .e-btn.e-dlg-closeicon-btn {
    top: 10px !important;
    right: 10px !important;
    width: 26px !important;
    height: 26px !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #64748b !important;
    transition: background-color 0.15s ease !important;
}

.so-print-glass-dialog .e-btn.e-dlg-closeicon-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.print-dialog-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.print-dialog-header-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}

.print-dialog-header-sub {
    margin-top: 2px;
}

.order-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.so-print-card-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.so-print-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.so-print-card:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* 1. Contract Review */
.so-print-card.card-indigo .card-icon-wrap {
    background: #eef2ff;
    color: #4f46e5;
}

.so-print-card.card-indigo:hover {
    background: #f5f7ff;
    border-color: #c7d2fe;
}

/* 2. Work Order */
.so-print-card.card-cyan .card-icon-wrap {
    background: #ecfeff;
    color: #0891b2;
}

.so-print-card.card-cyan:hover {
    background: #f0fdfa;
    border-color: #a5f3fc;
}

/* 3. FluidTeq Annexure */
.so-print-card.card-emerald .card-icon-wrap {
    background: #ecfdf5;
    color: #059669;
}

.so-print-card.card-emerald:hover {
    background: #f0fdf4;
    border-color: #a7f3d0;
}

.card-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.card-text-wrap {
    flex: 1;
    min-width: 0;
}

.card-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
    margin-bottom: 1px;
}

.card-subheading {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.2;
}

.card-arrow-wrap {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* ===== Job Work Planning ===== */
.source-cell {
    background-color: #f8fafc !important;
    color: #334155 !important;
}

.border-end-2 {
    border-right: 2px solid #93c5fd !important;
}

.kpi-card {
    transition: all 0.2s ease-in-out;
}

.kpi-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.kpi-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-val {
    font-size: 0.88rem;
}

.btn-xs {
    padding: 2px 6px;
    font-size: 0.75rem;
    line-height: 1.2;
    border-radius: 4px;
}

/* ========================================================================= */
/* APPROVAL PROGRESS STEPPER / TRACKER (Grid and Details)                   */
/* ========================================================================= */
.approval-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2px 0;
    width: 100%;
    user-select: none;
}

.stepper-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    cursor: default;
    min-width: 44px;
    text-align: center;
}

.stepper-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stepper-node.step-completed .stepper-circle {
    border: 2px solid #28a745;
    color: #28a745;
    background-color: #ffffff;
}

.stepper-node.step-rejected .stepper-circle {
    border: 2px solid #dc3545;
    color: #dc3545;
    background-color: #ffffff;
}

.stepper-node.step-pending .stepper-circle {
    border: 2px solid #ced4da;
    color: #adb5bd;
    background-color: #f8f9fa;
}

.stepper-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: #ced4da;
    display: inline-block;
}

.stepper-title {
    font-size: 0.65rem;
    line-height: 1.1;
    margin-top: 2px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.stepper-node.step-completed .stepper-title {
    color: #198754;
}

.stepper-node.step-rejected .stepper-title {
    color: #dc3545;
}

.stepper-node.step-pending .stepper-title {
    color: #6c757d;
}

.stepper-line {
    flex-grow: 1;
    height: 2px;
    background-color: #dee2e6;
    margin: 0 1px 12px 1px;
    position: relative;
    z-index: 1;
}

.stepper-line.line-completed {
    background-color: #28a745;
}

/* ==========================================================================
   Live Users Monitor Aesthetic Dashboard Styling
   ========================================================================== */

.active-users-container {
    padding: 0.5rem 0.75rem 2rem;
    animation: activeUsersFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes activeUsersFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.title-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.page-main-heading {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #1e293b);
    letter-spacing: -0.02em;
}

.page-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
}

.live-pulse-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.pulse-circle {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: activeUsersPulseRing 1.8s infinite;
}

@keyframes activeUsersPulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Metric Cards Grid */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.metric-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.metric-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.metric-card.card-online::before { background: #10b981; }
.metric-card.card-away::before { background: #f59e0b; }
.metric-card.card-total::before { background: #6366f1; }
.metric-card.card-system::before { background: #0ea5e9; }

.metric-info {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #64748b);
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    line-height: 1.2;
}

.metric-desc {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 0.2rem;
}

.metric-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.icon-online {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.icon-away {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.icon-total {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}

.icon-system {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

/* Controls Toolbar */
.toolbar-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.tab-filter-group {
    display: inline-flex;
    background: var(--bg-hover, #f1f5f9);
    padding: 0.25rem;
    border-radius: 10px;
    gap: 0.25rem;
}

.tab-filter-btn {
    border: none;
    background: transparent;
    padding: 0.4rem 0.85rem;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.tab-filter-btn:hover {
    color: var(--text-primary, #0f172a);
}

.tab-filter-btn.active {
    background: #ffffff;
    color: var(--primary-color, #2563eb);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.filter-badge {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    font-size: 0.72rem;
}

.tab-filter-btn.active .filter-badge {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.actions-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

/* User Avatar & Info */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}

.user-text-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name-title {
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    font-size: 0.88rem;
    line-height: 1.3;
}

.user-meta-sub {
    font-size: 0.75rem;
    color: var(--text-secondary, #64748b);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pill.badge-online {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pill.badge-away {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-pill.badge-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.badge-online .status-dot {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.badge-away .status-dot {
    background: #f59e0b;
}

.badge-expired .status-dot {
    background: #ef4444;
}

.tabs-count-tag {
    background: rgba(0, 0, 0, 0.08);
    font-size: 0.68rem;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    margin-left: 0.2rem;
    font-weight: 700;
}

/* Info Badges & Tags */
.company-badge-box {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.company-name-text {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    font-size: 0.82rem;
}

.branch-name-pill {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    width: fit-content;
}

.duration-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
}

.remaining-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.76rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}

.page-path-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    padding: 0.15rem 0.45rem;
    border-radius: 5px;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ip-device-box {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ip-pill {
    font-size: 0.75rem;
    font-family: monospace;
    color: #334155;
}

/* Card Container for Grid */
.grid-wrapper-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    padding: 0.85rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .metrics-row {
        grid-template-columns: 1fr;
    }
    .page-header-box {
        flex-direction: column;
        align-items: flex-start;
    }
    .toolbar-card {
        flex-direction: column;
        align-items: stretch;
    }
    .actions-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* ==========================================================================
   System Audit Logs & Diff Modal Theme Styling
   ========================================================================== */
.audit-logs-page {
    font-family: inherit;
}

.audit-stat-pill {
    padding: 0.3rem 0.85rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
/* =============================================
   System Audit Trail - Theme Styles
   ============================================= */
.audit-logs-page {
    font-family: var(--font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.audit-single-form-name {
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    font-size: 0.84rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}

/* ERP Themed Segmented Switch (Visual Diff / Raw JSON) */
.audit-toggle-group {
    display: inline-flex;
    align-items: center;
    background: #eef2f6;
    padding: 3px;
    border-radius: 8px;
    gap: 3px;
    border: 1px solid #d0d7de;
}

.audit-toggle-btn {
    border: 1px solid transparent;
    background: transparent;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary, #475569);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.25;
}

.audit-toggle-btn:hover {
    color: var(--primary-hover, #1d4ed8);
    background: rgba(37, 99, 235, 0.08);
}

.audit-toggle-btn.active {
    background: #ffffff;
    color: var(--primary-color, #2563eb);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(37, 99, 235, 0.12);
}

/* Audit Diff Table */
.audit-diff-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.82rem;
    border-collapse: separate;
    border-spacing: 0;
}

.audit-diff-table thead th {
    background: #f8fafc;
    color: #334155;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 0.9rem;
    border-bottom: 2px solid #e2e8f0;
}

.audit-diff-table tbody td {
    padding: 0.65rem 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.audit-diff-table tbody tr:hover td {
    background: #f8fafc;
}

.audit-field-name {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    font-size: 0.84rem;
}

/* Red for Old Value */
.audit-val-old {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
}

/* Green for New Value */
.audit-val-new {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #166534;
    border-radius: 6px;
    padding: 0.35rem 0.65rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    font-weight: 600;
    word-break: break-all;
    display: inline-block;
    max-width: 100%;
}

.audit-val-empty {
    color: #94a3b8;
    font-style: italic;
    font-family: monospace;
    font-size: 0.85rem;
    display: inline-block;
    padding: 0.2rem 0.4rem;
}




