/* Temporary Evalynx home UI switcher. Default is original; this layer only applies in New UI mode. */
.home-ui-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.25rem;
  padding: 0 0.78rem;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-primary, #111827);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.home-ui-toggle-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 158, 11, 0.65);
}

.home-ui-toggle-btn i {
  color: #d99a21;
}

.home-ui-toggle-btn.is-next {
  background: linear-gradient(135deg, #f59e0b, #f8c15c);
  border-color: rgba(248, 193, 92, 0.85);
  color: #111827;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.22);
}

.home-ui-toggle-btn.is-next i {
  color: #111827;
}

[data-theme="dark"] .home-ui-toggle-btn {
  background: rgba(15, 23, 42, 0.72);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .home-ui-toggle-btn.is-next {
  color: #101827;
}

html[data-home-ui="next"] body {
  background:
    radial-gradient(circle at 13% 0%, rgba(102, 126, 234, 0.11), transparent 31rem),
    radial-gradient(circle at 92% 12%, rgba(245, 158, 11, 0.11), transparent 25rem),
    linear-gradient(135deg, #f7f9fc 0%, #edf2f8 42%, #f9fbff 100%);
}

html[data-home-ui="next"][data-theme="dark"] body {
  background:
    radial-gradient(circle at 10% 0%, rgba(102, 126, 234, 0.18), transparent 31rem),
    radial-gradient(circle at 92% 10%, rgba(245, 158, 11, 0.13), transparent 24rem),
    linear-gradient(135deg, #08111f 0%, #101a2c 48%, #0b1220 100%);
}

html[data-home-ui="next"] body::before {
  opacity: 0.55;
}

html[data-home-ui="next"] .dashboard-container {
  max-width: 1380px;
  padding: 1.05rem 1.25rem 2rem;
  animation: none;
}

html[data-home-ui="next"] .dashboard-header {
  margin-bottom: 0.82rem;
  padding: 1.25rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.82)),
    radial-gradient(circle at 86% 18%, rgba(245, 158, 11, 0.14), transparent 18rem);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

html[data-home-ui="next"][data-theme="dark"] .dashboard-header {
  background:
    linear-gradient(135deg, rgba(12, 21, 38, 0.96), rgba(18, 28, 52, 0.92)),
    radial-gradient(circle at 88% 0%, rgba(245, 158, 11, 0.16), transparent 18rem);
  border-color: rgba(148, 163, 184, 0.17);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

html[data-home-ui="next"] .dashboard-header::before,
html[data-home-ui="next"] .dashboard-header::after,
html[data-home-ui="next"] .dashboard-card::before,
html[data-home-ui="next"] .stat-card::before,
html[data-home-ui="next"] .stat-card::after {
  content: none !important;
}

html[data-home-ui="next"] .header-content {
  align-items: stretch;
  gap: 1rem;
}

html[data-home-ui="next"] .header-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

html[data-home-ui="next"] .header-greeting {
  align-self: flex-start;
  gap: 0.42rem;
  margin-bottom: 0.42rem;
  padding: 0.26rem 0.58rem;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #9a6404;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

html[data-home-ui="next"] .header-greeting span:first-child {
  display: none;
}

html[data-home-ui="next"] .header-greeting::before {
  content: "";
  width: 0.44rem;
  height: 0.44rem;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

html[data-home-ui="next"][data-theme="dark"] .header-greeting {
  color: #f8c15c;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
}

html[data-home-ui="next"] .dashboard-header h1 {
  margin-bottom: 0.34rem;
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

html[data-home-ui="next"] .dashboard-subtitle {
  max-width: 54rem;
  margin-bottom: 0.86rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.48;
}

html[data-home-ui="next"][data-theme="dark"] .dashboard-subtitle {
  color: rgba(226, 232, 240, 0.75);
}

html[data-home-ui="next"] .header-actions {
  gap: 0.52rem;
}

html[data-home-ui="next"] .header-btn {
  min-height: 2.38rem;
  padding: 0.52rem 0.82rem;
  border-width: 1px;
  border-radius: 999px;
  font-size: 0.8rem;
  box-shadow: none;
}

html[data-home-ui="next"] .header-btn.primary {
  background: linear-gradient(135deg, #111827, #243047);
  color: #f8c15c;
  border-color: rgba(248, 193, 92, 0.42);
}

html[data-home-ui="next"][data-theme="dark"] .header-btn.primary {
  background: linear-gradient(135deg, #f59e0b, #f8c15c);
  color: #111827;
  border-color: rgba(248, 193, 92, 0.7);
}

html[data-home-ui="next"] .header-right {
  display: grid;
  grid-template-columns: repeat(3, minmax(6.4rem, 1fr));
  gap: 0.5rem;
  min-width: min(28rem, 42vw);
}

html[data-home-ui="next"] .header-stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0.8rem 0.78rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

html[data-home-ui="next"][data-theme="dark"] .header-stat-card {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-home-ui="next"] .header-stat-value {
  margin-bottom: 0.18rem;
  font-size: 1.48rem;
  letter-spacing: -0.055em;
}

html[data-home-ui="next"] .header-stat-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
}

html[data-home-ui="next"] .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem !important;
  margin-bottom: 0.72rem !important;
}

html[data-home-ui="next"] .dashboard-container .stats-grid .stat-card.stat-metric {
  min-height: 72px !important;
  padding: 0.58rem 0.72rem !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.86) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06) !important;
}

html[data-home-ui="next"][data-theme="dark"] .dashboard-container .stats-grid .stat-card.stat-metric {
  background: rgba(15, 23, 42, 0.72) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22) !important;
}

html[data-home-ui="next"] .dashboard-container .stats-grid .stat-card.stat-metric .stat-icon {
  width: 1.9rem !important;
  height: 1.9rem !important;
  border-radius: 9px !important;
}

html[data-home-ui="next"] .dashboard-container .stats-grid .stat-card.stat-metric .stat-value {
  font-size: clamp(1.18rem, 1.35vw, 1.72rem) !important;
}

html[data-home-ui="next"] .dashboard-container .stats-grid .stat-card.stat-metric .stat-label {
  font-size: 0.64rem !important;
  font-weight: 850 !important;
}

html[data-home-ui="next"] .dashboard-grid {
  gap: 0.72rem;
}

html[data-home-ui="next"] .dashboard-card {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  animation: none;
}

html[data-home-ui="next"][data-theme="dark"] .dashboard-card {
  background: rgba(13, 22, 39, 0.82);
  border-color: rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

html[data-home-ui="next"] .card-header {
  margin-bottom: 0.72rem;
  padding-bottom: 0.58rem;
}

html[data-home-ui="next"] .card-title {
  gap: 0.5rem;
  font-size: 0.92rem;
  letter-spacing: -0.025em;
}

html[data-home-ui="next"] .card-title i {
  color: #d99a21;
}

html[data-home-ui="next"] .view-all {
  font-size: 0.72rem;
}

html[data-home-ui="next"] .card-col-3 .action-grid {
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

html[data-home-ui="next"] .action-btn {
  min-height: 2.55rem;
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.58rem;
  padding: 0.5rem 0.62rem;
  border-width: 1px;
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.92) !important;
  box-shadow: none;
}

html[data-home-ui="next"][data-theme="dark"] .action-btn {
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(148, 163, 184, 0.14);
}

html[data-home-ui="next"] .action-btn i {
  width: 1.62rem;
  height: 1.62rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-size: 0.82rem;
}

html[data-home-ui="next"] .action-btn span {
  font-size: 0.76rem;
  font-weight: 850;
}

html[data-home-ui="next"] .notification-list,
html[data-home-ui="next"] .activity-list {
  gap: 0.48rem;
}

html[data-home-ui="next"] .notification-item,
html[data-home-ui="next"] .activity-item {
  padding: 0.58rem 0.62rem;
  border-radius: 12px;
}

html[data-home-ui="next"] .timeline {
  gap: 0.52rem;
}

html[data-home-ui="next"] .timeline-item {
  padding: 0.7rem;
  border-radius: 14px;
}

html[data-home-ui="next"] .timeline-date {
  width: 3.25rem;
  min-width: 3.25rem;
  border-radius: 12px;
}

html[data-home-ui="next"] .timeline-title {
  font-size: 0.92rem;
}

html[data-home-ui="next"] .timeline-meta,
html[data-home-ui="next"] .notification-text,
html[data-home-ui="next"] .activity-text {
  font-size: 0.78rem;
  line-height: 1.38;
}

html[data-home-ui="next"] .dashboard-charts-section {
  margin-top: 0.72rem !important;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
  gap: 0.72rem !important;
}

html[data-home-ui="next"] .dashboard-charts-section .dashboard-card {
  height: 285px !important;
}

html[data-home-ui="next"] .chart-container {
  padding: 0.55rem !important;
}

@media (max-width: 1100px) {
  html[data-home-ui="next"] .header-content {
    flex-direction: column;
  }

  html[data-home-ui="next"] .header-right,
  html[data-home-ui="next"] .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .home-ui-toggle-btn span {
    display: none;
  }

  html[data-home-ui="next"] .dashboard-container {
    padding: 0.72rem 0.62rem 1.4rem;
  }

  html[data-home-ui="next"] .header-actions,
  html[data-home-ui="next"] .header-right,
  html[data-home-ui="next"] .stats-grid {
    grid-template-columns: 1fr;
  }

  html[data-home-ui="next"] .header-btn {
    width: 100%;
    justify-content: center;
  }
}
