/* Bootstrap-style Documentation CSS */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-top: 56px;
    background: #f8f9fa;
    color: #495057;
    line-height: 1.5;
    font-size: 14px;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 20px 0 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: var(--sidebar-width);
    overflow-y: auto;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar .nav-link {
    color: #4a5568;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin: 0.125rem 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.875rem;
}

.sidebar .nav-link:hover {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    text-decoration: none;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.sidebar .nav-link.active {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    font-weight: 600;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.sidebar .nav-link i {
    width: 16px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1rem 1.5rem;
    background: #fafbfc;
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* Content Sections */
.content-section {
    margin-bottom: 1.5rem;
    scroll-margin-top: 80px;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.content-section h1,
.content-section h2 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-section h3 {
    color: #4a5568;
    font-weight: 600;
}

.content-section p {
    color: #718096;
    font-size: 1rem;
    line-height: 1.7;
}

/* Code Blocks */
pre {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

code {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875em;
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border: none;
}

/* Cards */
.card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    background: #ffffff;
    margin-bottom: 1rem;
}

.card-body {
    padding: 1rem;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #495057;
    border-radius: 0.375rem 0.375rem 0 0;
    font-size: 0.9rem;
}

/* Tables */
.table {
    font-size: 0.875rem;
    color: #4a5568;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #2d3748;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.table-hover tbody tr:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Property Search */
.property-row {
    transition: all 0.2s ease;
}

.property-row.hidden {
    display: none;
}

/* Color Preview */
.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #dee2e6;
    display: inline-block;
}

/* Badges */
.badge {
    font-size: 0.75em;
    font-weight: 600;
    padding: 0.5em 0.75em;
    border-radius: 0.5rem;
    letter-spacing: 0.025em;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%) !important;
}

/* Buttons */
.btn {
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Demo Grid Styles */
.demo-grid-container {
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.demo-grid-scroll-area {
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    position: relative;
}

.demo-grid {
    background: inherit;
    min-height: 400px;
    position: relative;
    min-width: max-content;
}

.demo-pagination {
    background: inherit;
    z-index: 100;
    position: relative;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    flex-shrink: 0;
}

/* Custom Scrollbar */
.demo-grid-scroll-area::-webkit-scrollbar {
    height: 8px;
}

.demo-grid-scroll-area::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
}

.demo-grid-scroll-area::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.demo-grid-scroll-area::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.demo-grid-container:hover {
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
    transition: box-shadow 0.3s ease;
}

.demo-header {
    display: grid;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 10;
}

.demo-header-cell {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-height: 50px;
    box-sizing: border-box;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.demo-header-cell:last-child {
    border-right: none;
}

.demo-header-cell.checkbox-cell {
    justify-content: center;
    cursor: default;
}

.demo-cell.checkbox-cell {
    justify-content: center;
}

.demo-cell.serial-cell {
    justify-content: center;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9em;
}

.demo-header-cell.serial-cell {
    justify-content: center;
    font-weight: 600;
}

.demo-header-cell:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.demo-header-cell:last-child {
    border-right: none;
}

.demo-filter-row {
    display: grid;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 5;
}

.demo-filter-cell {
    padding: 8px;
    border-right: 1px solid #dee2e6;
    box-sizing: border-box;
}

.demo-filter-cell:last-child {
    border-right: none;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 12px;
}

.demo-body {
    max-height: 300px;
    overflow-y: auto;
}

.demo-row {
    display: grid;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.demo-row:hover {
    background-color: #f8f9ff;
}

.demo-row.selected {
    background-color: #e3f2fd !important;
    border-left: 3px solid #667eea;
}

.demo-row.selected .demo-cell {
    background-color: #e3f2fd !important;
}

.demo-row.selected:hover .demo-cell {
    background-color: #bbdefb !important;
}

.demo-row.selected .checkbox-cell {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.demo-row.selected .serial-cell {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.demo-cell {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    min-height: 50px;
    box-sizing: border-box;
    border-right: 1px solid #dee2e6;
}

.demo-cell:last-child {
    border-right: none;
}

.demo-cell input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.demo-header-cell input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.demo-cell.with-border {
    border-right: 2px solid #dee2e6;
}

.demo-header-cell.with-border {
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.demo-filter-cell.with-border {
    border-right: 2px solid #dee2e6;
}

.demo-footer-cell.with-border {
    border-right: 2px solid #dee2e6;
}

.demo-cell:last-child {
    border-right: none;
}

.demo-cell.editable {
    cursor: text;
}

.demo-cell.editable:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

.demo-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(237, 242, 247, 0.8) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
}

.pagination-info {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-numbers {
    padding: 0 12px;
    font-weight: 600;
}

/* Events Log */
.events-log {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    max-height: 200px;
    overflow-y: auto;
}

.event-item {
    margin-bottom: 6px;
    padding: 6px 8px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
    transition: background-color 0.2s ease;
    animation: slideDown 0.3s ease-out;
}

.event-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.event-item:last-child {
    border-bottom: none;
}

.event-item .badge {
    font-size: 10px;
    padding: 2px 6px;
    margin: 0 4px;
}

.event-item span:last-child {
    color: #6c757d;
    font-size: 11px;
    word-break: break-all;
}

/* Action Buttons */
.action-btn {
    padding: 4px 8px;
    margin: 0 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.action-btn.edit {
    background-color: #ffc107;
    color: #000;
}

.action-btn.delete {
    background-color: #dc3545;
    color: white;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Sort Icons */
.sort-icon {
    font-size: 12px;
    opacity: 0.6;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.demo-header-cell:hover .sort-icon {
    opacity: 1;
    transform: scale(1.1);
}

.sort-icon.active {
    opacity: 1;
    color: #ffd700;
    text-shadow: 0 0 4px rgba(255, 215, 0, 0.5);
    transform: scale(1.2);
}

.demo-header-cell {
    user-select: none;
    position: relative;
}

.demo-header-cell:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .demo-header,
    .demo-filter-row,
    .demo-row {
        grid-template-columns: 1fr;
        gap: 1px;
    }
    
    .demo-header-cell,
    .demo-filter-cell,
    .demo-cell {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .demo-header-cell:before,
    .demo-cell:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        margin-right: 8px;
    }
}

/* Accordion Customization */
.accordion-button {
    font-weight: 600;
    color: var(--dark-color);
}

.accordion-button:not(.collapsed) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    pointer-events: none;
}

.hero-section h1 {
    color: white;
    font-weight: 800;
    font-size: 3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Demo Grid Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Classes */
.demo-row.animate-none {
    transition: none;
}

.demo-row.animate-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-row.animate-bounce {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.demo-row.animate-slide {
    animation: slideInLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.demo-row.animate-fade {
    animation: fadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.demo-row.hover-animation:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-cell.hover-animation:hover {
    transform: scale(1.01);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading-shimmer {
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

.demo-header.animate-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-header-cell.hover-animation:hover {
    transform: translateY(-0.5px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-section {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.demo-filter-row {
    animation: slideDown 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Toast Customization */
.toast {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Loading State */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 1rem;
    backdrop-filter: blur(5px);
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

.demo-grid-container {
    position: relative;
    overflow: hidden;
}

/* Pinned Columns */
.pinned-left {
    position: sticky !important;
    left: 0 !important;
    z-index: 20 !important;
}

.pinned-right {
    position: sticky !important;
    right: 0 !important;
    z-index: 20 !important;
}

.pinned-header-left {
    z-index: 30 !important;
}

.pinned-header-right {
    z-index: 30 !important;
}

.demo-header-cell.pinned-left,
.demo-filter-cell.pinned-left,
.demo-cell.pinned-left,
.demo-footer-cell.pinned-left {
    position: sticky !important;
    left: 0 !important;
}

.demo-header-cell.pinned-right,
.demo-filter-cell.pinned-right,
.demo-cell.pinned-right,
.demo-footer-cell.pinned-right {
    position: sticky !important;
    right: 0 !important;
}

.demo-grid-container {
    overflow-x: auto;
    max-width: 100%;
    position: relative;
}

.demo-header,
.demo-filter-row,
.demo-row,
.demo-footer {
    min-width: max-content;
    position: relative;
}

.pinned-left::after {
    content: '';
    position: absolute;
    top: 0;
    right: -1px;
    bottom: 0;
    width: 2px;
    background: rgba(102, 126, 234, 0.3);
    pointer-events: none;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

.pinned-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1px;
    bottom: 0;
    width: 2px;
    background: rgba(102, 126, 234, 0.3);
    pointer-events: none;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
}

.demo-body {
    position: relative;
    z-index: 1;
}

.demo-header {
    position: relative;
    z-index: 10;
}

.demo-footer {
    position: relative;
    z-index: 5;
}

/* Collapse functionality */
.collapse {
    display: none;
    transition: all 0.3s ease;
}

.collapse.show {
    display: block;
}

.nav-link[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.3s ease;
}

.nav-link[data-bs-toggle="collapse"] {
    position: relative;
}

.nav-link[data-bs-toggle="collapse"] .fa-chevron-down {
    transition: transform 0.2s ease;
}

.nav-link[data-bs-toggle="collapse"].collapsed .fa-chevron-down {
    transform: rotate(-90deg);
}

/* Submenu Styles */
.submenu-link {
    font-size: 0.875rem;
    padding: 0.5rem 1rem 0.5rem 2rem;
    color: #6c757d;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s ease;
}

.submenu-link:hover {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

.submenu-link.active {
    color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.1);
    font-weight: 500;
}

/* Column Resizer */
.column-resizer {
    position: absolute;
    top: 0;
    right: -2px;
    width: 4px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 50;
    transition: background-color 0.2s ease;
}

.column-resizer:hover {
    background: rgba(102, 126, 234, 0.4);
    width: 6px;
    right: -3px;
}

.column-resizer:active {
    background: rgba(102, 126, 234, 0.7);
    width: 6px;
    right: -3px;
}

.demo-header-cell {
    position: relative;
}

.demo-header-cell:hover .column-resizer {
    background: rgba(102, 126, 234, 0.2);
}

/* Column Management */
.form-check {
    padding: 4px 0;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.form-check-label {
    font-size: 0.875rem;
    color: #495057;
    cursor: pointer;
}

/* Demo Controls */
.demo-controls {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 0.5rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.demo-controls .btn {
    margin: 0.25rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Checkbox and Serial Number Styling */
.checkbox-cell {
    background: rgba(102, 126, 234, 0.05);
}

.serial-cell {
    background: rgba(108, 117, 125, 0.05);
}

.demo-row.selected .checkbox-cell {
    background: rgba(102, 126, 234, 0.15) !important;
}

.demo-row.selected .serial-cell {
    background: rgba(102, 126, 234, 0.15) !important;
}

/* Responsive Improvements */
@media (max-width: 576px) {
    .demo-pagination {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .demo-controls .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin: 0.2rem;
    }
    
    .demo-cell input[type="checkbox"] {
        transform: scale(1.3);
    }
    
    .demo-header-cell input[type="checkbox"] {
        transform: scale(1.3);
    }
}

/* Text Ellipsis */
.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-wrap {
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Demo Cell Text Handling */
.demo-cell {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    vertical-align: top;
    padding: 8px 12px;
    line-height: 1.4;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

/* Global Text Ellipsis */
.demo-cell.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.demo-cell.text-ellipsis:hover {
    position: relative;
    z-index: 100;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-radius: 4px;
    white-space: normal;
    word-wrap: break-word;
    min-width: max-content;
    max-width: 300px;
    border: 1px solid #ddd;
}

.demo-row {
    align-items: stretch;
    display: grid;
}

.demo-row .demo-cell {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* Demo Footer */
.demo-footer {
    display: grid;
    font-weight: 600;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 5;
}

.demo-footer-cell {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-right: 1px solid #dee2e6;
    box-sizing: border-box;
}

.demo-footer-cell:last-child {
    border-right: none;
}

.demo-footer-cell.checkbox-cell,
.demo-footer-cell.serial-cell {
    justify-content: center;
}

.footer-label {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Demo Pagination */
.demo-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-top: 0;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9) 0%, rgba(237, 242, 247, 0.9) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 0 0 1rem 1rem;
}

.pagination-info {
    font-size: 0.875rem;
    color: #718096;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-controls .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pagination-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    padding: 0 12px;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Column Visibility Grid */
.column-visibility-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.column-visibility-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.column-visibility-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.column-visibility-item.visible {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.column-visibility-item.hidden {
    border-left: 4px solid #6c757d;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
    opacity: 0.7;
}

.column-visibility-item .form-check {
    flex: 1;
    margin: 0;
    padding: 0;
}

.column-visibility-item .form-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    cursor: pointer;
}

.column-name {
    font-weight: 600;
    color: #2d3748;
    flex: 1;
}

.column-type {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-status {
    margin-left: 8px;
    font-size: 1.1rem;
}

.column-visibility-item .form-check-input {
    margin-top: 0;
    transform: scale(1.2);
}

.column-visibility-item.visible .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.column-visibility-item.hidden .form-check-input {
    background-color: #6c757d;
    border-color: #6c757d;
}

.column-visibility-grid::-webkit-scrollbar {
    width: 6px;
}

.column-visibility-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.column-visibility-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.column-visibility-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
/* Preset Management Styles */
.presets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.preset-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.preset-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.preset-item.default-preset {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(255, 255, 255, 1) 100%);
}

.preset-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.preset-name {
    margin: 0;
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
}

.preset-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.preset-actions .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.preset-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.preset-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #6c757d;
    border-top: 1px solid #f1f3f4;
    padding-top: 8px;
}

.preset-item .badge {
    font-size: 0.65rem;
    padding: 2px 6px;
}

/* Preset Grid Scrollbar */
.presets-grid::-webkit-scrollbar {
    width: 6px;
}

.presets-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.presets-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.presets-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Empty State */
.presets-grid .text-center {
    padding: 2rem;
}

.presets-grid .text-center i {
    opacity: 0.5;
}

/* Preset Actions Hover Effects */
.preset-actions .btn:hover {
    transform: scale(1.05);
}

.preset-actions .btn-outline-primary:hover {
    background-color: #667eea;
    border-color: #667eea;
}

.preset-actions .btn-outline-info:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.preset-actions .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Responsive Design for Presets */
@media (max-width: 768px) {
    .preset-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .preset-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .preset-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
/* Feature List Styles */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #495057;
}

.feature-item i {
    width: 20px;
    text-align: center;
}