﻿/* ===========================================
   CSS Variables for Theme Support
   =========================================== */
:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    --accent-primary: #2563eb;
    --accent-secondary: #1d4ed8;
    --accent-hover: #1e40af;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-primary: #334155;
    --border-secondary: #475569;
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-hover: #5b21b6;
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

/* Typography */
.font-sans {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.font-medium {
    font-weight: 500;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-white {
    color: #ffffff;
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.fixed {
    position: fixed;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.hidden {
    display: none;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

/* Spacing */
.space-x-3 > :not([hidden]) ~ :not([hidden]) {
    margin-left: 0.75rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

/* Sizing */
.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.min-w-0 {
    min-width: 0px;
}

/* Positioning */
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Colors */
.bg-black {
    background-color: #000000;
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-primary {
    background-color: var(--accent-primary);
}

.from-blue-500 {
    --tw-gradient-from: #3b82f6;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 130, 246, 0));
}

.to-indigo-600 {
    --tw-gradient-to: #4f46e5;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.text-gray-600 {
    color: #4b5563;
}

/* Hover States */
.hover\:bg-gray-200:hover {
    background-color: #e5e7eb;
}

/* Border */
.border {
    border-width: 1px;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* Z-index */
.z-50 {
    z-index: 50;
}

a {
    color: inherit;
    text-decoration: inherit
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

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

/* Responsive utilities */
@media (min-width: 1024px) {
    .lg\:hidden {
        display: none;
    }
}

/* ===========================================
   BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hide old styles for compatibility */
.MenuSection, .page, .Header, .titleBar {
    display: none !important;
}

.outerMost {
    background: transparent !important;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 3px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-tertiary);
    }

/* ===========================================
   LAYOUT COMPONENTS (Support both old and new class names)
   =========================================== */

/* Main Layout */
.dc-main-layout {
    background: var(--bg-primary);
    min-height: 100vh;
}

.dc-main-content {
    background: var(--bg-primary);
    min-height: 100vh;
}

/* Only apply margin-left when authenticated (when sidebar is present) */
.authenticated .dc-main-content {
    margin-left: 320px;
}

.dc-footer {
    /* background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);*/
}

/* Hide branding section after login */
.authenticated .branding-section,
.authenticated .dc-branding-section {
    display: none !important;
}

/* Only apply margin-left when authenticated (when sidebar is present) */
.authenticated .dc-footer {
    margin-left: 320px;
}

.dc-footer-text {
    color: var(--text-secondary);
    text-align: center;
    font-size: 0.875rem;
    padding: 1rem 1.5rem;
}

/* Sidebar Styles */
.dc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
}

.dc-sidebar-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 40;
}

.dc-sidebar-header {
    border-bottom: 1px solid var(--border-primary);
    padding: 1.5rem;
    flex-shrink: 0;
}

.dc-sidebar-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
}

/* Navigation Styles */
.dc-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
}

.dc-nav-item,
.nav-item {
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

    .dc-nav-item:hover,
    .nav-item:hover {
        background: var(--bg-tertiary);
        transform: translateX(4px);
    }

    .dc-nav-item.active,
    .nav-item.active {
        background: rgba(79, 70, 229, 0.15);
        border-left: 4px solid var(--accent-primary);
        border-radius: 0.375rem 0 0 0.375rem;
    }

    .dc-nav-link,
    .nav-item a {
        color: var(--text-primary) !important;
        text-decoration: none !important;
        display: block;
        padding: 0.75rem 1rem;
        font-weight: 500;
        border-radius: 0.375rem;
    }

    .dc-nav-item:hover .dc-nav-link,
    .nav-item:hover a {
        color: var(--text-primary) !important;
    }

.dc-nav-submenu,
.submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    margin-top: 0.25rem;
}

[data-theme="dark"] .dc-nav-submenu,
[data-theme="dark"] .submenu {
    background: rgba(255, 255, 255, 0.05);
}

.dc-nav-submenu.expanded,
.submenu.expanded {
    max-height: 9999px;
    padding: 0.25rem 0;
}

/* Theme Toggle */
.dc-theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    width: 100%;
}

    .dc-theme-toggle:hover {
        background: var(--border-primary);
        color: var(--text-primary);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .dc-theme-toggle svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .dc-theme-toggle:hover svg {
        transform: rotate(15deg);
    }

[data-theme="dark"] .dc-theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .dc-theme-toggle .moon-icon {
    display: none;
}

.dc-theme-toggle .sun-icon {
    display: none;
}

.dc-theme-toggle .moon-icon {
    display: block;
}

.dc-theme-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

/* User Info Section */
.dc-user-info {
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    flex-shrink: 0;
    padding: 1rem;
}

.dc-user-card {
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.dc-user-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
}

.dc-user-link {
    color: var(--accent-primary);
    font-size: 0.75rem;
}

    .dc-user-link:hover {
        color: var(--accent-hover);
        text-decoration: none;
    }

/* Logout Button */
.dc-logout-btn {
    background: var(--error) !important;
    color: white;
    border: none;
    width: calc(100% - 0rem);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    margin: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

    .dc-logout-btn:hover {
        background: #dc2626;
        transform: translateY(-1px);
        color: white;
        text-decoration: none;
    }

/* Enhanced Logout Button - Force Background Override */
.dc-sidebar .dc-logout-btn,
.dc-user-info .dc-logout-btn,
a.dc-logout-btn,
button.dc-logout-btn {
    background: var(--error) !important;
    background-color: var(--error) !important;
    color: white !important;
    border: none !important;
}

    .dc-sidebar .dc-logout-btn:hover,
    .dc-user-info .dc-logout-btn:hover,
    a.dc-logout-btn:hover,
    button.dc-logout-btn:hover {
        background: #dc2626 !important;
        background-color: #dc2626 !important;
        color: white !important;
    }

/* Override any navigation button styles that might be interfering */
.dc-nav .dc-logout-btn,
.dc-nav button.dc-logout-btn {
    background: var(--error) !important;
    background-color: var(--error) !important;
}

/* Override any general button resets */
.dc-logout-btn[style] {
    background: var(--error) !important;
    background-color: var(--error) !important;
}

/* Theme Toggle - Enhanced Visibility */
.dc-theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    width: 100%;
    transition: all 0.2s ease;
}

    .dc-theme-toggle:hover {
        background: var(--border-primary);
        color: var(--text-primary);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .dc-theme-toggle svg {
        width: 1.25rem;
        height: 1.25rem;
        transition: all 0.2s ease;
    }

    .dc-theme-toggle:hover svg {
        transform: rotate(15deg);
    }

/* Light Theme - Dark Button with Light Icon */
:root .dc-theme-toggle,
[data-theme="light"] .dc-theme-toggle {
    background: #1e293b !important; /* Dark background */
    border-color: #334155 !important; /* Dark border */
    color: #f8fafc !important; /* Light text/icon */
}

    :root .dc-theme-toggle:hover,
    [data-theme="light"] .dc-theme-toggle:hover {
        background: #0f172a !important; /* Darker on hover */
        color: #ffffff !important; /* Pure white on hover */
        box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3) !important;
    }

    /* Light theme shows moon icon (dark mode icon) */
    :root .dc-theme-toggle .sun-icon,
    [data-theme="light"] .dc-theme-toggle .sun-icon {
        display: none;
    }

    :root .dc-theme-toggle .moon-icon,
    [data-theme="light"] .dc-theme-toggle .moon-icon {
        display: block;
        color: #f8fafc !important; /* Light icon color */
    }

/* Dark Theme - Light Button with Dark Icon */
[data-theme="dark"] .dc-theme-toggle {
    background: #f8fafc !important; /* Light background */
    border-color: #e2e8f0 !important; /* Light border */
    color: #1e293b !important; /* Dark text/icon */
}

    [data-theme="dark"] .dc-theme-toggle:hover {
        background: #ffffff !important; /* Pure white on hover */
        color: #0f172a !important; /* Darker on hover */
        box-shadow: 0 4px 12px rgba(248, 250, 252, 0.3) !important;
    }

    /* Dark theme shows sun icon (light mode icon) */
    [data-theme="dark"] .dc-theme-toggle .sun-icon {
        display: block;
        color: #1e293b !important; /* Dark icon color */
    }

    [data-theme="dark"] .dc-theme-toggle .moon-icon {
        display: none;
    }

/* Enhanced hover effects for better visibility */
:root .dc-theme-toggle:hover svg,
[data-theme="light"] .dc-theme-toggle:hover svg {
    color: #ffffff !important;
    transform: rotate(15deg) scale(1.1) !important;
}

[data-theme="dark"] .dc-theme-toggle:hover svg {
    color: #0f172a !important;
    transform: rotate(15deg) scale(1.1) !important;
}

.dc-theme-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}



/* ===========================================
   DASHBOARD - REMOVE ALL TEXT DECORATIONS
   =========================================== */

/* Remove text-decoration from all dashboard elements */
.dashboard-card *,
.dc-dashboard-card *,
.dashboard-card a,
.dc-dashboard-card a,
.dashboard-card td a,
.dc-dashboard-card td a,
.dashboard-card th a,
.dc-dashboard-card th a,
.dashboard-card span a,
.dc-dashboard-card span a {
    text-decoration: none !important;
}

    /* Remove text-decoration on hover states too */
    .dashboard-card *:hover,
    .dc-dashboard-card *:hover,
    .dashboard-card a:hover,
    .dc-dashboard-card a:hover,
    .dashboard-card td a:hover,
    .dc-dashboard-card td a:hover,
    .dashboard-card th a:hover,
    .dc-dashboard-card th a:hover,
    .dashboard-card span a:hover,
    .dc-dashboard-card span a:hover {
        text-decoration: none !important;
    }

/* Ensure hyperlinks in dashboard tables have no decoration */
.dashboard-card table a,
.dc-dashboard-card table a,
.dashboard-card .GridView a,
.dc-dashboard-card .GridView a,
.dashboard-card table[id*="GridView"] a,
.dc-dashboard-card table[id*="GridView"] a {
    text-decoration: none !important;
}

/* Remove text-decoration from dashboard links on all states */
.dashboard-card a:link,
.dashboard-card a:visited,
.dashboard-card a:active,
.dc-dashboard-card a:link,
.dc-dashboard-card a:visited,
.dc-dashboard-card a:active {
    text-decoration: none !important;
}

/* Override any specific hyperlink styling within dashboard */
.dashboard-card .future-followup,
.dc-dashboard-card .future-followup {
    text-decoration: none !important;
}

/* Dark mode support for removing text decorations */
[data-theme="dark"] .dashboard-card *,
[data-theme="dark"] .dc-dashboard-card *,
[data-theme="dark"] .dashboard-card a,
[data-theme="dark"] .dc-dashboard-card a {
    text-decoration: none !important;
}

    [data-theme="dark"] .dashboard-card *:hover,
    [data-theme="dark"] .dc-dashboard-card *:hover,
    [data-theme="dark"] .dashboard-card a:hover,
    [data-theme="dark"] .dc-dashboard-card a:hover {
        text-decoration: none !important;
    }


/* ===========================================
   PAGE LAYOUT COMPONENTS
   =========================================== */

/* Page Container */
.dc-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Page Header */
.dc-page-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-primary);
    padding-bottom: 1.5rem;
}

.dc-page-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dc-page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dc-page-icon {
    width: 2rem;
    height: 2rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.dc-page-description {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    margin-top: 0.5rem;
}

/* Action Bar */
.dc-action-bar {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dc-action-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dc-command-panel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

    /* Modernize old blueBox command links */
    .dc-command-panel .blueBox,
    .dc-command-panel a,
    .dc-command-panel input[type="submit"],
    .dc-command-panel button {
        background: var(--accent-primary);
        color: white;
        border: none;
        padding: 0.75rem 1.5rem;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
    }

        .dc-command-panel .blueBox:hover,
        .dc-command-panel a:hover,
        .dc-command-panel input[type="submit"]:hover,
        .dc-command-panel button:hover {
            background: var(--accent-hover);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
            color: white;
            text-decoration: none;
        }

/* Content Grid */
.dc-content-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Content Cards */
.dc-content-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

    .dc-content-card:hover {
        box-shadow: var(--shadow-md);
    }

.dc-full-width {
    grid-column: 1 / -1;
}

.dc-card-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    padding: 1.25rem;
}

.dc-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dc-card-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.dc-card-content {
    padding: 1.5rem;
}

/* Alert Components */
.dc-alert {
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid;
}

.dc-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.dc-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.dc-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.dc-alert-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.dc-alert-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.dc-alert-message {
    flex: 1;
    font-weight: 500;
    margin: 0;
}

/* Search Form */
.dc-search-form {
    background: transparent;
}

.dc-form-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Results Container */
.dc-results-container {
    background: transparent;
}

.dc-grid-container {
    border-radius: 0.5rem;
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-primary);
}

    /* Modernize GridView Controls */
    .dc-grid-container table,
    .dc-grid-container .GridView,
    table[id*="GridView"] {
        width: 100%;
        border-collapse: collapse;
        background: var(--bg-secondary);
        font-size: 0.875rem;
    }

        .dc-grid-container th,
        .dc-grid-container .NavGridViewHeaderStyle,
        table[id*="GridView"] th {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            font-weight: 600;
            padding: 1rem 0.75rem;
            text-align: center;
            border-bottom: 1px solid var(--border-primary);
            font-size: 0.875rem;
        }

        .dc-grid-container td,
        table[id*="GridView"] td {
            padding: 0.875rem 0.75rem;
            border-bottom: 1px solid var(--border-primary);
            color: var(--text-primary);
            vertical-align: middle;
        }

        .dc-grid-container tr:hover,
        table[id*="GridView"] tr:hover {
            background: var(--bg-tertiary);
        }

        .dc-grid-container .NavGridViewAltRowStyle,
        table[id*="GridView"] .NavGridViewAltRowStyle {
            background: var(--bg-tertiary);
        }

/* Modernize Form Controls */
.dc-search-form input[type="text"],
.dc-search-form select,
.dc-search-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

    .dc-search-form input[type="text"]:focus,
    .dc-search-form select:focus,
    .dc-search-form textarea:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

.dc-search-form label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

/* ===========================================
   LOGIN PAGE COMPONENTS
   =========================================== */

.login-wrapper,
.dc-login-wrapper {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Background Decorations */
.bg-decoration,
.dc-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.decoration-circle,
.dc-decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    opacity: 0.08;
}

.decoration-1,
.dc-decoration-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    right: -200px;
}

.decoration-2,
.dc-decoration-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -150px;
}

.decoration-3,
.dc-decoration-3 {
    width: 200px;
    height: 200px;
    top: 60%;
    left: -100px;
}

.decoration-gradient,
.dc-decoration-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 15% 85%, var(--accent-primary) 0%, transparent 50%), radial-gradient(circle at 85% 15%, var(--accent-secondary) 0%, transparent 50%);
    opacity: 0.03;
}

/* Layout Container */
.wide-container,
.dc-wide-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0;
}

/* Branding Section */
.branding-section,
.dc-branding-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    position: relative;
    max-height: 100vh;
    overflow-y: auto;
}

.brand-content,
.dc-brand-content {
    text-align: center;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto;
    max-height: calc(100vh - 4rem);
}

.centered-logo,
.dc-centered-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.main-logo,
.dc-main-logo {
    max-width: 100px;
    height: auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
}

    .main-logo:hover,
    .dc-main-logo:hover {
        transform: scale(1.05);
    }

.fallback-logo,
.dc-fallback-logo {
    display: none;
    width: 100px;
    height: 100px;
}

    .fallback-logo svg,
    .dc-fallback-logo svg {
        width: 100%;
        height: 100%;
        filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.1));
    }

.brand-title,
.dc-brand-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.brand-tagline,
.dc-brand-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
    flex-shrink: 0;
}

.feature-highlights,
.dc-feature-highlights {
    display: grid;
    gap: 1rem;
    text-align: left;
    flex-shrink: 1;
    min-height: 0;
}

.feature-item,
.dc-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-primary);
}

    .feature-item:hover,
    .dc-feature-item:hover {
        transform: translateX(5px);
        box-shadow: var(--shadow-md);
    }

.feature-icon,
.dc-feature-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

    .feature-icon svg,
    .dc-feature-icon svg {
        width: 1rem;
        height: 1rem;
    }

.feature-item span,
.dc-feature-item span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Login Section */
.login-section,
.dc-login-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
    max-height: 100vh;
}

.login-card,
.dc-login-card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-primary);
    width: 100%;
    max-width: 420px;
    position: relative;
}

    .login-card.compact,
    .dc-login-card.compact {
        padding: 1.5rem;
        max-width: 400px;
    }

    .login-card::before,
    .dc-login-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
        border-radius: 1rem 1rem 0 0;
    }

.card-header,
.dc-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-title,
.dc-login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle,
.dc-login-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Form Styles */
.compact-form .form-group,
.dc-compact-form .dc-form-group {
    margin-bottom: 1rem;
}

.form-group,
.dc-form-group {
    margin-bottom: 1.25rem;
}

    .form-group.focused,
    .dc-form-group.focused {
        transform: scale(1.02);
    }

.form-label,
.dc-form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.input-container,
.dc-input-container {
    position: relative;
}

    .input-container.focused,
    .dc-input-container.focused {
        transform: translateY(-1px);
    }

.input-icon,
.dc-input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--text-tertiary);
    z-index: 2;
}

.input-container.focused .input-icon,
.dc-input-container.focused .dc-input-icon {
    color: var(--accent-primary);
}

.form-input,
.dc-form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    border: 2px solid var(--border-primary);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    outline: none;
}

::-ms-reveal {
    filter: invert(50%);
}

.simple-input,
.dc-simple-input {
    padding-left: 1rem !important;
}

.verification-input,
.dc-verification-input {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    letter-spacing: 0.25rem;
    padding-left: 0.875rem !important;
}

.form-input:focus,
.dc-form-input:focus {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder,
.dc-form-input::placeholder {
    color: var(--text-tertiary);
}

/* Button Styles */
.form-actions,
.dc-form-actions {
    margin-top: 1.5rem;
}

.button-group,
.dc-button-group {
    display: flex;
    gap: 0.75rem;
}

.login-button,
.dc-login-button {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .login-button:hover,
    .dc-login-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    }

    .login-button:active,
    .dc-login-button:active {
        transform: translateY(0);
    }

    .login-button.loading::after,
    .dc-login-button.loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 0.875rem;
        height: 0.875rem;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
    }

.cancel-button,
.dc-cancel-button {
    flex: 1;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 2px solid var(--border-primary);
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

    .cancel-button:hover,
    .dc-cancel-button:hover {
        background: var(--border-primary);
        color: var(--text-primary);
        transform: translateY(-1px);
    }

/* Error Messages */
.error-message,
.dc-error-message {
    color: #ff4d4f;
    background: transparent;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    border: none;
    padding: 0.5rem 0;
    display: block;
}

.validation-error,
.dc-validation-error {
    color: var(--error);
    font-size: 0.6875rem;
    margin-top: 0.1875rem;
    display: block;
}

/* Dashboard Styles */
.dashboard-card,
.dc-dashboard-card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-primary);
    min-width: 1200px;
    max-width: 1400px;
    width: 100%;
    overflow-x: auto;
}

.dashboard-header,
.dc-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-title,
.dc-dashboard-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.legend,
.dc-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.legend-item,
.dc-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.legend-dot,
.dc-legend-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
}

.past-due,
.dc-past-due {
    background-color: var(--error);
}

.due-today,
.dc-due-today {
    background-color: var(--success);
}

.future,
.dc-future {
    background-color: var(--accent-primary);
}

/*[data-theme="dark"] .future, .dc-future {
    background-color: #60a5fa;
}

.future-followup {
    color: var(--accent-primary) !important;*/ /* Tailwind blue-600, readable on light bg */
/*}

[data-theme="dark"] .future-followup {
    color: #60a5fa !important;*/ /* Tailwind blue-400, lighter for dark bg */
/*}*/

/* ===========================================
   DASHBOARD DARK MODE - COMPREHENSIVE COLOR OVERRIDE FOR #2563eb
   =========================================== */

/* Target ALL possible variations of #2563eb in dark mode */
[data-theme="dark"] *[style*="color:#2563eb"],
[data-theme="dark"] *[style*="color: #2563eb"],
[data-theme="dark"] *[style*="color:rgb(37,99,235)"],
[data-theme="dark"] *[style*="color: rgb(37,99,235)"],
[data-theme="dark"] *[style*="color: rgb(37, 99, 235)"],
[data-theme="dark"] a[style*="color:#2563eb"],
[data-theme="dark"] a[style*="color: #2563eb"],
[data-theme="dark"] span[style*="color:#2563eb"],
[data-theme="dark"] span[style*="color: #2563eb"],
[data-theme="dark"] td[style*="color:#2563eb"],
[data-theme="dark"] td[style*="color: #2563eb"] {
    color: #60a5fa !important;
}

/* Also target the standard .NET Color.Blue which renders as #0000FF */
[data-theme="dark"] *[style*="color:#0000FF"],
[data-theme="dark"] *[style*="color: #0000FF"],
[data-theme="dark"] *[style*="color:blue"],
[data-theme="dark"] *[style*="color: blue"],
[data-theme="dark"] *[style*="color:Blue"],
[data-theme="dark"] *[style*="color: Blue"] {
    color: #60a5fa !important;
}

/* Force override for dashboard hyperlinks */
[data-theme="dark"] .dashboard-card a,
[data-theme="dark"] .dashboard-card td a,
[data-theme="dark"] table td a {
    color: #60a5fa !important;
}

/* Override any blue colors in dashboard tables specifically */
[data-theme="dark"] .dashboard-card *[style*="color:blue"],
[data-theme="dark"] .dashboard-card *[style*="color:Blue"],
[data-theme="dark"] .dashboard-card *[style*="color:#"],
[data-theme="dark"] table *[style*="color:blue"],
[data-theme="dark"] table *[style*="color:Blue"] {
    color: #60a5fa !important;
}

/* Nuclear option - override ALL blue-ish colors in dark mode */
[data-theme="dark"] *[style*="color:rgb(37"] {
    color: #60a5fa !important;
}

/* Hover states */
[data-theme="dark"] *[style*="color:#2563eb"]:hover,
[data-theme="dark"] *[style*="color: #2563eb"]:hover,
[data-theme="dark"] .dashboard-card a:hover {
    color: #93c5fd !important;
}

/* Modal Styles */
.dc-modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-xl);
}

/* Navigation toggle button */
.dc-nav-toggle-inline {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    cursor: pointer;
    position: relative;
    z-index: 60;
}

    .dc-nav-toggle-inline:hover {
        background: var(--border-primary);
        transform: scale(1.05);
    }

    .dc-nav-toggle-inline:active {
        transform: scale(0.95);
    }

/* Show inline toggle only when authenticated */
.authenticated .dc-nav-toggle-inline {
    display: flex !important;
}

/* Mobile collapsed toggle button */
.dc-nav-toggle-collapsed {
    position: fixed !important;
    top: 1rem !important;
    left: 1rem !important;
    z-index: 70 !important;
    width: 3rem !important;
    height: 3rem !important;
    background: var(--bg-secondary) !important;
    box-shadow: var(--shadow-xl) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

    .dc-nav-toggle-collapsed:hover {
        background: var(--border-primary) !important;
        transform: scale(1.05) !important;
    }

    .dc-nav-toggle-collapsed:active {
        transform: scale(0.95) !important;
    }

/* ===========================================
   FORM DESIGNER PAGE STYLES
   =========================================== */

/* Main Form Designer Layout */
.dc-form-designer-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    min-height: 70vh;
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-secondary);
}

/* Form Configuration Section */
.dc-form-config-section {
    margin-bottom: 1.5rem;
}

.dc-form-config-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.dc-form-basic-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dc-form-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-primary);
}

.dc-form-section-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.dc-checkbox-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.dc-checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dc-checkbox {
    accent-color: var(--accent-primary);
    margin-right: 0.5rem;
}

/* Left Sidebar - Field Selection */
.dc-form-designer-sidebar {
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    height: 70vh;
    min-height: 500px;
}

.dc-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.dc-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dc-sidebar-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.dc-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Field Selection Panel */
.dc-field-selection-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Field Group Headers (collapsible sections) */
.FieldSelectionHeaders {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.375rem !important;
    padding: 0.75rem 1rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-bottom: 0.25rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

    .FieldSelectionHeaders:hover {
        background: var(--accent-primary) !important;
        color: white !important;
        transform: translateX(2px) !important;
    }

/* Field Group Content */
.FieldSelectionGroup {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

    /* Individual Field Items (draggable) */
    .FieldSelectionGroup > div,
    .FieldSelectionGroup > span {
        display: block !important;
        padding: 0.5rem 0.75rem !important;
        margin: 0.25rem 0 !important;
        background: var(--bg-tertiary) !important;
        border: 1px solid var(--border-primary) !important;
        border-radius: 0.25rem !important;
        cursor: move !important;
        transition: all 0.2s ease !important;
        font-size: 0.8125rem !important;
        color: var(--text-primary) !important;
        position: relative !important;
    }

        .FieldSelectionGroup > div:hover,
        .FieldSelectionGroup > span:hover {
            background: var(--accent-primary) !important;
            color: white !important;
            transform: translateX(4px) !important;
            box-shadow: var(--shadow-md) !important;
        }

        /* Dragging state */
        .FieldSelectionGroup > div.ui-sortable-helper,
        .FieldSelectionGroup > span.ui-sortable-helper {
            background: var(--accent-primary) !important;
            color: white !important;
            transform: rotate(2deg) !important;
            box-shadow: var(--shadow-lg) !important;
            z-index: 1000 !important;
        }

/* Right Panel - Form Canvas */
.dc-form-designer-canvas {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
}

.dc-canvas-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.dc-canvas-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dc-canvas-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.dc-canvas-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dc-info-text {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-style: italic;
}

.dc-canvas-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    min-height: 400px;
}

/* Form Canvas (drop zones) */
.dc-form-canvas {
    min-height: 100%;
    background: linear-gradient( 45deg, var(--bg-primary) 25%, transparent 25%, transparent 75%, var(--bg-primary) 75%, var(--bg-primary) ), linear-gradient( 45deg, var(--bg-primary) 25%, transparent 25%, transparent 75%, var(--bg-primary) 75%, var(--bg-primary) );
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    border-radius: 0.375rem;
    position: relative;
}

    /* Form Sections and Drop Zones */
    .dc-form-canvas table {
        width: 100% !important;
        border-collapse: separate !important;
        border-spacing: 0.5rem !important;
        background: transparent !important;
    }

    /* Drop Zones */
    .dc-form-canvas td {
        min-height: 120px !important;
        border: 2px dashed var(--border-secondary) !important;
        border-radius: 0.375rem !important;
        background: var(--bg-secondary) !important;
        padding: 0.75rem !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        vertical-align: top !important;
    }

        .dc-form-canvas td:hover {
            border-color: var(--accent-primary) !important;
            background: rgba(79, 70, 229, 0.05) !important;
        }

        /* Active drop zone */
        .dc-form-canvas td.ui-droppable-hover {
            border-color: var(--accent-primary) !important;
            background: rgba(79, 70, 229, 0.1) !important;
            transform: scale(1.02) !important;
        }

        /* Dropped Fields */
        .dc-form-canvas td > div {
            background: var(--bg-secondary) !important;
            border: 1px solid var(--border-primary) !important;
            border-radius: 0.375rem !important;
            padding: 0.75rem !important;
            margin: 0.25rem 0 !important;
            cursor: move !important;
            transition: all 0.2s ease !important;
            box-shadow: var(--shadow-sm) !important;
            position: relative !important;
        }

            .dc-form-canvas td > div:hover {
                box-shadow: var(--shadow-md) !important;
                transform: translateY(-1px) !important;
                border-color: var(--accent-primary) !important;
            }

            /* Field Labels in Canvas */
            .dc-form-canvas td > div > span,
            .dc-form-canvas td > div > label {
                font-weight: 600 !important;
                color: var(--text-primary) !important;
                font-size: 0.875rem !important;
                display: block !important;
                margin-bottom: 0.25rem !important;
            }

            /* Field Type Icons */
            .dc-form-canvas td > div img {
                width: 16px !important;
                height: 16px !important;
                margin: 0.25rem 0.5rem 0.25rem 0 !important;
                opacity: 0.7 !important;
            }

    /* Spacer Fields */
    .dc-form-canvas .Spacer {
        background: var(--bg-tertiary) !important;
        border: 1px dashed var(--border-secondary) !important;
        color: var(--text-tertiary) !important;
        text-align: center !important;
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-style: italic !important;
        font-size: 0.8125rem !important;
    }

/* Property Panels */
.dc-property-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.dc-property-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    pointer-events: auto;
    z-index: 1001;
}

.dc-property-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-primary);
    background: var(--bg-tertiary);
    border-radius: 0.75rem 0.75rem 0 0;
}

.dc-property-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.dc-property-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

    .dc-property-close:hover {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

.dc-property-content {
    padding: 1.5rem;
}

.dc-property-group {
    margin-bottom: 1.5rem;
}

.dc-property-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.dc-property-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.dc-property-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.375rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

    .dc-property-input:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        background: var(--bg-secondary);
    }

    .dc-property-input:disabled {
        background: var(--bg-primary);
        color: var(--text-tertiary);
        opacity: 0.6;
    }

.dc-property-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.dc-property-checkbox-group {
    display: flex;
    align-items: center;
}

.dc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
}

    .dc-checkbox-label input[type="checkbox"] {
        accent-color: var(--accent-primary);
        width: 1rem;
        height: 1rem;
    }

/* Tab Navigation for Form Canvas */
#tabs {
    background: transparent;
}

#tab-links {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-primary);
    border-radius: 0.5rem 0.5rem 0 0;
}

    #tab-links li {
        margin: 0;
        padding: 0;
    }

        #tab-links li a {
            display: block;
            padding: 0.875rem 1.5rem;
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 500;
            font-size: 0.875rem;
            border-bottom: 3px solid transparent;
            transition: all 0.2s ease;
            border-radius: 0.5rem 0.5rem 0 0;
        }

            #tab-links li.selected a,
            #tab-links li a:hover {
                background: var(--bg-primary);
                color: var(--accent-primary);
                border-bottom-color: var(--accent-primary);
            }

#tab-content {
    list-style: none;
    padding: 0;
    margin: 0;
}

    #tab-content li {
        background: var(--bg-secondary);
        border: 1px solid var(--border-primary);
        border-top: none;
        border-radius: 0 0 0.5rem 0.5rem;
        padding: 1.5rem;
    }

/* Group Properties Panel Styling */
.AttributePanel {
    position: fixed !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--shadow-xl) !important;
    z-index: 1000 !important;
    padding: 0 !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
}

    .AttributePanel table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

        .AttributePanel table td {
            padding: 0.75rem 1rem !important;
            border: none !important;
            background: transparent !important;
        }

    .AttributePanel label {
        font-weight: 600 !important;
        color: var(--text-primary) !important;
        font-size: 0.875rem !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }

    .AttributePanel input[type="text"],
    .AttributePanel textarea,
    .AttributePanel select {
        width: 100% !important;
        padding: 0.75rem !important;
        border: 1px solid var(--border-primary) !important;
        border-radius: 0.375rem !important;
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
        font-size: 0.875rem !important;
    }

        .AttributePanel input[type="text"]:focus,
        .AttributePanel textarea:focus,
        .AttributePanel select:focus {
            outline: none !important;
            border-color: var(--accent-primary) !important;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
        }

    .AttributePanel input[type="checkbox"] {
        accent-color: var(--accent-primary) !important;
        margin-right: 0.5rem !important;
    }

/* Hidden data containers */
.dc-hidden-data {
    display: none !important;
}

/* ===========================================
   DARK MODE SUPPORT
   =========================================== */

[data-theme="dark"] .dc-nav a,
[data-theme="dark"] .dc-nav span,
[data-theme="dark"] .dc-nav button,
[data-theme="dark"] nav a,
[data-theme="dark"] nav span,
[data-theme="dark"] nav button,
[data-theme="dark"] .dc-sidebar a,
[data-theme="dark"] .dc-sidebar span,
[data-theme="dark"] .dc-sidebar button {
    color: #f8fafc !important;
}

body[data-theme="dark"] .dc-nav a,
body[data-theme="dark"] .dc-nav span,
body[data-theme="dark"] .dc-nav button,
body[data-theme="dark"] nav a,
body[data-theme="dark"] nav span,
body[data-theme="dark"] nav button,
body[data-theme="dark"] .dc-sidebar a,
body[data-theme="dark"] .dc-sidebar span,
body[data-theme="dark"] .dc-sidebar button {
    color: #f8fafc !important;
}

/* Dark mode button states */
[data-theme="dark"] .dc-nav-item:hover,
[data-theme="dark"] .nav-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .dc-nav-item.active,
[data-theme="dark"] .nav-item.active {
    background: rgba(99, 102, 241, 0.3) !important;
    border-left-color: #8b5cf6 !important;
}

/* Dark mode form elements */
[data-theme="dark"] .dc-form-input,
[data-theme="dark"] .dc-property-input,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

    [data-theme="dark"] .dc-form-input:focus,
    [data-theme="dark"] .dc-property-input:focus,
    [data-theme="dark"] input[type="text"]:focus,
    [data-theme="dark"] input[type="password"]:focus,
    [data-theme="dark"] input[type="email"]:focus,
    [data-theme="dark"] textarea:focus,
    [data-theme="dark"] select:focus {
        background: var(--bg-secondary) !important;
        border-color: var(--accent-primary) !important;
        box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2) !important;
    }

/* Dark mode grid styling */
[data-theme="dark"] .dc-grid-container table,
[data-theme="dark"] .GridView,
[data-theme="dark"] table[id*="GridView"] {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

    [data-theme="dark"] .dc-grid-container th,
    [data-theme="dark"] .NavGridViewHeaderStyle,
    [data-theme="dark"] table[id*="GridView"] th {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
        border-bottom-color: var(--border-primary) !important;
    }

    [data-theme="dark"] .dc-grid-container td,
    [data-theme="dark"] table[id*="GridView"] td {
        border-bottom-color: var(--border-primary) !important;
        color: var(--text-primary) !important;
    }

    [data-theme="dark"] .dc-grid-container tr:hover,
    [data-theme="dark"] table[id*="GridView"] tr:hover {
        background: var(--bg-tertiary) !important;
    }

[data-theme="dark"] .NavGridViewAltRowStyle {
    background: var(--bg-tertiary) !important;
}

/* Dark mode property panels */
[data-theme="dark"] .dc-property-panel,
[data-theme="dark"] .AttributePanel {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .dc-property-header {
    background: var(--bg-tertiary) !important;
    border-bottom-color: var(--border-primary) !important;
}

[data-theme="dark"] .dc-property-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dc-property-close {
    color: var(--text-secondary) !important;
}

    [data-theme="dark"] .dc-property-close:hover {
        background: var(--bg-primary) !important;
        color: var(--text-primary) !important;
    }

[data-theme="dark"] .dc-property-label {
    color: var(--text-primary) !important;
}

/* Dark mode field selection styling */
[data-theme="dark"] .FieldSelectionHeaders {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

    [data-theme="dark"] .FieldSelectionHeaders:hover {
        background: var(--accent-primary) !important;
        color: white !important;
    }

[data-theme="dark"] .FieldSelectionGroup {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

    [data-theme="dark"] .FieldSelectionGroup > div,
    [data-theme="dark"] .FieldSelectionGroup > span {
        background: var(--bg-tertiary) !important;
        border-color: var(--border-primary) !important;
        color: var(--text-primary) !important;
    }

        [data-theme="dark"] .FieldSelectionGroup > div:hover,
        [data-theme="dark"] .FieldSelectionGroup > span:hover {
            background: var(--accent-primary) !important;
            color: white !important;
        }

/* Dark mode form canvas styling */
[data-theme="dark"] .dc-form-canvas {
    background: linear-gradient(45deg, var(--bg-primary) 25%, transparent 25%, transparent 75%, var(--bg-primary) 75%, var(--bg-primary)), linear-gradient(45deg, var(--bg-primary) 25%, transparent 25%, transparent 75%, var(--bg-primary) 75%, var(--bg-primary)) !important;
    background-size: 20px 20px !important;
    background-position: 0 0, 10px 10px !important;
}

    [data-theme="dark"] .dc-form-canvas td {
        border-color: var(--border-secondary) !important;
        background: var(--bg-secondary) !important;
    }

        [data-theme="dark"] .dc-form-canvas td:hover {
            border-color: var(--accent-primary) !important;
            background: rgba(139, 92, 246, 0.1) !important;
        }

        [data-theme="dark"] .dc-form-canvas td.ui-droppable-hover {
            border-color: var(--accent-primary) !important;
            background: rgba(139, 92, 246, 0.2) !important;
        }

        [data-theme="dark"] .dc-form-canvas td > div {
            background: var(--bg-secondary) !important;
            border-color: var(--border-primary) !important;
        }

            [data-theme="dark"] .dc-form-canvas td > div:hover {
                border-color: var(--accent-primary) !important;
            }

            [data-theme="dark"] .dc-form-canvas td > div > span,
            [data-theme="dark"] .dc-form-canvas td > div > label {
                color: var(--text-primary) !important;
            }

/* Dark mode command panel buttons */
[data-theme="dark"] .dc-command-panel .blueBox,
[data-theme="dark"] .dc-command-panel a,
[data-theme="dark"] .dc-command-panel input[type="submit"],
[data-theme="dark"] .dc-command-panel button {
    background: var(--accent-primary) !important;
    color: white !important;
}

    [data-theme="dark"] .dc-command-panel .blueBox:hover,
    [data-theme="dark"] .dc-command-panel a:hover,
    [data-theme="dark"] .dc-command-panel input[type="submit"]:hover,
    [data-theme="dark"] .dc-command-panel button:hover {
        background: var(--accent-hover) !important;
        color: white !important;
    }

/* Dark mode tabs */
[data-theme="dark"] #tab-links {
    background: var(--bg-secondary) !important;
    border-bottom-color: var(--border-primary) !important;
}

    [data-theme="dark"] #tab-links li a {
        color: var(--text-secondary) !important;
    }

        [data-theme="dark"] #tab-links li.selected a,
        [data-theme="dark"] #tab-links li a:hover {
            background: var(--bg-primary) !important;
            color: var(--accent-primary) !important;
            border-bottom-color: var(--accent-primary) !important;
        }

[data-theme="dark"] #tab-content li {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

/* Dark mode alerts */
[data-theme="dark"] .dc-alert-error {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: var(--error) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .dc-alert-success {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: var(--success) !important;
    color: #86efac !important;
}

[data-theme="dark"] .dc-alert-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: var(--warning) !important;
    color: #fcd34d !important;
}

/* Dark mode modal */
[data-theme="dark"] .dc-modal-content {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}

/* Dark mode checkboxes and form controls */
[data-theme="dark"] .dc-checkbox-label {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dc-form-section-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dc-form-actions {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
}

/* Dark mode spacer fields */
[data-theme="dark"] .dc-form-canvas .Spacer {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-secondary) !important;
    color: var(--text-tertiary) !important;
}

/* Dark mode legacy compatibility */
[data-theme="dark"] .blueBox {
    background: var(--accent-primary) !important;
    color: white !important;
}

    [data-theme="dark"] .blueBox:hover {
        background: var(--accent-hover) !important;
        color: white !important;
    }

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

/* Mobile styles */
@media (max-width: 1023px) {
    .authenticated .dc-main-content {
        margin-left: 0;
    }

    .authenticated .dc-footer {
        margin-left: 0;
    }

    .dc-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

        .dc-sidebar.open {
            transform: translateX(0);
        }

    .dc-sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    .dc-page-container {
        padding: 1rem;
    }

    .dc-page-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .dc-action-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .dc-content-grid {
        grid-template-columns: 1fr;
    }

    .dc-form-designer-layout {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .dc-form-config-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-property-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-property-checkboxes {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .wide-container,
    .dc-wide-container {
        grid-template-columns: 1fr;
    }

    .branding-section,
    .dc-branding-section {
        display: none;
    }

    .login-section,
    .dc-login-section {
        padding: 1rem;
    }

    .login-card,
    .dc-login-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .dashboard-card,
    .dc-dashboard-card {
        min-width: auto;
        padding: 1rem;
        overflow-x: scroll;
    }
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .dc-page-container {
        padding: 1.5rem;
    }

    .dc-form-designer-layout {
        grid-template-columns: 280px 1fr;
    }

    .dc-property-row {
        grid-template-columns: 1fr 1fr;
    }

    .dc-property-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screen adjustments */
@media (min-width: 1400px) {
    .dc-page-container {
        max-width: 1400px;
        padding: 2.5rem;
    }

    .dc-content-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }

    .dashboard-card,
    .dc-dashboard-card {
        max-width: 1600px;
    }
}

/* Print styles */
@media print {
    .dc-sidebar,
    .dc-action-bar,
    .dc-command-panel,
    .dc-property-panel,
    .dc-nav-toggle-inline,
    .dc-nav-toggle-collapsed {
        display: none !important;
    }

    .authenticated .dc-main-content {
        margin-left: 0 !important;
    }

    .dc-content-card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }

    .dc-page-title {
        color: #000 !important;
    }
}

/* ===========================================
   ANIMATION KEYFRAMES
   =========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }

    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Loading animations */
.dc-loading::after {
    content: '';
    animation: spin 1s linear infinite;
}

.dc-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.dc-bounce {
    animation: bounce 1s infinite;
}

/* ===========================================
   UTILITY CLASSES FOR LEGACY SUPPORT
   =========================================== */

/* Legacy table styling support */
.legacy-table {
    border-collapse: collapse !important;
    width: 100% !important;
}

    .legacy-table td,
    .legacy-table th {
        border: 1px solid var(--border-primary) !important;
        padding: 0.5rem !important;
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
    }

    .legacy-table th {
        background: var(--bg-tertiary) !important;
        font-weight: 600 !important;
    }

/* Legacy form styling */
.legacy-form input,
.legacy-form select,
.legacy-form textarea {
    border: 1px solid var(--border-primary) !important;
    padding: 0.5rem !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Legacy button styling */
.legacy-button {
    background: var(--accent-primary) !important;
    color: white !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.25rem !important;
    cursor: pointer !important;
}

    .legacy-button:hover {
        background: var(--accent-hover) !important;
    }

/* Legacy text styling */
.legacy-text {
    color: var(--text-primary) !important;
    font-family: inherit !important;
}

/* End of tailwind-custom.css */

/* Results Container */
.dc-results-container {
    background: transparent;
}

/* FIXED: Only apply borders when explicitly using dc-grid-container class */
.dc-grid-container {
    border-radius: 0.5rem;
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-primary);
}

    /* Modernize GridView Controls - ONLY when inside .dc-grid-container */
    .dc-grid-container table,
    .dc-grid-container .GridView {
        width: 100%;
        border-collapse: collapse;
        background: var(--bg-secondary);
        font-size: 0.875rem;
        border: none; /* Remove border for tables inside grid containers */
    }

    .dc-grid-container th,
    .dc-grid-container .NavGridViewHeaderStyle {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        font-weight: 600;
        padding: 1rem 0.75rem;
        text-align: center;
        border-bottom: 1px solid var(--border-primary);
        font-size: 0.875rem;
    }

    .dc-grid-container td {
        padding: 0.875rem 0.75rem;
        border-bottom: 1px solid var(--border-primary);
        color: var(--text-primary);
        vertical-align: middle;
    }

    .dc-grid-container tr:hover {
        background: var(--bg-tertiary);
    }

    .dc-grid-container .NavGridViewAltRowStyle {
        background: var(--bg-tertiary);
    }

/* SEPARATE: Style for dashboard tables (without borders) */
.dashboard-card table,
.dashboard-card .GridView,
.dashboard-card table[id*="GridView"] {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    font-size: 0.875rem;
    border: none !important; /* Remove all borders for dashboard tables */
}

    .dashboard-card th,
    .dashboard-card .NavGridViewHeaderStyle,
    .dashboard-card table[id*="GridView"] th {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        font-weight: 600;
        padding: 1rem 0.75rem;
        text-align: center;
        border-bottom: 1px solid var(--border-primary);
        font-size: 0.875rem;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
    }

    .dashboard-card td,
    .dashboard-card table[id*="GridView"] td {
        padding: 0.875rem 0.75rem;
        border-bottom: 1px solid var(--border-primary);
        color: var(--text-primary);
        vertical-align: middle;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
    }

    .dashboard-card tr:hover,
    .dashboard-card table[id*="GridView"] tr:hover {
        background: var(--bg-tertiary);
    }

    .dashboard-card .NavGridViewAltRowStyle,
    .dashboard-card table[id*="GridView"] .NavGridViewAltRowStyle {
        background: var(--bg-tertiary);
    }

/* ===========================================
   ENHANCED NAVIGATION WITH SUBMENU SUPPORT
   =========================================== */

/* Base navigation container */
.dc-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
}

/* Navigation items with proper submenu support */
.dc-nav-item,
.nav-item {
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

    .dc-nav-item:hover,
    .nav-item:hover {
        background: var(--bg-tertiary);
        transform: translateX(4px);
    }

    .dc-nav-item.active,
    .nav-item.active {
        background: rgba(79, 70, 229, 0.15);
        border-left: 4px solid var(--accent-primary);
        border-radius: 0.375rem 0 0 0.375rem;
    }

    /* Navigation links and buttons */
    .dc-nav-item a,
    .dc-nav-item button,
    .nav-item a,
    .nav-item button {
        color: var(--text-primary) !important;
        text-decoration: none !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        font-weight: 500;
        border-radius: 0.375rem;
        width: 100%;
        border: none;
        background: transparent;
        cursor: pointer;
        transition: all 0.2s ease;
        font-size: 0.875rem;
    }

        .dc-nav-item a:hover,
        .dc-nav-item button:hover,
        .nav-item a:hover,
        .nav-item button:hover {
            color: var(--text-primary) !important;
            background: rgba(79, 70, 229, 0.1);
        }

/* Navigation toggle buttons (for expandable items) */
.nav-toggle {
    text-align: left;
    font-family: inherit;
}

    .nav-toggle .chevron {
        transition: transform 0.2s ease;
        flex-shrink: 0;
        margin-left: 0.5rem;
    }

    .nav-toggle.expanded .chevron {
        transform: rotate(180deg);
    }

/* Submenu styling */
.submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.025);
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    margin-left: 0.5rem;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

[data-theme="dark"] .submenu {
    background: rgba(255, 255, 255, 0.05);
}

.submenu.expanded {
    max-height: 500px; /* Adjust based on content */
    padding: 0.5rem 0;
}

/* Submenu items */
.submenu a,
.submenu button {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 0.8125rem;
    border-radius: 0.25rem;
    margin: 0.125rem 0.5rem;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    width: calc(100% - 1rem);
    text-align: left;
}

    .submenu a:hover,
    .submenu button:hover {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        transform: translateX(4px);
    }

/* Nested submenu items (for multi-level menus) */
.submenu .submenu {
    margin-left: 1rem;
    border-left: 2px solid var(--border-primary);
    padding-left: 0.5rem;
}

    .submenu .submenu a,
    .submenu .submenu button {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
        color: var(--text-tertiary) !important;
    }

        .submenu .submenu a:hover,
        .submenu .submenu button:hover {
            color: var(--text-secondary) !important;
        }

/* Icon styling in navigation */
.dc-nav-item svg,
.nav-item svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.dc-nav-item:hover svg,
.nav-item:hover svg,
.dc-nav-item.active svg,
.nav-item.active svg {
    color: var(--accent-primary);
}

/* Special styling for the current page indicator */
.dc-nav-item.current-page,
.nav-item.current-page {
    background: var(--accent-primary) !important;
    color: white !important;
}

    .dc-nav-item.current-page a,
    .dc-nav-item.current-page button,
    .nav-item.current-page a,
    .nav-item.current-page button {
        color: white !important;
    }

    .dc-nav-item.current-page svg,
    .nav-item.current-page svg {
        color: white !important;
    }

/* Mobile responsive adjustments */
@media (max-width: 1023px) {
    .dc-nav {
        padding: 0.75rem;
    }

    .dc-nav-item a,
    .dc-nav-item button,
    .nav-item a,
    .nav-item button {
        padding: 0.875rem;
        font-size: 1rem;
    }

    .submenu a,
    .submenu button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Dark mode overrides for navigation */
[data-theme="dark"] .dc-nav-item a,
[data-theme="dark"] .dc-nav-item button,
[data-theme="dark"] .nav-item a,
[data-theme="dark"] .nav-item button {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dc-nav-item:hover a,
[data-theme="dark"] .dc-nav-item:hover button,
[data-theme="dark"] .nav-item:hover a,
[data-theme="dark"] .nav-item:hover button {
    color: var(--text-primary) !important;
    background: rgba(139, 92, 246, 0.2) !important;
}

[data-theme="dark"] .submenu a,
[data-theme="dark"] .submenu button {
    color: var(--text-secondary) !important;
}

    [data-theme="dark"] .submenu a:hover,
    [data-theme="dark"] .submenu button:hover {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
    }

/* Animation improvements */
@keyframes submenuExpand {
    from {
        max-height: 0;
        opacity: 0;
    }

    to {
        max-height: 500px;
        opacity: 1;
    }
}

@keyframes submenuCollapse {
    from {
        max-height: 500px;
        opacity: 1;
    }

    to {
        max-height: 0;
        opacity: 0;
    }
}

.submenu.expanding {
    animation: submenuExpand 0.3s ease forwards;
}

.submenu.collapsing {
    animation: submenuCollapse 0.3s ease forwards;
}

/* ===========================================
   FIX FOR NAVIGATION DROPDOWN ISSUE
   =========================================== */

/* Hide any select elements that shouldn't be in navigation */
.dc-nav select,
.dc-sidebar select,
nav select {
    display: none !important;
}

/* Ensure navigation buttons and links display properly */
.dc-nav button,
.dc-nav a,
.dc-sidebar button,
.dc-sidebar a,
nav button,
nav a {
    display: flex !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    text-align: left !important;
    font-family: inherit !important;
    cursor: pointer !important;
}

/* Fix for items that might be rendered as form controls */
.dc-nav .nav-toggle,
.dc-sidebar .nav-toggle,
nav .nav-toggle {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.375rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

/* Ensure chevron icons are properly positioned */
.nav-toggle .chevron {
    margin-left: auto !important;
    flex-shrink: 0 !important;
    width: 1rem !important;
    height: 1rem !important;
    transition: transform 0.2s ease !important;
}

/* Fix any stray form elements in navigation */
.dc-nav form,
.dc-sidebar form,
nav form {
    display: contents !important;
}

.dc-nav input,
.dc-sidebar input,
nav input {
    display: none !important;
}

/* Ensure proper spacing for navigation text */
.dc-nav .nav-toggle span,
.dc-sidebar .nav-toggle span,
nav .nav-toggle span {
    flex: 1 !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

/* Force proper rendering of navigation containers */
.dc-nav-item,
.nav-item {
    display: block !important;
    width: 100% !important;
    margin-bottom: 0.25rem !important;
}

/* Fix expanded state for submenus */
.submenu.expanded,
.dc-nav-submenu.expanded {
    max-height: none !important;
    overflow: visible !important;
    padding: 0.5rem 0 !important;
    margin-left: 1rem !important;
    border-left: 2px solid var(--border-primary) !important;
    padding-left: 0.75rem !important;
}

/* Dark mode fixes for navigation */
[data-theme="dark"] .nav-toggle {
    color: var(--text-primary) !important;
}

    [data-theme="dark"] .nav-toggle:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: var(--text-primary) !important;
    }

[data-theme="dark"] .submenu a,
[data-theme="dark"] .dc-nav-submenu a {
    color: var(--text-secondary) !important;
}

    [data-theme="dark"] .submenu a:hover,
    [data-theme="dark"] .dc-nav-submenu a:hover {
        color: var(--text-primary) !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

/* ===========================================
   MISCUTILS PAGE - FULL WIDTH STACKED PANELS (Compatible Version)
   =========================================== */

/* Force all content grids to stack vertically for now - can be refined later */
body .dc-content-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
}

    body .dc-content-grid .dc-content-card {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        margin-bottom: 0 !important;
    }

/* Override the original grid behavior completely */
.dc-content-grid {
    grid-template-columns: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dc-content-grid {
        gap: 1.5rem !important;
    }
}

/* ===========================================
   LOADING ANIMATION FIXES
   =========================================== */

/* Fix the loading spinner that's showing as a box */
.dc-spinner {
    display: inline-block !important;
    width: 48px !important;
    height: 48px !important;
    border: 6px solid #e5e7eb !important; /* Light gray border */
    border-top: 6px solid var(--accent-primary) !important; /* Accent color for spinning part */
    border-radius: 50% !important;
    animation: dc-spin 1s linear infinite !important;
    box-sizing: border-box !important;
    background: transparent !important;
    margin: 0 auto !important;
}

/* Modernize blockUI overlay and spinner centering */
.blockUI.blockMsg {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: auto !important;
    height: auto !important;
    position: fixed !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
}

.blockUI.blockOverlay {
    background: rgba(15, 23, 42, 0.6) !important; /* Dark overlay for modern look */
    opacity: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9998 !important;
}

/* Ensure the spinner animation works properly */
@keyframes dc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Misc Utils Buttons */
.dc-btn {
    /*display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;*/
    display: inline-flex;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    background: var(--accent-primary);
    color: white;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    gap: 0.5rem;
}

.dc-btn-primary {
    background: var(--accent-primary);
    color: white;
}

    .dc-btn-primary:hover {
        background: var(--accent-hover);
    }

/* ===========================================
   GLOBAL TABLE BORDER REMOVAL - REMOVE ALL GRID LINES
   =========================================== */

/* Remove ALL borders from ALL tables site-wide */
table,
.GridView,
table[id*="GridView"],
.NavGridViewHeaderStyle,
.NavGridViewRowStyle,
.NavGridViewAltRowStyle {
    border: none !important;
    border-collapse: collapse !important;
}

    /* Remove ALL cell borders */
    table td,
    table th,
    .GridView td,
    .GridView th,
    table[id*="GridView"] td,
    table[id*="GridView"] th {
        border: none !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
/*        border-bottom: 1px solid var(--border-primary) !important;
*/        padding: 0.875rem 0.75rem !important;
        vertical-align: middle !important;
    }

    /* Header styling without borders */
    /*table th,
    .GridView th,
    table[id*="GridView"] th,
    .NavGridViewHeaderStyle {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
        font-weight: 600 !important;
        border-bottom: 2px solid var(--border-primary) !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        padding: 1rem 0.75rem !important;
        text-align: center !important;
    }*/

    /* Row styling without side borders */
    table td,
    .GridView td,
    table[id*="GridView"] td {
/*        background: var(--bg-secondary) !important;
*/        color: var(--text-primary) !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
    }

    /* Alternating row colors without borders */
    /*.NavGridViewAltRowStyle,
    table tr:nth-child(even) td {
        background: var(--bg-tertiary) !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
    }*/

    /* Hover effects without borders */
    /*table tr:hover td,
    .GridView tr:hover td,
    table[id*="GridView"] tr:hover td {
        background: var(--bg-tertiary) !important;
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
    }*/

/* Dark mode support */
[data-theme="dark"] table td,
[data-theme="dark"] .GridView td,
[data-theme="dark"] table[id*="GridView"] td {
    border-bottom-color: var(--border-primary) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

[data-theme="dark"] table th,
[data-theme="dark"] .GridView th,
[data-theme="dark"] table[id*="GridView"] th {
    border-bottom-color: var(--border-primary) !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* Override any existing border styles */
.dc-grid-container table,
.dc-grid-container .GridView {
    border: none !important;
}

.dc-grid-container th,
.dc-grid-container td {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* Remove any container borders */
.dc-grid-container {
    border: none !important;
}

/* Ensure search results have no borders */
.dc-results-container table,
.dc-search-form table {
    border: none !important;
}

.dc-results-container td,
.dc-results-container th,
.dc-search-form td,
.dc-search-form th {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* Override legacy styles */
.legacy-table {
    border: none !important;
}

    .legacy-table td,
    .legacy-table th {
        border-left: none !important;
        border-right: none !important;
        border-top: none !important;
        border-bottom: 1px solid var(--border-primary) !important;
    }

/* Dashboard tables - completely borderless except bottom lines */
.dashboard-card table,
.dashboard-card .GridView,
.dashboard-card table[id*="GridView"] {
    border: none !important;
}

.dashboard-card th,
.dashboard-card td {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* ===========================================
   LIGHT THEME - ICON FILTERS
   =========================================== */
:root input[type="image"][src*="hasAttachment.svg"],
:root input[type="image"][src*="noAttachment.svg"],
:root input[type="image"][src*="file-text.svg"],
:root input[type="image"][src*="attached"],
[data-theme="light"] input[type="image"][src*="hasAttachment.svg"],
[data-theme="light"] input[type="image"][src*="noAttachment.svg"],
[data-theme="light"] input[type="image"][src*="file-text.svg"],
[data-theme="light"] input[type="image"][src*="attached"] {
    filter: invert(1) !important;
}


/* ===========================================
   DARK THEME - ICON FILTERS - REMOVE
   =========================================== */
[data-theme="dark"] input[type="image"][src*="hasAttachment.svg"],
[data-theme="dark"] input[type="image"][src*="noAttachment.svg"],
[data-theme="dark"] input[type="image"][src*="file-text.svg"],
[data-theme="dark"] input[type="image"][src*="attached"] {
    filter: none !important;
}

/* ===========================================
   FIX FOR NAVIGATION LIST ITEM CLIPPING
   =========================================== */

/* Fix submenu container to prevent clipping */
.dc-nav-submenu,
.submenu {
    max-height: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.025);
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    margin-left: 0rem; /* Remove left margin that causes positioning issues */
    transition: max-height 0.3s ease, padding 0.3s ease;
    position: relative; /* Ensure proper positioning context */
    z-index: 10; /* Ensure submenu appears above other elements */
}

[data-theme="dark"] .dc-nav-submenu,
[data-theme="dark"] .submenu {
    background: rgba(255, 255, 255, 0.05);
}

.dc-nav-submenu.expanded,
.submenu.expanded {
    max-height: none !important; /* Remove height constraint */
    overflow: visible !important; /* Allow content to be fully visible */
    padding: 0.5rem 0;
    margin-left: 0.75rem; /* Indent only when expanded */
    border-left: 2px solid var(--border-primary);
    padding-left: 0.75rem;
}

/* Fix individual submenu items positioning */
.submenu a,
.submenu button {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary) !important;
    text-decoration: none;
    font-size: 0.8125rem;
    border-radius: 0.25rem;
    margin: 0.125rem 0; /* Remove side margins that cause clipping */
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%; /* Full width instead of calc */
    text-align: left;
    position: relative; /* Ensure proper positioning */
    box-sizing: border-box; /* Include padding in width calculation */
}

    .submenu a:hover,
    .submenu button:hover {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        transform: translateX(4px);
    }

/* Ensure navigation container has proper overflow handling */
.dc-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: visible; /* Prevent horizontal clipping */
    min-height: 0;
}

/* Fix navigation item containers */
.dc-nav-item,
.nav-item {
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
    position: relative; /* Ensure proper positioning context */
    overflow: visible; /* Prevent clipping of child elements */
}

    /* Ensure proper stacking context for expanded submenus */
    .dc-nav-item.expanded,
    .nav-item.expanded {
        z-index: 10;
    }

/* Fix for sidebar container to accommodate expanded submenus */
.dc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    overflow: visible; /* Allow content to extend if needed */
}

/* Specific fix for navigation buttons and links */
.dc-nav-item a,
.dc-nav-item button,
.nav-item a,
.nav-item button {
    color: var(--text-primary) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    width: 100%;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    position: relative; /* Ensure proper positioning */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Dark mode fixes for the clipping issue */
[data-theme="dark"] .submenu a,
[data-theme="dark"] .submenu button {
    color: var(--text-secondary) !important;
}

    [data-theme="dark"] .submenu a:hover,
    [data-theme="dark"] .submenu button:hover {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
    }
/* ===========================================
   CREDIT APPLICATION SEARCH - DARK MODE FIXES
   =========================================== */

/* Fix input field visibility in dark mode */
[data-theme="dark"] .dc-entity-search-fields input[type="text"],
[data-theme="dark"] .dc-entity-search-fields select,
[data-theme="dark"] .dc-search-form input[type="text"],
[data-theme="dark"] .dc-search-form select,
[data-theme="dark"] .dc-adhoc-container input[type="text"],
[data-theme="dark"] .dc-adhoc-container select {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    color: var(--text-primary) !important;
}

    [data-theme="dark"] .dc-entity-search-fields input[type="text"]:focus,
    [data-theme="dark"] .dc-entity-search-fields select:focus,
    [data-theme="dark"] .dc-search-form input[type="text"]:focus,
    [data-theme="dark"] .dc-search-form select:focus,
    [data-theme="dark"] .dc-adhoc-container input[type="text"]:focus,
    [data-theme="dark"] .dc-adhoc-container select:focus {
        background: var(--bg-tertiary) !important;
        border-color: var(--accent-primary) !important;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
    }

/* Fix "Add custom (Ad Hoc) search" link visibility in dark mode */
[data-theme="dark"] .dc-adhoc-container a,
[data-theme="dark"] .dc-adhoc-container button,
[data-theme="dark"] #divAdHoc a,
[data-theme="dark"] #divAdHoc button,
[data-theme="dark"] #divAdHoc .dc-btn,
[data-theme="dark"] #divAdHoc span a {
    color: #60a5fa !important; /* Light blue for dark mode */
    text-decoration: none !important;
}

    [data-theme="dark"] .dc-adhoc-container a:hover,
    [data-theme="dark"] .dc-adhoc-container button:hover,
    [data-theme="dark"] #divAdHoc a:hover,
    [data-theme="dark"] #divAdHoc button:hover,
    [data-theme="dark"] #divAdHoc .dc-btn:hover,
    [data-theme="dark"] #divAdHoc span a:hover {
        color: #93c5fd !important; /* Lighter blue on hover */
        text-decoration: underline !important;
    }

/* Fix AdHoc search panel background and borders */
[data-theme="dark"] .dc-adhoc-container,
[data-theme="dark"] #divAdHoc {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
}

/* Fix any remaining blue links in search forms */
[data-theme="dark"] .dc-search-form a[style*="color:#2563eb"],
[data-theme="dark"] .dc-search-form a[style*="color: #2563eb"],
[data-theme="dark"] .dc-search-form a[style*="color:blue"],
[data-theme="dark"] .dc-search-form a[style*="color: blue"] {
    color: #60a5fa !important;
}

/* Style the plus icon for better visibility */
[data-theme="dark"] .dc-adhoc-container img[src*="plus.svg"],
[data-theme="dark"] #divAdHoc img[src*="plus.svg"] {
    filter: brightness(0) saturate(100%) invert(64%) sepia(11%) saturate(1388%) hue-rotate(194deg) brightness(102%) contrast(96%) !important;
}


/* ===========================================
   BUTTON SVGs WITH ICONS
   =========================================== */

/* Command Panel Button Icons */
.dc-command-panel a,
.dc-command-panel input[type="submit"],
.dc-command-panel button {
    position: relative;
    padding-left: 2.5rem;
}

    /* New */
    .dc-command-panel a[href*="NewCustomField"]::before,
    .dc-command-panel a[href*="NewFinancialEntity"]::before,
    .dc-command-panel a[href*="NewCustomer"]::before,
    .dc-command-panel a[href*="NewComment"]::before,
    .dc-command-panel a[href*="NewThirdParty"]::before,
    .dc-command-panel a[href*="NewLead"]::before,
    .dc-command-panel a[href*="NewQuote"]::before,
    .dc-command-panel a[href*="NewSecurityRole"]::before,
    .dc-command-panel a[href*="NewWorkflowRole"]::before,
    .dc-command-panel a[href*="NewEmailMsg"]::before,
    .dc-command-panel a[href*="NewApp"]::before,
    .dc-command-panel a[href*="NewDDForm"]::before,
    .dc-command-panel a[href*="NewAdHocReport"]::before,
    .dc-command-panel a[href*="NewUser"]::before,
    .dc-command-panel a[href*="SaveTableValues"]::before,
    .dc-command-panel a[href*="NewDocumentInfo"]::before,
    .dc-command-panel a[href*="NewReportInfo"]::before,
    .dc-command-panel input[value*="New"]::before,
    .dc-add-btn::before,
    .dc-command-panel button[name*="New"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v16m8-8H4'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    .dc-command-panel a[href*="Generate"]::before,
    .dc-command-panel input[value*="Generate"]::before,
    .dc-command-panel button[name*="Generate"]::before,
    .dc-command-panel button[id*="Generate"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    /* Search */
    .dc-command-panel a[href*="Search"]::before,
    .dc-command-panel input[value*="Search"]::before,
    .dc-command-panel button[name*="Search"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Edit */
    .dc-command-panel a[href*="Edit"]::before,
    .dc-command-panel input[value*="Edit"]::before,
    .dc-command-panel button[name*="Edit"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Delete */
    .dc-command-panel a[href*="Delete"]::before,
    .dc-command-panel input[value*="Delete"]::before,
    .dc-command-panel button[name*="Delete"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* View */
    .dc-command-panel a[href*="View"]::before,
    .dc-command-panel input[value*="View"]::before,
    .dc-command-panel button[name*="View"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Save */
    .dc-command-panel a[href*="SaveCustomer"]::before,
    .dc-command-panel a[href*="SaveFinancialEntity"]::before,
    .dc-command-panel a[href*="SaveQuote"]::before,
    .dc-command-panel a[href*="SaveLead"]::before,
    .dc-command-panel a[href*="SaveCustomField"]::before,
    .dc-command-panel a[href*="SaveSalesLeadMapping"]::before,
    .dc-command-panel a[href*="SaveSecurityRole"]::before,
    .dc-command-panel a[href*="SaveWorkflowRole"]::before,
    .dc-command-panel a[href*="SavePasswordRules"]::before,
    .dc-command-panel a[href*="SaveEmailMsg"]::before,
    .dc-command-panel a[href*="SaveDocumentInfo"]::before,
    .dc-command-panel a[href*="SaveProgram"]::before,
    .dc-command-panel a[href*="SaveComment"]::before,
    .dc-command-panel a[href*="SaveSiteMap"]::before,
    .dc-command-panel a[href*="SaveCommandLink"]::before,
    .dc-command-panel a[href*="SaveAdHocReport"]::before,
    .dc-command-panel a[href*="SaveApp"]::before,
    .dc-btn#ctl00_BCP_SaveUser::before,
    .dc-command-panel a[href*="SaveThirdParty"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17 16v2a2 2 0 01-2 2H9a2 2 0 01-2-2V6a2 2 0 012-2h6a2 2 0 012 2v2'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6M9 16h6'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Save - Enter Another */
    .dc-command-panel a[href*="SaveCustFieldAnother"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Crect x='3' y='4' width='12' height='14' rx='2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Crect x='7' y='6' width='6' height='4' rx='1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M3 12h12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='18' cy='12' r='4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M18 10v4m-2-2h4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Cancel */
    .dc-command-panel a[href*="CancelCustomer"]::before,
    .dc-command-panel a[href*="Cancel"]::before,
    .dc-command-panel a[href*="ExitNoSave"]::before,
    .dc-command-panel input[value*="Cancel"]::before,
    .dc-command-panel input[value*="CancelProgram"]::before,
    .dc-command-panel input[value*="CancelUserChanges"]::before,
    .dc-command-panel button[name*="Cancel"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Worklist */
    .dc-command-panel a[href*="AppWorklist"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Crect x='6' y='4' width='12' height='16' rx='2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M9 8h6M9 12h6M9 16h6'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Save & Exit */
    .dc-command-panel a[href*="SaveExitQuote"]::before,
    .dc-command-panel a[href*="SaveExitFinancialEntity"]::before,
    .dc-command-panel a[href*="SaveRuleDefinitionExit"]::before,
    .dc-command-panel a[href*="SaveEmailMsgExit"]::before,
    .dc-command-panel a[href*="SaveTableValuesExit"]::before,
    .dc-command-panel a[href*="SaveDocumentInfoExit"]::before,
    .dc-command-panel a[href*="SaveReportInfoExit"]::before,
    .dc-command-panel a[href*="SaveExitAdHocReport"]::before,
    .dc-command-panel a[href*="SaveAppExit"]::before,
    .dc-command-panel a[href*="SaveExitCustomer"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17 16v2a2 2 0 01-2 2H9a2 2 0 01-2-2V6a2 2 0 012-2h6a2 2 0 012 2v2'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6M9 16h6'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 12l2 2-2 2'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Create New */
    .dc-command-panel a[href*="SalesLeadToThirdParty"]::before,
    .dc-command-panel a[href*="NewQuoteCustomer"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Crect x='4' y='4' width='16' height='16' rx='2' stroke='white' stroke-width='2' fill='none'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 10h8M8 14h5'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 8v2m0 4v2'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Return */
    .dc-command-panel a[href*="ReturnToCRMWorklist"]::before,
    .dc-command-panel a[href*="Return"]::before,
    .dc-command-panel a[href*="RetToDocTemplateList"]::before,
    .dc-command-panel a[href*="ReturnToQuoteWorklist"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 19l-7-7 7-7'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Documents */
    .dc-command-panel a[href*="QuoteDocuments"]::before,
    .dc-command-panel a[href*="AppDocuments"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 7V3a2 2 0 012-2h6a2 2 0 012 2v4m-2 0H7m0 0v14a2 2 0 002 2h6a2 2 0 002-2V7m-10 0h10'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Create App */
    .dc-command-panel a[href*="QuoteToApp"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Crect x='4' y='4' width='16' height='16' rx='2' stroke='white' stroke-width='2' fill='none'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v8m-4-4h8'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Add Reminder */
    .dc-command-panel a[href*="FollowUpDateCL"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 17h5m-2.5-2.5v5M18 8a6 6 0 10-12 0c0 7-3 9-3 9h18s-3-2-3-9z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Add Attachment */
    .dc-command-panel a[href*="QuoteAttachments"]::before,
    .dc-command-panel a[href*="AppAttachments"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 12.79V7a5 5 0 00-10 0v10a3 3 0 006 0V8'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Expire Passwords */
    .dc-command-panel a[href*="ExpirePasswords"]::before,
    .dc-command-panel a[href*="ExpirePassword"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Crect x='6' y='10' width='12' height='10' rx='2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 10V7a3 3 0 116 0v3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='16' r='3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 14v2l1 1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Set Required */
    .dc-command-panel a[href*="SetRequiredDocs"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Ccircle cx='12' cy='12' r='9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 12l2 2 4-4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Email Package */
    .dc-command-panel a[href*="EmailDocs"]::before,
    .dc-command-panel a[href*="EmailQuoteDocs"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='3 7 12 13 21 7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Download All */
    .dc-command-panel a[href*="DownloadALLRDL"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Crect x='6' y='4' width='12' height='16' rx='2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9 10v4m0 0l-2-2m2 2l2-2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 10v4m0 0l-2-2m2 2l2-2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M15 10v4m0 0l-2-2m2 2l2-2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

    /* Submit */
    .dc-command-panel a[href*="SubmitApplication"]::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Ccircle cx='12' cy='12' r='9' stroke-width='2'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12l-3-3m3 3l-3 3'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
    }

/* Dark mode adjustments for SVG icons */
[data-theme="dark"] .dc-command-panel a[href*="Generate"]::before,
[data-theme="dark"] .dc-command-panel input[value*="Generate"]::before,
[data-theme="dark"] .dc-command-panel button[name*="Generate"]::before,
[data-theme="dark"] .dc-command-panel button[id*="Generate"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'/%3E%3C/svg%3E");
}

[data-theme="dark"] .dc-command-panel a[href*="Create"]::before,
[data-theme="dark"] .dc-command-panel input[value*="Create"]::before,
[data-theme="dark"] .dc-command-panel button[name*="Create"]::before,
[data-theme="dark"] .dc-command-panel button[id*="Create"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v16m8-8H4'/%3E%3C/svg%3E");
}


/* ===========================================
   CUSTOM FIELD PAGE STYLES
   =========================================== */

/* Table name highlight in page description */
.dc-table-name-highlight {
    font-weight: 600;
    color: var(--accent-primary);
    font-style: italic;
}

/* Messages Section */
.dc-messages-section {
    margin-bottom: 1.5rem;
}

.dc-validation-summary {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--error);
    font-weight: 500;
}

    .dc-validation-summary[style*="display: none"] {
        display: none !important;
    }

.dc-error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--error);
    font-weight: 500;
    margin-bottom: 1rem;
    display: block;
}

    .dc-error-message[style*="visibility: hidden"],
    .dc-error-message[Visible="False"] {
        display: none !important;
    }

/* Custom Field Form Styling */
.dc-custom-field-form {
    background: transparent;
}

/* Command Panel Content */
.dc-command-panel-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Form Section */
.dc-form-section {
    background: transparent;
}

/* Dark Mode Support for Custom Field Page */
[data-theme="dark"] .dc-table-name-highlight {
    color: var(--accent-primary);
}

[data-theme="dark"] .dc-validation-summary {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
    color: #fca5a5;
}

[data-theme="dark"] .dc-error-message {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
    color: #fca5a5;
}

/* Legacy Nav Field Label Classes - Modern Styling */
.NavFieldLabelRequired {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

    .NavFieldLabelRequired::after {
        content: ' *';
        color: var(--error);
        font-weight: bold;
    }

.NavFieldLabelDisabled {
    color: var(--text-tertiary) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    opacity: 0.6;
}

.NavFieldDescriptionLabel {
    color: var(--text-secondary) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

/* Custom Field Form Controls */
.dc-custom-field-form input[type="text"],
.dc-custom-field-form select,
.dc-custom-field-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

    .dc-custom-field-form input[type="text"]:focus,
    .dc-custom-field-form select:focus,
    .dc-custom-field-form textarea:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        background: var(--bg-primary);
    }

    .dc-custom-field-form input[type="text"]:disabled,
    .dc-custom-field-form select:disabled,
    .dc-custom-field-form textarea:disabled {
        background: var(--bg-tertiary);
        color: var(--text-tertiary);
        opacity: 0.6;
        cursor: not-allowed;
    }

    .dc-custom-field-form input[type="text"][readonly],
    .dc-custom-field-form textarea[readonly] {
        background: var(--bg-tertiary);
        color: var(--text-tertiary);
        cursor: not-allowed;
    }

/* Custom Field Form Labels */
.dc-custom-field-form label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

/* Custom Field Form Groups */
.dc-custom-field-form .form-group,
.dc-custom-field-form .dc-form-group {
    margin-bottom: 1.25rem;
}

/* Dark Mode Support for Form Controls */
[data-theme="dark"] .dc-custom-field-form input[type="text"],
[data-theme="dark"] .dc-custom-field-form select,
[data-theme="dark"] .dc-custom-field-form textarea {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
    color: var(--text-primary);
}

    [data-theme="dark"] .dc-custom-field-form input[type="text"]:focus,
    [data-theme="dark"] .dc-custom-field-form select:focus,
    [data-theme="dark"] .dc-custom-field-form textarea:focus {
        background: var(--bg-secondary);
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    }

    [data-theme="dark"] .dc-custom-field-form input[type="text"]:disabled,
    [data-theme="dark"] .dc-custom-field-form select:disabled,
    [data-theme="dark"] .dc-custom-field-form textarea:disabled {
        background: var(--bg-primary);
        color: var(--text-tertiary);
    }

    [data-theme="dark"] .dc-custom-field-form input[type="text"][readonly],
    [data-theme="dark"] .dc-custom-field-form textarea[readonly] {
        background: var(--bg-primary);
        color: var(--text-tertiary);
    }

[data-theme="dark"] .dc-custom-field-form label {
    color: var(--text-primary);
}

/* Legacy class overrides for dark mode */
[data-theme="dark"] .NavFieldLabelRequired {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .NavFieldLabelDisabled {
    color: var(--text-tertiary) !important;
}

[data-theme="dark"] .NavFieldDescriptionLabel {
    color: var(--text-secondary) !important;
}

/* Data Entry Header Legacy Support */
.dataEntryHeader {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    font-size: 1.125rem !important;
    margin-bottom: 1rem !important;
}

[data-theme="dark"] .dataEntryHeader {
    color: var(--text-primary) !important;
}

/* Legacy blueBox modernization for command panel */
.dc-command-panel-content .blueBox {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .dc-command-panel-content .blueBox:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
        color: white;
        text-decoration: none;
    }

[data-theme="dark"] .dc-command-panel-content .blueBox {
    background: var(--accent-primary);
    color: white;
}

    [data-theme="dark"] .dc-command-panel-content .blueBox:hover {
        background: var(--accent-hover);
        color: white;
    }

/* Responsive adjustments for Custom Field page */
@media (max-width: 768px) {
    .dc-page-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dc-command-panel-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

        .dc-command-panel-content .blueBox {
            text-align: center;
            justify-content: center;
        }

    .dc-custom-field-form {
        padding: 0.5rem;
    }
}

/* Fix the form layout to use proper grid structure */
.dc-custom-field-form table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.submenu {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

.chevron {
    transition: transform 0.3s ease-in-out;
}

/* TextBoxAscx override */
.dc-form-section input[type="text"],
.dc-form-section input[type="password"],
.dc-form-section textarea,
.dc-form-section select {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    border: 2px solid var(--border-primary);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    /*transition: all 0.3s ease;*/
    outline: none;
}

/* Search Results Header */
table > caption,
.dataEntryHeader {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--bg-tertiary);
    padding: 0.75rem 1.5rem;
    /*border-radius: 0.75rem;*/
    /*margin-bottom: 0.5rem;*/
    /*margin-top: 0.5rem;*/
    letter-spacing: 0.03em;
    box-shadow: var(--shadow-sm)
}


/* Icon Sizes */
.dc-icon-xs {
    width: 0.75rem;
    height: 0.75rem;
}

.dc-icon-sm {
    width: 1rem;
    height: 1rem;
}

.dc-icon-md {
    width: 1.25rem;
    height: 1.25rem;
}

.dc-icon-lg {
    width: 1.5rem;
    height: 1.5rem;
}

.dc-icon-xl {
    width: 2rem;
    height: 2rem;
}

/* ===========================================
   DATEPICKER POSITIONING FOR SEARCH FORMS
   =========================================== */

/* Target datepicker inputs and position the datepicker button inline */
.dc-entity-search-fields .calender.hasDatepicker {
    display: inline-block !important;
    width: auto !important;
    margin-right: 0.5rem !important;
}

    /* Position datepicker button inline with the input */
    .dc-entity-search-fields .calender.hasDatepicker + .ui-datepicker-trigger,
    .dc-entity-search-fields .calender.hasDatepicker + img[src*="calendar"] {
        display: inline-block !important;
        vertical-align: middle !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
        cursor: pointer !important;
        width: 1.5rem !important;
        height: 1.5rem !important;
    }

/* Alternative: Position datepicker button next to the label */
.dc-entity-search-fields label:has(+ .calender.hasDatepicker) {
    display: inline-block !important;
    margin-right: 0.5rem !important;
}

    .dc-entity-search-fields label:has(+ .calender.hasDatepicker)::after {
        content: '';
        display: inline-block;
        width: 1.5rem;
        height: 1.5rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 002 2z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        margin-left: 0.5rem;
        vertical-align: middle;
        cursor: pointer;
    }

/* Ensure the container allows inline layout */
.dc-entity-search-fields .form-group:has(.calender.hasDatepicker),
.dc-entity-search-fields .dc-form-group:has(.calender.hasDatepicker) {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

/* Handle date range fields (from/to dates) */
.dc-entity-search-fields td:has(.calender.hasDatepicker) {
    white-space: nowrap !important;
}

.dc-entity-search-fields .calender.hasDatepicker[id*="From"],
.dc-entity-search-fields .calender.hasDatepicker[id*="Start"] {
    margin-right: 0.75rem !important;
}

.dc-entity-search-fields .calender.hasDatepicker[id*="To"],
.dc-entity-search-fields .calender.hasDatepicker[id*="End"] {
    margin-left: 0.75rem !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .dc-entity-search-fields .form-group:has(.calender.hasDatepicker),
    .dc-entity-search-fields .dc-form-group:has(.calender.hasDatepicker) {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .dc-entity-search-fields .calender.hasDatepicker + .ui-datepicker-trigger,
    .dc-entity-search-fields .calender.hasDatepicker + img[src*="calendar"] {
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
    }
}

/* Dark mode support */
[data-theme="dark"] .dc-entity-search-fields .calender.hasDatepicker + .ui-datepicker-trigger,
[data-theme="dark"] .dc-entity-search-fields .calender.hasDatepicker + img[src*="calendar"] {
    filter: brightness(1.2);
}

/* ===========================================
   MODERN JQUERY UI DATEPICKER STYLING - FIXED ARROWS V2
   =========================================== */

/* Main datepicker container */
.ui-datepicker {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--shadow-xl) !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 0.875rem !important;
    width: auto !important;
    z-index: 9999 !important;
}

    /* Header styling */
    .ui-datepicker .ui-datepicker-header {
        background: var(--bg-tertiary) !important;
        border: none !important;
        border-radius: 0.75rem 0.75rem 0 0 !important;
        padding: 1rem !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Month/Year title */
    .ui-datepicker .ui-datepicker-title {
        color: var(--text-primary) !important;
        font-weight: 600 !important;
        font-size: 1rem !important;
        margin: 0 !important;
        text-align: center !important;
        flex: 1 !important;
    }

    /* Navigation arrows - COMPLETELY REWORKED */
    .ui-datepicker .ui-datepicker-prev,
    .ui-datepicker .ui-datepicker-next {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        width: 2rem !important;
        height: 2rem !important;
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-primary) !important;
        border-radius: 0.375rem !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.2s ease !important;
        text-decoration: none !important;
    }

        .ui-datepicker .ui-datepicker-prev:hover,
        .ui-datepicker .ui-datepicker-next:hover {
            background: var(--accent-primary) !important;
            border-color: var(--accent-primary) !important;
            transform: scale(1.05) !important;
        }

        /* COMPLETELY HIDE the span and replace with direct content */
        .ui-datepicker .ui-datepicker-prev span,
        .ui-datepicker .ui-datepicker-next span {
            display: none !important; /* Completely hide the UI span */
        }

        /* Add proper arrow content directly to the button elements */
        /*.ui-datepicker .ui-datepicker-prev::before {
            content: "<" !important;
            font-size: 1.2rem !important;
            font-weight: bold !important;
            color: var(--text-secondary) !important;
            line-height: 1 !important;
            position: absolute !important;
            top: 50% !important;
            left: 50% !important;
            transform: translate(-50%, -50%) !important;
        }

        .ui-datepicker .ui-datepicker-next::before {
            content: ">" !important;
            font-size: 1.2rem !important;
            font-weight: bold !important;
            color: var(--text-secondary) !important;
            line-height: 1 !important;
            position: absolute !important;
            top: 50% !important;
            left: 50% !important;
            transform: translate(-50%, -50%) !important;
        }*/

        /* Change arrow color on hover */
        .ui-datepicker .ui-datepicker-prev:hover::before,
        .ui-datepicker .ui-datepicker-next:hover::before {
            color: white !important;
        }

    /* Calendar table */
    .ui-datepicker table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 0 !important;
        background: transparent !important;
    }

    /* Day headers */
    .ui-datepicker .ui-datepicker-calendar thead th {
        background: var(--bg-tertiary) !important;
        color: var(--text-secondary) !important;
        font-weight: 600 !important;
        font-size: 0.75rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        padding: 0.75rem 0.5rem !important;
        border: none !important;
        text-align: center !important;
    }

    /* Day cells */
    .ui-datepicker .ui-datepicker-calendar tbody td {
        padding: 0.25rem !important;
        border: none !important;
        background: transparent !important;
    }

        /* Day links */
        .ui-datepicker .ui-datepicker-calendar tbody td a {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            width: 2.25rem !important;
            height: 2.25rem !important;
            border-radius: 0.375rem !important;
            color: var(--text-primary) !important;
            text-decoration: none !important;
            font-weight: 500 !important;
            transition: all 0.2s ease !important;
            border: none !important;
            background: transparent !important;
            margin: 0 !important;
            font-size: 0.875rem !important;
        }

            .ui-datepicker .ui-datepicker-calendar tbody td a:hover {
                background: var(--accent-primary) !important;
                color: white !important;
                transform: scale(1.1) !important;
            }

        /* Today's date */
        .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-today a {
            background: var(--success) !important;
            color: white !important;
            font-weight: 600 !important;
        }

            .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-today a:hover {
                background: #059669 !important;
            }

        /* Selected date */
        .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-current-day a,
        .ui-datepicker .ui-datepicker-calendar tbody td a.ui-state-active {
            background: var(--accent-primary) !important;
            color: white !important;
            font-weight: 600 !important;
        }

        /* Other month dates */
        .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-other-month a {
            color: var(--text-tertiary) !important;
            opacity: 0.5 !important;
        }

            .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-other-month a:hover {
                background: var(--bg-tertiary) !important;
                opacity: 1 !important;
            }

        /* Unselectable dates */
        .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-unselectable {
            opacity: 0.3 !important;
        }

            .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-unselectable span {
                color: var(--text-tertiary) !important;
                background: transparent !important;
                cursor: not-allowed !important;
            }

    /* Week numbers (if enabled) */
    .ui-datepicker .ui-datepicker-calendar .ui-datepicker-week-col {
        color: var(--text-tertiary) !important;
        font-size: 0.75rem !important;
        text-align: center !important;
        padding: 0.5rem !important;
    }

    /* Button panel (if enabled) */
    .ui-datepicker .ui-datepicker-buttonpane {
        background: var(--bg-tertiary) !important;
        border: none !important;
        border-radius: 0 0 0.75rem 0.75rem !important;
        padding: 1rem !important;
        text-align: center !important;
    }

        .ui-datepicker .ui-datepicker-buttonpane button {
            background: var(--accent-primary) !important;
            color: white !important;
            border: none !important;
            border-radius: 0.375rem !important;
            padding: 0.5rem 1rem !important;
            font-size: 0.875rem !important;
            font-weight: 500 !important;
            cursor: pointer !important;
            transition: all 0.2s ease !important;
            margin: 0 0.25rem !important;
        }

            .ui-datepicker .ui-datepicker-buttonpane button:hover {
                background: var(--accent-hover) !important;
                transform: translateY(-1px) !important;
            }

/* Dark mode specific adjustments */
[data-theme="dark"] .ui-datepicker {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

    [data-theme="dark"] .ui-datepicker .ui-datepicker-header {
        background: var(--bg-tertiary) !important;
    }

    [data-theme="dark"] .ui-datepicker .ui-datepicker-title {
        color: var(--text-primary) !important;
    }

    [data-theme="dark"] .ui-datepicker .ui-datepicker-calendar thead th {
        background: var(--bg-tertiary) !important;
        color: var(--text-secondary) !important;
    }

    [data-theme="dark"] .ui-datepicker .ui-datepicker-calendar tbody td a {
        color: var(--text-primary) !important;
    }

    [data-theme="dark"] .ui-datepicker .ui-datepicker-prev::before,
    [data-theme="dark"] .ui-datepicker .ui-datepicker-next::before {
        color: var(--text-secondary) !important;
    }

    [data-theme="dark"] .ui-datepicker .ui-datepicker-prev:hover::before,
    [data-theme="dark"] .ui-datepicker .ui-datepicker-next:hover::before {
        color: white !important;
    }

/* Month/Year dropdowns (if enabled) */
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.375rem !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    margin: 0 0.25rem !important;
}

    .ui-datepicker select.ui-datepicker-month:focus,
    .ui-datepicker select.ui-datepicker-year:focus {
        outline: none !important;
        border-color: var(--accent-primary) !important;
        box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2) !important;
    }

/* Animation for datepicker appearance */
.ui-datepicker {
    animation: datepicker-fadeIn 0.2s ease-out !important;
}

@keyframes datepicker-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ui-datepicker {
        border-radius: 0.5rem !important;
        max-width: calc(100vw - 2rem) !important;
    }

        .ui-datepicker .ui-datepicker-calendar tbody td a {
            width: 2rem !important;
            height: 2rem !important;
            font-size: 0.8125rem !important;
        }

        .ui-datepicker .ui-datepicker-header {
            padding: 0.75rem !important;
        }

        .ui-datepicker .ui-datepicker-title {
            font-size: 0.9375rem !important;
        }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ui-datepicker .ui-datepicker-calendar tbody td a {
        border: 1px solid var(--border-primary) !important;
    }

        .ui-datepicker .ui-datepicker-calendar tbody td a:hover,
        .ui-datepicker .ui-datepicker-calendar tbody td.ui-datepicker-current-day a {
            border: 2px solid var(--accent-primary) !important;
        }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ui-datepicker {
        animation: none !important;
    }

        .ui-datepicker .ui-datepicker-calendar tbody td a,
        .ui-datepicker .ui-datepicker-prev,
        .ui-datepicker .ui-datepicker-next {
            transition: none !important;
        }
}

/* Example: Add spacing to the bottom of NavGridView tables */
.NavGridView {
    margin-bottom: 2rem; /* Adjust as needed */
}

/* ===========================================
   SYSTEMPARAMETERS & NAV CONTROLS STYLING - SPECIFIC FIX
   =========================================== */

/* Target all Nav controls and modernize their appearance */
.dc-card-content input[type="text"],
.dc-card-content input[type="password"],
.dc-card-content textarea,
.dc-card-content select,
.dc-main-panel input[type="text"],
.dc-main-panel input[type="password"],
.dc-main-panel textarea,
.dc-main-panel select,
/* Target specific Nav control classes */
input[id*="NavTextBox"],
input[id*="NavDropDown"],
textarea[id*="NavTextBox"],
select[id*="NavDropDown"],
input[class*="NavTextBox"],
input[class*="NavDropDown"],
textarea[class*="NavTextBox"],
select[class*="NavDropDown"],
/* Target generated form controls */
#MainObjectPanel input[type="text"],
#MainObjectPanel input[type="password"],
#MainObjectPanel textarea,
#MainObjectPanel select {
    width: 100% !important;
    padding: 0.75rem !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.5rem !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

    /* Focus states for Nav controls */
    .dc-card-content input[type="text"]:focus,
    .dc-card-content input[type="password"]:focus,
    .dc-card-content textarea:focus,
    .dc-card-content select:focus,
    .dc-main-panel input[type="text"]:focus,
    .dc-main-panel input[type="password"]:focus,
    .dc-main-panel textarea:focus,
    .dc-main-panel select:focus,
    input[id*="NavTextBox"]:focus,
    input[id*="NavDropDown"]:focus,
    textarea[id*="NavTextBox"]:focus,
    select[id*="NavDropDown"]:focus,
    input[class*="NavTextBox"]:focus,
    input[class*="NavDropDown"]:focus,
    textarea[class*="NavTextBox"]:focus,
    select[class*="NavDropDown"]:focus,
    #MainObjectPanel input[type="text"]:focus,
    #MainObjectPanel input[type="password"]:focus,
    #MainObjectPanel textarea:focus,
    #MainObjectPanel select:focus {
        outline: none !important;
        border-color: var(--accent-primary) !important;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
        background: var(--bg-secondary) !important;
    }

/* Modernize labels associated with Nav controls */
.dc-card-content label,
.dc-main-panel label,
#MainObjectPanel label,
span[class*="NavFieldLabel"] {
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
    font-size: 0.875rem !important;
}

/* Checkbox styling for Nav controls */
.dc-card-content input[type="checkbox"],
.dc-main-panel input[type="checkbox"],
#MainObjectPanel input[type="checkbox"],
input[id*="NavCheckBox"],
input[class*="NavCheckBox"] {
    width: 1.125rem !important;
    height: 1.125rem !important;
    accent-color: var(--accent-primary) !important;
    margin-right: 0.5rem !important;
}

/* Special styling for textarea controls */
.dc-card-content textarea,
.dc-main-panel textarea,
#MainObjectPanel textarea,
textarea[id*="NavTextBox"],
textarea[class*="NavTextBox"] {
    min-height: 6rem !important;
    resize: vertical !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* Drop-down specific styling */
.dc-card-content select,
.dc-main-panel select,
#MainObjectPanel select,
select[id*="NavDropDown"],
select[class*="NavDropDown"] {
    min-height: 2.75rem !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.5rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.5em 1.5em !important;
    padding-right: 2.5rem !important;
}

/* Required field indicators */
span.NavFieldLabelRequired::after {
    content: ' *';
    color: var(--error);
    font-weight: bold;
}

/* Dark mode support for Nav controls */
[data-theme="dark"] .dc-card-content input[type="text"],
[data-theme="dark"] .dc-card-content input[type="password"],
[data-theme="dark"] .dc-card-content textarea,
/*[data-theme="dark"] .dc-card-content select,
*/ [data-theme="dark"] .dc-main-panel input[type="text"],
[data-theme="dark"] .dc-main-panel input[type="password"],
[data-theme="dark"] .dc-main-panel textarea,
[data-theme="dark"] .dc-main-panel select,
[data-theme="dark"] input[id*="NavTextBox"],
[data-theme="dark"] input[id*="NavDropDown"],
[data-theme="dark"] textarea[id*="NavTextBox"],
[data-theme="dark"] select[id*="NavDropDown"],
[data-theme="dark"] input[class*="NavTextBox"],
[data-theme="dark"] input[class*="NavDropDown"],
[data-theme="dark"] textarea[class*="NavTextBox"],
/*[data-theme="dark"] select[class*="NavDropDown"],*/
[data-theme="dark"] #MainObjectPanel input[type="text"],
[data-theme="dark"] #MainObjectPanel input[type="password"],
[data-theme="dark"] #MainObjectPanel textarea,
[data-theme="dark"] #MainObjectPanel select {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .dc-card-content label,
[data-theme="dark"] .dc-main-panel label,
[data-theme="dark"] #MainObjectPanel label,
[data-theme="dark"] span[class*="NavFieldLabel"] {
    color: var(--text-primary) !important;
}

/* Modern Add Button */
.dc-add-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
    min-height: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    margin-bottom: 0.5rem;
    margin-right: 0.75rem;
    white-space: nowrap;
}

    .dc-add-btn:hover {
        background: var(--accent-hover);
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

    .dc-add-btn::before {
        content: '';
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        width: 1rem;
        height: 1rem;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v16m8-8H4'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        pointer-events: none;
        z-index: 1;
    }

[data-theme="dark"] .dc-add-btn {
    background: var(--accent-primary);
    color: white;
}

/* ===========================================
   REQUIRED FIELD VALIDATOR & VALIDATION STYLING - COMPREHENSIVE FIX
   =========================================== */

/* ASP.NET Validation Summary Styling */
.ValidationSummary,
div[id*="ValidationSummary"],
div[class*="ValidationSummary"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid var(--error) !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    color: var(--error) !important;
    font-weight: 500 !important;
    box-shadow: var(--shadow-sm) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 10 !important;
}

    .ValidationSummary ul,
    div[id*="ValidationSummary"] ul,
    div[class*="ValidationSummary"] ul {
        margin: 0 !important;
        padding: 0 0 0 1.5rem !important;
        list-style-type: disc !important;
        color: var(--error) !important;
    }

        .ValidationSummary ul li,
        div[id*="ValidationSummary"] ul li,
        div[class*="ValidationSummary"] ul li {
            margin: 0.5rem 0 !important;
            color: var(--error) !important;
            font-weight: 500 !important;
            line-height: 1.4 !important;
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
        }

/* Individual Field Validators */
span[id*="RequiredFieldValidator"],
span[id*="RegularExpressionValidator"],
span[id*="RangeValidator"],
span[id*="CompareValidator"],
span[id*="CustomValidator"],
.field-validation-error,
.validation-error {
    display: block !important;
    color: var(--error) !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    margin-top: 0.375rem !important;
    margin-bottom: 0 !important;
    padding: 0.25rem 0 !important;
    line-height: 1.3 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    position: relative !important;
    z-index: 5 !important;
}

    /* Ensure validation messages don't get hidden */
    span[id*="RequiredFieldValidator"]:not(:empty),
    span[id*="RegularExpressionValidator"]:not(:empty),
    span[id*="RangeValidator"]:not(:empty),
    span[id*="CompareValidator"]:not(:empty),
    span[id*="CustomValidator"]:not(:empty) {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        min-height: 1.2rem !important;
    }

/* Form Group Container Adjustments to Prevent Clipping */
.form-group,
.dc-form-group,
.dc-custom-field-form .form-group,
td.NavFieldContainerStyle,
.NavFieldContainerStyle {
    margin-bottom: 1.5rem !important;
    overflow: visible !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Input Container Styling to Accommodate Validation Messages */
.input-container,
.dc-input-container,
.form-field-container {
    position: relative !important;
    width: 100% !important;
    margin-bottom: 0.5rem !important;
    overflow: visible !important;
}

/* Ensure Form Controls Have Proper Spacing for Validation Messages */
.dc-form-input,
.form-input,
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    margin-bottom: 0.25rem !important;
}

/* Style Required Field Indicators */
.required-indicator,
.NavFieldLabelRequired::after,
label.required::after,
span.required::after {
    content: ' *' !important;
    color: var(--error) !important;
    font-weight: bold !important;
    margin-left: 0.125rem !important;
}

/* Container for Forms to Ensure Proper Layout */
.dc-card-content,
.dc-main-panel,
#MainObjectPanel,
.main-form-container {
    overflow: visible !important;
    position: relative !important;
}

/* Ensure Tables Don't Clip Validation Messages */
.dc-custom-field-form table,
.form-table,
table.form-layout {
    table-layout: auto !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 0.5rem !important;
}

    .dc-custom-field-form table td,
    .form-table td,
    table.form-layout td {
        vertical-align: top !important;
        padding: 0.5rem !important;
        overflow: visible !important;
        position: relative !important;
    }

/* Validation Panel Styling (if used) */
.validation-panel,
div[id*="ValidationPanel"] {
    background: rgba(239, 68, 68, 0.05) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    border-radius: 0.5rem !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* Error Message Containers */
.error-message-container,
.validation-message-container {
    width: 100% !important;
    overflow: visible !important;
    margin-top: 0.5rem !important;
    padding: 0 !important;
}

/* Responsive Adjustments for Validation Messages */
@media (max-width: 768px) {
    .ValidationSummary,
    div[id*="ValidationSummary"],
    div[class*="ValidationSummary"] {
        margin: 0.75rem 0 !important;
        padding: 0.75rem !important;
        font-size: 0.875rem !important;
    }

    span[id*="RequiredFieldValidator"],
    span[id*="RegularExpressionValidator"],
    span[id*="RangeValidator"],
    span[id*="CompareValidator"],
    span[id*="CustomValidator"] {
        font-size: 0.75rem !important;
        margin-top: 0.25rem !important;
    }

    .form-group,
    .dc-form-group {
        margin-bottom: 1.25rem !important;
    }
}

/* Dark Mode Support for Validation Messages */
[data-theme="dark"] .ValidationSummary,
[data-theme="dark"] div[id*="ValidationSummary"],
[data-theme="dark"] div[class*="ValidationSummary"] {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: var(--error) !important;
    color: #fca5a5 !important;
}

    [data-theme="dark"] .ValidationSummary ul li,
    [data-theme="dark"] div[id*="ValidationSummary"] ul li,
    [data-theme="dark"] div[class*="ValidationSummary"] ul li {
        color: #fca5a5 !important;
    }

[data-theme="dark"] span[id*="RequiredFieldValidator"],
[data-theme="dark"] span[id*="RegularExpressionValidator"],
[data-theme="dark"] span[id*="RangeValidator"],
[data-theme="dark"] span[id*="CompareValidator"],
[data-theme="dark"] span[id*="CustomValidator"],
[data-theme="dark"] .field-validation-error,
[data-theme="dark"] .validation-error {
    color: #fca5a5 !important;
}

[data-theme="dark"] .validation-panel,
[data-theme="dark"] div[id*="ValidationPanel"] {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* Ensure High Z-Index for Validation Messages to Prevent Hiding */
.ValidationSummary,
div[id*="ValidationSummary"],
span[id*="Validator"],
.validation-error,
.field-validation-error {
    z-index: 100 !important;
    position: relative !important;
}

/* Fix for Validation Messages in Grid/Table Layouts */
.dc-grid-container .ValidationSummary,
.dc-results-container .ValidationSummary,
table .ValidationSummary {
    position: relative !important;
    width: auto !important;
    margin: 0.5rem !important;
}

/* Ensure Form Elements Don't Overlap Validation Messages */
.form-group:has(span[id*="Validator"]:not(:empty)),
.dc-form-group:has(span[id*="Validator"]:not(:empty)) {
    margin-bottom: 2rem !important;
}

/* Animation for Validation Message Appearance */
@keyframes validation-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

span[id*="Validator"]:not(:empty) {
    animation: validation-fade-in 0.3s ease-out !important;
}

/* Prevent Text Overflow in Validation Messages */
.ValidationSummary,
div[id*="ValidationSummary"],
span[id*="Validator"] {
    overflow-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto !important;
    max-width: 100% !important;
}

/* Ensure Proper Spacing Around Required Field Labels */
.NavFieldLabelRequired,
label.required,
.required-label {
    margin-bottom: 0.5rem !important;
    display: block !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    line-height: 1.4 !important;
}

/* Fix for ASP.NET UpdatePanel Validation Issues */
div[id*="UpdatePanel"] .ValidationSummary,
div[id*="UpdatePanel"] span[id*="Validator"] {
    position: relative !important;
    z-index: 999 !important;
    visibility: visible !important;
    display: block !important;
}

/* ===========================================
   INVALID PAGE SPECIFIC STYLES
   =========================================== */

/* Invalid page message styling */
.dc-invalid-message {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    display: block;
}

.dc-alert-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: inherit;
}

/* Invalid page information card */
.dc-invalid-info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.dc-invalid-icon-container {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dc-invalid-icon {
    width: 2rem;
    height: 2rem;
    color: var(--warning);
}

.dc-invalid-content {
    flex: 1;
}

.dc-invalid-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.dc-invalid-description {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.dc-invalid-reasons {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .dc-invalid-reasons li {
        padding: 0.5rem 0;
        padding-left: 1.5rem;
        position: relative;
        color: var(--text-secondary);
    }

        .dc-invalid-reasons li::before {
            content: "•";
            position: absolute;
            left: 0;
            color: var(--warning);
            font-weight: bold;
        }

/* Invalid page actions container - reuse error page styles */
.dc-invalid-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-primary);
}

/* Mobile responsive adjustments for invalid page */
@media (max-width: 768px) {
    .dc-invalid-info-card {
        flex-direction: column;
        text-align: center;
    }

    .dc-invalid-actions {
        flex-direction: column;
        align-items: center;
    }

    .dc-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Dark mode support */
[data-theme="dark"] .dc-invalid-icon-container {
    background: rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .dc-invalid-icon {
    color: var(--warning);
}

/* ===========================================
   INVALID PAGE SPECIFIC STYLES - RECOMMENDATION ICON SIZING
   =========================================== */

/* Size the recommendation icons appropriately */
.dc-recommendation-icon {
    width: 3rem !important;
    height: 3rem !important;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

    .dc-recommendation-icon svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        color: var(--accent-primary);
        stroke-width: 2.5;
    }

/* Recommendations card styling */
.dc-recommendations-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
}

.dc-recommendations-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.dc-recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.dc-recommendation-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

    .dc-recommendation-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--accent-primary);
    }

.dc-recommendation-content {
    flex: 1;
}

    .dc-recommendation-content h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0 0 0.5rem 0;
    }

    .dc-recommendation-content p {
        color: var(--text-secondary);
        margin: 0;
        line-height: 1.5;
    }

/* Dark mode support for recommendations */
[data-theme="dark"] .dc-recommendation-icon {
    background: rgba(99, 102, 241, 0.2);
}

    [data-theme="dark"] .dc-recommendation-icon svg {
        color: var(--accent-primary);
    }

[data-theme="dark"] .dc-recommendations-card {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .dc-recommendation-item {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-recommendation-item:hover {
        border-color: var(--accent-primary);
    }

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .dc-recommendations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-recommendation-item {
        padding: 1rem;
    }

    .dc-recommendation-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-bottom: 0.75rem;
    }

        .dc-recommendation-icon svg {
            width: 1.25rem !important;
            height: 1.25rem !important;
        }

    .dc-recommendations-card {
        padding: 1.5rem;
    }
}

.dc-btn-secondary {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

    .dc-btn-secondary:hover {
        background: #059669;
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.dc-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

    .dc-btn-outline:hover {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border-color: var(--border-secondary);
    }

.dc-button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.dc-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-primary);
}

/* ===========================================
   MORE ACTIONS MODAL - FINAL WIDTH FIX
   =========================================== */

/* Target the blockUI overlay first */
.blockUI.blockOverlay {
    background: rgba(15, 23, 42, 0.4) !important;
    z-index: 9999 !important;
}

/* Target the modal message container - work with blockUI's positioning */
.blockUI.blockMsg.moreActionsModal {
    /* Let blockUI handle positioning, but force better centering */
    position: fixed !important;
    z-index: 10000 !important;
    /* Modern styling */
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    cursor: default !important;
    /* Force center using blockUI's own width/height */
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    /* CRITICAL: Set explicit width constraints */
    width: auto !important;
    height: auto !important;
    min-width: 480px !important;
    max-width: 90vw !important;
    /* CRITICAL: Force flex column layout to stack elements vertically */
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* CHANGED: stretch instead of center to fill width */
}

    /* Style the actual content (table) inside the modal */
    .blockUI.blockMsg.moreActionsModal table {
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-primary) !important;
        overflow: hidden !important;
        margin: 0 !important;
        /* CRITICAL: Force table to fill container width */
        width: 100% !important;
        min-width: 480px !important;
        max-width: none !important; /* REMOVE max-width constraint */

        border-collapse: collapse !important;
        /* CRITICAL: Remove the table from document flow for centering */
        display: table !important; /* CHANGED: back to table for proper width calculation */
        /* REMOVE bottom border radius to connect seamlessly with close button */
        border-radius: 1rem 1rem 0 0 !important;
        /* Add consistent shadow */
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
        /* ENSURE no shrinking */
        flex-shrink: 0 !important;
    }

    /* Table header */
    .blockUI.blockMsg.moreActionsModal th {
        background: var(--bg-tertiary) !important;
        color: var(--text-primary) !important;
        font-size: 1.125rem !important;
        font-weight: 600 !important;
        padding: 1.5rem !important;
        text-align: center !important;
        border-bottom: 1px solid var(--border-primary) !important;
        /* ENSURE proper table display */
        display: table-cell !important;
        width: auto !important; /* Let cells distribute evenly */
    }

    /* Table body */
    .blockUI.blockMsg.moreActionsModal tbody {
        background: var(--bg-secondary) !important;
        display: table-row-group !important;
        width: 100% !important;
    }

    /* Table rows */
    .blockUI.blockMsg.moreActionsModal tr {
        border-bottom: 1px solid var(--border-primary) !important;
        transition: background 0.2s ease !important;
        display: table-row !important;
        width: 100% !important;
    }

        .blockUI.blockMsg.moreActionsModal tr:hover {
            background: var(--bg-tertiary) !important;
        }

    /* Table cells */
    .blockUI.blockMsg.moreActionsModal td {
        padding: 0.875rem 1rem !important;
        color: var(--text-primary) !important;
        font-size: 0.875rem !important;
        border: none !important;
        text-align: left !important;
        vertical-align: middle !important;
        display: table-cell !important;
        /* ENSURE cells expand to fill available space */
        width: auto !important;
    }

    /* Column headers row */
    .blockUI.blockMsg.moreActionsModal tr:nth-child(2) td {
        background: var(--bg-tertiary) !important;
        font-weight: 600 !important;
        text-decoration: underline !important;
        border-bottom: 2px solid var(--border-primary) !important;
        text-align: center !important;
    }

    /* Action links */
    .blockUI.blockMsg.moreActionsModal a {
        color: var(--accent-primary) !important;
        text-decoration: none !important;
        font-weight: 500 !important;
        transition: all 0.2s ease !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 0.25rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

        .blockUI.blockMsg.moreActionsModal a:hover {
            color: white !important;
            background: var(--accent-primary) !important;
            transform: translateY(-1px) !important;
            box-shadow: var(--shadow-md) !important;
        }

    /* Action images */
    .blockUI.blockMsg.moreActionsModal img {
        width: 1.25rem !important;
        height: 1.25rem !important;
        margin: 0 !important;
        filter: opacity(0.8) !important;
        transition: filter 0.2s ease !important;
    }

    .blockUI.blockMsg.moreActionsModal a:hover img {
        filter: opacity(1) brightness(1.2) !important;
    }

    /* CRITICAL FIX: Close button section - seamlessly connect to table */
    .blockUI.blockMsg.moreActionsModal center {
        /* COMPLETELY BREAK IT OUT OF THE TABLE LAYOUT */
        position: relative !important;
        display: block !important;
        /* CRITICAL: Match the parent container width exactly */
        width: 100% !important;
        min-width: 480px !important;
        max-width: none !important; /* REMOVE max-width constraint */

        background: var(--bg-tertiary) !important;
        border: 1px solid var(--border-primary) !important;
        border-top: none !important; /* REMOVE TOP BORDER for seamless connection */
        border-radius: 0 0 1rem 1rem !important; /* ONLY bottom corners rounded */
        padding: 1rem !important;
        text-align: center !important;
        margin: 0 !important;
        /* FORCE IT TO BE THE LAST ELEMENT */
        order: 999 !important;
        flex-shrink: 0 !important;
        /* SEAMLESSLY CONNECT to table above - NO gap */
        margin-top: 0 !important;
        /* ENSURE same box-sizing */
        box-sizing: border-box !important;
    }

        /* Close button styling */
        .blockUI.blockMsg.moreActionsModal center a {
            background: var(--bg-tertiary) !important;
            color: var(--text-primary) !important;
            border: 1px solid var(--border-primary) !important;
            padding: 0.75rem 1.5rem !important;
            border-radius: 0.5rem !important;
            font-weight: 600 !important;
            font-size: 0.875rem !important;
            text-decoration: none !important;
            transition: all 0.2s ease !important;
            display: inline-block !important;
            margin: 0 !important;
        }

            .blockUI.blockMsg.moreActionsModal center a:hover {
                background: var(--error) !important;
                color: white !important;
                border-color: var(--error) !important;
                transform: translateY(-1px) !important;
                box-shadow: var(--shadow-md) !important;
            }

    /* Hide line breaks */
    .blockUI.blockMsg.moreActionsModal br {
        display: none !important;
    }

/* Dark mode support */
[data-theme="dark"] .blockUI.blockOverlay {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .blockUI.blockMsg.moreActionsModal table {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .blockUI.blockMsg.moreActionsModal th {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .blockUI.blockMsg.moreActionsModal td {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .blockUI.blockMsg.moreActionsModal tr:nth-child(2) td {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .blockUI.blockMsg.moreActionsModal center {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
}

    [data-theme="dark"] .blockUI.blockMsg.moreActionsModal center a {
        background: var(--bg-secondary) !important;
        color: var(--text-primary) !important;
        border-color: var(--border-primary) !important;
    }

        [data-theme="dark"] .blockUI.blockMsg.moreActionsModal center a:hover {
            background: var(--error) !important;
            color: white !important;
            border-color: var(--error) !important;
        }

/* Mobile responsive */
@media (max-width: 768px) {
    .blockUI.blockMsg.moreActionsModal {
        min-width: 320px !important;
        max-width: calc(100vw - 2rem) !important;
    }

        .blockUI.blockMsg.moreActionsModal table {
            min-width: 320px !important;
            font-size: 0.8125rem !important;
        }

        .blockUI.blockMsg.moreActionsModal center {
            min-width: 320px !important;
        }

        .blockUI.blockMsg.moreActionsModal th {
            padding: 1rem !important;
            font-size: 1rem !important;
        }

        .blockUI.blockMsg.moreActionsModal td {
            padding: 0.5rem !important;
            font-size: 0.8125rem !important;
        }
}

/* Ensure proper z-index layering */
.blockUI.blockOverlay {
    z-index: 9999 !important;
    display: none !important;
}

.blockUI.blockMsg.moreActionsModal {
    z-index: 10000 !important;
}


/* Style the 'More Actions' button to match .dc-btn styling */
.moreactions a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    border: 1px solid transparent !important;
    box-sizing: border-box !important;
    /* Primary button styling */
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

    .moreactions a:hover {
        background: var(--accent-hover) !important;
        transform: translateY(-1px) !important;
        box-shadow: var(--shadow-md) !important;
        text-decoration: none !important;
        color: white !important;
    }

/* Dark mode support */
[data-theme="dark"] .moreactions a {
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

    [data-theme="dark"] .moreactions a:hover {
        background: var(--accent-hover) !important;
        color: white !important;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .moreactions a {
        padding: 0.65rem 1.25rem !important;
        font-size: 0.8125rem !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .moreactions a {
        border-width: 2px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .moreactions a {
        transition: none !important;
    }
}

/* ===========================================
   CREDIT APPLICATION SEARCH - AD HOC CONTAINER SPACING FIX
   =========================================== */

/* Add more space between the Ad Hoc search container and the buttons below it */
.dc-adhoc-container,
#divAdHoc {
    margin-bottom: 2rem !important; /* Increased from default spacing */
    padding: 1rem !important;
    background: var(--bg-secondary) !important;
/*    border: 1px solid var(--border-primary) !important;
    border-radius: 0.5rem !important;*/
}

/* Alternative: If the adhoc panel itself needs more internal spacing */
.adhocSection {
    margin-bottom: 1rem !important;
}

/* Ensure proper spacing between search sections */
.dc-entity-search-fields {
    margin-bottom: 1.5rem !important;
}

/* Add specific spacing for the action bar that contains the buttons */
.dc-action-bar {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
/*    border-top: 1px solid var(--border-primary) !important;*/
}

/* Dark mode support */
[data-theme="dark"] .dc-adhoc-container,
[data-theme="dark"] #divAdHoc {
    background: var(--bg-secondary) !important;
    /*border-color: var(--border-primary) !important;*/
}

[data-theme="dark"] .dc-action-bar {
    /*border-top-color: var(--border-primary) !important;*/
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .dc-adhoc-container,
    #divAdHoc {
        margin-bottom: 1.5rem !important;
        padding: 0.75rem !important;
    }

    .dc-action-bar {
        margin-top: 1.5rem !important;
        padding-top: 1rem !important;
    }
}

/* ===========================================
   ENHANCED PAGINATION STYLING - BETTER HOVER + NEXT/PREVIOUS
   =========================================== */

/* Target ANY table that follows another table (pagination pattern) */
/*table + table,
table[id*="Grid"] + table,
div[id*="Grid"] table + table,
*[id*="Pager"] table,
*[class*="Pager"] table {*/
    /* Force center with multiple methods */
    /*margin: 2rem auto !important;
    text-align: center !important;
    display: table !important;
    width: auto !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--shadow-sm) !important;
    padding: 1rem !important;
    position: relative !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}*/

    /* Force all pagination cells to be inline */
    /*table + table td,
    table[id*="Grid"] + table td,
    *[id*="Pager"] td {
        display: inline-block !important;
        margin: 0 0.25rem !important;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }*/

    /* Style all pagination links with MAXIMUM visual feedback */
    /*table + table a,
    table + table span,
    table[id*="Grid"] + table a,
    table[id*="Grid"] + table span,
    *[id*="Pager"] a,
    *[id*="Pager"] span {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 2.75rem !important;*/ /* Slightly larger */
        /*height: 2.75rem !important;
        padding: 0.5rem !important;
        background: var(--bg-tertiary) !important;
        color: var(--text-secondary) !important;
        text-decoration: none !important;
        border: 2px solid var(--border-primary) !important;
        border-radius: 0.5rem !important;
        font-size: 0.875rem !important;
        font-weight: 500 !important;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;*/ /* Smooth easing */
        /*cursor: pointer !important;
        position: relative !important;
        overflow: visible !important;*/ /* Allow effects to show */
    /*}*/

        /* ULTRA-ENHANCED hover effects */
        /*table + table a:hover,
        table[id*="Grid"] + table a:hover,
        *[id*="Pager"] a:hover {
            background: var(--accent-primary) !important;
            color: white !important;
            border-color: var(--accent-primary) !important;
            transform: translateY(-4px) scale(1.1) !important;*/ /* More dramatic lift */
            /*box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5) !important;*/ /* Larger shadow */
            /*z-index: 20 !important;
        }*/

            /* Add pulsing ring effect on hover */
            /*table + table a:hover::before,
            table[id*="Grid"] + table a:hover::before,
            *[id*="Pager"] a:hover::before {
                content: '' !important;
                position: absolute !important;
                top: -4px !important;
                left: -4px !important;
                right: -4px !important;
                bottom: -4px !important;
                background: var(--accent-primary) !important;
                border-radius: 0.75rem !important;
                z-index: -1 !important;
                opacity: 0.3 !important;
                animation: pagination-pulse-ring 1.5s ease-out infinite !important;
            }*/

    /* Current page styling - more prominent */
    /*table + table span,
    table[id*="Grid"] + table span,
    *[id*="Pager"] span {
        background: var(--accent-primary) !important;
        color: white !important;
        border-color: var(--accent-primary) !important;
        font-weight: 700 !important;
        transform: scale(1.15) !important;*/ /* Larger than other items */
        /*box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4) !important;
        position: relative !important;
    }*/

        /* Add subtle glow to current page */
        /*table + table span::after,
        table[id*="Grid"] + table span::after,
        *[id*="Pager"] span::after {
            content: '' !important;
            position: absolute !important;
            top: -2px !important;
            left: -2px !important;
            right: -2px !important;
            bottom: -2px !important;
            background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)) !important;
            border-radius: 0.75rem !important;
            z-index: -1 !important;
            opacity: 0.6 !important;
            filter: blur(6px) !important;
        }*/

    /* NEXT/PREVIOUS BUTTON ENHANCEMENTS */
    /* Target specific navigation buttons by content */
    /*table + table a[href*="Page"]:first-child,
    table[id*="Grid"] + table a[href*="Page"]:first-child,
    *[id*="Pager"] a:first-child,*/
    /* Also catch any links that might be "Previous" */
    /*table + table a:contains("Prev"),
    table + table a:contains("Previous"),
    table + table a:contains("<<"),
    table + table a:contains("<") {
        background: var(--success) !important;
        color: white !important;
        border-color: var(--success) !important;
        font-weight: 600 !important;
        min-width: 4rem !important;*/ /* Wider for text */
    /*}

        table + table a[href*="Page"]:first-child:hover,
        table[id*="Grid"] + table a[href*="Page"]:first-child:hover,
        *[id*="Pager"] a:first-child:hover {
            background: #059669 !important;
            box-shadow: 0 12px 30px rgba(5, 150, 105, 0.5) !important;
        }*/

        /* Add arrow icon to Previous button */
        /*table + table a[href*="Page"]:first-child::before,
        table[id*="Grid"] + table a[href*="Page"]:first-child::before,
        *[id*="Pager"] a:first-child::before {
            content: "←" !important;
            margin-right: 0.5rem !important;
            font-weight: bold !important;
        }*/

    /* Target "Next" buttons */
    /*table + table a[href*="Page"]:last-child,
    table[id*="Grid"] + table a[href*="Page"]:last-child,
    *[id*="Pager"] a:last-child,
    table + table a:contains("Next"),
    table + table a:contains(">>"),
    table + table a:contains(">") {
        background: var(--success) !important;
        color: white !important;
        border-color: var(--success) !important;
        font-weight: 600 !important;
        min-width: 4rem !important;
    }

        table + table a[href*="Page"]:last-child:hover,
        table[id*="Grid"] + table a[href*="Page"]:last-child:hover,
        *[id*="Pager"] a:last-child:hover {
            background: #059669 !important;
            box-shadow: 0 12px 30px rgba(5, 150, 105, 0.5) !important;
        }*/

        /* Add arrow icon to Next button */
        /*table + table a[href*="Page"]:last-child::after,
        table[id*="Grid"] + table a[href*="Page"]:last-child::after,
        *[id*="Pager"] a:last-child::after {
            content: "→" !important;
            margin-left: 0.5rem !important;
            font-weight: bold !important;
        }*/

    /* Enhanced keyboard focus for accessibility */
    /*table + table a:focus,
    table[id*="Grid"] + table a:focus,
    *[id*="Pager"] a:focus {
        outline: 3px solid var(--accent-primary) !important;
        outline-offset: 3px !important;
        transform: translateY(-2px) scale(1.05) !important;
        box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4) !important;
    }*/

/* Dark mode adjustments */
/*[data-theme="dark"] table + table a:hover,
[data-theme="dark"] table[id*="Grid"] + table a:hover,
[data-theme="dark"] *[id*="Pager"] a:hover {
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5) !important;
}

[data-theme="dark"] table + table span,
[data-theme="dark"] table[id*="Grid"] + table span,
[data-theme="dark"] *[id*="Pager"] span {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4) !important;
}

[data-theme="dark"] table + table a[href*="Page"]:first-child:hover,
[data-theme="dark"] table + table a[href*="Page"]:last-child:hover,
[data-theme="dark"] table[id*="Grid"] + table a[href*="Page"]:first-child:hover,
[data-theme="dark"] table[id*="Grid"] + table a[href*="Page"]:last-child:hover,
[data-theme="dark"] *[id*="Pager"] a:first-child:hover,
[data-theme="dark"] *[id*="Pager"] a:last-child:hover {
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.5) !important;
}*/

/* Keyframe animations */
/*@keyframes pagination-pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}*/

/* Add floating effect on page load */
/*@keyframes pagination-float-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

table + table,
table[id*="Grid"] + table,
*[id*="Pager"] table {
    animation: pagination-float-in 0.5s ease-out !important;
}*/

    /* Disabled state for navigation buttons */
    /*table + table a[disabled],
    table + table span[disabled],
    table[id*="Grid"] + table a[disabled],
    table[id*="Grid"] + table span[disabled],
    *[id*="Pager"] a[disabled],
    *[id*="Pager"] span[disabled] {
        opacity: 0.4 !important;
        cursor: not-allowed !important;
        transform: none !important;
        box-shadow: none !important;
    }

        table + table a[disabled]:hover,
        table + table span[disabled]:hover,
        table[id*="Grid"] + table a[disabled]:hover,
        table[id*="Grid"] + table span[disabled]:hover,
        *[id*="Pager"] a[disabled]:hover,
        *[id*="Pager"] span[disabled]:hover {
            transform: none !important;
            box-shadow: none !important;
            background: var(--bg-tertiary) !important;
            color: var(--text-tertiary) !important;
        }*/

/* ===========================================
   AD HOC REPORTING PAGE STYLES
   =========================================== */

/* Operations section */
.dc-operations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1rem;
}

.dc-operations-actions {
    display: flex;
    gap: 0.75rem;
}

/* Query Builder Layout */
.dc-query-builder {
    margin: 1.5rem 0;
}

/* ===========================================
   AD HOC REPORTING ENTITIES PANEL HEIGHT FIX
   =========================================== */

/* Increase overall grid height to accommodate larger sections */
.dc-query-builder-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
    min-height: 600px; /* Increased from 500px */
    align-items: stretch;
}

/* Make entities panel taller */
.dc-entities-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px; /* Increased from 500px */
}

/* Ensure columns panel also fills height properly */
.dc-columns-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 600px; /* Increased from 500px */
}

    /* Ensure the panel content expands */
    .dc-entities-panel .dc-panel-content {
        flex: 1; /* KEY: Takes all available space */
        padding: 1rem;
        background: var(--bg-secondary);
        overflow-y: auto; /* Allow scrolling if content is too tall */
    }

    /* Make sure the EasyQuery control fills its container */
    .dc-entities-panel .dc-entities-control {
        height: 100% !important;
        min-height: 100% !important;
    }

/* Ensure columns panel also fills height properly */
.dc-columns-panel {
    display: flex;
    flex-direction: column;
    height: 100%; /* Match entities panel */
    min-height: 500px; /* Match the grid min-height */
}

/* Make columns grid fill available space */
.dc-columns-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%; /* KEY: Fill full height */
    flex: 1; /* Allow expansion */
}

/* SIGNIFICANTLY increase individual section heights */
.dc-columns-section,
.dc-sorting-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    min-height: 250px; /* NEW: Explicit minimum height */
    max-height: none; /* Allow unlimited height */
}

/* Give the Result Columns section more space */
.dc-columns-section {
    flex: 2; /* Takes twice as much space as sorting section */
    min-height: 350px; /* Even taller for the columns section */
}

/* Conditions section should have a fixed height */
.dc-conditions-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-top: 1rem;
    height: 200px; /* Fixed height for conditions */
    flex-shrink: 0; /* Don't shrink */
}

/* Ensure panel contents can scroll if needed */
.dc-panel-content {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-secondary);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dc-query-builder-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        min-height: auto; /* Remove fixed height on mobile */
    }

    .dc-entities-panel,
    .dc-columns-panel {
        min-height: 300px; /* Smaller minimum on mobile */
    }

    .dc-columns-grid {
        flex-direction: row;
        height: auto;
    }

    .dc-columns-section,
    .dc-sorting-section {
        flex: 1;
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .dc-columns-grid {
        flex-direction: column;
    }

    .dc-entities-panel,
    .dc-columns-panel {
        min-height: 250px;
    }
}

/* Query Panels */
.dc-query-panel {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
}

.dc-entities-panel {
    display: flex;
    flex-direction: column;
}

.dc-columns-panel {
    display: flex;
    flex-direction: column;
}

.dc-panel-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 1rem;
}

.dc-panel-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.dc-panel-content {
    padding: 1rem;
    flex: 1;
    background: var(--bg-secondary);
}

/* Columns Grid */
.dc-columns-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.dc-columns-section,
.dc-sorting-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
}

.dc-conditions-section {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
    margin-top: 1rem;
}

/* Form Controls */
.dc-form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.375rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

    .dc-form-select:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

.dc-form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.375rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

    .dc-form-input:focus {
        outline: none;
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

.dc-form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.dc-form-group {
    display: flex;
    flex-direction: column;
}

/* SQL Textbox */
.dc-sql-textbox {
    width: 100%;
    height: 200px;
    padding: 1rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.375rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
    resize: vertical;
}

/* Results Container */
.dc-results-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.5rem;
    overflow: hidden;
}

.dc-results-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.dc-grid-header {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 600;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.dc-grid-row {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

    .dc-grid-row td {
        padding: 0.75rem;
        color: var(--text-primary);
    }

.dc-grid-alt-row {
    background: var(--bg-tertiary);
}

.dc-grid-selected {
    background: var(--accent-primary);
    color: white;
}

.dc-grid-footer {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.75rem;
    text-align: center;
}

.dc-grid-pager {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.75rem;
    text-align: right;
}

/* EasyQuery Control Styling */
.dc-entities-control,
.dc-columns-control,
.dc-sorting-control,
.dc-conditions-control {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.375rem !important;
    font-size: 0.8125rem !important;
}

/* Button Actions in Card Headers */
.dc-card-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dc-operations-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-query-builder-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-columns-grid {
        flex-direction: row;
        height: auto;
    }

    .dc-columns-section,
    .dc-sorting-section {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .dc-operations-grid {
        grid-template-columns: 1fr;
    }

    .dc-operations-actions {
        justify-content: center;
    }

    .dc-columns-grid {
        flex-direction: column;
    }

    .dc-card-actions {
        flex-direction: column;
        width: 100%;
    }

        .dc-card-actions .dc-btn {
            width: 100%;
            justify-content: center;
        }
}

/* Dark Mode Support */
[data-theme="dark"] .dc-entities-control,
[data-theme="dark"] .dc-columns-control,
[data-theme="dark"] .dc-sorting-control,
[data-theme="dark"] .dc-conditions-control {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .dc-sql-textbox {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .dc-form-select,
[data-theme="dark"] .dc-form-input {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

/* ===========================================
   MOBILE-FIRST RESPONSIVE NAVIGATION SYSTEM - FIXED
   =========================================== */

/* Base sidebar styles - Mobile-first approach */
.dc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
    width: 320px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    /* MOBILE: Start hidden by default */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

/* Desktop: Always show sidebar */
@media (min-width: 1024px) {
    .dc-sidebar {
        transform: translateX(0) !important;
    }

    /* Desktop: Adjust main content margin */
    .authenticated .dc-main-content {
        margin-left: 320px;
    }

    .authenticated .dc-footer {
        margin-left: 320px;
    }
}

/* Mobile: Remove margin adjustments */
@media (max-width: 1023px) {
    .authenticated .dc-main-content {
        margin-left: 0 !important;
    }

    .authenticated .dc-footer {
        margin-left: 0 !important;
    }
}

/* Sidebar when expanded on mobile */
.dc-sidebar.open {
    transform: translateX(0);
}

/* Sidebar overlay for mobile */
.dc-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

    .dc-sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

/* Sidebar header with responsive close button */
.dc-sidebar-header {
    border-bottom: 1px solid var(--border-primary);
    padding: 1.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* CRITICAL FIX: Close button - COMPLETELY HIDDEN ON DESKTOP */
.dc-sidebar-close,
#sidebar-close {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    /* HIDDEN BY DEFAULT - MOBILE ONLY */
    display: none !important;
}

    .dc-sidebar-close:hover,
    #sidebar-close:hover {
        background: var(--error);
        color: white;
        border-color: var(--error);
        transform: scale(1.05);
    }

/* CRITICAL FIX: Show close button ONLY on mobile when sidebar is open */
@media (max-width: 1023px) {
    .dc-sidebar.open .dc-sidebar-close,
    .dc-sidebar.open #sidebar-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* CRITICAL FIX: FORCE hide close button on desktop at ALL times */
@media (min-width: 1024px) {
    .dc-sidebar-close,
    #sidebar-close {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Even if someone adds inline styles, override them */
    .dc-sidebar .dc-sidebar-close,
    .dc-sidebar #sidebar-close {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Hamburger toggle button for mobile */
.dc-nav-toggle-collapsed {
    position: fixed !important;
    top: 1rem !important;
    left: 1rem !important;
    z-index: 70 !important;
    width: 3rem !important;
    height: 3rem !important;
    background: var(--bg-secondary) !important;
    box-shadow: var(--shadow-xl) !important;
    border: 1px solid var(--border-primary) !important;
    border-radius: 0.5rem !important;
    display: none !important; /* Hidden by default */
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

    .dc-nav-toggle-collapsed:hover {
        background: var(--accent-primary) !important;
        color: white !important;
        border-color: var(--accent-primary) !important;
        transform: scale(1.05) !important;
    }

/* Show hamburger button only on mobile when sidebar is closed */
@media (max-width: 1023px) {
    .dc-nav-toggle-collapsed.show {
        display: flex !important;
    }
}

/* Hide hamburger button on desktop */
@media (min-width: 1024px) {
    .dc-nav-toggle-collapsed {
        display: none !important;
    }
}

/* Sidebar title adjustments */
.dc-sidebar-title {
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    margin-right: 1rem;
}

/* Navigation content */
.dc-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    min-height: 0;
}

/* User info and footer sections remain the same */
.dc-user-info {
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
    flex-shrink: 0;
    padding: 1rem;
}

/* Body scroll prevention when mobile sidebar is open */
@media (max-width: 1023px) {
    body.sidebar-open {
        overflow: hidden;
    }
}

/* Dark mode support */
[data-theme="dark"] .dc-sidebar-close,
[data-theme="dark"] #sidebar-close {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-sidebar-close:hover,
    [data-theme="dark"] #sidebar-close:hover {
        background: var(--error);
        color: white;
        border-color: var(--error);
    }

[data-theme="dark"] .dc-nav-toggle-collapsed {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
    color: var(--text-primary) !important;
}

    [data-theme="dark"] .dc-nav-toggle-collapsed:hover {
        background: var(--accent-primary) !important;
        color: white !important;
        border-color: var(--accent-primary) !important;
    }

/* Animation improvements */
@media (prefers-reduced-motion: no-preference) {
    .dc-sidebar {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .dc-sidebar-overlay {
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dc-sidebar,
    .dc-sidebar-overlay,
    .dc-sidebar-close,
    .dc-nav-toggle-collapsed {
        transition: none !important;
    }
}

/* Ensure proper layering */
.dc-sidebar {
    z-index: 50;
}

.dc-sidebar-overlay {
    z-index: 40;
}

.dc-nav-toggle-collapsed {
    z-index: 70;
}

/* ===========================================
   CREDIT APPLICATION COMMAND PANEL ENHANCEMENT
   =========================================== */

/* Command Panel Container */
.dc-command-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

    /* Add subtle background pattern */
    .dc-command-panel::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, transparent 0%, var(--accent-primary) 0.1%, transparent 0.2%);
        opacity: 0.03;
        pointer-events: none;
    }

/* Command Panel Header/Title */
.dc-command-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
}

.dc-command-panel-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.dc-command-panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Command Button Groups */
.dc-command-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

    .dc-command-group + .dc-command-group {
        position: relative;
        margin-left: 0.75rem;
        padding-left: 0.75rem;
    }

        .dc-command-group + .dc-command-group::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 1px;
            height: 1.5rem;
            background: var(--border-primary);
        }

/* Enhanced Command Buttons */
.dc-command-panel a,
.dc-command-panel input[type="submit"],
.dc-command-panel input[type="button"],
.dc-command-panel button,
.dc-command-panel .aspNetDisabled {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 2.5rem;
    text-align: center;
    white-space: nowrap;
}

    /* Button hover effects */
    .dc-command-panel a:hover,
    .dc-command-panel input[type="submit"]:hover,
    .dc-command-panel input[type="button"]:hover,
    .dc-command-panel button:hover {
        background: var(--accent-secondary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    }

    /* Button active/pressed state */
    .dc-command-panel a:active,
    .dc-command-panel input[type="submit"]:active,
    .dc-command-panel input[type="button"]:active,
    .dc-command-panel button:active {
        transform: translateY(0);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    /* Primary action buttons (Save, Submit) */
    .dc-command-panel a[href*="Save"],
    .dc-command-panel input[value*="Save"],
    .dc-command-panel input[value*="Submit"],
    .dc-command-panel button[id*="Save"],
    .dc-command-panel button[id*="Submit"] {
        background: var(--success);
        box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
    }

        .dc-command-panel a[href*="Save"]:hover,
        .dc-command-panel input[value*="Save"]:hover,
        .dc-command-panel input[value*="Submit"]:hover,
        .dc-command-panel button[id*="Save"]:hover,
        .dc-command-panel button[id*="Submit"]:hover {
            background: #059669;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }

    /* Secondary action buttons (View, Documents, Attachments) */
    .dc-command-panel a[href*="Document"],
    .dc-command-panel a[href*="Attachment"],
    .dc-command-panel a[href*="View"],
    .dc-command-panel input[value*="Document"],
    .dc-command-panel input[value*="Attachment"],
    .dc-command-panel input[value*="View"],
    .dc-command-panel button[id*="Document"],
    .dc-command-panel button[id*="Attachment"],
    .dc-command-panel button[id*="View"] {
        background: var(--secondary);
        color: var(--text-primary);
        border: 1px solid var(--border-primary);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

        .dc-command-panel a[href*="Document"]:hover,
        .dc-command-panel a[href*="Attachment"]:hover,
        .dc-command-panel a[href*="View"]:hover,
        .dc-command-panel input[value*="Document"]:hover,
        .dc-command-panel input[value*="Attachment"]:hover,
        .dc-command-panel input[value*="View"]:hover,
        .dc-command-panel button[id*="Document"]:hover,
        .dc-command-panel button[id*="Attachment"]:hover,
        .dc-command-panel button[id*="View"]:hover {
            background: var(--bg-tertiary);
            border-color: var(--accent-primary);
        }

    /* Danger/Cancel buttons */
    .dc-command-panel a[href*="Cancel"],
    .dc-command-panel a[href*="Exit"],
    .dc-command-panel input[value*="Cancel"],
    .dc-command-panel input[value*="Exit"],
    .dc-command-panel button[id*="Cancel"],
    .dc-command-panel button[id*="Exit"] {
        background: var(--error);
        box-shadow: 0 1px 3px rgba(239, 68, 68, 0.2);
    }

        .dc-command-panel a[href*="Cancel"]:hover,
        .dc-command-panel a[href*="Exit"]:hover,
        .dc-command-panel input[value*="Cancel"]:hover,
        .dc-command-panel input[value*="Exit"]:hover,
        .dc-command-panel button[id*="Cancel"]:hover,
        .dc-command-panel button[id*="Exit"]:hover {
            background: #dc2626;
            box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
        }

    /* Disabled state */
    .dc-command-panel .aspNetDisabled,
    .dc-command-panel a[disabled],
    .dc-command-panel input[disabled],
    .dc-command-panel button[disabled] {
        background: var(--bg-tertiary) !important;
        color: var(--text-muted) !important;
        cursor: not-allowed !important;
        transform: none !important;
        box-shadow: none !important;
        border: 1px solid var(--border-primary) !important;
    }

    /* Button icons */
    .dc-command-panel a::before,
    .dc-command-panel input[type="submit"]::before,
    .dc-command-panel input[type="button"]::before,
    .dc-command-panel button::before {
        content: '';
        width: 1rem;
        height: 1rem;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        margin-right: 0.5rem;
    }

    /* Specific button icons */
    .dc-command-panel a[href*="Save"]::before,
    .dc-command-panel input[value*="Save"]::before,
    .dc-command-panel button[id*="Save"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
    }

    .dc-command-panel a[href*="Document"]::before,
    .dc-command-panel input[value*="Document"]::before,
    .dc-command-panel button[id*="Document"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z'/%3E%3C/svg%3E");
    }

    .dc-command-panel a[href*="Attachment"]::before,
    .dc-command-panel input[value*="Attachment"]::before,
    .dc-command-panel button[id*="Attachment"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13'/%3E%3C/svg%3E");
    }

    .dc-command-panel a[href*="Cancel"]::before,
    .dc-command-panel a[href*="Exit"]::before,
    .dc-command-panel input[value*="Cancel"]::before,
    .dc-command-panel input[value*="Exit"]::before,
    .dc-command-panel button[id*="Cancel"]::before,
    .dc-command-panel button[id*="Exit"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E");
    }

    .dc-command-panel a[href*="View"]::before,
    .dc-command-panel input[value*="View"]::before,
    .dc-command-panel button[id*="View"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
    }

/* Responsive Design */
@media (max-width: 768px) {
    .dc-command-panel {
        padding: 1rem;
        gap: 0.5rem;
        flex-direction: column;
        align-items: stretch;
    }

    .dc-command-group {
        width: 100%;
        justify-content: stretch;
    }

        .dc-command-group + .dc-command-group {
            margin-left: 0;
            padding-left: 0;
            margin-top: 0.5rem;
            padding-top: 0.5rem;
            border-top: 1px solid var(--border-primary);
        }

            .dc-command-group + .dc-command-group::before {
                display: none;
            }

    .dc-command-panel a,
    .dc-command-panel input[type="submit"],
    .dc-command-panel input[type="button"],
    .dc-command-panel button {
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dc-command-panel a,
    .dc-command-panel input[type="submit"],
    .dc-command-panel input[type="button"],
    .dc-command-panel button {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .dc-command-group {
        flex-direction: column;
    }
}

/* Loading state animations */
.dc-command-panel a.loading,
.dc-command-panel input[type="submit"].loading,
.dc-command-panel input[type="button"].loading,
.dc-command-panel button.loading {
    position: relative;
    color: transparent !important;
}

    .dc-command-panel a.loading::after,
    .dc-command-panel input[type="submit"].loading::after,
    .dc-command-panel input[type="button"].loading::after,
    .dc-command-panel button.loading::after {
        content: '';
        position: absolute;
        width: 1rem;
        height: 1rem;
        border: 2px solid transparent;
        border-top: 2px solid currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Focus states for accessibility */
.dc-command-panel a:focus,
.dc-command-panel input[type="submit"]:focus,
.dc-command-panel input[type="button"]:focus,
.dc-command-panel button:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Dark theme support */
[data-theme="dark"] .dc-command-panel {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-command-panel::before {
        opacity: 0.05;
    }

[data-theme="dark"] .dc-command-panel-title {
    color: var(--text-primary);
}

/* Print styles */
@media print {
    .dc-command-panel {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dc-command-panel a,
    .dc-command-panel input[type="submit"],
    .dc-command-panel input[type="button"],
    .dc-command-panel button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dc-command-panel a,
    .dc-command-panel input[type="submit"],
    .dc-command-panel input[type="button"],
    .dc-command-panel button {
        transition: none;
    }

        .dc-command-panel a:hover,
        .dc-command-panel input[type="submit"]:hover,
        .dc-command-panel input[type="button"]:hover,
        .dc-command-panel button:hover {
            transform: none;
        }
}

/* ===========================================
   BUTTON SVGs WITH ICONS - SPACING FIX
   =========================================== */

/* Command Panel Button Icons - Remove excessive left padding */
.dc-command-panel a,
.dc-command-panel input[type="submit"],
.dc-command-panel button {
    position: relative;
    padding-left: 1rem; /* REDUCED from 2.5rem to normal padding */
    padding-right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* Add gap between icon and text */
}

    /* Adjust the icon positioning to be inline instead of absolute */
    .dc-command-panel a::before,
    .dc-command-panel input[type="submit"]::before,
    .dc-command-panel button::before {
        content: '';
        width: 1rem;
        height: 1rem;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        /* REMOVE absolute positioning */
        position: static !important;
        /* REMOVE left/top positioning */
        left: auto !important;
        top: auto !important;
        transform: none !important;
        /* The gap property on the parent will handle spacing */
        margin-right: 0 !important;
        flex-shrink: 0; /* Prevent icon from shrinking */
    }

    /* Keep all the existing icon styles for different button types */
    /* New */
    .dc-command-panel a[href*="NewCustomField"]::before,
    .dc-command-panel a[href*="NewFinancialEntity"]::before,
    .dc-command-panel a[href*="NewCustomer"]::before,
    .dc-command-panel a[href*="NewComment"]::before,
    .dc-command-panel a[href*="NewThirdParty"]::before,
    .dc-command-panel a[href*="NewLead"]::before,
    .dc-command-panel a[href*="NewQuote"]::before,
    .dc-command-panel a[href*="NewSecurityRole"]::before,
    .dc-command-panel a[href*="NewWorkflowRole"]::before,
    .dc-command-panel a[href*="NewEmailMsg"]::before,
    .dc-command-panel a[href*="NewApp"]::before,
    .dc-command-panel a[href*="NewDDForm"]::before,
    .dc-command-panel a[href*="NewAdHocReport"]::before,
    .dc-command-panel a[href*="NewUser"]::before,
    .dc-command-panel a[href*="SaveTableValues"]::before,
    .dc-command-panel a[href*="NewDocumentInfo"]::before,
    .dc-command-panel a[href*="NewReportInfo"]::before,
    .dc-command-panel input[value*="New"]::before,
    .dc-add-btn::before,
    .dc-command-panel button[name*="New"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v16m8-8H4'/%3E%3C/svg%3E");
    }

    .dc-command-panel a[href*="Generate"]::before,
    .dc-command-panel input[value*="Generate"]::before,
    .dc-command-panel button[name*="Generate"]::before,
    .dc-command-panel button[id*="Generate"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'/%3E%3C/svg%3E");
    }

    /* Search */
    .dc-command-panel a[href*="Search"]::before,
    .dc-command-panel input[value*="Search"]::before,
    .dc-command-panel button[name*="Search"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E");
    }

    /* Edit */
    .dc-command-panel a[href*="Edit"]::before,
    .dc-command-panel input[value*="Edit"]::before,
    .dc-command-panel button[name*="Edit"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/%3E%3C/svg%3E");
    }

    /* Delete */
    .dc-command-panel a[href*="Delete"]::before,
    .dc-command-panel input[value*="Delete"]::before,
    .dc-command-panel button[name*="Delete"]::before {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/%3E%3C/svg%3E");
    }

    /* ===========================================
   SAVE & EXIT BUTTON COLOR CHANGE
   =========================================== */

    /* Target Save & Exit buttons specifically */
    .dc-command-panel a[href*="SaveExit"],
    .dc-command-panel a[href*="SaveExitCustomer"],
    .dc-command-panel a[href*="SaveExitFinancialEntity"],
    .dc-command-panel a[href*="SaveRuleDefinitionExit"],
    .dc-command-panel a[href*="SaveEmailMsgExit"],
    .dc-command-panel a[href*="SaveTableValuesExit"],
    .dc-command-panel a[href*="SaveDocumentInfoExit"],
    .dc-command-panel a[href*="SaveReportInfoExit"],
    .dc-command-panel a[href*="SaveExitAdHocReport"],
    .dc-command-panel a[href*="SaveAppExit"],
    .dc-command-panel input[value*="SaveExit"],
    .dc-command-panel button[id*="SaveExit"] {
        background: #f59e0b !important; /* Amber/Orange color */
        border-color: #f59e0b !important;
        color: white !important;
    }

        /* Hover state for Save & Exit buttons */
        .dc-command-panel a[href*="SaveExit"]:hover,
        .dc-command-panel a[href*="SaveExitCustomer"]:hover,
        .dc-command-panel a[href*="SaveExitFinancialEntity"]:hover,
        .dc-command-panel a[href*="SaveRuleDefinitionExit"]:hover,
        .dc-command-panel a[href*="SaveEmailMsgExit"]:hover,
        .dc-command-panel a[href*="SaveTableValuesExit"]:hover,
        .dc-command-panel a[href*="SaveDocumentInfoExit"]:hover,
        .dc-command-panel a[href*="SaveReportInfoExit"]:hover,
        .dc-command-panel a[href*="SaveExitAdHocReport"]:hover,
        .dc-command-panel a[href*="SaveAppExit"]:hover,
        .dc-command-panel input[value*="SaveExit"]:hover,
        .dc-command-panel button[id*="SaveExit"]:hover {
            background: #d97706 !important; /* Darker amber on hover */
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
            transform: translateY(-1px);
        }

/* Dark theme support for Save & Exit buttons */
[data-theme="dark"] .dc-command-panel a[href*="SaveExit"],
[data-theme="dark"] .dc-command-panel a[href*="SaveExitCustomer"],
[data-theme="dark"] .dc-command-panel a[href*="SaveExitFinancialEntity"],
[data-theme="dark"] .dc-command-panel a[href*="SaveRuleDefinitionExit"],
[data-theme="dark"] .dc-command-panel a[href*="SaveEmailMsgExit"],
[data-theme="dark"] .dc-command-panel a[href*="SaveTableValuesExit"],
[data-theme="dark"] .dc-command-panel a[href*="SaveDocumentInfoExit"],
[data-theme="dark"] .dc-command-panel a[href*="SaveReportInfoExit"],
[data-theme="dark"] .dc-command-panel a[href*="SaveExitAdHocReport"],
[data-theme="dark"] .dc-command-panel a[href*="SaveAppExit"],
[data-theme="dark"] .dc-command-panel input[value*="SaveExit"],
[data-theme="dark"] .dc-command-panel button[id*="SaveExit"] {
    background: #f59e0b !important;
    color: white !important;
}

    [data-theme="dark"] .dc-command-panel a[href*="SaveExit"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveExitCustomer"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveExitFinancialEntity"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveRuleDefinitionExit"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveEmailMsgExit"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveTableValuesExit"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveDocumentInfoExit"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveReportInfoExit"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveExitAdHocReport"]:hover,
    [data-theme="dark"] .dc-command-panel a[href*="SaveAppExit"]:hover,
    [data-theme="dark"] .dc-command-panel input[value*="SaveExit"]:hover,
    [data-theme="dark"] .dc-command-panel button[id*="SaveExit"]:hover {
        background: #d97706 !important;
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
    }

/* Alternative color options - uncomment one of these sections to use different colors */

/* Option 1: Purple */
/*
.dc-command-panel a[href*="SaveExit"],
.dc-command-panel input[value*="SaveExit"],
.dc-command-panel button[id*="SaveExit"] {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
}

.dc-command-panel a[href*="SaveExit"]:hover,
.dc-command-panel input[value*="SaveExit"]:hover,
.dc-command-panel button[id*="SaveExit"]:hover {
    background: #7c3aed !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}
*/

/* Option 2: Teal */
/*
.dc-command-panel a[href*="SaveExit"],
.dc-command-panel input[value*="SaveExit"],
.dc-command-panel button[id*="SaveExit"] {
    background: #14b8a6 !important;
    border-color: #14b8a6 !important;
}

.dc-command-panel a[href*="SaveExit"]:hover,
.dc-command-panel input[value*="SaveExit"]:hover,
.dc-command-panel button[id*="SaveExit"]:hover {
    background: #0d9488 !important;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4) !important;
}
*/

/* Option 3: Pink */
/*
.dc-command-panel a[href*="SaveExit"],
.dc-command-panel input[value*="SaveExit"],
.dc-command-panel button[id*="SaveExit"] {
    background: #ec4899 !important;
    border-color: #ec4899 !important;
}

.dc-command-panel a[href*="SaveExit"]:hover,
.dc-command-panel input[value*="SaveExit"]:hover,
.dc-command-panel button[id*="SaveExit"]:hover {
    background: #db2777 !important;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4) !important;
}
*/

/* ===========================================
   DRAG & DROP FILE UPLOAD STYLING
   =========================================== */

/* Main dropbox container */
#dropbox {
    border: 4px dashed var(--border-secondary) !important;
    border-radius: 0.75rem !important;
    min-height: 120px !important;
    padding: 2rem !important;
    background: var(--bg-tertiary) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    position: relative !important;
    margin-bottom: 1rem !important;
}

    /* Dropbox hover state */
    #dropbox:hover {
        border-color: var(--accent-primary) !important;
        background: rgba(79, 70, 229, 0.05) !important;
        transform: scale(1.02) !important;
    }

    /* Dropbox active/drag-over state */
    #dropbox.dragover {
        border-color: var(--accent-primary) !important;
        background: rgba(79, 70, 229, 0.1) !important;
        box-shadow: 0 0 20px rgba(79, 70, 229, 0.3) !important;
    }

    /* Dropbox content styling */
    #dropbox .message {
        color: var(--text-secondary);
        font-size: 1rem;
        font-weight: 500;
        margin-top: 1rem;
    }

    /* File preview styling within dropbox */
    #dropbox .preview {
        background: var(--bg-secondary) !important;
        border: 1px solid var(--border-primary) !important;
        border-radius: 0.5rem !important;
        padding: 1rem !important;
        margin: 0.5rem 0 !important;
        width: 100% !important;
        max-width: 400px !important;
        box-shadow: var(--shadow-sm) !important;
    }

    /* Progress bar styling */
    #dropbox .progressHolder {
        width: 100px !important;
        float: left !important;
        border: 2px solid var(--border-primary) !important;
        border-radius: 0.25rem !important;
        overflow: hidden !important;
        background: var(--bg-tertiary) !important;
    }

    #dropbox .progress {
        background: var(--accent-primary) !important;
        color: white !important;
        font-weight: bold !important;
        font-size: 0.75rem !important;
        text-align: center !important;
        line-height: 1.5rem !important;
        height: 1.5rem !important;
        transition: width 0.3s ease !important;
    }

        /* Success state */
        #dropbox .progress[style*="background-color: green"],
        #dropbox .progress:contains("SUCCESS") {
            background: var(--success) !important;
        }

        /* Error state */
        #dropbox .progress:contains("ERROR") {
            background: var(--error) !important;
        }

    /* Filename styling */
    #dropbox .filename {
        padding-left: 1rem !important;
        width: 280px !important;
        float: left !important;
        font-size: 0.875rem !important;
        color: var(--text-primary) !important;
        font-weight: 500 !important;
        line-height: 1.5rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

        /* Error filename styling */
        #dropbox .filename[style*="color: red"] {
            color: var(--error) !important;
            font-weight: 600 !important;
        }

    /* Clear float */
    #dropbox .preview div[style*="clear:both"] {
        clear: both !important;
    }

/* Drag & drop container */
#divDragDrop {
    width: 100% !important;
}

    /* OR separator styling */
    #divDragDrop .font-bold:first-child {
        color: var(--text-tertiary) !important;
        text-align: center !important;
        margin: 1rem 0 !important;
        font-size: 1.125rem !important;
    }

    /* Instructions text styling */
    #divDragDrop .font-bold:nth-child(2) {
        color: var(--text-primary) !important;
        margin-bottom: 1rem !important;
    }

    /* Helper text styling */
    #divDragDrop .font-normal {
        color: var(--text-tertiary) !important;
        font-style: italic !important;
    }

/* Dark mode support */
[data-theme="dark"] #dropbox {
    border-color: var(--border-secondary) !important;
    background: var(--bg-tertiary) !important;
}

    [data-theme="dark"] #dropbox:hover {
        border-color: var(--accent-primary) !important;
        background: rgba(99, 102, 241, 0.1) !important;
    }

    [data-theme="dark"] #dropbox.dragover {
        border-color: var(--accent-primary) !important;
        background: rgba(99, 102, 241, 0.15) !important;
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4) !important;
    }

    [data-theme="dark"] #dropbox .preview {
        background: var(--bg-secondary) !important;
        border-color: var(--border-primary) !important;
    }

    [data-theme="dark"] #dropbox .progressHolder {
        border-color: var(--border-primary) !important;
        background: var(--bg-tertiary) !important;
    }

    [data-theme="dark"] #dropbox .filename {
        color: var(--text-primary) !important;
    }

    [data-theme="dark"] #dropbox .message {
        color: var(--text-secondary) !important;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    #dropbox {
        min-height: 100px !important;
        padding: 1.5rem !important;
    }

        #dropbox .progressHolder {
            width: 80px !important;
        }

        #dropbox .filename {
            width: 200px !important;
            padding-left: 0.75rem !important;
        }

        #dropbox .preview {
            padding: 0.75rem !important;
        }
}

/* Animation for file drops */
@keyframes file-drop {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

#dropbox .preview {
    animation: file-drop 0.3s ease-out !important;
}

/* Make sure the dropbox is visible and properly sized */
#dropbox:empty {
    min-height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    #dropbox:empty::before {
        content: "Drop files here to upload";
        color: var(--text-tertiary);
        font-size: 1.125rem;
        font-weight: 500;
        text-align: center;
    }

[data-theme="dark"] #dropbox:empty::before {
    color: var(--text-tertiary);
}

/* Enhanced drag & drop visual feedback */
#dropbox.drag-enter {
    border-color: var(--success) !important;
    background: rgba(16, 185, 129, 0.1) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3) !important;
}

#dropbox.drag-leave {
    border-color: var(--border-secondary) !important;
    background: var(--bg-tertiary) !important;
    box-shadow: none !important;
}

/* Attachments Testing */
legend {
    visibility: hidden;
}

/* ===========================================
   MOBILE DASHBOARD FIXES - VERTICAL STACKING SOLUTION
   =========================================== */

/* Base dashboard styling - keep desktop defaults */
.dashboard-card,
.dc-dashboard-card {
    background: var(--bg-secondary);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-primary);
    /* Desktop defaults */
    min-width: 1200px;
    max-width: 1400px;
    width: 100%;
    overflow-x: auto;
}

/* MOBILE: Create vertical stacked layout */
@media screen and (max-width: 1023px) {
    /* Dashboard container mobile layout */
    .dashboard-card,
    .dc-dashboard-card {
        /* Remove horizontal constraints */
        min-width: auto !important;
        max-width: 100% !important;
        width: 100% !important;
        /* Reset margins */
        margin-left: 0 !important;
        margin-right: 0 !important;
        /* Mobile padding */
        padding: 1rem !important;
        border-radius: 0.75rem !important;
        /* Remove horizontal scroll - we're going vertical */
        overflow-x: visible !important;
        overflow-y: visible !important;
        /* Force container behavior */
        display: block !important;
        box-sizing: border-box !important;
    }

        /* MOBILE CAPTION STYLING - Make it full width and prominent */
        .dashboard-card > caption,
        .dc-dashboard-card > caption,
        .dashboard-card table > caption,
        .dc-dashboard-card table > caption {
            width: 100% !important;
            margin: -1rem -1rem 1.5rem -1rem !important; /* Extend beyond container padding */
            padding: 1.5rem !important;
            background: var(--accent-primary) !important;
            color: white !important;
            font-size: 1.25rem !important;
            font-weight: 700 !important;
            text-align: center !important;
            border-radius: 0.75rem 0.75rem 0 0 !important; /* Match container border radius at top */
            text-transform: none !important;
            letter-spacing: 0.025em !important;
            box-shadow: var(--shadow-sm) !important;
            display: block !important;
            caption-side: top !important;
        }

        /* Transform tables into vertical card layouts */
        .dashboard-card table,
        .dc-dashboard-card table,
        .dashboard-card .GridView,
        .dc-dashboard-card .GridView,
        .dashboard-card table[id*="GridView"],
        .dc-dashboard-card table[id*="GridView"] {
            /* Remove table layout completely on mobile */
            display: block !important;
            width: 100% !important;
            min-width: auto !important;
            max-width: 100% !important;
            border-collapse: separate !important;
            border-spacing: 0 !important;
            font-size: 0.875rem !important;
            overflow: visible !important;
        }

            /* MOBILE: Hide table headers completely */
            .dashboard-card thead,
            .dc-dashboard-card thead,
            .dashboard-card table[id*="GridView"] thead,
            .dashboard-card .GridView thead {
                display: none !important;
                visibility: hidden !important;
                height: 0 !important;
                overflow: hidden !important;
                position: absolute !important;
                left: -9999px !important;
            }

            /* Also target header rows specifically */
            .dashboard-card tr:first-child,
            .dc-dashboard-card tr:first-child,
            .dashboard-card table[id*="GridView"] tr:first-child {
                display: none !important;
                visibility: hidden !important;
                height: 0 !important;
                overflow: hidden !important;
                position: absolute !important;
                left: -9999px !important;
            }

            /* Transform table body into card container */
            .dashboard-card tbody,
            .dc-dashboard-card tbody,
            .dashboard-card table[id*="GridView"] tbody {
                display: block !important;
                width: 100% !important;
            }

            /* Transform each table row into a card - SKIP first row (headers) */
            .dashboard-card tr:not(:first-child),
            .dc-dashboard-card tr:not(:first-child),
            .dashboard-card table[id*="GridView"] tr:not(:first-child) {
                display: block !important;
                width: 100% !important;
                background: var(--bg-tertiary) !important;
                border: 1px solid var(--border-primary) !important;
                border-radius: 0.5rem !important;
                padding: 1rem !important;
                margin-bottom: 1rem !important;
                box-shadow: var(--shadow-sm) !important;
                position: relative !important;
            }

            /* Transform table cells into vertical list items */
            .dashboard-card td,
            .dc-dashboard-card td,
            .dashboard-card table[id*="GridView"] td {
                display: block !important;
                width: 100% !important;
                padding: 0.5rem 0 !important;
                border: none !important;
                text-align: left !important;
                position: relative !important;
                padding-left: 0 !important;
                margin-bottom: 0.5rem !important;
                /* Allow text wrapping */
                white-space: normal !important;
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
            }

                /* Add field labels before each cell using CSS */
                .dashboard-card td:nth-child(1)::before,
                .dc-dashboard-card td:nth-child(1)::before {
                    content: "Follow Up: ";
                    font-weight: 600;
                    color: var(--text-secondary);
                    display: inline-block;
                    min-width: 80px;
                }

                .dashboard-card td:nth-child(2)::before,
                .dc-dashboard-card td:nth-child(2)::before {
                    content: "App Key: ";
                    font-weight: 600;
                    color: var(--text-secondary);
                    display: inline-block;
                    min-width: 80px;
                }

                .dashboard-card td:nth-child(3)::before,
                .dc-dashboard-card td:nth-child(3)::before {
                    content: "Customer: ";
                    font-weight: 600;
                    color: var(--text-secondary);
                    display: inline-block;
                    min-width: 80px;
                }

                /* Add more field labels as needed - customize based on your dashboard columns */
                .dashboard-card td:nth-child(4)::before,
                .dc-dashboard-card td:nth-child(4)::before {
                    content: "Details: ";
                    font-weight: 600;
                    color: var(--text-secondary);
                    display: inline-block;
                    min-width: 80px;
                }

                .dashboard-card td:nth-child(5)::before,
                .dc-dashboard-card td:nth-child(5)::before {
                    content: "Status: ";
                    font-weight: 600;
                    color: var(--text-secondary);
                    display: inline-block;
                    min-width: 80px;
                }

        /* Style the actual cell content */
        .dashboard-card td,
        .dc-dashboard-card td {
            font-size: 0.875rem !important;
            line-height: 1.4 !important;
            color: var(--text-primary) !important;
        }

            /* Style links within cells */
            .dashboard-card td a,
            .dc-dashboard-card td a {
                color: var(--accent-primary) !important;
                text-decoration: none !important;
                font-weight: 500 !important;
                display: inline-block !important;
                margin-left: 0.5rem !important;
            }

                .dashboard-card td a:hover,
                .dc-dashboard-card td a:hover {
                    color: var(--accent-hover) !important;
                    text-decoration: underline !important;
                }

    /* Mobile dashboard header adjustments */
    .dashboard-header,
    .dc-dashboard-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        margin-bottom: 1.5rem !important;
        padding-bottom: 1rem !important;
        border-bottom: 1px solid var(--border-primary) !important;
    }

    .dashboard-title,
    .dc-dashboard-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
        color: var(--text-primary) !important;
    }

    /* Mobile legend adjustments */
    .legend,
    .dc-legend {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0.75rem !important;
        background: var(--bg-tertiary) !important;
        border-radius: 0.5rem !important;
    }

    .legend-item,
    .dc-legend-item {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        font-size: 0.8125rem !important;
        font-weight: 500 !important;
        padding: 0.25rem 0.5rem !important;
        background: var(--bg-secondary) !important;
        border-radius: 0.25rem !important;
        border: 1px solid var(--border-primary) !important;
    }

    .legend-dot,
    .dc-legend-dot {
        width: 0.75rem !important;
        height: 0.75rem !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }
}

/* Extra small mobile devices */
@media screen and (max-width: 480px) {
    .dashboard-card,
    .dc-dashboard-card {
        padding: 0.75rem !important;
        margin: 0.5rem 0 !important;
        border-radius: 0.5rem !important;
    }

        /* Mobile caption adjustments for small screens */
        .dashboard-card > caption,
        .dc-dashboard-card > caption,
        .dashboard-card table > caption,
        .dc-dashboard-card table > caption {
            margin: -0.75rem -0.75rem 1rem -0.75rem !important;
            padding: 1rem !important;
            font-size: 1.125rem !important;
            border-radius: 0.5rem 0.5rem 0 0 !important;
        }

    .dashboard-title,
    .dc-dashboard-title {
        font-size: 1.125rem !important;
        text-align: center !important;
    }

    /* Smaller cards on phones */
    .dashboard-card tr:not(:first-child),
    .dc-dashboard-card tr:not(:first-child) {
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }

    .dashboard-card td,
    .dc-dashboard-card td {
        font-size: 0.8125rem !important;
        padding: 0.375rem 0 !important;
    }

        /* Adjust field labels for smaller screens */
        .dashboard-card td::before,
        .dc-dashboard-card td::before {
            min-width: 70px !important;
            font-size: 0.75rem !important;
        }

    /* Stack legend items vertically on very small screens */
    .legend,
    .dc-legend {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .legend-item,
    .dc-legend-item {
        justify-content: center !important;
    }
}

/* Dark mode support */
[data-theme="dark"] .dashboard-card > caption,
[data-theme="dark"] .dc-dashboard-card > caption,
[data-theme="dark"] .dashboard-card table > caption,
[data-theme="dark"] .dc-dashboard-card table > caption {
    background: var(--accent-primary) !important;
    color: white !important;
}

[data-theme="dark"] .dashboard-card tr:not(:first-child),
[data-theme="dark"] .dc-dashboard-card tr:not(:first-child) {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-primary) !important;
}

[data-theme="dark"] .dashboard-card td::before,
[data-theme="dark"] .dc-dashboard-card td::before {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .dashboard-card td a,
[data-theme="dark"] .dc-dashboard-card td a {
    color: var(--accent-primary) !important;
}

    [data-theme="dark"] .dashboard-card td a:hover,
    [data-theme="dark"] .dc-dashboard-card td a:hover {
        color: var(--accent-hover) !important;
    }

[data-theme="dark"] .legend,
[data-theme="dark"] .dc-legend {
    background: var(--bg-tertiary) !important;
}

[data-theme="dark"] .legend-item,
[data-theme="dark"] .dc-legend-item {
    background: var(--bg-secondary) !important;
    border-color: var(--border-primary) !important;
}

/* Animation for mobile card appearance */
@keyframes mobile-card-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media screen and (max-width: 1023px) {
    .dashboard-card tr:not(:first-child),
    .dc-dashboard-card tr:not(:first-child) {
        animation: mobile-card-appear 0.3s ease-out !important;
    }

    /* Stagger the animation for multiple cards */
    .dashboard-card tr:nth-child(2),
    .dc-dashboard-card tr:nth-child(2) {
        animation-delay: 0.1s;
    }

    .dashboard-card tr:nth-child(3),
    .dc-dashboard-card tr:nth-child(3) {
        animation-delay: 0.2s;
    }

    .dashboard-card tr:nth-child(4),
    .dc-dashboard-card tr:nth-child(4) {
        animation-delay: 0.3s;
    }

    .dashboard-card tr:nth-child(5),
    .dc-dashboard-card tr:nth-child(5) {
        animation-delay: 0.4s;
    }

    .dashboard-card tr:nth-child(6),
    .dc-dashboard-card tr:nth-child(6) {
        animation-delay: 0.5s;
    }
}

/* Ensure proper spacing at the bottom */
@media screen and (max-width: 1023px) {
    .dashboard-card tr:last-child,
    .dc-dashboard-card tr:last-child {
        margin-bottom: 0 !important;
    }
}

/* Add subtle hover effects for mobile cards */
@media screen and (max-width: 1023px) {
    .dashboard-card tr:not(:first-child):hover,
    .dc-dashboard-card tr:not(:first-child):hover {
        transform: translateY(-2px) !important;
        box-shadow: var(--shadow-md) !important;
        border-color: var(--accent-primary) !important;
    }
}

/* Accessibility improvements */
@media screen and (max-width: 1023px) {
    .dashboard-card tr:not(:first-child),
    .dc-dashboard-card tr:not(:first-child) {
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .dashboard-card td:first-child,
    .dc-dashboard-card td:first-child {
        border-top: 3px solid var(--accent-primary);
        padding-top: 0.75rem !important;
    }
}

/* Print styles for mobile */
@media print and (max-width: 1023px) {
    .dashboard-card tr:not(:first-child),
    .dc-dashboard-card tr:not(:first-child) {
        break-inside: avoid;
        margin-bottom: 0.5rem !important;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* ===========================================
   SIMPLE MODAL - NO BLOCKUI
   =========================================== */

.simple-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.modal-dialog {
    position: relative;
    z-index: 10000;
    max-width: 90vw;
    max-height: 90vh;
    width: 1100px;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

    .modal-header h4 {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--text-primary);
    }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

    .modal-close:hover {
        background: var(--error);
        color: white;
    }

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.search-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0.5rem;
    margin-bottom: 1.5rem;
}

    .search-table td {
        vertical-align: top;
        padding: 0.25rem;
    }

.button-row {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-primary);
    text-align: center;
}

.results-section {
    margin-top: 1rem;
}

.results-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

    .results-grid th,
    .results-grid td {
        padding: 0.75rem;
        border-bottom: 1px solid var(--border-primary);
        text-align: left;
    }

    .results-grid th {
        background: var(--bg-tertiary);
        font-weight: 600;
        color: var(--text-primary);
    }

    .results-grid tr:hover {
        background: var(--bg-tertiary);
    }

.no-matches {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.new-button-row {
    text-align: center;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

    .btn-primary:hover {
        background: var(--accent-hover);
    }

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

    .btn-secondary:hover {
        background: var(--border-primary);
    }

.btn-success {
    background: var(--success);
    color: white;
}

    .btn-success:hover {
        background: #059669;
    }

body.modal-open {
    overflow: hidden;
}

/* Dark mode support */
[data-theme="dark"] .modal-content {
    background: var(--bg-secondary);
}

[data-theme="dark"] .modal-header {
    background: var(--bg-tertiary);
    border-bottom-color: var(--border-primary);
}

[data-theme="dark"] .results-grid th {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .results-grid tr:hover {
    background: var(--bg-tertiary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .modal-dialog {
        width: calc(100vw - 2rem);
        margin: 1rem;
    }

    .modal-header,
    .modal-body {
        padding: 1rem;
    }

    .search-table {
        border-spacing: 0.25rem;
    }
}

/* Standardize all grid icons */
.dc-grid-container img[src*=".svg"],
.dc-grid-container svg {
    width: 24px !important;
    height: 24px !important;
}

/* Target specific icon if needed */
img[src*="edit-history-arrow.svg"] {
    width: 24px !important;
    height: 24px !important;
}

/* Target specific icon if needed */
input[src*="edit-history-arrow.svg"] {
    width: 24px !important;
    height: 24px !important;
}

/* ===========================================
   SESSION EXPIRED PAGE STYLES
   =========================================== */

/* Session Expired specific message styling */
.dc-session-expired-message {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    display: block;
}

/* Session Expired information card */
.dc-session-expired-info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.dc-session-expired-icon-container {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dc-session-expired-icon {
    width: 2rem;
    height: 2rem;
    color: var(--warning);
}

.dc-session-expired-content {
    flex: 1;
}

.dc-session-expired-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.dc-session-expired-description {
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

.dc-session-expired-reasons {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .dc-session-expired-reasons li {
        padding: 0.5rem 0;
        padding-left: 1.5rem;
        position: relative;
        color: var(--text-secondary);
    }

        .dc-session-expired-reasons li::before {
            content: "•";
            position: absolute;
            left: 0;
            color: var(--warning);
            font-weight: bold;
        }

/* Session Expired actions container */
.dc-session-expired-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-primary);
}

/* Session Expired tips/recommendations card */
.dc-session-expired-tips-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
}

.dc-session-expired-tips-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.dc-session-expired-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.dc-session-expired-tip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

    .dc-session-expired-tip-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--accent-primary);
    }

/* Size the tip icons appropriately */
.dc-session-expired-tip-icon {
    width: 3rem !important;
    height: 3rem !important;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

    .dc-session-expired-tip-icon svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        color: var(--accent-primary);
        stroke-width: 2.5;
    }

.dc-session-expired-tip-content {
    flex: 1;
}

    .dc-session-expired-tip-content h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0 0 0.5rem 0;
    }

    .dc-session-expired-tip-content p {
        color: var(--text-secondary);
        margin: 0;
        line-height: 1.5;
    }

/* Mobile responsive adjustments for session expired page */
@media (max-width: 768px) {
    .dc-session-expired-info-card {
        flex-direction: column;
        text-align: center;
    }

    .dc-session-expired-actions {
        flex-direction: column;
        align-items: center;
    }

    .dc-session-expired-tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-session-expired-tip-item {
        padding: 1rem;
    }

    .dc-session-expired-tip-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-bottom: 0.75rem;
    }

        .dc-session-expired-tip-icon svg {
            width: 1.25rem !important;
            height: 1.25rem !important;
        }

    .dc-session-expired-tips-card {
        padding: 1.5rem;
    }
}

/* Dark mode support for session expired page */
[data-theme="dark"] .dc-session-expired-icon-container {
    background: rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .dc-session-expired-icon {
    color: var(--warning);
}

[data-theme="dark"] .dc-session-expired-tip-icon {
    background: rgba(99, 102, 241, 0.2);
}

    [data-theme="dark"] .dc-session-expired-tip-icon svg {
        color: var(--accent-primary);
    }

[data-theme="dark"] .dc-session-expired-tips-card {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .dc-session-expired-tip-item {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-session-expired-tip-item:hover {
        border-color: var(--accent-primary);
    }

/* Animation for session expired page load */
@keyframes sessionExpiredFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dc-content-card,
.dc-session-expired-info-card,
.dc-session-expired-tips-card {
    animation: sessionExpiredFadeIn 0.6s ease-out;
}

.dc-session-expired-info-card {
    animation-delay: 0.2s;
}

.dc-session-expired-tips-card {
    animation-delay: 0.4s;
}

.dc-session-expired-actions {
    animation: sessionExpiredFadeIn 0.6s ease-out;
    animation-delay: 0.6s;
}

/* ===========================================
   BUYOUT REQUEST PAGE STYLES
   =========================================== */

/* Buyout page message styling */
.dc-buyout-message {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    display: block;
}

/* Buyout page information card */
.dc-buyout-info-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.dc-buyout-icon-container {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dc-buyout-icon {
    width: 2rem;
    height: 2rem;
    color: var(--accent-primary);
}

.dc-buyout-content {
    flex: 1;
}

.dc-buyout-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

.dc-buyout-description {
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
}

/* Contact Details Styling */
.dc-contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--bg-tertiary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-primary);
}

.dc-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-primary);
}

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

.dc-contact-label {
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
    flex-shrink: 0;
}

.dc-contact-value {
    color: var(--text-primary);
    font-weight: 500;
}

.dc-phone-link {
    color: var(--accent-primary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

    .dc-phone-link:hover {
        color: var(--accent-hover) !important;
        text-decoration: underline !important;
    }

/* Buyout tips/recommendations card */
.dc-buyout-tips-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 2rem;
    margin: 2rem 0;
}

.dc-buyout-tips-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1.5rem 0;
}

.dc-buyout-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.dc-buyout-tip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

    .dc-buyout-tip-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--accent-primary);
    }

/* Size the tip icons appropriately */
.dc-buyout-tip-icon {
    width: 3rem !important;
    height: 3rem !important;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

    .dc-buyout-tip-icon svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        color: var(--accent-primary);
        stroke-width: 2.5;
    }

.dc-buyout-tip-content {
    flex: 1;
}

    .dc-buyout-tip-content h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0 0 0.5rem 0;
    }

    .dc-buyout-tip-content p {
        color: var(--text-secondary);
        margin: 0;
        line-height: 1.5;
    }

/* Mobile responsive adjustments for buyout page */
@media (max-width: 768px) {
    .dc-buyout-info-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .dc-contact-details {
        padding: 1rem;
    }

    .dc-contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: left;
    }

    .dc-contact-label {
        min-width: auto;
        font-size: 0.875rem;
    }

    .dc-buyout-tips-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-buyout-tip-item {
        padding: 1rem;
    }

    .dc-buyout-tip-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-bottom: 0.75rem;
    }

        .dc-buyout-tip-icon svg {
            width: 1.25rem !important;
            height: 1.25rem !important;
        }

    .dc-buyout-tips-card {
        padding: 1.5rem;
    }
}

/* Dark mode support for buyout page */
[data-theme="dark"] .dc-buyout-icon-container {
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .dc-buyout-icon {
    color: var(--accent-primary);
}

[data-theme="dark"] .dc-buyout-tip-icon {
    background: rgba(99, 102, 241, 0.2);
}

    [data-theme="dark"] .dc-buyout-tip-icon svg {
        color: var(--accent-primary);
    }

[data-theme="dark"] .dc-buyout-tips-card,
[data-theme="dark"] .dc-buyout-info-card {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .dc-buyout-tip-item {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-buyout-tip-item:hover {
        border-color: var(--accent-primary);
    }

[data-theme="dark"] .dc-contact-details {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .dc-contact-item {
    border-bottom-color: var(--border-primary);
}

[data-theme="dark"] .dc-phone-link {
    color: var(--accent-primary) !important;
}

    [data-theme="dark"] .dc-phone-link:hover {
        color: var(--accent-hover) !important;
    }

/* Animation for buyout page load */
@keyframes buyoutFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dc-alert,
.dc-buyout-info-card,
.dc-buyout-tips-card {
    animation: buyoutFadeIn 0.6s ease-out;
}

.dc-buyout-info-card {
    animation-delay: 0.2s;
}

.dc-buyout-tips-card {
    animation-delay: 0.4s;
}

/* ===========================================
   CHANGE PASSWORD PAGE STYLES
   =========================================== */

/* Change Password Card Specific Styling */
.dc-change-password-card {
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Change Password Form Container */
.dc-change-password-form {
    max-width: 400px;
    margin: 0 auto;
}

/* Change Password Message Styling */
.dc-change-password-message {
    display: block;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    min-height: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

    /* Success Message */
    .dc-change-password-message:contains("changed") {
        background: rgba(16, 185, 129, 0.1);
        border: 1px solid var(--success);
        color: var(--success);
    }

    /* Error Message */
    .dc-change-password-message[style*="color:red"],
    .dc-change-password-message:contains("Unable"),
    .dc-change-password-message:contains("minimum"),
    .dc-change-password-message:contains("match") {
        background: rgba(239, 68, 68, 0.1) !important;
        border: 1px solid var(--error) !important;
        color: var(--error) !important;
    }

    /* Hide empty message */
    .dc-change-password-message:empty {
        display: none;
    }

/* Form Group Styling for Change Password */
.dc-change-password-form .dc-form-group {
    margin-bottom: 1.5rem;
}

.dc-change-password-form .dc-form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Input Container for Change Password */
.dc-change-password-form .dc-input-container {
    position: relative;
    transition: all 0.2s ease;
}

    .dc-change-password-form .dc-input-container:focus-within {
        transform: translateY(-1px);
    }

.dc-change-password-form .dc-input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--text-tertiary);
    z-index: 2;
    transition: color 0.2s ease;
}

.dc-change-password-form .dc-input-container:focus-within .dc-input-icon {
    color: var(--accent-primary);
}

/* Form Input Styling for Change Password */
.dc-change-password-form .dc-form-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.5rem;
    border: 2px solid var(--border-primary);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    outline: none;
}

    .dc-change-password-form .dc-form-input:focus {
        border-color: var(--accent-primary);
        background: var(--bg-secondary);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }

    .dc-change-password-form .dc-form-input::placeholder {
        color: var(--text-tertiary);
    }

/* Form Actions for Change Password */
.dc-change-password-form .dc-form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Password Requirements Card */
.dc-password-requirements-card {
    max-width: 800px;
    margin: 0 auto;
}

.dc-password-requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.dc-password-requirement-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

    .dc-password-requirement-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        border-color: var(--accent-primary);
    }

/* Password Requirement Icons */
.dc-password-requirement-icon {
    width: 3rem !important;
    height: 3rem !important;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 1rem;
}

    .dc-password-requirement-icon svg {
        width: 1.5rem !important;
        height: 1.5rem !important;
        color: var(--accent-primary);
        stroke-width: 2.5;
    }

.dc-password-requirement-content {
    flex: 1;
}

    .dc-password-requirement-content h4 {
        font-size: 1.125rem;
        font-weight: 600;
        color: var(--text-primary);
        margin: 0 0 0.5rem 0;
    }

    .dc-password-requirement-content p {
        color: var(--text-secondary);
        margin: 0;
        line-height: 1.5;
    }

/* Button Styling for Change Password */
.dc-change-password-form .dc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    box-sizing: border-box;
    min-height: 2.75rem;
}

.dc-change-password-form .dc-btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

    .dc-change-password-form .dc-btn-primary:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.dc-change-password-form .dc-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

    .dc-change-password-form .dc-btn-outline:hover {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border-color: var(--border-secondary);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

/* Mobile responsive adjustments for change password page */
@media (max-width: 768px) {
    .dc-change-password-card,
    .dc-password-requirements-card {
        margin: 0 1rem 2rem 1rem;
    }

    .dc-change-password-form {
        max-width: 100%;
        padding: 0 0.5rem;
    }

        .dc-change-password-form .dc-form-actions {
            flex-direction: column;
            align-items: stretch;
        }

        .dc-change-password-form .dc-btn {
            width: 100%;
            justify-content: center;
        }

    .dc-password-requirements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .dc-password-requirement-item {
        padding: 1rem;
    }

    .dc-password-requirement-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin-bottom: 0.75rem;
    }

        .dc-password-requirement-icon svg {
            width: 1.25rem !important;
            height: 1.25rem !important;
        }
}

/* Dark mode support for change password page */
[data-theme="dark"] .dc-change-password-message:contains("changed") {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #86efac;
}

[data-theme="dark"] .dc-change-password-message[style*="color:red"],
[data-theme="dark"] .dc-change-password-message:contains("Unable"),
[data-theme="dark"] .dc-change-password-message:contains("minimum"),
[data-theme="dark"] .dc-change-password-message:contains("match") {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: var(--error) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .dc-change-password-form .dc-form-input {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-change-password-form .dc-form-input:focus {
        background: var(--bg-secondary);
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    }

[data-theme="dark"] .dc-password-requirement-icon {
    background: rgba(99, 102, 241, 0.2);
}

    [data-theme="dark"] .dc-password-requirement-icon svg {
        color: var(--accent-primary);
    }

[data-theme="dark"] .dc-password-requirements-card,
[data-theme="dark"] .dc-change-password-card {
    background: var(--bg-secondary);
    border-color: var(--border-primary);
}

[data-theme="dark"] .dc-password-requirement-item {
    background: var(--bg-tertiary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-password-requirement-item:hover {
        border-color: var(--accent-primary);
    }

[data-theme="dark"] .dc-change-password-form .dc-btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

    [data-theme="dark"] .dc-change-password-form .dc-btn-primary:hover {
        background: var(--accent-hover);
        color: white;
    }

[data-theme="dark"] .dc-change-password-form .dc-btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-primary);
}

    [data-theme="dark"] .dc-change-password-form .dc-btn-outline:hover {
        background: var(--bg-tertiary);
        color: var(--text-primary);
        border-color: var(--border-secondary);
    }

/* Animation for change password page load */
@keyframes changePasswordFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dc-change-password-card,
.dc-password-requirements-card {
    animation: changePasswordFadeIn 0.6s ease-out;
}

.dc-password-requirements-card {
    animation-delay: 0.2s;
}

/* Focus states for accessibility */
.dc-change-password-form .dc-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dc-change-password-form .dc-form-input {
        border-width: 2px;
    }

    .dc-change-password-form .dc-btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dc-change-password-card,
    .dc-password-requirements-card,
    .dc-change-password-form .dc-input-container,
    .dc-change-password-form .dc-btn,
    .dc-password-requirement-item {
        animation: none;
        transition: none;
    }

        .dc-change-password-form .dc-input-container:focus-within,
        .dc-change-password-form .dc-btn:hover,
        .dc-password-requirement-item:hover {
            transform: none;
        }
}

/* ===========================================
   DOCUMENT TABLE WIDTH AND COLUMN SIZING FIX
   =========================================== */

/* Fix for document table container */
#DocumentDiv {
    width: 100% !important;
    overflow-x: auto !important;
    margin-bottom: 1rem;
}

    /* Document table styling */
    #DocumentDiv table,
    table[id*="DocumentTable"] {
        width: 100% !important;
        min-width: 900px !important;
        table-layout: auto !important;
        border-collapse: separate !important;
        border-spacing: 0 !important;
    }

        /* Table cell styling to prevent cutoff */
        #DocumentDiv table th,
        #DocumentDiv table td,
        table[id*="DocumentTable"] th,
        table[id*="DocumentTable"] td {
            padding: 0.75rem !important;
            white-space: nowrap !important;
            overflow: visible !important;
            text-overflow: clip !important;
            min-width: 60px !important;
        }

            /* Specific column width adjustments */
            #DocumentDiv table th:nth-child(1),
            #DocumentDiv table td:nth-child(1) {
                width: 120px !important; /* Group column */
            }

            #DocumentDiv table th:nth-child(2),
            #DocumentDiv table td:nth-child(2) {
                width: 80px !important; /* Select column */
            }

            #DocumentDiv table th:nth-child(3),
            #DocumentDiv table td:nth-child(3) {
                width: 250px !important; /* Document name column */
                white-space: normal !important;
            }

            #DocumentDiv table th:nth-child(4),
            #DocumentDiv table td:nth-child(4) {
                width: 120px !important; /* Direct to PDF column */
            }

            #DocumentDiv table th:nth-child(5),
            #DocumentDiv table td:nth-child(5) {
                width: 80px !important; /* View column */
            }

            #DocumentDiv table th:nth-child(6),
            #DocumentDiv table td:nth-child(6) {
                width: 150px !important; /* Attach File column */
            }

            #DocumentDiv table th:nth-child(7),
            #DocumentDiv table td:nth-child(7) {
                width: 120px !important; /* Attach as PDF column */
            }

            #DocumentDiv table th:nth-child(8),
            #DocumentDiv table td:nth-child(8) {
                width: 150px !important; /* Date Generated column */
            }

        /* Header styling */
        #DocumentDiv table th {
            font-weight: 600 !important;
            background: var(--bg-tertiary) !important;
            color: var(--text-primary) !important;
            border-bottom: 2px solid var(--border-primary) !important;
            position: sticky !important;
            top: 0 !important;
            z-index: 10 !important;
        }

/* Mobile responsive */
@media (max-width: 1200px) {
    #DocumentDiv {
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch !important;
    }

        #DocumentDiv::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 20px;
            background: linear-gradient(to left, rgba(0,0,0,0.1), transparent);
            pointer-events: none;
        }
}

/* Dark mode support */
[data-theme="dark"] #DocumentDiv table th {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-bottom-color: var(--border-primary) !important;
}

/* Selection buttons row styling */
#DocumentDiv table tr:first-child td {
    white-space: normal !important;
}

    #DocumentDiv table tr:first-child td img {
        width: 24px !important;
        height: 24px !important;
        margin: 0 4px !important;
    }