/* ==========================================================================
   SayYes Design System & CSS Utility Suite
   Theme: Soft Lavender / Romantic Deep Pink Accent
   ========================================================================== */

:root {
  /* Color Palette Tokens */
  --bg-canvas: #ece6f5;
  --bg-surface: #ffffff;
  --bg-surface-alt: #faf8fc;

  --primary-pink: #d82a70;
  --primary-cta-start: #c02166;
  --primary-cta-end: #d82a70;
  --secondary-violet: #5c1b70;
  --violet-light: #f3e8ff;

  --text-dark: #2c0d3a;
  --text-muted: #7b6c8c;
  --border-subtle: rgba(123, 108, 140, 0.18);

  /* Status Tokens */
  --status-accepted-bg: #e1faee;
  --status-accepted-fg: #0d9488;
  --status-declined-bg: #fce8e6;
  --status-declined-fg: #e11d48;
  --status-pending-bg: #fef9c3;
  --status-pending-fg: #d97706;

  /* Shadows & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px rgba(44, 13, 58, 0.04);
  --shadow-lg: 0 8px 20px -4px rgba(44, 13, 58, 0.08);
}

/* Base Reset & Core Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-dark);
  padding: 24px 32px;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography & General Styling */
h1,
h2,
h3,
h4 {
  font-weight: 800;
  color: var(--text-dark);
}

a {
  color: var(--primary-pink);
  text-decoration: none;
}

/* Navigation Bar */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-tag {
  background: rgba(216, 42, 112, 0.1);
  color: var(--primary-pink);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Buttons */
.btn-create {
  background: linear-gradient(
    135deg,
    var(--primary-cta-start),
    var(--primary-cta-end)
  );
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(216, 42, 112, 0.25);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(216, 42, 112, 0.35);
}

.btn-create:active {
  transform: translateY(0);
}

.btn-copy {
  background: var(--secondary-violet);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Live Pulse Banner */
.hero-live-stream {
  background: linear-gradient(135deg, #ffffff 0%, #f5effc 100%);
  border: 1px solid rgba(216, 42, 112, 0.18);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

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

.live-pulse-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-pink);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--primary-pink);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

.stream-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.stream-pill {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 8px 14px;
  border-radius: 24px;
  font-size: 0.82rem;
  box-shadow: var(--shadow-sm);
}

/* Metrics Grid Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
}

.metric-card.accepted {
  background: #f0fdf4;
  border: 1px solid rgba(13, 148, 136, 0.2);
}
.metric-card.declined {
  background: #fff5f5;
  border: 1px solid rgba(225, 29, 72, 0.2);
}
.metric-card.pending {
  background: #fefce8;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.metric-title {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.metric-value {
  font-size: 2rem;
  font-weight: 800;
}

/* Request Section & Tables */
.main-section {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

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

.request-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  background: var(--bg-surface-alt);
}

.request-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.stages-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stages-table th {
  background: #f3ecf8;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: left;
  padding: 12px 16px;
}

.stages-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

/* Recipient Mobile Flow Specifics (view.html) */
.recipient-container {
  max-width: 440px;
  margin: 40px auto;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.option-card {
  background: var(--bg-surface-alt);
  border: 2px solid var(--border-subtle);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.option-card:hover,
.option-card.selected {
  border-color: var(--primary-pink);
  background: #fdf2f7;
}

/* Modal Overlay System */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 13, 58, 0.4);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-xl);
  width: 520px;
  max-width: 90%;
  padding: 24px;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .top-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .user-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .recipient-container {
    margin: 10px auto;
    padding: 20px;
  }
}
