/* ============================================
   Invoice Approval System - Modern UI Styles
   ============================================ */

:root {
    /* Primary Colors */
    --ias-primary: #4f46e5;
    --ias-primary-hover: #4338ca;
    --ias-primary-light: #eef2ff;
    
    /* Secondary Colors */
    --ias-secondary: #64748b;
    --ias-secondary-hover: #475569;
    
    /* Status Colors */
    --ias-success: #10b981;
    --ias-warning: #f59e0b;
    --ias-danger: #ef4444;
    --ias-info: #3b82f6;
    
    /* Background Colors */
    --ias-bg-light: #f8fafc;
    --ias-bg-dark: #1e293b;
    --ias-sidebar-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    
    /* Text Colors */
    --ias-text-primary: #1e293b;
    --ias-text-secondary: #64748b;
    --ias-text-muted: #94a3b8;
    
    /* Border Colors */
    --ias-border: #e2e8f0;
    --ias-border-focus: #4f46e5;
    
    /* Shadows */
    --ias-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --ias-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --ias-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --ias-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Border Radius */
    --ias-radius-sm: 0.375rem;
    --ias-radius: 0.5rem;
    --ias-radius-lg: 0.75rem;
    --ias-radius-xl: 1rem;
}

/* ============================================
   Base Styles
   ============================================ */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ias-text-primary);
    background-color: var(--ias-bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--ias-text-primary);
}

h1:focus {
    outline: none;
}

/* ============================================
   Card Enhancements
   ============================================ */

.card {
    border: 1px solid var(--ias-border);
    border-radius: var(--ias-radius-lg);
    box-shadow: var(--ias-shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--ias-shadow);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--ias-border);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* ============================================
   Button Enhancements
   ============================================ */

.btn {
    font-weight: 500;
    border-radius: var(--ias-radius);
    padding: 0.5rem 1rem;
    transition: all 0.15s ease;
}

.btn-primary {
    background-color: var(--ias-primary);
    border-color: var(--ias-primary);
}

.btn-primary:hover {
    background-color: var(--ias-primary-hover);
    border-color: var(--ias-primary-hover);
}

.btn-success {
    background-color: var(--ias-success);
    border-color: var(--ias-success);
}

.btn-danger {
    background-color: var(--ias-danger);
    border-color: var(--ias-danger);
}

.btn-outline-primary {
    color: var(--ias-primary);
    border-color: var(--ias-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ias-primary);
    border-color: var(--ias-primary);
}

/* ============================================
   Form Enhancements
   ============================================ */

.form-control, .form-select {
    border-radius: var(--ias-radius);
    border-color: var(--ias-border);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ias-border-focus);
    box-shadow: 0 0 0 3px var(--ias-primary-light);
}

.form-label {
    font-weight: 500;
    color: var(--ias-text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

/* ============================================
   Table Enhancements
   ============================================ */

.table {
    font-size: 0.875rem;
}

.table thead th {
    font-weight: 600;
    color: var(--ias-text-secondary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    background-color: var(--ias-bg-light);
    border-bottom: 2px solid var(--ias-border);
    padding: 0.875rem 1rem;
}

.table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--ias-border);
}

.table-hover tbody tr:hover {
    background-color: var(--ias-primary-light);
}

/* ============================================
   Badge Enhancements
   ============================================ */

.badge {
    font-weight: 500;
    padding: 0.375em 0.75em;
    border-radius: 9999px;
    font-size: 0.75rem;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-awaiting {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ============================================
   Stats Cards
   ============================================ */

.stat-card {
    background: white;
    border-radius: var(--ias-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--ias-border);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ias-shadow-md);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--ias-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--ias-text-primary);
}

.stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--ias-text-secondary);
    font-weight: 500;
}

/* ============================================
   Alert Enhancements
   ============================================ */

.alert {
    border-radius: var(--ias-radius-lg);
    border: none;
    padding: 1rem 1.25rem;
}

/* ============================================
   Validation Styles
   ============================================ */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--ias-success);
}

.invalid {
    outline: 1px solid var(--ias-danger);
}

.validation-message {
    color: var(--ias-danger);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* ============================================
   Error Boundary
   ============================================ */

.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;
    border-radius: var(--ias-radius);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* ============================================
   Miscellaneous
   ============================================ */

.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;
}

/* Page title styling */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ias-text-primary);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--ias-text-secondary);
}

.empty-state .empty-icon {
    font-size: 4rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Transition utilities */
.transition-all {
    transition: all 0.2s ease;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header .page-title {
    margin-bottom: 0;
}

/* ============================================
   Pending Approvals Page
   ============================================ */

.pending-page .pending-card {
    transition: all 0.2s ease;
    overflow: hidden;
}

.pending-page .pending-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ias-shadow-lg);
}

.pending-page .pending-card .card-header {
    background: linear-gradient(135deg, var(--ias-primary-light) 0%, white 100%);
    border-bottom: 1px solid var(--ias-border);
    padding: 1rem 1.25rem;
}

.pending-page .invoice-number {
    font-weight: 600;
    font-size: 1rem;
    color: var(--ias-text-primary);
    margin-right: 0.5rem;
}

.pending-page .creditor-info {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: var(--ias-bg-light);
    border-radius: var(--ias-radius);
}

.pending-page .info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ias-text-muted);
    font-weight: 500;
}

.pending-page .info-value {
    font-weight: 500;
    color: var(--ias-text-primary);
}

.pending-page .amount-display {
    padding: 0.75rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: var(--ias-radius);
    border: 1px solid #a7f3d0;
}

.pending-page .amount-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #065f46;
}

.pending-page .step-info {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background: var(--ias-primary-light);
    border-radius: var(--ias-radius);
    font-size: 0.875rem;
}

.pending-page .card-footer {
    background: white;
    border-top: 1px solid var(--ias-border);
    padding: 1rem 1.25rem;
}

/* ============================================
   Admin Area Styles
   ============================================ */

.admin-page .breadcrumb {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.admin-page .breadcrumb-item a {
    color: var(--ias-primary);
    text-decoration: none;
}

.admin-page .breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Chain Cards */
.chain-card {
    transition: all 0.2s ease;
}

.chain-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ias-shadow-md);
}

.chain-card.inactive {
    opacity: 0.7;
}

.chain-card .card-header {
    background: white;
    padding: 1rem 1.25rem;
}

.chain-card .chain-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--ias-radius);
    background: var(--ias-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ias-primary);
    font-size: 1.25rem;
}

.chain-card .badge-sm {
    font-size: 0.6875rem;
    padding: 0.25em 0.5em;
}

.chain-card .steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chain-card .step-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--ias-bg-light);
    border-radius: var(--ias-radius);
    font-size: 0.8125rem;
}

.chain-card .step-order {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ias-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

.chain-card .step-name {
    color: var(--ias-text-primary);
    font-weight: 500;
}

.chain-card .step-item.more {
    background: transparent;
    justify-content: center;
    font-style: italic;
}

/* User Cards */
.user-card {
    transition: all 0.2s ease;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ias-shadow-md);
}

.user-card.inactive {
    opacity: 0.7;
}

.user-card .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--ias-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ias-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.user-card .user-info h5 {
    margin-bottom: 0.25rem;
}

.user-card .user-email {
    font-size: 0.8125rem;
    color: var(--ias-text-muted);
}

/* ============================================
   Step Editor
   ============================================ */

.step-editor {
    background: var(--ias-bg-light);
    border-radius: var(--ias-radius-lg);
    padding: 1.5rem;
}

.step-editor .step-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-editor .step-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: var(--ias-radius);
    border: 1px solid var(--ias-border);
    transition: all 0.15s ease;
}

.step-editor .step-row:hover {
    border-color: var(--ias-primary);
    box-shadow: var(--ias-shadow-sm);
}

.step-editor .step-row.dragging {
    opacity: 0.5;
    border-color: var(--ias-primary);
    border-style: dashed;
}

.step-editor .drag-handle {
    cursor: grab;
    color: var(--ias-text-muted);
    padding: 0.25rem;
}

.step-editor .drag-handle:hover {
    color: var(--ias-text-secondary);
}

.step-editor .step-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ias-primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.step-editor .step-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.step-editor .step-actions {
    display: flex;
    gap: 0.25rem;
}

.step-editor .add-step-btn {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--ias-border);
    background: transparent;
    border-radius: var(--ias-radius);
    color: var(--ias-text-secondary);
    font-weight: 500;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.step-editor .add-step-btn:hover {
    border-color: var(--ias-primary);
    color: var(--ias-primary);
    background: var(--ias-primary-light);
}

/* ============================================
   Form Section Cards
   ============================================ */

.form-section {
    background: white;
    border-radius: var(--ias-radius-lg);
    border: 1px solid var(--ias-border);
    margin-bottom: 1.5rem;
}

.form-section .section-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ias-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section .section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--ias-radius);
    background: var(--ias-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ias-primary);
}

.form-section .section-title {
    font-weight: 600;
    margin: 0;
}

.form-section .section-body {
    padding: 1.25rem;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

/* Tablet and below */
@media (max-width: 991.98px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .page-header .page-title {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .step-editor .step-fields {
        grid-template-columns: 1fr;
    }

    .step-editor .step-row {
        flex-direction: column;
        align-items: stretch;
    }

    .step-editor .step-number {
        align-self: flex-start;
    }

    /* Table responsive improvements */
    .table-responsive {
        border-radius: var(--ias-radius-lg);
    }

    .table thead th {
        padding: 0.625rem 0.75rem;
        font-size: 0.6875rem;
    }

    .table tbody td {
        padding: 0.625rem 0.75rem;
    }

    /* Card adjustments */
    .card {
        border-radius: var(--ias-radius);
    }

    .card-header,
    .card-body,
    .card-footer {
        padding: 0.875rem 1rem;
    }

    /* Form adjustments */
    .form-control,
    .form-select {
        padding: 0.5rem 0.75rem;
    }

    /* Button adjustments */
    .btn {
        padding: 0.375rem 0.75rem;
    }

    .btn-group-sm > .btn,
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Pending cards stack on mobile */
    .pending-page .pending-card .card-header {
        padding: 0.875rem 1rem;
    }

    .pending-page .amount-value {
        font-size: 1.125rem;
    }

    /* Filter area collapsible on mobile */
    .filter-collapse {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .filter-collapse.show {
        max-height: 500px;
    }
}

/* Small mobile */
@media (max-width: 575.98px) {
    .page-header .page-title {
        font-size: 1.125rem;
    }

    .stat-card {
        padding: 0.875rem;
    }

    .stat-card .stat-value {
        font-size: 1.25rem;
    }

    .stat-card .stat-label {
        font-size: 0.75rem;
    }

    /* Dense table mode */
    .table {
        font-size: 0.8125rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }

    /* Reduce badge size */
    .badge {
        font-size: 0.6875rem;
        padding: 0.25em 0.5em;
    }

    /* Empty state mobile */
    .empty-state {
        padding: 2rem 1.5rem;
    }

    .empty-state .empty-icon {
        font-size: 3rem;
    }
}

/* ============================================
   Accessibility Improvements
   ============================================ */

/* Focus visible styles */
:focus-visible {
    outline: 2px solid var(--ias-primary);
    outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 2px solid var(--ias-primary);
    outline-offset: 2px;
    box-shadow: none;
}

/* Skip link for keyboard navigation */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ias-primary);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 var(--ias-radius) 0;
}

.skip-link:focus {
    top: 0;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --ias-border: #000;
    }

    .card,
    .btn,
    .form-control,
    .form-select {
        border-width: 2px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .sidebar,
    .top-bar,
    .btn,
    .sidebar-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .content-area {
        padding: 0 !important;
    }

    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* ============================================
   Scrollable Container Utilities
   ============================================ */

/* Container that takes up remaining viewport height and scrolls internally */
.scrollable-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px); /* Account for header, page-header, and padding */
    min-height: 400px;
}

.scrollable-container .scrollable-header {
    flex-shrink: 0;
}

.scrollable-container .scrollable-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Important for flex child scrolling */
}

/* Scrollable card/item list within a container */
.scrollable-list {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 280px);
    min-height: 200px;
    padding-right: 0.25rem; /* Space for scrollbar */
}

/* Scrollable table container */
.scrollable-table-container {
    overflow-y: auto;
    overflow-x: auto;
    max-height: calc(100vh - 280px);
    min-height: 200px;
}

.scrollable-table-container .table {
    margin-bottom: 0;
}

.scrollable-table-container thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 1px 0 var(--ias-border);
}

/* Custom scrollbar styling */
.scrollable-content::-webkit-scrollbar,
.scrollable-list::-webkit-scrollbar,
.scrollable-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.scrollable-content::-webkit-scrollbar-track,
.scrollable-list::-webkit-scrollbar-track,
.scrollable-table-container::-webkit-scrollbar-track {
    background: var(--ias-bg-light);
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb,
.scrollable-list::-webkit-scrollbar-thumb,
.scrollable-table-container::-webkit-scrollbar-thumb {
    background: var(--ias-text-muted);
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover,
.scrollable-list::-webkit-scrollbar-thumb:hover,
.scrollable-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--ias-text-secondary);
}

/* Responsive adjustments for scrollable containers */
@media (max-width: 991.98px) {
    .scrollable-container {
        height: calc(100vh - 160px);
    }

    .scrollable-list {
        max-height: calc(100vh - 240px);
    }

    .scrollable-table-container {
        max-height: calc(100vh - 240px);
    }
}

@media (max-width: 575.98px) {
    .scrollable-container {
        height: auto;
        min-height: auto;
    }

    .scrollable-list {
        max-height: none;
        overflow-y: visible;
    }

    .scrollable-table-container {
        max-height: calc(100vh - 200px);
        min-height: 150px;
    }
}