/* ===========================================
   LIVE STATUS — DEDICATED STYLESHEET
   "A direct, private line to the community's floor manager."
   =========================================== */

/* ===== PAGE STRUCTURE ===== */
.live-status-page {
  position: relative;
  min-height: 100vh;
  background-color: var(--color-cream, #FDFBF7);
  padding-bottom: 4rem;
}

/* ===========================================
   PULSE INDICATOR
   A soft, glowing, organic shape that breathes.
   =========================================== */
.pulse-indicator-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 2rem;
  position: relative;
}

.pulse-core {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  background: var(--color-olive, #7A8B5E);
  border-radius: 50%;
  position: relative;
  z-index: 4;
  box-shadow: 0 0 12px rgba(122, 139, 94, 0.5);
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(122, 139, 94, 0.4);
  animation: statusPulse 3s ease-out infinite;
}

.pulse-ring.outer {
  width: 60px;
  height: 60px;
  animation-delay: 0s;
}

.pulse-ring.middle {
  width: 44px;
  height: 44px;
  animation-delay: 0.6s;
}

.pulse-ring.inner {
  width: 28px;
  height: 28px;
  animation-delay: 1.2s;
}

@keyframes statusPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.8);
    opacity: 0;
  }
}

.pulse-label {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--color-slate, #4A433D);
  font-style: italic;
  letter-spacing: 0.03em;
}

/* ===========================================
   STATUS WORKSPACE
   =========================================== */
.status-workspace {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ===== GREETING SECTION ===== */
.greeting-section {
  background: white;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(58, 50, 44, 0.06);
  margin-bottom: 2rem;
}

.greeting-text {
  margin-bottom: 1.5rem;
}

.greeting-line {
  font-family: var(--font-serif, 'Lora', Georgia, serif);
  font-size: 1.4rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.5rem;
}

.greeting-detail {
  font-size: 0.95rem;
  color: var(--color-slate, #4A433D);
  line-height: 1.6;
}

.greeting-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ===== CLIENT SEARCH ===== */
.client-search {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(58, 50, 44, 0.06);
  animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--color-slate, #4A433D);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 2.75rem;
  border: 1.5px solid rgba(58, 50, 44, 0.1);
  border-radius: 2.5rem;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.95rem;
  color: var(--color-chocolate, #3A322C);
  background: var(--color-cream, #FDFBF7);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-olive, #7A8B5E);
  box-shadow: 0 0 0 3px rgba(122, 139, 94, 0.08);
}

.search-input::placeholder {
  color: #b8b0a6;
  font-style: italic;
}

.voice-search-btn {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-olive, #7A8B5E);
  transition: background 0.3s;
}

.voice-search-btn:hover {
  background: rgba(122, 139, 94, 0.08);
}

/* Search Results */
.search-results {
  margin-top: 0.75rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid rgba(58, 50, 44, 0.06);
  overflow: hidden;
}

.search-result-item {
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(58, 50, 44, 0.04);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(122, 139, 94, 0.04);
}

.search-result-name {
  font-weight: 500;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.15rem;
}

.search-result-status {
  font-size: 0.8rem;
  color: var(--color-slate, #4A433D);
}

/* ===========================================
   FLOW MAP: Visual Status Cards
   =========================================== */
.flow-map-section {
  animation: fadeSlideIn 0.5s ease;
}

.flow-map-heading {
  font-family: var(--font-serif, 'Lora', Georgia, serif);
  font-size: 1.3rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.4rem;
}

.flow-map-subtitle {
  font-size: 0.9rem;
  color: var(--color-slate, #4A433D);
  margin-bottom: 1.5rem;
  font-style: italic;
}

.flow-map {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Client Journey Card */
.client-card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 16px rgba(58, 50, 44, 0.05);
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  border: 1.5px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.client-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(58, 50, 44, 0.1);
  border-color: rgba(122, 139, 94, 0.2);
}

.client-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(122, 139, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.client-card-info {
  flex: 1;
  min-width: 0;
}

.client-card-name {
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.25rem;
}

.client-card-category {
  font-size: 0.8rem;
  color: var(--color-olive, #7A8B5E);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

/* Journey Timeline (mini version on card) */
.journey-mini {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.journey-step-mini {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--color-slate, #4A433D);
}

.journey-step-mini.completed .step-dot-mini {
  background: var(--color-olive, #7A8B5E);
}

.journey-step-mini.active .step-dot-mini {
  background: var(--color-olive, #7A8B5E);
  animation: stepPulse 2s ease-in-out infinite;
}

.journey-step-mini.pending .step-dot-mini {
  background: #d4cfc7;
}

.step-dot-mini {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(122, 139, 94, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(122, 139, 94, 0); }
}

.journey-connector-mini {
  width: 16px;
  height: 1px;
  background: #d4cfc7;
}

.client-card-status-badge {
  flex-shrink: 0;
  align-self: center;
}

/* ===========================================
   CLIENT DETAIL VIEW
   =========================================== */
.client-detail-section {
  animation: fadeSlideIn 0.4s ease;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--color-olive, #7A8B5E);
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
  transition: color 0.3s;
}

.back-button:hover {
  color: #5d6e42;
}

.client-detail-card {
  background: white;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(58, 50, 44, 0.06);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(122, 139, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.detail-name {
  font-family: var(--font-serif, 'Lora', Georgia, serif);
  font-size: 1.4rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.15rem;
}

.detail-category {
  font-size: 0.85rem;
  color: var(--color-olive, #7A8B5E);
  font-weight: 500;
}

/* Full Journey Timeline */
.journey-timeline {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(58, 50, 44, 0.08);
}

.journey-step {
  position: relative;
  padding: 0.5rem 0 1.25rem 1.5rem;
}

.journey-step:last-child {
  padding-bottom: 0;
}

.journey-step::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid #d4cfc7;
}

.journey-step.completed::before {
  background: var(--color-olive, #7A8B5E);
  border-color: var(--color-olive, #7A8B5E);
}

.journey-step.active::before {
  background: white;
  border-color: var(--color-olive, #7A8B5E);
  box-shadow: 0 0 0 4px rgba(122, 139, 94, 0.15);
  animation: stepPulse 2s ease-in-out infinite;
}

.step-title {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 0.2rem;
}

.step-description {
  font-size: 0.85rem;
  color: var(--color-slate, #4A433D);
  line-height: 1.5;
}

.step-timestamp {
  font-size: 0.75rem;
  color: #b8b0a6;
  margin-top: 0.3rem;
}

/* Status Messages */
.detail-status-message {
  background: rgba(122, 139, 94, 0.05);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-chocolate, #3A322C);
  line-height: 1.5;
  border-left: 3px solid var(--color-olive, #7A8B5E);
}

.detail-status-message.bottleneck {
  background: rgba(194, 122, 90, 0.05);
  border-left-color: var(--color-terracotta, #C27A5A);
}

.detail-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* ===========================================
   PROACTIVE ALERTS
   =========================================== */
.alerts-section {
  margin-top: 2rem;
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 2px 16px rgba(58, 50, 44, 0.05);
  animation: fadeSlideIn 0.5s ease;
}

.alerts-heading {
  font-size: 1rem;
  color: var(--color-chocolate, #3A322C);
  margin-bottom: 1rem;
  font-weight: 500;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(122, 139, 94, 0.04);
  font-size: 0.88rem;
  color: var(--color-chocolate, #3A322C);
  line-height: 1.5;
}

.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-olive, #7A8B5E);
  margin-top: 0.4rem;
  flex-shrink: 0;
}

.alert-item.alert-urgent {
  background: rgba(194, 122, 90, 0.06);
}

.alert-item.alert-urgent .alert-dot {
  background: var(--color-terracotta, #C27A5A);
  animation: stepPulse 2s ease-in-out infinite;
}

/* ===========================================
   STATUS BADGES
   =========================================== */
.status-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge.active {
  background: rgba(122, 139, 94, 0.12);
  color: var(--color-olive, #7A8B5E);
}

.status-badge.pending {
  background: rgba(194, 122, 90, 0.08);
  color: var(--color-terracotta, #C27A5A);
}

.status-badge.complete {
  background: rgba(122, 139, 94, 0.06);
  color: #5d6e42;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 600px) {
  .pulse-indicator-section {
    padding: 2rem 1rem 1.5rem;
  }

  .status-workspace {
    padding: 0 1rem 2rem;
  }

  .greeting-section {
    padding: 1.5rem 1.25rem;
  }

  .greeting-line {
    font-size: 1.2rem;
  }

  .greeting-actions {
    flex-direction: column;
  }

  .greeting-actions .btn {
    width: 100%;
    text-align: center;
  }

  .client-card {
    flex-direction: column;
    gap: 0.75rem;
  }

  .client-card-status-badge {
    align-self: flex-start;
  }

  .client-detail-card {
    padding: 1.5rem 1.25rem;
  }

  .detail-actions {
    flex-direction: column;
  }

  .detail-actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
  .pulse-ring {
    animation: none;
    opacity: 0;
  }

  .journey-step-mini.active .step-dot-mini,
  .journey-step.active::before {
    animation: none;
  }

  .alert-item.alert-urgent .alert-dot {
    animation: none;
  }

  .client-card {
    transition: none;
  }
}