/* ===================================================================
   General View On This — Animated Dashboard
   =================================================================== */

/* ───────────────────────────────────────────────────────────────────
   KEYFRAME ANIMATIONS
   ─────────────────────────────────────────────────────────────────── */
@keyframes headerGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes tickerMove {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes cloudDrift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

@keyframes cloudBumpFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.04); }
}

@keyframes coinGradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes coinRotateGlow {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.2); }
}

@keyframes pulseGreen {
  0%   { box-shadow: 0 0 0 0 rgba(99, 153, 34, 0.35); }
  70%  { box-shadow: 0 0 0 8px rgba(99, 153, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(99, 153, 34, 0); }
}

@keyframes pulseOrange {
  0%   { box-shadow: 0 0 0 0 rgba(186, 117, 23, 0.3); }
  70%  { box-shadow: 0 0 0 8px rgba(186, 117, 23, 0); }
  100% { box-shadow: 0 0 0 0 rgba(186, 117, 23, 0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ───────────────────────────────────────────────────────────────────
   ANIMATED GRADIENT HEADER
   ─────────────────────────────────────────────────────────────────── */
.dash-header {
  position: relative;
  background: linear-gradient(270deg, #1e3a5f, #2d7a4f, #5b3fa0, #1e5fa0, #2d7a4f, #4b2d8e);
  background-size: 400% 400%;
  animation: headerGradient 8s ease-in-out infinite;
  border-radius: 20px;
  padding: 2.5rem 2.5rem 0;
  margin-bottom: 2rem;
  overflow: hidden;
  will-change: background-position;
}

.dash-header-content {
  position: relative;
  z-index: 2;
  padding-bottom: 2rem;
}

.dash-header-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.dash-header-sub {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
}

/* ── Ticker Strip ── */
.ticker-strip {
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
  margin: 0 -2.5rem;
  padding: 10px 0;
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  animation: tickerMove 30s linear infinite;
  will-change: transform;
}

.ticker-item {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.ticker-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}


/* ───────────────────────────────────────────────────────────────────
   CLOUD WELCOME BOX
   ─────────────────────────────────────────────────────────────────── */
.cloud-welcome-wrapper {
  position: relative;
  margin-bottom: 2rem;
  padding-top: 18px;
  animation: fadeInUp 0.5s ease;
}

.cloud-bump {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(180deg, #e8f4fd 0%, #d4ecfb 100%);
  border: 1.5px solid rgba(147, 197, 235, 0.35);
  z-index: 1;
  animation: cloudBumpFloat 4s ease-in-out infinite;
  will-change: transform;
}

.cloud-bump-1 {
  width: 44px;
  height: 32px;
  top: 0;
  left: 40px;
  animation-delay: 0s;
}

.cloud-bump-2 {
  width: 56px;
  height: 38px;
  top: -4px;
  left: 72px;
  animation-delay: 0.6s;
}

.cloud-bump-3 {
  width: 36px;
  height: 26px;
  top: 4px;
  left: 118px;
  animation-delay: 1.2s;
}

.cloud-box {
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, #f0f8ff 0%, #e8f4fd 100%);
  border: 1.5px solid rgba(147, 197, 235, 0.4);
  border-radius: 20px 20px 20px 4px;
  padding: 1.5rem 2rem;
  box-shadow:
    0 2px 8px rgba(147, 197, 235, 0.15),
    0 8px 24px rgba(147, 197, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: cloudDrift 5s ease-in-out infinite;
  will-change: transform;
}

.cloud-greeting {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cloud-wave {
  font-size: 2rem;
  animation: cloudBumpFloat 2s ease-in-out infinite;
}

.cloud-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: #1a3a5c;
  margin-bottom: 0.15rem;
}

.cloud-title strong {
  font-weight: 700;
}

.cloud-subtitle {
  color: #4a7a9b;
  font-size: 0.9rem;
}

.cloud-subtitle strong {
  font-weight: 700;
  color: #1a5a8a;
}


/* ───────────────────────────────────────────────────────────────────
   STATS GRID
   ─────────────────────────────────────────────────────────────────── */
.dashboard-stats {
  display: grid;
  grid-template-columns: auto repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
  align-items: center;
}


/* ───────────────────────────────────────────────────────────────────
   COIN CREDIT CARD
   ─────────────────────────────────────────────────────────────────── */
.coin-card {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.5s ease 0.1s both;
}

.coin-outer {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, #FAC775, #EF9F27, #BA7517, #EF9F27, #FAC775);
  background-size: 200% 200%;
  animation: coinGradientShift 4s ease-in-out infinite;
  box-shadow:
    0 4px 20px rgba(186, 117, 23, 0.3),
    0 0 40px rgba(250, 199, 117, 0.15);
  will-change: background-position;
}

.coin-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(160deg, #FFF5E0, #FAECC8, #FDE9B0);
  border: 3px dashed rgba(186, 117, 23, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: coinRotateGlow 3s ease-in-out infinite;
  will-change: filter;
}

.coin-value {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  color: #7A5A1A;
  line-height: 1;
  letter-spacing: -0.02em;
}

.coin-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #A07A2E;
  margin-top: 4px;
}


/* ───────────────────────────────────────────────────────────────────
   STAT CARDS — Surveys (Green) & Orders (Orange)
   ─────────────────────────────────────────────────────────────────── */
.stat-card {
  position: relative;
  padding: 1.5rem;
  border-radius: 12px;
  transition: transform 150ms ease;
  animation: fadeInUp 0.5s ease 0.2s both;
}

.stat-card:hover {
  transform: translateY(-2px);
}

/* ── Surveys — Green ── */
.stat-card-surveys {
  background: linear-gradient(135deg, #EAF3DE, #C0DD97);
  border: 1.5px solid #639922;
  animation: fadeInUp 0.5s ease 0.2s both, pulseGreen 3s ease-in-out infinite;
}

.stat-card-surveys .stat-icon {
  color: #4A7A1A;
}

.stat-card-surveys .stat-value {
  color: #2D5A0A;
}

.stat-card-surveys .stat-label {
  color: #4A7A1A;
}

/* ── Orders — Orange/Amber ── */
.stat-card-orders {
  background: linear-gradient(135deg, #FAEEDA, #FAC775);
  border: 1.5px solid #BA7517;
  animation: fadeInUp 0.5s ease 0.3s both, pulseOrange 3s ease-in-out 1s infinite;
}

.stat-card-orders .stat-icon {
  color: #8A5A0A;
}

.stat-card-orders .stat-value {
  color: #6A4A0A;
}

.stat-card-orders .stat-label {
  color: #8A5A0A;
}

/* ── Business — Blue ── */
.stat-card-business {
  background: linear-gradient(135deg, #E0EEFB, #A8CCF0);
  border: 1.5px solid #2B5EA7;
  animation: fadeInUp 0.5s ease 0.4s both;
}

.stat-card-business .stat-icon {
  color: #1A4A8A;
}

.stat-card-business .stat-value {
  color: #1A3A6A;
}

.stat-card-business .stat-label {
  color: #1A4A8A;
}

/* ── Shared stat styles ── */
.stat-icon {
  margin-bottom: 0.75rem;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}


/* ───────────────────────────────────────────────────────────────────
   DASHBOARD GRID (65% / 35%)
   ─────────────────────────────────────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 65% 35%;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.dashboard-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}


/* ───────────────────────────────────────────────────────────────────
   ORDER LIST
   ─────────────────────────────────────────────────────────────────── */
.order-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-card {
  display: block;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 150ms ease;
}

.order-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.order-business-name {
  font-weight: 600;
  color: var(--color-text-primary);
}

.order-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}


/* ───────────────────────────────────────────────────────────────────
   QUICK ACTIONS
   ─────────────────────────────────────────────────────────────────── */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 150ms ease;
}

.action-card:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  transform: translateX(4px);
}

.action-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
}

.action-card-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 2px;
}

.action-card-body p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}


/* ───────────────────────────────────────────────────────────────────
   CREDIT HISTORY
   ─────────────────────────────────────────────────────────────────── */
.credit-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.credit-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.credit-history-item:last-child {
  border-bottom: none;
}

.credit-history-desc {
  font-size: 0.9rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

.credit-history-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}

.credit-history-amount {
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.credit-positive {
  color: #2D7A4F;
}

.credit-negative {
  color: #C0392B;
}


/* ───────────────────────────────────────────────────────────────────
   EMPTY STATE
   ─────────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
}

.empty-state a {
  color: var(--color-accent);
  font-weight: 600;
}


/* ───────────────────────────────────────────────────────────────────
   BADGES
   ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-pending   { background: #FEF3C7; color: #92400E; }
.badge-accepted  { background: #DBEAFE; color: #1E40AF; }
.badge-ready     { background: #D1FAE5; color: #065F46; }
.badge-completed { background: #BBF7D0; color: #14532D; }
.badge-declined  { background: #FEE2E2; color: #991B1B; }


/* ───────────────────────────────────────────────────────────────────
   RESPONSIVE
   ─────────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stats {
    grid-template-columns: 1fr repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-header {
    padding: 1.5rem 1.5rem 0;
    border-radius: 14px;
  }

  .ticker-strip {
    margin: 0 -1.5rem;
  }

  .dash-header-title {
    font-size: 1.75rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .coin-outer {
    width: 120px;
    height: 120px;
  }

  .coin-value {
    font-size: 2rem;
  }

  .cloud-box {
    padding: 1.25rem 1.5rem;
  }

  .cloud-greeting {
    flex-direction: column;
    text-align: center;
  }

  .cloud-bump {
    display: none;
  }
}

@media (max-width: 480px) {
  .dash-header-title {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .coin-outer {
    width: 110px;
    height: 110px;
  }

  .coin-value {
    font-size: 1.75rem;
  }
}
