/* Basic B-end dashboard style for AI Nurture Demo */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #0b1020;
  color: #e5e8f0;
}

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

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: radial-gradient(circle at top, #18294a 0, #080b16 60%);
  padding: 20px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.logo span {
  color: #3b82f6;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 8px 0 4px;
}

.nav-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.9;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(59,130,246,0.22), rgba(59,130,246,0.06));
  color: #e5f0ff;
}

.nav-item:hover {
  background: rgba(148, 163, 184, 0.16);
}

.nav-item-label-cn {
  font-size: 11px;
  opacity: 0.7;
}

.main {
  flex: 1;
  padding: 20px 28px 32px;
  padding-top: 60px; /* Space for top-bar to avoid overlap */
}

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

.main-title {
  font-size: 20px;
  font-weight: 600;
}

.main-title-cn {
  font-size: 13px;
  opacity: 0.7;
  margin-top: 2px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(37,99,235,0.15);
  color: #bfdbfe;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1.4fr;
  gap: 18px;
}

.card {
  background: radial-gradient(circle at top left, rgba(37,99,235,0.24), #020617 50%);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 16px 18px 18px;
}

.card-subtle {
  background: rgba(15,23,42,0.96);
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
}

.card-title-cn {
  font-size: 12px;
  opacity: 0.7;
  margin-top: 1px;
}

.metric-row {
  display: flex;
  gap: 16px;
  margin-top: 6px;
}

.metric-number {
  font-size: 26px;
  font-weight: 600;
}

.metric-label {
  font-size: 11px;
  opacity: 0.75;
}

.pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(15,23,42,1);
  border: 1px solid rgba(148,163,184,0.35);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.4);
  background: rgba(15,23,42,0.9);
  color: #e5e7eb;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  border-color: transparent;
  color: #e5f0ff;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn:hover {
  border-color: rgba(191,219,254,0.8);
}

.timeline {
  border-left: 1px solid rgba(148,163,184,0.45);
  padding-left: 18px;
  margin-top: 12px;
}

.timeline-item {
  margin-bottom: 14px;
  position: relative;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #3b82f6;
  border: 2px solid #020617;
  position: absolute;
  left: -25px;
  top: 3px;
}

.timeline-day {
  font-size: 12px;
  font-weight: 600;
  color: #bfdbfe;
}

.timeline-title {
  font-size: 13px;
  margin-top: 2px;
}

.timeline-desc {
  font-size: 11px;
  opacity: 0.78;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(8,47,73,0.95);
  border: 1px solid rgba(56,189,248,0.6);
  color: #e0f2fe;
}

.pool-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 10px;
}

.pool-column {
  background: rgba(15,23,42,0.96);
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.35);
  padding: 10px 10px 12px;
  min-height: 150px;
}

.pool-title {
  font-size: 13px;
  font-weight: 600;
}

.pool-title-cn {
  font-size: 11px;
  opacity: 0.7;
}

.customer-card {
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.45);
  font-size: 12px;
  background: radial-gradient(circle at top left, rgba(56,189,248,0.16), rgba(15,23,42,1) 60%);
}

.customer-card.secondary {
  background: rgba(15,23,42,0.96);
}

.customer-card.moving {
  animation: slide-from-left 0.9s ease-out forwards;
}

.customer-card.moving-glow {
  animation: slide-from-left 0.9s ease-out forwards, glow-pulse 1.6s ease-in-out 0.9s 2;
}

a.customer-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

a.customer-card:hover {
  border-color: rgba(56,189,248,0.7);
  background: radial-gradient(circle at top left, rgba(56,189,248,0.25), rgba(15,23,42,1) 60%);
  transform: translateX(2px);
}

a.customer-card.secondary:hover {
  background: rgba(30,41,59,0.96);
  border-color: rgba(56,189,248,0.6);
}

.customer-name {
  font-weight: 600;
}

.customer-meta {
  font-size: 11px;
  opacity: 0.78;
}

.tasks-list {
  margin-top: 10px;
}

.task-item {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.45);
  font-size: 12px;
  background: rgba(15,23,42,0.96);
  margin-bottom: 8px;
}

.task-status {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.6);
}

.task-status.pending {
  color: #fbbf24;
  border-color: rgba(250,204,21,0.7);
}

.task-status.completed {
  color: #6ee7b7;
  border-color: rgba(45,212,191,0.7);
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 120px;
  margin-top: 8px;
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, #1d4ed8, #38bdf8);
  border-radius: 6px 6px 2px 2px;
  position: relative;
}

.chart-bar-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  opacity: 0.8;
}

.chart-bar-value {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: #bfdbfe;
}

.tag-cn {
  font-size: 11px;
  opacity: 0.8;
  margin-left: 8px;
}

.footer-note {
  margin-top: 10px;
  font-size: 11px;
  opacity: 0.72;
}

@keyframes slide-from-left {
  0% {
    transform: translateX(-120%);
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59,130,246,0.0);
  }
  30% {
    box-shadow: 0 0 0 1px rgba(59,130,246,0.9), 0 0 20px rgba(59,130,246,0.75);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59,130,246,0.0);
  }
}

@media (max-width: 960px) {
  .layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
  }
  .nav-section-title {
    display: none;
  }
  .main {
    padding: 16px;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* Top bar for notifications and language switch */
.top-bar {
  position: fixed;
  top: 0;
  right: 0;
  padding: 12px 24px;
  background: rgba(15,23,42,0.95);
  border-bottom: 1px solid rgba(148,163,184,0.2);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.notification-bell {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(59,130,246,0.1);
  transition: background 0.2s;
}

.notification-bell:hover {
  background: rgba(59,130,246,0.2);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.lang-switch {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(148,163,184,0.15);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.lang-switch:hover {
  background: rgba(148,163,184,0.25);
}

.customer-selector {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(148,163,184,0.3);
  color: #e5e8f0;
  font-size: 12px;
  cursor: pointer;
}

.customer-selector:hover {
  border-color: rgba(59,130,246,0.5);
}

/* Notification dropdown */
.notification-dropdown-wrapper {
  position: relative;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 500px;
  background: rgba(15,23,42,0.98);
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  z-index: 1001;
  display: flex;
  flex-direction: column;
}

.notification-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(148,163,184,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}

.notification-dropdown-content {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.notification-item {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(148,163,184,0.1);
  cursor: pointer;
  transition: background 0.2s;
}

.notification-item:hover {
  background: rgba(59,130,246,0.1);
}

.notification-item.unread {
  background: rgba(59,130,246,0.08);
}

.notification-item-time {
  font-size: 11px;
  opacity: 0.6;
  margin-bottom: 4px;
}

.notification-item-text {
  font-size: 12px;
  line-height: 1.4;
}

.notification-dropdown-footer {
  padding: 8px 16px;
  border-top: 1px solid rgba(148,163,184,0.2);
  text-align: center;
}

/* Language switching is now handled by lang.php language pack system */
/* Old CSS-based switching rules removed - all text is now dynamically replaced via PHP */


