/**
 * Valident Dashboard - Premium SaaS Styles
 *
 * Design system matching dental-forms-referrals plugin
 * with modern, professional appearance.
 */

/* =====================================================
   CSS Custom Properties (Brand-aware)
   ===================================================== */
:root {
    /* Brand colors (overridden by Brand::outputBrandStyles) */
    --vu-primary-color: #0073aa;
    --vu-secondary-color: #005177;
    --vu-gradient: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    --vu-accent-color: #10b981;
    --vu-text-on-primary: #ffffff;

    /* Status colors */
    --vu-status-new: #3b82f6;
    --vu-status-progress: #f59e0b;
    --vu-status-responded: #06b6d4;
    --vu-status-awaiting: #8b5cf6;
    --vu-status-resolved: #10b981;
    --vu-status-closed: #6b7280;

    /* Neutral colors */
    --vu-text-primary: #1f2937;
    --vu-text-secondary: #6b7280;
    --vu-text-muted: #9ca3af;
    --vu-border: #e5e7eb;
    --vu-background: #f9fafb;
    --vu-card-bg: #ffffff;

    /* Semantic colors */
    --vu-success: #10b981;
    --vu-warning: #f59e0b;
    --vu-error: #ef4444;
    --vu-info: #3b82f6;

    /* Typography */
    --vu-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;

    /* Spacing */
    --vu-space-1: 0.25rem;
    --vu-space-2: 0.5rem;
    --vu-space-3: 0.75rem;
    --vu-space-4: 1rem;
    --vu-space-5: 1.25rem;
    --vu-space-6: 1.5rem;
    --vu-space-8: 2rem;

    /* Border radius */
    --vu-radius-sm: 4px;
    --vu-radius-md: 8px;
    --vu-radius-lg: 12px;
    --vu-radius-full: 9999px;

    /* Shadows */
    --vu-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --vu-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --vu-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --vu-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   Base Layout
   ===================================================== */
.vu-dashboard {
    max-width: none;
    font-family: var(--vu-font-family);
}

.vu-dashboard h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--vu-text-primary);
    margin-bottom: var(--vu-space-6);
}

/* Override conflicting plugin styles for button icons */
.vu-dashboard .button .dashicons,
.vu-dashboard .button-small .dashicons,
.vu-dashboard .button-primary .dashicons {
    padding-top: 0;
    vertical-align: middle;
}

.vu-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--vu-space-6);
}

/* Period Filter */
.vu-period-filter {
    display: flex;
    align-items: center;
    gap: var(--vu-space-3);
}

.vu-period-filter label {
    font-weight: 500;
    color: var(--vu-text-secondary);
}

.vu-period-filter select {
    min-width: 160px;
    padding: 10px 16px;
    border: 1px solid var(--vu-border);
    border-radius: var(--vu-radius-md);
    background: var(--vu-card-bg);
    font-size: 14px;
    transition: all 0.2s ease;
}

.vu-period-filter select:hover {
    border-color: var(--vu-primary-color);
}

.vu-period-filter select:focus {
    outline: none;
    border-color: var(--vu-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* =====================================================
   Premium Stat Cards
   ===================================================== */
.vu-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--vu-space-6);
    margin-bottom: var(--vu-space-8);
}

.vu-stat-card {
    background: var(--vu-card-bg);
    border-radius: var(--vu-radius-lg);
    padding: var(--vu-space-6);
    box-shadow: var(--vu-shadow-md);
    border: 1px solid var(--vu-border);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
}

.vu-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--vu-shadow-xl);
}

/* Gradient top border */
.vu-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.vu-card-submissions::before { background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%); }
.vu-card-responses::before { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }
.vu-card-rate::before { background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); }
.vu-card-registrations::before { background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%); }
.vu-card-pending::before { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); }

/* Stat Icon */
.vu-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--vu-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--vu-space-4);
}

.vu-card-submissions .vu-stat-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #3b82f6;
}

.vu-card-responses .vu-stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #10b981;
}

.vu-card-rate .vu-stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: #f59e0b;
}

.vu-card-registrations .vu-stat-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: #8b5cf6;
}

.vu-card-pending .vu-stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #ef4444;
}

.vu-stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Stat Content */
.vu-stat-content h3 {
    margin: 0 0 var(--vu-space-2) 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vu-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vu-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--vu-primary-color) 0%, var(--vu-accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--vu-space-2);
}

.vu-stat-meta {
    font-size: 0.875rem;
    color: var(--vu-text-muted);
}

/* Unread Badge with Pulse Animation */
.vu-unread-badge {
    display: inline-flex;
    align-items: center;
    background: var(--vu-error);
    color: var(--vu-text-on-primary);
    padding: 4px 12px;
    border-radius: var(--vu-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* Stat Link */
.vu-stat-link {
    margin-top: auto;
    padding-top: var(--vu-space-4);
    color: var(--vu-primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: var(--vu-space-1);
    transition: all 0.2s ease;
}

.vu-stat-link:hover {
    color: var(--vu-secondary-color);
    transform: translateX(4px);
}

/* =====================================================
   Dashboard Layout
   ===================================================== */
.vu-dashboard-row {
    display: flex;
    gap: var(--vu-space-6);
    margin-bottom: var(--vu-space-6);
}

.vu-dashboard-col {
    flex: 1;
    min-width: 0;
}

.vu-col-wide {
    flex: 2;
}

/* =====================================================
   Premium Panels
   ===================================================== */
.vu-panel {
    background: var(--vu-card-bg);
    border-radius: var(--vu-radius-lg);
    padding: var(--vu-space-6);
    box-shadow: var(--vu-shadow-md);
    border: 1px solid var(--vu-border);
    margin-bottom: var(--vu-space-6);
    transition: box-shadow 0.3s ease;
}

.vu-panel:hover {
    box-shadow: var(--vu-shadow-lg);
}

.vu-panel-title {
    margin: 0 0 var(--vu-space-5) 0;
    padding-bottom: var(--vu-space-4);
    border-bottom: 1px solid var(--vu-border);
    font-size: 1rem;
    font-weight: 600;
    color: var(--vu-text-primary);
}

/* =====================================================
   Charts
   ===================================================== */
.vu-chart-container {
    position: relative;
    height: 300px;
}

.vu-chart-small {
    height: 180px;
}

/* =====================================================
   Status List
   ===================================================== */
.vu-status-list {
    list-style: none;
    margin: var(--vu-space-5) 0 0;
    padding: 0;
}

.vu-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--vu-space-4) var(--vu-space-4);
    margin-bottom: var(--vu-space-2);
    border-radius: var(--vu-radius-md);
    transition: all 0.2s ease;
}

.vu-status-item:last-child {
    margin-bottom: 0;
}

/* Status item background colors */
.vu-status-item.vu-status-new {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left: 3px solid var(--vu-status-new);
}
.vu-status-item.vu-status-in_progress {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left: 3px solid var(--vu-status-progress);
}
.vu-status-item.vu-status-responded {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-left: 3px solid var(--vu-status-responded);
}
.vu-status-item.vu-status-awaiting_info {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.12) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-left: 3px solid var(--vu-status-awaiting);
}
.vu-status-item.vu-status-resolved {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-left: 3px solid var(--vu-status-resolved);
}
.vu-status-item.vu-status-closed {
    background: linear-gradient(90deg, rgba(107, 114, 128, 0.12) 0%, rgba(107, 114, 128, 0.05) 100%);
    border-left: 3px solid var(--vu-status-closed);
}

.vu-status-label {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--vu-text-primary);
}

.vu-status-label::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: var(--vu-radius-full);
    margin-right: var(--vu-space-3);
}

.vu-status-new .vu-status-label::before { background: var(--vu-status-new); }
.vu-status-in_progress .vu-status-label::before { background: var(--vu-status-progress); }
.vu-status-responded .vu-status-label::before { background: var(--vu-status-responded); }
.vu-status-awaiting_info .vu-status-label::before { background: var(--vu-status-awaiting); }
.vu-status-resolved .vu-status-label::before { background: var(--vu-status-resolved); }
.vu-status-closed .vu-status-label::before { background: var(--vu-status-closed); }

.vu-status-count {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--vu-text-primary);
}

/* Empty chart state */
.vu-chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: var(--vu-text-muted);
    text-align: center;
}

.vu-chart-empty .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: var(--vu-space-3);
    opacity: 0.4;
}

.vu-chart-empty p {
    margin: 0;
    font-size: 0.875rem;
}

/* =====================================================
   Activity List
   ===================================================== */
.vu-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vu-activity-item {
    display: flex;
    align-items: center;
    gap: var(--vu-space-3);
    padding: var(--vu-space-3) 0;
    border-bottom: 1px solid var(--vu-border);
    transition: background 0.2s ease;
}

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

.vu-activity-item:hover {
    background: var(--vu-background);
    margin: 0 calc(var(--vu-space-3) * -1);
    padding-left: var(--vu-space-3);
    padding-right: var(--vu-space-3);
    border-radius: var(--vu-radius-md);
}

.vu-activity-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--vu-radius-md);
    background: var(--vu-background);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vu-text-secondary);
    flex-shrink: 0;
}

.vu-activity-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--vu-text-primary);
}

.vu-activity-time {
    color: var(--vu-text-muted);
    font-size: 0.75rem;
}

.vu-activity-link {
    color: var(--vu-primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
}

.vu-activity-link:hover {
    text-decoration: underline;
}

.vu-no-data {
    color: var(--vu-text-muted);
    text-align: center;
    padding: var(--vu-space-8);
    font-size: 0.875rem;
}

/* =====================================================
   Entries List
   ===================================================== */
.vu-entries-list .vu-filters {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px 24px;
    border-radius: var(--vu-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: var(--vu-space-5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.vu-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--vu-space-3);
    align-items: center;
    margin-bottom: 10px;
}

.vu-filter-select,
.vu-search-input,
.vu-filter-date {
    padding: 10px 14px;
    border: 2px solid var(--vu-border);
    border-radius: var(--vu-radius-md);
    font-size: 0.875rem;
    background: var(--vu-card-bg);
    transition: all 0.2s ease;
    height: 42px;
    box-sizing: border-box;
}

.vu-filter-select {
    min-width: 150px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.vu-search-input {
    min-width: 280px;
    flex: 1;
    max-width: 350px;
}

.vu-filter-date {
    width: 140px;
}

.vu-filter-select:hover,
.vu-search-input:hover,
.vu-filter-date:hover {
    border-color: var(--vu-primary-color);
}

.vu-filter-select:focus,
.vu-search-input:focus,
.vu-filter-date:focus {
    outline: none;
    border-color: var(--vu-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.vu-filter-form .button {
    height: 42px;
    padding: 0 20px;
    font-weight: 600;
    border-radius: var(--vu-radius-md);
    transition: all 0.2s ease;
}

.vu-filter-form .button-primary {
    background: var(--vu-gradient);
    border: none;
    color: var(--vu-text-on-primary);
    box-shadow: 0 2px 4px rgba(0, 115, 170, 0.2);
}

.vu-filter-form .button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

/* Status Tabs */
.vu-status-tabs {
    margin: 0 0 -1px 0 !important;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    float: none !important;
}

.vu-status-tabs li {
    margin: 0;
    padding: 0;
}

.vu-status-tabs a {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    background: #e9ecef;
    border: 1px solid var(--vu-border);
    border-bottom: 1px solid var(--vu-border);
    border-radius: var(--vu-radius-md) var(--vu-radius-md) 0 0;
    color: var(--vu-text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.vu-status-tabs a:hover {
    background: #f8f9fa;
    color: var(--vu-primary-color);
}

.vu-status-tabs a.current {
    background: var(--vu-primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 12px 20px;
    border-color: var(--vu-primary-color);
    border-bottom-color: var(--vu-card-bg);
    position: relative;
    z-index: 1;
    box-shadow: 0 -2px 8px rgba(0, 115, 170, 0.2);
}

.vu-status-tabs a .count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 2px 8px;
    border-radius: var(--vu-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 6px;
}

.vu-status-tabs a.current .count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* Entries Table */
.vu-entries-table {
    border-radius: var(--vu-radius-lg);
    overflow: hidden;
    box-shadow: var(--vu-shadow-md);
    border: 1px solid var(--vu-border);
    background: var(--vu-card-bg);
}

.vu-entries-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f5f9 100%);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--vu-text-secondary);
    padding: 14px 12px;
    border-bottom: 2px solid var(--vu-border);
}

.vu-entries-table td {
    padding: 14px 12px;
    vertical-align: middle;
    border-bottom: 1px solid var(--vu-border);
}

.vu-entries-table .column-cb { width: 30px; vertical-align: middle; }
.vu-entries-table .column-starred { width: 40px; }
.vu-entries-table .column-patient { width: 16%; min-width: 140px; }
.vu-entries-table .column-dentist { width: 14%; min-width: 120px; }
.vu-entries-table .column-practice { width: 14%; min-width: 120px; }
.vu-entries-table .column-status { width: 100px; }
.vu-entries-table .column-notes { width: 60px; text-align: center; }
.vu-entries-table .column-date { width: 90px; }

.vu-entries-table tr {
    transition: background 0.2s ease;
}

.vu-entries-table tbody tr:hover {
    background: rgba(0, 115, 170, 0.03);
}

.vu-entries-table tr.vu-unread {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.vu-entries-table tr.vu-unread:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.04) 100%);
}

.vu-entries-table tr.vu-unread .column-patient a {
    font-weight: 600;
    color: var(--vu-text-primary);
}

/* Unread indicator dot */
.vu-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--vu-primary-color);
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Position unread dot inline with patient name */
.vu-entries-table .column-patient .vu-cell-primary {
    display: flex;
    align-items: center;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Notes count badge */
.vu-notes-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: var(--vu-primary-color);
    color: var(--vu-text-on-primary);
    padding: 0 8px;
    border-radius: var(--vu-radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.vu-notes-count-zero {
    background: transparent;
    color: var(--vu-text-muted);
    font-weight: 400;
}

/* Cell text styling */
.vu-cell-primary {
    font-weight: 500;
    color: var(--vu-text-primary);
}

.vu-cell-secondary {
    color: var(--vu-text-secondary);
    font-size: 0.875rem;
}

.vu-cell-muted {
    color: var(--vu-text-muted);
    font-size: 0.8rem;
}

/* Per-Page Selector */
.vu-per-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    font-size: 0.8rem;
    color: var(--vu-text-secondary);
}

.vu-per-page-select {
    padding: 4px 8px;
    border: 1px solid var(--vu-border);
    border-radius: var(--vu-radius-sm);
    background: var(--vu-card-bg);
    font-size: 0.8rem;
    cursor: pointer;
    min-width: 60px;
}

.vu-per-page-select:hover {
    border-color: var(--vu-primary-color);
}

.vu-per-page-select:focus {
    outline: none;
    border-color: var(--vu-primary-color);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Sortable Column Headers */

/* Hide WordPress default sorting indicators */
.vu-entries-table th.sortable .sorting-indicator,
.vu-entries-table th.sorted .sorting-indicator {
    display: none !important;
}

/* Show only our custom indicators */
.vu-entries-table th.sortable .sorting-indicators .sorting-indicator,
.vu-entries-table th.sorted .sorting-indicators .sorting-indicator {
    display: block !important;
}

.vu-entries-table th.sortable a,
.vu-entries-table th.sorted a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 4px;
}

.vu-entries-table th.sortable:hover a,
.vu-entries-table th.sorted a {
    color: var(--vu-primary-color);
}

.vu-entries-table th .sorting-indicators {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    margin-left: 4px;
}

.vu-entries-table th .sorting-indicators .sorting-indicator {
    width: 0;
    height: 0;
    border-style: solid;
    opacity: 0.3;
}

.vu-entries-table th .sorting-indicators .sorting-indicator.asc {
    border-width: 0 4px 4px 4px;
    border-color: transparent transparent currentColor transparent;
}

.vu-entries-table th .sorting-indicators .sorting-indicator.desc {
    border-width: 4px 4px 0 4px;
    border-color: currentColor transparent transparent transparent;
}

.vu-entries-table th.sorted.asc .sorting-indicators .sorting-indicator.asc,
.vu-entries-table th.sorted.desc .sorting-indicators .sorting-indicator.desc {
    opacity: 1;
    color: var(--vu-primary-color);
}

.vu-entries-table th.sortable:hover .sorting-indicators .sorting-indicator {
    opacity: 0.5;
}

/* Star Button */
.vu-star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--vu-space-2);
    color: var(--vu-text-muted);
    border-radius: var(--vu-radius-sm);
    transition: all 0.2s ease;
}

.vu-star-btn:hover {
    color: var(--vu-warning);
    background: rgba(245, 158, 11, 0.1);
}

.vu-star-btn.starred {
    color: var(--vu-warning);
}

/* Status Badge */
.vu-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--vu-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vu-status-new {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.vu-status-in_progress {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.vu-status-responded {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

.vu-status-awaiting_info {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.vu-status-resolved {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.vu-status-closed {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

.vu-no-entries {
    text-align: center;
    color: var(--vu-text-muted);
    padding: var(--vu-space-8);
}

/* =====================================================
   Entry Detail
   ===================================================== */
.vu-entry-detail .vu-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--vu-space-2);
    color: var(--vu-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    margin-right: var(--vu-space-4);
    padding: var(--vu-space-2) var(--vu-space-3);
    border-radius: var(--vu-radius-md);
    transition: all 0.2s ease;
}

.vu-entry-detail .vu-back-link:hover {
    color: var(--vu-primary-color);
    background: var(--vu-background);
}

/* Generic Badge */
.vu-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--vu-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
    margin-left: var(--vu-space-3);
}

.vu-badge-unread {
    background: var(--vu-info);
    color: var(--vu-text-on-primary);
}

.vu-badge-submission {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.vu-badge-response {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* Entry Layout */
.vu-entry-layout {
    display: flex;
    gap: var(--vu-space-6);
    margin-top: var(--vu-space-6);
}

.vu-entry-main {
    flex: 2;
    min-width: 0;
}

.vu-entry-sidebar {
    flex: 1;
    min-width: 300px;
    max-width: 380px;
}

.vu-entry-date {
    float: right;
    font-size: 0.875rem;
    font-weight: normal;
    color: var(--vu-text-secondary);
}

/* Entry Fields Table */
.vu-entry-fields {
    width: 100%;
    border-collapse: collapse;
}

.vu-entry-fields th,
.vu-entry-fields td {
    padding: var(--vu-space-4) var(--vu-space-3);
    border-bottom: 1px solid var(--vu-border);
    vertical-align: top;
    text-align: left;
}

.vu-entry-fields th {
    width: 200px;
    font-weight: 600;
    color: var(--vu-text-primary);
    font-size: 0.875rem;
}

.vu-entry-fields td {
    color: var(--vu-text-secondary);
}

.vu-entry-fields tr:last-child th,
.vu-entry-fields tr:last-child td {
    border-bottom: none;
}

.vu-encrypted-badge {
    color: var(--vu-text-muted);
    font-size: 14px;
    vertical-align: middle;
}

.vu-file-link {
    display: inline-flex;
    align-items: center;
    gap: var(--vu-space-2);
    color: var(--vu-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.vu-file-link:hover {
    text-decoration: underline;
}

/* PDF Download Button */
.vu-pdf-download {
    display: inline-flex;
    align-items: center;
    gap: var(--vu-space-2);
    background: var(--vu-gradient);
    color: var(--vu-text-on-primary);
    padding: 10px 20px;
    border-radius: var(--vu-radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 115, 170, 0.3);
}

.vu-pdf-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 115, 170, 0.4);
    color: var(--vu-text-on-primary);
}

/* Linked Entries */
.vu-linked-entries {
    display: flex;
    flex-direction: column;
    gap: var(--vu-space-3);
}

.vu-linked-entry {
    padding: var(--vu-space-4);
    background: var(--vu-background);
    border-radius: var(--vu-radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.vu-linked-entry:hover {
    background: rgba(0, 115, 170, 0.05);
}

.vu-linked-header {
    display: flex;
    flex-direction: column;
    gap: var(--vu-space-1);
}

.vu-linked-type {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.625rem;
    letter-spacing: 0.1em;
    color: var(--vu-text-muted);
}

.vu-linked-form {
    font-weight: 500;
    color: var(--vu-text-primary);
}

.vu-linked-date {
    font-size: 0.75rem;
    color: var(--vu-text-muted);
}

/* =====================================================
   Notes
   ===================================================== */
.vu-notes-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: var(--vu-space-5);
}

.vu-note {
    padding: var(--vu-space-4);
    margin-bottom: var(--vu-space-3);
    background: var(--vu-background);
    border-radius: var(--vu-radius-md);
    border-left: 3px solid var(--vu-primary-color);
}

.vu-note-header {
    display: flex;
    align-items: center;
    gap: var(--vu-space-3);
    margin-bottom: var(--vu-space-2);
}

.vu-note-author {
    font-weight: 600;
    color: var(--vu-text-primary);
    font-size: 0.875rem;
}

.vu-note-time {
    color: var(--vu-text-muted);
    font-size: 0.75rem;
}

.vu-note-actions {
    margin-left: auto;
    display: flex;
    gap: var(--vu-space-1);
}

.vu-note-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--vu-space-1);
    color: var(--vu-text-muted);
    border-radius: var(--vu-radius-sm);
    transition: all 0.2s ease;
}

.vu-note-actions button:hover {
    color: var(--vu-primary-color);
    background: var(--vu-card-bg);
}

.vu-note-content {
    line-height: 1.6;
    color: var(--vu-text-secondary);
    font-size: 0.875rem;
}

.vu-no-notes {
    color: var(--vu-text-muted);
    text-align: center;
    padding: var(--vu-space-6);
    font-size: 0.875rem;
}

.vu-add-note {
    display: flex;
    flex-direction: column;
    gap: var(--vu-space-3);
}

.vu-add-note textarea {
    width: 100%;
    resize: vertical;
    padding: var(--vu-space-3);
    border: 1px solid var(--vu-border);
    border-radius: var(--vu-radius-md);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.vu-add-note textarea:focus {
    outline: none;
    border-color: var(--vu-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.vu-note-edit-field {
    width: 100%;
    margin-bottom: var(--vu-space-3);
}

/* =====================================================
   Status Select
   ===================================================== */
.vu-status-select {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--vu-border);
    border-radius: var(--vu-radius-md);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.vu-status-select:hover {
    border-color: var(--vu-primary-color);
}

.vu-status-select:focus {
    outline: none;
    border-color: var(--vu-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* =====================================================
   Quick Actions
   ===================================================== */
.vu-quick-actions {
    display: flex;
    flex-direction: column;
    gap: var(--vu-space-2);
}

.vu-action-btn {
    display: flex;
    align-items: center;
    gap: var(--vu-space-2);
    justify-content: flex-start;
    padding: 10px 16px;
    border-radius: var(--vu-radius-md);
    transition: all 0.2s ease;
}

.vu-action-btn:hover {
    transform: translateY(-1px);
}

/* Primary Button Style */
.button-primary {
    background: var(--vu-gradient) !important;
    border: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 115, 170, 0.3) !important;
}

.button-primary:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 115, 170, 0.4) !important;
}

/* =====================================================
   Activity Log Sidebar
   ===================================================== */
.vu-activity-log {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 300px;
    overflow-y: auto;
}

.vu-activity-log .vu-activity-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--vu-space-1);
    padding: var(--vu-space-3);
    margin-bottom: var(--vu-space-2);
    background: var(--vu-background);
    border-radius: var(--vu-radius-md);
}

.vu-no-activity {
    color: var(--vu-text-muted);
    text-align: center;
    padding: var(--vu-space-6);
    font-size: 0.875rem;
}

/* =====================================================
   Meta List
   ===================================================== */
.vu-meta-list {
    margin: 0;
}

.vu-meta-list dt {
    font-weight: 600;
    margin-top: var(--vu-space-4);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vu-text-muted);
}

.vu-meta-list dt:first-child {
    margin-top: 0;
}

.vu-meta-list dd {
    margin: var(--vu-space-1) 0 0 0;
    color: var(--vu-text-primary);
    font-size: 0.875rem;
}

/* =====================================================
   Info Box
   ===================================================== */
.vu-info-box {
    background: linear-gradient(135deg, rgba(0, 115, 170, 0.05) 0%, rgba(0, 81, 119, 0.02) 100%);
    border-left: 4px solid var(--vu-primary-color);
    padding: var(--vu-space-5);
    border-radius: var(--vu-radius-sm);
    margin-bottom: var(--vu-space-6);
}

.vu-info-box p {
    margin: 0 0 var(--vu-space-2);
    color: var(--vu-text-primary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.vu-info-box p:last-child {
    margin-bottom: 0;
}

/* =====================================================
   Cards
   ===================================================== */
.vu-card {
    background: var(--vu-card-bg);
    border-radius: var(--vu-radius-lg);
    padding: var(--vu-space-6);
    box-shadow: var(--vu-shadow-md);
    border: 1px solid var(--vu-border);
    margin-bottom: var(--vu-space-6);
}

.vu-card h2 {
    margin: 0 0 var(--vu-space-5);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--vu-text-primary);
}

.vu-card h2 small {
    font-weight: 400;
    color: var(--vu-text-muted);
    font-size: 0.875rem;
}

.vu-card-secondary {
    background: var(--vu-background);
}

/* =====================================================
   Text Utilities
   ===================================================== */
.vu-text-muted {
    color: var(--vu-text-muted);
}

.vu-text-success {
    color: var(--vu-success);
}

/* =====================================================
   Form Mapping Page
   ===================================================== */
.vu-form-mapping .vu-mapping-table .column-title { width: 25%; }
.vu-form-mapping .vu-mapping-table .column-type { width: 12%; }
.vu-form-mapping .vu-mapping-table .column-status { width: 15%; }
.vu-form-mapping .vu-mapping-table .column-dentist { width: 15%; }
.vu-form-mapping .vu-mapping-table .column-practice { width: 15%; }
.vu-form-mapping .vu-mapping-table .column-actions { width: 15%; }

.vu-status-active {
    color: var(--vu-success);
    font-weight: 600;
}

.vu-status-inactive {
    color: var(--vu-warning);
}

.vu-status-none {
    color: var(--vu-text-muted);
    font-style: italic;
}

/* =====================================================
   Responsive
   ===================================================== */
@media screen and (max-width: 1200px) {
    .vu-entry-layout {
        flex-direction: column;
    }

    .vu-entry-sidebar {
        max-width: none;
    }
}

@media screen and (max-width: 782px) {
    .vu-dashboard-row {
        flex-direction: column;
    }

    .vu-stats-grid {
        grid-template-columns: 1fr;
    }

    .vu-dashboard-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--vu-space-4);
    }

    .vu-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .vu-filter-select,
    .vu-search-input {
        width: 100%;
    }

    .vu-stat-number {
        font-size: 2rem;
    }
}

/* =====================================================
   Loading Spinner
   ===================================================== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vu-loading {
    animation: spin 1s linear infinite;
}

/* =====================================================
   Analytics Page
   ===================================================== */
.vu-analytics-page .vu-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--vu-space-6);
}

.vu-filters-panel {
    margin-bottom: var(--vu-space-6);
}

.vu-analytics-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--vu-space-4);
    margin-bottom: var(--vu-space-4);
}

.vu-filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--vu-space-2);
}

.vu-filter-group label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--vu-text-secondary);
}

.vu-filter-input {
    padding: 10px 16px;
    border: 1px solid var(--vu-border);
    border-radius: var(--vu-radius-md);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.vu-filter-input:hover {
    border-color: var(--vu-primary-color);
}

.vu-filter-input:focus {
    outline: none;
    border-color: var(--vu-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.vu-filter-actions {
    display: flex;
    gap: var(--vu-space-3);
}

/* Analytics Metrics */
.vu-analytics-metrics .vu-stat-card {
    text-align: center;
}

.vu-analytics-metrics .vu-stat-card h3 {
    margin: 0 0 var(--vu-space-3);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--vu-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vu-metric-card::before {
    background: var(--vu-gradient);
}

/* Analytics Chart */
.vu-chart-panel {
    margin-bottom: var(--vu-space-6);
}

.vu-chart-large {
    height: 350px;
}

/* Analytics Panels Grid */
.vu-analytics-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--vu-space-6);
}

/* Panel List Items */
.vu-panel-list {
    max-height: 300px;
    overflow-y: auto;
}

.vu-panel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--vu-space-3) 0;
    border-bottom: 1px solid var(--vu-border);
}

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

.vu-panel-label {
    font-size: 0.875rem;
    color: var(--vu-text-primary);
}

.vu-panel-value {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--vu-primary-color);
}

/* Response Time Metrics */
.vu-response-metrics {
    margin-top: var(--vu-space-4);
    margin-bottom: var(--vu-space-6);
}

.vu-response-metrics .vu-stat-card {
    text-align: center;
}

.vu-response-metrics .vu-stat-card h3 {
    margin: 0 0 var(--vu-space-2);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--vu-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vu-response-metrics .vu-stat-number {
    font-size: 1.75rem;
    font-weight: 700;
}

.vu-response-metrics .vu-stat-meta {
    margin-top: var(--vu-space-2);
    font-size: 0.75rem;
    color: var(--vu-text-muted);
}

/* =====================================================
   Autosuggest Search
   ===================================================== */
.vu-search-wrapper {
    position: relative;
    display: inline-block;
}

.vu-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 350px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--vu-card-bg);
    border: 1px solid var(--vu-border);
    border-top: none;
    border-radius: 0 0 var(--vu-radius-md) var(--vu-radius-md);
    box-shadow: var(--vu-shadow-lg);
    z-index: 9999;
    display: none;
}

.vu-autosuggest-loading,
.vu-autosuggest-empty {
    padding: var(--vu-space-4);
    text-align: center;
    color: var(--vu-text-muted);
    font-size: 0.875rem;
}

.vu-autosuggest-item {
    display: block;
    padding: var(--vu-space-3) var(--vu-space-4);
    border-bottom: 1px solid var(--vu-border);
    cursor: pointer;
    transition: background 0.2s ease;
}

.vu-autosuggest-item:last-of-type {
    border-bottom: none;
}

.vu-autosuggest-item:hover,
.vu-autosuggest-item.highlighted {
    background: var(--vu-background);
}

.vu-autosuggest-item.vu-unread {
    background: rgba(59, 130, 246, 0.05);
}

.vu-autosuggest-item.vu-unread:hover,
.vu-autosuggest-item.vu-unread.highlighted {
    background: rgba(59, 130, 246, 0.1);
}

.vu-autosuggest-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--vu-space-2);
    margin-bottom: var(--vu-space-1);
}

.vu-autosuggest-title {
    font-weight: 500;
    color: var(--vu-text-primary);
    font-size: 0.875rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vu-autosuggest-title mark {
    background: rgba(245, 158, 11, 0.3);
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.vu-autosuggest-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--vu-radius-full);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.vu-autosuggest-meta {
    display: flex;
    align-items: center;
    gap: var(--vu-space-3);
    font-size: 0.75rem;
    color: var(--vu-text-muted);
}

.vu-autosuggest-form {
    color: var(--vu-text-secondary);
}

.vu-autosuggest-date {
    color: var(--vu-text-muted);
}

.vu-autosuggest-viewall {
    padding: var(--vu-space-3) var(--vu-space-4);
    background: var(--vu-background);
    text-align: center;
    border-top: 1px solid var(--vu-border);
}

.vu-autosuggest-viewall a {
    color: var(--vu-primary-color);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
}

.vu-autosuggest-viewall a:hover {
    text-decoration: underline;
}

/* Keyboard hint */
.vu-search-wrapper .vu-search-input:focus + .vu-search-dropdown:empty::after {
    content: 'Type at least 2 characters to search';
    display: block;
    padding: var(--vu-space-4);
    text-align: center;
    color: var(--vu-text-muted);
    font-size: 0.875rem;
}

/* =====================================================
   Print Styles
   ===================================================== */
/* =====================================================
   Respond Button & Responses Panel
   ===================================================== */
.vu-respond-panel {
    background: linear-gradient(135deg, var(--vu-primary-color) 0%, color-mix(in srgb, var(--vu-primary-color) 80%, #000) 100%);
}

.vu-respond-panel .vu-respond-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--vu-space-2);
    padding: var(--vu-space-4);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--vu-radius-md);
    transition: all 0.2s ease;
}

.vu-respond-panel .vu-respond-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.vu-responses-panel .vu-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vu-responses-count {
    background: var(--vu-primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--vu-radius-full);
    min-width: 20px;
    text-align: center;
}

.vu-responses-list {
    display: flex;
    flex-direction: column;
    gap: var(--vu-space-3);
}

.vu-response-item {
    padding: var(--vu-space-3);
    background: var(--vu-background);
    border-radius: var(--vu-radius-md);
    border: 1px solid var(--vu-border);
}

.vu-response-date {
    display: flex;
    align-items: center;
    gap: var(--vu-space-2);
    font-size: 0.875rem;
    color: var(--vu-text-secondary);
    margin-bottom: var(--vu-space-2);
}

.vu-response-date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.vu-response-item .button {
    width: 100%;
    text-align: center;
}

/* Respond column in table */
.column-respond {
    width: 100px;
    text-align: center;
}

.vu-respond-btn.button-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.vu-respond-btn.button-small .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* =====================================================
   Frontend Submission Detail (Tabbed Layout)
   ===================================================== */
.vu-submission-detail {
    /* Full width - no max-width constraint */
}

/* Header */
.vu-submission-detail .vu-detail-header {
    margin-bottom: var(--vu-space-5);
}

.vu-submission-detail .vu-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vu-text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.vu-submission-detail .vu-back-link:hover {
    color: var(--vu-text-primary);
}

.vu-submission-detail .vu-back-icon {
    font-size: 18px;
}

/* Summary Bar */
.vu-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--vu-space-5);
    background: var(--vu-card-bg);
    padding: var(--vu-space-5) var(--vu-space-6);
    border-radius: var(--vu-radius-lg);
    box-shadow: var(--vu-shadow-sm);
    margin-bottom: var(--vu-space-5);
}

.vu-summary-main {
    flex: 1;
    min-width: 200px;
}

.vu-summary-title {
    margin: 0 0 4px;
    font-size: 1.5em;
    font-weight: 600;
    color: var(--vu-text-primary);
}

.vu-summary-id {
    font-weight: 400;
    color: var(--vu-text-muted);
    font-size: 0.7em;
}

.vu-summary-date {
    color: var(--vu-text-secondary);
    font-size: 14px;
}

.vu-summary-stats {
    display: flex;
    gap: var(--vu-space-2);
}

.vu-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--vu-space-3) var(--vu-space-5);
    background: var(--vu-background);
    border-radius: var(--vu-radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    min-width: 80px;
}

.vu-stat-item:hover,
.vu-stat-item.active {
    background: rgba(0, 115, 170, 0.08);
    color: var(--vu-primary-color);
}

.vu-stat-item.has-unread {
    background: rgba(245, 158, 11, 0.15);
}

.vu-stat-item .vu-stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    position: relative;
    background: none;
    -webkit-text-fill-color: inherit;
}

.vu-stat-item .vu-unread-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--vu-error);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    animation: none;
}

.vu-stat-item .vu-stat-label {
    font-size: 12px;
    color: var(--vu-text-secondary);
    margin-top: 4px;
}

/* Tab Navigation */
.vu-tabs-nav {
    display: flex;
    gap: 4px;
    background: #f1f3f5;
    padding: 4px;
    border-radius: var(--vu-radius-lg);
    margin-bottom: var(--vu-space-5);
}

.vu-tab-btn {
    flex: 1;
    padding: var(--vu-space-3) var(--vu-space-4);
    background: transparent;
    border: none;
    border-radius: var(--vu-radius-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--vu-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--vu-space-2);
}

.vu-tab-btn:hover {
    color: var(--vu-text-primary);
    background: rgba(255,255,255,0.5);
}

.vu-tab-btn.active {
    background: var(--vu-card-bg);
    color: var(--vu-text-primary);
    box-shadow: var(--vu-shadow-sm);
}

.vu-tab-count {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.vu-tab-btn.active .vu-tab-count {
    background: var(--vu-primary-color);
    color: #fff;
}

.vu-tab-count--unread {
    background: var(--vu-error) !important;
    color: #fff !important;
}

/* Tab Panels */
.vu-tab-panel {
    display: none;
    background: var(--vu-card-bg);
    border-radius: var(--vu-radius-lg);
    padding: var(--vu-space-6);
    box-shadow: var(--vu-shadow-sm);
}

.vu-tab-panel.active {
    display: block;
}

/* Two-Column Field Grid */
.vu-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--vu-space-4);
}

.vu-field-item {
    padding: var(--vu-space-3) var(--vu-space-4);
    background: var(--vu-background);
    border-radius: var(--vu-radius-md);
    border-left: 3px solid var(--vu-border);
}

.vu-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--vu-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.vu-field-value {
    font-size: 14px;
    color: var(--vu-text-primary);
    line-height: 1.5;
    word-break: break-word;
}

/* Response Cards */
.vu-response-card {
    background: var(--vu-background);
    border-radius: var(--vu-radius-lg);
    padding: var(--vu-space-5);
    margin-bottom: var(--vu-space-4);
}

.vu-response-card:last-child {
    margin-bottom: 0;
}

.vu-response-card .vu-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--vu-space-4);
    padding-bottom: var(--vu-space-3);
    border-bottom: 1px solid var(--vu-border);
}

.vu-response-card .vu-response-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.vu-response-card .vu-response-id {
    font-weight: 400;
    color: var(--vu-text-muted);
    font-size: 0.85em;
    margin-left: var(--vu-space-2);
}

.vu-response-card .vu-response-date {
    font-size: 13px;
    color: var(--vu-text-secondary);
    margin: 0;
}

/* Quick Response Card (Frontend) */
.vu-quick-response-card {
    border-left: 4px solid var(--vu-success, #22c55e);
}

.vu-quick-response-badge {
    display: inline-block;
    background: var(--vu-success, #22c55e);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: var(--vu-space-2);
    vertical-align: middle;
}

.vu-quick-response-content {
    background: rgba(34, 197, 94, 0.05);
    padding: var(--vu-space-3);
    border-radius: var(--vu-radius);
    line-height: 1.6;
}

.vu-quick-response-meta {
    margin-top: var(--vu-space-3);
    font-size: 12px;
    color: var(--vu-text-muted);
    font-style: italic;
}

.vu-field-item--full {
    grid-column: 1 / -1;
}

/* Notes List (Frontend) */
.vu-note-card {
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--vu-info);
    padding: var(--vu-space-4) var(--vu-space-5);
    border-radius: 0 var(--vu-radius-lg) var(--vu-radius-lg) 0;
    margin-bottom: var(--vu-space-4);
}

.vu-note-card:last-child {
    margin-bottom: 0;
}

.vu-note-card .vu-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--vu-space-2);
}

.vu-note-card .vu-note-author {
    font-weight: 600;
    color: var(--vu-text-primary);
    font-size: 14px;
}

.vu-note-card .vu-note-time {
    font-size: 12px;
    color: var(--vu-text-muted);
}

.vu-note-card .vu-note-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--vu-text-secondary);
}

/* Messages Container */
.vu-messages-container {
    min-height: 300px;
}

/* Hide old messaging section rendered by hook */
.vu-tab-panel .vu-frontend-messaging,
.vu-messaging-section--in-tab {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

/* Responsive - Frontend Detail */
@media (max-width: 768px) {
    .vu-summary-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .vu-summary-stats {
        width: 100%;
        justify-content: space-between;
    }

    .vu-stat-item {
        flex: 1;
        min-width: auto;
        padding: var(--vu-space-2) var(--vu-space-3);
    }

    .vu-tabs-nav {
        flex-wrap: wrap;
    }

    .vu-tab-btn {
        min-width: calc(50% - 4px);
    }

    .vu-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Frontend Status Badges
   ===================================================== */
.vu-dashboard__entry-item__status {
    white-space: nowrap;
}

.vu-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-transform: capitalize;
}

.vu-status-badge--new {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.vu-status-badge--in_progress {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.vu-status-badge--responded {
    background: rgba(139, 92, 246, 0.15);
    color: #7c3aed;
}

.vu-status-badge--awaiting_info {
    background: rgba(236, 72, 153, 0.15);
    color: #db2777;
}

.vu-status-badge--resolved {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.vu-status-badge--closed {
    background: rgba(107, 114, 128, 0.15);
    color: #4b5563;
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
    .vu-stat-card {
        box-shadow: none;
        border: 1px solid #000;
    }

    .vu-panel {
        box-shadow: none;
        border: 1px solid #000;
    }

    .vu-search-dropdown {
        display: none !important;
    }
}
