/* Scoped CSS for New Dashboard Modal */
.new-dashboard-wrapper {
    font-family: 'Segoe UI', 'Yu Gothic', 'Meiryo', sans-serif;
    background-color: #F5F6FA;
    color: #333;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex; /* Added to handle sidebar/main-content layout better */
    overflow: hidden; 
}

.new-dashboard-wrapper * {
    box-sizing: border-box;
}

/* Sidebar scoped */
.new-dashboard-wrapper .sidebar {
    flex-shrink: 0;
    width: 240px;
    height: 100%;
    background: white;
    border-right: 1px solid #E5E7EB;
    padding: 20px 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.new-dashboard-wrapper .sidebar-logo {
    text-align: center;
    padding: 20px 0 30px;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 20px;
}

.new-dashboard-wrapper .logo-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(139, 92, 246, 0.3);
}

.new-dashboard-wrapper .clinic-name {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
}

.new-dashboard-wrapper .clinic-name-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.new-dashboard-wrapper .sidebar-menu {
    padding: 0 15px;
}

.new-dashboard-wrapper .menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #6B7280;
    font-weight: 500;
    font-size: 12px;
    text-decoration: none;
}

.new-dashboard-wrapper .menu-item:hover {
    background: #F3F0FF;
    color: #8B5CF6;
}

.new-dashboard-wrapper .menu-item.active {
    background: #F3F0FF;
    color: #8B5CF6;
    font-weight: 600;
    border-left: 4px solid #8B5CF6;
}

.new-dashboard-wrapper .menu-item-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
}

.new-dashboard-wrapper .sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 15px;
    right: 15px;
    padding: 12px;
    background: #F9FAFB;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.new-dashboard-wrapper .user-avatar {
    width: 40px;
    height: 40px;
    background: #EDE9FE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B5CF6;
    font-weight: bold;
    margin-right: 10px;
}

.new-dashboard-wrapper .user-info {
    flex: 1;
}

.new-dashboard-wrapper .user-name {
    font-weight: 600;
    color: #4B5563;
    font-size: 14px;
}

/* Main Content Scoped */
.new-dashboard-wrapper .main-content {
    flex: 1; /* Take remaining space */
    min-width: 0;
    padding: 0; /* Remove side padding to let header go full width */
    transition: margin-left 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Header fixed, content scrolls if needed */
    position: relative;
    background-color: #F5F6FA; /* Base background for non-white areas */
}

/* Tab Containers */
.new-dashboard-wrapper #delayAllContainer,
.new-dashboard-wrapper #delayPersonalContainer,
.new-dashboard-wrapper #settingsContainer {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* Removed side padding here to let header go full width */
    background-color: #F5F6FA; /* Restore default dashboard background */
}

/* Gantt Layout */
.new-dashboard-wrapper .gantt-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; 
    overflow: hidden; /* Gantt frame handles its own scroll */
    background: #ffffff;
}

.new-dashboard-wrapper .gantt-frame-wrapper {
    flex: 1;
    background-color: #ffffff;
    border: none;
    border-radius: 0;
    overflow: hidden; 
    margin: 0; 
    min-height: 400px;
}

/* Header Scoped */
.new-dashboard-wrapper .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px; /* Aligned with sidebar and main content */
    margin-bottom: 0; /* Remove bottom margin to connect with content */
    gap: 12px;
    background-color: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    z-index: 10;
}

.new-dashboard-wrapper .header-title {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
}

.new-dashboard-wrapper .header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 75px; /* 閉じるボタンとの間隔を15px程度確保するための余白 */
}

.new-dashboard-wrapper .date-display {
    padding: 8px 16px;
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    font-size: 14px;
    color: #6B7280;
}

.new-dashboard-wrapper .import-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

.new-dashboard-wrapper .import-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
}

.new-dashboard-wrapper .select-input {
    padding: 8px 12px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    font-size: 14px;
}

.new-dashboard-wrapper .settings-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.new-dashboard-wrapper .settings-label {
    font-weight: 600;
    color: #374151;
}
.new-dashboard-wrapper .number-input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-align: center;
}

/* Summary Cards Scoped */
.new-dashboard-wrapper .summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 25px 40px 30px; /* Added margins to align with header padding */
}

.new-dashboard-wrapper .summary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    transition: all 0.3s;
    overflow: hidden; /* 左側のボーダーラインも角を丸く見せるために追加 */
}

.new-dashboard-wrapper .summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.new-dashboard-wrapper .summary-card.purple { border-left-color: #8B5CF6; }
.new-dashboard-wrapper .summary-card.orange { border-left-color: #F59E0B; }
.new-dashboard-wrapper .summary-card.green { border-left-color: #10B981; }
.new-dashboard-wrapper .summary-card.red { border-left-color: #EF4444; }

.new-dashboard-wrapper .card-label {
    font-size: 14px;
    color: #6B7280;
    font-weight: 600;
    margin-bottom: 10px;
}

.new-dashboard-wrapper .card-value {
    font-size: 36px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.new-dashboard-wrapper .card-subtitle {
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 10px;
}

.new-dashboard-wrapper .card-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    float: right;
    margin-top: -30px;
}

.new-dashboard-wrapper .badge-purple { background: #F3F0FF; color: #8B5CF6; }
.new-dashboard-wrapper .badge-orange { background: #FEF3C7; color: #F59E0B; }
.new-dashboard-wrapper .badge-green { background: #D1FAE5; color: #10B981; }
.new-dashboard-wrapper .badge-red { background: #FEE2E2; color: #EF4444; }

/* Table Card Scoped */
.new-dashboard-wrapper .table-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0 40px 30px; /* Added horizontal margins */
}
.new-dashboard-wrapper .header + .table-card,
.new-dashboard-wrapper .header + #personalListContainer,
.new-dashboard-wrapper .header + #settingsContainer .table-card:first-of-type {
    margin-top: 25px;
}

.new-dashboard-wrapper .table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.new-dashboard-wrapper .table-title {
    font-size: 18px;
    font-weight: 700;
    color: #1F2937;
}

.new-dashboard-wrapper .filter-buttons {
    display: flex;
    gap: 8px;
}

.new-dashboard-wrapper .filter-btn {
    padding: 8px 16px;
    border: 1.5px solid #E5E7EB;
    background: #F9FAFB;
    color: #6B7280;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.new-dashboard-wrapper .filter-btn:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
}

.new-dashboard-wrapper .filter-btn.active {
    background: #8B5CF6;
    color: white;
    border-color: #8B5CF6;
}

/* Data Table Scoped */
.new-dashboard-wrapper .data-table {
    width: 100%;
    border-collapse: collapse;
}

.new-dashboard-wrapper .data-table thead {
    background: #F9FAFB;
}

.new-dashboard-wrapper .data-table th {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #6B7280;
    font-size: 13px;
    border-bottom: 1px solid #E5E7EB;
}

.new-dashboard-wrapper .data-table td {
    padding: 16px 12px;
    text-align: center;
    border-bottom: 1px solid #F3F4F6;
    font-size: 14px;
}

.new-dashboard-wrapper .data-table tbody tr:nth-child(even) {
    background: #F9FAFB;
}

.new-dashboard-wrapper .data-table tbody tr:hover {
    background: #F3F0FF;
}

.new-dashboard-wrapper .patient-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.new-dashboard-wrapper .patient-avatar {
    width: 36px;
    height: 36px;
    background: #EDE9FE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B5CF6;
    font-weight: bold;
    font-size: 14px;
}

.new-dashboard-wrapper .patient-name {
    font-weight: 600;
    color: #1F2937;
}

.new-dashboard-wrapper .rate-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
}

.new-dashboard-wrapper .rate-green {
    background: #D1FAE5;
    color: #10B981;
}

.new-dashboard-wrapper .rate-orange {
    background: #FEF3C7;
    color: #F59E0B;
}

.new-dashboard-wrapper .rate-red {
    background: #FEE2E2;
    color: #EF4444;
}

.new-dashboard-wrapper .delay-count {
    color: #EF4444;
    font-weight: 700;
}

/* Legend Scoped */
.new-dashboard-wrapper .legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 15px;
    background: #F9FAFB;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
}

.new-dashboard-wrapper .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
}

.new-dashboard-wrapper .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.new-dashboard-wrapper .legend-dot.green { background: #10B981; }
.new-dashboard-wrapper .legend-dot.orange { background: #F59E0B; }
.new-dashboard-wrapper .legend-dot.red { background: #EF4444; }

/* File Input Scoped */
.new-dashboard-wrapper #csvFileInput {
    display: none;
}

/* Empty State Scoped */
.new-dashboard-wrapper .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

.new-dashboard-wrapper .empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.new-dashboard-wrapper .empty-state-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #6B7280;
}

.new-dashboard-wrapper .empty-state-subtext {
    font-size: 14px;
    color: #9CA3AF;
}

/* Loading Scoped */
.new-dashboard-wrapper .loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #8B5CF6;
}

.new-dashboard-wrapper .loading.active {
    display: block;
}

/* Gantt Navigation & Filters */
.new-dashboard-wrapper .gantt-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.new-dashboard-wrapper .gantt-nav-group {
    display: flex;
    align-items: center;
    background-color: #ffffff !important;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    height: 38px;
}

.new-dashboard-wrapper .gantt-nav-group.date-range-picker {
    padding: 0 12px;
    gap: 8px;
}

.new-dashboard-wrapper .nav-btn,
.new-dashboard-wrapper .nav-date-input {
    border: none;
    height: 100%;
    background-color: transparent !important;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    color: #374151;
}

.new-dashboard-wrapper .nav-btn {
    cursor: pointer;
    transition: background 0.2s;
    font-weight: bold;
}

.new-dashboard-wrapper .nav-btn:hover {
    background: #F9FAFB;
}

.new-dashboard-wrapper .nav-btn.prev {
    border-right: 1px solid #E5E7EB;
}

.new-dashboard-wrapper .nav-btn.next {
    border-left: 1px solid #E5E7EB;
}

/* Ensure consistent height for header buttons */
.new-dashboard-wrapper .header .import-btn,
.new-dashboard-wrapper .header .select-input,
.new-dashboard-wrapper .header .gantt-filters {
    height: 38px !important;
    display: flex;
    align-items: center;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    font-size: 13px; /* 14pxから1px下げて13pxに変更 */
}

/* Gantt Legend */
.new-dashboard-wrapper .gantt-legend-bar {
    display: flex;
    justify-content: flex-start;
    gap: 24px;
    padding: 12px 40px;
    background: #ffffff;
    border-bottom: 1px solid #F3F4F6;
}

.new-dashboard-wrapper .gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-dashboard-wrapper .gantt-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.new-dashboard-wrapper .gantt-legend-label {
    font-size: 12px;
    font-weight: 600;
    color: #4B5563;
}

.new-dashboard-wrapper .color-treatment { background-color: #6d9eeb; }
.new-dashboard-wrapper .color-prevention { background-color: #93c47d; }
.new-dashboard-wrapper .color-dr-call { background-color: #e0d06e; }
.new-dashboard-wrapper .color-preparation { background-color: #F57C00; }

.new-dashboard-wrapper .gantt-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.new-dashboard-wrapper .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-dashboard-wrapper .filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
}

.new-dashboard-wrapper .gantt-filters .select-input {
    border: none !important;
    background: transparent !important;
    height: 100% !important;
    font-weight: 600;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    outline: none !important;
    padding: 0 4px !important;
}

/* Notification Scoped */
.new-dashboard-wrapper .dashboard-notification {
    position: absolute; /* Changed from fixed to stay inside modal if modal is relative */
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s ease;
}

.new-dashboard-wrapper .dashboard-notification.show {
    display: block;
}

.new-dashboard-wrapper .dashboard-notification.success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.new-dashboard-wrapper .dashboard-notification.error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

/* Import Card Scoped */
.new-dashboard-wrapper .import-card {
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    border-radius: 10px;
    padding: 12px;
    width: 280px;
}
.new-dashboard-wrapper .import-card-title {
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
    font-size: 14px;
}
.new-dashboard-wrapper .import-card-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.new-dashboard-wrapper .import-card-kv .k { color: #6B7280; }
.new-dashboard-wrapper .import-card-kv .v { color: #111827; font-weight: 600; }

/* AI Suggestion Scoped */
.new-dashboard-wrapper .ai-suggestion { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px; padding: 12px; margin: 8px 0; }
.new-dashboard-wrapper .ai-suggestion-title { font-weight: 700; color: #111827; margin-bottom: 6px; }
.new-dashboard-wrapper .ai-tag { display: inline-block; background: #EEF2FF; color: #4F46E5; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 9999px; margin-right: 6px; }
.new-dashboard-wrapper .ai-context { background: #FFFFFF; border: 1px solid #E5E7EB; border-radius: 8px; padding: 10px; overflow: auto; max-height: 160px; }
.new-dashboard-wrapper .ai-textarea { width: 100%; min-height: 72px; padding: 10px; border: 1px solid #E5E7EB; border-radius: 8px; font-size: 14px; }

/* Modal inside new dashboard (e.g. CSV preview) */
/* This might conflict with the main modal if not careful. */
/* We will scope it to .new-dashboard-wrapper .internal-modal-overlay */
.new-dashboard-wrapper .internal-modal-overlay {
    position: absolute; /* Changed from fixed to absolute within wrapper */
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.new-dashboard-wrapper .internal-modal-content {
    width: min(1200px, 95%);
    max-height: 90%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.new-dashboard-wrapper .internal-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.new-dashboard-wrapper .internal-modal-body {
    padding: 12px 20px;
    overflow: auto;
}
.new-dashboard-wrapper .internal-modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}
.new-dashboard-wrapper .preview-table { width: 100%; border-collapse: collapse; }
.new-dashboard-wrapper .preview-table th, .new-dashboard-wrapper .preview-table td { border-bottom: 1px solid #F3F4F6; padding: 8px; font-size: 13px; }
.new-dashboard-wrapper .badge-ok { background:#D1FAE5; color:#065F46; font-weight:700; font-size:12px; padding:2px 8px; border-radius:12px; }
.new-dashboard-wrapper .badge-ng { background:#FEE2E2; color:#991B1B; font-weight:700; font-size:12px; padding:2px 8px; border-radius:12px; }


/* Compact Personal Section Styles */
.new-dashboard-wrapper .compact-section {
    margin: 0 40px 20px !important; /* Added side margins */
    padding: 12px 20px !important;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.new-dashboard-wrapper .personal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #F3F4F6;
}

.new-dashboard-wrapper .staff-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-dashboard-wrapper .staff-avatar {
    background: #8B5CF6;
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
}

.new-dashboard-wrapper .staff-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.new-dashboard-wrapper .staff-total-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.new-dashboard-wrapper .stats-label {
    color: #6B7280;
}

.new-dashboard-wrapper .stats-value {
    font-weight: 700;
}

.new-dashboard-wrapper .compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.new-dashboard-wrapper .compact-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 15px !important;
    min-height: 50px !important;
}

.new-dashboard-wrapper .compact-card .card-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.new-dashboard-wrapper .compact-card .card-label {
    font-size: 11px !important;
    margin-bottom: 0 !important;
}

.new-dashboard-wrapper .compact-card .card-value {
    font-size: 18px !important;
    margin: 0 !important;
}

.new-dashboard-wrapper .compact-card .card-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    color: #6B7280;
    margin-left: 10px;
    flex-grow: 1;
    align-items: flex-start; /* Align contents to the left */
}

.new-dashboard-wrapper .compact-card .detail-row {
    white-space: nowrap;
}

.new-dashboard-wrapper .compact-card .detail-row span {
    font-weight: 600;
}

.new-dashboard-wrapper .compact-card .card-badge {
    position: static !important;
    margin: 4px 0 0 0 !important; /* Move to bottom of details with some top margin */
    padding: 2px 6px !important;
    font-size: 10px !important;
    width: fit-content !important;
    display: inline-block !important;
}

/* Ranking Summary Scoped */
.new-dashboard-wrapper .personal-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 25px 0 20px; /* Adjusted margins: 25px top, 0 horizontal, 20px bottom */
    grid-column: 1 / -1; /* Make summary span full width in the grid */
}

.new-dashboard-wrapper .summary-highlight-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #E5E7EB;
    position: relative;
    overflow: hidden;
}

.new-dashboard-wrapper .summary-highlight-card.best {
    border-top: 4px solid #10B981;
}

.new-dashboard-wrapper .summary-highlight-card.max-load {
    border-top: 4px solid #8B5CF6;
}

.new-dashboard-wrapper .highlight-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.new-dashboard-wrapper .summary-highlight-card.best .highlight-icon {
    background: #D1FAE5;
    color: #10B981;
}

.new-dashboard-wrapper .summary-highlight-card.max-load .highlight-icon {
    background: #EDE9FE;
    color: #8B5CF6;
}

.new-dashboard-wrapper .highlight-info {
    flex: 1;
}

.new-dashboard-wrapper .highlight-label {
    font-size: 13px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 4px;
}

.new-dashboard-wrapper .highlight-staff-name {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.new-dashboard-wrapper .highlight-stats {
    font-size: 14px;
    font-weight: 600;
    margin-top: 2px;
}

.new-dashboard-wrapper .summary-highlight-card.best .highlight-stats {
    color: #10B981;
}

.new-dashboard-wrapper .summary-highlight-card.max-load .highlight-stats {
    color: #8B5CF6;
}

/* Personal Grid Layout */
.new-dashboard-wrapper #personalListContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    padding: 0 40px 40px;
}

.new-dashboard-wrapper .compact-section {
    margin: 0 !important; /* Reset margin for grid */
    padding: 15px !important;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Performance Badges */
.new-dashboard-wrapper .performance-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.new-dashboard-wrapper .performance-badge.smooth { background: #D1FAE5; color: #10B981; }
.new-dashboard-wrapper .performance-badge.warning { background: #FEF3C7; color: #F59E0B; }
.new-dashboard-wrapper .performance-badge.action-needed { background: #FEE2E2; color: #EF4444; }

.new-dashboard-wrapper .staff-name-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
