/* Master Dashboard Theme Support - Light Mode (Original) */
.light-mode .master-dashboard {
  background: linear-gradient(165deg, #ffffff 0%, #fffbf7 20%, #ffffff 45%, #ffffff 70%, #ffffff 100%);
  color: #1e293b;
}

.light-mode .master-dashboard-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 40%, #e5e5e5 100%);
  border-right: 1px solid rgba(229, 229, 229, 0.8);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.06), 1px 0 0 rgba(0, 0, 0, 0.04);
}

.light-mode .master-dashboard-sidebar-header {
  border-bottom: 1px solid rgba(229, 229, 229, 0.8);
  background: rgba(255, 255, 255, 0.6);
}

.light-mode .master-dashboard-sidebar-title {
  color: #1e293b;
}

.light-mode .master-dashboard-sidebar-close {
  color: #d91820;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(229, 229, 229, 0.9);
}

.light-mode .master-dashboard-sidebar-close:hover {
  background: #e5e5e5;
  border-color: rgba(242, 27, 35, 0.35);
  color: #f21b23;
}

.light-mode .master-dashboard-sidebar-user {
  border-bottom: 1px solid rgba(229, 229, 229, 0.8);
  background: rgba(255, 255, 255, 0.4);
}

.light-mode .master-dashboard-sidebar-user-label {
  color: #64748b;
}

.light-mode .master-dashboard-sidebar-user-name {
  color: #334155;
}

.light-mode .master-dashboard-sidebar-icon {
  color: #d91820;
}

.light-mode .master-dashboard-sidebar-item {
  color: #4d4d4f;
  background: #ffffff;
  border: 1px solid #e5e5e5;
}

.light-mode .master-dashboard-sidebar-item--active {
  background: #e5e5e5;
  border-color: #f21b23;
  color: #f21b23;
}

.light-mode .master-dashboard-sidebar-item--available:hover {
  background: #e5e5e5;
  border-color: rgba(242, 27, 35, 0.25);
  color: #f21b23;
}

.light-mode .master-dashboard-sidebar-item--disabled {
  background: #f5f5f5;
  border-color: #e5e5e5;
  color: #9ca3af;
}

.light-mode .master-dashboard-sidebar-footer {
  border-top: 1px solid rgba(229, 229, 229, 0.8);
  background: rgba(255, 255, 255, 0.5);
}

.light-mode .master-dashboard-topbar {
  --navbar-bg: rgba(255, 255, 255, 0.88);
  --navbar-border: rgba(249, 115, 22, 0.12);
}

.light-mode .master-dashboard-menu-btn {
  color: #475569;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.light-mode .master-dashboard-menu-btn:hover {
  background: rgba(249, 115, 22, 0.08);
  color: #d91820;
  border-color: rgba(249, 115, 22, 0.2);
}

.light-mode .master-dashboard-logo {
  background: linear-gradient(152deg, #f21b23 0%, #d91820 50%, #c2151d 100%);
  color: white;
}

.light-mode .master-dashboard-brand-text {
  color: #1e293b;
}

/* Navbar dropdown (Country / Site / Work area) – readable text in light mode */
.light-mode .master-dashboard-filter-label {
  color: #475569;
}

.light-mode .master-dashboard-filter-select {
  color: #1e293b;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.light-mode .master-dashboard-filter-select:hover:not(:disabled) {
  background-color: #ffffff;
  border-color: rgba(249, 115, 22, 0.25);
}

.light-mode .master-dashboard-filter-select:focus {
  border-color: #f21b23;
  box-shadow: 0 0 0 2px rgba(242, 27, 35, 0.2);
}

.light-mode .master-dashboard-filter-select option {
  background: #ffffff;
  color: #1e293b;
}

.light-mode .master-dashboard-user-pill {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.light-mode .master-dashboard-user-pill:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(249, 115, 22, 0.2);
}

.light-mode .master-dashboard-user-avatar {
  background: linear-gradient(152deg, #f21b23 0%, #d91820 100%);
  color: white;
}

.light-mode .master-dashboard-user-name {
  color: #334155;
}

.light-mode .master-dashboard-logout-btn {
  color: #64748b;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.light-mode .master-dashboard-logout-btn:hover:not(:disabled) {
  background: rgba(242, 27, 35, 0.08);
  color: #f21b23;
  border-color: rgba(242, 27, 35, 0.25);
}

.light-mode .master-dashboard-hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 224, 224, 0.5) 50%, transparent 100%);
}

.light-mode .master-dashboard-hero-badge {
  color: #d91820;
  background: rgb(255 237 237 / 90%);
  border: 1px solid rgb(249 22 22 / 20%);
}

.light-mode .master-dashboard-title {
  color: #1e293b;
}

.light-mode .master-dashboard-title-highlight {
  color: #d91820;
}

.light-mode .master-dashboard-subtitle {
  color: #475569;
}

.light-mode .master-dashboard-subtitle strong {
  color: #334155;
}

.light-mode .master-dashboard-stat {
  color: #475569;
  background: linear-gradient(135deg, #ffffff 0%, #fff8f0 50%, #ffe0e0 100%);
  border: 1px solid rgb(249 22 22 / 20%);
}

.light-mode .master-dashboard-stat svg {
  color: #f21b23;
}

.light-mode .master-dashboard-stat--available {
  color: #c2151d;
  background: linear-gradient(135deg, #fff7ed 0%, #ffd5d5 100%);
  border-color: rgb(234 12 12 / 30%);
}

.light-mode .master-dashboard-hero-tip {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(249, 115, 22, 0.15);
}

.light-mode .master-dashboard-hero-tip-icon {
  color: #d91820;
}

.light-mode .master-dashboard-hero-tip-text {
  color: #475569;
}

.light-mode .master-dashboard-hero-tip-text strong {
  color: #334155;
}

.light-mode .master-dashboard-hero-tip-close {
  border: 1px solid rgba(248, 113, 113, 0.4);
  background: #fff;
  color: #ef4444;
}

.light-mode .master-dashboard-hero-tip-close:hover {
  background: #fef2f2;
  border-color: rgba(248, 113, 113, 0.8);
}

.light-mode .master-dashboard-section-title {
  color: #1e293b;
}

.light-mode .master-dashboard-section-desc {
  color: #475569;
}

.light-mode .master-project-card {
  background: linear-gradient(145deg, #ffffff 0%, #f5f5f5 40%, #e5e5e5 100%);
  border: 1px solid #e5e5e5;
}

/* Icon/image border so logo is visible on light card background */
.light-mode .master-project-card-icon-wrap {
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.light-mode .master-project-card-icon-wrap:has(.master-project-icon--img) {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.light-mode .master-project-card--available:hover {
  background: linear-gradient(145deg, #ffffff 0%, #f5f5f5 40%, #e5e5e5 100%);
  border-color: #f21b23;
}

.light-mode .master-project-card-title {
  color: #1e293b;
}

.light-mode .master-project-card-desc {
  color: #475569;
}

.light-mode .master-project-card-badge--available {
  background: rgba(242, 27, 35, 0.12);
  color: #f21b23;
}

.light-mode .master-project-card-badge--progress {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.light-mode .master-project-card-cta {
  color: #f21b23;
}

.light-mode .master-dashboard-footer-inner {
  border-top: 1px solid rgba(242, 27, 35, 0.2);
}

.light-mode .master-dashboard-footer-text {
  color: #64748b;
}

.light-mode .master-dashboard-footer-copy {
  color: #94a3b8;
}

/* Personalized Dashboard Light Mode */
.light-mode .personalized-dashboard-main {
  background: #e5e5e5;
  color: #1a1a1a;
}

.light-mode .personalized-dashboard-add-chart-btn {
  color: #475569;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.light-mode .personalized-dashboard-add-chart-btn:hover {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.2);
  color: #d91820;
}

.light-mode .personalized-dashboard-add-chart-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(249, 115, 22, 0.12);
}

.light-mode .personalized-dashboard-add-chart-empty {
  color: #64748b;
}

.light-mode .personalized-dashboard-add-chart-option {
  color: #334155;
}

.light-mode .personalized-dashboard-add-chart-option:hover {
  background: rgba(255, 247, 237, 0.7);
}

.light-mode .personalized-dashboard-add-chart-option-desc {
  color: #64748b;
}

.light-mode .personalized-dashboard-widget {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.light-mode .personalized-dashboard-widget--no-outer {
  background: transparent;
  border: none;
  box-shadow: none;
}

.light-mode .personalized-dashboard-widget-drag-handle {
  background: rgba(0, 0, 0, 0.06);
  color: #757575;
}

.light-mode .personalized-dashboard-widget-drag-handle:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1a1a1a;
}

.light-mode .personalized-dashboard-widget--drag-over {
  outline: 2px solid rgba(37, 99, 235, 0.5);
}

.light-mode .personalized-dashboard-widget-remove {
  background: rgba(0, 0, 0, 0.06);
  color: #757575;
}

.light-mode .personalized-dashboard-widget-remove:hover {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.light-mode .personalized-dashboard-widget-resize-handle {
  background: rgba(0, 0, 0, 0.08);
  color: #575757;
}

.light-mode .personalized-dashboard-widget-resize-handle:hover {
  background: rgba(0, 0, 0, 0.14);
  color: #1a1a1a;
}

.light-mode .personalized-dashboard-empty-title {
  color: #1a1a1a;
}

.light-mode .personalized-dashboard-empty-desc {
  color: #757575;
}

.light-mode .personalized-dashboard-empty-btn {
  background: #2563eb;
}

.light-mode .personalized-dashboard-empty-btn:hover {
  background: #1d4ed8;
}

.light-mode .personalized-dashboard-loading p,
.light-mode .personalized-dashboard-error p {
  color: #757575;
}

.light-mode .personalized-dashboard-error p {
  color: #b91c1c;
}

/* Light mode stat cards in personalized dashboard */
.light-mode.personalized-dashboard .stat-card,
.light-mode .personalized-dashboard .stat-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.light-mode.personalized-dashboard .stat-card:hover,
.light-mode .personalized-dashboard .stat-card:hover {
  border-color: #f21b23;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.light-mode.personalized-dashboard .stat-card-label,
.light-mode .personalized-dashboard .stat-card-label {
  color: #4d4d4f;
}

.light-mode.personalized-dashboard .stat-card-value,
.light-mode .personalized-dashboard .stat-card-value {
  color: #1a1a1a;
}

.light-mode.personalized-dashboard .stat-card-subtitle,
.light-mode .personalized-dashboard .stat-card-subtitle {
  color: #616161;
}

.light-mode.personalized-dashboard .stat-card-description,
.light-mode .personalized-dashboard .stat-card-description {
  color: #757575;
}

.light-mode.personalized-dashboard .stat-card-change.up,
.light-mode .personalized-dashboard .stat-card-change.up {
  color: #1a1a1a;
}

.light-mode.personalized-dashboard .stat-card-change.down,
.light-mode .personalized-dashboard .stat-card-change.down {
  color: #666;
}

.light-mode.personalized-dashboard .stat-card-icon,
.light-mode .personalized-dashboard .stat-card-icon {
  color: #1a1a1a;
}

/* RA widgets on light personalised dashboard (override dark #363434 from widget body) */
.light-mode .personalized-dashboard .personalized-dashboard-widget-body .pd-ra-drill {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.light-mode .personalized-dashboard .personalized-dashboard-widget-body .pd-ra-widget-panel,
.light-mode .personalized-dashboard .personalized-dashboard-widget-body .pd-ra-trend,
.light-mode .personalized-dashboard .pd-ra-drill,
.light-mode .personalized-dashboard .pd-ra-widget-panel,
.light-mode .personalized-dashboard .pd-ra-trend {
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.light-mode .personalized-dashboard .personalized-dashboard-widget-body .pd-ra-drill-chart-wrap,
.light-mode .personalized-dashboard .pd-ra-drill-chart-wrap {
  background-color: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.light-mode .personalized-dashboard .personalized-dashboard-widget-body .pd-ra-drill-stat-card,
.light-mode .personalized-dashboard .pd-ra-drill-stat-card {
  background-color: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.light-mode .personalized-dashboard .pd-ra-drill-title,
.light-mode .personalized-dashboard .pd-ra-widget-panel h3 {
  color: #0f172a;
}

.light-mode .personalized-dashboard .pd-ra-drill-lede,
.light-mode .personalized-dashboard .pd-ra-drill-crumb,
.light-mode .personalized-dashboard .pd-ra-drill-crumb--muted,
.light-mode .personalized-dashboard .pd-ra-drill-field label,
.light-mode .personalized-dashboard .pd-ra-drill-stat-card-hint,
.light-mode .personalized-dashboard .pd-ra-drill-stat-card-title {
  color: #64748b;
}

.light-mode .personalized-dashboard .pd-ra-drill-stat-card-big {
  color: #0f172a;
}

.light-mode .personalized-dashboard .pd-ra-drill-select {
  background: #fff;
  color: #1a1a1a;
  border-color: rgba(0, 0, 0, 0.12);
}

.light-mode .personalized-dashboard .pd-ra-drill-clear {
  background: rgba(0, 0, 0, 0.04);
  color: #334155;
  border-color: rgba(0, 0, 0, 0.1);
}

.light-mode .personalized-dashboard .pd-ra-drill-rate {
  color: #334155;
}

.light-mode .personalized-dashboard .pd-ra-drill-rate-label {
  color: #64748b;
}

.light-mode .personalized-dashboard .pd-ra-drill-empty {
  color: #64748b;
}

.light-mode .personalized-dashboard .pd-ra-trend-title,
.light-mode .personalized-dashboard .pd-ra-trend-legend-inline {
  color: #475569;
}

.light-mode .personalized-dashboard .pd-ra-trend-empty-msg,
.light-mode .personalized-dashboard .pd-ra-trend-caption,
.light-mode .personalized-dashboard .pd-ra-trend-subtitle {
  color: #64748b;
}

.light-mode .personalized-dashboard .pd-ra-trend-period {
  background: #f1f5f9;
  border-color: rgba(0, 0, 0, 0.08);
}

.light-mode .personalized-dashboard .pd-ra-trend-period-btn {
  color: #64748b;
}

.light-mode .personalized-dashboard .pd-ra-trend-period-btn--active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
